public
Last active

Plugin All Actions List

  • Download Gist
all-actions-list.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
<?php # -*- coding: utf-8 -*-
/*
Plugin Name: All Actions List
Description: Lists all actions run during one request.
Version: 1.0
Required: 3.1
Author: Thomas Scholz
Author URI: http://toscho.de
License: GPL
*/
! defined( 'ABSPATH' ) and exit;
 
add_action( 'all', 'aal_handler', 99999, 99 );
 
function aal_handler()
{
static $list = array ();
$exclude = array ( 'gettext', 'gettext_with_context' );
 
$action = current_filter();
$args = func_get_args();
 
if ( ! in_array( $action, $exclude ) )
{
$list[] = $action;
}
 
// shutdown is the last action
if ( 'shutdown' == $action )
{
print '<pre>' . implode( "\n", $list ) . '</pre>';
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.