I'm inserting information from a user into a custom post type.
$current_user it a user-object.
Is there anything special I have to think of when setting
post_date_gmt when inserting a new post with wp_insert_post? (Or could I just fetch the value from the user-table like below?
$pupil = array( 'post_title' => $current_user->display_name, 'post_date' => $current_user->user_registered, 'post_date_gmt' => $current_user->user_registered, 'post_type' => 'pupil', 'post_status' => 'private', //This registration cpt is not available for public 'post_author' => $current_user->ID ); $postid_pupil = wp_insert_post( $pupil )