You appear to be a bot. Output may be restricted
Description
Enable or disable immediate action trace by replacing plugin.php
Usage
$bool = bw_enable_action_trace( $enable );
Parameters
- $enable
- ( bool ) required – whether to enable or disable immediate action tracing
Returns
bool $result – true if successful When enabled the wp-includes/plugin.php is replaced by plugin.act When disabled the wp-includes/plugin.php is reset to original The logic in bw_action_toggle() does not replace the file if there is a mismatch between the actual version of plugin.php and our local version.Source
File name: oik-bwtrace/admin/oik-replace.incLines:
1 to 17 of 17
function bw_enable_action_trace( $enable ) { global $wp_version; $result = false; if ( isset( $wp_version ) ) { $action_file = oik_path( "wp-includes/$wp_version/plugin.act", "oik-bwtrace" ); $copy_file = oik_path( "wp-includes/$wp_version/plugin.php", "oik-bwtrace" ); $target_file = ABSPATH . WPINC . '/plugin.php'; if ( file_exists( $action_file ) ) { $result = bw_action_toggle( $enable, $action_file, $target_file , $copy_file ); } else { bw_trace2( $action_file, "File missing for WordPress version" ); } } else { bw_trace2( "WordPress version not set." ); } return( $result ); }View on GitHub View on Trac