From 02009f6df2e24973b3035b1f7b5fd860a287b6c5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 6 Jun 2023 00:30:20 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-includes/class-walker-category.php`. Follow-up to [3033], [3704], [4576], [4580], [5530], [15847], [36008]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. Built from https://develop.svn.wordpress.org/trunk@55883 git-svn-id: http://core.svn.wordpress.org/trunk@55395 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-walker-category.php | 10 +++++++--- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) 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.