Any Mobile Theme Switcher - Version 1.2

Version Description

  • Session Issue Fixed
Download this release

Release Info

Developer dnesscarkey
Plugin Icon 128x128 Any Mobile Theme Switcher
Version 1.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2

Files changed (2) hide show
  1. any-mobile-theme-switcher.php +8 -6
  2. readme.txt +5 -2
any-mobile-theme-switcher.php CHANGED
@@ -4,14 +4,17 @@ Plugin Name: Any Mobile Theme Switcher
4
  Plugin URI: http://dineshkarki.com.np/any-mobile-theme-switcher
5
  Description: This plugin allow you to detect all mobile platform and switch the theme. Supports most of the mobile platform including iphone, ipad, ipod, windows mobile, parm os, blackberry, android, andriod tab.
6
  Author: Dinesh Karki
7
- Version: 1.1
8
  Author URI: http://www.dineshkarki.com.np
9
  */
10
 
11
  /* Copyright 2012 Dinesh Karki (email : dnesskarki@gmail.com)*/
12
 
13
- if (!session_id()){
14
- session_start();
 
 
 
15
  }
16
 
17
  $mobile_browser = '';
@@ -86,7 +89,7 @@ $accept = $_SERVER['HTTP_ACCEPT']; // get the content accept value - t
86
  } // ends the switch
87
 
88
  //Force Theme Display request from visitor.
89
- if ($_GET['am_force_theme_layout']){
90
  $_SESSION['am_force_theme_layout'] = $_GET['am_force_theme_layout'];
91
  }
92
 
@@ -144,5 +147,4 @@ function show_theme_switch_link_func( $atts ){
144
  }
145
  add_shortcode('show_theme_switch_link', 'show_theme_switch_link_func');
146
 
147
- include('plugin_interface.php');
148
- ?>
4
  Plugin URI: http://dineshkarki.com.np/any-mobile-theme-switcher
5
  Description: This plugin allow you to detect all mobile platform and switch the theme. Supports most of the mobile platform including iphone, ipad, ipod, windows mobile, parm os, blackberry, android, andriod tab.
6
  Author: Dinesh Karki
7
+ Version: 1.2
8
  Author URI: http://www.dineshkarki.com.np
9
  */
10
 
11
  /* Copyright 2012 Dinesh Karki (email : dnesskarki@gmail.com)*/
12
 
13
+ add_action('init', 'startAMTSsession', 1);
14
+ function startAMTSsession(){
15
+ if (!session_id()){
16
+ session_start();
17
+ }
18
  }
19
 
20
  $mobile_browser = '';
89
  } // ends the switch
90
 
91
  //Force Theme Display request from visitor.
92
+ if (@$_GET['am_force_theme_layout']){
93
  $_SESSION['am_force_theme_layout'] = $_GET['am_force_theme_layout'];
94
  }
95
 
147
  }
148
  add_shortcode('show_theme_switch_link', 'show_theme_switch_link_func');
149
 
150
+ include('plugin_interface.php');
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: dnesscarkey
3
  Tags: mobile theme, mobile theme switcher, mobile browser detect, mobile detect, theme redirection based on mobile device
4
  Requires at least: 3.0.
5
  Tested up to: 3.5.1
6
- Stable tag: 1.1
7
 
8
  This Plugin detects mobile browser and display the theme as the setting done from admin. Usefull for switch to Mobile Theme.
9
 
@@ -25,7 +25,7 @@ You can select a different mobile theme for each mobile browser. You can select
25
 
26
  Want Mobile Theme ? Get it from <a href="http://goo.gl/eWXZp">here</a>.
27
 
28
- Please visit our <a href="http://dineshkarki.com.np/forums/forum/mobile-theme-switcher" target="_blank">support forum</a> for any issues.
29
 
30
 
31
  == Installation ==
@@ -46,6 +46,9 @@ Yes it detect most of the mobile browsers and redirects it to its mobile theme s
46
 
47
  == Changelog ==
48
 
 
 
 
49
  = 1.1 =
50
  * User Agents Update
51
  * Tested With 3.5.1
3
  Tags: mobile theme, mobile theme switcher, mobile browser detect, mobile detect, theme redirection based on mobile device
4
  Requires at least: 3.0.
5
  Tested up to: 3.5.1
6
+ Stable tag: 1.2
7
 
8
  This Plugin detects mobile browser and display the theme as the setting done from admin. Usefull for switch to Mobile Theme.
9
 
25
 
26
  Want Mobile Theme ? Get it from <a href="http://goo.gl/eWXZp">here</a>.
27
 
28
+ Please visit our own <a href="http://dineshkarki.com.np/forums/forum/mobile-theme-switcher" target="_blank">support forum</a> for any issues. We don't respond support ticket created here.
29
 
30
 
31
  == Installation ==
46
 
47
  == Changelog ==
48
 
49
+ = 1.2 =
50
+ * Session Issue Fixed
51
+
52
  = 1.1 =
53
  * User Agents Update
54
  * Tested With 3.5.1