rest_{$this->post_type}_item_schema
apply_filters( “rest_{$this->post_type}_item_schema”, array $schema )
过滤钩子:过滤帖子的架构。
Filter Hook: Filter the post’s schema.
说明(Description)
过滤器的动态部分,$this->post_type,是指控制器的post类型slug。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$schema | (array) | 项架构数据。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
5.4.0 | wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:2422 | 1 | 0 |
rest_{$this->post_type}_item_schema 为WP2原创文章,链接:https://www.wp2.cn/hook/rest_this-post_type_item_schema/