Created
April 10, 2018 07:01
-
-
Save keks55/0bbcae9e088367cc3f31c1a7f2547f7a to your computer and use it in GitHub Desktop.
If checked - write to file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dpr_checkbox() { | |
global $dpr_option_name, $dpr_options; | |
if(is_array($dpr_options) && $dpr_options['disable'] == '1'){ | |
echo "ON"; | |
$file = site_url()."/"."license.txt"; | |
$f = fopen('new.php', 'a+') or die('error open file'); | |
for ($i=0; $i < 3; $i++){ | |
fputs($f,"\n$i"); | |
} | |
fclose($f); | |
} | |
} | |
add_action( 'dpr_checkbox', 'dpr_checkbox' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment