List all callers

git-svn-id: http://svn.automattic.com/wordpress/trunk@9886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-11-25 22:17:55 +00:00
parent 7f14907c42
commit 80f77982ca
1 changed files with 9 additions and 11 deletions

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;
}