]> git.mxchange.org Git - friendica-addons.git/blobdiff - mathjax/mathjax.php
PL translation blackout THX waldis
[friendica-addons.git] / mathjax / mathjax.php
index 91a6a066d803f9da0b02720b412d208d7967ccbd..c85068eaaf0802ce9712ff13ff23d6e3438ed527 100644 (file)
@@ -13,6 +13,7 @@ use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 
 function mathjax_install() {
+       Addon::registerHook('load_config', 'addon/mathjax/mathjax.php', 'mathjax_load_config');
     Addon::registerHook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header');
     Addon::registerHook('addon_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings');
     Addon::registerHook('addon_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post');
@@ -21,12 +22,18 @@ function mathjax_install() {
 }
 
 function mathjax_uninstall() {
+       Addon::unregisterHook('load_config', 'addon/mathjax/mathjax.php', 'mathjax_load_config');
     Addon::unregisterHook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header');
     Addon::unregisterHook('addon_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings');
     Addon::unregisterHook('addon_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post');
     Addon::unregisterHook('template_vars', 'addon/mathjax/mathjax.php', 'mathjax_template_vars');
 }
 
+function mathjax_load_config(\Friendica\App $a)
+{
+       $a->loadConfigFile(__DIR__. '/config/mathjax.ini.php');
+}
+
 function mathjax_template_vars($a, &$arr)
 {
     if (!array_key_exists('addon_hooks',$arr['vars']))