Determines if the request is the given method.
Parameters
$method
stringrequired- HTTP method.
Source
public function is_method( $method ) {
return $this->get_method() === strtoupper( $method );
}
Changelog
Version | Description |
---|---|
6.8.0 | Introduced. |
CARVIEW |
Determines if the request is the given method.
$method
stringrequiredpublic function is_method( $method ) {
return $this->get_method() === strtoupper( $method );
}
Uses | Description |
---|---|
WP_REST_Request::get_method()wp-includes/rest-api/class-wp-rest-request.php | Retrieves the HTTP method for the request. |
Version | Description |
---|---|
6.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.