WP_REST_Request::set_param( string $key, mixed $value )

Sets a parameter on the request.


Parameters

$key

(Required) Parameter name.

$value

(Required) Parameter value.


Source

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

	public function set_param( $key, $value ) {
		$order = $this->get_parameter_order();
		$this->params[ $order[0] ][ $key ] = $value;
	}


Changelog

Changelog
Version Description
WP-4.4.0 Introduced.