Changeset 23656 for trunk/wp-admin/menu-header.php
- Timestamp:
- 03/09/2013 02:48:49 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/menu-header.php
r22634 r23656 88 88 if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) 89 89 $menu_file = substr( $menu_file, 0, $pos ); 90 if ( ! empty( $menu_hook ) || ( ( 'index.php' != $submenu_items[0][2]) && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) ) ) {90 if ( ! empty( $menu_hook ) || ( ( 'index.php' != $submenu_items[0][2] ) && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! file_exists( ABSPATH . "/wp-admin/$menu_file" ) ) ) { 91 91 $admin_is_parent = true; 92 92 echo "<a href='admin.php?page={$submenu_items[0][2]}'$class $aria_attributes>$arrow<div class='wp-menu-image'>$img</div><div class='wp-menu-name'>$title</div></a>"; … … 99 99 if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) 100 100 $menu_file = substr( $menu_file, 0, $pos ); 101 if ( ! empty( $menu_hook ) || ( ( 'index.php' != $item[2]) && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) ) ) {101 if ( ! empty( $menu_hook ) || ( ( 'index.php' != $item[2] ) && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! file_exists( ABSPATH . "/wp-admin/$menu_file" ) ) ) { 102 102 $admin_is_parent = true; 103 103 echo "\n\t<a href='admin.php?page={$item[2]}'$class $aria_attributes>$arrow<div class='wp-menu-image'>$img</div><div class='wp-menu-name'>{$item[0]}</div></a>"; … … 151 151 $title = wptexturize($sub_item[0]); 152 152 153 if ( ! empty( $menu_hook ) || ( ( 'index.php' != $sub_item[2]) && file_exists( WP_PLUGIN_DIR . "/$sub_file" ) ) ) {153 if ( ! empty( $menu_hook ) || ( ( 'index.php' != $sub_item[2] ) && file_exists( WP_PLUGIN_DIR . "/$sub_file" ) && ! file_exists( ABSPATH . "/wp-admin/$sub_file" ) ) ) { 154 154 // If admin.php is the current page or if the parent exists as a file in the plugins or admin dir 155 if ( ( !$admin_is_parent && file_exists(WP_PLUGIN_DIR . "/$menu_file") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}")) || file_exists($menu_file) )156 $sub_item_url = add_query_arg( array( 'page' => $sub_item[2]), $item[2] );155 if ( ( ! $admin_is_parent && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! is_dir( WP_PLUGIN_DIR . "/{$item[2]}" ) ) || file_exists( $menu_file ) ) 156 $sub_item_url = add_query_arg( array( 'page' => $sub_item[2] ), $item[2] ); 157 157 else 158 $sub_item_url = add_query_arg( array( 'page' => $sub_item[2]), 'admin.php' );158 $sub_item_url = add_query_arg( array( 'page' => $sub_item[2] ), 'admin.php' ); 159 159 160 160 $sub_item_url = esc_url( $sub_item_url );
Note: See TracChangeset
for help on using the changeset viewer.