wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
add_users_page › WordPress Function
Desde2.1.3
Obsoleton/a
› add_users_page ( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = null )
Parâmetros: (6) |
|
Retorna: |
|
Definido em: |
|
Codex: | |
Log de mudanças: |
|
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.Fonte
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 ); }