Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 245 lines (203 sloc) 12.251 kb
2bed8101 »
2003-05-28 Admin menu now tells you where you are.
1 <?php
7f894ae4 »
2008-08-14 phpdoc for wp-admin. See #7496 props santosj.
2 /**
3 * Build Administration Menu.
4 *
5 * @package WordPress
6 * @subpackage Administration
7 */
8
9 /**
10 * Constructs the admin menu bar.
11 *
12 * The elements in the array are :
13 * 0: Menu item name
14 * 1: Minimum level or capability required.
15 * 2: The URL of the item's file
7a2fb7dc »
2008-10-14 Side folding for the menu, first run, still needs colours, styling an…
16 * 3: Class
076763cf »
2008-10-23 Admin menu styling
17 * 4: ID
e89192b1 »
2008-12-09 Strip trailing whitespace
18 * 5: Icon for top level menu
7f894ae4 »
2008-08-14 phpdoc for wp-admin. See #7496 props santosj.
19 *
20 * @global array $menu
21 * @name $menu
22 * @var array
23 */
d0f79bb3 »
2007-02-27 trailing tabs and whitespace cleanup.
24
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
25 $menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'none' );
7a77e674 »
2010-02-04 Move Network menu to the top. see #11644
26
301be4ee »
2011-05-11 Rename submenus to not clash with top level menus. Introduce all_item…
27 $submenu[ 'index.php' ][0] = array( __('Home'), 'read', 'index.php' );
4d750411 »
2010-11-14 Don't display Updates submenu in site admin. See #14435
28
29 if ( is_multisite() ) {
30 $submenu[ 'index.php' ][5] = array( __('My Sites'), 'read', 'my-sites.php' );
b61a5b05 »
2011-01-04 Update indicator for the Network Admin link. fixes #16063.
31 }
32
c2d37a3d »
2011-07-26 Consolidate update count code into wp_get_update_data(). Props mitcho…
33 if ( ! is_multisite() || is_super_admin() )
34 $update_data = wp_get_update_data();
4d750411 »
2010-11-14 Don't display Updates submenu in site admin. See #14435
35
b61a5b05 »
2011-01-04 Update indicator for the Network Admin link. fixes #16063.
36 if ( ! is_multisite() ) {
fbd46fbc »
2012-06-30 Allow the 'WordPress Updates' page to be accessible even if you canno…
37 if ( current_user_can( 'update_core' ) )
38 $cap = 'update_core';
39 elseif ( current_user_can( 'update_plugins' ) )
40 $cap = 'update_plugins';
41 else
42 $cap = 'update_themes';
43 $submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-{$update_data['counts']['total']}' title='{$update_data['title']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), $cap, 'update-core.php');
44 unset( $cap );
ffa4103e »
2010-03-05 Show the dashboard instead of Update Core page for the dashboard.. Ad…
45 }
fc23a88d »
2010-01-06 Move some multisite menu checks directly into menu.php. see #11763
46
d2e54b79 »
2011-05-18 Revert [17943] as it breaks plugins, props johnjamesjacoby, fixes #17484
47 $menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
7a2fb7dc »
2008-10-14 Side folding for the menu, first run, still needs colours, styling an…
48
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
49 $menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top menu-icon-post', 'menu-posts', 'none' );
301be4ee »
2011-05-11 Rename submenus to not clash with top level menus. Introduce all_item…
50 $submenu['edit.php'][5] = array( __('All Posts'), 'edit_posts', 'edit.php' );
0bf194de »
2009-03-02 Use _x() and extracted comments. Props nbachiyski. see #9112
51 /* translators: add new post */
f8f60ac0 »
2012-09-27 Introduce create_posts meta capability. Props scribu, nacin, casben79…
52 $submenu['edit.php'][10] = array( _x('Add New', 'post'), 'create_posts', 'post-new.php' );
affd9667 »
2009-02-12 Custom taxonomies support: quick edit, delete, show in the menu
53
54 $i = 15;
775c840d »
2010-12-02 Use get_taxonomies() when iterating taxonomies for menus. props wojte…
55 foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
39620db2 »
2010-02-19 First pass at giving taxonomies a show_ui param. See #10773
56 if ( ! $tax->show_ui || ! in_array('post', (array) $tax->object_type, true) )
affd9667 »
2009-02-12 Custom taxonomies support: quick edit, delete, show in the menu
57 continue;
58
91d3b6be »
2010-11-09 Introduce menu_name label for taxonomies and post types. Defaults to …
59 $submenu['edit.php'][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name );
affd9667 »
2009-02-12 Custom taxonomies support: quick edit, delete, show in the menu
60 }
055f3db3 »
2010-01-26 unset temp vars in menu.php so they don't pollute the global namespace.
61 unset($tax);
affd9667 »
2009-02-12 Custom taxonomies support: quick edit, delete, show in the menu
62
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
63 $menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'none' );
4958a075 »
2008-11-25 Library instead of Edit
64 $submenu['upload.php'][5] = array( __('Library'), 'upload_files', 'upload.php');
0bf194de »
2009-03-02 Use _x() and extracted comments. Props nbachiyski. see #9112
65 /* translators: add new file */
817b932e »
2012-04-12 Don't hide links to the upload form and show an error for mobile devi…
66 $submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php');
33af30eb »
2012-09-21 Use the regular post type UI for editing single media items (attachme…
67 foreach ( get_taxonomies_for_attachments( 'objects' ) as $tax ) {
68 if ( ! $tax->show_ui )
69 continue;
70
71 $submenu['upload.php'][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name . '&amp;post_type=attachment' );
72 }
73 unset($tax);
60fb050f »
2008-11-25 Default to edit submenu rather than add new.
74
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
75 $menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'none' );
3526f8a7 »
2011-11-07 Context for 'All Links'. props SergeyBiryukov, pavelevap. fixes #18096.
76 $submenu['link-manager.php'][5] = array( _x('All Links', 'admin menu'), 'manage_links', 'link-manager.php' );
0bf194de »
2009-03-02 Use _x() and extracted comments. Props nbachiyski. see #9112
77 /* translators: add new links */
94859834 »
2010-01-21 i18n fixes. Props nbachiyski. fixes #11954
78 $submenu['link-manager.php'][10] = array( _x('Add New', 'link'), 'manage_links', 'link-add.php' );
020ce737 »
2010-08-11 Ajaxify list-type screens in the admin. See #14579
79 $submenu['link-manager.php'][15] = array( __('Link Categories'), 'manage_categories', 'edit-tags.php?taxonomy=link_category' );
60fb050f »
2008-11-25 Default to edit submenu rather than add new.
80
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
81 $menu[20] = array( __('Pages'), 'edit_pages', 'edit.php?post_type=page', '', 'menu-top menu-icon-page', 'menu-pages', 'none' );
301be4ee »
2011-05-11 Rename submenus to not clash with top level menus. Introduce all_item…
82 $submenu['edit.php?post_type=page'][5] = array( __('All Pages'), 'edit_pages', 'edit.php?post_type=page' );
0bf194de »
2009-03-02 Use _x() and extracted comments. Props nbachiyski. see #9112
83 /* translators: add new page */
05bf7382 »
2010-01-15 Merge edit-pages.php into edit.php. see #9674
84 $submenu['edit.php?post_type=page'][10] = array( _x('Add New', 'page'), 'edit_pages', 'post-new.php?post_type=page' );
3dae6676 »
2010-05-26 Show taxonomies registered against the page type in the Pages submenu…
85 $i = 15;
775c840d »
2010-12-02 Use get_taxonomies() when iterating taxonomies for menus. props wojte…
86 foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
3dae6676 »
2010-05-26 Show taxonomies registered against the page type in the Pages submenu…
87 if ( ! $tax->show_ui || ! in_array('page', (array) $tax->object_type, true) )
88 continue;
89
91d3b6be »
2010-11-09 Introduce menu_name label for taxonomies and post types. Defaults to …
90 $submenu['edit.php?post_type=page'][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name . '&amp;post_type=page' );
3dae6676 »
2010-05-26 Show taxonomies registered against the page type in the Pages submenu…
91 }
92 unset($tax);
de958f41 »
2008-09-25 Menu reorg
93
71191104 »
2010-10-07 Unset global variables when they are no longer needed.
94 $awaiting_mod = wp_count_comments();
95 $awaiting_mod = $awaiting_mod->moderated;
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
96 $menu[25] = array( sprintf( __('Comments %s'), "<span class='awaiting-mod count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top menu-icon-comments', 'menu-comments', 'none' );
71191104 »
2010-10-07 Unset global variables when they are no longer needed.
97 unset($awaiting_mod);
de958f41 »
2008-09-25 Menu reorg
98
301be4ee »
2011-05-11 Rename submenus to not clash with top level menus. Introduce all_item…
99 $submenu[ 'edit-comments.php' ][0] = array( __('All Comments'), 'edit_posts', 'edit-comments.php' );
100
908fbae3 »
2008-11-05 add_object_page()
101 $_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group
102
c840f467 »
2010-10-19 Introduce show_in_menu for register_post_type. Allows post types to b…
103 foreach ( (array) get_post_types( array('show_ui' => true, '_builtin' => false, 'show_in_menu' => true ) ) as $ptype ) {
f9f8d618 »
2010-04-16 Fix menu icons for custom post types. Fixes #12992, props wmrom.
104 $ptype_obj = get_post_type_object( $ptype );
c840f467 »
2010-10-19 Introduce show_in_menu for register_post_type. Allows post types to b…
105 // Check if it should be a submenu.
106 if ( $ptype_obj->show_in_menu !== true )
107 continue;
93a08d4d »
2010-06-27 Increment first, to avoid ++ later on when it conflicts with [25].
108 $ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : ++$_wp_last_object_menu; // If we're to use $_wp_last_object_menu, increment it first.
9af84531 »
2010-05-15 Make sure custom post types have unique IDs in the admin menu. props …
109 $ptype_for_id = sanitize_html_class( $ptype );
f9f8d618 »
2010-04-16 Fix menu icons for custom post types. Fixes #12992, props wmrom.
110 if ( is_string( $ptype_obj->menu_icon ) ) {
111 $menu_icon = esc_url( $ptype_obj->menu_icon );
9af84531 »
2010-05-15 Make sure custom post types have unique IDs in the admin menu. props …
112 $ptype_class = $ptype_for_id;
f9f8d618 »
2010-04-16 Fix menu icons for custom post types. Fixes #12992, props wmrom.
113 } else {
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
114 $menu_icon = 'none';
f9f8d618 »
2010-04-16 Fix menu icons for custom post types. Fixes #12992, props wmrom.
115 $ptype_class = 'post';
116 }
3ad70c3e »
2010-04-10 Prevent $post_type_object->menu_position from conflicting with anothe…
117
118 // if $ptype_menu_position is already populated or will be populated by a hard-coded value below, increment the position.
119 $core_menu_positions = array(59, 60, 65, 70, 75, 80, 85, 99);
120 while ( isset($menu[$ptype_menu_position]) || in_array($ptype_menu_position, $core_menu_positions) )
121 $ptype_menu_position++;
122
91d3b6be »
2010-11-09 Introduce menu_name label for taxonomies and post types. Defaults to …
123 $menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype", '', 'menu-top menu-icon-' . $ptype_class, 'menu-posts-' . $ptype_for_id, $menu_icon );
301be4ee »
2011-05-11 Rename submenus to not clash with top level menus. Introduce all_item…
124 $submenu["edit.php?post_type=$ptype"][5] = array( $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype");
7734a07c »
2010-05-12 Move post type object capabilities to a 'cap' object. Allow them to b…
125 $submenu["edit.php?post_type=$ptype"][10] = array( $ptype_obj->labels->add_new, $ptype_obj->cap->edit_posts, "post-new.php?post_type=$ptype" );
da89de49 »
2010-01-04 More custom post type support. Props scribu. see #9674
126
127 $i = 15;
775c840d »
2010-12-02 Use get_taxonomies() when iterating taxonomies for menus. props wojte…
128 foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
39620db2 »
2010-02-19 First pass at giving taxonomies a show_ui param. See #10773
129 if ( ! $tax->show_ui || ! in_array($ptype, (array) $tax->object_type, true) )
da89de49 »
2010-01-04 More custom post type support. Props scribu. see #9674
130 continue;
131
91d3b6be »
2010-11-09 Introduce menu_name label for taxonomies and post types. Defaults to …
132 $submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, "edit-tags.php?taxonomy=$tax->name&amp;post_type=$ptype" );
da89de49 »
2010-01-04 More custom post type support. Props scribu. see #9674
133 }
134 }
dc074858 »
2010-11-09 Set $tax as the taxonomy object, and kill off our colliding global fr…
135 unset($ptype, $ptype_obj, $ptype_class, $ptype_for_id, $ptype_menu_position, $menu_icon, $i, $tax);
da89de49 »
2010-01-04 More custom post type support. Props scribu. see #9674
136
d2e54b79 »
2011-05-18 Revert [17943] as it breaks plugins, props johnjamesjacoby, fixes #17484
137 $menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
7a2fb7dc »
2008-10-14 Side folding for the menu, first run, still needs colours, styling an…
138
7389ea41 »
2010-05-12 Use the edit_theme_options capability. fixes #13290.
139 if ( current_user_can( 'switch_themes') ) {
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
140 $menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'none' );
7389ea41 »
2010-05-12 Use the edit_theme_options capability. fixes #13290.
141 $submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php');
e13e6254 »
2010-06-10 Switch to current_theme_supports(menus) internally. Adding theme supp…
142 if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) )
f15cdc78 »
2010-05-24 Menu tweaks. Save menu locations when saving the menu. Also, centrali…
143 $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php');
7389ea41 »
2010-05-12 Use the edit_theme_options capability. fixes #13290.
144 } else {
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
145 $menu[60] = array( __('Appearance'), 'edit_theme_options', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'none' );
7389ea41 »
2010-05-12 Use the edit_theme_options capability. fixes #13290.
146 $submenu['themes.php'][5] = array(__('Themes'), 'edit_theme_options', 'themes.php');
e13e6254 »
2010-06-10 Switch to current_theme_supports(menus) internally. Adding theme supp…
147 if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) )
f15cdc78 »
2010-05-24 Menu tweaks. Save menu locations when saving the menu. Also, centrali…
148 $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php' );
7389ea41 »
2010-05-12 Use the edit_theme_options capability. fixes #13290.
149 }
e193aec3 »
2010-03-04 Move 'Add New Themes' and 'Editor' to the bottom of the Appearance me…
150
c1d15901 »
2011-09-03 Fix typos in documentation (wp-admin/). See #18560.
151 // Add 'Editor' to the bottom of the Appearance menu.
4dd3b77b »
2010-12-06 Link to network/update-core when running multisite. Remove theme/plug…
152 if ( ! is_multisite() )
153 add_action('admin_menu', '_add_themes_utility_last', 101);
e193aec3 »
2010-03-04 Move 'Add New Themes' and 'Editor' to the bottom of the Appearance me…
154 function _add_themes_utility_last() {
bc60e696 »
2010-03-21 Do not display empty Appearance menu for subscribers. Need to use Men…
155 // Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook
156 add_submenu_page('themes.php', _x('Editor', 'theme editor'), _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php');
e193aec3 »
2010-03-04 Move 'Add New Themes' and 'Editor' to the bottom of the Appearance me…
157 }
de958f41 »
2008-09-25 Menu reorg
158
5b285e08 »
2012-06-30 Un-indent after [21198]. see #19824.
159 $count = '';
160 if ( ! is_multisite() && current_user_can( 'update_plugins' ) ) {
161 if ( ! isset( $update_data ) )
162 $update_data = wp_get_update_data();
163 $count = "<span class='update-plugins count-{$update_data['counts']['plugins']}'><span class='plugin-count'>" . number_format_i18n($update_data['counts']['plugins']) . "</span></span>";
164 }
ebdc0d02 »
2011-06-06 Fix warnings in menu.php when plugins.php is enabled for non-supes. P…
165
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
166 $menu[65] = array( sprintf( __('Plugins %s'), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'none' );
daa14c36 »
2011-06-10 Bring out the pinking shears.
167
5b285e08 »
2012-06-30 Un-indent after [21198]. see #19824.
168 $submenu['plugins.php'][5] = array( __('Installed Plugins'), 'activate_plugins', 'plugins.php' );
3462aab6 »
2011-05-25 Fix name of plugins submenu. Props ocean90. fixes #17530
169
5b285e08 »
2012-06-30 Un-indent after [21198]. see #19824.
170 if ( ! is_multisite() ) {
171 /* translators: add new plugin */
172 $submenu['plugins.php'][10] = array( _x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php' );
173 $submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
174 }
9d20dfc4 »
2012-06-30 Enforce multisite plugins menu preference in map_meta_cap(). This mea…
175
176 unset( $update_data );
d89b1ec5 »
2008-10-02 Resurrect users menu
177
e26aed0a »
2010-04-22 New 'list_users' cap to provide more controls over listing users vs. …
178 if ( current_user_can('list_users') )
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
179 $menu[70] = array( __('Users'), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'none' );
d89b1ec5 »
2008-10-02 Resurrect users menu
180 else
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
181 $menu[70] = array( __('Profile'), 'read', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'none' );
d89b1ec5 »
2008-10-02 Resurrect users menu
182
e26aed0a »
2010-04-22 New 'list_users' cap to provide more controls over listing users vs. …
183 if ( current_user_can('list_users') ) {
d89b1ec5 »
2008-10-02 Resurrect users menu
184 $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
301be4ee »
2011-05-11 Rename submenus to not clash with top level menus. Introduce all_item…
185 $submenu['users.php'][5] = array(__('All Users'), 'list_users', 'users.php');
ba47c80e »
2011-02-09 Add additional promote_users checks. Show Add existing button only fo…
186 if ( current_user_can('create_users') )
187 $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
188 else
189 $submenu['users.php'][10] = array(_x('Add New', 'user'), 'promote_users', 'user-new.php');
6da55f77 »
2010-01-15 Trailing whitespace cleanup
190
0a23990c »
2008-11-11 Add new user page
191 $submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');
d89b1ec5 »
2008-10-02 Resurrect users menu
192 } else {
193 $_wp_real_parent_file['users.php'] = 'profile.php';
194 $submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php');
ba47c80e »
2011-02-09 Add additional promote_users checks. Show Add existing button only fo…
195 if ( current_user_can('create_users') )
196 $submenu['profile.php'][10] = array(__('Add New User'), 'create_users', 'user-new.php');
197 else
198 $submenu['profile.php'][10] = array(__('Add New User'), 'promote_users', 'user-new.php');
d89b1ec5 »
2008-10-02 Resurrect users menu
199 }
200
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
201 $menu[75] = array( __('Tools'), 'edit_posts', 'tools.php', '', 'menu-top menu-icon-tools', 'menu-tools', 'none' );
51fe4288 »
2011-05-24 Rename network admin submenus to not clash with top level menus. Prop…
202 $submenu['tools.php'][5] = array( __('Available Tools'), 'edit_posts', 'tools.php' );
7138d5af »
2008-11-27 Create Tools screen. fixes #8361
203 $submenu['tools.php'][10] = array( __('Import'), 'import', 'import.php' );
e8ecf0f5 »
2011-05-16 Use the correct cap for the export menu item. Fixes #17452
204 $submenu['tools.php'][15] = array( __('Export'), 'export', 'export.php' );
0cbe9fd4 »
2010-03-10 Delete blog to Delete site, props markmcwilliams, see #12572, code cl…
205 if ( is_multisite() && !is_main_site() )
206 $submenu['tools.php'][25] = array( __('Delete Site'), 'manage_options', 'ms-delete-site.php' );
b8c4418d »
2011-01-11 Only rely on is_super_admin for is_multisite when generating menu cod…
207 if ( ! is_multisite() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE )
51fe4288 »
2011-05-24 Rename network admin submenus to not clash with top level menus. Prop…
208 $submenu['tools.php'][50] = array(__('Network Setup'), 'manage_options', 'network.php');
d89b1ec5 »
2008-10-02 Resurrect users menu
209
b443373e »
2012-09-16 Admin menu: add phpdoc/inline comments describing the usage of the pa…
210 $menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'none' );
94859834 »
2010-01-21 i18n fixes. Props nbachiyski. fixes #11954
211 $submenu['options-general.php'][10] = array(_x('General', 'settings screen'), 'manage_options', 'options-general.php');
5aa7cbcf »
2008-08-21 Move Setting menu to top-level. see #7552
212 $submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
213 $submenu['options-general.php'][20] = array(__('Reading'), 'manage_options', 'options-reading.php');
214 $submenu['options-general.php'][25] = array(__('Discussion'), 'manage_options', 'options-discussion.php');
7fb115c7 »
2008-09-16 Move media settings to options-media.php. see #7552
215 $submenu['options-general.php'][30] = array(__('Media'), 'manage_options', 'options-media.php');
216 $submenu['options-general.php'][40] = array(__('Permalinks'), 'manage_options', 'options-permalink.php');
fec36ee6 »
2004-09-11 Themes.
217
ebe3ed8d »
2009-02-13 Add more places between menu groups in the top-level menu array. fixe…
218 $_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group
7bd34b2e »
2008-11-28 add_utility_page()
219
9f677a08 »
2011-06-01 Use wp-menu-separator after Settings and before the first plugin top-…
220 $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator' );
546ef3ed »
2008-10-15 Admin menu: add generic icon, fix hover in IE, speed up response timing
221
417d768c »
2008-08-22 Menu back-compat fixes. see #7552
222 // Back-compat for old top-levels
e89192b1 »
2008-12-09 Strip trailing whitespace
223 $_wp_real_parent_file['post.php'] = 'edit.php';
60fb050f »
2008-11-25 Default to edit submenu rather than add new.
224 $_wp_real_parent_file['post-new.php'] = 'edit.php';
7b81cdc3 »
2010-02-04 Update real parent file back compat for pages menus. see #9674
225 $_wp_real_parent_file['edit-pages.php'] = 'edit.php?post_type=page';
226 $_wp_real_parent_file['page-new.php'] = 'edit.php?post_type=page';
c1d8299f »
2010-11-09 Route submenus added to old super admin menu to tools menu for now. s…
227 $_wp_real_parent_file['wpmu-admin.php'] = 'tools.php';
228 $_wp_real_parent_file['ms-admin.php'] = 'tools.php';
417d768c »
2008-08-22 Menu back-compat fixes. see #7552
229
21e3f0f7 »
2010-07-30 Network Admin, first pass. see #14435
230 // ensure we're backwards compatible
231 $compat = array(
232 'index' => 'dashboard',
233 'edit' => 'posts',
234 'post' => 'posts',
235 'upload' => 'media',
236 'link-manager' => 'links',
237 'edit-pages' => 'pages',
238 'page' => 'pages',
239 'edit-comments' => 'comments',
240 'options-general' => 'settings',
241 'themes' => 'appearance',
242 );
243
9c31fd7c »
2010-10-07 First pass of user admin. Network admin and screen cleanups. see #14696
244 require_once(ABSPATH . 'wp-admin/includes/menu.php');
Something went wrong with that request. Please try again.