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.
Source
File: wp-includes/rest-api/class-wp-rest-response.php
public function get_matched_handler() { return $this->matched_handler; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |