Multi Device Switcher - Version 1.5.4

Version Description

  • fixed: fix property keyword for testability
  • fixed: fix add_action 'customize_register' with __construct()
  • fixed: fix capability
Download this release

Release Info

Developer thingsym
Plugin Icon wp plugin Multi Device Switcher
Version 1.5.4
Comparing to
See all releases

Code changes from version 1.5.3 to 1.5.4

Files changed (4) hide show
  1. multi-device-switcher.php +6 -6
  2. pc-switcher-widget.php +1 -1
  3. readme.md +10 -18
  4. readme.txt +12 -21
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.3
7
  * Author: thingsym
8
  * Author URI: http://www.thingslabo.com/
9
  * License: GPL2
@@ -36,7 +36,7 @@ class Multi_Device_Switcher {
36
  protected $page_title = 'Multi Device Switcher';
37
  protected $menu_title = 'Multi Device Switcher';
38
  protected $menu_slug = 'multi-device-switcher';
39
- protected $capability = 'manage_options';
40
 
41
  protected $textdomain = 'multi-device-switcher';
42
  protected $languages_path = 'multi-device-switcher/languages';
@@ -45,14 +45,13 @@ class Multi_Device_Switcher {
45
  protected $cookie_name_disable_switcher = 'disable-switcher';
46
  protected $cookie_name_pc_switcher = 'pc-switcher';
47
 
48
- protected $device = '';
49
 
50
  public function __construct() {
51
  if ( is_admin() ) {
52
  add_action( 'admin_init', array( $this, 'admin_init' ) );
53
  add_filter( 'option_page_capability_' . $this->option_group, array( $this, 'option_page_capability' ) );
54
  add_action( 'admin_menu', array( $this, 'add_option_page' ) );
55
- add_action( 'customize_register', array( $this, 'customize_register' ) );
56
  }
57
  else {
58
  add_filter( 'wp_headers', array( $this, 'add_header_vary' ) );
@@ -60,6 +59,7 @@ class Multi_Device_Switcher {
60
  add_action( 'plugins_loaded', array( $this, 'switch_theme' ) );
61
  }
62
 
 
63
  add_action( 'plugins_loaded', array( $this, 'load_file' ) );
64
  }
65
 
@@ -1007,7 +1007,7 @@ class Multi_Device_Switcher {
1007
  $wp_customize->add_setting( 'multi_device_switcher_options[' . $name . ']', array(
1008
  'default' => $default_theme_options[ $name ],
1009
  'type' => 'option',
1010
- 'capability' => 'edit_theme_options',
1011
  ) );
1012
 
1013
  $wp_customize->add_control( 'multi_device_switcher_options[' . $name . ']', array(
@@ -1028,7 +1028,7 @@ class Multi_Device_Switcher {
1028
  $wp_customize->add_setting( 'multi_device_switcher_options[' . $custom_switcher_option . ']', array(
1029
  'default' => __( 'None', $this->textdomain ),
1030
  'type' => 'option',
1031
- 'capability' => 'edit_theme_options',
1032
  ) );
1033
 
1034
  $wp_customize->add_control( 'multi_device_switcher_options[' . $custom_switcher_option . ']', array(
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.4
7
  * Author: thingsym
8
  * Author URI: http://www.thingslabo.com/
9
  * License: GPL2
36
  protected $page_title = 'Multi Device Switcher';
37
  protected $menu_title = 'Multi Device Switcher';
38
  protected $menu_slug = 'multi-device-switcher';
39
+ protected $capability = 'switch_themes';
40
 
41
  protected $textdomain = 'multi-device-switcher';
42
  protected $languages_path = 'multi-device-switcher/languages';
45
  protected $cookie_name_disable_switcher = 'disable-switcher';
46
  protected $cookie_name_pc_switcher = 'pc-switcher';
47
 
48
+ public $device = '';
49
 
50
  public function __construct() {
51
  if ( is_admin() ) {
52
  add_action( 'admin_init', array( $this, 'admin_init' ) );
53
  add_filter( 'option_page_capability_' . $this->option_group, array( $this, 'option_page_capability' ) );
54
  add_action( 'admin_menu', array( $this, 'add_option_page' ) );
 
55
  }
56
  else {
57
  add_filter( 'wp_headers', array( $this, 'add_header_vary' ) );
59
  add_action( 'plugins_loaded', array( $this, 'switch_theme' ) );
60
  }
61
 
62
+ add_action( 'customize_register', array( $this, 'customize_register' ) );
63
  add_action( 'plugins_loaded', array( $this, 'load_file' ) );
64
  }
65
 
1007
  $wp_customize->add_setting( 'multi_device_switcher_options[' . $name . ']', array(
1008
  'default' => $default_theme_options[ $name ],
1009
  'type' => 'option',
1010
+ 'capability' => $this->capability,
1011
  ) );
1012
 
1013
  $wp_customize->add_control( 'multi_device_switcher_options[' . $name . ']', array(
1028
  $wp_customize->add_setting( 'multi_device_switcher_options[' . $custom_switcher_option . ']', array(
1029
  'default' => __( 'None', $this->textdomain ),
1030
  'type' => 'option',
1031
+ 'capability' => $this->capability,
1032
  ) );
1033
 
1034
  $wp_customize->add_control( 'multi_device_switcher_options[' . $custom_switcher_option . ']', array(
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.3
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.4
7
  * Author: thingsym
8
  * Author URI: http://www.thingslabo.com/
9
  * License: GPL2
readme.md CHANGED
@@ -372,39 +372,31 @@ turn on default CSS
372
 
373
  Small patches and bug reports can be submitted a issue tracker in Github. Forking on Github is another good way. You can send a pull request.
374
 
375
- #### Contributors
376
-
377
- * hykw [Github](https://github.com/hykw/multi-device-switcher)
378
-
379
  ### Translations
380
 
381
- Translating a plugin takes a lot of time, effort, and patience. I really appreciate the hard work from these contributors.
382
-
383
- If you have created or updated your own language pack, you can send [gettext PO and MO files](http://codex.wordpress.org/Translating_WordPress) to author. I can bundle it into Multi Device Switcher.
384
 
385
- #### Translator
386
-
387
- - Japanese (ja) - <a href="http://global.thingslabo.com/blog/">Thingsym</a>
388
-
389
- ##### The latest PO and MO files
390
 
391
- - [POT file](http://plugins.svn.wordpress.org/multi-device-switcher/trunk/languages/multi-device-switcher.pot)
392
- - [PO files](http://plugins.svn.wordpress.org/multi-device-switcher/trunk/languages/)
393
 
394
  ##### Send your own language pack
395
 
396
  You can send your own language pack to author.
397
 
398
  - [multi-device-switcher - GitHub](https://github.com/thingsym/multi-device-switcher)
399
- - [http://global.thingslabo.com/blog/ (en)](http://global.thingslabo.com/blog/)
400
- - [http://blog.thingslabo.com (ja)](http://blog.thingslabo.com)
401
 
402
  ## Changelog
403
 
 
 
 
 
404
  * Version 1.5.3
405
- * fixed: add function multi_device_switcher_get_default_options for wp multi-device
406
  * Version 1.5.2
407
- * fixed: fix setcookie()
408
  * Version 1.5.1
409
  * fixed: fix preg_split()
410
  * Version 1.5.0
372
 
373
  Small patches and bug reports can be submitted a issue tracker in Github. Forking on Github is another good way. You can send a pull request.
374
 
 
 
 
 
375
  ### Translations
376
 
377
+ [Translate Multi Device Switcher into your language.](https://translate.wordpress.org/projects/wp-plugins/multi-device-switcher)
 
 
378
 
379
+ Translating a plugin takes a lot of time, effort, and patience. I really appreciate the hard work from these contributors.
 
 
 
 
380
 
381
+ If you have created or updated your own language pack, you can send gettext PO and MO files to author. I can bundle it into Multi Device Switcher.
 
382
 
383
  ##### Send your own language pack
384
 
385
  You can send your own language pack to author.
386
 
387
  - [multi-device-switcher - GitHub](https://github.com/thingsym/multi-device-switcher)
388
+ - [http://blog.thingslabo.com (ja)](https://blog.thingslabo.com/archives/category/multi_device_switcher)
 
389
 
390
  ## Changelog
391
 
392
+ * Version 1.5.4
393
+ * fixed: fix property keyword for testability
394
+ * fixed: fix add_action 'customize_register' with __construct()
395
+ * fixed: fix capability
396
  * Version 1.5.3
397
+ * fixed: add function multi_device_switcher_get_default_options for wp multi-device [#9](https://github.com/thingsym/multi-device-switcher/pull/9)
398
  * Version 1.5.2
399
+ * fixed: fix setcookie() [#8](https://github.com/thingsym/multi-device-switcher/pull/8)
400
  * Version 1.5.1
401
  * fixed: fix preg_split()
402
  * Version 1.5.0
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.7.1
9
- Stable tag: 1.5.3
10
  License: GPL2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -35,32 +35,20 @@ The Custom Switcher can add every device.
35
 
36
  Small patches and bug reports can be submitted a issue tracker in Github. Forking on Github is another good way. You can send a pull request.
37
 
38
- = Contributors =
39
-
40
- * hykw
41
-
42
  = Translations =
43
 
44
- Translating a plugin takes a lot of time, effort, and patience. I really appreciate the hard work from these contributors.
45
-
46
- If you have created or updated your own language pack, you can send [gettext PO and MO files](http://codex.wordpress.org/Translating_WordPress) to author. I can bundle it into Multi Device Switcher.
47
 
48
- = Translator =
49
-
50
- * Japanese (ja) - <a href="http://global.thingslabo.com/blog/">Thingsym</a>
51
-
52
- = The latest PO and MO files =
53
 
54
- * [POT file](http://plugins.svn.wordpress.org/multi-device-switcher/trunk/languages/multi-device-switcher.pot)
55
- * [PO files](http://plugins.svn.wordpress.org/multi-device-switcher/trunk/languages/)
56
 
57
  = Send your own language pack =
58
 
59
  You can send your own language pack to author.
60
 
61
  * [multi-device-switcher - GitHub](https://github.com/thingsym/multi-device-switcher)
62
- * [http://global.thingslabo.com/blog/ (en)](http://global.thingslabo.com/blog/)
63
- * [http://blog.thingslabo.com (ja)](http://blog.thingslabo.com)
64
 
65
  == Screenshots ==
66
 
@@ -371,10 +359,14 @@ For more information about the Multi Device Switcher Command, see `wp help multi
371
 
372
  == Changelog ==
373
 
 
 
 
 
374
  = 1.5.3 =
375
- * fixed: add function multi_device_switcher_get_default_options for wp multi-device
376
  = 1.5.2 =
377
- * fixed: fix setcookie()
378
  = 1.5.1 =
379
  * fixed: fix preg_split()
380
  = 1.5.0 =
@@ -449,4 +441,3 @@ For more information about the Multi Device Switcher Command, see `wp help multi
449
 
450
  = 1.1.2 =
451
  * Requires at least version 3.4 of the Wordpress
452
-
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.7.4
9
+ Stable tag: 1.5.4
10
  License: GPL2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
35
 
36
  Small patches and bug reports can be submitted a issue tracker in Github. Forking on Github is another good way. You can send a pull request.
37
 
 
 
 
 
38
  = Translations =
39
 
40
+ [Translate Multi Device Switcher into your language.](https://translate.wordpress.org/projects/wp-plugins/multi-device-switcher)
 
 
41
 
42
+ Translating a plugin takes a lot of time, effort, and patience. I really appreciate the hard work from these contributors.
 
 
 
 
43
 
44
+ If you have created or updated your own language pack, you can send gettext PO and MO files to author. I can bundle it into Multi Device Switcher.
 
45
 
46
  = Send your own language pack =
47
 
48
  You can send your own language pack to author.
49
 
50
  * [multi-device-switcher - GitHub](https://github.com/thingsym/multi-device-switcher)
51
+ - [http://blog.thingslabo.com (ja)](https://blog.thingslabo.com/archives/category/multi_device_switcher)
 
52
 
53
  == Screenshots ==
54
 
359
 
360
  == Changelog ==
361
 
362
+ = 1.5.4 =
363
+ * fixed: fix property keyword for testability
364
+ * fixed: fix add_action 'customize_register' with __construct()
365
+ * fixed: fix capability
366
  = 1.5.3 =
367
+ * fixed: add function multi_device_switcher_get_default_options for wp multi-device [#9](https://github.com/thingsym/multi-device-switcher/pull/9)
368
  = 1.5.2 =
369
+ * fixed: fix setcookie() [#8](https://github.com/thingsym/multi-device-switcher/pull/8)
370
  = 1.5.1 =
371
  * fixed: fix preg_split()
372
  = 1.5.0 =
441
 
442
  = 1.1.2 =
443
  * Requires at least version 3.4 of the Wordpress