. */ $agca = new AGCA(); class AGCA{ private $colorizer=""; private $active_plugin; public function __construct() { add_filter('plugin_row_meta', array(&$this,'jk_filter_plugin_links'), 10, 2); add_action('admin_init', array(&$this,'agca_register_settings')); add_action('admin_head', array(&$this,'print_admin_css')); add_action('login_head', array(&$this,'print_login_head')); add_action('admin_menu', array(&$this,'agca_create_menu')); register_deactivation_hook(__FILE__, array(&$this,'agca_deactivate')); /*Styles*/ // add_action('admin_menu', array(&$this,'agca_get_styles')); // add_action('login_head', array(&$this,'agca_get_styles')); /*Initialize properties*/ $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer'); } // Add donate and support information function jk_filter_plugin_links($links, $file) { if ( $file == plugin_basename(__FILE__) ) { $links[] = '' . __('Settings') . ''; $links[] = '' . __('Support') . ''; $links[] = '' . __('Donate') . ''; } return $links; } function check_active_plugin(){ $ozh = false; if (is_plugin_active('ozh-admin-drop-down-menu/wp_ozh_adminmenu.php')) { $ozh = true; } $this->active_plugin = array( "ozh" => $ozh ); } function agca_get_includes() { ?> '; /*
*/ $button .= ''; $button .= ''.$name.''; $button .= ''; return $button; } function agca_decode($code){ $code = str_replace("{","",$code); $code = str_replace("}","",$code); $elements = explode(", ",$code); return $elements; } function jsonMenuArray($json,$type){ $arr = explode("|",$json); $elements = ""; $array =""; $first = true; //print_r($json); if($type == "colorizer"){ $elements = json_decode($arr[0],true); if($elements !=""){ return $elements; } }else if($type == "buttons"){ $elements = json_decode($arr[0],true); if($elements !=""){ foreach($elements as $k => $v){ $array.=$this->agca_create_admin_button($k,$v); } } }else if($type == "buttonsJq"){ $elements = json_decode($arr[0],true); if($elements !=""){ foreach($elements as $k => $v){ $array.='Info: You can use HTML tags in text areas, e.g. <a href="http://www.mywebsite.com">Visit Us</a>