WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Hikari Hooks Troubleshooter

Creates a draggable window with informations about all functions hooked to WordPress actions and filters.

Will my visitors see this reporting window? Should I use the plugin only in development environments?

Just logoff and you'll see. Unregistered users never see it, and you can choose which registered users can see it, based on WordPress capability system.

Great, it lists hundreds of hooks... where are all others?

It only shows hooks that have at least 1 function hooked to them, it seems WordPress is not aware of a hook until something is hooked to it.

How is the list sorted?

When a hook is run, functions hooked to it are called based in priority, assigned when the hooking is done; therefore, functions of a hook are listed based on this priority. The list of hooks seems to be random, I'm not sure.

Can't you separate actions and filters in the list? Why do you show actions that were run and don't show run filters?

WordPress stores actions and filters in the same place, without distinguishing them. Indeed, in some codes WordPress treats actions as filters!

The biggest difference from action to filter is that filters are required to pass at least a parameter (the content to be filtered) to functions hooked to them, and expect to receive a variable returned (the content, possibly altered by the filter), while actions aren't forced to pass parameters and never return a variable.

What really distinguish action from filter is the functions used to deal with them, which are different. And as I could learn, the only way WordPress provides to find out if a hook is an action or a filter, is the function did_action($action_tag). But even this function, it returns true if the hook is an action and was executed. If the hook is a filter, or if it's an unused action, the function returns false, so we can't even distinguish these 2 cases.

Of course I'm not a WordPress hooks system expert, although I love it. If you know a better way to know if a hook is action or filter, and know if it was run, please contact me :)

Can't the state of the window be saved, so that it stops opening always in the same place, and I can move it to the place I want it to open?

The original code couldn't. I adapted the window to work inside FireFox's extension GreaseMonkey and implemented the feature. When I ported it to use in this plugin, I had to remove the feature because didn't have time to port the feature. I plan to make the port in the future, probably using cookies.

The window's height is absurdly large, can't you limit it and use some sliding bar?

I plan to enhance this draggable window, I just employed it in this project and it has some more nice feature that weren't used. When I have the time I wanna make some improvements that will make it easier to be ported and consumed by other developers, as a small lib. For now it's only an idea and I didn't wanna spend much time working on it for now.

There's a better way to list hooks. You are missing a conditional tag or an admin action.

Just contact me adding a comment in the plugin page and I'll add it. Any feature that may be useful I can add too.

Requires: 2.8.0 or higher
Compatible up to: 2.9.2
Last Updated: 2010-4-10
Downloads: 734

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1
100,1,1
100,1,1