mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
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:
parent
ea6e709e1d
commit
c0f5c80ab4
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user