[various] Remove App dependency from hook functions

This commit is contained in:
Hypolite Petovan 2023-01-13 21:16:09 -05:00
parent b53914ee11
commit 39c654da00
87 changed files with 419 additions and 451 deletions

View file

@ -16,9 +16,9 @@ function highlightjs_install()
Hook::register('footer', __FILE__, 'highlightjs_footer');
}
function highlightjs_head(App $a, string &$str)
function highlightjs_head(string &$str)
{
if ($a->getCurrentTheme() == 'frio') {
if (DI::app()->getCurrentTheme() == 'frio') {
$style = 'bootstrap';
} else {
$style = 'default';
@ -27,7 +27,7 @@ function highlightjs_head(App $a, string &$str)
DI::page()->registerStylesheet(__DIR__ . '/asset/styles/' . $style . '.css');
}
function highlightjs_footer(App $a, string &$str)
function highlightjs_footer(string &$str)
{
DI::page()->registerFooterScript(__DIR__ . '/asset/highlight.pack.js');
DI::page()->registerFooterScript(__DIR__ . '/highlightjs.js');