Delete schedule date/time when changing an article from Scheduled to Draft or Pending
|Reported by:||bi0xid||Owned by:|
If you have a post scheduled ( post_status=future ) and you change it again to draft or pending revision, it maintains the programming schedule. It makes this post always scheduled and it will be impossible to publish it whenever you want clicking on the Publish button, forcing you to program this article to publish in the future.
It might be interesting to revoke the schedule status completely, including the date, when changing the post status. For that, we need to do a
`wp_posts` SET `post_date_gmt` = '0000-00-00 00:00:00' WHERE `wp_posts`.`ID` = $post_id;
It might be interesting too to have a possibility to get rid of the schedule when editing the date and time of publishing, not only changing it.