WP_REST_Request::offsetExists( string $offset )

Checks if a parameter is set.


Parameters Parameters

$offset

(string) (Required) Parameter name.


Top ↑

Return Return

(bool) Whether the parameter is set.


Top ↑

Source Source

File: wp-includes/rest-api/class-wp-rest-request.php

	public function offsetExists( $offset ) {
		$order = $this->get_parameter_order();

		foreach ( $order as $type ) {
			if ( isset( $this->params[ $type ][ $offset ] ) ) {
				return true;
			}
		}

		return false;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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