Last active
August 29, 2015 13:57
-
-
Save TikiTDO/9460944 to your computer and use it in GitHub Desktop.
WordPress apply_filter 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 Filter 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_ ) { | |
if ($tag == 'init') { | |
$func = $the_['function']; | |
if (is_string($func)) _logt($func); | |
else _logt('*** ' . get_class($func[0]) . ' ' . $func[1]); | |
_logup(); | |
} | |
if ( !is_null($the_['function']) ){ | |
$args[1] = $value; | |
$value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); | |
} | |
if ($tag == 'init') { | |
_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