mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 21:28:02 +01:00
List all callers
git-svn-id: https://develop.svn.wordpress.org/trunk@9886 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
351a57e3ba
commit
877a39eff7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user