apply_filters( ‘rest_block_hooks_post_types’, string[] $content_like_post_types, string $post_type, stdClass|WP_Post $prepared_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_typesstring[]
Array of post type names that support Block Hooks.
$post_typestring
The current post type being processed.
$prepared_poststdClass|WP_Post
The prepared post object.

Source

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

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

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