I am creating a new post using the wp_insert_post
function. Here's what that code looks like:
$new_post = array(
'post_title' => $newtitle,
'post_status' => 'publish',
'post_content' => $repost[content],
'post_excerpt' => $repost[excerpt],
'post_author' => 1,
'post_type' => 'post',
'post_category' => explode(",",$catlist),
);
wp_insert_post($new_post);
The post is created fine, but I'd like to fire some other functions, such as Jetpack's social posting tools (Publicize.) Is there code to do that or would I be better in changing the post_status to draft and setting a future publishing date?