Any Mobile Theme Switcher - Version 1.5

Version Description

  • Removed depricated functions.
Download this release

Release Info

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

Code changes from version 1.4 to 1.5

any-mobile-theme-switcher.php CHANGED
@@ -4,11 +4,11 @@ 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.4
8
  Author URI: http://www.dineshkarki.com.np
9
  */
10
 
11
- /* Copyright 2012 Dinesh Karki (email : dnesskarki@gmail.com)*/
12
 
13
  $amts_mobile_browser = '';
14
  $amts_status = '';
@@ -66,7 +66,7 @@ function amts_start(){
66
  function loadMobileStyle(){
67
  global $amts_mobile_browser;
68
  $mobileTheme = $amts_mobile_browser;
69
- $themeList = get_themes();
70
  foreach ($themeList as $theme) {
71
  if ($theme['Name'] == $mobileTheme) {
72
  return $theme['Stylesheet'];
@@ -77,7 +77,7 @@ function loadMobileStyle(){
77
  function loadMobileTheme(){
78
  global $amts_mobile_browser;
79
  $mobileTheme = $amts_mobile_browser;
80
- $themeList = get_themes();
81
  foreach ($themeList as $theme) {
82
  if ($theme['Name'] == $mobileTheme) {
83
  return $theme['Template'];
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.5
8
  Author URI: http://www.dineshkarki.com.np
9
  */
10
 
11
+ /* Copyright 2014 Dinesh Karki (email : dnesskarki@gmail.com)*/
12
 
13
  $amts_mobile_browser = '';
14
  $amts_status = '';
66
  function loadMobileStyle(){
67
  global $amts_mobile_browser;
68
  $mobileTheme = $amts_mobile_browser;
69
+ $themeList = custom_get_themelist();
70
  foreach ($themeList as $theme) {
71
  if ($theme['Name'] == $mobileTheme) {
72
  return $theme['Stylesheet'];
77
  function loadMobileTheme(){
78
  global $amts_mobile_browser;
79
  $mobileTheme = $amts_mobile_browser;
80
+ $themeList = custom_get_themelist();
81
  foreach ($themeList as $theme) {
82
  if ($theme['Name'] == $mobileTheme) {
83
  return $theme['Template'];
includes/amts-footer.php CHANGED
@@ -36,6 +36,7 @@
36
  <li>Different Home Page based on mobile devices</li>
37
  <li>QR code images to allow mobile users for easy bookmarking and access</li>
38
  <li>More powerfull mobile detection.</li>
 
39
  </ul>
40
 
41
  <div style="color:#08aa00; font-style:italic; font-size:27px; line-height:30px; text-align:center;">7 days trial</div>
36
  <li>Different Home Page based on mobile devices</li>
37
  <li>QR code images to allow mobile users for easy bookmarking and access</li>
38
  <li>More powerfull mobile detection.</li>
39
+ <li>Click to call for phone numbers</li>
40
  </ul>
41
 
42
  <div style="color:#08aa00; font-style:italic; font-size:27px; line-height:30px; text-align:center;">7 days trial</div>
includes/amts-theme-select.php CHANGED
@@ -9,9 +9,10 @@ $operaTheme = get_option('opera_theme');
9
  $palmTheme = get_option('parm_os_theme');
10
  $otherTheme = get_option('other_theme');
11
 
12
- $themeList = get_themes();
13
  $themeNames = array_keys($themeList);
14
- $defaultTheme = get_current_theme();
 
15
  natcasesort($themeNames);
16
  ?>
17
 
9
  $palmTheme = get_option('parm_os_theme');
10
  $otherTheme = get_option('other_theme');
11
 
12
+ $themeList = custom_get_themelist();
13
  $themeNames = array_keys($themeList);
14
+ $defaultTheme = wp_get_theme();
15
+ $defaultTheme = $defaultTheme->Name;
16
  natcasesort($themeNames);
17
  ?>
18
 
plugin_interface.php CHANGED
@@ -3,7 +3,7 @@ add_action('admin_menu', 'any_mobile_create_menu');
3
  add_action('admin_notices', 'amts_pro_notification');
4
 
5
 
6
- if ($_GET['hidemsg'] == 1){
7
  update_option('amts_hide_pro_notice','yes');
8
  }
9
 
@@ -35,6 +35,21 @@ function register_mysettings_theme() {
35
  register_setting('am-settings-group', 'show_switch_link_for_desktop');
36
  }
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  function am_settings_page() {
39
  global $amts_force_param;
40
  include('includes/amts-header.php');
3
  add_action('admin_notices', 'amts_pro_notification');
4
 
5
 
6
+ if (isset($_GET['hidemsg']) == 1){
7
  update_option('amts_hide_pro_notice','yes');
8
  }
9
 
35
  register_setting('am-settings-group', 'show_switch_link_for_desktop');
36
  }
37
 
38
+ function custom_get_themelist(){
39
+ $themes = wp_get_themes();
40
+ $wp_themes = array();
41
+
42
+ foreach ( $themes as $theme ) {
43
+ $name = $theme->get('Name');
44
+ if ( isset( $wp_themes[ $name ] ) )
45
+ $wp_themes[ $name . '/' . $theme->get_stylesheet() ] = $theme;
46
+ else
47
+ $wp_themes[ $name ] = $theme;
48
+ }
49
+
50
+ return $wp_themes;
51
+ }
52
+
53
  function am_settings_page() {
54
  global $amts_force_param;
55
  include('includes/amts-header.php');
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: dnesscarkey
3
  Tags: mobile theme, mobile theme switcher, mobile browser detect, mobile detect, theme redirection based on mobile device, mobile detect, user agent detect, mobile user agent
4
  Requires at least: 3.0.
5
- Tested up to: 3.6.1
6
- Stable tag: 1.4
7
 
8
  This Plugin detects mobile browser and display the theme as the setting done from admin. Usefull for switch to Mobile Theme.
9
 
@@ -29,6 +29,7 @@ Any Mobile Theme Switcher Pro Features
29
  * Serve seprate home page for mobile devices.
30
  * QR code for mobile bookmarking.
31
  * Better Mobile Detection.
 
32
 
33
  Click <a href="http://goo.gl/j1a2w" title="Any Mobile Theme Switcher Pro" target="_blank">here</a> for details about Any Mobile Theme Swticher
34
 
@@ -36,6 +37,8 @@ Want Mobile Theme ? Get it from <a href="http://goo.gl/eWXZp">here</a>.
36
 
37
  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.
38
 
 
 
39
 
40
  == Installation ==
41
 
@@ -59,6 +62,9 @@ Yes, the pro version works with W3 Total Cache. Click <a href="http://goo.gl/j1a
59
 
60
  == Changelog ==
61
 
 
 
 
62
  = 1.4 =
63
  * Use of Force Layout GET Parameter from wp-config.php
64
 
2
  Contributors: dnesscarkey
3
  Tags: mobile theme, mobile theme switcher, mobile browser detect, mobile detect, theme redirection based on mobile device, mobile detect, user agent detect, mobile user agent
4
  Requires at least: 3.0.
5
+ Tested up to: 3.8.1
6
+ Stable tag: 1.5
7
 
8
  This Plugin detects mobile browser and display the theme as the setting done from admin. Usefull for switch to Mobile Theme.
9
 
29
  * Serve seprate home page for mobile devices.
30
  * QR code for mobile bookmarking.
31
  * Better Mobile Detection.
32
+ * Click To Call to phone numbers.
33
 
34
  Click <a href="http://goo.gl/j1a2w" title="Any Mobile Theme Switcher Pro" target="_blank">here</a> for details about Any Mobile Theme Swticher
35
 
37
 
38
  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.
39
 
40
+ <strong>Installation Video (Thanks to Scott Wiseman)</strong>
41
+ [youtube http://www.youtube.com/embed/OqXhTW9FpRI]
42
 
43
  == Installation ==
44
 
62
 
63
  == Changelog ==
64
 
65
+ = 1.5 =
66
+ * Removed depricated functions.
67
+
68
  = 1.4 =
69
  * Use of Force Layout GET Parameter from wp-config.php
70