Theres something strange in the neighborhood.. Seriously.. I think my wordpress is haunted. I've been working on a plugin that creates a post from a form and its been working fine for several weeks, submit the form, the post is published.
Now, bear in mind that Ive made no changes to the function that creates the post, everytime I submit the form the post is automatically scheduled.
Whats going on and what can I do to get it working normal again? Its super annoying.
-- UPDATE --
As requested te code that creates the post:
$new_post = array( 'comment_status' => 'open', 'ping_status' => 'open', 'post_title' => $productName, 'post_content' => $productDesc, 'post_status' => 'publish', 'post_date' => date('Y-m-d H:i:s'), 'post_author' => $currentUser, 'post_type' => 'products', 'post_category' => array(0) ); $post_id = wp_insert_post($new_post);