Example #1
0
 public static function log($error = '{NO Error Code}', $data = array(), $wp_error = NULL)
 {
     if (!WP_DEBUG_LOG) {
         return;
     }
     $log = array_merge(array('error' => $error, 'time' => current_time('mysql'), 'ip' => gPluginUtils::IP(), 'message' => is_null($wp_error) ? '{NO WP_Error Object}' : $wp_error->get_error_message()), $data);
     error_log(print_r($log, TRUE));
 }