I’m trying to do something when a category is added to post and saved. I thought that using the save_post
hook would have registered when a category is added to a post, but it doesn’t appear to.
When I edit a post and do nothing but change the categories for the post, I don’t get the save_post
hook fired (editing the title, body, etc fires the save_post
hook successfully). Is there another way to use add_action
/add_filter
to detect when a category is added to a post?
You may want to try:
You can find it under this Docs and the action is located at wp-includes/taxonomy.php
The code above isn’t tested but I think you get the point.