Pre-filling custom fields on New Post

I’d like to have a number of custom fields automatically added and pre-filled (with a static default value) when a user opens the ‘Add New Post’ page in the admin panel to create a new post. The point is to have the custom fields already set with a default value so the person adding the article can see them and modify the values if needed.

I’ve looked through the hooks but I can’t find any suitable one. I’m also not sure how to go about pre-populating the custom fields section in the new post form. Any ideas?

Solutions Collecting From Web of "Pre-filling custom fields on New Post"

Here’s one way to have a custom field, already added and visible, for new posts:

/**
 * Preset a custom field for new posts
 *
 * @link http://wordpress.stackexchange.com/a/200554/26350
 */
add_action( 'save_post_post', function( $post_ID, $post, $update )
{
    if( 
            is_a( $post, '\WP_Post' )
        &&  'auto-draft' === $post->post_status
        &&  post_type_supports( $post->post_type, 'custom-fields' ) 
        && '0000-00-00 00:00:00' === $post->post_date_gmt 
        && $post_ID > 0
        && ! $update
    )
        add_post_meta( $post_ID, 'wpse_custom_field', '123' );

}, 10, 3 );

Here we use the save_post_{post-type} hook.

We will then see this on the Add New Post screen:

preset custom field

As mentioned in the comments by @Alpha_Hydrae and @MarkKaplun,
we should be able to simplify this to:

/**
 * Preset a custom field for new posts
 *
 * @link http://wordpress.stackexchange.com/a/200554/26350
 */
add_action( 'save_post_post', function( $post_ID )
{
    if( 'auto-draft' === get_post_status( $post_ID )
        &&  post_type_supports( get_post_type( $post_ID ), 'custom-fields' ) 
    )
        add_post_meta( $post_ID, 'wpse_custom_field', '123' );
} );