Last active
December 18, 2015 12:09
-
-
Save webzunft/5780769 to your computer and use it in GitHub Desktop.
function to log events for themes in WordPress functions.php
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
/* LOG FUNCTION */ | |
function log( $input ){ | |
$time = date('d-m-Y H:i T'); | |
$file = get_template_directory() . '/log.txt'; | |
$handle = fopen($file, 'a'); | |
$data = '--------------- ' . $time."--------------- \r\n".$input."\r\n"; | |
fwrite($handle, $data); | |
fclose($handle); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment