default_content filter-hookWP 1.5.0

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

Usage

add_filter( 'default_content', 'wp_kama_default_content_filter', 10, 2 );

/**
 * Function for `default_content` filter-hook.
 * 
 * @param string  $post_content Default post content.
 * @param WP_Post $post         Post object.
 *
 * @return string
 */
function wp_kama_default_content_filter( $post_content, $post ){

	// filter...
	return $post_content;
}
$post_content(string)
Default post content.
$post(WP_Post)
Post object.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

get_default_post_to_edit()
default_content
wp-admin/includes/post.php 808
$post->post_content = (string) apply_filters( 'default_content', $post_content, $post );

Where the hook is used in WordPress

Usage not found.