html_type_rss

函式
html_type_rss ( No parameters )
定義位置
相關方法
the_title_rsspost_type_existspost_type_supportswp_title_rssget_terms
引入
2.2.0
棄用
-

html_type_rss – 這是一個WordPress函式,用於生成RSS提要的內容型別標題。RSS是一種聚合和分享網站內容的格式,它通常被新聞網站和部落格用來向訂閱者提供更新的內容。html_type_rss函式將內容型別標頭設定為application/rss+xml,這表明該內容是一個RSS提要。

顯示基於部落格設定的HTML型別。

兩個可能的值是’xhtml’或’html’。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function html_type_rss() {
$type = get_bloginfo( 'html_type' );
if ( strpos( $type, 'xhtml' ) !== false ) {
$type = 'xhtml';
} else {
$type = 'html';
}
echo $type;
}
function html_type_rss() { $type = get_bloginfo( 'html_type' ); if ( strpos( $type, 'xhtml' ) !== false ) { $type = 'xhtml'; } else { $type = 'html'; } echo $type; }
function html_type_rss() {
	$type = get_bloginfo( 'html_type' );
	if ( strpos( $type, 'xhtml' ) !== false ) {
		$type = 'xhtml';
	} else {
		$type = 'html';
	}
	echo $type;
}

常見問題

FAQs
檢視更多 >