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);