Description
Programmatically enable tracingNote: bw_trace(), bw_trace2() and bw_backtrace() call lazy functions that are not loaded until trace is first turned on. The global variable $bw_trace_on should not be set to true manually.
Usage
bw_trace_on( $default_options );Parameters
- $default_options
- ( bool ) optional – true if default options are to be set
Returns
voidSource
File name: oik-bwtrace/includes/bwtrace.phpLines:
1 to 22 of 22
function bw_trace_on( $default_options=false ) { global $bw_trace_on, $bw_trace; $bw_trace_on = TRUE; if ( $bw_trace ) { $bw_trace->trace_on(); } if ( $default_options ) { global $bw_include_trace_count, $bw_include_trace_date, $bw_trace_anonymous, $bw_trace_memory, $bw_trace_post_id, $bw_trace_num_queries; global $bw_trace_current_filter; global $bw_trace_file_count; $bw_include_trace_count = true; $bw_include_trace_date = true; $bw_trace_anonymous = false; $bw_trace_memory = false; $bw_trace_post_id = false; $bw_trace_num_queries = false; $bw_trace_current_filter = true; $bw_trace_file_count = true; } }View on GitHub View on Trac
Called by
1 to 11 of 11
- bw_lazy_trace_config_startup() – Implement (lazy) trace startup from wp-config.php
- bw_trace_plugin_startup() – Startup processing for oik-bwtrace
- libs/bwtrace.php
- libs/bwtrace.php
- libs/bwtrace.php
- libs/bwtrace.php
- libs/bwtrace.php
- Tests_includes_bwtrace::setUp() –
- Tests_includes_bwtrace::test_bw_trace_on_off() – Test turning trace on and off
- Tests_oik_bwtrace::test_bw_trace_status() – Tests for bw_trace_status are rather limited by the values of constants If the constants are already set then we haven’t really got much choice.
- Tests_oik_bwtrace::test_constant_bw_trace_on() –
