From 9d54f38d89340b74daf9da3587371d5a8ef84a23 Mon Sep 17 00:00:00 2001 From: dd32 Date: Thu, 25 Feb 2010 11:09:34 +0000 Subject: [PATCH] Restore backwards compatibility in automatic_feed_links() to deregister the extra feeds. Props Viper007Bond. See #12364 git-svn-id: http://svn.automattic.com/wordpress/trunk@13399 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-filters.php | 2 +- wp-includes/deprecated.php | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index 26d6aa313..44c91b974 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -169,7 +169,7 @@ add_filter( 'atom_service_url','atom_service_url_filter' ); // Actions add_action( 'wp_head', 'wp_enqueue_scripts', 1 ); -add_action( 'wp_head', 'feed_links', 3 ); +add_action( 'wp_head', 'feed_links', 2 ); add_action( 'wp_head', 'feed_links_extra', 3 ); add_action( 'wp_head', 'rsd_link' ); add_action( 'wp_head', 'wlwmanifest_link' ); diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index c4618bc53..2dad872b6 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -2414,13 +2414,19 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) { } /** - * Enable automatic general feed link outputting. + * Enable/disable automatic general feed link outputting. * * @since 2.8.0 * @deprecated 3.0.0 * @deprecated Use add_theme_support( 'automatic-feed-links' ) + * + * @param boolean $add Optional, default is true. Add or remove links. Defaults to true. */ -function automatic_feed_links() { +function automatic_feed_links( $add = true ) { _deprecated_function( __FUNCTION__, '3.0', "add_theme_support( 'automatic-feed-links' )" ); - add_theme_support( 'automatic-feed-links' ); + + if ( $add ) + add_theme_support( 'automatic-feed-links' ); + else + remove_action( 'wp_head', 'feed_links_extra', 3 ); // Just do this yourself in 3.0+ } \ No newline at end of file