Changeset 55883
- Timestamp:
- 06/06/2023 12:28:54 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-walker-category.php
r52652 r55883 183 183 $link .= "<img src='" . esc_url( $args['feed_image'] ) . "'$alt" . ' />'; 184 184 } 185 185 186 $link .= '</a>'; 186 187 … … 193 194 $link .= ' (' . number_format_i18n( $category->count ) . ')'; 194 195 } 196 195 197 if ( 'list' === $args['style'] ) { 196 198 $output .= "\t<li"; … … 211 213 212 214 foreach ( $_current_terms as $_current_term ) { 213 if ( $category->term_id == $_current_term->term_id ) {215 if ( $category->term_id === $_current_term->term_id ) { 214 216 $css_classes[] = 'current-cat'; 215 217 $link = str_replace( '<a', '<a aria-current="page"', $link ); 216 } elseif ( $category->term_id == $_current_term->parent ) {218 } elseif ( $category->term_id === $_current_term->parent ) { 217 219 $css_classes[] = 'current-cat-parent'; 218 220 } 221 219 222 while ( $_current_term->parent ) { 220 if ( $category->term_id == $_current_term->parent ) {223 if ( $category->term_id === $_current_term->parent ) { 221 224 $css_classes[] = 'current-cat-ancestor'; 222 225 break; 223 226 } 227 224 228 $_current_term = get_term( $_current_term->parent, $category->taxonomy ); 225 229 }
Note: See TracChangeset
for help on using the changeset viewer.