the_content
Filters the post content.
Usage
add_filter( 'the_content', 'wp_kama_the_content_filter' ); /** * Function for `the_content` filter-hook. * * @param string $content Content of the current post. * * @return string */ function wp_kama_the_content_filter( $content ){ // filter... return $content; }
- $content(string)
- Content of the current post.
Changelog
Since 0.71 | Introduced. |
Where the hook is called
the_content
the_content
the_content
the_content
the_content
the_content
wp-includes/post-template.php 256
$content = apply_filters( 'the_content', $content );
wp-includes/comment.php 3011
$excerpt = apply_filters( 'the_content', $post->post_content, $post->ID );
wp-includes/blocks.php 1303
$response->data['content']['rendered'] = apply_filters( 'the_content', $content );
wp-includes/feed.php 196
$content = apply_filters( 'the_content', get_the_content() );
wp-includes/blocks/navigation.php 1646
$response->data['content']['rendered'] = apply_filters( 'the_content', $content );
wp-includes/blocks/post-content.php 50
$content = apply_filters( 'the_content', str_replace( ']]>', ']]>', $content ) );
wp-includes/formatting.php 3965
$text = apply_filters( 'the_content', $text );
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php 824
'rendered' => apply_filters( 'the_content', $post->post_content ),
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php 632
'rendered' => apply_filters( 'the_content', $post->post_content ),
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 1933
$data['content']['rendered'] = post_password_required( $post ) ? '' : apply_filters( 'the_content', $post->post_content );
Where the hook is used in WordPress
wp-includes/blocks.php 2248
remove_filter( 'the_content', 'wpautop', $priority );
wp-includes/blocks.php 2249
add_filter( 'the_content', '_restore_wpautop_hook', $priority + 1 );
wp-includes/blocks.php 2268
add_filter( 'the_content', 'wpautop', $current_priority - 1 );
wp-includes/blocks.php 2269
remove_filter( 'the_content', '_restore_wpautop_hook', $current_priority );
wp-includes/class-wp-embed.php 33
add_filter( 'the_content', array( $this, 'run_shortcode' ), 8 );
wp-includes/class-wp-embed.php 41
add_filter( 'the_content', array( $this, 'autoembed' ), 8 );
wp-includes/default-filters.php 165
add_filter( $filter, 'capital_P_dangit', 11 );
wp-includes/default-filters.php 195
add_filter( 'the_content', 'do_blocks', 9 );
wp-includes/default-filters.php 196
add_filter( 'the_content', 'wptexturize' );
wp-includes/default-filters.php 197
add_filter( 'the_content', 'convert_smilies', 20 );
wp-includes/default-filters.php 198
add_filter( 'the_content', 'wpautop' );
wp-includes/default-filters.php 199
add_filter( 'the_content', 'shortcode_unautop' );
wp-includes/default-filters.php 200
add_filter( 'the_content', 'prepend_attachment' );
wp-includes/default-filters.php 201
add_filter( 'the_content', 'wp_replace_insecure_home_url' );
wp-includes/default-filters.php 202
add_filter( 'the_content', 'do_shortcode', 11 ); // AFTER wpautop().
wp-includes/default-filters.php 203
add_filter( 'the_content', 'wp_filter_content_tags', 12 ); // Runs after do_shortcode().
wp-includes/formatting.php 3956
$filter_image_removed = remove_filter( 'the_content', 'wp_filter_content_tags', 12 );
wp-includes/formatting.php 3962
$filter_block_removed = remove_filter( 'the_content', 'do_blocks', 9 );
wp-includes/formatting.php 3970
add_filter( 'the_content', 'do_blocks', 9 );
wp-includes/formatting.php 3979
add_filter( 'the_content', 'wp_filter_content_tags', 12 );
wp-includes/template-loader.php 86
remove_filter( 'the_content', 'prepend_attachment' );