Init debugBar

This commit is contained in:
slawkens
2023-08-10 13:05:02 +02:00
parent 7bab8f033c
commit cc7aec8e28
4 changed files with 38 additions and 2 deletions

View File

@@ -35,6 +35,27 @@ require_once SYSTEM . 'hooks.php';
$hooks = new Hooks();
$hooks->load();
$hooks->register('debugbar_admin_head_end', HOOK_ADMIN_HEAD_END, function ($params) {
global $debugBar;
if (!isset($debugBar)) {
return;
}
$debugBarRenderer = $debugBar->getJavascriptRenderer();
echo $debugBarRenderer->renderHead();
});
$hooks->register('debugbar_admin_body_end', HOOK_ADMIN_BODY_END, function ($params) {
global $debugBar;
if (!isset($debugBar)) {
return;
}
$debugBarRenderer = $debugBar->getJavascriptRenderer();
echo $debugBarRenderer->render();
});
require SYSTEM . 'status.php';
require SYSTEM . 'login.php';
require __DIR__ . '/includes/functions.php';