wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
add_users_page › WordPress Function
Seit2.1.3
Veraltetn/v
› add_users_page ( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = null )
Parameter: (6) |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: | |
Changelog: |
|
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.Quellcode
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 ); }