so i want to add post programatically with my plugin, i write this code:
$my_post = array(
'post_title' => 'My post',
'post_content' => 'This is my post.',
'post_status' => 'draft',
'post_author' => get_current_user_id(),
'post_category' => array(1)
);
// Insert the post into the database
$post_id = wp_insert_post( $my_post );
and this is return post ID to variable but post doesnt show in wp admin posts table. WordPress is counting this like new post but doesnt show. Why?