Last active
August 29, 2015 13:56
-
-
Save TikiTDO/9142768 to your computer and use it in GitHub Desktop.
WordPress do_actions profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
do { | |
_logt("Start Action Tag: $tag"); | |
_logup(); | |
$t_count = 1; | |
foreach ( (array) current($wp_filter[$tag]) as $the_ ) { | |
//$func = $the_['function']; | |
//if (is_string($func)) _log(" " . $func); | |
//else _log(' *** ' . get_class($func[0]) . ' ' . $func[1]); | |
} | |
foreach ( (array) current($wp_filter[$tag]) as $the_ ) { | |
$critical_tag = 'wp_loaded'; | |
if ($tag == $critical_tag) { | |
$func = $the_['function']; | |
if (is_string($func)) _logt($func); | |
else _logt('*** ' . get_class($func[0]) . ' ' . $func[1]); | |
_logup(); | |
} | |
if ( !is_null($the_['function']) ) | |
call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); | |
if ($tag == $critical_tag) { | |
_logdown(); | |
_logt('exit'); | |
} | |
} | |
_logdown(); | |
_logt("End Tag: $tag"); | |
} while ( next($wp_filter[$tag]) !== false ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment