X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mathjax%2Fmathjax.php;h=d51857f3f789edca46d772c1a52ee32ca0151b1b;hb=215a18093a2822ccd0ba40b7b07142780bfd917b;hp=2a7bc89c221281160a4c2ef667e3e9dc156c660b;hpb=461b3db9f449fdb1ce780a337cf2f1bb7aa35ac5;p=friendica-addons.git
diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php
index 2a7bc89c..d51857f3 100644
--- a/mathjax/mathjax.php
+++ b/mathjax/mathjax.php
@@ -1,5 +1,4 @@
* License: 3-clause BSD license
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function mathjax_install() {
- register_hook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header');
- register_hook('plugin_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings');
- register_hook('plugin_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post');
- logger('installed js_math plugin');
+ 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');
+ logger('installed js_math addon');
}
function mathjax_uninstall() {
- unregister_hook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header');
- unregister_hook('plugin_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings');
- unregister_hook('plugin_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post');
+ 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');
}
function mathjax_settings_post ($a, $post) {
if (! local_user())
@@ -36,18 +36,18 @@ function mathjax_settings (&$a, &$s) {
$use = PConfig::get(local_user(),'mathjax','use');
$usetext = (($use) ? ' checked="checked" ' : '');
$s .= '';
- $s .= 'MathJax '.t('Settings').'
';
+ $s .= 'MathJax '.L10n::t('Settings').'
';
$s .= '';
$s .= '