Make WordPress Core


Ignore:
Timestamp:
03/07/2007 05:04:37 AM (17 years ago)
Author:
markjaquith
Message:

add_users_page() to address changing top-level menu item. fixes #3706

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/wp-admin/admin-functions.php

    r4889 r4988  
    15321532function add_theme_page( $page_title, $menu_title, $access_level, $file, $function = '' ) {
    15331533    return add_submenu_page( 'themes.php', $page_title, $menu_title, $access_level, $file, $function );
     1534}
     1535
     1536function add_users_page( $page_title, $menu_title, $access_level, $file, $function = '' ) {
     1537    if ( current_user_can('edit_users') )
     1538        $parent = 'users.php';
     1539    else
     1540        $parent = 'profile.php';
     1541    return add_submenu_page( $parent, $page_title, $menu_title, $access_level, $file, $function );
    15341542}
    15351543
Note: See TracChangeset for help on using the changeset viewer.