|
@@ -1,56 +1,45 @@
|
|
|
<?php
|
|
|
|
|
|
if (!class_exists("plug_footer")) {
|
|
|
- class plug_footer {
|
|
|
+ class plug_footer {
|
|
|
function __construct($ns) {
|
|
|
- $this->title = __("Footer","dagsopt");
|
|
|
+ $this->title = __("Footer", "dagsopt");
|
|
|
$this->pluginname = $ns->pluginname;
|
|
|
$this->file = $ns->file;
|
|
|
$this->ns = $ns;
|
|
|
- }
|
|
|
+ }
|
|
|
function start() {
|
|
|
|
|
|
- add_action('wp_footer',array(&$this,'footer'),100);
|
|
|
-
|
|
|
-
|
|
|
+ add_action('wp_footer', array(&$this, 'footer'), 100);
|
|
|
|
|
|
}
|
|
|
|
|
|
function footer() {
|
|
|
- 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>';
|
|
|
+ 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>';
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- function help(){
|
|
|
- ?>
|
|
|
- <?php echo(__("Adds html snippet in footer","dagsopt")) ?>
|
|
|
-
|
|
|
-
|
|
|
- <?php
|
|
|
- }
|
|
|
-
|
|
|
- function Option($pre){
|
|
|
- update_option ( $pre.'_footer_html', $_POST [ $pre.'_footer_html' ] );
|
|
|
- }
|
|
|
-
|
|
|
- function admin_line($pre){
|
|
|
- ?>
|
|
|
- <?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>
|
|
|
- <?php
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
- global $plug_footer;
|
|
|
- $plug_footer = new plug_footer($this);
|
|
|
- $this->dagsopt['plug_footer'] = $plug_footer;
|
|
|
-
|
|
|
-}
|
|
|
+ function help() {
|
|
|
+ ?>
|
|
|
+ <?php echo (__("Adds html snippet in footer", "dagsopt")) ?>
|
|
|
+
|
|
|
|
|
|
+ <?php
|
|
|
+}
|
|
|
|
|
|
+ function Option($pre) {
|
|
|
+ update_option($pre . '_footer_html', $_POST[$pre . '_footer_html']);
|
|
|
+ }
|
|
|
|
|
|
+ function admin_line($pre) {
|
|
|
+ ?>
|
|
|
+ <?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>
|
|
|
+ <?php
|
|
|
+}
|
|
|
|
|
|
+ }
|
|
|
|
|
|
+ global $plug_footer;
|
|
|
+ $plug_footer = new plug_footer($this);
|
|
|
+ $this->dagsopt['plug_footer'] = $plug_footer;
|
|
|
|
|
|
+}
|