WP_REST_Request::offsetSet()publicWP 4.4.0ReturnTypeWillChange

Sets a parameter on the request.

Method of the class: WP_REST_Request{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_REST_Request = new WP_REST_Request();
$WP_REST_Request->offsetSet( $offset, $value );
$offset(string) (required)
Parameter name.
$value(mixed) (required)
Parameter value.

Changelog

Since 4.4.0 Introduced.

WP_REST_Request::offsetSet() code WP 6.5.2

public function offsetSet( $offset, $value ) {
	$this->set_param( $offset, $value );
}