rest_endpoints
apply_filters( ‘rest_endpoints’, array $endpoints )
过滤器::过滤可用端点的数组。
Filter Hook: Filters the array of available endpoints.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$endpoints | (array) | 可用的终结点。匹配正则表达式模式的数组,每个模式都映射到端点的回调数组。它们采用“/path/regex”=>数组($callback,$bitmask)或“/path/regex”=>数组(数组($callback,$bitmask)格式。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.4.0 | wp-includes/rest-api/class-wp-rest-server.php:770 | 1 | 0 |
rest_endpoints 为WP2原创文章,链接:https://www.wp2.cn/hook/rest_endpoints/