X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=highlightjs%2Fhighlightjs.php;h=097d34c7ee9ffc06b3149e2efc71cf214dab023b;hb=39c654da00e63a58b6a930e7d0e555bfb248b44b;hp=823541bb458aee6d3546f7f619168a607436ab0f;hpb=bbc629544f66f90d2e47d71094d34b436aaf70b8;p=friendica-addons.git diff --git a/highlightjs/highlightjs.php b/highlightjs/highlightjs.php index 823541bb..097d34c7 100644 --- a/highlightjs/highlightjs.php +++ b/highlightjs/highlightjs.php @@ -16,15 +16,9 @@ function highlightjs_install() Hook::register('footer', __FILE__, 'highlightjs_footer'); } -function highlightjs_uninstall() +function highlightjs_head(string &$str) { - Hook::unregister('head' , __FILE__, 'highlightjs_head'); - Hook::unregister('footer', __FILE__, 'highlightjs_footer'); -} - -function highlightjs_head(App $a, &$b) -{ - if ($a->getCurrentTheme() == 'frio') { + if (DI::app()->getCurrentTheme() == 'frio') { $style = 'bootstrap'; } else { $style = 'default'; @@ -33,7 +27,7 @@ function highlightjs_head(App $a, &$b) DI::page()->registerStylesheet(__DIR__ . '/asset/styles/' . $style . '.css'); } -function highlightjs_footer(App $a, &$b) +function highlightjs_footer(string &$str) { DI::page()->registerFooterScript(__DIR__ . '/asset/highlight.pack.js'); DI::page()->registerFooterScript(__DIR__ . '/highlightjs.js');