Uses
Uses | Description |
---|---|
wp-includes/class-wp-query.php: WP_Query::get() | Retrieve query variable. |
wp-includes/feed.php: get_default_feed() | Retrieve the default feed. |
Is the query for a feed?
(string|string[]) (Optional) Feed type or array of feed types to check against.
Default value: ''
(bool) Whether the query is for a feed.
File: wp-includes/class-wp-query.php
public function is_feed( $feeds = '' ) { if ( empty( $feeds ) || ! $this->is_feed ) { return (bool) $this->is_feed; } $qv = $this->get( 'feed' ); if ( 'feed' === $qv ) { $qv = get_default_feed(); } return in_array( $qv, (array) $feeds, true ); }
Version | Description |
---|---|
3.1.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_query/is_feed