automatic_feed_links() - WordPress 函数参考中文文档

返回介绍

automatic_feed_links()

发布于 2017-09-10 字数1461 浏览 1158 评论 0

Warning: This function has been deprecated. Use add_theme_support() instead.

automatic_feed_links( bool $add = true )

Enable/disable automatic general feed link outputting.


描述


参数

$add

(bool)
(Optional)
Add or remove links. Defaults to true.

Default value: 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 描述
3.0.0 Use add_theme_support()
2.8.0 Introduced.

相关函数

Uses

  • wp-includes/theme.php:
    add_theme_support()
  • wp-includes/functions.php:
    _deprecated_function()
  • wp-includes/plugin.php:
    remove_action()

User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!