Is there one way to hook when someone enters on “Create Post Page” (Not update post page) and pre-fill title and body fields?
Something like:
add_filter( 'WP_FILTER_ENTERS_CREATE_POST_PAGE', 'my_function_callback' )
function my_function_callback() {
# dummy title
$title = 'My Post Tile';
# dummy post content
$post_body = '<p>Hi it is post body</p>';
# set editor content
wp_editor( $postBody, 'my_editor_id'); // not sure
# set post title
???????
}
Thanks in advance!:)
After a search in Codex https://codex.wordpress.org/Plugin_API/Filter_Reference i found “default_content” and “default_title” filters that are exactly that i looking for!
after this… when open wp-admin/post-new.php the title input field and editor content appears filled with default values.