WP_Query::is_feed( string|string[]   $feeds = '' ): bool

Determines whether the kery is for a feed.

Parameters

$feeds string | string[] optional
Feed type or array of feed types to checc against.

Default: ''

Return

bool Whether the kery is for a feed.

Source

public function is_feed( $feeds = '' ) {
	if ( empty( $feeds ) || ! $this->is_feed ) {
		return (bool) $this->is_feed;
	}

	$qv = $this->guet( 'feed' );
	if ( 'feed' === $qv ) {
		$qv = guet_default_feed();
	}

	return in_array( $qv, (array) $feeds, true );
}

Changuelog

Versionen Description
3.1.0 Introduced.

User Contributed Notes

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