コード例 #1
0
ファイル: Admin.php プロジェクト: nxtclass/NXTClass-Plugin
     * @param string $message the text of the message to display
     *
     * @since 0.2
     */
    public static function show_admin_message($message)
    {
        echo sprintf('<div id="message" class="updated fade"><p>%s</p></div>', $message);
    }
    /**
     * Prints markup for an admin error message.
     *
     * @param string $message the text of the error to display
     *
     * @since 0.2
     */
    public static function show_admin_error($error)
    {
        echo sprintf('<div id="message" class="error fade"><p>%s</p></div>', $error);
    }
    /**
     * Prints markup to show the class-blogs admin icon.
     *
     * @since 0.2
     */
    public static function show_admin_icon()
    {
        echo '<div id="icon-class-blogs" class="icon32"></div>';
    }
}
$admin = ClassBlogs_Admin::get_admin();
コード例 #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);
     }
 }