wp_insert_post not inserting given comment_status
-
Heyo,
I’m having some problem with the wp_insert_post() function. I’m trying to save some new posts automatically and everything seems fine except for the ‘comment_status’. It just opens it, no matter what I enter before.
$wordpress_post_data = array( 'post_content' => $fb_content, 'post_name' => $fb_post_name, 'post_title' => $options['post_title'], 'post_status' => 'publish', 'post_author' => $options['post_user'], 'post_date' => $fb_created_time, 'post_date_gmt' => $fb_created_time, 'comment_status' => 'closed', 'post_category' => array($options['post_category']), 'tags_input' => $options['post_tags'] ); return $wordpress_post_data;
The topic ‘wp_insert_post not inserting given comment_status’ is closed to new replies.