X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mathjax%2Fmathjax.php;h=d51857f3f789edca46d772c1a52ee32ca0151b1b;hb=3ce1c8cf2e65581af5fe94c1273f9381987f9f89;hp=695022e60a63ad327e708cd689ad7fe9acec166e;hpb=c3e93f1ed9a487f823bcc75ddd43024334c25bfc;p=friendica-addons.git
diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php
index 695022e6..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 .= '