Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to transition_post_status instead of save_post #1

Merged
merged 7 commits into from
Dec 31, 2012

Conversation

ethitter
Copy link
Contributor

Scheduled posts don't get any love because the save_post action isn't fired by wp_transition_post_status().

Switching to the transition_post_status action instead of save_post fixes this problem. Since that action provides the old and new statuses, it also eliminates the need for get_post_status() and lets you move the status check logic to the start of the function. Autosave doesn't trigger either, so that check can be eliminated.

I love the plugin, but my scheduled posts weren't feeling the love.

@ethitter
Copy link
Contributor Author

And for consistency, there's a support forum post for this too: http://wordpress.org/support/topic/url-isnt-generated-for-a-scheduled-post

@ghost ghost assigned norcross Dec 31, 2012
norcross added a commit that referenced this pull request Dec 31, 2012
Switch to transition_post_status instead of save_post props @ethitter
@norcross norcross merged commit 564c186 into norcross:master Dec 31, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants