mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Deprecate automatic_feed_links() in favor of add_theme_support('automatic-feed-links'). Props Viper007Bond. Fixes #12364
git-svn-id: https://develop.svn.wordpress.org/trunk@13398 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user