get_default_feed

函数


get_default_feed ( No parameters )
返回值
  • (string) Default feed, or for example ‘rss2’, ‘atom’, etc.
定义位置
  • wp-includes/feed.php
    , line 80
引入
2.5.0
弃用

Retrieves the default feed.

The default feed is ‘rss2’, unless a plugin changes it through the
{@see ‘default_feed’} filter.

function get_default_feed() {
	/**
	 * Filters the default feed type.
	 *
	 * @since 2.5.0
	 *
	 * @param string $feed_type Type of default feed. Possible values include 'rss2', 'atom'.
	 *                          Default 'rss2'.
	 */
	$default_feed = apply_filters( 'default_feed', 'rss2' );

	return ( 'rss' === $default_feed ) ? 'rss2' : $default_feed;
}