wp_debug_backtrace_summary [ WordPress Function ]
wp_debug_backtrace_summary ( $ignore_class = null, $skip_frames = 0, $pretty = true )
| Parameters: |
|
| Links: | |
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wpmu_activate_signup, wpmu_create_user, wp_debug_mode, wp_update_user, wp_update_category
Return a comma separated string of functions that have been called to get to the current point in code.
Source
<?php
function wp_debug_backtrace_summary( $ignore_class = null, $skip_frames = 0, $pretty = true ) {
$trace = debug_backtrace( false );
$caller = array();
$check_class = ! is_null( $ignore_class );
$skip_frames++; // skip this function
foreach ( $trace as $call ) {
if ( $skip_frames > 0 ) {
$skip_frames--;
} elseif ( isset( $call['class'] ) ) {
if ( $check_class && $ignore_class == $call['class'] )
continue; // Filter out calls
$caller[] = "{$call['class']}{$call['type']}{$call['function']}";
} else {
if ( in_array( $call['function'], array( 'do_action', 'apply_filters' ) ) ) {
$caller[] = "{$call['function']}('{$call['args'][0]}')";
} elseif ( in_array( $call['function'], array( 'include', 'include_once', 'require', 'require_once' ) ) ) {
$caller[] = $call['function'] . "('" . str_replace( array( WP_CONTENT_DIR, ABSPATH ) , '', $call['args'][0] ) . "')";
} else {
$caller[] = $call['function'];
}
}
}
if ( $pretty )
return join( ', ', array_reverse( $caller ) );
else
return $caller;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Tracing things back to where they came from « westi on wordpress
Jan 28, 2012 ... So today I have introduced wp_debug_backtrace_summary( $ignore_class = null , $skip_frames = 0, $pretty = true ) for #19589. If you provide ...
westi.wordpress.com - wordpress « westi on wordpress
Jan 28, 2012 ... So today I have introduced wp_debug_backtrace_summary( $ignore_class = null , $skip_frames = 0, $pretty = true ) for #19589. If you provide ...
westi.wordpress.com - #19589 (Simplify the recording of backtraces) – WordPress Trac
simpler-backtraces-core.diff · Download (2.2 KB) - added by westi 5 months ago. Implementation of a new wp_debug_backtrace_summary() function ...
core.trac.wordpress.org - PHPXRef 0.7 : WordPress : Detail view of functions.php
wp_find_hierarchy_loop() wp_find_hierarchy_loop_tortoise_hare() send_frame_options_header() wp_allowed_protocols() wp_debug_backtrace_summary() ...
phpxref.ftwr.co.uk