Home > Featured, Geeky > Aiding WordPress devs - filter reference

Aiding WordPress devs - filter reference

September 3rd, 2008

WordPress development, on a whole, is pretty simple. As someone who has come from a background working with IPB and a little bit of phpBB I was quite amazed at how unusual it is to edit the “core” WordPress files - those which are outside the wp-content folder and are distributed each release.

Instead WordPress relies on hooks that are either filters (which change something) or actions (which do something). These are quite simply littered throughout the code and any plugin can jump on these to do whatever is needed by the developer. However, the problem I’ve found is a lack of trying to find the right hook for the job. PHPXref, which is excellent for finding functions and variables doesn’t have the ability to find a hook which is usually in the format of:
do_action('name', $vars); or apply_filters('loginout', $output);

The Codex has some information for filters and action reference but by far the best site I’ve found so far is the hooks database. This has up-to-date lists of all hooks throughout WordPress and would be a lifesaver for most developers.

Today I thought of a different way of displaying all this information which could be a lot more useful in practice. This would display filters (and possibly actions) when the cursor is hovered over the relevant area. In theory it would allow people to find out what hook they needed to use when trying to customise a particular area.

I’ve given it a try and now have the main page filters in a way that might be somewhat useful.

It will depend on feedback as whether or not I do this for other pages so if you like it then let me know!

Featured, Geeky , ,

  1. November 6th, 2008 at 03:07 | #1

    to be truly surprised and pleased:) Do not be believed, that even this happens:)

  1. No trackbacks yet.