List all callers
git-svn-id: http://svn.automattic.com/wordpress/trunk@9886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7f14907c42
commit
80f77982ca
|
@ -960,19 +960,17 @@ class wpdb {
|
||||||
$bt = debug_backtrace();
|
$bt = debug_backtrace();
|
||||||
$caller = '';
|
$caller = '';
|
||||||
|
|
||||||
foreach ( (array) $bt as $trace ) {
|
$bt = array_reverse( $bt );
|
||||||
if ( @$trace['class'] == __CLASS__ )
|
foreach ( (array) $bt as $call ) {
|
||||||
|
if ( @$call['class'] == __CLASS__ )
|
||||||
continue;
|
continue;
|
||||||
elseif ( strtolower(@$trace['function']) == 'call_user_func_array' )
|
$function = $call['function'];
|
||||||
continue;
|
if ( isset( $call['class'] ) )
|
||||||
elseif ( strtolower(@$trace['function']) == 'apply_filters' )
|
$function = $call['class'] . "->$function";
|
||||||
continue;
|
$caller[] = $function;
|
||||||
elseif ( strtolower(@$trace['function']) == 'do_action' )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
$caller = $trace['function'];
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
$caller = join( ', ', $caller );
|
||||||
|
|
||||||
return $caller;
|
return $caller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue