Make WordPress Core

Changeset 13398


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

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

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/classic/functions.php

    r10377 r13398  
    55 */
    66
    7 automatic_feed_links();
     7add_theme_support( 'automatic-feed-links' );
    88
    99if ( function_exists('register_sidebar') )
  • trunk/wp-content/themes/default/functions.php

    r12546 r13398  
    77$content_width = 450;
    88
    9 automatic_feed_links();
     9add_theme_support( 'automatic-feed-links' );
    1010
    1111if ( function_exists('register_sidebar') ) {
  • trunk/wp-content/themes/twentyten/functions.php

    r13214 r13398  
    33// Set the content width based on the Theme CSS
    44if ( ! isset( $content_width ) )
    5    $content_width = 640;
     5    $content_width = 640;
    66
    77if ( ! function_exists( 'twentyten_init' ) ) :
     
    2727    set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
    2828
    29     // Add default posts and comments RSS feed links to head.
    30     automatic_feed_links();
     29    // Add default posts and comments RSS feed links to head
     30    add_theme_support( 'automatic-feed-links' );
    3131
    3232    // Make theme available for translation
  • trunk/wp-includes/default-filters.php

    r13113 r13398  
    169169
    170170// Actions
    171 add_action( 'wp_head',             'wp_enqueue_scripts',             1    );
    172 add_action( 'wp_head',             'feed_links_extra',               3    );
     171add_action( 'wp_head',             'wp_enqueue_scripts',            1     );
     172add_action( 'wp_head',             'feed_links',                    3     );
     173add_action( 'wp_head',             'feed_links_extra',              3     );
    173174add_action( 'wp_head',             'rsd_link'                             );
    174175add_action( 'wp_head',             'wlwmanifest_link'                     );
     
    179180add_action( 'wp_head',             'locale_stylesheet'                    );
    180181add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 );
    181 add_action( 'wp_head',             'noindex',                        1    );
    182 add_action( 'wp_head',             'wp_print_styles',                8    );
    183 add_action( 'wp_head',             'wp_print_head_scripts',          9    );
     182add_action( 'wp_head',             'noindex',                       1     );
     183add_action( 'wp_head',             'wp_print_styles',               8     );
     184add_action( 'wp_head',             'wp_print_head_scripts',         9     );
    184185add_action( 'wp_head',             'wp_generator'                         );
    185186add_action( 'wp_head',             'rel_canonical'                        );
  • trunk/wp-includes/deprecated.php

    r13382 r13398  
    24132413    return true;
    24142414}
     2415
     2416/**
     2417 * Enable automatic general feed link outputting.
     2418 *
     2419 * @since 2.8.0
     2420 * @deprecated 3.0.0
     2421 * @deprecated Use add_theme_support( 'automatic-feed-links' )
     2422 */
     2423function automatic_feed_links() {
     2424    _deprecated_function( __FUNCTION__, '3.0', "add_theme_support( 'automatic-feed-links' )" );
     2425    add_theme_support( 'automatic-feed-links' );
     2426}
  • 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.