apply_filters( ‘rest_block_hooks_post_types’, array $content_like_post_types, string $post_type, WP_Post $post )

In this article

Filters which post types should have Block Hooks applied.

Description

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

Parameters

$content_like_post_typesarray
Array of post type names that support Block Hooks.
$post_typestring
The current post type being processed.
$postWP_Post
The post object.

Source

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

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.