Changeset 8706
- Timestamp:
- 08/22/2008 02:21:37 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r8672 r8706 320 320 } 321 321 322 /** Get the feed link for a given author 323 * 324 * Returns a link to the feed for all posts by a given author. A specific feed can be requested 325 * or left blank to get the default feed. 326 * 327 * @package WordPress 328 * @subpackage Feed 329 * @since 2.5 330 * 331 * @param int $author_id ID of an author 332 * @param string $feed Feed type 333 * @return string Link to the feed for the author specified by $author_id 334 */ 322 335 function get_author_feed_link( $author_id, $feed = '' ) { 323 336 $author_id = (int) $author_id; … … 328 341 329 342 if ( '' == $permalink_structure ) { 330 $link = get_option('home') . '?feed=rss2&author='. $author_id;343 $link = get_option('home') . "?feed=$feed&author=" . $author_id; 331 344 } else { 332 345 $link = get_author_posts_url($author_id); 333 $link = trailingslashit($link) . user_trailingslashit('feed', 'feed'); 334 } 335 336 $link = apply_filters('author_feed_link', $link); 346 if ( $feed == get_default_feed() ) 347 $feed_link = 'feed'; 348 else 349 $feed_link = "feed/$feed"; 350 351 $link = trailingslashit($link) . user_trailingslashit($feed_link, 'feed'); 352 } 353 354 $link = apply_filters('author_feed_link', $link, $feed); 337 355 338 356 return $link; 339 357 } 340 358 341 /** get_category_feed_link() -Get the feed link for a given category342 * 343 * Returns a link to the feed for all post in a given category. A specific feed can be requested359 /** Get the feed link for a given category 360 * 361 * Returns a link to the feed for all posts in a given category. A specific feed can be requested 344 362 * or left blank to get the default feed. 345 363 *
Note: See TracChangeset
for help on using the changeset viewer.