In wordpress set default title when creating a record?

1) As wordpress set default title when creating a record ?
2) And how can I change the text ? Now is guttenberg and the placeholder "add title". How to change it, for example, "my header" ?
April 3rd 20 at 18:44
1 answer
April 3rd 20 at 18:46
Solution
I found the answers
1)
// Set the default title
my_default_title function() {
 global $post_type;
 if ( $post_type == 'post' ) {
 return 'My title';
}
}
add_filter( 'default_title', 'my_default_title' );

2)
// change the title
my_change_title_here function( $placeholder_new_text ) {
 $screen = get_current_screen();
 if ( $screen->post_type == "post" ) {
 $placeholder_new_text = "Specify my title";
}
 return $placeholder_new_text;
}
add_filter( "enter_title_here", "my_change_title_here" );

Find more questions by tags WordPress