From 1fa94a6e1e4b8c36ba3b09a54040d1082c7a9948 Mon Sep 17 00:00:00 2001 From: Dion Hulse 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: https://develop.svn.wordpress.org/trunk@13399 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 26d6aa3135..44c91b9743 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 c4618bc53b..2dad872b6f 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