Confirm that the queried term object is of the requested taxonomy in wp_list_categories. fixes #15347.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
db5af22ed9
commit
c3b6ef86ea
|
@ -471,8 +471,11 @@ function wp_list_categories( $args = '' ) {
|
||||||
else
|
else
|
||||||
$output .= '<a href="' . get_bloginfo( 'url' ) . '">' . $show_option_all . '</a>';
|
$output .= '<a href="' . get_bloginfo( 'url' ) . '">' . $show_option_all . '</a>';
|
||||||
|
|
||||||
if ( empty( $r['current_category'] ) && ( is_category() || is_tax() ) )
|
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();
|
$r['current_category'] = get_queried_object_id();
|
||||||
|
}
|
||||||
|
|
||||||
if ( $hierarchical )
|
if ( $hierarchical )
|
||||||
$depth = $r['depth'];
|
$depth = $r['depth'];
|
||||||
|
|
Loading…
Reference in New Issue