Confirm that the queried term object is of the requested taxonomy in wp_list_categories. fixes #15347.
git-svn-id: https://develop.svn.wordpress.org/trunk@16250 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1d7a732588
commit
07522b17d1
@ -471,8 +471,11 @@ function wp_list_categories( $args = '' ) {
|
||||
else
|
||||
$output .= '<a href="' . get_bloginfo( 'url' ) . '">' . $show_option_all . '</a>';
|
||||
|
||||
if ( empty( $r['current_category'] ) && ( is_category() || is_tax() ) )
|
||||
$r['current_category'] = get_queried_object_id();
|
||||
if ( empty( $r['current_category'] ) && ( is_category() || is_tax() || is_tag() ) ) {
|
||||
$current_term_object = get_queried_object();
|
||||
if ( $r['taxonomy'] == $current_term_object->taxonomy )
|
||||
$r['current_category'] = get_queried_object_id();
|
||||
}
|
||||
|
||||
if ( $hierarchical )
|
||||
$depth = $r['depth'];
|
||||
|
Loading…
Reference in New Issue
Block a user