mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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
This commit is contained in:
parent
f51247ef50
commit
9d54f38d89
@ -169,7 +169,7 @@ add_filter( 'atom_service_url','atom_service_url_filter' );
|
|||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
add_action( 'wp_head', 'wp_enqueue_scripts', 1 );
|
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', 'feed_links_extra', 3 );
|
||||||
add_action( 'wp_head', 'rsd_link' );
|
add_action( 'wp_head', 'rsd_link' );
|
||||||
add_action( 'wp_head', 'wlwmanifest_link' );
|
add_action( 'wp_head', 'wlwmanifest_link' );
|
||||||
|
@ -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
|
* @since 2.8.0
|
||||||
* @deprecated 3.0.0
|
* @deprecated 3.0.0
|
||||||
* @deprecated Use add_theme_support( 'automatic-feed-links' )
|
* @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' )" );
|
_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+
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user