@@ -1501,9 +1501,9 @@ protected function prepare_item_for_database( $request ) {
15011501 *
15021502 * @since 7.0.0
15031503 *
1504- * @param array $content_like_post_types Array of post type names that support Block Hooks.
1505- * @param string $post_type The current post type being processed.
1506- * @param object $prepared_post The prepared post object.
1504+ * @param string[] $content_like_post_types Array of post type names that support Block Hooks.
1505+ * @param string $post_type The current post type being processed.
1506+ * @param stdClass|WP_Post $prepared_post The prepared post object.
15071507 */
15081508 $ content_like_post_types = apply_filters ( 'rest_block_hooks_post_types ' , $ content_like_post_types , $ this ->post_type , $ prepared_post );
15091509
@@ -2172,18 +2172,7 @@ public function prepare_item_for_response( $item, $request ) {
21722172 */
21732173 $ content_like_post_types = array ( 'post ' , 'page ' , 'wp_block ' , 'wp_navigation ' );
21742174
2175- /**
2176- * Filters which post types should have Block Hooks applied.
2177- *
2178- * Allows themes and plugins to add or remove post types that should
2179- * have Block Hooks functionality enabled in the REST API.
2180- *
2181- * @since 7.0.0
2182- *
2183- * @param array $content_like_post_types Array of post type names that support Block Hooks.
2184- * @param string $post_type The current post type being processed.
2185- * @param WP_Post $post The post object.
2186- */
2175+ /** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */
21872176 $ content_like_post_types = apply_filters ( 'rest_block_hooks_post_types ' , $ content_like_post_types , $ this ->post_type , $ post );
21882177
21892178 if ( in_array ( $ this ->post_type , $ content_like_post_types , true ) ) {
0 commit comments