run(); } run_reactpress(); /** * @param ...$data * * @return void */ function repr_debug($data) { if (WP_DEBUG !== true) return; $json = json_encode($data); add_action('shutdown', function () use ($json) { echo ""; }); } /** * Write error to a log file named debug.log in wp-content. * * @param mixed $log The thing you want to log. * @since 1.0.0 */ function repr_log($log) { if (true === WP_DEBUG) { if (is_array($log) || is_object($log)) { error_log(print_r($log, true)); } else { error_log($log); } } return $log; }