Filter hook 'the_content'

in WP Core File wp-includes/blocks.php at line 1177

Description

Hooks into the REST API response for the core/navigation block and adds the first and last inner blocks.

Occurrences

Filename Line Number
wp-includes/blocks.php 1177
wp-includes/feed.php 196
wp-includes/formatting.php 3980
wp-includes/post-template.php 256
wp-includes/comment.php 2984
wp-includes/blocks/post-content.php 50
wp-includes/blocks/navigation.php 1666
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 1871
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php 825
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php 632

Parameters

Type Name Description
WP_REST_Response $response The response object.
WP_Post $post Post object.

Usage Examples

Example 1

add_filter( 'the_content', '_restore_wpautop_hook'

Example 2

add_filter( 'the_content', 'wpautop'

PHP Doc

/**
 * Hooks into the REST API response for the core/navigation block and adds the first and last inner blocks.
 *
 * @since 6.6.0
 *
 * @param WP_REST_Response $response The response object.
 * @param WP_Post          $post     Post object.
 * @return WP_REST_Response The response object.
 */