Skip to content

Commit aa37c09

Browse files
westonruterPaolo
andcommitted
Apply suggeston from Paolo
Co-authored-by: Paolo <[email protected]>
1 parent 792c4ac commit aa37c09

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-admin/menu-header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
264264
&& ! file_exists( ABSPATH . "/wp-admin/$sub_file" ) )
265265
) {
266266
// If admin.php is the current page or if the parent exists as a file in the plugins or admin directory.
267-
if ( ( ! $admin_is_parent && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! is_dir( WP_PLUGIN_DIR . "/{$item[2]}" ) ) || file_exists( $menu_file ) ) {
267+
if ( ( ! $admin_is_parent && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! is_dir( WP_PLUGIN_DIR . "/{$item[2]}" ) ) || file_exists( ABSPATH . 'wp-admin/' . $menu_file ) ) {
268268
$sub_item_url = add_query_arg( array( 'page' => $sub_item[2] ), $item[2] );
269269
} else {
270270
$sub_item_url = add_query_arg( array( 'page' => $sub_item[2] ), 'admin.php' );

0 commit comments

Comments
 (0)