Make WordPress Core


Ignore:
Timestamp:
10/25/2012 08:32:01 PM (12 years ago)
Author:
nacin
Message:

Confirm that the nav menu's underlying object is in the proper taxonomy before adding the current-menu-item class. props SergeyBiryukov. fixes #21369.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/nav-menu-template.php

    r22233 r22302  
    338338                ( ! empty( $home_page_id ) && 'post_type' == $menu_item->type && $wp_query->is_home && $home_page_id == $menu_item->object_id ) ||
    339339                ( 'post_type' == $menu_item->type && $wp_query->is_singular ) ||
    340                 ( 'taxonomy' == $menu_item->type && ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) )
     340                ( 'taxonomy' == $menu_item->type && ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) && $queried_object->taxonomy == $menu_item->object )
    341341            )
    342342        ) {
Note: See TracChangeset for help on using the changeset viewer.