aboutsummaryrefslogtreecommitdiffstats
path: root/themes/smartpocket/themeconf.inc.php
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2013-06-30 20:10:04 +0000
committerflop25 <flop25@piwigo.org>2013-06-30 20:10:04 +0000
commit19ae5b7e2ecd0948f202ac72e714b87808db7ccb (patch)
tree803a1080739247d0aaaec8bfbc7ab0636aa6695b /themes/smartpocket/themeconf.inc.php
parent80576a8ff65f9557e4bcd42b561934028516e0ad (diff)
bug:2848
Switch to Desktop link in the menu also git-svn-id: http://piwigo.org/svn/trunk@23716 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/smartpocket/themeconf.inc.php')
-rw-r--r--themes/smartpocket/themeconf.inc.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/themes/smartpocket/themeconf.inc.php b/themes/smartpocket/themeconf.inc.php
index 2d64b6553..e4104c9aa 100644
--- a/themes/smartpocket/themeconf.inc.php
+++ b/themes/smartpocket/themeconf.inc.php
@@ -56,6 +56,22 @@ if (!empty($_COOKIE['screen_size']))
$this->assign('picture_derivative_params', ImageStdParams::get_by_type($type));
$this->assign('thumbnail_derivative_params', ImageStdParams::get_by_type(IMG_SQUARE));
+//------------------------------------------------------------- mobile version
+add_event_handler('init', 'mobile_link');
+
+function mobile_link()
+{
+ global $template, $conf;
+ if ( !empty($conf['mobile_theme']) && (get_device() != 'desktop' || mobile_theme()))
+ {
+ $template->assign('TOGGLE_MOBILE_THEME_URL',
+ add_url_params(
+ duplicate_index_url(),
+ array('mobile' => mobile_theme() ? 'false' : 'true')
+ )
+ );
+ }
+}
if ( !function_exists( 'add_menu_on_public_pages' ) ) {