Changeset 4480 for trunk/wp-admin/menu.php
- Timestamp:
- 11/18/2006 07:31:29 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/menu.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/menu.php
r4478 r4480 5 5 // The minimum level the user needs to access the item: between 0 and 10 6 6 // 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'); 9 8 10 // So when people switch between write and manage they go to the appropiate page/post mode they were on11 9 if ( 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'); 13 11 else 14 $menu[5] = array(__('Write'), 'edit_posts', 'post-new.php', 'write'); 15 12 $menu[5] = array(__('Write'), 'edit_posts', 'post-new.php'); 16 13 if ( 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'); 18 15 else 19 $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php' , 'manage');16 $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php'); 20 17 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'); 26 22 if ( current_user_can('edit_users') ) 27 $menu[35] = array(__('Users'), 'edit_users', 'users.php' , 'users');23 $menu[35] = array(__('Users'), 'edit_users', 'users.php'); 28 24 else 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'); 32 27 33 28 … … 75 70 76 71 // Create list of page plugin hook names. 77 foreach ( $menu as $menu_page )72 foreach ($menu as $menu_page) { 78 73 $admin_page_hooks[$menu_page[2]] = sanitize_title($menu_page[0]); 74 } 79 75 80 76 $_wp_submenu_nopriv = array(); … … 133 129 } 134 130 135 unset( $id);131 unset($id); 136 132 137 uksort( $menu, 'strnatcasecmp' );133 uksort($menu, "strnatcasecmp"); // make it all pretty 138 134 139 if ( !user_can_access_admin_page() )135 if (! user_can_access_admin_page()) { 140 136 wp_die( __('You do not have sufficient permissions to access this page.') ); 137 } 141 138 142 139 ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)