Changeset 5521 for trunk/wp-includes/category-template.php
- Timestamp:
- 05/23/2007 03:57:20 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/category-template.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category-template.php
r5444 r5521 312 312 $counts = $tag_links = array(); 313 313 foreach ( (array) $tags as $tag ) { 314 $counts[$tag-> cat_name] = $tag->tag_count;315 $tag_links[$tag-> cat_name] = get_tag_link( $tag->cat_ID);314 $counts[$tag->name] = $tag->count; 315 $tag_links[$tag->name] = get_tag_link( $tag->term_id ); 316 316 } 317 317 … … 385 385 function get_tag_link( $tag_id ) { 386 386 global $wp_rewrite; 387 $ catlink = $wp_rewrite->get_tag_permastruct();388 389 $ category = &get_category($tag_id);390 $ category_nicename = $category->category_nicename;387 $taglink = $wp_rewrite->get_tag_permastruct(); 388 389 $tag = &get_term($tag_id, 'post_tag'); 390 $slug = $tag->slug; 391 391 392 392 if ( empty($catlink) ) { 393 393 $file = get_option('home') . '/'; 394 $ catlink = $file . '?tag=' . $category_nicename;394 $taglink = $file . '?tag=' . $slug; 395 395 } else { 396 397 $catlink = str_replace('%tag%', $category_nicename, $catlink); 398 $catlink = get_option('home') . user_trailingslashit($catlink, 'category'); 399 } 400 return apply_filters('tag_link', $catlink, $tag_id); 396 $taglink = str_replace('%tag%', $slug, $taglink); 397 $taglink = get_option('home') . user_trailingslashit($taglink, 'category'); 398 } 399 return apply_filters('tag_link', $taglink, $tag_id); 401 400 } 402 401 … … 427 426 $tag_list = $before; 428 427 foreach ( $tags as $tag ) 429 $tag_links[] = '<a href="' . get_tag_link($tag-> cat_ID) . '">' . $tag->cat_name. '</a>';428 $tag_links[] = '<a href="' . get_tag_link($tag->term_id) . '">' . $tag->slug . '</a>'; 430 429 431 430 $tag_links = join( $sep, $tag_links );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)