函数原型
automatic_feed_links( bool $add = true )
函数描述
Enable/disable automatic general feed link outputting.
是否弃用
Warning: This function has been deprecated. Use add_theme_support() instead.
函数参数
-
$add
bool
Optional - Add or remove links.
Default:
true
函数返回值
无
函数位置
File: wp-includes/deprecated.php.
函数源码
function automatic_feed_links( $add = true ) {
_deprecated_function( __FUNCTION__, '3.0.0', "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+.
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.0.0 | Use add_theme_support() |
| 2.8.0 | Introduced. |

