default_excerpt filter-hookWP 1.5.0

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

Usage

add_filter( 'default_excerpt', 'wp_kama_default_excerpt_filter', 10, 2 );

/**
 * Function for `default_excerpt` filter-hook.
 * 
 * @param string  $post_excerpt Default post excerpt.
 * @param WP_Post $post         Post object.
 *
 * @return string
 */
function wp_kama_default_excerpt_filter( $post_excerpt, $post ){

	// filter...
	return $post_excerpt;
}
$post_excerpt(string)
Default post excerpt.
$post(WP_Post)
Post object.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

get_default_post_to_edit()
default_excerpt
wp-admin/includes/post.php 762
$post->post_excerpt = (string) apply_filters( 'default_excerpt', $post_excerpt, $post );

Where the hook is used in WordPress

Usage not found.