WordPress.org

Make WordPress Core

Changeset 16250


Ignore:
Timestamp:
11/09/2010 01:20:38 AM (9 years ago)
Author:
nacin
Message:

Confirm that the queried term object is of the requested taxonomy in wp_list_categories. fixes #15347.

File:
1 edited

Legend:

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

    r16180 r16250  
    472472                $output .= '<a href="' .  get_bloginfo( 'url' )  . '">' . $show_option_all . '</a>';
    473473
    474         if ( empty( $r['current_category'] ) && ( is_category() || is_tax() ) )
    475             $r['current_category'] = get_queried_object_id();
     474        if ( empty( $r['current_category'] ) && ( is_category() || is_tax() || is_tag() ) ) {
     475            $current_term_object = get_queried_object();
     476            if ( $r['taxonomy'] == $current_term_object->taxonomy )
     477                $r['current_category'] = get_queried_object_id();
     478        }
    476479
    477480        if ( $hierarchical )
Note: See TracChangeset for help on using the changeset viewer.