wpseek.com
WordPress开发者和主题制作者的搜索引擎



rest_block_hooks_post_types › WordPress过滤钩子

Since7.0.0
已弃用n/a
› apply_filters( 'rest_block_hooks_post_types', $content_like_post_types, $this->post_type, $prepared_post )
参数: (3)
  • () content_like_post_types Array of post type names that support Block Hooks.
    Required: Yes
  • () post_type The current post type being processed.
    Required: Yes
  • () prepared_post The prepared post object.
    Required: Yes
定义在:
文档:

Filters which post types should have Block Hooks applied.

Allows themes and plugins to add or remove post types that should have Block Hooks functionality enabled in the REST API.




源码

$content_like_post_types = apply_filters( 'rest_block_hooks_post_types', $content_like_post_types, $this->post_type, $prepared_post );