WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm about to create a very simple logging plugin.

Every time an action or filter is fired I need to log it to the file. The idea is that we will be able to see exactly which actions and filters are executed (and functions they run) for every page load. This includes the order that they run in.

share|improve this question
You might want to check out the Debug Bar Actions and Filters Addon (wordpress.org/plugins/debug-bar-actions-and-filters-addon) to see how they handle it. – sabreuse Sep 25 '13 at 13:33
up vote 1 down vote accepted

The callbacks hooked onto 'all' are called prior to the callbacks for any hook (action and filters) being called. (See source)

add_action( 'all', 'wpse115617_all_hooks' );

function wpse115617_all_hooks(){
   //This is called for every filter & action

   //You can get the current hook to which it belongs with:
   $hook = current_filter();


See http://queryposts.com/function/current_filter/

share|improve this answer
thank you very much, Stephen! – Alex Herrmann Sep 25 '13 at 14:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.