WP_REST_Request::set_method
Sets HTTP method for the request.
Метод класса: WP_REST_Request{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WP_REST_Request = new WP_REST_Request(); $WP_REST_Request->set_method( $method );
- $method(строка) (обязательный)
- HTTP method.
Список изменений
| С версии 4.4.0 | Введена. |
Код WP_REST_Request::set_method() WP REST Request::set method WP 7.0.2
public function set_method( $method ) {
$this->method = strtoupper( $method );
}