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

git-svn-id: https://develop.svn.wordpress.org/trunk@13082 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-02-13 04:04:01 +00:00
parent 9da2f26d98
commit a719ecc0a2
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.
*