Make WordPress Core

Changeset 9071


Ignore:
Timestamp:
10/02/2008 06:52:45 PM (16 years ago)
Author:
ryan
Message:

Resurrect users menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r9047 r9071  
    5353    $submenu['themes.php'][10] = array(__('Editor'), 'edit_themes', 'theme-editor.php');
    5454
    55 $menu[35] = array(__('Settings'), 'manage_options', 'options-general.php');
     55$menu[35] = array( __('Plugins'), 'activate_plugins', 'plugins.php' );
     56    $submenu['plugins.php'][15] = array(__('Add New'), 'install_plugins', 'plugin-install.php');   
     57    $submenu['plugins.php'][5]  = array( __('Installed'), 'activate_plugins', 'plugins.php' );
     58    $submenu['plugins.php'][10] = array( __('Editor'), 'edit_plugins', 'plugin-editor.php' );
     59
     60if ( current_user_can('edit_users') )
     61    $menu[40] = array(__('Users'), 'edit_users', 'users.php');
     62else
     63    $menu[40] = array(__('Profile'), 'read', 'profile.php');
     64
     65if ( current_user_can('edit_users') ) {
     66    $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
     67    $submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php');
     68    $submenu['users.php'][10] = array(__('Your Profile'), 'read', 'profile.php');
     69} else {
     70    $_wp_real_parent_file['users.php'] = 'profile.php';
     71    $submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php');
     72}
     73
     74$menu[45] = array(__('Tools'), 'manage_options', 'import.php');
     75    $submenu['import.php'][5] = array( __('Import'), 'import', 'import.php' );
     76    $submenu['import.php'][10] = array( __('Export'), 'import', 'export.php' );
     77    $submenu['import.php'][15] = array( __('Press This'), 'publish_posts', 'press-this-landing.php' );
     78    if ( ! $is_opera )
     79        $submenu['import.php'][20] = array( __('Turbo'), 'read', 'turbo.php' );
     80
     81$menu[50] = array(__('Settings'), 'manage_options', 'options-general.php');
    5682    $submenu['options-general.php'][10] = array(__('General'), 'manage_options', 'options-general.php');
    5783    $submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
     
    6288    $submenu['options-general.php'][40] = array(__('Permalinks'), 'manage_options', 'options-permalink.php');
    6389    $submenu['options-general.php'][45] = array(__('Miscellaneous'), 'manage_options', 'options-misc.php');
    64     $submenu['options-general.php'][50] = array( __('Users'), 'edit_users', 'users.php' );
    6590
    66 $menu[40] = array(__('Tools'), 'manage_options', 'import.php');
    67     $submenu['import.php'][5] = array( __('Import'), 'import', 'import.php' );
    68     $submenu['import.php'][10] = array( __('Export'), 'import', 'export.php' );
    69     $submenu['import.php'][15] = array( __('Press This'), 'publish_posts', 'press-this-landing.php' );
    70     if ( ! $is_opera )
    71         $submenu['import.php'][20] = array( __('Turbo'), 'read', 'turbo.php' );
    72 
    73 $menu[45] = array( __('Plugins'), 'activate_plugins', 'plugins.php' );
    74     $submenu['plugins.php'][15] = array(__('Add New'), 'install_plugins', 'plugin-install.php');   
    75     $submenu['plugins.php'][5]  = array( __('Installed'), 'activate_plugins', 'plugins.php' );
    76     $submenu['plugins.php'][10] = array( __('Editor'), 'edit_plugins', 'plugin-editor.php' );
    77    
    78 
    79 $menu[50] = array( __('Help'), 'read', 'dummy.php' );
     91$menu[55] = array( __('Help'), 'read', 'dummy.php' );
    8092    $submenu['dummy.php'][5]  = array( __('Documentation'), 'read', __('http://codex.wordpress.org/') );
    8193    $submenu['dummy.php'][10]  = array( __('Forums'), 'read', __('http://wordpress.org/support/') );
Note: See TracChangeset for help on using the changeset viewer.