WP_Query::is_feed( string|array $feeds = '' )

Is the query for a feed?


Description Description


Parameters Parameters

$feeds

(string|array) (Optional) feed types to check.

Default value: ''


Top ↑

Return Return

(bool)


Top ↑

Source Source

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.