WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about the_content

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/feed.php apply_filters 194 /**
* Retrieves the post content for feeds.
*
* @since 2.9.0
*
* @see get_the_content()
*
* @param string $feed_type The type of feed. rss2 | atom | rss | rdf
* @return string The filtered content.
*/
wp-includes/formatting.php apply_filters 3887 /**
* Generates an excerpt from the content, if needed.
*
* Returns a maximum of 55 words with an ellipsis appended if necessary.
*
* The 55 word limit can be modified by plugins/themes using the {@see 'excerpt_length'} filter
* The ' […]' string can be modified by plugins/themes using the {@see 'excerpt_more'} filter
*
* @since 1.5.0
* @since 5.2.0 Added the `$post` parameter.
*
* @param string $text Optional. The excerpt. If set to empty, an excerpt is generated.
* @param WP_Post|object|int $post Optional. WP_Post instance or Post ID/object. Default null.
* @return string The excerpt.
*/
wp-includes/post-template.php apply_filters 255 /**
* Filters the post content.
*
* @since 0.71
*
* @param string $content Content of the current post.
*/
wp-includes/comment.php apply_filters 2981 /**
* Performs trackbacks.
*
* @since 1.5.0
* @since 4.7.0 `$post` can be a WP_Post object.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int|WP_Post $post Post ID or object to do trackbacks on.
*/
wp-includes/blocks/post-content.php apply_filters 55 /**
* Renders the `core/post-content` block on the server.
*
* @param array $attributes Block attributes.
* @param string $content Block default content.
* @param WP_Block $block Block instance.
* @return string Returns the filtered post content of the current post.
*/
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php apply_filters 1857 /** This filter is documented in wp-includes/post-template.php */
'rendered' => apply_filters( 'get_the_guid', $post->guid, $post->ID ),
'raw' => $post->guid,
);
}

if ( rest_is_field_included( 'modified', $fields ) ) {
$data['modified'] = $this->prepare_date_response( $post->post_modified_gmt, $post->post_modified );
}

if ( rest_is_field_included( 'modified_gmt', $fields ) ) {
/*
* For drafts, `post_modified_gmt` may not be set (see `post_date_gmt` comments
* above). In this case, shim the value based on the `post_modified` field
* with the site's timezone offset applied.
*/
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php apply_filters 735 /**
* Prepares a single attachment output for response.
*
* @since 4.7.0
* @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support.
*
* @param WP_Post $item Attachment object.
* @param WP_REST_Request $request Request object.
* @return WP_REST_Response Response object.
*/
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php apply_filters 607 /**
* Prepares the revision for the REST response.
*
* @since 4.7.0
* @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support.
*
* @param WP_Post $item Post revision object.
* @param WP_REST_Request $request Request object.
* @return WP_REST_Response Response object.
*/
wp-content/themes/twentytwentyone/inc/template-functions.php apply_filters 401 /**
* Print the first instance of a block in the content, and then break away.
*
* @since Twenty Twenty-One 1.0
*
* @param string $block_name The full block type name, or a partial match.
* Example: `core/image`, `core-embed/*`.
* @param string|null $content The content to search in. Use null for get_the_content().
* @param int $instances How many instances of the block will be printed (max). Default 1.
* @return bool Returns true if a block was located & printed, otherwise false.
*/

Hook Parameters

Parameter Type Name Description
string $content Content of the current post.