rest_parse_request_arg()
rest_parse_request_arg( mixed $value, WP_REST_Request $request, string $param )
基于注册到路由的详细信息分析请求参数。
Parse a request argument based on details registered to the route.
说明(Description)
运行验证检查并清理该值,主要通过端点参数注册中的sanitize_回调参数使用。
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$value | (mixed) | 必需 | |
$request | (WP_REST_Request) | 必需 | |
$param | (string) | 必需 |
返回(Return)
(mixed)
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.7.0 | wp-includes/rest-api.php:1079 | 2 | 3 |
rest_parse_request_arg() 为WP2原创文章,链接:https://www.wp2.cn/functions/rest_parse_request_arg/