Make WordPress Core


Ignore:
Timestamp:
11/18/2006 07:31:29 AM (20 years ago)
Author:
ryan
Message:

Hold off on menu cleanup until next release. There be dragons.

File:
1 edited

Legend:

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

    r4478 r4480  
    55// The minimum level the user needs to access the item: between 0 and 10
    66// The URL of the item's file
    7 // Slug
    8 $menu[0] = array(__('Dashboard'), 'read', 'index.php', 'home');
     7$menu[0] = array(__('Dashboard'), 'read', 'index.php');
    98
    10 // So when people switch between write and manage they go to the appropiate page/post mode they were on
    119if ( strstr($_SERVER['REQUEST_URI'], 'edit-pages.php') )
    12         $menu[5] = array(__('Write'), 'edit_pages', 'page-new.php', 'write');
     10        $menu[5] = array(__('Write'), 'edit_pages', 'page-new.php');
    1311else
    14         $menu[5] = array(__('Write'), 'edit_posts', 'post-new.php', 'write');
    15 
     12        $menu[5] = array(__('Write'), 'edit_posts', 'post-new.php');
    1613if ( strstr($_SERVER['REQUEST_URI'], 'page-new.php') )
    17         $menu[10] = array(__('Manage'), 'edit_pages', 'edit-pages.php', 'manage');
     14        $menu[10] = array(__('Manage'), 'edit_pages', 'edit-pages.php');
    1815else
    19         $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php', 'manage');
     16        $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');
    2017       
    21 $menu[15] = array(__('Comments'), 'edit_posts', 'edit-comments.php', 'comments');
    22 $menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php', 'blogroll');
    23 $menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php', 'themes');
    24 $menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php', 'plugins');
    25 
     18$menu[15] = array(__('Comments'), 'edit_posts', 'edit-comments.php');
     19$menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php');
     20$menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php');
     21$menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php');
    2622if ( current_user_can('edit_users') )
    27         $menu[35] = array(__('Users'), 'edit_users', 'users.php', 'users');
     23        $menu[35] = array(__('Users'), 'edit_users', 'users.php');
    2824else
    29         $menu[35] = array(__('Profile'), 'read', 'profile.php', 'profile');
    30 
    31 $menu[40] = array(__('Options'), 'manage_options', 'options-general.php', 'options');
     25        $menu[35] = array(__('Profile'), 'read', 'profile.php');
     26$menu[40] = array(__('Options'), 'manage_options', 'options-general.php');
    3227
    3328
     
    7570
    7671// Create list of page plugin hook names.
    77 foreach ( $menu as $menu_page )
     72foreach ($menu as $menu_page) {
    7873        $admin_page_hooks[$menu_page[2]] = sanitize_title($menu_page[0]);
     74}
    7975
    8076$_wp_submenu_nopriv = array();
     
    133129}
    134130
    135 unset( $id );
     131unset($id);
    136132
    137 uksort( $menu, 'strnatcasecmp' );
     133uksort($menu, "strnatcasecmp"); // make it all pretty
    138134
    139 if ( !user_can_access_admin_page() )
     135if (! user_can_access_admin_page()) {
    140136        wp_die( __('You do not have sufficient permissions to access this page.') );
     137}
    141138
    142139?>
Note: See TracChangeset for help on using the changeset viewer.