/** * Called by client code to use this menu map for registering a WordPress admin page * * @since 4.4.0 */ public function add_menu_page() { $wp_page_slug = $this->_add_menu_page(); if (!empty($wp_page_slug) && $this->admin_init_page instanceof EE_Admin_Page_Init) { try { $this->admin_init_page->set_page_dependencies($wp_page_slug); } catch (EE_Error $e) { $e->get_error(); } } }
/** * Called by client code to use this menu map for registering a WordPress admin page * * @param boolean $network_admin whether this is being added to the network admin page or not * @since 4.4.0 */ public function add_menu_page($network_admin = FALSE) { $show_on_menu_int = (int) $this->show_on_menu; if ($network_admin && in_array($show_on_menu_int, array(self::BLOG_AND_NETWORK_ADMIN, self::NETWORK_ADMIN_ONLY), TRUE) || !$network_admin && in_array($show_on_menu_int, array(self::BLOG_AND_NETWORK_ADMIN, self::BLOG_ADMIN_ONLY), TRUE)) { $wp_page_slug = $this->_add_menu_page(); } else { $wp_page_slug = ''; } if (!empty($wp_page_slug) && $this->admin_init_page instanceof EE_Admin_Page_Init) { try { $this->admin_init_page->set_page_dependencies($wp_page_slug); } catch (EE_Error $e) { $e->get_error(); } } }