WordPress.org

Make WordPress Core

Ticket #4798: tag_cloud_link_ids.diff

File tag_cloud_link_ids.diff, 1.1 KB (added by filosofo, 14 years ago)
  • wp-includes/category-template.php

     
    328328        foreach ( (array) $tags as $tag ) {
    329329                $counts[$tag->name] = $tag->count;
    330330                $tag_links[$tag->name] = get_tag_link( $tag->term_id );
     331                $tag_ids[$tag->name] = $tag->term_id;
    331332        }
    332333
    333334        $min_count = min($counts);
     
    353354        $rel = ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) ? ' rel="tag"' : '';
    354355
    355356        foreach ( $counts as $tag => $count ) {
     357                $tag_id = $tag_ids[$tag];
    356358                $tag_link = clean_url($tag_links[$tag]);
    357359                $tag = str_replace(' ', ' ', wp_specialchars( $tag ));
    358                 $a[] = "<a href='$tag_link' title='" . attribute_escape( sprintf( __('%d topics'), $count ) ) . "'$rel style='font-size: " .
     360                $a[] = "<a href='$tag_link' class='tag-link-$tag_id' title='" . attribute_escape( sprintf( __('%d topics'), $count ) ) . "'$rel style='font-size: " .
    359361                        ( $smallest + ( ( $count - $min_count ) * $font_step ) )
    360362                        . "$unit;'>$tag</a>";
    361363        }