-function mathjax_plugin_admin (&$a, &$o) {
- $t = file_get_contents( dirname(__file__)."/admin.tpl");
- if (get_config('mathjax','baseurl','') == '') {
- set_config('mathjax','baseurl','http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML');
- }
- $o = replace_macros( $t, array(
- '$baseurl' => array('baseurl', t('MathJax Base URL'), get_config('mathjax','baseurl' ), t('The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax.')),
- ));
+function mathjax_addon_admin (&$a, &$o) {
+ $t = get_markup_template( "admin.tpl", "addon/mathjax/" );
+ if (Config::get('mathjax','baseurl','') == '') {
+ Config::set('mathjax','baseurl','http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML');
+ }
+
+ $o = replace_macros( $t, [
+ '$submit' => L10n::t('Save Settings'),
+ '$baseurl' => ['baseurl', L10n::t('MathJax Base URL'), Config::get('mathjax','baseurl' ), L10n::t('The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax.')],
+ ]);