Description
'all' hook looking for the defined string BW_TRACE_STRINGWATCHIf found in the output buffer or in the trace input then it will produce a trace and backtrace and either echo or defer the echoing until it's a bit safer.
Usage
bw_trace_stringwatch( $tag, $arg2 );Parameters
- $tag
- ( string ) required – the hook or filter being invoked
- $arg2
- ( mixed ) optional – first parameter to the action hook or filter
Returns
voidTO DO
If it's hidden inside a call to bw_echo() we should be able to cater for this within bw_echo()Source
File name: oik-bwtrace/includes/bwtrace-stringwatch.phpLines:
1 to 19 of 19
function bw_trace_stringwatch( $tag, $arg2=null ) { static $found_in = null; $type = bw_trace_get_hook_type( $tag ); if ( $type === "action" ) { bw_trace_stringwatch_echo( $type ); } if ( null === $found_in ) { if ( $type == "filter" ) { if ( is_string( $arg2 ) ) { $found_in = bw_trace_stringwatch_filter( $arg2, $tag, $type ); } else { // Defer watching until it's a scalar } } else { $buffer = ob_get_contents(); $found_in = bw_trace_stringwatch_filter( $buffer, $tag, $type ); } } }View on GitHub View on Trac
Called by
1 to 2 of 2
Calls
1 to 3 of 3
Call hooks
API Letters:
