wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
add_users_page › WordPress Function
Od2.1.3
Przestarzałyn/a
› add_users_page ( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = null )
Parametry: (6) |
|
Powrót: |
|
Zdefiniowane na: |
|
Codex: | |
Dziennik zmian: |
|
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.Źródło
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 ); }