public static function get_instance() { if (!isset(self::$_instance)) { $c = __CLASS__; self::$_instance = new $c(); } return self::$_instance; }
function add_wx_admin_page() { global $user_level; if ($user_level >= 5) { require_once 'posttype_wpwph_template.php'; $page_title = __('微信公众平台助手', 'WPWPH'); $menu_title = __('微信公众平台助手', 'WPWPH'); $capability = 'edit_pages'; $menu_slug = WPWPH_GENERAL_PAGE; $function = ''; add_object_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url); require_once 'class-wpwph-init.php'; require_once 'class-wpwph-history.php'; require_once 'class-wpwph-template.php'; require_once 'class-wpwph-menu.php'; WPWPH_Init::get_instance(); WPWPH_History::get_instance(); WPWPH_Template::get_instance(); WPWPH_Menu::get_instance(); } }