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
查看更多 >