Changeset 8569

Show
Ignore:
Timestamp:
08/06/08 15:53:39 (1 month ago)
Author:
ryan
Message:

Fix tag cloud links. Props DD32. see #6015

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/category-template.php

    r8540 r8569  
    395395 
    396396    $counts = array(); 
    397     foreach ( (array) $tags as $tag ) 
    398         $counts[ $tag->name ] = $tag->count; 
     397    foreach ( (array) $tags as $key => $tag ) 
     398        $counts[ $key ] = $tag->count; 
    399399 
    400400    $min_count = min($counts); 
     
    427427    $rel = ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) ? ' rel="tag"' : ''; 
    428428 
    429     foreach ( $counts as $tag => $count ) { 
    430         $tag_link = clean_url( $tags[ $tag ]->link ); 
    431         $tag_id = $tags[ $tag ]->id; 
     429    foreach ( $counts as $key => $count ) { 
     430        $tag_link = clean_url( $tags[ $key ]->link ); 
     431        $tag_id = $tags[ $key ]->id; 
     432        $tag_name = $tags[ $key ]->name; 
    432433         
    433434        $a[] = "<a href='$tag_link' class='tag-link-$tag_id' title='" . attribute_escape( sprintf( __ngettext($single_text, $multiple_text, $count), $count ) ) . "'$rel style='font-size: " . 
    434435            ( $smallest + ( ( $count - $min_count ) * $font_step ) ) 
    435             . "$unit;'>$tag</a>"; 
     436            . "$unit;'>$tag_name</a>"; 
    436437    } 
    437438