List all callers

git-svn-id: https://develop.svn.wordpress.org/trunk@9886 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-11-25 22:17:55 +00:00
parent 351a57e3ba
commit 877a39eff7

View File

@ -960,19 +960,17 @@ class wpdb {
$bt = debug_backtrace();
$caller = '';
foreach ( (array) $bt as $trace ) {
if ( @$trace['class'] == __CLASS__ )
$bt = array_reverse( $bt );
foreach ( (array) $bt as $call ) {
if ( @$call['class'] == __CLASS__ )
continue;
elseif ( strtolower(@$trace['function']) == 'call_user_func_array' )
continue;
elseif ( strtolower(@$trace['function']) == 'apply_filters' )
continue;
elseif ( strtolower(@$trace['function']) == 'do_action' )
continue;
$caller = $trace['function'];
break;
$function = $call['function'];
if ( isset( $call['class'] ) )
$function = $call['class'] . "->$function";
$caller[] = $function;
}
$caller = join( ', ', $caller );
return $caller;
}