On: 2006/05/16 Viewed: 5246 times

Basically, a plugin for Wordpress creates a PHP function (a filter or an action) which is called when a particular event (a hook) occurs, for example when a post is printed or when a comment is posted (for more info about hooks, filters and action, check the Codex)

When developping a new plugin, you sometimes encounter unexpected behaviors from your code, which can originate from a filter conflict : another PHP function with a higher priority was triggered before your own function, and processed the same bits you’re trying to pass through your function.

That’s why when developping plugins, it’s important to be well aware of what I call the Filter Flow : for each hook, which functions are called in which order ?

So, I wrote this script : Wordpress Hooks & Filters Flow

List hooks and current filters

Wordpress Hooks and Filters Flow The script runs in your Wordpress root (or in /wp-admin/ if you prefer) and enumerates filters that are loaded in your blog. Hooks are displayed alphabetically, and for each hook, active filters (or actions, they’re the same) are listed in their execution order, which is either defined by their priority or by their loading order. The purpose of such a list is to help hunt plugin bugs down, and let you wisely fine-tune plugin priorities if needed.

Get the script

Put the script in your wordpress root or in ‘/wp-admin/‘ and you’re done.

Feedback

Only if it’s to say “woohoo it’s cool”. No support or troubleshooting with your plugin problems. These are your plugin problems :)

Related posts

Metastuff

This page "Wordpress Hooks & Filters Flow" was posted on 16/05/2006 at 9:38 pm
Watch this discussion : Comments RSS 2.0. You can trackback this post from your own site

3 Blablas

  1. 1
    LetsBlogSpam India »
    commented, on 11/May/07 at 3:00 pm # :

    Hey its iss great work, but If I can suggest, you need to hook a menu to admin somewhere, it will make easy and accessible for layman :)

  2. 2
    WP Plugins DB » Plugin Details &ra... United States »
    pingback on 18/Jul/07 at 1:34 pm # :

    [...] Visit [...]

  3. 3
    Massimo Italy »
    wrote, on 16/Jun/08 at 6:27 pm # :

    Useful tool! “woohoo it’s cool”…

Leave a Reply

Comment Guidelines or Die

  • HTML: You can use these tags: <a href=""> <em> <i> <b> <strong> <blockquote>
  • Posting code: Post raw code (no <> &lt; etc) within appropriate tags : [php][/php], [css][/css], [html][/html], [js][/js], [sql][/sql], [xml][/xml], or generic [code][code]
  • Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar.
  • Spam: Various spam plugins on patrol. I'll put pins in a Voodoo doll if you spam me.
  • I will mark as Spam test comments, all comments with SEO names (ie "My Cool Online Shop" instead of "Joe") or containing forum-like signatures.

Close
E-mail It