You appear to be a bot. Output may be restricted
Description
Implement "plugins_loaded" for oik-bwtraceStart the trace count logic if required
Usage
bw_trace_count_plugins_loaded( $count_hooks );
Parameters
- $count_hooks
- ( bool ) optional – true if counting is required, false otherwise
Returns
voidTO DO
Review these comments for validity it would be a lot nicer if we could start counting actions from the first time one is invoked. To achieve this we probably need to create an MU plugin and make it respond to 'muplugins_loaded'. The MU plugin should be responsible for loading the relevant parts of oik and oik-bwtrace Functions that can be called when loading oik-bwtrace from wp-config AND you want to count ALL the actions hooks and filters db.php is the WordPress drop-in plugin that gets invoked primarily to alter or control the database access. But it's not until this stage in the processing that "add_action" is available. So we have to defer the registration of our action hooks until here at least.Source
File name: oik-bwtrace/includes/oik-action-counts.phpLines:
1 to 19 of 19
function bw_trace_count_plugins_loaded( $count_hooks=false ) { //bw_backtrace(); global $bw_action_options; bw_trace2( $count_hooks, "count_hooks", false, BW_TRACE_DEBUG ); //bw_trace_count_report(); if ( !$count_hooks ) { //$bw_action_options = get_option( 'bw_action_options' ); $count_hooks = bw_array_get( $bw_action_options, "count", false ); } if ( $count_hooks ) { //oik_require( "includes/oik-actions.php", "oik-bwtrace" ); bw_trace_count_on(); bw_lazy_trace_count(); } else { if ( is_callable( "bw_trace_count_off" ) ) { bw_trace_count_off(); } } }View on GitHub View on Trac