Changeset 6327
- Timestamp:
- 11/09/2007 08:12:04 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/feed.php
r6274 r6327 129 129 130 130 131 function get_category_feed_link($cat_id, $feed = 'rss2') { 132 $cat_id = (int) $cat_id; 133 134 $category = get_category($cat_id); 135 136 if ( empty($category) || is_wp_error($category) ) 137 return false; 138 139 $permalink_structure = get_option('permalink_structure'); 140 141 if ( '' == $permalink_structure ) { 142 $link = get_option('home') . "?feed=$feed&cat=" . $cat_id; 143 } else { 144 $link = get_category_link($cat_id); 145 if( 'rss2' == $feed ) 146 $feed_link = 'feed'; 147 else 148 $feed_link = "feed/$feed"; 149 150 $link = trailingslashit($link) . user_trailingslashit($feed_link, 'feed'); 151 } 152 153 $link = apply_filters('category_feed_link', $link, $feed); 154 155 return $link; 156 } 157 158 131 159 function get_category_rss_link($echo = false, $cat_ID, $category_nicename) { 132 $permalink_structure = get_option('permalink_structure'); 133 134 if ( '' == $permalink_structure ) { 135 $link = get_option('home') . '?feed=rss2&cat=' . $cat_ID; 136 } else { 137 $link = get_category_link($cat_ID); 138 $link = trailingslashit($link) . user_trailingslashit('feed', 'feed'); 139 } 140 141 $link = apply_filters('category_feed_link', $link); 160 $link = get_category_feed_link($cat_ID, $feed = 'rss2'); 142 161 143 162 if ( $echo )
Note: See TracChangeset
for help on using the changeset viewer.