Make WordPress Core


Ignore:
Timestamp:
11/25/2008 10:17:55 PM (17 years ago)
Author:
ryan
Message:

List all callers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-db.php

    r9204 r9886  
    961961        $caller = '';
    962962
    963         foreach ( (array) $bt as $trace ) {
    964             if ( @$trace['class'] == __CLASS__ )
     963        $bt = array_reverse( $bt );
     964        foreach ( (array) $bt as $call ) {
     965            if ( @$call['class'] == __CLASS__ )
    965966                continue;
    966             elseif ( strtolower(@$trace['function']) == 'call_user_func_array' )
    967                 continue;
    968             elseif ( strtolower(@$trace['function']) == 'apply_filters' )
    969                 continue;
    970             elseif ( strtolower(@$trace['function']) == 'do_action' )
    971                 continue;
    972 
    973             $caller = $trace['function'];
    974             break;
    975         }
     967            $function = $call['function'];
     968            if ( isset( $call['class'] ) )
     969                $function = $call['class'] . "->$function";
     970            $caller[] = $function;
     971        }
     972        $caller = join( ', ', $caller );
     973
    976974        return $caller;
    977975    }
Note: See TracChangeset for help on using the changeset viewer.