-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add an action to signal processing co-author has finished #1053
base: develop
Are you sure you want to change the base?
Conversation
I am not sure who I should tag but @GaryJones, what would you think? :) |
This can easily be solved by adding your hook to a later priority: add_action('save_post', 'savePost', 20, 2 ); I don't see a strong reason for a hook. But I'm also not strongly against it. But in that case, the hook should live in the |
I'm sorry for not getting back to you sooner. Well, adding at a lower priority is always an option. Still, you're then never really sure if cap has run already. Adding a specific hook would allow you to hook into the action itself. Moving to How about df1c289? |
Hi @oekeur
Why not? You are. If the plugin is enabled you know that the CAP filter has already been fired. There's no doubt about that. I'm struggling to see a good justification for this new hook. All the methods used in that callback are public, like If there was something that could only checked in that context, and we wanted to run something conditionally, it would make sense to add a hook inside that condition. But not only all the conditions are easily to check from outside of that context, you added the hook after the |
Description
Adds a (partly) solution for #1024. Which we also encounter at our company.
We sync posts to an external database secondary database, so we need to know when all data has been updated.
Because CAP saves co-authors with CPTs and metadata, the authors are updated only after save_post has finished.
It's counter-intuitive from a user perspective but logical from the architecture perspective.
This PR adds an action to explicitly signal when CAP has finished processing, allowing it to hook into that, for example, when syncing to external systems.
Deploy Notes
❌
Steps to Test
Minimal reproduction