Ticket #10432: 10432-2.diff
File 10432-2.diff, 1.3 KB (added by , 6 months ago) |
---|
-
src/wp-includes/category-template.php
960 960 $aria_label = true; 961 961 } 962 962 963 global $wp_query; 964 $queried_object_id = $wp_query->get_queried_object_id(); 965 963 966 // Assemble the data that will be used to generate the tag cloud markup. 964 967 $tags_data = array(); 965 968 foreach ( $tags as $key => $tag ) { … … 986 989 'font_size' => $args['smallest'] + ( $count - $min_count ) * $font_step, 987 990 'aria_label' => $aria_label ? sprintf( ' aria-label="%1$s (%2$s)"', esc_attr( $tag->name ), esc_attr( $formatted_count ) ) : '', 988 991 'show_count' => $args['show_count'] ? '<span class="tag-link-count"> (' . $real_count . ')</span>' : '', 992 'current' => ( $tag_id === $queried_object_id ), 989 993 ); 990 994 } 991 995 … … 1003 1007 // Generate the output links array. 1004 1008 foreach ( $tags_data as $key => $tag_data ) { 1005 1009 $class = $tag_data['class'] . ' tag-link-position-' . ( $key + 1 ); 1010 1011 if ( true === $tag_data['current'] ) { 1012 $class .= ' current-tag'; 1013 } 1014 1006 1015 $a[] = sprintf( 1007 1016 '<a href="%1$s"%2$s class="%3$s" style="font-size: %4$s;"%5$s>%6$s%7$s</a>', 1008 1017 esc_url( $tag_data['url'] ),