-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase-template.php
28 lines (24 loc) · 975 Bytes
/
base-template.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
global $pagename;
use TestPlugin\TestPlugin_Class;
use TestPlugin\TestPlugin_Options;
use TestPlugin\LocalizationHelper;
use TestPlugin\TestPlugin_Hooks;
get_header();
?>
<script type="text/javascript">
<?php
$localizationInfo = LocalizationHelper::getLocalizationInfo();
$langCode = (!empty($localizationInfo) && !empty($localizationInfo["preferred_simplified_locale"])) ? $localizationInfo["preferred_simplified_locale"] : "en";
echo 'serverPreferredLocale = "'.$langCode.'";';
?>
</script>
<?php
//do_action(TestPlugin_Hooks::$hookPrefix.'output_localization_for_pagename', $pagename);
$templates = TestPlugin_Class::getTemplates();
$pageManager = TestPlugin_Class::getPageManager();
echo $templates->render('', array(
'pluginVersion' => TestPlugin_Options::getPluginOption(TestPlugin_Options::PLUGIN_VERSION_OPTION)
),$pagename);
get_footer();
?>