plug_footer.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. if (!class_exists("plug_footer")) {
  3. class plug_footer {
  4. function __construct($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. }