-function piwik_plugin_admin (&$a, &$o) {
-# $t = file_get_contents( dirname(__file__)."/admin.tpl");
- $t = get_markup_template( "admin.tpl", "addon/piwik/" );
-
- $includes = array(
- '$field_input' => 'field_input.tpl',
- '$field_checkbox' => 'field_select.tpl',
- );
- $includes = set_template_includes($a->theme['template_engine'], $includes);
-
- $o = replace_macros( $t, $includes + array(
- '$submit' => t('Submit'),
- '$baseurl' => array('baseurl', t('Piwik Base URL'), get_config('piwik','baseurl' ), t('Absolute path to your Piwik installation. (without protocol (http/s), with trailing slash)')),
- '$siteid' => array('siteid', t('Site ID'), get_config('piwik','siteid' ), ''),
- '$optout' => array('optout', t('Show opt-out cookie link?'), get_config('piwik','optout' ), ''),
- '$async' => array('async', t('Asynchronous tracking'), get_config('piwik','async' ), ''),
- ));
+function piwik_addon_admin (&$a, &$o) {
+ $t = Renderer::getMarkupTemplate( "admin.tpl", "addon/piwik/" );
+ $o = Renderer::replaceMacros( $t, [
+ '$submit' => L10n::t('Save Settings'),
+ '$piwikbaseurl' => ['baseurl', L10n::t('Matomo (Piwik) Base URL'), Config::get('piwik','baseurl' ), L10n::t('Absolute path to your Matomo (Piwik) installation. (without protocol (http/s), with trailing slash)')],
+ '$siteid' => ['siteid', L10n::t('Site ID'), Config::get('piwik','siteid' ), ''],
+ '$optout' => ['optout', L10n::t('Show opt-out cookie link?'), Config::get('piwik','optout' ), ''],
+ '$async' => ['async', L10n::t('Asynchronous tracking'), Config::get('piwik','async' ), ''],
+ ]);