Responsive Lightbox & Gallery - Version 1.1.0

Version Description

  • New: Multisite support
  • Fix: Notice during first plugin activation
Download this release

Release Info

Developer dfactory
Plugin Icon 128x128 Responsive Lightbox & Gallery
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.4 to 1.1.0

Files changed (2) hide show
  1. readme.txt +8 -3
  2. responsive-lightbox.php +160 -77
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.dfactory.eu/
4
Tags: gallery, images, lightbox, links, photos, template, theme, photo, image, picture, slideshow, modal, overlay, YouTube, Vimeo, video, videos
5
Requires at least: 3.3
6
Tested up to: 3.6
7
- Stable tag: 1.0.4
8
License: MIT License
9
License URI: http://opensource.org/licenses/MIT
10
@@ -25,6 +25,7 @@ For more information, check out plugin page at [dFactory](http://www.dfactory.eu
25
* Option to display single post images as a gallery
26
* Enter a selector for lightbox
27
* Highly customizable settings for each of the lightbox scripts
28
* .pot file for translations included
29
30
= Translations: =
@@ -52,6 +53,10 @@ No questions yet.
52
53
== Changelog ==
54
55
= 1.0.4 =
56
* Fix: Changed regex for links to attachment pages, thanks to Darwin
57
@@ -77,5 +82,5 @@ Initial release
77
78
== Upgrade Notice ==
79
80
- = 1.0.4 =
81
- Fix: Changed regex for links to attachment pages, thanks to Darwin
4
Tags: gallery, images, lightbox, links, photos, template, theme, photo, image, picture, slideshow, modal, overlay, YouTube, Vimeo, video, videos
5
Requires at least: 3.3
6
Tested up to: 3.6
7
+ Stable tag: 1.1.0
8
License: MIT License
9
License URI: http://opensource.org/licenses/MIT
10
25
* Option to display single post images as a gallery
26
* Enter a selector for lightbox
27
* Highly customizable settings for each of the lightbox scripts
28
+ * Multisite support
29
* .pot file for translations included
30
31
= Translations: =
53
54
== Changelog ==
55
56
+ = 1.1.0 =
57
+ * New: Multisite support
58
+ * Fix: Notice during first plugin activation
59
+
60
= 1.0.4 =
61
* Fix: Changed regex for links to attachment pages, thanks to Darwin
62
82
83
== Upgrade Notice ==
84
85
+ = 1.1.0 =
86
+ New: Multisite support
responsive-lightbox.php CHANGED
@@ -2,7 +2,7 @@
2
/*
3
Plugin Name: Responsive Lightbox
4
Description: Responsive Lightbox allows users to view larger versions of images and galleries in a lightbox (overlay) effect optimized for mobile devices.
5
- Version: 1.0.4
6
Author: dFactory
7
Author URI: http://www.dfactory.eu/
8
Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
@@ -61,7 +61,8 @@ class Responsive_Lightbox
61
'hide_bars_delay' => 5000,
62
'video_max_width' => 1080
63
)
64
- )
65
);
66
private $scripts = array();
67
private $options = array();
@@ -71,11 +72,29 @@ class Responsive_Lightbox
71
72
public function __construct()
73
{
74
- register_activation_hook(__FILE__, array(&$this, 'activation'));
75
- register_deactivation_hook(__FILE__, array(&$this, 'deactivation'));
76
77
- $this->options['settings'] = array_merge($this->defaults['settings'], get_option('rl_settings'));
78
- $this->options['configuration'] = array_merge($this->defaults['configuration'], get_option('rl_configuration'));
79
80
//actions
81
add_action('plugins_loaded', array(&$this, 'load_textdomain'));
@@ -255,12 +274,12 @@ class Responsive_Lightbox
255
$this->tabs = array(
256
'general-settings' => array(
257
'name' => __('General settings', 'responsive-lightbox'),
258
- 'key' => 'rl_settings',
259
'submit' => 'save_rl_settings'
260
),
261
'configuration' => array(
262
'name' => __('Lightbox settings', 'responsive-lightbox'),
263
- 'key' => 'rl_configuration',
264
'submit' => 'save_rl_configuration',
265
'reset' => 'reset_rl_configuration'
266
)
@@ -268,67 +287,131 @@ class Responsive_Lightbox
268
}
269
270
271
- public function activation()
272
{
273
- add_option('rl_settings', $this->defaults['settings'], '', 'no');
274
- add_option('rl_configuration', $this->defaults['configuration'], '', 'no');
275
}
276
277
278
- public function deactivation()
279
{
280
- if($this->options['settings']['deactivation_delete'] === TRUE)
281
{
282
- delete_option('rl_settings');
283
- delete_option('rl_configuration');
284
}
285
}
286
287
288
public function register_settings()
289
{
290
- register_setting('rl_settings', 'rl_settings', array(&$this, 'validate_options'));
291
292
//general settings
293
- add_settings_section('rl_settings', __('General settings', 'responsive-lightbox'), '', 'rl_settings');
294
- add_settings_field('rl_script', __('Lightbox script', 'responsive-lightbox'), array(&$this, 'rl_script'), 'rl_settings', 'rl_settings');
295
- add_settings_field('rl_selector', __('Selector', 'responsive-lightbox'), array(&$this, 'rl_selector'), 'rl_settings', 'rl_settings');
296
- add_settings_field('rl_galleries', __('Galleries', 'responsive-lightbox'), array(&$this, 'rl_galleries'), 'rl_settings', 'rl_settings');
297
- add_settings_field('rl_videos', __('Video links', 'responsive-lightbox'), array(&$this, 'rl_videos'), 'rl_settings', 'rl_settings');
298
- add_settings_field('rl_image_links', __('Image links', 'responsive-lightbox'), array(&$this, 'rl_image_links'), 'rl_settings', 'rl_settings');
299
- add_settings_field('rl_images_as_gallery', __('Single images as gallery', 'responsive-lightbox'), array(&$this, 'rl_images_as_gallery'), 'rl_settings', 'rl_settings');
300
- add_settings_field('rl_deactivation_delete', __('Deactivation', 'responsive-lightbox'), array(&$this, 'rl_deactivation_delete'), 'rl_settings', 'rl_settings');
301
302
//configuration
303
- register_setting('rl_configuration', 'rl_configuration', array(&$this, 'validate_options'));
304
- add_settings_section('rl_configuration', __('Lightbox settings', 'responsive-lightbox').': '.$this->scripts[$this->options['settings']['script']]['name'], '', 'rl_configuration');
305
306
if($this->options['settings']['script'] === 'swipebox')
307
{
308
- add_settings_field('rl_sw_animation', __('Animation type', 'responsive-lightbox'), array(&$this, 'rl_sw_animation'), 'rl_configuration', 'rl_configuration');
309
- add_settings_field('rl_sw_hide_bars', __('Top and bottom bars', 'responsive-lightbox'), array(&$this, 'rl_sw_hide_bars'), 'rl_configuration', 'rl_configuration');
310
- add_settings_field('rl_video_max_width', __('Video max width', 'responsive-lightbox'), array(&$this, 'rl_video_max_width'), 'rl_configuration', 'rl_configuration');
311
}
312
elseif($this->options['settings']['script'] === 'prettyphoto')
313
{
314
- add_settings_field('rl_pp_animation_speed', __('Animation speed', 'responsive-lightbox'), array(&$this, 'rl_pp_animation_speed'), 'rl_configuration', 'rl_configuration');
315
- add_settings_field('rl_pp_slideshow', __('Slideshow', 'responsive-lightbox'), array(&$this, 'rl_pp_slideshow'), 'rl_configuration', 'rl_configuration');
316
- add_settings_field('rl_pp_slideshow_autoplay', __('Slideshow autoplay', 'responsive-lightbox'), array(&$this, 'rl_pp_slideshow_autoplay'), 'rl_configuration', 'rl_configuration');
317
- add_settings_field('rl_pp_opacity', __('Opacity', 'responsive-lightbox'), array(&$this, 'rl_pp_opacity'), 'rl_configuration', 'rl_configuration');
318
- add_settings_field('rl_pp_title', __('Show title', 'responsive-lightbox'), array(&$this, 'rl_pp_title'), 'rl_configuration', 'rl_configuration');
319
- add_settings_field('rl_pp_allow_resize', __('Allow resize big images', 'responsive-lightbox'), array(&$this, 'rl_pp_allow_resize'), 'rl_configuration', 'rl_configuration');
320
- add_settings_field('rl_pp_width', __('Video width', 'responsive-lightbox'), array(&$this, 'rl_pp_width'), 'rl_configuration', 'rl_configuration');
321
- add_settings_field('rl_pp_height', __('Video height', 'responsive-lightbox'), array(&$this, 'rl_pp_height'), 'rl_configuration', 'rl_configuration');
322
- add_settings_field('rl_pp_theme', __('Theme', 'responsive-lightbox'), array(&$this, 'rl_pp_theme'), 'rl_configuration', 'rl_configuration');
323
- add_settings_field('rl_pp_horizontal_padding', __('Horizontal padding', 'responsive-lightbox'), array(&$this, 'rl_pp_horizontal_padding'), 'rl_configuration', 'rl_configuration');
324
- add_settings_field('rl_pp_hide_flash', __('Hide Flash', 'responsive-lightbox'), array(&$this, 'rl_pp_hide_flash'), 'rl_configuration', 'rl_configuration');
325
- add_settings_field('rl_pp_wmode', __('Flash Window Mode (wmode)', 'responsive-lightbox'), array(&$this, 'rl_pp_wmode'), 'rl_configuration', 'rl_configuration');
326
- add_settings_field('rl_pp_video_autoplay', __('Video autoplay', 'responsive-lightbox'), array(&$this, 'rl_pp_video_autoplay'), 'rl_configuration', 'rl_configuration');
327
- add_settings_field('rl_pp_modal', __('Modal', 'responsive-lightbox'), array(&$this, 'rl_pp_modal'), 'rl_configuration', 'rl_configuration');
328
- add_settings_field('rl_pp_deeplinking', __('Deeplinking', 'responsive-lightbox'), array(&$this, 'rl_pp_deeplinking'), 'rl_configuration', 'rl_configuration');
329
- add_settings_field('rl_pp_overlay_gallery', __('Overlay gallery', 'responsive-lightbox'), array(&$this, 'rl_pp_overlay_gallery'), 'rl_configuration', 'rl_configuration');
330
- add_settings_field('rl_pp_keyboard_shortcuts', __('Keyboard shortcuts', 'responsive-lightbox'), array(&$this, 'rl_pp_keyboard_shortcuts'), 'rl_configuration', 'rl_configuration');
331
- add_settings_field('rl_pp_social', __('Social (Twitter, Facebook)', 'responsive-lightbox'), array(&$this, 'rl_pp_social'), 'rl_configuration', 'rl_configuration');
332
}
333
}
334
@@ -341,7 +424,7 @@ class Responsive_Lightbox
341
foreach($this->scripts as $val => $trans)
342
{
343
echo '
344
- <input id="rl-script-'.$val.'" type="radio" name="rl_settings[script]" value="'.$val.'" '.checked($val, $this->options['settings']['script'], FALSE).' />
345
<label for="rl-script-'.$val.'">'.$trans['name'].'</label>';
346
}
347
@@ -355,7 +438,7 @@ class Responsive_Lightbox
355
{
356
echo '
357
<div>
358
- <input type="text" value="'.$this->options['settings']['selector'].'" name="rl_settings[selector]" />
359
<p class="description">'.__('Select to which rel selector lightbox effect will be applied to.', 'responsive-lightbox').'</p>
360
</div>';
361
}
@@ -369,7 +452,7 @@ class Responsive_Lightbox
369
foreach($this->choices as $val => $trans)
370
{
371
echo '
372
- <input id="rl-galleries-'.$val.'" type="radio" name="rl_settings[galleries]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['galleries'], FALSE).' />
373
<label for="rl-galleries-'.$val.'">'.$trans.'</label>';
374
}
375
@@ -387,7 +470,7 @@ class Responsive_Lightbox
387
foreach($this->choices as $val => $trans)
388
{
389
echo '
390
- <input id="rl-videos-'.$val.'" type="radio" name="rl_settings[videos]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['videos'], FALSE).' />
391
<label for="rl-videos-'.$val.'">'.$trans.'</label>';
392
}
393
@@ -405,7 +488,7 @@ class Responsive_Lightbox
405
foreach($this->choices as $val => $trans)
406
{
407
echo '
408
- <input id="rl-image-links-'.$val.'" type="radio" name="rl_settings[image_links]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['image_links'], FALSE).' />
409
<label for="rl-image-links-'.$val.'">'.$trans.'</label>';
410
}
411
@@ -423,7 +506,7 @@ class Responsive_Lightbox
423
foreach($this->choices as $val => $trans)
424
{
425
echo '
426
- <input id="rl-images-as-gallery-'.$val.'" type="radio" name="rl_settings[images_as_gallery]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['images_as_gallery'], FALSE).' />
427
<label for="rl-images-as-gallery-'.$val.'">'.$trans.'</label>';
428
}
429
@@ -441,7 +524,7 @@ class Responsive_Lightbox
441
foreach($this->choices as $val => $trans)
442
{
443
echo '
444
- <input id="rl-deactivation-delete-'.$val.'" type="radio" name="rl_settings[deactivation_delete]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['deactivation_delete'], FALSE).' />
445
<label for="rl-deactivation-delete-'.$val.'">'.$trans.'</label>';
446
}
447
@@ -459,7 +542,7 @@ class Responsive_Lightbox
459
foreach($this->scripts['swipebox']['animations'] as $val => $trans)
460
{
461
echo '
462
- <input id="rl-animation-'.$val.'" type="radio" name="rl_configuration[swipebox][animation]" value="'.$val.'" '.checked($val, $this->options['configuration']['swipebox']['animation'], FALSE).' />
463
<label for="rl-animation-'.$val.'">'.$trans.'</label>';
464
}
465
@@ -477,7 +560,7 @@ class Responsive_Lightbox
477
foreach($this->choices as $val => $trans)
478
{
479
echo '
480
- <input id="rl-hide-bars-'.$val.'" type="radio" name="rl_configuration[swipebox][hide_bars]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['swipebox']['hide_bars'], FALSE).' />
481
<label for="rl-hide-bars-'.$val.'">'.$trans.'</label>';
482
}
483
@@ -485,7 +568,7 @@ class Responsive_Lightbox
485
<p class="description">'.__('Disable if you don\'t want to top and bottom bars to be hidden after a period of time.', 'responsive-lightbox').'</p>
486
</div>
487
<div id="rl_sw_hide_bars_delay"'.($this->options['configuration']['swipebox']['hide_bars'] === FALSE ? ' style="display: none;"' : '').'>
488
- <input type="text" name="rl_configuration[swipebox][hide_bars_delay]" value="'.$this->options['configuration']['swipebox']['hide_bars_delay'].'" />
489
<p class="description">'.__('Enter the time after which the top and bottom bars will be hidden (when hiding is enabled).', 'responsive-lightbox').'</p>
490
</div>';
491
}
@@ -495,7 +578,7 @@ class Responsive_Lightbox
495
{
496
echo '
497
<div>
498
- <input type="text" name="rl_configuration[swipebox][video_max_width]" value="'.$this->options['configuration']['swipebox']['video_max_width'].'" />
499
<p class="description">'.__('Enter the max video width in a lightbox', 'responsive-lightbox').'</p>
500
</div>';
501
}
@@ -509,7 +592,7 @@ class Responsive_Lightbox
509
foreach($this->scripts['prettyphoto']['animation_speeds'] as $val => $trans)
510
{
511
echo '
512
- <input id="rl-animation-speed-'.$val.'" type="radio" name="rl_configuration[prettyphoto][animation_speed]" value="'.$val.'" '.checked($val, $this->options['configuration']['prettyphoto']['animation_speed'], FALSE).' />
513
<label for="rl-animation-speed-'.$val.'">'.$trans.'</label>';
514
}
515
@@ -527,7 +610,7 @@ class Responsive_Lightbox
527
foreach($this->choices as $val => $trans)
528
{
529
echo '
530
- <input id="rl-slideshow-'.$val.'" type="radio" name="rl_configuration[prettyphoto][slideshow]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['slideshow'], FALSE).' />
531
<label for="rl-slideshow-'.$val.'">'.$trans.'</label>';
532
}
533
@@ -535,7 +618,7 @@ class Responsive_Lightbox
535
<p class="description">'.__('Display images as slideshow', 'responsive-lightbox').'</p>
536
</div>
537
<div id="rl_pp_slideshow_delay"'.($this->options['configuration']['prettyphoto']['slideshow'] === FALSE ? ' style="display: none;"' : '').'>
538
- <input type="text" name="rl_configuration[prettyphoto][slideshow_delay]" value="'.$this->options['configuration']['prettyphoto']['slideshow_delay'].'" />
539
<p class="description">'.__('Enter time (in miliseconds)', 'responsive-lightbox').'</p>
540
</div>';
541
}
@@ -549,7 +632,7 @@ class Responsive_Lightbox
549
foreach($this->choices as $val => $trans)
550
{
551
echo '
552
- <input id="rl-slideshow-autoplay-'.$val.'" type="radio" name="rl_configuration[prettyphoto][slideshow_autoplay]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['slideshow_autoplay'], FALSE).' />
553
<label for="rl-slideshow-autoplay-'.$val.'">'.$trans.'</label>';
554
}
555
@@ -563,7 +646,7 @@ class Responsive_Lightbox
563
{
564
echo '
565
<div>
566
- <input type="text" name="rl_configuration[prettyphoto][opacity]" value="'.$this->options['configuration']['prettyphoto']['opacity'].'" />
567
<p class="description">'.__('Value between 0 and 1 (for e.g. 0.5)', 'responsive-lightbox').'</p>
568
</div>';
569
}
@@ -577,7 +660,7 @@ class Responsive_Lightbox
577
foreach($this->choices as $val => $trans)
578
{
579
echo '
580
- <input id="rl-show-title-'.$val.'" type="radio" name="rl_configuration[prettyphoto][show_title]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['show_title'], FALSE).' />
581
<label for="rl-show-title-'.$val.'">'.$trans.'</label>';
582
}
583
@@ -595,7 +678,7 @@ class Responsive_Lightbox
595
foreach($this->choices as $val => $trans)
596
{
597
echo '
598
- <input id="rl-allow-resize-'.$val.'" type="radio" name="rl_configuration[prettyphoto][allow_resize]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['allow_resize'], FALSE).' />
599
<label for="rl-allow-resize-'.$val.'">'.$trans.'</label>';
600
}
601
@@ -609,7 +692,7 @@ class Responsive_Lightbox
609
{
610
echo '
611
<div>
612
- <input type="text" name="rl_configuration[prettyphoto][width]" value="'.$this->options['configuration']['prettyphoto']['width'].'" />
613
<p class="description">'.__('in pixels', 'responsive-lightbox').'</p>
614
</div>';
615
}
@@ -619,7 +702,7 @@ class Responsive_Lightbox
619
{
620
echo '
621
<div>
622
- <input type="text" name="rl_configuration[prettyphoto][height]" value="'.$this->options['configuration']['prettyphoto']['height'].'" />
623
<p class="description">'.__('in pixels', 'responsive-lightbox').'</p>
624
</div>';
625
}
@@ -633,7 +716,7 @@ class Responsive_Lightbox
633
foreach($this->scripts['prettyphoto']['themes'] as $val => $trans)
634
{
635
echo '
636
- <input id="rl-theme-'.$val.'" type="radio" name="rl_configuration[prettyphoto][theme]" value="'.$val.'" '.checked($val, $this->options['configuration']['prettyphoto']['theme'], FALSE).' />
637
<label for="rl-theme-'.$val.'">'.$trans.'</label>';
638
}
639
@@ -647,7 +730,7 @@ class Responsive_Lightbox
647
{
648
echo '
649
<div>
650
- <input type="text" name="rl_configuration[prettyphoto][horizontal_padding]" value="'.$this->options['configuration']['prettyphoto']['horizontal_padding'].'" />
651
<p class="description">'.__('Horizontal padding (in pixels)', 'responsive-lightbox').'</p>
652
</div>';
653
}
@@ -661,7 +744,7 @@ class Responsive_Lightbox
661
foreach($this->choices as $val => $trans)
662
{
663
echo '
664
- <input id="rl-hide-flash-'.$val.'" type="radio" name="rl_configuration[prettyphoto][hide_flash]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['hide_flash'], FALSE).' />
665
<label for="rl-hide-flash-'.$val.'">'.$trans.'</label>';
666
}
667
@@ -679,7 +762,7 @@ class Responsive_Lightbox
679
foreach($this->scripts['prettyphoto']['wmodes'] as $val => $trans)
680
{
681
echo '
682
- <input id="rl-wmode-'.$val.'" type="radio" name="rl_configuration[prettyphoto][wmode]" value="'.$val.'" '.checked($val, $this->options['configuration']['prettyphoto']['wmode'], FALSE).' />
683
<label for="rl-wmode-'.$val.'">'.$trans.'</label>';
684
}
685
@@ -697,7 +780,7 @@ class Responsive_Lightbox
697
foreach($this->choices as $val => $trans)
698
{
699
echo '
700
- <input id="rl-video-autoplay-'.$val.'" type="radio" name="rl_configuration[prettyphoto][video_autoplay]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['video_autoplay'], FALSE).' />
701
<label for="rl-video-autoplay-'.$val.'">'.$trans.'</label>';
702
}
703
@@ -715,7 +798,7 @@ class Responsive_Lightbox
715
foreach($this->choices as $val => $trans)
716
{
717
echo '
718
- <input id="rl-modal-close-'.$val.'" type="radio" name="rl_configuration[prettyphoto][modal]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['modal'], FALSE).' />
719
<label for="rl-modal-close-'.$val.'">'.$trans.'</label>';
720
}
721
@@ -733,7 +816,7 @@ class Responsive_Lightbox
733
foreach($this->choices as $val => $trans)
734
{
735
echo '
736
- <input id="rl-deeplinking-'.$val.'" type="radio" name="rl_configuration[prettyphoto][deeplinking]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['deeplinking'], FALSE).' />
737
<label for="rl-deeplinking-'.$val.'">'.$trans.'</label>';
738
}
739
@@ -751,7 +834,7 @@ class Responsive_Lightbox
751
foreach($this->choices as $val => $trans)
752
{
753
echo '
754
- <input id="rl-overlay-gallery-'.$val.'" type="radio" name="rl_configuration[prettyphoto][overlay_gallery]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['overlay_gallery'], FALSE).' />
755
<label for="rl-overlay-gallery-'.$val.'">'.$trans.'</label>';
756
}
757
@@ -769,7 +852,7 @@ class Responsive_Lightbox
769
foreach($this->choices as $val => $trans)
770
{
771
echo '
772
- <input id="rl-keyboard-shortcuts-'.$val.'" type="radio" name="rl_configuration[prettyphoto][keyboard_shortcuts]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['keyboard_shortcuts'], FALSE).' />
773
<label for="rl-keyboard-shortcuts-'.$val.'">'.$trans.'</label>';
774
}
775
@@ -787,7 +870,7 @@ class Responsive_Lightbox
787
foreach($this->choices as $val => $trans)
788
{
789
echo '
790
- <input id="rl-social-'.$val.'" type="radio" name="rl_configuration[prettyphoto][social]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['social'], FALSE).' />
791
<label for="rl-social-'.$val.'">'.$trans.'</label>';
792
}
793
2
/*
3
Plugin Name: Responsive Lightbox
4
Description: Responsive Lightbox allows users to view larger versions of images and galleries in a lightbox (overlay) effect optimized for mobile devices.
5
+ Version: 1.1.0
6
Author: dFactory
7
Author URI: http://www.dfactory.eu/
8
Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
61
'hide_bars_delay' => 5000,
62
'video_max_width' => 1080
63
)
64
+ ),
65
+ 'version' => '1.0.5'
66
);
67
private $scripts = array();
68
private $options = array();
72
73
public function __construct()
74
{
75
+ register_activation_hook(__FILE__, array(&$this, 'multisite_activation'));
76
+ register_deactivation_hook(__FILE__, array(&$this, 'multisite_deactivation'));
77
+
78
+ //changes from older versions
79
+ if(version_compare((($db_version = get_option('responsive_lightbox_version')) === FALSE ? '1.0.0' : $db_version), '1.0.5', '<'))
80
+ {
81
+ if(($array = get_option('rl_settings')) !== FALSE)
82
+ {
83
+ update_option('responsive_lightbox_settings', $array);
84
+ delete_option('rl_settings');
85
+ }
86
+
87
+ if(($array = get_option('rl_configuration')) !== FALSE)
88
+ {
89
+ update_option('responsive_lightbox_configuration', $array);
90
+ delete_option('rl_configuration');
91
+ }
92
+
93
+ update_option('responsive_lightbox_version', $this->defaults['version']);
94
+ }
95
96
+ $this->options['settings'] = array_merge($this->defaults['settings'], (($array = get_option('responsive_lightbox_settings')) === FALSE ? array() : $array));
97
+ $this->options['configuration'] = array_merge($this->defaults['configuration'], (($array = get_option('responsive_lightbox_configuration')) === FALSE ? array() : $array));
98
99
//actions
100
add_action('plugins_loaded', array(&$this, 'load_textdomain'));
274
$this->tabs = array(
275
'general-settings' => array(
276
'name' => __('General settings', 'responsive-lightbox'),
277
+ 'key' => 'responsive_lightbox_settings',
278
'submit' => 'save_rl_settings'
279
),
280
'configuration' => array(
281
'name' => __('Lightbox settings', 'responsive-lightbox'),
282
+ 'key' => 'responsive_lightbox_configuration',
283
'submit' => 'save_rl_configuration',
284
'reset' => 'reset_rl_configuration'
285
)
287
}
288
289
290
+ public function multisite_activation($networkwide)
291
{
292
+ if(is_multisite() && $networkwide)
293
+ {
294
+ global $wpdb;
295
+
296
+ $activated_blogs = array();
297
+ $current_blog_id = $wpdb->blogid;
298
+ $blogs_ids = $wpdb->get_col($wpdb->prepare('SELECT blog_id FROM '.$wpdb->blogs, ''));
299
+
300
+ foreach($blogs_ids as $blog_id)
301
+ {
302
+ switch_to_blog($blog_id);
303
+ $this->activate_single();
304
+ $activated_blogs[] = (int)$blog_id;
305
+ }
306
+
307
+ switch_to_blog($current_blog_id);
308
+ update_site_option('responsive_lightbox_activated_blogs', $activated_blogs, array());
309
+ }
310
+ else
311
+ $this->activate_single();
312
}
313
314
315
+ public function activate_single()
316
{
317
+ add_option('responsive_lightbox_settings', $this->defaults['settings'], '', 'no');
318
+ add_option('responsive_lightbox_configuration', $this->defaults['configuration'], '', 'no');
319
+ add_option('responsive_lightbox_version', $this->defaults['version'], '', 'no');
320
+ }
321
+
322
+
323
+ public function multisite_deactivation($networkwide)
324
+ {
325
+ if(is_multisite() && $networkwide)
326
+ {
327
+ global $wpdb;
328
+
329
+ $current_blog_id = $wpdb->blogid;
330
+ $blogs_ids = $wpdb->get_col($wpdb->prepare('SELECT blog_id FROM '.$wpdb->blogs, ''));
331
+
332
+ if(($activated_blogs = get_site_option('responsive_lightbox_activated', FALSE, FALSE)) === FALSE)
333
+ $activated_blogs = array();
334
+
335
+ foreach($blogs_ids as $blog_id)
336
+ {
337
+ switch_to_blog($blog_id);
338
+ $this->deactivate_single(TRUE);
339
+
340
+ if(in_array((int)$blog_id, $activated_blogs, TRUE))
341
+ unset($activated_blogs[array_search($blog_id, $activated_blogs)]);
342
+ }
343
+
344
+ switch_to_blog($current_blog_id);
345
+ update_site_option('responsive_lightbox_activated_blogs', $activated_blogs);
346
+ }
347
+ else
348
+ $this->deactivate_single();
349
+ }
350
+
351
+
352
+ public function deactivate_single($multi = FALSE)
353
+ {
354
+ if($multi === TRUE)
355
+ {
356
+ $options = get_option('responsive_lightbox_settings');
357
+ $check = $options['deactivation_delete'];
358
+ }
359
+ else
360
+ $check = $this->options['settings']['deactivation_delete'];
361
+
362
+ if($check === TRUE)
363
{
364
+ delete_option('responsive_lightbox_settings');
365
+ delete_option('responsive_lightbox_configuration');
366
+ delete_option('responsive_lightbox_version');
367
}
368
}
369
370
371
public function register_settings()
372
{
373
+ register_setting('responsive_lightbox_settings', 'responsive_lightbox_settings', array(&$this, 'validate_options'));
374
375
//general settings
376
+ add_settings_section('responsive_lightbox_settings', __('General settings', 'responsive-lightbox'), '', 'responsive_lightbox_settings');
377
+ add_settings_field('rl_script', __('Lightbox script', 'responsive-lightbox'), array(&$this, 'rl_script'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
378
+ add_settings_field('rl_selector', __('Selector', 'responsive-lightbox'), array(&$this, 'rl_selector'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
379
+ add_settings_field('rl_galleries', __('Galleries', 'responsive-lightbox'), array(&$this, 'rl_galleries'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
380
+ add_settings_field('rl_videos', __('Video links', 'responsive-lightbox'), array(&$this, 'rl_videos'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
381
+ add_settings_field('rl_image_links', __('Image links', 'responsive-lightbox'), array(&$this, 'rl_image_links'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
382
+ add_settings_field('rl_images_as_gallery', __('Single images as gallery', 'responsive-lightbox'), array(&$this, 'rl_images_as_gallery'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
383
+ add_settings_field('rl_deactivation_delete', __('Deactivation', 'responsive-lightbox'), array(&$this, 'rl_deactivation_delete'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
384
385
//configuration
386
+ register_setting('responsive_lightbox_configuration', 'responsive_lightbox_configuration', array(&$this, 'validate_options'));
387
+ add_settings_section('responsive_lightbox_configuration', __('Lightbox settings', 'responsive-lightbox').': '.$this->scripts[$this->options['settings']['script']]['name'], '', 'responsive_lightbox_configuration');
388
389
if($this->options['settings']['script'] === 'swipebox')
390
{
391
+ add_settings_field('rl_sw_animation', __('Animation type', 'responsive-lightbox'), array(&$this, 'rl_sw_animation'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
392
+ add_settings_field('rl_sw_hide_bars', __('Top and bottom bars', 'responsive-lightbox'), array(&$this, 'rl_sw_hide_bars'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
393
+ add_settings_field('rl_video_max_width', __('Video max width', 'responsive-lightbox'), array(&$this, 'rl_video_max_width'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
394
}
395
elseif($this->options['settings']['script'] === 'prettyphoto')
396
{
397
+ add_settings_field('rl_pp_animation_speed', __('Animation speed', 'responsive-lightbox'), array(&$this, 'rl_pp_animation_speed'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
398
+ add_settings_field('rl_pp_slideshow', __('Slideshow', 'responsive-lightbox'), array(&$this, 'rl_pp_slideshow'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
399
+ add_settings_field('rl_pp_slideshow_autoplay', __('Slideshow autoplay', 'responsive-lightbox'), array(&$this, 'rl_pp_slideshow_autoplay'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
400
+ add_settings_field('rl_pp_opacity', __('Opacity', 'responsive-lightbox'), array(&$this, 'rl_pp_opacity'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
401
+ add_settings_field('rl_pp_title', __('Show title', 'responsive-lightbox'), array(&$this, 'rl_pp_title'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
402
+ add_settings_field('rl_pp_allow_resize', __('Allow resize big images', 'responsive-lightbox'), array(&$this, 'rl_pp_allow_resize'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
403
+ add_settings_field('rl_pp_width', __('Video width', 'responsive-lightbox'), array(&$this, 'rl_pp_width'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
404
+ add_settings_field('rl_pp_height', __('Video height', 'responsive-lightbox'), array(&$this, 'rl_pp_height'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
405
+ add_settings_field('rl_pp_theme', __('Theme', 'responsive-lightbox'), array(&$this, 'rl_pp_theme'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
406
+ add_settings_field('rl_pp_horizontal_padding', __('Horizontal padding', 'responsive-lightbox'), array(&$this, 'rl_pp_horizontal_padding'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
407
+ add_settings_field('rl_pp_hide_flash', __('Hide Flash', 'responsive-lightbox'), array(&$this, 'rl_pp_hide_flash'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
408
+ add_settings_field('rl_pp_wmode', __('Flash Window Mode (wmode)', 'responsive-lightbox'), array(&$this, 'rl_pp_wmode'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
409
+ add_settings_field('rl_pp_video_autoplay', __('Video autoplay', 'responsive-lightbox'), array(&$this, 'rl_pp_video_autoplay'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
410
+ add_settings_field('rl_pp_modal', __('Modal', 'responsive-lightbox'), array(&$this, 'rl_pp_modal'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
411
+ add_settings_field('rl_pp_deeplinking', __('Deeplinking', 'responsive-lightbox'), array(&$this, 'rl_pp_deeplinking'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
412
+ add_settings_field('rl_pp_overlay_gallery', __('Overlay gallery', 'responsive-lightbox'), array(&$this, 'rl_pp_overlay_gallery'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
413
+ add_settings_field('rl_pp_keyboard_shortcuts', __('Keyboard shortcuts', 'responsive-lightbox'), array(&$this, 'rl_pp_keyboard_shortcuts'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
414
+ add_settings_field('rl_pp_social', __('Social (Twitter, Facebook)', 'responsive-lightbox'), array(&$this, 'rl_pp_social'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
415
}
416
}
417
424
foreach($this->scripts as $val => $trans)
425
{
426
echo '
427
+ <input id="rl-script-'.$val.'" type="radio" name="responsive_lightbox_settings[script]" value="'.$val.'" '.checked($val, $this->options['settings']['script'], FALSE).' />
428
<label for="rl-script-'.$val.'">'.$trans['name'].'</label>';
429
}
430
438
{
439
echo '
440
<div>
441
+ <input type="text" value="'.$this->options['settings']['selector'].'" name="responsive_lightbox_settings[selector]" />
442
<p class="description">'.__('Select to which rel selector lightbox effect will be applied to.', 'responsive-lightbox').'</p>
443
</div>';
444
}
452
foreach($this->choices as $val => $trans)
453
{
454
echo '
455
+ <input id="rl-galleries-'.$val.'" type="radio" name="responsive_lightbox_settings[galleries]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['galleries'], FALSE).' />
456
<label for="rl-galleries-'.$val.'">'.$trans.'</label>';
457
}
458
470
foreach($this->choices as $val => $trans)
471
{
472
echo '
473
+ <input id="rl-videos-'.$val.'" type="radio" name="responsive_lightbox_settings[videos]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['videos'], FALSE).' />
474
<label for="rl-videos-'.$val.'">'.$trans.'</label>';
475
}
476
488
foreach($this->choices as $val => $trans)
489
{
490
echo '
491
+ <input id="rl-image-links-'.$val.'" type="radio" name="responsive_lightbox_settings[image_links]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['image_links'], FALSE).' />
492
<label for="rl-image-links-'.$val.'">'.$trans.'</label>';
493
}
494
506
foreach($this->choices as $val => $trans)
507
{
508
echo '
509
+ <input id="rl-images-as-gallery-'.$val.'" type="radio" name="responsive_lightbox_settings[images_as_gallery]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['images_as_gallery'], FALSE).' />
510
<label for="rl-images-as-gallery-'.$val.'">'.$trans.'</label>';
511
}
512
524
foreach($this->choices as $val => $trans)
525
{
526
echo '
527
+ <input id="rl-deactivation-delete-'.$val.'" type="radio" name="responsive_lightbox_settings[deactivation_delete]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['deactivation_delete'], FALSE).' />
528
<label for="rl-deactivation-delete-'.$val.'">'.$trans.'</label>';
529
}
530
542
foreach($this->scripts['swipebox']['animations'] as $val => $trans)
543
{
544
echo '
545
+ <input id="rl-animation-'.$val.'" type="radio" name="responsive_lightbox_configuration[swipebox][animation]" value="'.$val.'" '.checked($val, $this->options['configuration']['swipebox']['animation'], FALSE).' />
546
<label for="rl-animation-'.$val.'">'.$trans.'</label>';
547
}
548
560
foreach($this->choices as $val => $trans)
561
{
562
echo '
563
+ <input id="rl-hide-bars-'.$val.'" type="radio" name="responsive_lightbox_configuration[swipebox][hide_bars]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['swipebox']['hide_bars'], FALSE).' />
564
<label for="rl-hide-bars-'.$val.'">'.$trans.'</label>';
565
}
566
568
<p class="description">'.__('Disable if you don\'t want to top and bottom bars to be hidden after a period of time.', 'responsive-lightbox').'</p>
569
</div>
570
<div id="rl_sw_hide_bars_delay"'.($this->options['configuration']['swipebox']['hide_bars'] === FALSE ? ' style="display: none;"' : '').'>
571
+ <input type="text" name="responsive_lightbox_configuration[swipebox][hide_bars_delay]" value="'.$this->options['configuration']['swipebox']['hide_bars_delay'].'" />
572
<p class="description">'.__('Enter the time after which the top and bottom bars will be hidden (when hiding is enabled).', 'responsive-lightbox').'</p>
573
</div>';
574
}
578
{
579
echo '
580
<div>
581
+ <input type="text" name="responsive_lightbox_configuration[swipebox][video_max_width]" value="'.$this->options['configuration']['swipebox']['video_max_width'].'" />
582
<p class="description">'.__('Enter the max video width in a lightbox', 'responsive-lightbox').'</p>
583
</div>';
584
}
592
foreach($this->scripts['prettyphoto']['animation_speeds'] as $val => $trans)
593
{
594
echo '
595
+ <input id="rl-animation-speed-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][animation_speed]" value="'.$val.'" '.checked($val, $this->options['configuration']['prettyphoto']['animation_speed'], FALSE).' />
596
<label for="rl-animation-speed-'.$val.'">'.$trans.'</label>';
597
}
598
610
foreach($this->choices as $val => $trans)
611
{
612
echo '
613
+ <input id="rl-slideshow-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][slideshow]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['slideshow'], FALSE).' />
614
<label for="rl-slideshow-'.$val.'">'.$trans.'</label>';
615
}
616
618
<p class="description">'.__('Display images as slideshow', 'responsive-lightbox').'</p>
619
</div>
620
<div id="rl_pp_slideshow_delay"'.($this->options['configuration']['prettyphoto']['slideshow'] === FALSE ? ' style="display: none;"' : '').'>
621
+ <input type="text" name="responsive_lightbox_configuration[prettyphoto][slideshow_delay]" value="'.$this->options['configuration']['prettyphoto']['slideshow_delay'].'" />
622
<p class="description">'.__('Enter time (in miliseconds)', 'responsive-lightbox').'</p>
623
</div>';
624
}
632
foreach($this->choices as $val => $trans)
633
{
634
echo '
635
+ <input id="rl-slideshow-autoplay-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][slideshow_autoplay]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['slideshow_autoplay'], FALSE).' />
636
<label for="rl-slideshow-autoplay-'.$val.'">'.$trans.'</label>';
637
}
638
646
{
647
echo '
648
<div>
649
+ <input type="text" name="responsive_lightbox_configuration[prettyphoto][opacity]" value="'.$this->options['configuration']['prettyphoto']['opacity'].'" />
650
<p class="description">'.__('Value between 0 and 1 (for e.g. 0.5)', 'responsive-lightbox').'</p>
651
</div>';
652
}
660
foreach($this->choices as $val => $trans)
661
{
662
echo '
663
+ <input id="rl-show-title-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][show_title]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['show_title'], FALSE).' />
664
<label for="rl-show-title-'.$val.'">'.$trans.'</label>';
665
}
666
678
foreach($this->choices as $val => $trans)
679
{
680
echo '
681
+ <input id="rl-allow-resize-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][allow_resize]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['allow_resize'], FALSE).' />
682
<label for="rl-allow-resize-'.$val.'">'.$trans.'</label>';
683
}
684
692
{
693
echo '
694
<div>
695
+ <input type="text" name="responsive_lightbox_configuration[prettyphoto][width]" value="'.$this->options['configuration']['prettyphoto']['width'].'" />
696
<p class="description">'.__('in pixels', 'responsive-lightbox').'</p>
697
</div>';
698
}
702
{
703
echo '
704
<div>
705
+ <input type="text" name="responsive_lightbox_configuration[prettyphoto][height]" value="'.$this->options['configuration']['prettyphoto']['height'].'" />
706
<p class="description">'.__('in pixels', 'responsive-lightbox').'</p>
707
</div>';
708
}
716
foreach($this->scripts['prettyphoto']['themes'] as $val => $trans)
717
{
718
echo '
719
+ <input id="rl-theme-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][theme]" value="'.$val.'" '.checked($val, $this->options['configuration']['prettyphoto']['theme'], FALSE).' />
720
<label for="rl-theme-'.$val.'">'.$trans.'</label>';
721
}
722
730
{
731
echo '
732
<div>
733
+ <input type="text" name="responsive_lightbox_configuration[prettyphoto][horizontal_padding]" value="'.$this->options['configuration']['prettyphoto']['horizontal_padding'].'" />
734
<p class="description">'.__('Horizontal padding (in pixels)', 'responsive-lightbox').'</p>
735
</div>';
736
}
744
foreach($this->choices as $val => $trans)
745
{
746
echo '
747
+ <input id="rl-hide-flash-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][hide_flash]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['hide_flash'], FALSE).' />
748
<label for="rl-hide-flash-'.$val.'">'.$trans.'</label>';
749
}
750
762
foreach($this->scripts['prettyphoto']['wmodes'] as $val => $trans)
763
{
764
echo '
765
+ <input id="rl-wmode-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][wmode]" value="'.$val.'" '.checked($val, $this->options['configuration']['prettyphoto']['wmode'], FALSE).' />
766
<label for="rl-wmode-'.$val.'">'.$trans.'</label>';
767
}
768
780
foreach($this->choices as $val => $trans)
781
{
782
echo '
783
+ <input id="rl-video-autoplay-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][video_autoplay]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['video_autoplay'], FALSE).' />
784
<label for="rl-video-autoplay-'.$val.'">'.$trans.'</label>';
785
}
786
798
foreach($this->choices as $val => $trans)
799
{
800
echo '
801
+ <input id="rl-modal-close-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][modal]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['modal'], FALSE).' />
802
<label for="rl-modal-close-'.$val.'">'.$trans.'</label>';
803
}
804
816
foreach($this->choices as $val => $trans)
817
{
818
echo '
819
+ <input id="rl-deeplinking-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][deeplinking]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['deeplinking'], FALSE).' />
820
<label for="rl-deeplinking-'.$val.'">'.$trans.'</label>';
821
}
822
834
foreach($this->choices as $val => $trans)
835
{
836
echo '
837
+ <input id="rl-overlay-gallery-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][overlay_gallery]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['overlay_gallery'], FALSE).' />
838
<label for="rl-overlay-gallery-'.$val.'">'.$trans.'</label>';
839
}
840
852
foreach($this->choices as $val => $trans)
853
{
854
echo '
855
+ <input id="rl-keyboard-shortcuts-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][keyboard_shortcuts]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['keyboard_shortcuts'], FALSE).' />
856
<label for="rl-keyboard-shortcuts-'.$val.'">'.$trans.'</label>';
857
}
858
870
foreach($this->choices as $val => $trans)
871
{
872
echo '
873
+ <input id="rl-social-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][social]" value="'.$val.'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['social'], FALSE).' />
874
<label for="rl-social-'.$val.'">'.$trans.'</label>';
875
}
876