|
|
@ -20,7 +20,7 @@ |
|
|
|
Plugin Name: owark |
|
|
|
Plugin URI: http://owark.org |
|
|
|
Description: Tired of broken links? Archive yours with owark, the Open Web Archive! |
|
|
|
Version: 1.0 |
|
|
|
Version: 1.0.1 |
|
|
|
Author: Eric van der Vlist |
|
|
|
Author URI: http://eric.van-der-vlist.com |
|
|
|
License: GLP2 |
|
|
@ -33,12 +33,14 @@ |
|
|
|
if (!function_exists('print_r_log')) { |
|
|
|
|
|
|
|
function print_r_log($log) { |
|
|
|
$caller_strace = debug_backtrace()[1]; |
|
|
|
if (is_array($log) || is_object($log)) { |
|
|
|
error_log($caller_strace['file'] . '/#' . $caller_strace['line'] . ':'); |
|
|
|
error_log(print_r($log, true)); |
|
|
|
} else { |
|
|
|
error_log($caller_strace['file'] . '/#' . $caller_strace['line'] . ': ' . $log); |
|
|
|
if (defined('WP_DEBUG') && WP_DEBUG == true) { |
|
|
|
$caller_strace = debug_backtrace()[1]; |
|
|
|
if (is_array($log) || is_object($log)) { |
|
|
|
error_log($caller_strace['file'] . '/#' . $caller_strace['line'] . ':'); |
|
|
|
error_log(print_r($log, true)); |
|
|
|
} else { |
|
|
|
error_log($caller_strace['file'] . '/#' . $caller_strace['line'] . ': ' . $log); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -47,10 +49,12 @@ if (!function_exists('print_r_log')) { |
|
|
|
if (!function_exists('log_function_call')) { |
|
|
|
|
|
|
|
function log_function_call() { |
|
|
|
$caller_strace = debug_backtrace()[1]; |
|
|
|
error_log((isset($caller_strace['file']) ? $caller_strace['file'] : '<undefined>') . '/#' . (isset($caller_strace['line']) ? $caller_strace['line'] : '<undefined>') . ' function: ' . (isset($caller_strace['function']) ? $caller_strace['function'] : '<undefined>') . '('); |
|
|
|
foreach ($caller_strace['args'] as $arg) { |
|
|
|
error_log(' * ' . gettype($arg) . ': ' . print_r($arg, true)); |
|
|
|
if (defined('WP_DEBUG') && WP_DEBUG == true) { |
|
|
|
$caller_strace = debug_backtrace()[1]; |
|
|
|
error_log((isset($caller_strace['file']) ? $caller_strace['file'] : '<undefined>') . '/#' . (isset($caller_strace['line']) ? $caller_strace['line'] : '<undefined>') . ' function: ' . (isset($caller_strace['function']) ? $caller_strace['function'] : '<undefined>') . '('); |
|
|
|
foreach ($caller_strace['args'] as $arg) { |
|
|
|
error_log(' * ' . gettype($arg) . ': ' . print_r($arg, true)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|