Uses
Uses | Description |
---|---|
wp-includes/plugin.php: apply_filters() | Calls the callback functions that have been added to a filter hook. |
wp-includes/feed.php: default_feed | Filters the default feed type. |
Retrieve the default feed.
The default feed is ‘rss2’, unless a plugin changes it through the ‘default_feed’ filter.
(string) Default feed, or for example 'rss2', 'atom', etc.
File: wp-includes/feed.php
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; }
Version | Description |
---|---|
2.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_default_feed