首页 WordPress函数大全 rest_send_allow_header()

rest_send_allow_header()

2020-05-02 / 4716阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

rest_send_allow_header( WP_REST_Response $response, WP_REST_Server $server, WP_REST_Request $request )

发送“允许”标头以声明可以发送到当前路由的所有方法。

描述

参数

$response

(WP_REST_Response)
(Required)
Current response being served.

$server

(WP_REST_Server)
(Required)
ResponseHandler instance (usually WP_REST_Server).

$request

(WP_REST_Request)
(Required)
The request that was used to make current response.

返回

(WP_REST_Response) Response to be served, with "Allow" header if route has allowed methods.

大家谈论
    我的见解