plug_footer.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. if (!class_exists("plug_footer")) {
  3. class plug_footer {
  4. function plug_footer($ns) {
  5. $this->title = __("Footer","dagsopt");
  6. $this->pluginname = $ns->pluginname;
  7. $this->file = $ns->file;
  8. $this->ns = $ns;
  9. }
  10. function start() {
  11. add_action('wp_footer',array(&$this,'footer'),100);
  12. }
  13. function footer() {
  14. echo '<div id="dags-footer" class="container"><div class="row"><div class="pull-right">'.stripcslashes(get_option($this->pluginname."_footer_footer_html")).'</div></div></div>';
  15. }
  16. function help(){
  17. ?>
  18. <?php echo(__("Adds html snippet in footer","dagsopt")) ?>
  19. <?php
  20. }
  21. function Option($pre){
  22. update_option ( $pre.'_footer_html', $_POST [ $pre.'_footer_html' ] );
  23. }
  24. function admin_line($pre){
  25. ?>
  26. <?php echo(__("Footer html:","dagsopt")) ?><br><textarea style="width: 100%; height: 150px;" name="<?php echo( $pre.'_footer_html' ); ?>"><?php echo(stripcslashes(get_option($pre."_footer_html"))); ?></textarea>
  27. <?php
  28. }
  29. }
  30. global $plug_footer;
  31. $plug_footer = new plug_footer($this);
  32. $this->dagsopt['plug_footer'] = $plug_footer;
  33. }