Hook Interceptor and Logger

A client of mine has hired me to fix the workflow of his assignment that included a social network plugin, custom premium theme and few other plugins + the existing work of his coder. All this mess took me 3 hours to navigate through and see what happens.

In addition to this – the social plugin was encrypted, therefore I was unable to grep for its hooks and where exactly does it do the changes. Long story short – it was modifying the results from calling the WP_Query instance. But there are lots of filters and actions related and I had to verify which one exactly caused the show.

WordPress Hook Sniffer is an awesome tool that did the work. It intercepts added and removed functions, the list and sequence of filters and actions, the source files in question. Also, this one is visible on every single page if you turn it on in screen mode so that you could check the actual stats.

If you have a slight idea of the cause of the problem, just lookup the name of the plugin, the filter, the action or anything you know. Follow the workflow, then remove filters or plugins to test the output. Or reassign / apply filters over the result in order to rewrite the previous behavior.

It’s all yours now, after you study your sniffer log and point the invader.

Leave a Reply

Your email address will not be published. Required fields are marked *