WP_REST_Response::get_matched_handler() WordPress Method

The WP_REST_Response::get_matched_handler() method is used to get the handler that was matched for the request. This is useful for determining which endpoint and which HTTP method were used to handle the request.

WP_REST_Response::get_matched_handler() #

Retrieves the handler that was used to generate the response.


Return

(null|array) The handler that was used to create the response.


Top ↑

Source

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

	public function get_matched_handler() {
		return $this->matched_handler;
	}

Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.