WordPress.org

Make WordPress Core

Changeset 13082


Ignore:
Timestamp:
02/13/2010 04:04:01 AM (10 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin.php

    r12976 r13082  
    884884
    885885/**
     886 * Add sub menu page to the plugins main menu.
     887*
     888 * This function takes a capability which will be used to determine whether
     889 * or not a page is included in the menu.
     890 *
     891 * The function which is hooked in to handle the output of the page must check
     892 * that the user has the required capability as well.
     893 *
     894 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected
     895 * @param string $menu_title The text to be used for the menu
     896 * @param string $capability The capability required for this menu to be displayed to the user.
     897 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
     898 * @param callback $function The function to be called to output the content for this page.
     899 */
     900function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     901    return add_submenu_page( 'plugins.php', $page_title, $menu_title, $capability, $menu_slug, $function );
     902}
     903
     904/**
    886905 * Add sub menu page to the Users/Profile main menu.
    887906*
Note: See TracChangeset for help on using the changeset viewer.