WordPress.org

Make WordPress Core

Changeset 13557


Ignore:
Timestamp:
03/02/10 19:00:21 (4 years ago)
Author:
nacin
Message:

Add the_feed_link(). fixes #11794, props sirzooro.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r13549 r13557  
    399399 
    400400/** 
     401 * Display the permalink for the feed type. 
     402 * 
     403 * @since 3.0.0 
     404 * 
     405 * @param string $anchor The link's anchor text. 
     406 * @param string $feed Optional, defaults to default feed. Feed type. 
     407 */ 
     408function the_feed_link( $anchor, $feed = '' ) { 
     409    $link = '<a href="' . esc_url( get_feed_link( $feed ) ) . '">' . $anchor . '</a>'; 
     410    echo apply_filters( 'the_feed_link', $link, $feed ); 
     411} 
     412 
     413/** 
    401414 * Retrieve the permalink for the feed type. 
    402415 * 
Note: See TracChangeset for help on using the changeset viewer.