| @@ -10,8 +10,13 @@ | ||
| 10 | 10 | if (true === WP_GURUS_DEBUG) { |
| 11 | 11 | $debug_msg_last_line=''; |
| 12 | 12 | $debug_msg_last_file=''; |
| 13 | 13 | } |
| 14 | + /** | |
| 15 | + * Function to log debug messages. | |
| 16 | + * Requires WP_GURUS_DEBUG = true, define it in your wp-config.php file. | |
| 17 | + * Set WP_DEBUG to true, and WP_DEBUG_DISPLAY to false (so no errors are printed to screen), and WP_DEBUG_LOG to true so messages are logged to wp-content/debug.log file. | |
| 18 | + */ | |
| 14 | 19 | function debug_msg($message, $prefix='', $trace=0) { |
| 15 | 20 | if (true === WP_GURUS_DEBUG) { |
| 16 | 21 | global $debug_msg_last_line,$debug_msg_last_file; |
| 17 | 22 | $backtrace = debug_backtrace(); |