Version Description
- fixed: fix preg_split()
Download this release
Release Info
Developer | thingsym |
Plugin | Multi Device Switcher |
Version | 1.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.5.0 to 1.5.1
- multi-device-switcher.php +6 -6
- pc-switcher-widget.php +1 -1
- readme.md +2 -0
- readme.txt +5 -3
multi-device-switcher.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Multi Device Switcher
|
4 |
* Plugin URI: https://github.com/thingsym/multi-device-switcher
|
5 |
* Description: This WordPress plugin allows you to set a separate theme for device (Smart Phone, Tablet PC, Mobile Phone, Game and custom).
|
6 |
-
* Version: 1.5.
|
7 |
* Author: thingsym
|
8 |
* Author URI: http://www.thingslabo.com/
|
9 |
* License: GPL2
|
@@ -127,10 +127,10 @@ class Multi_Device_Switcher {
|
|
127 |
public function get_options_userAgent() {
|
128 |
$options = $this->get_options();
|
129 |
|
130 |
-
$userAgent['smart'] = empty( $options['userAgent_smart'] ) ? '' : preg_split( '/,\s*/', $options['userAgent_smart'] );
|
131 |
-
$userAgent['tablet'] = empty( $options['userAgent_tablet'] ) ? '' : preg_split( '/,\s*/', $options['userAgent_tablet'] );
|
132 |
-
$userAgent['mobile'] = empty( $options['userAgent_mobile'] ) ? '' : preg_split( '/,\s*/', $options['userAgent_mobile'] );
|
133 |
-
$userAgent['game'] = empty( $options['userAgent_game'] ) ? '' : preg_split( '/,\s*/', $options['userAgent_game'] );
|
134 |
|
135 |
foreach ( $options as $key => $val ) {
|
136 |
if ( ! preg_match( '/^custom_switcher_userAgent_/', $key ) ) {
|
@@ -138,7 +138,7 @@ class Multi_Device_Switcher {
|
|
138 |
}
|
139 |
|
140 |
$custom_switcher_name = preg_replace( '/^custom_switcher_userAgent_/', '', $key );
|
141 |
-
$userAgent[ 'custom_switcher_' . $custom_switcher_name ] = empty( $val ) ? '' : preg_split( '/,\s*/', $val );
|
142 |
}
|
143 |
|
144 |
return $userAgent;
|
3 |
* Plugin Name: Multi Device Switcher
|
4 |
* Plugin URI: https://github.com/thingsym/multi-device-switcher
|
5 |
* Description: This WordPress plugin allows you to set a separate theme for device (Smart Phone, Tablet PC, Mobile Phone, Game and custom).
|
6 |
+
* Version: 1.5.1
|
7 |
* Author: thingsym
|
8 |
* Author URI: http://www.thingslabo.com/
|
9 |
* License: GPL2
|
127 |
public function get_options_userAgent() {
|
128 |
$options = $this->get_options();
|
129 |
|
130 |
+
$userAgent['smart'] = empty( $options['userAgent_smart'] ) ? '' : preg_split( '/,\s*/', $options['userAgent_smart'], -1, PREG_SPLIT_NO_EMPTY );
|
131 |
+
$userAgent['tablet'] = empty( $options['userAgent_tablet'] ) ? '' : preg_split( '/,\s*/', $options['userAgent_tablet'], -1, PREG_SPLIT_NO_EMPTY );
|
132 |
+
$userAgent['mobile'] = empty( $options['userAgent_mobile'] ) ? '' : preg_split( '/,\s*/', $options['userAgent_mobile'], -1, PREG_SPLIT_NO_EMPTY );
|
133 |
+
$userAgent['game'] = empty( $options['userAgent_game'] ) ? '' : preg_split( '/,\s*/', $options['userAgent_game'], -1, PREG_SPLIT_NO_EMPTY );
|
134 |
|
135 |
foreach ( $options as $key => $val ) {
|
136 |
if ( ! preg_match( '/^custom_switcher_userAgent_/', $key ) ) {
|
138 |
}
|
139 |
|
140 |
$custom_switcher_name = preg_replace( '/^custom_switcher_userAgent_/', '', $key );
|
141 |
+
$userAgent[ 'custom_switcher_' . $custom_switcher_name ] = empty( $val ) ? '' : preg_split( '/,\s*/', $val, -1, PREG_SPLIT_NO_EMPTY );
|
142 |
}
|
143 |
|
144 |
return $userAgent;
|
pc-switcher-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Widget Name: PC Switcher Widget
|
4 |
* Plugin URI: https://github.com/thingsym/multi-device-switcher
|
5 |
* Description: PC Switcher Widget add-on for the Multi Device Switcher. Use this widget to add the PC Switcher to a widget.
|
6 |
-
* Version: 1.5.
|
7 |
* Author: thingsym
|
8 |
* Author URI: http://www.thingslabo.com/
|
9 |
* License: GPL2
|
3 |
* Widget Name: PC Switcher Widget
|
4 |
* Plugin URI: https://github.com/thingsym/multi-device-switcher
|
5 |
* Description: PC Switcher Widget add-on for the Multi Device Switcher. Use this widget to add the PC Switcher to a widget.
|
6 |
+
* Version: 1.5.1
|
7 |
* Author: thingsym
|
8 |
* Author URI: http://www.thingslabo.com/
|
9 |
* License: GPL2
|
readme.md
CHANGED
@@ -401,6 +401,8 @@ You can send your own language pack to author.
|
|
401 |
|
402 |
## Changelog
|
403 |
|
|
|
|
|
404 |
* Version 1.5.0
|
405 |
* fixed: refactoring by the PHP_CodeSniffer
|
406 |
* fixed: change admin functions to class/object methods
|
401 |
|
402 |
## Changelog
|
403 |
|
404 |
+
* Version 1.5.1
|
405 |
+
* fixed: fix preg_split()
|
406 |
* Version 1.5.0
|
407 |
* fixed: refactoring by the PHP_CodeSniffer
|
408 |
* fixed: change admin functions to class/object methods
|
readme.txt
CHANGED
@@ -5,8 +5,8 @@ Donate link: http://blog.thingslabo.com/archives/000251.html
|
|
5 |
Link: https://github.com/thingsym/multi-device-switcher
|
6 |
Tags: switcher, theme, ipad, iphone, android, tablet, mobile, game
|
7 |
Requires at least: 3.4
|
8 |
-
Tested up to: 4.
|
9 |
-
Stable tag: 1.5.
|
10 |
License: GPL2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -107,7 +107,7 @@ There are three ways how to Using the PC Switcher.
|
|
107 |
= 3. For the theme authors and developers, add a PC Switcher to your theme. =
|
108 |
|
109 |
1. Add the following code into the PHP files, when you develop your theme.
|
110 |
-
|
111 |
`<?php if ( function_exists('multi_device_switcher_add_pc_switcher') ) { multi_device_switcher_add_pc_switcher(); } ?>`
|
112 |
2. Have fun!
|
113 |
|
@@ -371,6 +371,8 @@ For more information about the Multi Device Switcher Command, see `wp help multi
|
|
371 |
|
372 |
== Changelog ==
|
373 |
|
|
|
|
|
374 |
= 1.5.0 =
|
375 |
* fixed: refactoring by the PHP_CodeSniffer
|
376 |
* fixed: change admin functions to class/object methods
|
5 |
Link: https://github.com/thingsym/multi-device-switcher
|
6 |
Tags: switcher, theme, ipad, iphone, android, tablet, mobile, game
|
7 |
Requires at least: 3.4
|
8 |
+
Tested up to: 4.5
|
9 |
+
Stable tag: 1.5.1
|
10 |
License: GPL2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
107 |
= 3. For the theme authors and developers, add a PC Switcher to your theme. =
|
108 |
|
109 |
1. Add the following code into the PHP files, when you develop your theme.
|
110 |
+
|
111 |
`<?php if ( function_exists('multi_device_switcher_add_pc_switcher') ) { multi_device_switcher_add_pc_switcher(); } ?>`
|
112 |
2. Have fun!
|
113 |
|
371 |
|
372 |
== Changelog ==
|
373 |
|
374 |
+
= 1.5.1 =
|
375 |
+
* fixed: fix preg_split()
|
376 |
= 1.5.0 =
|
377 |
* fixed: refactoring by the PHP_CodeSniffer
|
378 |
* fixed: change admin functions to class/object methods
|