Changeset 31105 for trunk/src/wp-admin/menu-header.php
- Timestamp:
- 01/08/2015 10:14:58 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/menu-header.php
r31090 r31105 67 67 } 68 68 69 if ( ( $parent_file && $item[2] == $parent_file ) || ( empty($typenow)&& $self == $item[2] ) ) {69 if ( ( $parent_file && $item[2] == $parent_file ) || ( ! $typenow && $self == $item[2] ) ) { 70 70 $class[] = ! empty( $submenu_items ) ? 'wp-has-current-submenu wp-menu-open' : 'current'; 71 71 } else { … … 168 168 169 169 // Handle current for post_type=post|page|foo pages, which won't match $self. 170 $self_type = ! empty( $typenow )? $self . '?post_type=' . $typenow : 'nothing';170 $self_type = $typenow ? $self . '?post_type=' . $typenow : 'nothing'; 171 171 172 172 if ( isset( $submenu_file ) ) { … … 176 176 // This allows plugin pages with the same hook to exist under different parents. 177 177 } elseif ( 178 ( ! isset( $plugin_page )&& $self == $sub_item[2] ) ||179 ( isset( $plugin_page )&& $plugin_page == $sub_item[2] && ( $item[2] == $self_type || $item[2] == $self || file_exists($menu_file) === false ) )178 ( ! $plugin_page && $self == $sub_item[2] ) || 179 ( $plugin_page && $plugin_page == $sub_item[2] && ( $item[2] == $self_type || $item[2] == $self || file_exists($menu_file) === false ) ) 180 180 ) { 181 181 $class[] = 'current';
Note: See TracChangeset
for help on using the changeset viewer.