WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/25/2010 08:56:19 AM (10 years ago)
Author:
dd32
Message:

Deprecate automatic_feed_links() in favor of add_theme_support('automatic-feed-links'). Props Viper007Bond. Fixes #12364

File:
1 edited

Legend:

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

    r13382 r13398  
    15631563
    15641564/**
    1565  * Enable/disable automatic general feed link outputting.
     1565 * Display the links to the general feeds.
    15661566 *
    15671567 * @since 2.8.0
    15681568 *
    1569  * @param boolean $add Optional, default is true. Add or remove links. Defaults to true.
    1570  */
    1571 function automatic_feed_links( $add = true ) {
    1572     if ( $add )
    1573         add_action( 'wp_head', 'feed_links', 2 );
    1574     else {
    1575         remove_action( 'wp_head', 'feed_links', 2 );
    1576         remove_action( 'wp_head', 'feed_links_extra', 3 );
    1577     }
    1578 }
    1579 
    1580 /**
    1581  * Display the links to the general feeds.
    1582  *
    1583  * @since 2.8.0
    1584  *
    15851569 * @param array $args Optional arguments.
    15861570 */
    15871571function feed_links( $args = array() ) {
     1572    if ( !current_theme_supports('automatic-feed-links') )
     1573        return;
     1574
    15881575    $defaults = array(
    15891576        /* translators: Separator between blog name and feed type in feed links */
Note: See TracChangeset for help on using the changeset viewer.