Make WordPress Core

Changeset 9287


Ignore:
Timestamp:
10/22/2008 08:57:37 PM (17 years ago)
Author:
ryan
Message:

Fix current submenu designation when sub swith the same hook exist under different parents. fixes #7948

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu-header.php

    r9286 r9287  
    9494                    if ( $submenu_file == $sub_item[2] )
    9595                        $class[] = 'current';
    96                 } else if ( (isset($plugin_page) && $plugin_page == $sub_item[2]) || (!isset($plugin_page) && $self == $sub_item[2]) ) {
     96                // If plugin_page is set the parent must either match the current page or not physically exist.
     97                // This allows plugin pages with the same hook to exist under different parents.
     98                } else if ( (isset($plugin_page) && $plugin_page == $sub_item[2] && (!file_exists($item[2]) || ($item[2] == $self))) || (!isset($plugin_page) && $self == $sub_item[2]) ) {
    9799                    $class[] = 'current';
    98100                }
Note: See TracChangeset for help on using the changeset viewer.