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

What is a “protected” post status?

I noticed in the register_post_status function in core that there is an arg for ‘protected’. The following post statuses: ‘future’, ‘draft’, and ‘pending’ all have this set to true. I’m not talking about a protected ‘post’ but the ‘protected’ argument used when registering a custom post_status. What does this ‘protected’ status do? And why would … Read more