You appear to be a bot. Output may be restricted
Description
Replace the current file with a slightly modified versionmod vs tgt vs cpy action process new — — — — — —— ————— — A35 <> P35 == P35 enable copy mod to tgt A35 A35 <> P35 == P35 disable Already disabled <– A35 == A35 <> P35 enable Already enabled <– A35 == A35 <> P35 disable copy cpy to tgt P35 A35 <> P36 <> P35 either Not allowed <– It should not be possible for A35 to match P35 or P36 A35 = modified version of plugin.php including Immediate action tracing P35/P36 = WordPress supplied version of wp-includes/plugin.php This file is delivered in oik-bwtrace – the correct file for the WordPress version
Usage
bw_action_toggle( $enable, $mod, $tgt, $cpy );
Parameters
- $enable
- ( mixed ) required –
- $mod
- ( mixed ) required –
- $tgt
- ( mixed ) required –
- $cpy
- ( mixed ) required –
Returns
voidSource
File name: oik-bwtrace/admin/oik-replace.incLines:
1 to 24 of 24
function bw_action_toggle( $enable, $mod, $tgt, $cpy ) { if ( $enable ) { $tgtvscpy = bw_file_compare( $tgt, $cpy ); if ( $tgtvscpy ) { $result = bw_file_copy( $mod, $tgt ); } else { //echo "Either already enabled or not allowed" . PHP_EOL; $result = bw_file_compare( $mod, $tgt ); if ( !$result ) $result = false; //bw_wp_error( "Attempt to enable but version mismatch" ) } } else { $modvstgt = bw_file_compare( $mod, $tgt ); if ( $modvstgt ) { $result = bw_file_copy( $cpy, $tgt ); } else { //echo "Either already disabled or not allowed" . PHP_EOL; $result = bw_file_compare( $tgt, $cpy ); if ( !$result ) $result = false; // bw_wp_error( "Attempt to disable but version mismatch" ); } } return( $result ); }View on GitHub View on Trac