Created
October 16, 2022 21:16
-
-
Save dankoch-cz/98fae790a3d3304f961199fe23c3d725 to your computer and use it in GitHub Desktop.
WordPress easy theme log
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
| <?php | |
| /** | |
| * Function to log filters, actions and other parts of the website, that are processed in backend | |
| * Usage theme_log('Log me'); | |
| * | |
| * @param (array|string) $log | |
| * @return false | |
| */ | |
| function vk_theme_log($log) | |
| { | |
| $file = file_put_contents(get_template_directory() . '/theme.log', print_r($log, true) . PHP_EOL, FILE_APPEND | LOCK_EX); | |
| return false; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment