Title: Hikari Hooks Troubleshooter
Author: shidouhikari
Published: <strong>April 10, 2010</strong>
Last modified: April 10, 2010

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/hikari-hooks.svg)

# Hikari Hooks Troubleshooter

 By [shidouhikari](https://profiles.wordpress.org/shidouhikari/)

[Download](https://downloads.wordpress.org/plugin/hikari-hooks.zip)

 * [Details](https://wordpress.org/plugins/hikari-hooks/#description)
 * [Reviews](https://wordpress.org/plugins/hikari-hooks/#reviews)
 *  [Installation](https://wordpress.org/plugins/hikari-hooks/#installation)
 * [Development](https://wordpress.org/plugins/hikari-hooks/#developers)

 [Support](https://wordpress.org/support/plugin/hikari-hooks/)

## Description

**Hikari Hooks Troubleshooter** creates a _draggable window_ with informations about
WordPress hooks. It lists all _hooks_ (actions and filters) that have at least a
function hooked to them, and for each hook there’s a list of _hooked functions_,
sorted by _priority_!

The window is visible only to registered users, and **you can choose who will be
able to see it**, and set if it should be visible or not. It works in WordPress 
page, be it frontend or admin area.

When you are in an admin page, it also shows a list of special actions related to
that specific page, helping plugin developers to attach features only to special
admin pages, instead of the whole admin area! A list of all _conditional tags_ is
also available, informing which tags return true and which ones return false, for
any page you want!

The list of conditional tags and hooks is based on [Frank Bueltge](http://bueltge.de)‘
s [wp_view_type.php](http://bueltge.de/wordpress-theme-debuggen/536/). The original
code was translated from germany to english, and ported to a draggable window that
can be moved inside the browser, minimized and closed.

The list of admin actions is based on [Dustin Dempsey](http://playforward.net)‘s
Show Page Hooks plugin, and a few more hooks were added.

#### Features

 * The plugin creates a window, that can be dragged, minimized and closed
 * The window works both in website’s admin panel and frontend
 * You can choose who can see the window, while visitors never see it

The window presents many useful information for plugin developers:

 * action and filter hooks, and functions hooked to them, sorted by the priority
   they are called
 * all conditional tags, informing those returning _true_ and those returning _false_
 * all actions present in admin pages, that are specific to each page, so that we
   can hook features that we want to happen only on those specific pages
 * actions that were run are flagged so, allowing you to know which actions are 
   used in each specific page

## Screenshots

[⌊The begining of the draggable window, with the list of admin actions that's only
shown in admin pages⌉⌊The begining of the draggable window, with the list of admin
actions that's only shown in admin pages⌉[

The begining of the draggable window, with the list of admin actions that’s only
shown in admin pages

[⌊Conditional tags, here you can see in one place all tags that will return true
in current page⌉⌊Conditional tags, here you can see in one place all tags that will
return true in current page⌉[

Conditional tags, here you can see in one place all tags that will return true in
current page

[⌊Begining of the huge list of actions and filters hooks⌉⌊Begining of the huge list
of actions and filters hooks⌉[

Begining of the huge list of actions and filters hooks

[⌊The probably most popular hook, the all powerful 'the_content' filter, with part
of the many functions hooked to it⌉⌊The probably most popular hook, the all powerful'
the_content' filter, with part of the many functions hooked to it⌉[

The probably most popular hook, the all powerful `'the_content'` filter, with part
of the many functions hooked to it

[⌊Another very popular hook, the 'wp_head' action, with the flag "ran", pointing
out it was run in that page⌉⌊Another very popular hook, the 'wp_head' action, with
the flag "ran", pointing out it was run in that page⌉[

Another very popular hook, the `'wp_head'` action, with the flag “_ran_“, pointing
out it was run in that page

[⌊The end of the window, with wow 432 hooks! That's LARGE!!⌉⌊The end of the window,
with wow 432 hooks! That's LARGE!!⌉[

The end of the window, with wow 432 hooks! That’s LARGE!!

## Installation

**Hikari Hooks Troubleshooter** requires at least _WordPress 2.8_ and _PHP5_ to 
work.

You can use the built in installer and upgrader, or you can install the plugin manually.

 1. Download the zip file, upload it to your server and extract all its content to 
    your `/wp-content/plugins` folder. Make sure the plugin has its own folder (for
    exemple `/wp-content/plugins/hikari-hooks/`).
 2. Activate the plugin through the ‘Plugins’ menu in WordPress admin page.
 3. Instantly the window will start appearing, by default only for administrators (`'
    edit_plugins'` capability)
 4. Go to plugin admin page and you can disable and reenable the window, and choose
    who is able to see it

#### Upgrading

If you have to upgrade manually, simply delete `hikari-hooks` folder and follow 
installation steps again.

#### Uninstalling

If you go to plugins list page and deactivate the plugin, it’s configs stored in
database will remain stored and won’t be deleted.

If you want to fully uninstall the plugin and clean up database, go to its options
page and use its uninstall feature. This feature deletes all stored options, restoring
them to default (which can also be used if you want defaults restored back), and
then gives you direct link to securely deactive the plugin so that no database data
remains stored.

## FAQ

#### 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.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Hikari Hooks Troubleshooter” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ shidouhikari ](https://profiles.wordpress.org/shidouhikari/)

[Translate “Hikari Hooks Troubleshooter” into your language.](https://translate.wordpress.org/projects/wp-plugins/hikari-hooks)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/hikari-hooks/), check
out the [SVN repository](https://plugins.svn.wordpress.org/hikari-hooks/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/hikari-hooks/) by
[RSS](https://plugins.trac.wordpress.org/log/hikari-hooks/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.01.06

 * Fixed a typo that blocked the plugin to work in Unix systems.

#### 0.01

 * First public release.

## Meta

 *  Version **0.01.06**
 *  Last updated **16 years ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 2.8.0 or higher **
 *  Tested up to **2.9.2**
 * Tags
 * [Action](https://wordpress.org/plugins/tags/action/)[admin](https://wordpress.org/plugins/tags/admin/)
   [capability](https://wordpress.org/plugins/tags/capability/)[debug](https://wordpress.org/plugins/tags/debug/)
   [developer](https://wordpress.org/plugins/tags/developer/)[drag](https://wordpress.org/plugins/tags/drag/)
   [draggable](https://wordpress.org/plugins/tags/draggable/)[filter](https://wordpress.org/plugins/tags/filter/)
   [Hook](https://wordpress.org/plugins/tags/hook/)[javascript](https://wordpress.org/plugins/tags/javascript/)
   [role](https://wordpress.org/plugins/tags/role/)[tool](https://wordpress.org/plugins/tags/tool/)
   [troubleshoot](https://wordpress.org/plugins/tags/troubleshoot/)[window](https://wordpress.org/plugins/tags/window/)
 *  [Advanced View](https://wordpress.org/plugins/hikari-hooks/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/hikari-hooks/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/hikari-hooks/reviews/)

## Contributors

 *   [ shidouhikari ](https://profiles.wordpress.org/shidouhikari/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/hikari-hooks/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://Hikari.ws/wordpress/#donate)