Skip to content

Prioritize Hooks – my first WordPress plugin

Prioritize Hooks is a WordPress plugin which allows the overriding of the priority of various filters and actions hooked by plugins and themes.

I have been working on a niche plugin for WordPress to solve an annoying problem that I’ve encountered now and then when applying multiple filters via other plugins. Most filters and actions are registered to a hook with the WordPress default priority of 10. WordPress runs the callbacks on the same priority in a FIFO order. Sometimes it doesn’t matter, and then sometimes it does.

Particularly, the order does matter in adding goodies such as ads and author bio to content. By default the WP About Author plugin adds itself at the end of blog posts, followed by related posts by nrelate, and then lastly my page ad is tacked on with a quick plugin that I have written. I don’t want that order, I want the ad to show itself immediately at the bottom of my blog posts. My options: manually edit the priority for my Ad filter, or come up with a more general and tidy solution. Enter Prioritize Hooks.

Prioritize Hooks allows you to override a good deal of registered actions and filters in runtime via an admin page. No more tracking down hook registration via source files, no more having to re-edit source files after updates. Get Prioritize Hooks and put some order in your press.