Changeset 42800
- Timestamp:
- 03/08/2018 05:07:04 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r42787 r42800 5367 5367 * @see https://core.trac.wordpress.org/ticket/19589 5368 5368 * 5369 * @staticvar array $truncate_paths Array of paths to truncate. 5370 * 5369 5371 * @param string $ignore_class Optional. A class to ignore all function calls within - useful 5370 5372 * when you want to just give info about the callee. Default null. … … 5377 5379 */ 5378 5380 function wp_debug_backtrace_summary( $ignore_class = null, $skip_frames = 0, $pretty = true ) { 5381 static $truncate_paths; 5382 5379 5383 if ( version_compare( PHP_VERSION, '5.2.5', '>=' ) ) { 5380 5384 $trace = debug_backtrace( false ); … … 5386 5390 $check_class = ! is_null( $ignore_class ); 5387 5391 $skip_frames++; // skip this function 5392 5393 if ( ! isset( $truncate_paths ) ) { 5394 $truncate_paths = array( 5395 wp_normalize_path( WP_CONTENT_DIR ), 5396 wp_normalize_path( ABSPATH ) 5397 ); 5398 } 5388 5399 5389 5400 foreach ( $trace as $call ) { … … 5400 5411 $caller[] = "{$call['function']}('{$call['args'][0]}')"; 5401 5412 } elseif ( in_array( $call['function'], array( 'include', 'include_once', 'require', 'require_once' ) ) ) { 5402 $caller[] = $call['function'] . "('" . str_replace( array( WP_CONTENT_DIR, ABSPATH ), '', $call['args'][0]) . "')";5413 $caller[] = $call['function'] . "('" . str_replace( $truncate_paths, '', wp_normalize_path( $call['args'][0] ) ) . "')"; 5403 5414 } else { 5404 5415 $caller[] = $call['function'];
Note: See TracChangeset
for help on using the changeset viewer.