Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Quick Edit – Save Data

function generatewp_quickedit_save_post( $post_id, $post ) {
    // if called by autosave, then bail here
    if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
        return;
 
    // if this "post" post type?
    if ( $post->post_type != 'post' )
        return;
         
    // does this user have permissions?
     if ( ! current_user_can( 'edit_post', $post_id ) )
         return;
     
    // update!
    if ( isset( $_POST['generatewp_edit_time'] ) ) {
        update_post_meta( $post_id, 'generatewp_edit_time', $_POST['generatewp_edit_time'] );
    }
}
add_action( 'save_post', 'generatewp_quickedit_save_post', 10, 2 );