diff --git a/wp-includes/class-walker-category.php b/wp-includes/class-walker-category.php index dd7252cffe..36f631c1b2 100644 --- a/wp-includes/class-walker-category.php +++ b/wp-includes/class-walker-category.php @@ -182,6 +182,7 @@ class Walker_Category extends Walker { } else { $link .= "'; } + $link .= ''; if ( empty( $args['feed_image'] ) ) { @@ -192,6 +193,7 @@ class Walker_Category extends Walker { if ( ! empty( $args['show_count'] ) ) { $link .= ' (' . number_format_i18n( $category->count ) . ')'; } + if ( 'list' === $args['style'] ) { $output .= "\tterm_id == $_current_term->term_id ) { + if ( $category->term_id === $_current_term->term_id ) { $css_classes[] = 'current-cat'; $link = str_replace( 'term_id == $_current_term->parent ) { + } elseif ( $category->term_id === $_current_term->parent ) { $css_classes[] = 'current-cat-parent'; } + while ( $_current_term->parent ) { - if ( $category->term_id == $_current_term->parent ) { + if ( $category->term_id === $_current_term->parent ) { $css_classes[] = 'current-cat-ancestor'; break; } + $_current_term = get_term( $_current_term->parent, $category->taxonomy ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 3ff8774080..2a0449d4de 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55882'; +$wp_version = '6.3-alpha-55883'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.