summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/wordpress-mobile-pack/frontend/sections/show-mobile-link.php')
-rw-r--r--plugins/wordpress-mobile-pack/frontend/sections/show-mobile-link.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/wordpress-mobile-pack/frontend/sections/show-mobile-link.php b/plugins/wordpress-mobile-pack/frontend/sections/show-mobile-link.php
new file mode 100644
index 00000000..6413b171
--- /dev/null
+++ b/plugins/wordpress-mobile-pack/frontend/sections/show-mobile-link.php
@@ -0,0 +1,19 @@
+<?php
+if (class_exists('WMobilePack')):
+
+ if ( ! class_exists( 'WMobilePack_Export' ) ) {
+ require_once(WMP_PLUGIN_PATH.'export/class-export.php');
+ }
+
+ $wmp_export = new WMobilePack_Export();
+ $wmp_texts_json = $wmp_export->load_language(get_locale(), 'list');
+
+ $wmp_footer_text = 'Switch to mobile version';
+ if ($wmp_texts_json !== false && isset($wmp_texts_json['APP_TEXTS']['LINKS']) && isset($wmp_texts_json['APP_TEXTS']['LINKS']['VISIT_APP'])){
+ $wmp_footer_text = $wmp_texts_json['APP_TEXTS']['LINKS']['VISIT_APP'];
+}
+ ?>
+ <div id="show-mobile" style="width:100%; text-align: center;">
+ <a href="<?php echo home_url(); echo parse_url(home_url(), PHP_URL_QUERY) ? '&' : '?'; echo WMobilePack_Cookie::$prefix; ?>theme_mode=mobile" title="<?php echo $wmp_texts_json;?>"><?php echo $wmp_footer_text;?></a>
+ </div>
+<?php endif;?> \ No newline at end of file