12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- if (!class_exists("plug_custom_header")) {
- class plug_custom_header {
- function __construct($ns) {
- $this->title = __("Custom Header Code","dagsopt");
- $this->pluginname = $ns->pluginname;
- $this->file = $ns->file;
- $this->ns = $ns;
- }
- function start() {
- add_action('wp_head',array(&$this,'header'),1);
- }
- function header() {
- if(get_option($this->pluginname."_custom_header") == "on"){
- $data = get_option($this->pluginname."_custom_header_data");
- echo( stripcslashes($data) );
- };
- }
- function help(){
- ?>
- <?php echo(__("Adds code in the head ","dagsopt")) ?>
- <?php
- }
- function Option($pre){
- update_option ( $pre.'_data', $_POST [ $pre.'_data' ] );
- }
- function admin_line($pre){
- ?>
- <?php echo(__("Custom data:","dagsopt")) ?><br><textarea name="<?php echo( $pre.'_data' ); ?>"><?php echo(stripcslashes(get_option($pre."_data"))); ?></textarea> <br>
- <?php
- }
- }
- global $plug_custom_header;
- $plug_custom_header = new plug_custom_header($this);
- $this->dagsopt['plug_custom_header'] = $plug_custom_header;
-
- }
|