W3cubDocs

/WordPress

apply_filters( ‘default_excerpt’, string $post_excerpt, WP_Post $post )

Filters the default post excerpt initially used in the “Write Post” form.

Parameters

$post_excerptstring
Default post excerpt.
$postWP_Post
Post object.

Source

$post->post_excerpt = (string) apply_filters( 'default_excerpt', $post_excerpt, $post );

Changelog

Version Description
1.5.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/default_excerpt