diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/class-walker-category.php --- a/wp/wp-includes/class-walker-category.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-includes/class-walker-category.php Fri Sep 05 18:40:08 2025 +0200 @@ -182,6 +182,7 @@ } else { $link .= "'; } + $link .= ''; if ( empty( $args['feed_image'] ) ) { @@ -192,6 +193,7 @@ 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 ); } } @@ -271,5 +275,4 @@ $output .= "\n"; } - }