diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 366cd85532..3b29e7c1a9 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -328,6 +328,7 @@ function wp_generate_tag_cloud( $tags, $args = '' ) { foreach ( (array) $tags as $tag ) { $counts[$tag->name] = $tag->count; $tag_links[$tag->name] = get_tag_link( $tag->term_id ); + $tag_ids[$tag->name] = $tag->term_id; } $min_count = min($counts); @@ -353,9 +354,10 @@ function wp_generate_tag_cloud( $tags, $args = '' ) { $rel = ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) ? ' rel="tag"' : ''; foreach ( $counts as $tag => $count ) { + $tag_id = $tag_ids[$tag]; $tag_link = clean_url($tag_links[$tag]); $tag = str_replace(' ', ' ', wp_specialchars( $tag )); - $a[] = "$tag"; }