From b9f4e3308d3a2da55e2680452987f48e9a7c7720 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 21 Mar 2005 04:18:16 +0000 Subject: [PATCH] Compare full name of plugin files rather than only the last 10 chars. http://mosquito.wordpress.org/view.php?id=1124 Props: MC_incubus git-svn-id: https://develop.svn.wordpress.org/trunk@2458 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/menu-header.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/menu-header.php b/wp-admin/menu-header.php index db9a21ba42..cc80531690 100644 --- a/wp-admin/menu-header.php +++ b/wp-admin/menu-header.php @@ -36,9 +36,9 @@ foreach ($submenu["$parent_file"] as $item) : } if ( isset($submenu_file) ) { - if ( substr($submenu_file, -10) == substr($item[2], -10) ) $class = ' class="current"'; + if ( $submenu_file == $item[2] ) $class = ' class="current"'; else $class = ''; -} else if ( (isset($plugin_page) && $plugin_page == $item[2]) || (!isset($plugin_page) && substr($self, -10) == substr($item[2], -10)) ) $class = ' class="current"'; +} else if ( (isset($plugin_page) && $plugin_page == $item[2]) || (!isset($plugin_page) && $self == $item[2]) ) $class = ' class="current"'; else $class = ''; $menu_hook = get_plugin_page_hook($item[2], $parent_file);