示例#1
0
 /**
  * Creates the base class blogs admin menu that is available to any admin
  * user with administrative rights on the root blog who is on the admin side.
  *
  * @access private
  * @since 0.2
  */
 public function _configure_admin_interface()
 {
     if (ClassBlogs_Utils::on_root_blog_admin()) {
         $icon = $this->_get_admin_color_scheme() === 'fresh' ? 'icon16.png' : 'icon16-vs.png';
         $page = add_menu_page(__('Class Blogs', 'classblogs'), __('Class Blogs', 'classblogs'), self::_MENU_CAPABILITY, self::_MENU_ID, array($this, '_class_blogs_admin_page'), ClassBlogs_Utils::get_base_images_url() . $icon);
     }
 }
示例#2
0
 /**
  * Enables a possible admin page associated with a child plugin.
  *
  * This simply provides a shortcut for any child plugins to register an admin
  * page that is part of the class blogs menu group.  A child plugin can override
  * the `enable_admin_page` method called by this to register an admin page.
  *
  * @access private
  * @since 0.1
  */
 public function _maybe_enable_admin_page()
 {
     if (ClassBlogs_Utils::on_root_blog_admin()) {
         $admin = ClassBlogs_Admin::get_admin();
         $this->enable_admin_page($admin);
     }
 }