Version Description
- add PHPDoc
- update japanese translation
- update pot
- fix composer.json
- add FUNDING.yml
- change donate link
- add sponsor link
- add GitHub actions for CI/CD, remove .travis.yml
Download this release
Release Info
Developer | thingsym |
Plugin | Multi Device Switcher |
Version | 1.8.0 |
Comparing to | |
See all releases |
Code changes from version 1.7.0 to 1.8.0
- README.md +0 -541
- languages/multi-device-switcher-ja.mo +0 -0
- languages/multi-device-switcher-ja.po +116 -43
- languages/multi-device-switcher.pot +113 -39
- multi-device-switcher.css +0 -4
- multi-device-switcher.php +27 -27
- pc-switcher-widget.php +49 -4
- readme.txt +14 -4
README.md
DELETED
@@ -1,541 +0,0 @@
|
|
1 |
-
# Introducing Multi Device Switcher
|
2 |
-
|
3 |
-
[![Build Status](https://travis-ci.org/thingsym/multi-device-switcher.svg?branch=master)](https://travis-ci.org/thingsym/multi-device-switcher)
|
4 |
-
|
5 |
-
This WordPress plugin allows you to set a separate theme for device (Smart Phone, Tablet PC, Mobile Phone, Game and custom).
|
6 |
-
This plugin detects if your site is being viewed by UserAgent, and switches to selected theme. The Custom Switcher can add every device.
|
7 |
-
|
8 |
-
## Features
|
9 |
-
|
10 |
-
- Set a separate theme for device (Smart Phone, Tablet PC, Mobile Phone, Game), switches to selected theme.
|
11 |
-
- Add every device by the **Custom Switcher**.
|
12 |
-
- Add links 'Mobile' or 'PC' in the theme by the **PC Switcher**, switch to the default theme.
|
13 |
-
- Switch the content of the post or page for each device by the **Display Switcher** Shortcode.
|
14 |
-
- Disable the switching of the theme by a particular URL by the **Disable Switcher**.
|
15 |
-
- Can be using is_multi_device() function that detect of the device.
|
16 |
-
- **Multi Device Switcher Command** command-line tool (required WP-CLI)
|
17 |
-
|
18 |
-
## How do I use it ?
|
19 |
-
|
20 |
-
1. Download and unzip files. Or install multi-device-switcher using the WordPress plugin installer. In that case, skip 2.
|
21 |
-
2. Upload "multi-device-switcher" to the "/wp-content/plugins/" directory.
|
22 |
-
3. Activate the plugin through the 'Plugins' menu in WordPress.
|
23 |
-
4. Upload a separate theme to the "/wp-content/themes/" directory.
|
24 |
-
5. Go to the "Multi Device Switcher" options page through the 'Appearance' menu in WordPress.
|
25 |
-
6. Configure settings to your needs. Select Theme by Theme option. Add and fix UserAgent by UserAgent option if necessary.
|
26 |
-
7. Have fun!
|
27 |
-
|
28 |
-
## Screenshot
|
29 |
-
|
30 |
-
<img src="screenshot-1.png">
|
31 |
-
<img src="screenshot-2.png">
|
32 |
-
<img src="screenshot-3.png">
|
33 |
-
<img src="screenshot-4.png">
|
34 |
-
<img src="screenshot-5.png">
|
35 |
-
|
36 |
-
## How to add the Custom Switcher
|
37 |
-
|
38 |
-
1. Go to the "Multi Device Switcher" options page through the 'Appearance' menu in WordPress.
|
39 |
-
2. Enter the name of the Custom Switcher (20 characters max, alphanumeric) to the 'Add Custom Switcher'. Push the button 'Add'.
|
40 |
-
3. Configure settings. Select Theme by Theme option. Add UserAgent by UserAgent option.
|
41 |
-
4. Have fun!
|
42 |
-
|
43 |
-
## Setting and Using the PC Switcher
|
44 |
-
|
45 |
-
There are three ways how to Using the PC Switcher.
|
46 |
-
|
47 |
-
<img src="screenshot-4.png">
|
48 |
-
|
49 |
-
### 1. Add a PC Switcher to the footer
|
50 |
-
|
51 |
-
1. Go to the "Multi Device Switcher" options page through the 'Appearance' menu in WordPress.
|
52 |
-
2. Configure settings. Check the checkbox 'Add a PC Switcher to the footer.' by PC Switcher option.
|
53 |
-
3. Have fun!
|
54 |
-
|
55 |
-
### 2. Add a PC Switcher to your sidebars/widget areas
|
56 |
-
|
57 |
-
1. Add-on the widget 'PC Switcher', when you activate the plugin "Multi Device Switcher".
|
58 |
-
2. Go to the "Widgets" options page through the 'Appearance' menu in WordPress.
|
59 |
-
3. Drag and drop the title bars 'PC Switcher' into the desired area.
|
60 |
-
4. Have fun!
|
61 |
-
|
62 |
-
### 3. For the theme authors and developers, add a PC Switcher to your theme.
|
63 |
-
|
64 |
-
1. Add the following code into the PHP files, when you develop your theme.
|
65 |
-
```
|
66 |
-
<?php if ( function_exists('multi_device_switcher_add_pc_switcher') ) { multi_device_switcher_add_pc_switcher(); } ?>
|
67 |
-
```
|
68 |
-
2. Have fun!
|
69 |
-
|
70 |
-
### Using default CSS and customized CSS
|
71 |
-
|
72 |
-
1. Go to the "Multi Device Switcher" options page through the 'Appearance' menu in WordPress.
|
73 |
-
2. Configure settings. Check the checkbox 'Add a default CSS.' by PC Switcher option. If you want to customize CSS, uncheck the checkbox.
|
74 |
-
3. Have fun!
|
75 |
-
|
76 |
-
You can design the PC Switcher in the Style Sheet.
|
77 |
-
|
78 |
-
#### HTML output of the PC Switcher
|
79 |
-
|
80 |
-
```
|
81 |
-
<div class="pc-switcher"><span class="active">Mobile</span><a href="http://DOMEIN/PATH/TO/?pc-switcher=1">PC</a></div>
|
82 |
-
```
|
83 |
-
|
84 |
-
#### HTML output of the PC Switcher when switched
|
85 |
-
|
86 |
-
```
|
87 |
-
<div class="pc-switcher"><a href="http://DOMEIN/PATH/TO/?pc-switcher=0">Mobile</a><span class="active">PC</span></div>
|
88 |
-
```
|
89 |
-
|
90 |
-
## How to use the Display Switcher Shortcode
|
91 |
-
|
92 |
-
The **Display Switcher** Shortcode switch the content of the post or page through the detection of the device.
|
93 |
-
|
94 |
-
Add the shortcode `[multi]` in a post or page and use the `device` attribute to device name. if the device attribute is empty, detect the desktop PC.
|
95 |
-
|
96 |
-
### Attributes
|
97 |
-
|
98 |
-
**device**
|
99 |
-
|
100 |
-
(string | empty) The name of the device
|
101 |
-
|
102 |
-
* smart
|
103 |
-
* tablet
|
104 |
-
* mobile
|
105 |
-
* game
|
106 |
-
* the name of the Custom Switcher
|
107 |
-
|
108 |
-
if empty, detect the desktop PC
|
109 |
-
|
110 |
-
### Example Shortcode
|
111 |
-
|
112 |
-
```
|
113 |
-
[multi]pc or other specific stuff here[/multi]
|
114 |
-
[multi device="smart"]smartphone specific stuff here[/multi]
|
115 |
-
[multi device="tablet"]tablet specific stuff here[/multi]
|
116 |
-
[multi device="test"]test Custom Switcher specific stuff here[/multi]
|
117 |
-
```
|
118 |
-
|
119 |
-
For theme or plugin developers. Filters The Display Switcher Shortcode through hooks. In that case, edit theme or plugin files.
|
120 |
-
|
121 |
-
```
|
122 |
-
<?php
|
123 |
-
echo do_shortcode('[multi device="smart"]smartphone specific stuff here[/multi]');
|
124 |
-
?>
|
125 |
-
```
|
126 |
-
|
127 |
-
## How to use the Disable Switcher
|
128 |
-
|
129 |
-
The **Disable Switcher** disable the switching of the theme by a particular URL. If you match the access the url and a string or a regular expression (Regex mode), disable the switching of the theme. Regex mode is for advanced users.
|
130 |
-
|
131 |
-
1. Go to the "Multi Device Switcher" options page through the 'Appearance' menu in WordPress.
|
132 |
-
2. Enter the path to the line by line where you want to disable by Disable Switcher option. Check the checkbox 'Enable Regex', if you want to use a regular expression.
|
133 |
-
3. Have fun!
|
134 |
-
|
135 |
-
### Example
|
136 |
-
|
137 |
-
```
|
138 |
-
/sample-page
|
139 |
-
/2015/01/hello-world
|
140 |
-
```
|
141 |
-
|
142 |
-
##### Regex mode (in the case of regular expression)
|
143 |
-
|
144 |
-
```
|
145 |
-
\/sample\-
|
146 |
-
\/2015\/01
|
147 |
-
```
|
148 |
-
|
149 |
-
## UserAgent option Samples
|
150 |
-
|
151 |
-
* [Default UserAgent](https://github.com/thingsym/multi-device-switcher/wiki/Default-UserAgent)
|
152 |
-
|
153 |
-
|
154 |
-
## Detect the device by JavaScript
|
155 |
-
|
156 |
-
Multi Device Switcher set the Cookie that holds the state of the switch. You can get the Cookie and detect the device by JavaScript.
|
157 |
-
|
158 |
-
### Cookies
|
159 |
-
|
160 |
-
* `multi-device-switcher` The name of the device is switched (value: null | device name)
|
161 |
-
* `disable-switcher` State of disabled (value: null | 1)
|
162 |
-
* `pc-switcher` State of the PC Switcher when switched (value: null | 1)
|
163 |
-
|
164 |
-
### Example
|
165 |
-
|
166 |
-
```
|
167 |
-
<script src="http://DOMEIN/PATH/TO/jquery.cookie.js"></script>
|
168 |
-
<script>
|
169 |
-
(function($) {
|
170 |
-
$(function() {
|
171 |
-
if ( $.cookie( 'multi-device-switcher' ) == 'smart' ) {
|
172 |
-
/* smartphone specific stuff here */
|
173 |
-
} else if ( $.cookie( 'multi-device-switcher' ) == 'tablet' ) {
|
174 |
-
/* tablet specific stuff here */
|
175 |
-
} else {
|
176 |
-
/* pc or other specific stuff here */
|
177 |
-
}
|
178 |
-
});
|
179 |
-
})(jQuery);
|
180 |
-
</script>
|
181 |
-
```
|
182 |
-
|
183 |
-
## is_multi_device() function
|
184 |
-
|
185 |
-
**is_multi_device()** function is a boolean function, meaning it returns either TRUE or FALSE. Works through the detection of the device by the Multi_Device_Switcher class.
|
186 |
-
|
187 |
-
### Usage
|
188 |
-
|
189 |
-
```
|
190 |
-
<?php is_multi_device('smart'); ?>
|
191 |
-
```
|
192 |
-
|
193 |
-
### Example
|
194 |
-
|
195 |
-
```
|
196 |
-
<?php
|
197 |
-
if ( function_exists( 'is_multi_device' ) ) {
|
198 |
-
if ( is_multi_device('smart') ) {
|
199 |
-
/* Display and echo smartphone specific stuff here */
|
200 |
-
} elseif ( is_multi_device('tablet') ) {
|
201 |
-
/* Display and echo tablet specific stuff here */
|
202 |
-
} else {
|
203 |
-
/* Display and echo pc or other specific stuff here */
|
204 |
-
}
|
205 |
-
}
|
206 |
-
?>
|
207 |
-
```
|
208 |
-
|
209 |
-
### Parameters
|
210 |
-
|
211 |
-
**device name** (required)
|
212 |
-
|
213 |
-
(string) The name of the device
|
214 |
-
|
215 |
-
* smart
|
216 |
-
* tablet
|
217 |
-
* mobile
|
218 |
-
* game
|
219 |
-
* the name of the Custom Switcher
|
220 |
-
|
221 |
-
### Return Values
|
222 |
-
|
223 |
-
(boolean) Return boolean whether a particular device.
|
224 |
-
|
225 |
-
## is_pc_switcher() function
|
226 |
-
|
227 |
-
**is_pc_switcher()** function is a boolean function, meaning it returns either TRUE or FALSE. Return the the state of PC Switcher by the Multi_Device_Switcher class. Return true if the theme has switched by the PC Switcher.
|
228 |
-
|
229 |
-
### Usage
|
230 |
-
|
231 |
-
```
|
232 |
-
<?php is_pc_switcher(); ?>
|
233 |
-
```
|
234 |
-
|
235 |
-
### Example
|
236 |
-
|
237 |
-
```
|
238 |
-
<?php
|
239 |
-
if ( function_exists( 'is_pc_switcher' ) ) {
|
240 |
-
if ( is_pc_switcher() ) {
|
241 |
-
/* Theme switched by the PC Switcher. Display and echo specific stuff here */
|
242 |
-
} else {
|
243 |
-
/* Display and echo specific stuff here */
|
244 |
-
}
|
245 |
-
}
|
246 |
-
?>
|
247 |
-
```
|
248 |
-
|
249 |
-
### Parameters
|
250 |
-
|
251 |
-
None
|
252 |
-
|
253 |
-
### Return Values
|
254 |
-
|
255 |
-
(boolean) Return the state of PC Switcher.
|
256 |
-
|
257 |
-
|
258 |
-
## is_disable_switcher() function
|
259 |
-
|
260 |
-
**is_disable_switcher()** function is a boolean function, meaning it returns either TRUE or FALSE. Return the state of disabled by the Multi_Device_Switcher class.
|
261 |
-
|
262 |
-
### Usage
|
263 |
-
|
264 |
-
```
|
265 |
-
<?php is_disable_switcher(); ?>
|
266 |
-
```
|
267 |
-
|
268 |
-
### Example
|
269 |
-
|
270 |
-
```
|
271 |
-
<?php
|
272 |
-
if ( function_exists( 'is_disable_switcher' ) ) {
|
273 |
-
if ( is_disable_switcher() ) {
|
274 |
-
/* Disabled. Display and echo specific stuff here */
|
275 |
-
} else {
|
276 |
-
/* Display and echo specific stuff here */
|
277 |
-
}
|
278 |
-
}
|
279 |
-
?>
|
280 |
-
```
|
281 |
-
|
282 |
-
### Parameters
|
283 |
-
|
284 |
-
None
|
285 |
-
|
286 |
-
### Return Values
|
287 |
-
|
288 |
-
(boolean) Return the state of disabled.
|
289 |
-
|
290 |
-
## Hooks
|
291 |
-
|
292 |
-
### Filter hooks
|
293 |
-
|
294 |
-
* multi_device_switcher/get_options
|
295 |
-
* multi_device_switcher/get_option
|
296 |
-
* multi_device_switcher/add_header_vary
|
297 |
-
* multi_device_switcher/validate_options
|
298 |
-
|
299 |
-
### Action hooks
|
300 |
-
|
301 |
-
* multi_device_switcher/detect_device
|
302 |
-
|
303 |
-
## Multi Device Switcher Command
|
304 |
-
|
305 |
-
The **Multi Device Switcher Command** is command-line tool.
|
306 |
-
|
307 |
-
Add-on the Multi Device Switcher Command, when you activate the plugin "Multi Device Switcher". To use the Multi Device Switcher Command is WP-CLI required.
|
308 |
-
|
309 |
-
### NAME
|
310 |
-
|
311 |
-
wp multi-device
|
312 |
-
|
313 |
-
### DESCRIPTION
|
314 |
-
|
315 |
-
Multi Device Switcher Command
|
316 |
-
|
317 |
-
### SYNOPSIS
|
318 |
-
|
319 |
-
wp multi-device <command>
|
320 |
-
|
321 |
-
### SUBCOMMANDS
|
322 |
-
|
323 |
-
add add Custom Switcher
|
324 |
-
css turn on/off default CSS
|
325 |
-
delete delete Custom Switcher
|
326 |
-
pc-switcher turn on/off PC Switcher
|
327 |
-
reset reset Settings to Default UserAgent
|
328 |
-
status get status of settings
|
329 |
-
theme get or switch a theme
|
330 |
-
useragent get or set UserAgent
|
331 |
-
|
332 |
-
|
333 |
-
For more information about the Multi Device Switcher Command, see `wp help multi-device <SUBCOMMANDS>`.
|
334 |
-
|
335 |
-
|
336 |
-
### Command examples
|
337 |
-
|
338 |
-
get status of settings
|
339 |
-
|
340 |
-
wp multi-device status
|
341 |
-
|
342 |
-
Active Theme: Twenty Fifteen | twentyfifteen
|
343 |
-
+--------------------------+-----------------+----------------+-------------------------------------------------------------------------+
|
344 |
-
| Device | Theme | Slug | UserAgent |
|
345 |
-
+--------------------------+-----------------+----------------+-------------------------------------------------------------------------+
|
346 |
-
| smartphone (Smart Phone) | Twenty Fourteen | twentyfourteen | iPhone, iPod, Android, dream, CUPCAKE, Windows Phone, webOS, BB10, Blac |
|
347 |
-
| | | | kBerry8707, BlackBerry9000, BlackBerry9300, BlackBerry9500, BlackBerry9 |
|
348 |
-
| | | | 530, BlackBerry9520, BlackBerry9550, BlackBerry9700, BlackBerry 93, Bla |
|
349 |
-
| | | | ckBerry 97, BlackBerry 99, BlackBerry 98 |
|
350 |
-
| tablet (Tablet PC) | Twenty Thirteen | twentythirteen | iPad, Kindle, Sony Tablet, Nexus 7 |
|
351 |
-
| mobile (Mobile Phone) | Twenty Twelve | twentytwelve | DoCoMo, SoftBank, J-PHONE, Vodafone, KDDI, UP.Browser, WILLCOM, emobile |
|
352 |
-
| | | | , DDIPOCKET, Windows CE, BlackBerry, Symbian, PalmOS, Huawei, IAC, Noki |
|
353 |
-
| | | | a |
|
354 |
-
| game (Game Platforms) | Twenty Eleven | twentyeleven | PlayStation Portable, PlayStation Vita, PSP, PS2, PLAYSTATION 3, PlaySt |
|
355 |
-
| | | | ation 4, Nitro, Nintendo 3DS, Nintendo Wii, Nintendo WiiU, Xbox |
|
356 |
-
+--------------------------+-----------------+----------------+-------------------------------------------------------------------------+
|
357 |
-
PC Switcher: on
|
358 |
-
default CSS: on
|
359 |
-
|
360 |
-
switch twentyfifteen in theme of smartphone using theme slug
|
361 |
-
|
362 |
-
wp multi-device theme smartphone twentyfifteen
|
363 |
-
|
364 |
-
set UserAgent in theme of tablet
|
365 |
-
|
366 |
-
wp multi-device useragent tablet 'iPad, Kindle, Sony Tablet, Nexus 7'
|
367 |
-
|
368 |
-
add example Custom Switcher
|
369 |
-
|
370 |
-
wp multi-device add example
|
371 |
-
|
372 |
-
add example Custom Switcher. set twentyfifteen theme and UserAgent using theme slug
|
373 |
-
|
374 |
-
wp multi-device add example twentyfifteen 'iPad, Kindle, Sony Tablet, Nexus 7'
|
375 |
-
|
376 |
-
delete example Custom Switcher
|
377 |
-
|
378 |
-
wp multi-device delete example
|
379 |
-
|
380 |
-
turn on default CSS
|
381 |
-
|
382 |
-
wp multi-device css on
|
383 |
-
|
384 |
-
## Resources
|
385 |
-
|
386 |
-
* [Developer Blog (Japanese) - http://blog.thingslabo.com/ ](https://blog.thingslabo.com/archives/category/multi_device_switcher)
|
387 |
-
|
388 |
-
## WordPress Plugin Directory
|
389 |
-
|
390 |
-
Multi Device Switcher is hosted on the WordPress Plugin Directory.
|
391 |
-
|
392 |
-
[https://wordpress.org/plugins/multi-device-switcher/](https://wordpress.org/plugins/multi-device-switcher/)
|
393 |
-
|
394 |
-
## Test Matrix
|
395 |
-
|
396 |
-
For operation compatibility between PHP version and WordPress version, see below [Travis CI](https://travis-ci.org/thingsym/multi-device-switcher).
|
397 |
-
|
398 |
-
## Contribution
|
399 |
-
|
400 |
-
### Patches and Bug Fixes
|
401 |
-
|
402 |
-
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.
|
403 |
-
|
404 |
-
1. Fork [Multi Device Switcher](https://github.com/thingsym/multi-device-switcher) from GitHub repository
|
405 |
-
2. Create a feature branch: git checkout -b my-new-feature
|
406 |
-
3. Commit your changes: git commit -am 'Add some feature'
|
407 |
-
4. Push to the branch: git push origin my-new-feature
|
408 |
-
5. Create new Pull Request
|
409 |
-
|
410 |
-
## Changelog
|
411 |
-
|
412 |
-
* Version 1.7.0
|
413 |
-
* add test case for cdn
|
414 |
-
* add multi_device_switcher/detect_device action hook
|
415 |
-
* split switch_theme method into detect_device and switch_theme
|
416 |
-
* fix wp-cli
|
417 |
-
* add bats test case for cli
|
418 |
-
* refactoring with phpstan
|
419 |
-
* fix default options via method
|
420 |
-
* change tag name
|
421 |
-
* change method name
|
422 |
-
* improve get_options method
|
423 |
-
* replace from get_default_options() to class value default_options
|
424 |
-
* fix not valid snake_case format
|
425 |
-
* add public as access modifier keywords
|
426 |
-
* add PHPDoc
|
427 |
-
* add reset-wp-tests.sh, uninstall-wp-tests.sh
|
428 |
-
* fix header
|
429 |
-
* fix textdomain
|
430 |
-
* fix indent and reformat with phpcs and phpcbf
|
431 |
-
* add composer.json for test
|
432 |
-
* add static code analysis config
|
433 |
-
* Version 1.6.2
|
434 |
-
* add prefix into hook tag, change tag name from add_header_vary to multi_device_switcher_add_header_vary
|
435 |
-
* for php5.3, change called function via hook from anonymous function to public function
|
436 |
-
* Version 1.6.1
|
437 |
-
* add test cases
|
438 |
-
* add add_header_vary filter
|
439 |
-
* improve cookie settings via wp_headers hook
|
440 |
-
* change readme.md file name to upper case
|
441 |
-
* add LICENSE file
|
442 |
-
* Version 1.6.0
|
443 |
-
* change Requires at least version 3.7
|
444 |
-
* remove cache with PC Switcher widget
|
445 |
-
* add init function
|
446 |
-
* change hook destination from plugin_action_links to plugin_action_links_{$plugin_file}
|
447 |
-
* add load_textdomain function
|
448 |
-
* add define variable \_\_MULTI_DEVICE_SWITCHER_FILE\_\_
|
449 |
-
* check class Multi_Device_Switcher
|
450 |
-
* check ABSPATH
|
451 |
-
* add isset to conditional statement
|
452 |
-
* fix boolean
|
453 |
-
* add tests
|
454 |
-
* Version 1.5.4
|
455 |
-
* fixed: fix property keyword for testability
|
456 |
-
* fixed: fix add_action 'customize_register' with \_\_construct()
|
457 |
-
* fixed: fix capability
|
458 |
-
* Version 1.5.3
|
459 |
-
* fixed: add function multi_device_switcher_get_default_options for wp multi-device [#9](https://github.com/thingsym/multi-device-switcher/pull/9)
|
460 |
-
* Version 1.5.2
|
461 |
-
* fixed: fix setcookie() [#8](https://github.com/thingsym/multi-device-switcher/pull/8)
|
462 |
-
* Version 1.5.1
|
463 |
-
* fixed: fix preg_split()
|
464 |
-
* Version 1.5.0
|
465 |
-
* fixed: refactoring by the PHP_CodeSniffer
|
466 |
-
* fixed: change admin functions to class/object methods
|
467 |
-
* Version 1.4.2
|
468 |
-
* edited: edit readme
|
469 |
-
* new features: Display Switcher Shortcode
|
470 |
-
* updated: update default UserAgent
|
471 |
-
* fixed: fix pc-switcher ssl url
|
472 |
-
* Version 1.4.1
|
473 |
-
* edited: edit readme
|
474 |
-
* new features: is_disable_switcher() function
|
475 |
-
* new features: is_pc_switcher() function
|
476 |
-
* fixed: fix redirect url and pc-switcher url
|
477 |
-
* Version 1.4.0
|
478 |
-
* edited: edit readme
|
479 |
-
* added: add cookies 'multi-device-switcher', 'disable-switcher'
|
480 |
-
* new features: Disable Switcher
|
481 |
-
* fixed: fix get_options_userAgent(), multi_device_switcher_get_options()
|
482 |
-
* fixed: add reserved words validate
|
483 |
-
* new features: Multi Device Switcher Command
|
484 |
-
* added: add option settings into Theme Customizer
|
485 |
-
* fixed: refactoring by the PHP_CodeSniffer
|
486 |
-
* Version 1.3.0
|
487 |
-
* fixed: fix script, style, html and readme
|
488 |
-
* new features: is_multi_device() function
|
489 |
-
* fixed: fix translation
|
490 |
-
* updated: update default UserAgent
|
491 |
-
* fixed: replace WP_PLUGIN_URL with plugins_url()
|
492 |
-
* fixed: using Page Hook Suffix
|
493 |
-
* merged: pull request [#3](https://github.com/thingsym/multi-device-switcher/pull/3)
|
494 |
-
* Version 1.2.3
|
495 |
-
* fixed: fix redirect uri with query string, using add_query_arg
|
496 |
-
* fixed: fix translation
|
497 |
-
* fixed: fix readme
|
498 |
-
* Version 1.2.2
|
499 |
-
* improved: improve responsiveness UI
|
500 |
-
* fixed: fix html
|
501 |
-
* Version 1.2.1
|
502 |
-
* fixed: delete add_contextual_help
|
503 |
-
* fixed: fix readme and html
|
504 |
-
* Version 1.2.0
|
505 |
-
* added: add PC Switcher Widget
|
506 |
-
* new features: PC Switcher
|
507 |
-
* added: add the settings link to the plugin page
|
508 |
-
* Version 1.1.2
|
509 |
-
* required: at least version 3.4
|
510 |
-
* fixed: fix tabs and buttons
|
511 |
-
* Version 1.1.1
|
512 |
-
* fixed: change the order of the UserAgent detection
|
513 |
-
* updated: update default UserAgent
|
514 |
-
* added: add HTTP/1.1 Vary header
|
515 |
-
* Version 1.1.0
|
516 |
-
* new features: Custom Switcher
|
517 |
-
* Version 1.0.4
|
518 |
-
* fixed: fix the object model PHP5, \_\_construct() to replace Multi_Device_Switcher
|
519 |
-
* fixed: wp_get_themes(), and wp_get_theme() to replace get_themes(), get_theme()
|
520 |
-
* Version 1.0.3
|
521 |
-
* updated: update screenshots
|
522 |
-
* fixed: fix reset button
|
523 |
-
* Version 1.0.2
|
524 |
-
* added: add file uninstall.php
|
525 |
-
* fixed: split admin_enqueue_scripts() into two functions
|
526 |
-
* fixed: detects is_admin()
|
527 |
-
* Version 1.0.1
|
528 |
-
* fixed: split multi_device_switcher_init() into two functions
|
529 |
-
* Version 1.0.0
|
530 |
-
* Initial release.
|
531 |
-
|
532 |
-
## Upgrade Notice
|
533 |
-
|
534 |
-
* Version 1.6.0
|
535 |
-
* Requires at least version 3.7 of the WordPress
|
536 |
-
* Version 1.1.2
|
537 |
-
* Requires at least version 3.4 of the WordPress
|
538 |
-
|
539 |
-
## License
|
540 |
-
|
541 |
-
Licensed under [GPLv2](https://www.gnu.org/licenses/gpl-2.0.html).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/multi-device-switcher-ja.mo
CHANGED
Binary file
|
languages/multi-device-switcher-ja.po
CHANGED
@@ -1,125 +1,198 @@
|
|
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: Multi Device Switcher\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"
|
6 |
-
"
|
7 |
-
"Last-Translator: \n"
|
8 |
-
"Language-Team: Thingsym\n"
|
9 |
-
"Language: ja_JP\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
msgid "Multi Device Switcher"
|
15 |
msgstr "マルチデバイス"
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
msgid "This WordPress plugin allows you to set a separate theme for device (Smart Phone, Tablet PC, Mobile Phone, Game and custom)."
|
18 |
msgstr "デバイスごとに個別のテーマを設定して自動的にテーマが切り替わります。 (スマートフォン、タブレット端末、携帯モバイル、ゲーム、カスタム設定に対応)"
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
msgid "Settings"
|
21 |
msgstr "設定"
|
22 |
|
|
|
|
|
|
|
|
|
|
|
23 |
msgid "Theme"
|
24 |
msgstr "テーマ"
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
msgid "Smart Phone Theme"
|
30 |
msgstr "スマートフォン用テーマ"
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
msgid "Tablet PC Theme"
|
33 |
msgstr "タブレット端末用テーマ"
|
34 |
|
|
|
|
|
35 |
msgid "Mobile Phone Theme"
|
36 |
msgstr "携帯モバイル端末用テーマ"
|
37 |
|
|
|
|
|
38 |
msgid "Game Platforms Theme"
|
39 |
msgstr "ゲームプラットフォーム用テーマ"
|
40 |
|
|
|
41 |
msgid "Custom Switcher Theme"
|
42 |
msgstr "Custom Switcher用テーマ"
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
msgid "20 characters max, alphanumeric"
|
45 |
msgstr "半角英数字 20 文字以内"
|
46 |
|
|
|
|
|
|
|
|
|
|
|
47 |
msgid "Enter Comma-separated values (csv) format."
|
48 |
msgstr "csv 形式で入力してください。"
|
49 |
|
|
|
50 |
msgid "Smart Phone"
|
51 |
msgstr "スマートフォン"
|
52 |
|
|
|
53 |
msgid "Tablet PC"
|
54 |
msgstr "タブレット端末"
|
55 |
|
|
|
56 |
msgid "Mobile Phone"
|
57 |
msgstr "携帯モバイル端末"
|
58 |
|
|
|
59 |
msgid "Game Platforms"
|
60 |
msgstr "ゲームプラットフォーム"
|
61 |
|
|
|
62 |
msgid "Reset Settings to Default UserAgent"
|
63 |
msgstr "ユーザーエージェントをデフォルトにもどす"
|
64 |
|
|
|
65 |
msgid "Custom Switcher UserAgent"
|
66 |
msgstr "Custom Switcher用ユーザーエージェント"
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
msgstr "なし"
|
73 |
-
|
74 |
-
msgid "Add"
|
75 |
-
msgstr "追加"
|
76 |
-
|
77 |
-
msgid "Delete"
|
78 |
-
msgstr "削除"
|
79 |
|
|
|
|
|
80 |
msgid "Add PC Switcher"
|
81 |
msgstr "PC Switcher を追加"
|
82 |
|
|
|
83 |
msgid "Add a PC Switcher to the footer."
|
84 |
msgstr "PC Switcher をフッターに追加する"
|
85 |
|
|
|
|
|
86 |
msgid "Add default CSS"
|
87 |
msgstr "デフォルトCSSを追加"
|
88 |
|
|
|
89 |
msgid "Add a default CSS."
|
90 |
-
msgstr "デフォルトCSS
|
91 |
-
|
92 |
-
msgid "Mobile"
|
93 |
-
msgstr "モバイル"
|
94 |
-
|
95 |
-
msgid "PC"
|
96 |
-
msgstr "PC"
|
97 |
-
|
98 |
-
msgid "Are you sure you want to delete %1$s ?"
|
99 |
-
msgstr "%1$s を削除してよろしいですか?"
|
100 |
|
|
|
101 |
msgid "Disable Switcher"
|
102 |
msgstr "切り替え無効"
|
103 |
|
|
|
|
|
104 |
msgid "Path"
|
105 |
msgstr "パス"
|
106 |
|
|
|
|
|
107 |
msgid "Regex mode"
|
108 |
msgstr "正規表現モード"
|
109 |
|
|
|
110 |
msgid "Enable Regex"
|
111 |
msgstr "正規表現を有効化"
|
112 |
|
113 |
-
|
114 |
-
msgstr "ドネーションウェア (寄付)"
|
115 |
-
|
116 |
-
msgid "If you like this plugin, please donate to support development and maintenance."
|
117 |
-
msgstr "よろしければ、開発とメンテナンスのために寄付していただければうれしいです。"
|
118 |
-
|
119 |
-
# pc-switcher-widget.php
|
120 |
-
msgid "PC Switcher Widget add-on for the Multi Device Switcher. Use this widget to add the PC Switcher to a widget."
|
121 |
-
msgstr ""
|
122 |
-
|
123 |
msgid "Add the PC Switcher to a widget."
|
124 |
msgstr "PC Switcher をウィジェットに追加"
|
125 |
-
|
1 |
+
# Copyright (C) 2021 thingsym
|
2 |
+
# This file is distributed under the same license as the Multi Device Switcher plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Multi Device Switcher 1.8.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/multi-device-switcher\n"
|
7 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
|
|
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-02-15T11:37:48+00:00\n"
|
13 |
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
+
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
+
"X-Domain: multi-device-switcher\n"
|
16 |
+
|
17 |
+
#. Plugin Name of the plugin
|
18 |
+
#: multi-device-switcher.php:729
|
19 |
+
#: multi-device-switcher.php:730
|
20 |
+
#: multi-device-switcher.php:890
|
21 |
+
#: multi-device-switcher.php:1340
|
22 |
msgid "Multi Device Switcher"
|
23 |
msgstr "マルチデバイス"
|
24 |
|
25 |
+
#. Plugin URI of the plugin
|
26 |
+
msgid "https://github.com/thingsym/multi-device-switcher"
|
27 |
+
msgstr "https://github.com/thingsym/multi-device-switcher"
|
28 |
+
|
29 |
+
#. Description of the plugin
|
30 |
msgid "This WordPress plugin allows you to set a separate theme for device (Smart Phone, Tablet PC, Mobile Phone, Game and custom)."
|
31 |
msgstr "デバイスごとに個別のテーマを設定して自動的にテーマが切り替わります。 (スマートフォン、タブレット端末、携帯モバイル、ゲーム、カスタム設定に対応)"
|
32 |
|
33 |
+
#. Author of the plugin
|
34 |
+
msgid "thingsym"
|
35 |
+
msgstr "thingsym"
|
36 |
+
|
37 |
+
#. Author URI of the plugin
|
38 |
+
msgid "https://www.thingslabo.com/"
|
39 |
+
msgstr "https://www.thingslabo.com/"
|
40 |
+
|
41 |
+
#: multi-device-switcher.php:512
|
42 |
+
#: multi-device-switcher.php:518
|
43 |
+
msgid "Mobile"
|
44 |
+
msgstr "モバイル"
|
45 |
+
|
46 |
+
#: multi-device-switcher.php:512
|
47 |
+
#: multi-device-switcher.php:518
|
48 |
+
msgid "PC"
|
49 |
+
msgstr "PC"
|
50 |
+
|
51 |
+
#: multi-device-switcher.php:775
|
52 |
msgid "Settings"
|
53 |
msgstr "設定"
|
54 |
|
55 |
+
#: multi-device-switcher.php:800
|
56 |
+
msgid "Become a sponsor (GitHub Sponsors)"
|
57 |
+
msgstr "スポンサーになる (GitHub Sponsors)"
|
58 |
+
|
59 |
+
#: multi-device-switcher.php:912
|
60 |
msgid "Theme"
|
61 |
msgstr "テーマ"
|
62 |
|
63 |
+
#: multi-device-switcher.php:914
|
64 |
+
#: multi-device-switcher.php:1331
|
|
|
65 |
msgid "Smart Phone Theme"
|
66 |
msgstr "スマートフォン用テーマ"
|
67 |
|
68 |
+
#: multi-device-switcher.php:923
|
69 |
+
#: multi-device-switcher.php:926
|
70 |
+
#: multi-device-switcher.php:955
|
71 |
+
#: multi-device-switcher.php:958
|
72 |
+
#: multi-device-switcher.php:987
|
73 |
+
#: multi-device-switcher.php:990
|
74 |
+
#: multi-device-switcher.php:1019
|
75 |
+
#: multi-device-switcher.php:1022
|
76 |
+
#: multi-device-switcher.php:1065
|
77 |
+
#: multi-device-switcher.php:1068
|
78 |
+
#: multi-device-switcher.php:1321
|
79 |
+
#: multi-device-switcher.php:1376
|
80 |
+
msgid "None"
|
81 |
+
msgstr "なし"
|
82 |
+
|
83 |
+
#: multi-device-switcher.php:947
|
84 |
+
#: multi-device-switcher.php:1332
|
85 |
msgid "Tablet PC Theme"
|
86 |
msgstr "タブレット端末用テーマ"
|
87 |
|
88 |
+
#: multi-device-switcher.php:979
|
89 |
+
#: multi-device-switcher.php:1333
|
90 |
msgid "Mobile Phone Theme"
|
91 |
msgstr "携帯モバイル端末用テーマ"
|
92 |
|
93 |
+
#: multi-device-switcher.php:1011
|
94 |
+
#: multi-device-switcher.php:1334
|
95 |
msgid "Game Platforms Theme"
|
96 |
msgstr "ゲームプラットフォーム用テーマ"
|
97 |
|
98 |
+
#: multi-device-switcher.php:1045
|
99 |
msgid "Custom Switcher Theme"
|
100 |
msgstr "Custom Switcher用テーマ"
|
101 |
|
102 |
+
#: multi-device-switcher.php:1083
|
103 |
+
msgid "Delete"
|
104 |
+
msgstr "削除"
|
105 |
+
|
106 |
+
#: multi-device-switcher.php:1083
|
107 |
+
msgid "Are you sure you want to delete %1$s ?"
|
108 |
+
msgstr "%1$s を削除してよろしいですか?"
|
109 |
+
|
110 |
+
#: multi-device-switcher.php:1094
|
111 |
+
#: multi-device-switcher.php:1096
|
112 |
+
msgid "Add Custom Switcher"
|
113 |
+
msgstr "Custom Switcher を追加"
|
114 |
+
|
115 |
+
#: multi-device-switcher.php:1098
|
116 |
+
msgid "Add"
|
117 |
+
msgstr "追加"
|
118 |
+
|
119 |
+
#: multi-device-switcher.php:1099
|
120 |
msgid "20 characters max, alphanumeric"
|
121 |
msgstr "半角英数字 20 文字以内"
|
122 |
|
123 |
+
#: multi-device-switcher.php:1107
|
124 |
+
msgid "UserAgent"
|
125 |
+
msgstr "ユーザーエージェント"
|
126 |
+
|
127 |
+
#: multi-device-switcher.php:1108
|
128 |
msgid "Enter Comma-separated values (csv) format."
|
129 |
msgstr "csv 形式で入力してください。"
|
130 |
|
131 |
+
#: multi-device-switcher.php:1111
|
132 |
msgid "Smart Phone"
|
133 |
msgstr "スマートフォン"
|
134 |
|
135 |
+
#: multi-device-switcher.php:1114
|
136 |
msgid "Tablet PC"
|
137 |
msgstr "タブレット端末"
|
138 |
|
139 |
+
#: multi-device-switcher.php:1117
|
140 |
msgid "Mobile Phone"
|
141 |
msgstr "携帯モバイル端末"
|
142 |
|
143 |
+
#: multi-device-switcher.php:1120
|
144 |
msgid "Game Platforms"
|
145 |
msgstr "ゲームプラットフォーム"
|
146 |
|
147 |
+
#: multi-device-switcher.php:1124
|
148 |
msgid "Reset Settings to Default UserAgent"
|
149 |
msgstr "ユーザーエージェントをデフォルトにもどす"
|
150 |
|
151 |
+
#: multi-device-switcher.php:1129
|
152 |
msgid "Custom Switcher UserAgent"
|
153 |
msgstr "Custom Switcher用ユーザーエージェント"
|
154 |
|
155 |
+
#: multi-device-switcher.php:1151
|
156 |
+
#: pc-switcher-widget.php:57
|
157 |
+
msgid "PC Switcher"
|
158 |
+
msgstr "PC Switcher"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
+
#: multi-device-switcher.php:1154
|
161 |
+
#: multi-device-switcher.php:1156
|
162 |
msgid "Add PC Switcher"
|
163 |
msgstr "PC Switcher を追加"
|
164 |
|
165 |
+
#: multi-device-switcher.php:1157
|
166 |
msgid "Add a PC Switcher to the footer."
|
167 |
msgstr "PC Switcher をフッターに追加する"
|
168 |
|
169 |
+
#: multi-device-switcher.php:1160
|
170 |
+
#: multi-device-switcher.php:1162
|
171 |
msgid "Add default CSS"
|
172 |
msgstr "デフォルトCSSを追加"
|
173 |
|
174 |
+
#: multi-device-switcher.php:1163
|
175 |
msgid "Add a default CSS."
|
176 |
+
msgstr "デフォルトCSSを追加"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
+
#: multi-device-switcher.php:1170
|
179 |
msgid "Disable Switcher"
|
180 |
msgstr "切り替え無効"
|
181 |
|
182 |
+
#: multi-device-switcher.php:1173
|
183 |
+
#: multi-device-switcher.php:1175
|
184 |
msgid "Path"
|
185 |
msgstr "パス"
|
186 |
|
187 |
+
#: multi-device-switcher.php:1180
|
188 |
+
#: multi-device-switcher.php:1182
|
189 |
msgid "Regex mode"
|
190 |
msgstr "正規表現モード"
|
191 |
|
192 |
+
#: multi-device-switcher.php:1183
|
193 |
msgid "Enable Regex"
|
194 |
msgstr "正規表現を有効化"
|
195 |
|
196 |
+
#: pc-switcher-widget.php:54
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
msgid "Add the PC Switcher to a widget."
|
198 |
msgstr "PC Switcher をウィジェットに追加"
|
|
languages/multi-device-switcher.pot
CHANGED
@@ -1,124 +1,198 @@
|
|
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: Multi Device Switcher\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"
|
6 |
-
"
|
7 |
-
"Last-Translator: \n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: \n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
msgid "Multi Device Switcher"
|
15 |
msgstr ""
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
msgid "This WordPress plugin allows you to set a separate theme for device (Smart Phone, Tablet PC, Mobile Phone, Game and custom)."
|
18 |
msgstr ""
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
msgid "Settings"
|
21 |
msgstr ""
|
22 |
|
23 |
-
|
|
|
24 |
msgstr ""
|
25 |
|
26 |
-
|
|
|
27 |
msgstr ""
|
28 |
|
|
|
|
|
29 |
msgid "Smart Phone Theme"
|
30 |
msgstr ""
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
msgid "Tablet PC Theme"
|
33 |
msgstr ""
|
34 |
|
|
|
|
|
35 |
msgid "Mobile Phone Theme"
|
36 |
msgstr ""
|
37 |
|
|
|
|
|
38 |
msgid "Game Platforms Theme"
|
39 |
msgstr ""
|
40 |
|
|
|
41 |
msgid "Custom Switcher Theme"
|
42 |
msgstr ""
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
msgid "20 characters max, alphanumeric"
|
45 |
msgstr ""
|
46 |
|
|
|
|
|
|
|
|
|
|
|
47 |
msgid "Enter Comma-separated values (csv) format."
|
48 |
msgstr ""
|
49 |
|
|
|
50 |
msgid "Smart Phone"
|
51 |
msgstr ""
|
52 |
|
|
|
53 |
msgid "Tablet PC"
|
54 |
msgstr ""
|
55 |
|
|
|
56 |
msgid "Mobile Phone"
|
57 |
msgstr ""
|
58 |
|
|
|
59 |
msgid "Game Platforms"
|
60 |
msgstr ""
|
61 |
|
|
|
62 |
msgid "Reset Settings to Default UserAgent"
|
63 |
msgstr ""
|
64 |
|
|
|
65 |
msgid "Custom Switcher UserAgent"
|
66 |
msgstr ""
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
msgid "None"
|
72 |
-
msgstr ""
|
73 |
-
|
74 |
-
msgid "Add"
|
75 |
-
msgstr ""
|
76 |
-
|
77 |
-
msgid "Delete"
|
78 |
msgstr ""
|
79 |
|
|
|
|
|
80 |
msgid "Add PC Switcher"
|
81 |
msgstr ""
|
82 |
|
|
|
83 |
msgid "Add a PC Switcher to the footer."
|
84 |
msgstr ""
|
85 |
|
|
|
|
|
86 |
msgid "Add default CSS"
|
87 |
msgstr ""
|
88 |
|
|
|
89 |
msgid "Add a default CSS."
|
90 |
msgstr ""
|
91 |
|
92 |
-
|
93 |
-
msgstr ""
|
94 |
-
|
95 |
-
msgid "PC"
|
96 |
-
msgstr ""
|
97 |
-
|
98 |
-
msgid "Are you sure you want to delete %1$s ?"
|
99 |
-
msgstr ""
|
100 |
-
|
101 |
msgid "Disable Switcher"
|
102 |
msgstr ""
|
103 |
|
|
|
|
|
104 |
msgid "Path"
|
105 |
msgstr ""
|
106 |
|
|
|
|
|
107 |
msgid "Regex mode"
|
108 |
msgstr ""
|
109 |
|
|
|
110 |
msgid "Enable Regex"
|
111 |
msgstr ""
|
112 |
|
113 |
-
|
114 |
-
msgstr ""
|
115 |
-
|
116 |
-
msgid "If you like this plugin, please donate to support development and maintenance."
|
117 |
-
msgstr ""
|
118 |
-
|
119 |
-
# pc-switcher-widget.php
|
120 |
-
msgid "PC Switcher Widget add-on for the Multi Device Switcher. Use this widget to add the PC Switcher to a widget."
|
121 |
-
msgstr ""
|
122 |
-
|
123 |
msgid "Add the PC Switcher to a widget."
|
124 |
msgstr ""
|
1 |
+
# Copyright (C) 2021 thingsym
|
2 |
+
# This file is distributed under the same license as the Multi Device Switcher plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Multi Device Switcher 1.8.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/multi-device-switcher\n"
|
7 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
|
|
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-02-15T11:37:48+00:00\n"
|
13 |
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
+
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
+
"X-Domain: multi-device-switcher\n"
|
16 |
+
|
17 |
+
#. Plugin Name of the plugin
|
18 |
+
#: multi-device-switcher.php:729
|
19 |
+
#: multi-device-switcher.php:730
|
20 |
+
#: multi-device-switcher.php:890
|
21 |
+
#: multi-device-switcher.php:1340
|
22 |
msgid "Multi Device Switcher"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#. Plugin URI of the plugin
|
26 |
+
msgid "https://github.com/thingsym/multi-device-switcher"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#. Description of the plugin
|
30 |
msgid "This WordPress plugin allows you to set a separate theme for device (Smart Phone, Tablet PC, Mobile Phone, Game and custom)."
|
31 |
msgstr ""
|
32 |
|
33 |
+
#. Author of the plugin
|
34 |
+
msgid "thingsym"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#. Author URI of the plugin
|
38 |
+
msgid "https://www.thingslabo.com/"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: multi-device-switcher.php:512
|
42 |
+
#: multi-device-switcher.php:518
|
43 |
+
msgid "Mobile"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: multi-device-switcher.php:512
|
47 |
+
#: multi-device-switcher.php:518
|
48 |
+
msgid "PC"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: multi-device-switcher.php:775
|
52 |
msgid "Settings"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: multi-device-switcher.php:800
|
56 |
+
msgid "Become a sponsor (GitHub Sponsors)"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: multi-device-switcher.php:912
|
60 |
+
msgid "Theme"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: multi-device-switcher.php:914
|
64 |
+
#: multi-device-switcher.php:1331
|
65 |
msgid "Smart Phone Theme"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: multi-device-switcher.php:923
|
69 |
+
#: multi-device-switcher.php:926
|
70 |
+
#: multi-device-switcher.php:955
|
71 |
+
#: multi-device-switcher.php:958
|
72 |
+
#: multi-device-switcher.php:987
|
73 |
+
#: multi-device-switcher.php:990
|
74 |
+
#: multi-device-switcher.php:1019
|
75 |
+
#: multi-device-switcher.php:1022
|
76 |
+
#: multi-device-switcher.php:1065
|
77 |
+
#: multi-device-switcher.php:1068
|
78 |
+
#: multi-device-switcher.php:1321
|
79 |
+
#: multi-device-switcher.php:1376
|
80 |
+
msgid "None"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: multi-device-switcher.php:947
|
84 |
+
#: multi-device-switcher.php:1332
|
85 |
msgid "Tablet PC Theme"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: multi-device-switcher.php:979
|
89 |
+
#: multi-device-switcher.php:1333
|
90 |
msgid "Mobile Phone Theme"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: multi-device-switcher.php:1011
|
94 |
+
#: multi-device-switcher.php:1334
|
95 |
msgid "Game Platforms Theme"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: multi-device-switcher.php:1045
|
99 |
msgid "Custom Switcher Theme"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: multi-device-switcher.php:1083
|
103 |
+
msgid "Delete"
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
#: multi-device-switcher.php:1083
|
107 |
+
msgid "Are you sure you want to delete %1$s ?"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: multi-device-switcher.php:1094
|
111 |
+
#: multi-device-switcher.php:1096
|
112 |
+
msgid "Add Custom Switcher"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: multi-device-switcher.php:1098
|
116 |
+
msgid "Add"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: multi-device-switcher.php:1099
|
120 |
msgid "20 characters max, alphanumeric"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: multi-device-switcher.php:1107
|
124 |
+
msgid "UserAgent"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: multi-device-switcher.php:1108
|
128 |
msgid "Enter Comma-separated values (csv) format."
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: multi-device-switcher.php:1111
|
132 |
msgid "Smart Phone"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: multi-device-switcher.php:1114
|
136 |
msgid "Tablet PC"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: multi-device-switcher.php:1117
|
140 |
msgid "Mobile Phone"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: multi-device-switcher.php:1120
|
144 |
msgid "Game Platforms"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: multi-device-switcher.php:1124
|
148 |
msgid "Reset Settings to Default UserAgent"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: multi-device-switcher.php:1129
|
152 |
msgid "Custom Switcher UserAgent"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: multi-device-switcher.php:1151
|
156 |
+
#: pc-switcher-widget.php:57
|
157 |
+
msgid "PC Switcher"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: multi-device-switcher.php:1154
|
161 |
+
#: multi-device-switcher.php:1156
|
162 |
msgid "Add PC Switcher"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: multi-device-switcher.php:1157
|
166 |
msgid "Add a PC Switcher to the footer."
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: multi-device-switcher.php:1160
|
170 |
+
#: multi-device-switcher.php:1162
|
171 |
msgid "Add default CSS"
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: multi-device-switcher.php:1163
|
175 |
msgid "Add a default CSS."
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: multi-device-switcher.php:1170
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
msgid "Disable Switcher"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: multi-device-switcher.php:1173
|
183 |
+
#: multi-device-switcher.php:1175
|
184 |
msgid "Path"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: multi-device-switcher.php:1180
|
188 |
+
#: multi-device-switcher.php:1182
|
189 |
msgid "Regex mode"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: multi-device-switcher.php:1183
|
193 |
msgid "Enable Regex"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: pc-switcher-widget.php:54
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
msgid "Add the PC Switcher to a widget."
|
198 |
msgstr ""
|
multi-device-switcher.css
CHANGED
@@ -6,11 +6,7 @@
|
|
6 |
#admin-tabs ul.ui-tabs-nav li.ui-tabs-active,#admin-tabs ul.ui-tabs-nav li.ui-tabs-selected{color:#000;background:none;border-bottom-color:#f1f1f1;}
|
7 |
#admin-tabs ul.ui-tabs-nav li.ui-tabs-active:hover,#admin-tabs ul.ui-tabs-nav li.ui-tabs-active:hover{background:none;}
|
8 |
#admin-tabs ul.ui-tabs-nav a:focus,#admin-tabs ul.ui-tabs-nav a:active{outline-color:-moz-use-text-color;outline-style:none;outline-width:medium;}
|
9 |
-
.wrap{width:60%; float:left;}
|
10 |
-
#donate{width:34%; float:left; margin:2em 0;padding:0.4em;border:1px solid #ddd;}
|
11 |
@media screen and (max-width:480px){}
|
12 |
@media only screen and (max-width:768px){
|
13 |
#admin-tabs ul.ui-tabs-nav{table-layout:fixed;}
|
14 |
-
.wrap{width:auto; float:none;}
|
15 |
-
#donate{width:auto; float:none; margin:2em 0.4em;}
|
16 |
}
|
6 |
#admin-tabs ul.ui-tabs-nav li.ui-tabs-active,#admin-tabs ul.ui-tabs-nav li.ui-tabs-selected{color:#000;background:none;border-bottom-color:#f1f1f1;}
|
7 |
#admin-tabs ul.ui-tabs-nav li.ui-tabs-active:hover,#admin-tabs ul.ui-tabs-nav li.ui-tabs-active:hover{background:none;}
|
8 |
#admin-tabs ul.ui-tabs-nav a:focus,#admin-tabs ul.ui-tabs-nav a:active{outline-color:-moz-use-text-color;outline-style:none;outline-width:medium;}
|
|
|
|
|
9 |
@media screen and (max-width:480px){}
|
10 |
@media only screen and (max-width:768px){
|
11 |
#admin-tabs ul.ui-tabs-nav{table-layout:fixed;}
|
|
|
|
|
12 |
}
|
multi-device-switcher.php
CHANGED
@@ -3,9 +3,9 @@
|
|
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.
|
7 |
* Author: thingsym
|
8 |
-
* Author URI:
|
9 |
* License: GPL2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
* Text Domain: multi-device-switcher
|
@@ -162,6 +162,7 @@ class Multi_Device_Switcher {
|
|
162 |
public function init() {
|
163 |
add_filter( 'option_page_capability_' . $this->option_group, array( $this, 'option_page_capability' ) );
|
164 |
add_filter( 'plugin_action_links_' . plugin_basename( __MULTI_DEVICE_SWITCHER_FILE__ ), array( $this, 'plugin_action_links' ) );
|
|
|
165 |
|
166 |
add_shortcode( 'multi', array( $this, 'shortcode_display_switcher' ) );
|
167 |
}
|
@@ -776,6 +777,30 @@ class Multi_Device_Switcher {
|
|
776 |
|
777 |
return $links;
|
778 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
779 |
|
780 |
/**
|
781 |
* Returns the default options.
|
@@ -1165,31 +1190,6 @@ class Multi_Device_Switcher {
|
|
1165 |
</form>
|
1166 |
</div>
|
1167 |
|
1168 |
-
<div id="donate">
|
1169 |
-
<h2><?php esc_html_e( 'Donationware', 'multi-device-switcher' ); ?></h2>
|
1170 |
-
<p><?php esc_html_e( 'If you like this plugin, please donate to support development and maintenance.', 'multi-device-switcher' ); ?></p>
|
1171 |
-
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
1172 |
-
<input type="hidden" name="cmd" value="_s-xclick">
|
1173 |
-
<input type="hidden" name="hosted_button_id" value="9L53NELFMHTWW">
|
1174 |
-
<table>
|
1175 |
-
<tr><td><input type="hidden" name="on0" value="Donationware">Donationware</td></tr><tr><td><select name="os0">
|
1176 |
-
<option value="1. Donate">1. Donate $3.00 USD</option>
|
1177 |
-
<option value="2. Donate">2. Donate $5.00 USD</option>
|
1178 |
-
<option value="3. Donate">3. Donate $7.00 USD</option>
|
1179 |
-
<option value="4. Donate" selected="selected">4. Donate $10.00 USD</option>
|
1180 |
-
<option value="5. Donate">5. Donate $20.00 USD</option>
|
1181 |
-
<option value="6. Donate">6. Donate $30.00 USD</option>
|
1182 |
-
<option value="7. Donate">7. Donate $40.00 USD</option>
|
1183 |
-
<option value="8. Donate">8. Donate $50.00 USD</option>
|
1184 |
-
<option value="9. Donate">9. Donate $60.00 USD</option>
|
1185 |
-
<option value="10. Donate">10. Donate $70.00 USD</option>
|
1186 |
-
</select> </td></tr>
|
1187 |
-
</table>
|
1188 |
-
<input type="hidden" name="currency_code" value="USD">
|
1189 |
-
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
1190 |
-
<img alt="" border="0" src="https://www.paypalobjects.com/ja_JP/i/scr/pixel.gif" width="1" height="1">
|
1191 |
-
</form>
|
1192 |
-
</div>
|
1193 |
<?php
|
1194 |
}
|
1195 |
|
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.8.0
|
7 |
* Author: thingsym
|
8 |
+
* Author URI: https://www.thingslabo.com/
|
9 |
* License: GPL2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
* Text Domain: multi-device-switcher
|
162 |
public function init() {
|
163 |
add_filter( 'option_page_capability_' . $this->option_group, array( $this, 'option_page_capability' ) );
|
164 |
add_filter( 'plugin_action_links_' . plugin_basename( __MULTI_DEVICE_SWITCHER_FILE__ ), array( $this, 'plugin_action_links' ) );
|
165 |
+
add_filter( 'plugin_row_meta', array( $this, 'plugin_metadata_links' ), 10, 2 );
|
166 |
|
167 |
add_shortcode( 'multi', array( $this, 'shortcode_display_switcher' ) );
|
168 |
}
|
777 |
|
778 |
return $links;
|
779 |
}
|
780 |
+
/**
|
781 |
+
* Set links below a plugin on the Plugins page.
|
782 |
+
*
|
783 |
+
* Hooks to plugin_row_meta
|
784 |
+
*
|
785 |
+
* @see https://developer.wordpress.org/reference/hooks/plugin_row_meta/
|
786 |
+
*
|
787 |
+
* @access public
|
788 |
+
*
|
789 |
+
* @param array $links An array of the plugin's metadata.
|
790 |
+
* @param string $file Path to the plugin file relative to the plugins directory.
|
791 |
+
*
|
792 |
+
* @return array $links
|
793 |
+
*
|
794 |
+
* @since 1.8.0
|
795 |
+
*/
|
796 |
+
public function plugin_metadata_links( $links, $file ) {
|
797 |
+
|
798 |
+
if ( $file == plugin_basename( __MULTI_DEVICE_SWITCHER_FILE__ ) ) {
|
799 |
+
$links[] = '<a href="https://github.com/sponsors/thingsym">' . __( 'Become a sponsor (GitHub Sponsors)', 'multi-device-switcher' ) . '</a>';
|
800 |
+
}
|
801 |
+
|
802 |
+
return $links;
|
803 |
+
}
|
804 |
|
805 |
/**
|
806 |
* Returns the default options.
|
1190 |
</form>
|
1191 |
</div>
|
1192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1193 |
<?php
|
1194 |
}
|
1195 |
|
pc-switcher-widget.php
CHANGED
@@ -3,9 +3,9 @@
|
|
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.
|
7 |
* Author: thingsym
|
8 |
-
* Author URI:
|
9 |
* License: GPL2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
* Text Domain: multi-device-switcher
|
@@ -23,6 +23,11 @@ if ( class_exists( 'Multi_Device_Switcher' ) ) {
|
|
23 |
add_action( 'widgets_init', 'pc_switcher_load_widgets' );
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
|
|
26 |
function pc_switcher_load_widgets() {
|
27 |
register_widget( 'PC_Switcher' );
|
28 |
}
|
@@ -34,17 +39,36 @@ function pc_switcher_load_widgets() {
|
|
34 |
*/
|
35 |
class PC_Switcher extends WP_Widget {
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
public function __construct() {
|
38 |
load_plugin_textdomain( 'multi-device-switcher', false, dirname( plugin_basename( __MULTI_DEVICE_SWITCHER_FILE__ ) ) . '/languages/' );
|
39 |
|
40 |
$widget_ops = array(
|
41 |
-
'classname'
|
42 |
-
'description'
|
|
|
43 |
);
|
44 |
parent::__construct( 'pc-switcher', __( 'PC Switcher', 'multi-device-switcher' ), $widget_ops );
|
45 |
$this->alt_option_name = 'widget_pc_switcher';
|
46 |
}
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
public function widget( $args, $instance ) {
|
49 |
if ( ! function_exists( 'multi_device_switcher_add_pc_switcher' ) ) {
|
50 |
return;
|
@@ -60,12 +84,33 @@ class PC_Switcher extends WP_Widget {
|
|
60 |
}
|
61 |
}
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
public function update( $new_instance, $old_instance ) {
|
64 |
$instance = $old_instance;
|
65 |
|
66 |
return $instance;
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
public function form( $instance ) {
|
70 |
}
|
71 |
}
|
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.8.0
|
7 |
* Author: thingsym
|
8 |
+
* Author URI: https://www.thingslabo.com/
|
9 |
* License: GPL2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
* Text Domain: multi-device-switcher
|
23 |
add_action( 'widgets_init', 'pc_switcher_load_widgets' );
|
24 |
}
|
25 |
|
26 |
+
/**
|
27 |
+
* Register PC_Switcher.
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
*/
|
31 |
function pc_switcher_load_widgets() {
|
32 |
register_widget( 'PC_Switcher' );
|
33 |
}
|
39 |
*/
|
40 |
class PC_Switcher extends WP_Widget {
|
41 |
|
42 |
+
/**
|
43 |
+
* Sets up a new widget instance.
|
44 |
+
*
|
45 |
+
* @since 1.0.0
|
46 |
+
*
|
47 |
+
* @access public
|
48 |
+
*/
|
49 |
public function __construct() {
|
50 |
load_plugin_textdomain( 'multi-device-switcher', false, dirname( plugin_basename( __MULTI_DEVICE_SWITCHER_FILE__ ) ) . '/languages/' );
|
51 |
|
52 |
$widget_ops = array(
|
53 |
+
'classname' => 'widget_pc_switcher',
|
54 |
+
'description' => __( 'Add the PC Switcher to a widget.', 'multi-device-switcher' ),
|
55 |
+
'customize_selective_refresh' => true,
|
56 |
);
|
57 |
parent::__construct( 'pc-switcher', __( 'PC Switcher', 'multi-device-switcher' ), $widget_ops );
|
58 |
$this->alt_option_name = 'widget_pc_switcher';
|
59 |
}
|
60 |
|
61 |
+
/**
|
62 |
+
* Outputs the content for the widget instance.
|
63 |
+
*
|
64 |
+
* @since 1.0.0
|
65 |
+
*
|
66 |
+
* @access public
|
67 |
+
*
|
68 |
+
* @param array $args Display arguments including 'before_title', 'after_title',
|
69 |
+
* 'before_widget', and 'after_widget'.
|
70 |
+
* @param array $instance Settings for the current widget instance.
|
71 |
+
*/
|
72 |
public function widget( $args, $instance ) {
|
73 |
if ( ! function_exists( 'multi_device_switcher_add_pc_switcher' ) ) {
|
74 |
return;
|
84 |
}
|
85 |
}
|
86 |
|
87 |
+
/**
|
88 |
+
* Handles updating settings for the current Archives widget instance.
|
89 |
+
*
|
90 |
+
* @since 1.0.0
|
91 |
+
*
|
92 |
+
* @access public
|
93 |
+
*
|
94 |
+
* @param array $new_instance New settings for this instance as input by the user via form() method.
|
95 |
+
* @param array $old_instance Old settings for this instance.
|
96 |
+
*
|
97 |
+
* @return array Updated settings to save.
|
98 |
+
*/
|
99 |
public function update( $new_instance, $old_instance ) {
|
100 |
$instance = $old_instance;
|
101 |
|
102 |
return $instance;
|
103 |
}
|
104 |
|
105 |
+
/**
|
106 |
+
* Outputs the settings form for the widget.
|
107 |
+
*
|
108 |
+
* @since 1.0.0
|
109 |
+
*
|
110 |
+
* @access public
|
111 |
+
*
|
112 |
+
* @param array $instance Current settings.
|
113 |
+
*/
|
114 |
public function form( $instance ) {
|
115 |
}
|
116 |
}
|
readme.txt
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
=== Multi Device Switcher ===
|
2 |
|
3 |
Contributors: thingsym
|
4 |
-
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.7
|
8 |
Requires PHP: 5.4
|
9 |
-
Tested up to: 5.2.2
|
10 |
-
Stable tag: 1.7.0
|
11 |
License: GPL2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
@@ -31,7 +31,7 @@ The Custom Switcher can add every device.
|
|
31 |
|
32 |
= Test Matrix =
|
33 |
|
34 |
-
For operation compatibility between PHP version and WordPress version, see below [
|
35 |
|
36 |
= Contribution =
|
37 |
|
@@ -365,6 +365,16 @@ For more information about the Multi Device Switcher Command, see `wp help multi
|
|
365 |
|
366 |
== Changelog ==
|
367 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
= 1.7.0 =
|
369 |
* add test case for cdn
|
370 |
* add multi_device_switcher/detect_device action hook
|
1 |
=== Multi Device Switcher ===
|
2 |
|
3 |
Contributors: thingsym
|
|
|
4 |
Link: https://github.com/thingsym/multi-device-switcher
|
5 |
+
Donate link: https://github.com/sponsors/thingsym
|
6 |
Tags: switcher, theme, ipad, iphone, android, tablet, mobile, game
|
7 |
+
Stable tag: 1.8.0
|
8 |
+
Tested up to: 5.8.0
|
9 |
Requires at least: 3.7
|
10 |
Requires PHP: 5.4
|
|
|
|
|
11 |
License: GPL2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
31 |
|
32 |
= Test Matrix =
|
33 |
|
34 |
+
For operation compatibility between PHP version and WordPress version, see below [Github Actions](https://github.com/thingsym/multi-device-switcher/actions).
|
35 |
|
36 |
= Contribution =
|
37 |
|
365 |
|
366 |
== Changelog ==
|
367 |
|
368 |
+
= 1.8.0 =
|
369 |
+
* add PHPDoc
|
370 |
+
* update japanese translation
|
371 |
+
* update pot
|
372 |
+
* fix composer.json
|
373 |
+
* add FUNDING.yml
|
374 |
+
* change donate link
|
375 |
+
* add sponsor link
|
376 |
+
* add GitHub actions for CI/CD, remove .travis.yml
|
377 |
+
|
378 |
= 1.7.0 =
|
379 |
* add test case for cdn
|
380 |
* add multi_device_switcher/detect_device action hook
|