wpseek.com
A WordPress-centric search engine for devs and theme authors



get_default_feed › WordPress Function

Since2.5.0
Deprecatedn/a
get_default_feed ( No parameters )
Returns:
  • (string) Default feed, or for example 'rss2', 'atom', etc.
Defined at:
Codex:

Retrieves the default feed.

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


Source

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;
}