at path:ROOT / wp-admin / menu.php
run:R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
17.74 KB
2026-03-11 16:18:51
R W Run
5.03 KB
2026-03-11 16:18:51
R W Run
2.77 KB
2026-03-11 16:18:51
R W Run
479 By
2026-03-11 16:18:51
R W Run
9.12 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
12.35 KB
2026-03-11 16:18:51
R W Run
5.47 KB
2026-03-11 16:18:51
R W Run
10.09 KB
2026-03-11 16:18:51
R W Run
11.35 KB
2026-03-11 16:18:51
R W Run
5.86 KB
2026-03-11 16:18:51
R W Run
4.38 KB
2026-03-11 16:18:51
R W Run
489 By
2026-03-11 16:18:51
R W Run
499 By
2026-03-11 16:18:51
R W Run
11.01 KB
2026-03-11 16:18:51
R W Run
14.38 KB
2026-03-11 16:18:51
R W Run
28.83 KB
2026-03-11 16:18:51
R W Run
14.6 KB
2026-03-11 16:18:51
R W Run
8.34 KB
2026-03-11 16:18:51
R W Run
6.21 KB
2026-03-11 16:18:51
R W Run
10.44 KB
2026-03-11 16:18:51
R W Run
22 KB
2026-03-11 16:18:51
R W Run
19.48 KB
2026-03-11 16:18:51
R W Run
7.33 KB
2026-03-11 16:18:51
R W Run
7.75 KB
2026-03-11 16:18:51
R W Run
11.02 KB
2026-03-11 16:18:51
R W Run
4.8 KB
2026-03-11 16:18:51
R W Run
7.58 KB
2026-03-11 16:18:51
R W Run
7.68 KB
2026-03-11 16:18:51
R W Run
6.8 KB
2026-03-11 16:18:51
R W Run
17.77 KB
2026-03-11 16:18:51
R W Run
934 By
2026-03-11 16:18:51
R W Run
4.26 KB
2026-03-11 16:18:51
R W Run
2.72 KB
2026-03-11 16:18:51
R W Run
2.89 KB
2026-03-11 16:18:51
R W Run
2.02 KB
2026-03-11 16:18:51
R W Run
2.92 KB
2026-03-11 16:18:51
R W Run
3.2 KB
2026-03-11 16:18:51
R W Run
3.58 KB
2026-03-11 16:18:51
R W Run
819 By
2026-03-11 16:18:51
R W Run
9.82 KB
2026-03-11 16:18:51
R W Run
17.46 KB
2026-03-11 16:18:51
R W Run
307 By
2026-03-11 16:18:51
R W Run
196 By
2026-03-11 16:18:51
R W Run
4.5 KB
2026-03-11 16:18:51
R W Run
216 By
2026-03-11 16:18:51
R W Run
229 By
2026-03-11 16:18:51
R W Run
215 By
2026-03-11 16:18:51
R W Run
217 By
2026-03-11 16:18:51
R W Run
219 By
2026-03-11 16:18:51
R W Run
215 By
2026-03-11 16:18:51
R W Run
4.74 KB
2026-03-11 16:18:51
R W Run
48.19 KB
2026-03-11 16:18:51
R W Run
5.39 KB
2026-03-11 16:18:51
R W Run
15.92 KB
2026-03-11 16:18:51
R W Run
21.65 KB
2026-03-11 16:18:51
R W Run
621 By
2026-03-11 16:18:51
R W Run
6.38 KB
2026-03-11 16:18:51
R W Run
21.22 KB
2026-03-11 16:18:51
R W Run
9.95 KB
2026-03-11 16:18:51
R W Run
9.94 KB
2026-03-11 16:18:51
R W Run
9.1 KB
2026-03-11 16:18:51
R W Run
13.6 KB
2026-03-11 16:18:51
R W Run
13.75 KB
2026-03-11 16:18:51
R W Run
6.96 KB
2026-03-11 16:18:51
R W Run
30 KB
2026-03-11 16:18:51
R W Run
2.7 KB
2026-03-11 16:18:51
R W Run
10.03 KB
2026-03-11 16:18:51
R W Run
2.34 KB
2026-03-11 16:18:51
R W Run
3.67 KB
2026-03-11 16:18:51
R W Run
2.79 KB
2026-03-11 16:18:51
R W Run
283 By
2026-03-11 16:18:51
R W Run
5.7 KB
2026-03-11 16:18:51
R W Run
17.48 KB
2026-03-11 16:18:51
R W Run
11.98 KB
2026-03-11 16:18:51
R W Run
3.99 KB
2026-03-11 16:18:51
R W Run
10.2 KB
2026-03-11 16:18:51
R W Run
2.2 KB
2026-03-11 16:18:51
R W Run
16.87 KB
2026-03-11 16:18:51
R W Run
23.38 KB
2026-03-11 16:18:51
R W Run
47.92 KB
2026-03-11 16:18:51
R W Run
3.43 KB
2026-03-11 16:18:51
R W Run
45.45 KB
2026-03-11 16:18:51
R W Run
12.79 KB
2026-03-11 16:18:51
R W Run
341 By
2026-03-11 16:18:51
R W Run
6.27 KB
2026-03-11 16:18:51
R W Run
14.9 KB
2026-03-11 16:18:51
R W Run
40.36 KB
2026-03-11 16:18:51
R W Run
24.05 KB
2026-03-11 16:18:51
R W Run
23.29 KB
2026-03-11 16:18:51
R W Run
5.12 KB
2026-03-11 16:18:51
R W Run
19.29 KB
2026-03-11 16:18:51
R W Run
1.09 KB
2026-03-11 16:18:51
R W Run
error_log
📄menu.php
1<?php
2/**
3 * Build Administration Menu.
4 *
5 * @package WordPress
6 * @subpackage Administration
7 */
8
9// Don't load directly.
10if ( ! defined( 'ABSPATH' ) ) {
11 die( '-1' );
12}
13
14/**
15 * Constructs the admin menu.
16 *
17 * The elements in the array are:
18 * 0: Menu item name.
19 * 1: Minimum level or capability required.
20 * 2: The URL of the item's file.
21 * 3: Page title.
22 * 4: Classes.
23 * 5: ID.
24 * 6: Icon for top level menu.
25 *
26 * @global array $menu
27 */
28
29$menu[2] = array( __( 'Dashboard' ), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard' );
30
31$submenu['index.php'][0] = array( __( 'Home' ), 'read', 'index.php' );
32
33if ( is_multisite() ) {
34 $submenu['index.php'][5] = array( __( 'My Sites' ), 'read', 'my-sites.php' );
35}
36
37if ( ! is_multisite() || current_user_can( 'update_core' ) ) {
38 $update_data = wp_get_update_data();
39}
40
41if ( ! is_multisite() ) {
42 if ( current_user_can( 'update_core' ) ) {
43 $capability = 'update_core';
44 } elseif ( current_user_can( 'update_plugins' ) ) {
45 $capability = 'update_plugins';
46 } elseif ( current_user_can( 'update_themes' ) ) {
47 $capability = 'update_themes';
48 } else {
49 $capability = 'update_languages';
50 }
51
52 $submenu['index.php'][10] = array(
53 sprintf(
54 /* translators: %s: Number of pending updates. */
55 __( 'Updates %s' ),
56 sprintf(
57 '<span class="update-plugins count-%s"><span class="update-count">%s</span></span>',
58 $update_data['counts']['total'],
59 number_format_i18n( $update_data['counts']['total'] )
60 )
61 ),
62 $capability,
63 'update-core.php',
64 );
65
66 unset( $capability );
67}
68
69$menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
70
71// $menu[5] = Posts.
72
73$menu[10] = array( __( 'Media' ), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'dashicons-admin-media' );
74
75 $submenu['upload.php'][5] = array( __( 'Library' ), 'upload_files', 'upload.php' );
76 $submenu['upload.php'][10] = array( __( 'Add Media File' ), 'upload_files', 'media-new.php' );
77 $submenu_index = 15;
78
79foreach ( get_taxonomies_for_attachments( 'objects' ) as $taxonomy ) {
80 if ( ! $taxonomy->show_ui || ! $taxonomy->show_in_menu ) {
81 continue;
82 }
83
84 $submenu['upload.php'][ $submenu_index++ ] = array( esc_attr( $taxonomy->labels->menu_name ), $taxonomy->cap->manage_terms, 'edit-tags.php?taxonomy=' . $taxonomy->name . '&amp;post_type=attachment' );
85}
86
87 unset( $taxonomy, $submenu_index );
88
89$menu[15] = array( __( 'Links' ), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'dashicons-admin-links' );
90
91 $submenu['link-manager.php'][5] = array( _x( 'All Links', 'admin menu' ), 'manage_links', 'link-manager.php' );
92 $submenu['link-manager.php'][10] = array( __( 'Add Link' ), 'manage_links', 'link-add.php' );
93 $submenu['link-manager.php'][15] = array( __( 'Link Categories' ), 'manage_categories', 'edit-tags.php?taxonomy=link_category' );
94
95// $menu[20] = Pages.
96
97// Avoid the comment count query for users who cannot edit_posts.
98if ( current_user_can( 'edit_posts' ) ) {
99 $awaiting_moderation = wp_count_comments();
100 $awaiting_moderation = $awaiting_moderation->moderated;
101 $awaiting_moderation_i18n = number_format_i18n( $awaiting_moderation );
102 /* translators: %s: Number of comments. */
103 $awaiting_moderation_text = sprintf( _n( '%s Comment in moderation', '%s Comments in moderation', $awaiting_moderation ), $awaiting_moderation_i18n );
104
105 $menu[25] = array(
106 /* translators: %s: Number of comments. */
107 sprintf( __( 'Comments %s' ), '<span class="awaiting-mod count-' . absint( $awaiting_moderation ) . '"><span class="pending-count" aria-hidden="true">' . $awaiting_moderation_i18n . '</span><span class="comments-in-moderation-text screen-reader-text">' . $awaiting_moderation_text . '</span></span>' ),
108 'edit_posts',
109 'edit-comments.php',
110 '',
111 'menu-top menu-icon-comments',
112 'menu-comments',
113 'dashicons-admin-comments',
114 );
115
116 unset( $awaiting_moderation );
117}
118
119$submenu['edit-comments.php'][0] = array( __( 'All Comments' ), 'edit_posts', 'edit-comments.php' );
120
121$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group.
122
123$post_types = (array) get_post_types(
124 array(
125 'show_ui' => true,
126 '_builtin' => false,
127 'show_in_menu' => true,
128 )
129);
130$builtin = array( 'post', 'page' );
131
132foreach ( array_merge( $builtin, $post_types ) as $post_type ) {
133 $post_type_obj = get_post_type_object( $post_type );
134
135 // Check if it should be a submenu.
136 if ( true !== $post_type_obj->show_in_menu ) {
137 continue;
138 }
139
140 $post_type_menu_position = is_int( $post_type_obj->menu_position )
141 ? $post_type_obj->menu_position
142 : ++$_wp_last_object_menu; // If we're to use $_wp_last_object_menu, increment it first.
143 $post_type_for_id = sanitize_html_class( $post_type );
144
145 $menu_icon = 'dashicons-admin-post';
146 if ( is_string( $post_type_obj->menu_icon ) ) {
147 // Special handling for an empty div.wp-menu-image, data:image/svg+xml, and Dashicons.
148 if ( 'none' === $post_type_obj->menu_icon || 'div' === $post_type_obj->menu_icon
149 || str_starts_with( $post_type_obj->menu_icon, 'data:image/svg+xml;base64,' )
150 || str_starts_with( $post_type_obj->menu_icon, 'dashicons-' )
151 ) {
152 $menu_icon = $post_type_obj->menu_icon;
153 } else {
154 $menu_icon = esc_url( $post_type_obj->menu_icon );
155 }
156 } elseif ( in_array( $post_type, $builtin, true ) ) {
157 $menu_icon = 'dashicons-admin-' . $post_type;
158 }
159
160 $menu_class = 'menu-top menu-icon-' . $post_type_for_id;
161 // 'post' special case.
162 if ( 'post' === $post_type ) {
163 $menu_class .= ' open-if-no-js';
164 $post_type_file = 'edit.php';
165 $post_new_file = 'post-new.php';
166 $edit_tags_file = 'edit-tags.php?taxonomy=%s';
167 } else {
168 $post_type_file = "edit.php?post_type=$post_type";
169 $post_new_file = "post-new.php?post_type=$post_type";
170 $edit_tags_file = "edit-tags.php?taxonomy=%s&amp;post_type=$post_type";
171 }
172
173 if ( in_array( $post_type, $builtin, true ) ) {
174 $post_type_menu_id = 'menu-' . $post_type_for_id . 's';
175 } else {
176 $post_type_menu_id = 'menu-posts-' . $post_type_for_id;
177 }
178
179 /*
180 * If $post_type_menu_position is already populated or will be populated
181 * by a hard-coded value below, increment the position.
182 */
183 $core_menu_positions = array( 59, 60, 65, 70, 75, 80, 85, 99 );
184 while ( isset( $menu[ $post_type_menu_position ] ) || in_array( $post_type_menu_position, $core_menu_positions, true ) ) {
185 ++$post_type_menu_position;
186 }
187
188 $menu[ $post_type_menu_position ] = array( esc_attr( $post_type_obj->labels->menu_name ), $post_type_obj->cap->edit_posts, $post_type_file, '', $menu_class, $post_type_menu_id, $menu_icon );
189 $submenu[ $post_type_file ][5] = array( $post_type_obj->labels->all_items, $post_type_obj->cap->edit_posts, $post_type_file );
190 $submenu[ $post_type_file ][10] = array( $post_type_obj->labels->add_new_item, $post_type_obj->cap->create_posts, $post_new_file );
191
192 $submenu_index = 15;
193
194 foreach ( get_taxonomies( array(), 'objects' ) as $taxonomy ) {
195 if ( ! $taxonomy->show_ui || ! $taxonomy->show_in_menu || ! in_array( $post_type, (array) $taxonomy->object_type, true ) ) {
196 continue;
197 }
198
199 $submenu[ $post_type_file ][ $submenu_index++ ] = array( esc_attr( $taxonomy->labels->menu_name ), $taxonomy->cap->manage_terms, sprintf( $edit_tags_file, $taxonomy->name ) );
200 }
201}
202
203unset( $post_type, $post_type_obj, $post_type_for_id, $post_type_menu_position, $menu_icon, $submenu_index, $taxonomy, $post_new_file );
204
205$menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
206
207$appearance_capability = current_user_can( 'switch_themes' ) ? 'switch_themes' : 'edit_theme_options';
208
209$menu[60] = array( __( 'Appearance' ), $appearance_capability, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
210
211$count = '';
212if ( ! is_multisite() && current_user_can( 'update_themes' ) ) {
213 if ( ! isset( $update_data ) ) {
214 $update_data = wp_get_update_data();
215 }
216
217 $count = sprintf(
218 '<span class="update-plugins count-%s"><span class="theme-count">%s</span></span>',
219 $update_data['counts']['themes'],
220 number_format_i18n( $update_data['counts']['themes'] )
221 );
222}
223
224 /* translators: %s: Number of available theme updates. */
225 $submenu['themes.php'][5] = array( sprintf( __( 'Themes %s' ), $count ), $appearance_capability, 'themes.php' );
226
227if ( wp_is_block_theme() ) {
228 $submenu['themes.php'][6] = array( _x( 'Editor', 'site editor menu item' ), 'edit_theme_options', 'site-editor.php' );
229} else {
230 $supports_stylebook = ( current_theme_supports( 'editor-styles' ) || wp_theme_has_theme_json() );
231
232 if ( $supports_stylebook ) {
233 $submenu['themes.php'][6] = array( _x( 'Design', 'design menu item' ), 'edit_theme_options', 'site-editor.php' );
234 } else {
235 $submenu['themes.php'][6] = array( _x( 'Patterns', 'patterns menu item' ), 'edit_theme_options', 'site-editor.php?p=/pattern' );
236 }
237}
238
239$customize_url = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' );
240
241// Hide Customize link on block themes unless a plugin or theme
242// is using 'customize_register' to add a setting.
243if ( ! wp_is_block_theme() || has_action( 'customize_register' ) ) {
244 $submenu['themes.php'][7] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' );
245}
246
247if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
248 $submenu['themes.php'][10] = array( __( 'Menus' ), 'edit_theme_options', 'nav-menus.php' );
249}
250
251if ( current_theme_supports( 'custom-header' ) && current_user_can( 'customize' ) ) {
252 $customize_header_url = add_query_arg( array( 'autofocus' => array( 'control' => 'header_image' ) ), $customize_url );
253 $submenu['themes.php'][15] = array( _x( 'Header', 'custom image header' ), $appearance_capability, esc_url( $customize_header_url ), '', 'hide-if-no-customize' );
254}
255
256if ( current_theme_supports( 'custom-background' ) && current_user_can( 'customize' ) ) {
257 $customize_background_url = add_query_arg( array( 'autofocus' => array( 'control' => 'background_image' ) ), $customize_url );
258 $submenu['themes.php'][20] = array( _x( 'Background', 'custom background' ), $appearance_capability, esc_url( $customize_background_url ), '', 'hide-if-no-customize' );
259}
260
261unset( $customize_url, $appearance_capability );
262
263// Add 'Theme File Editor' to the bottom of the Appearance (non-block themes) or Tools (block themes) menu.
264if ( ! is_multisite() ) {
265 // Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook.
266 add_action( 'admin_menu', '_add_themes_utility_last', 101 );
267}
268/**
269 * Adds the 'Theme File Editor' menu item to the bottom of the Appearance (non-block themes)
270 * or Tools (block themes) menu.
271 *
272 * @access private
273 * @since 3.0.0
274 * @since 5.9.0 Renamed 'Theme Editor' to 'Theme File Editor'.
275 * Relocates to Tools for block themes.
276 */
277function _add_themes_utility_last() {
278 add_submenu_page(
279 wp_is_block_theme() ? 'tools.php' : 'themes.php',
280 __( 'Theme File Editor' ),
281 __( 'Theme File Editor' ),
282 'edit_themes',
283 'theme-editor.php'
284 );
285}
286
287/**
288 * Adds the 'Plugin File Editor' menu item after the 'Themes File Editor' in Tools
289 * for block themes.
290 *
291 * @access private
292 * @since 5.9.0
293 */
294function _add_plugin_file_editor_to_tools() {
295 if ( ! wp_is_block_theme() ) {
296 return;
297 }
298 add_submenu_page(
299 'tools.php',
300 __( 'Plugin File Editor' ),
301 __( 'Plugin File Editor' ),
302 'edit_plugins',
303 'plugin-editor.php'
304 );
305}
306
307$count = '';
308if ( ! is_multisite() && current_user_can( 'update_plugins' ) ) {
309 if ( ! isset( $update_data ) ) {
310 $update_data = wp_get_update_data();
311 }
312 $count = sprintf(
313 '<span class="update-plugins count-%s"><span class="plugin-count">%s</span></span>',
314 $update_data['counts']['plugins'],
315 number_format_i18n( $update_data['counts']['plugins'] )
316 );
317}
318
319/* translators: %s: Number of available plugin updates. */
320$menu[65] = array( sprintf( __( 'Plugins %s' ), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' );
321
322$submenu['plugins.php'][5] = array( __( 'Installed Plugins' ), 'activate_plugins', 'plugins.php' );
323
324if ( ! is_multisite() ) {
325 $submenu['plugins.php'][10] = array( __( 'Add Plugin' ), 'install_plugins', 'plugin-install.php' );
326 if ( wp_is_block_theme() ) {
327 // Place the menu item below the Theme File Editor menu item.
328 add_action( 'admin_menu', '_add_plugin_file_editor_to_tools', 101 );
329 } else {
330 $submenu['plugins.php'][15] = array( __( 'Plugin File Editor' ), 'edit_plugins', 'plugin-editor.php' );
331 }
332}
333
334unset( $update_data );
335
336if ( current_user_can( 'list_users' ) ) {
337 $menu[70] = array( __( 'Users' ), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
338} else {
339 $menu[70] = array( __( 'Profile' ), 'read', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
340}
341
342if ( current_user_can( 'list_users' ) ) {
343 $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
344 $submenu['users.php'][5] = array( __( 'All Users' ), 'list_users', 'users.php' );
345 if ( current_user_can( 'create_users' ) ) {
346 $submenu['users.php'][10] = array( __( 'Add User' ), 'create_users', 'user-new.php' );
347 } elseif ( is_multisite() ) {
348 $submenu['users.php'][10] = array( __( 'Add User' ), 'promote_users', 'user-new.php' );
349 }
350
351 $submenu['users.php'][15] = array( __( 'Profile' ), 'read', 'profile.php' );
352} else {
353 $_wp_real_parent_file['users.php'] = 'profile.php';
354 $submenu['profile.php'][5] = array( __( 'Profile' ), 'read', 'profile.php' );
355 if ( current_user_can( 'create_users' ) ) {
356 $submenu['profile.php'][10] = array( __( 'Add User' ), 'create_users', 'user-new.php' );
357 } elseif ( is_multisite() ) {
358 $submenu['profile.php'][10] = array( __( 'Add User' ), 'promote_users', 'user-new.php' );
359 }
360}
361
362$site_health_count = '';
363if ( ! is_multisite() && current_user_can( 'view_site_health_checks' ) ) {
364 $get_issues = get_transient( 'health-check-site-status-result' );
365
366 $issue_counts = array();
367
368 if ( false !== $get_issues ) {
369 $issue_counts = json_decode( $get_issues, true );
370 }
371
372 if ( ! is_array( $issue_counts ) || ! $issue_counts ) {
373 $issue_counts = array(
374 'good' => 0,
375 'recommended' => 0,
376 'critical' => 0,
377 );
378 }
379
380 $site_health_count = sprintf(
381 '<span class="menu-counter site-health-counter count-%s"><span class="count">%s</span></span>',
382 $issue_counts['critical'],
383 number_format_i18n( $issue_counts['critical'] )
384 );
385}
386
387$menu[75] = array( __( 'Tools' ), 'edit_posts', 'tools.php', '', 'menu-top menu-icon-tools', 'menu-tools', 'dashicons-admin-tools' );
388 $submenu['tools.php'][5] = array( __( 'Available Tools' ), 'edit_posts', 'tools.php' );
389 $submenu['tools.php'][10] = array( __( 'Import' ), 'import', 'import.php' );
390 $submenu['tools.php'][15] = array( __( 'Export' ), 'export', 'export.php' );
391 /* translators: %s: Number of critical Site Health checks. */
392 $submenu['tools.php'][20] = array( sprintf( __( 'Site Health %s' ), $site_health_count ), 'view_site_health_checks', 'site-health.php' );
393 $submenu['tools.php'][25] = array( __( 'Export Personal Data' ), 'export_others_personal_data', 'export-personal-data.php' );
394 $submenu['tools.php'][30] = array( __( 'Erase Personal Data' ), 'erase_others_personal_data', 'erase-personal-data.php' );
395if ( is_multisite() && ! is_main_site() && '1' !== get_site()->deleted ) {
396 $submenu['tools.php'][35] = array( __( 'Delete Site' ), 'delete_site', 'ms-delete-site.php' );
397}
398if ( ! is_multisite() && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) {
399 $submenu['tools.php'][50] = array( __( 'Network Setup' ), 'setup_network', 'network.php' );
400}
401
402$menu[80] = array( __( 'Settings' ), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' );
403 $submenu['options-general.php'][10] = array( _x( 'General', 'settings screen' ), 'manage_options', 'options-general.php' );
404 $submenu['options-general.php'][15] = array( __( 'Writing' ), 'manage_options', 'options-writing.php' );
405 $submenu['options-general.php'][20] = array( __( 'Reading' ), 'manage_options', 'options-reading.php' );
406 $submenu['options-general.php'][25] = array( __( 'Discussion' ), 'manage_options', 'options-discussion.php' );
407 $submenu['options-general.php'][30] = array( __( 'Media' ), 'manage_options', 'options-media.php' );
408 $submenu['options-general.php'][40] = array( __( 'Permalinks' ), 'manage_options', 'options-permalink.php' );
409 $submenu['options-general.php'][45] = array( __( 'Privacy' ), 'manage_privacy_options', 'options-privacy.php' );
410
411$_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group.
412
413$menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator' );
414
415// Back-compat for old top-levels.
416$_wp_real_parent_file['post.php'] = 'edit.php';
417$_wp_real_parent_file['post-new.php'] = 'edit.php';
418$_wp_real_parent_file['edit-pages.php'] = 'edit.php?post_type=page';
419$_wp_real_parent_file['page-new.php'] = 'edit.php?post_type=page';
420$_wp_real_parent_file['wpmu-admin.php'] = 'tools.php';
421$_wp_real_parent_file['ms-admin.php'] = 'tools.php';
422
423// Ensure backward compatibility.
424$compat = array(
425 'index' => 'dashboard',
426 'edit' => 'posts',
427 'post' => 'posts',
428 'upload' => 'media',
429 'link-manager' => 'links',
430 'edit-pages' => 'pages',
431 'page' => 'pages',
432 'edit-comments' => 'comments',
433 'options-general' => 'settings',
434 'themes' => 'appearance',
435);
436
437require_once ABSPATH . 'wp-admin/includes/menu.php';
438