automatic_feed_links

函式
automatic_feed_links ( $add = true )
引數
  • (bool) $add Optional. Add or remove links. Default true.
    Required:
    Default: true
相關
  • add_theme_support()
定義位置
相關方法
get_author_feed_linkfeed_linksthe_feed_linkget_feed_linkget_search_feed_link
引入
2.8.0
棄用
3.0.0

automatic_feed_links: 這個函式用來在WordPress網站的HTML程式碼的頭部新增連結,以便自動發現文章、評論和類別的RSS、Atom和RDF提要。它是由WordPress自動呼叫的,並且不需要任何引數。

啟用/禁用自動輸出一般feed連結的功能。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
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+.
}
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+. }
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+.
}

常見問題

FAQs
檢視更多 >