Removing all actions except some actions needed on current page.
After googling and tweaking for a while, I finally found a way:
- Apparently, all hooks are available on
- Actions are stored in multidimensional array based on priority. Try
- Hook early, then loop the actions to
remove_action()-ing it. Make a whitelist to prevent some actions from being removed
Here’s the essence of how to do it. I’m extracting this from the plugin I mention above:
I hope this one is useful for you 😀