pushHandler(new JsonResponseHandler); } elseif (Misc::isCommandLine()) { $whoops->pushHandler(new PlainTextHandler); } else { $whoops->pushHandler(new PrettyPageHandler); } $whoops->register(); } } /** * @return bool */ public static function is_debug() { return defined('WP_DEBUG') && WP_DEBUG; } }