diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index dd136ceb74..8c9fc400c2 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -1545,6 +1545,14 @@ function add_theme_page( $page_title, $menu_title, $access_level, $file, $functi return add_submenu_page( 'themes.php', $page_title, $menu_title, $access_level, $file, $function ); } +function add_users_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { + if ( current_user_can('edit_users') ) + $parent = 'users.php'; + else + $parent = 'profile.php'; + return add_submenu_page( $parent, $page_title, $menu_title, $access_level, $file, $function ); +} + function validate_file( $file, $allowed_files = '' ) { if ( false !== strpos( $file, './' )) return 1;