Changeset 5149 for trunk/wp-includes/category-template.php
- Timestamp:
- 03/31/2007 06:16:12 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category-template.php
r5111 r5149 39 39 } 40 40 return apply_filters('category_link', $catlink, $category_id); 41 } 42 43 function get_tag_link( $tag_id ) { 44 global $wp_rewrite; 45 $catlink = $wp_rewrite->get_category_permastruct(); 46 47 $category = &get_category($tag_id); 48 $category_nicename = $category->category_nicename; 49 50 if ( empty($catlink) ) { 51 $file = get_option('home') . '/'; 52 $catlink = $file . '?tag=' . $category_nicename; 53 } else { 54 55 $catlink = str_replace('%tag%', $category_nicename, $catlink); 56 $catlink = get_option('home') . user_trailingslashit($catlink, 'category'); 57 } 58 return apply_filters('tag_link', $catlink, $category_id); 41 59 } 42 60 … … 183 201 $return = $before; 184 202 foreach ( $tags as $tag ) 185 $tag_links[] = '<a href="' . get_ category_link($tag->cat_ID) . '">' . $tag->cat_name . '</a>';203 $tag_links[] = '<a href="' . get_tag_link($tag->cat_ID) . '">' . $tag->cat_name . '</a>'; 186 204 187 205 $tag_links = join( $sep, $tag_links );
Note: See TracChangeset
for help on using the changeset viewer.