Ticket #5031: tagcloud-class.diff
File tagcloud-class.diff, 1.3 KB (added by , 17 years ago) |
---|
-
wp-includes/category-template.php
334 334 global $wp_rewrite; 335 335 $defaults = array( 336 336 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45, 337 'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC' 337 'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC', 338 'useclass' => 0, 338 339 ); 339 340 $args = wp_parse_args( $args, $defaults ); 340 341 extract($args); … … 376 377 $tag_id = $tag_ids[$tag]; 377 378 $tag_link = clean_url($tag_links[$tag]); 378 379 $tag = str_replace(' ', ' ', wp_specialchars( $tag )); 379 $a[] = "<a href='$tag_link' class='tag-link-$tag_id' title='" . attribute_escape( sprintf( __('%d topics'), $count ) ) . "'$rel style='font-size: " . 380 if (!useclass) { 381 $style = "style='font-size: " . 380 382 ( $smallest + ( ( $count - $min_count ) * $font_step ) ) 381 . "$unit;'>$tag</a>"; 383 . "$unit;'"; 384 $class =''; 385 } else { 386 $style =''; 387 $class =' tagcloud-'.( $smallest + ( ( $count - $min_count ) * $font_step ) ); 388 } 389 $a[] = "<a href='$tag_link' class='tag-link-$tag_id$class' title='" . 390 attribute_escape( sprintf( __('%d topics'), $count ) ) . 391 "'$rel $style>$tag</a>"; 382 392 } 383 393 384 394 switch ( $format ) :