Created
April 25, 2024 18:13
-
-
Save mjones129/8c83c396666ba91741de0b6b9f7967e8 to your computer and use it in GitHub Desktop.
Check File Mod Time On Page Load
This file contains hidden or 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
add_action('wp', 'test'); | |
function test() { | |
//get file modified time of style.css | |
$time = filemtime('./style.css'); | |
$msg = "style.css was modified at: " . $time; | |
$log_file = fopen(ABSPATH . '/theme_file_edit_logs.txt', 'a'); | |
fwrite($log_file, $msg); | |
fclose($log_file); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment