From 7f8c8b6ae71df56a93dee22deebc9dbc7a836e46 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 6 Aug 2008 15:53:39 +0000 Subject: [PATCH] Fix tag cloud links. Props DD32. see #6015 git-svn-id: http://svn.automattic.com/wordpress/trunk@8569 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 5eb9a085b..d4df69475 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -394,8 +394,8 @@ function wp_generate_tag_cloud( $tags, $args = '' ) { return; $counts = array(); - foreach ( (array) $tags as $tag ) - $counts[ $tag->name ] = $tag->count; + foreach ( (array) $tags as $key => $tag ) + $counts[ $key ] = $tag->count; $min_count = min($counts); $spread = max($counts) - $min_count; @@ -426,13 +426,14 @@ function wp_generate_tag_cloud( $tags, $args = '' ) { $rel = ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) ? ' rel="tag"' : ''; - foreach ( $counts as $tag => $count ) { - $tag_link = clean_url( $tags[ $tag ]->link ); - $tag_id = $tags[ $tag ]->id; + foreach ( $counts as $key => $count ) { + $tag_link = clean_url( $tags[ $key ]->link ); + $tag_id = $tags[ $key ]->id; + $tag_name = $tags[ $key ]->name; $a[] = "$tag"; + . "$unit;'>$tag_name"; } switch ( $format ) :