Move admin bar code into body_start place_holder

This commit is contained in:
slawkens
2025-07-08 14:22:51 +02:00
parent dcb96f4ce1
commit f17269e44c
2 changed files with 10 additions and 9 deletions

View File

@@ -512,6 +512,16 @@ function template_place_holder($type): string
}
elseif ($type === 'body_start') {
$ret .= $twig->render('browsehappy.html.twig');
/**
* @var OTS_Account $account_logged
*/
if (admin()) {
global $account_logged;
$ret .= $twig->render('admin-bar.html.twig', [
'username' => USE_ACCOUNT_NAME ? $account_logged->getName() : $account_logged->getId()
]);
}
}
elseif($type === 'body_end') {
$ret .= template_ga_code();