WP_REST_Request::is_method
Determines if the request is the given method.
Метод класса: WP_REST_Request{}
Хуков нет.
Возвращает
true|false. Whether the request is of the given method.
Использование
$WP_REST_Request = new WP_REST_Request(); $WP_REST_Request->is_method( $method );
- $method(строка) (обязательный)
- HTTP method.
Список изменений
| С версии 6.8.0 | Введена. |
Код WP_REST_Request::is_method() WP REST Request::is method WP 7.0
public function is_method( $method ) {
return $this->get_method() === strtoupper( $method );
}