wpseek.com
A WordPress-centric search engine for devs and theme authors
add_users_page › WordPress Function
Since2.1.3
Deprecatedn/a
› add_users_page ( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = null )
Parameters: (6) |
|
Returns: |
|
Defined at: |
|
Codex: | |
Change Log: |
|
Adds a submenu page to the Users/Profile 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.Source
function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = null ) { if ( current_user_can( 'edit_users' ) ) { $parent = 'users.php'; } else { $parent = 'profile.php'; } return add_submenu_page( $parent, $page_title, $menu_title, $capability, $menu_slug, $callback, $position ); }