Skip to content

Commit baf80d4

Browse files
committed
Docs: Remove duplicate documentation for the rest_block_hooks_post_types hook.
See #62715, #64896 git-svn-id: https://develop.svn.wordpress.org/trunk@62430 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 75fc4e9 commit baf80d4

1 file changed

Lines changed: 4 additions & 15 deletions

File tree

src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)