mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-18 14:21:25 +01:00
Deprecate automatic_feed_links() in favor of add_theme_support('automatic-feed-links'). Props Viper007Bond. Fixes #12364
git-svn-id: http://svn.automattic.com/wordpress/trunk@13398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
280a19ff6c
commit
f51247ef50
@ -4,7 +4,7 @@
|
||||
* @subpackage Classic_Theme
|
||||
*/
|
||||
|
||||
automatic_feed_links();
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
|
||||
if ( function_exists('register_sidebar') )
|
||||
register_sidebar(array(
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
$content_width = 450;
|
||||
|
||||
automatic_feed_links();
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
|
||||
if ( function_exists('register_sidebar') ) {
|
||||
register_sidebar(array(
|
||||
|
@ -26,8 +26,8 @@ function twentyten_init() {
|
||||
// so we want them to be 940 pixels wide by 198 pixels tall (larger images will be auto-cropped to fit)
|
||||
set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
|
||||
|
||||
// Add default posts and comments RSS feed links to head.
|
||||
automatic_feed_links();
|
||||
// Add default posts and comments RSS feed links to head
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
|
||||
// Make theme available for translation
|
||||
// Translations can be filed in the /languages/ directory
|
||||
|
@ -169,6 +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_extra', 3 );
|
||||
add_action( 'wp_head', 'rsd_link' );
|
||||
add_action( 'wp_head', 'wlwmanifest_link' );
|
||||
|
@ -2412,3 +2412,15 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable automatic general feed link outputting.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @deprecated 3.0.0
|
||||
* @deprecated Use add_theme_support( 'automatic-feed-links' )
|
||||
*/
|
||||
function automatic_feed_links() {
|
||||
_deprecated_function( __FUNCTION__, '3.0', "add_theme_support( 'automatic-feed-links' )" );
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
}
|
@ -1561,22 +1561,6 @@ function wp_footer() {
|
||||
do_action('wp_footer');
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/disable automatic general feed link outputting.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param boolean $add Optional, default is true. Add or remove links. Defaults to true.
|
||||
*/
|
||||
function automatic_feed_links( $add = true ) {
|
||||
if ( $add )
|
||||
add_action( 'wp_head', 'feed_links', 2 );
|
||||
else {
|
||||
remove_action( 'wp_head', 'feed_links', 2 );
|
||||
remove_action( 'wp_head', 'feed_links_extra', 3 );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the links to the general feeds.
|
||||
*
|
||||
@ -1585,6 +1569,9 @@ function automatic_feed_links( $add = true ) {
|
||||
* @param array $args Optional arguments.
|
||||
*/
|
||||
function feed_links( $args = array() ) {
|
||||
if ( !current_theme_supports('automatic-feed-links') )
|
||||
return;
|
||||
|
||||
$defaults = array(
|
||||
/* translators: Separator between blog name and feed type in feed links */
|
||||
'separator' => _x('»', 'feed link'),
|
||||
|
Loading…
Reference in New Issue
Block a user