mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-04-27 10:20:16 +00:00
[various] Remove App dependency from hook functions
This commit is contained in:
parent
b53914ee11
commit
39c654da00
87 changed files with 419 additions and 451 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue