Add add_plugins_page() function to add a submenu of the Plugins Page. Fixes #11377

git-svn-id: http://svn.automattic.com/wordpress/trunk@13082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-02-13 04:04:01 +00:00
parent ea6e709e1d
commit c0f5c80ab4
1 changed files with 19 additions and 0 deletions

View File

@ -882,6 +882,25 @@ function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $fun
return add_submenu_page( 'themes.php', $page_title, $menu_title, $capability, $menu_slug, $function );
}
/**
* Add sub menu page to the plugins main menu.
*
* This function takes a capability which will be used to determine whether
* or not a page is included in the menu.
*
* The function which is hooked in to handle the output of the page must check
* that the user has the required capability as well.
*
* @param string $page_title The text to be displayed in the title tags of the page when the menu is selected
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
*/
function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
return add_submenu_page( 'plugins.php', $page_title, $menu_title, $capability, $menu_slug, $function );
}
/**
* Add sub menu page to the Users/Profile main menu.
*