Changeset 47122 for trunk/src/wp-admin/menu-header.php
- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/menu-header.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/menu-header.php
r45583 r47122 70 70 71 71 $first = true; 72 // 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes, 5 = hookname, 6 = icon_url 72 // 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes, 5 = hookname, 6 = icon_url. 73 73 foreach ( $menu as $key => $item ) { 74 74 $admin_is_parent = false; … … 185 185 $first = true; 186 186 187 // 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes 187 // 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes. 188 188 foreach ( $submenu_items as $sub_key => $sub_item ) { 189 189 if ( ! current_user_can( $sub_item[1] ) ) { … … 239 239 240 240 if ( ! empty( $menu_hook ) || ( ( 'index.php' != $sub_item[2] ) && file_exists( WP_PLUGIN_DIR . "/$sub_file" ) && ! file_exists( ABSPATH . "/wp-admin/$sub_file" ) ) ) { 241 // If admin.php is the current page or if the parent exists as a file in the plugins or admin dir 241 // If admin.php is the current page or if the parent exists as a file in the plugins or admin directory. 242 242 if ( ( ! $admin_is_parent && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! is_dir( WP_PLUGIN_DIR . "/{$item[2]}" ) ) || file_exists( $menu_file ) ) { 243 243 $sub_item_url = add_query_arg( array( 'page' => $sub_item[2] ), $item[2] );
Note: See TracChangeset
for help on using the changeset viewer.