Why doesn’t wp_update_post() update the post_status field?
I’m using this bit to insert/update a custom post type from the front-end. The date is set from a custom jquery datepicker. if (strtotime($date) < strtotime(‘tomorrow’)) { $newpostdata[‘post_status’] = ‘publish’; } elseif (strtotime($date) > strtotime(‘today’)) { $newpostdata[‘post_status’] = ‘future’; $newpostdata[‘post_date’] = date(‘Y-m-d H:i:s’, strtotime($date)); } if (‘insert’ == $operation) { $err = wp_insert_post($newpostdata, true); } … Read more