Suggestion for backdated posts
-
Hi,
I develop the plugin Einsatzverwaltung, and you were in contact with a user of that plugin in the past, about auto-tweet not working. I think I might have a solution for you.
Just as a bit of background: The user of my plugin received the answer that this would be due to the difference in seconds between
post_date
andpost_modified
. While this can be the case, more often than not these dates will differ by several hours or even days. Because these CPTs describe recent events and they should appear chronologically correct between the other post types, thepost_date
gets backdated upon publication.As far as I can tell, backdated posts are only accepted if the publication date was modified manually (i.e.
$_POST['edit_date']
is set). While checking the logic if something is being published for the first time, I could not help but think if using transition_post_status would make things easier. One comment readscan't catch posts that were set to a past date as a draft, then published
, which should be perfectly fine with the mentioned hook as well.What do you think?
Cheers,
Andreas
- The topic ‘Suggestion for backdated posts’ is closed to new replies.