default_title filter-hookWP 1.5.0

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

Usage

add_filter( 'default_title', 'wp_kama_default_title_filter', 10, 2 );

/**
 * Function for `default_title` filter-hook.
 * 
 * @param string  $post_title Default post title.
 * @param WP_Post $post       Post object.
 *
 * @return string
 */
function wp_kama_default_title_filter( $post_title, $post ){

	// filter...
	return $post_title;
}
$post_title(string)
Default post title.
$post(WP_Post)
Post object.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

get_default_post_to_edit()
default_title
wp-admin/includes/post.php 752
$post->post_title = (string) apply_filters( 'default_title', $post_title, $post );

Where the hook is used in WordPress

Usage not found.