From d01f93226d5e8361348e00cc7f47a809801fb8a5 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 23 Oct 2011 18:45:06 +0000 Subject: [PATCH] Fix sub menu highlighting for post type pages. see #13662 git-svn-id: http://svn.automattic.com/wordpress/trunk@19048 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/menu-header.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/menu-header.php b/wp-admin/menu-header.php index 775633e6e..4070d1619 100644 --- a/wp-admin/menu-header.php +++ b/wp-admin/menu-header.php @@ -126,8 +126,9 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { // Handle current for post_type=post|page|foo pages, which won't match $self. $self_type = ! empty( $typenow ) ? $self . '?post_type=' . $typenow : 'nothing'; - if ( isset( $submenu_file ) && $submenu_file == $sub_item[2] ) { - $class[] = 'current'; + if ( isset( $submenu_file ) ) { + if ( $submenu_file == $sub_item[2] ) + $class[] = 'current'; // If plugin_page is set the parent must either match the current page or not physically exist. // This allows plugin pages with the same hook to exist under different parents. } else if (