WP_REST_Response::set_matched_handler()publicWP 4.4.0

Sets the handler that was responsible for generating the response.

Method of the class: WP_REST_Response{}

No Hooks.

Return

null. Nothing.

Usage

$WP_REST_Response = new WP_REST_Response();
$WP_REST_Response->set_matched_handler( $handler );
$handler(array) (required)
The matched handler.

Changelog

Since 4.4.0 Introduced.

WP_REST_Response::set_matched_handler() code WP 6.1.1

public function set_matched_handler( $handler ) {
	$this->matched_handler = $handler;
}