save_status_pre firing at wrong time
-
On line 497 of wp-admin/post.php the status_save_pre filter is applied. After that filter is applied, a number of things are done to the post status by post.php.
Of specific interest to me is the fact that the “future” status will never be passed to status_save_pre filters because it’s not determined to be “future” until after the post status is filtered.
The post is only converted to “future” if it is a “published” post. “Private” posts do not get that treatment (I think this is the right way to do it), but I’m developing a plug-in to allow for private posts (wp-sentry) and this behavior is breaking future posts.
The filter only gets “published” or “private” — if the plugin forces the post from “published” to “private” it won’t be set to “future”.
Better behavior would be to call the filter (or add another filter) before the post save to allow plugins to respect future posts and differentiate between them and other private posts.
- The topic ‘save_status_pre firing at wrong time’ is closed to new replies.