Responsive Lightbox & Gallery - Version 1.6.12

Version Description

  • Fix: WooCommerce single product image lightbox
Download this release

Release Info

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

Code changes from version 1.6.11 to 1.6.12

assets/nivo/nivo-lightbox.css DELETED
@@ -1,205 +0,0 @@
1
- /*
2
- * Nivo Lightbox v1.2.0
3
- * http://dev7studios.com/nivo-lightbox
4
- *
5
- * Copyright 2013, Dev7studios
6
- * Free to use and abuse under the MIT license.
7
- * http://www.opensource.org/licenses/mit-license.php
8
- */
9
-
10
- .nivo-lightbox-overlay {
11
- position: fixed;
12
- top: 0;
13
- left: 0;
14
- z-index: 99998;
15
- width: 100%;
16
- height: 100%;
17
- overflow: hidden;
18
- visibility: hidden;
19
- opacity: 0;
20
- -webkit-box-sizing: border-box;
21
- -moz-box-sizing: border-box;
22
- box-sizing: border-box;
23
- }
24
- .nivo-lightbox-overlay.nivo-lightbox-open {
25
- visibility: visible;
26
- opacity: 1;
27
- }
28
- .nivo-lightbox-wrap {
29
- position: absolute;
30
- top: 10%;
31
- bottom: 10%;
32
- left: 10%;
33
- right: 10%;
34
- }
35
- .nivo-lightbox-content {
36
- width: 100%;
37
- height: 100%;
38
- }
39
- .nivo-lightbox-title-wrap {
40
- position: absolute;
41
- bottom: 0;
42
- left: 0;
43
- width: 100%;
44
- z-index: 99999;
45
- text-align: center;
46
- }
47
- .nivo-lightbox-nav { display: none; }
48
- .nivo-lightbox-prev {
49
- position: absolute;
50
- top: 50%;
51
- left: 0;
52
- }
53
- .nivo-lightbox-next {
54
- position: absolute;
55
- top: 50%;
56
- right: 0;
57
- }
58
- .nivo-lightbox-close {
59
- position: absolute;
60
- top: 2%;
61
- right: 2%;
62
- }
63
-
64
- .nivo-lightbox-image { text-align: center; }
65
- .nivo-lightbox-image img {
66
- max-width: 100%;
67
- max-height: 100%;
68
- width: auto;
69
- height: auto;
70
- vertical-align: middle;
71
- }
72
- .nivo-lightbox-content iframe {
73
- width: 100%;
74
- height: 100%;
75
- }
76
- .nivo-lightbox-inline,
77
- .nivo-lightbox-ajax {
78
- max-height: 100%;
79
- overflow: auto;
80
- -webkit-box-sizing: border-box;
81
- -moz-box-sizing: border-box;
82
- box-sizing: border-box;
83
- /* https://bugzilla.mozilla.org/show_bug.cgi?id=308801 */
84
- }
85
- .nivo-lightbox-error {
86
- display: table;
87
- text-align: center;
88
- width: 100%;
89
- height: 100%;
90
- color: #fff;
91
- text-shadow: 0 1px 1px #000;
92
- }
93
- .nivo-lightbox-error p {
94
- display: table-cell;
95
- vertical-align: middle;
96
- }
97
-
98
- /* Effects
99
- **********************************************/
100
- .nivo-lightbox-notouch .nivo-lightbox-effect-fade,
101
- .nivo-lightbox-notouch .nivo-lightbox-effect-fadeScale,
102
- .nivo-lightbox-notouch .nivo-lightbox-effect-slideLeft,
103
- .nivo-lightbox-notouch .nivo-lightbox-effect-slideRight,
104
- .nivo-lightbox-notouch .nivo-lightbox-effect-slideUp,
105
- .nivo-lightbox-notouch .nivo-lightbox-effect-slideDown,
106
- .nivo-lightbox-notouch .nivo-lightbox-effect-fall {
107
- -webkit-transition: all 0.2s ease-in-out;
108
- -moz-transition: all 0.2s ease-in-out;
109
- -ms-transition: all 0.2s ease-in-out;
110
- -o-transition: all 0.2s ease-in-out;
111
- transition: all 0.2s ease-in-out;
112
- }
113
-
114
- /* fadeScale */
115
- .nivo-lightbox-effect-fadeScale .nivo-lightbox-wrap {
116
- -webkit-transition: all 0.3s;
117
- -moz-transition: all 0.3s;
118
- -ms-transition: all 0.3s;
119
- -o-transition: all 0.3s;
120
- transition: all 0.3s;
121
- -webkit-transform: scale(0.7);
122
- -moz-transform: scale(0.7);
123
- -ms-transform: scale(0.7);
124
- transform: scale(0.7);
125
- }
126
- .nivo-lightbox-effect-fadeScale.nivo-lightbox-open .nivo-lightbox-wrap {
127
- -webkit-transform: scale(1);
128
- -moz-transform: scale(1);
129
- -ms-transform: scale(1);
130
- transform: scale(1);
131
- }
132
-
133
- /* slideLeft / slideRight / slideUp / slideDown */
134
- .nivo-lightbox-effect-slideLeft .nivo-lightbox-wrap,
135
- .nivo-lightbox-effect-slideRight .nivo-lightbox-wrap,
136
- .nivo-lightbox-effect-slideUp .nivo-lightbox-wrap,
137
- .nivo-lightbox-effect-slideDown .nivo-lightbox-wrap {
138
- -webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
139
- -moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
140
- -ms-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
141
- -o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
142
- transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
143
- }
144
- .nivo-lightbox-effect-slideLeft .nivo-lightbox-wrap {
145
- -webkit-transform: translateX(-10%);
146
- -moz-transform: translateX(-10%);
147
- -ms-transform: translateX(-10%);
148
- transform: translateX(-10%);
149
- }
150
- .nivo-lightbox-effect-slideRight .nivo-lightbox-wrap {
151
- -webkit-transform: translateX(10%);
152
- -moz-transform: translateX(10%);
153
- -ms-transform: translateX(10%);
154
- transform: translateX(10%);
155
- }
156
- .nivo-lightbox-effect-slideLeft.nivo-lightbox-open .nivo-lightbox-wrap,
157
- .nivo-lightbox-effect-slideRight.nivo-lightbox-open .nivo-lightbox-wrap {
158
- -webkit-transform: translateX(0);
159
- -moz-transform: translateX(0);
160
- -ms-transform: translateX(0);
161
- transform: translateX(0);
162
- }
163
- .nivo-lightbox-effect-slideDown .nivo-lightbox-wrap {
164
- -webkit-transform: translateY(-10%);
165
- -moz-transform: translateY(-10%);
166
- -ms-transform: translateY(-10%);
167
- transform: translateY(-10%);
168
- }
169
- .nivo-lightbox-effect-slideUp .nivo-lightbox-wrap {
170
- -webkit-transform: translateY(10%);
171
- -moz-transform: translateY(10%);
172
- -ms-transform: translateY(10%);
173
- transform: translateY(10%);
174
- }
175
- .nivo-lightbox-effect-slideUp.nivo-lightbox-open .nivo-lightbox-wrap,
176
- .nivo-lightbox-effect-slideDown.nivo-lightbox-open .nivo-lightbox-wrap {
177
- -webkit-transform: translateY(0);
178
- -moz-transform: translateY(0);
179
- -ms-transform: translateY(0);
180
- transform: translateY(0);
181
- }
182
-
183
- /* fall */
184
- .nivo-lightbox-body-effect-fall .nivo-lightbox-effect-fall {
185
- -webkit-perspective: 1000px;
186
- -moz-perspective: 1000px;
187
- perspective: 1000px;
188
- }
189
- .nivo-lightbox-effect-fall .nivo-lightbox-wrap {
190
- -webkit-transition: all 0.3s ease-out;
191
- -moz-transition: all 0.3s ease-out;
192
- -ms-transition: all 0.3s ease-out;
193
- -o-transition: all 0.3s ease-out;
194
- transition: all 0.3s ease-out;
195
- -webkit-transform: translateZ(300px);
196
- -moz-transform: translateZ(300px);
197
- -ms-transform: translateZ(300px);
198
- transform: translateZ(300px);
199
- }
200
- .nivo-lightbox-effect-fall.nivo-lightbox-open .nivo-lightbox-wrap {
201
- -webkit-transform: translateZ(0);
202
- -moz-transform: translateZ(0);
203
- -ms-transform: translateZ(0);
204
- transform: translateZ(0);
205
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-frontend.php CHANGED
@@ -242,7 +242,7 @@ class Responsive_Lightbox_Frontend {
242
  */
243
  public function woocommerce_single_product_image_html( $html ) {
244
  if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
245
- $html = str_replace( 'data-rel="prettyPhoto"', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '"', $html );
246
  }
247
  return $html;
248
  }
@@ -255,7 +255,7 @@ class Responsive_Lightbox_Frontend {
255
  */
256
  public function woocommerce_single_product_image_thumbnail_html( $html ) {
257
  if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
258
- $html = str_replace( 'data-rel="prettyPhoto[product-gallery]"', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . $this->gallery_no . '"', $html );
259
  }
260
  return $html;
261
  }
242
  */
243
  public function woocommerce_single_product_image_html( $html ) {
244
  if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
245
+ $html = preg_replace( '/data-rel=\"(.*?)\"/', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . $this->gallery_no . '"', $html );
246
  }
247
  return $html;
248
  }
255
  */
256
  public function woocommerce_single_product_image_thumbnail_html( $html ) {
257
  if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
258
+ $html = preg_replace( '/data-rel=\"(.*?)\"/', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . $this->gallery_no . '"', $html );
259
  }
260
  return $html;
261
  }
includes/class-settings.php CHANGED
@@ -1006,9 +1006,9 @@ class Responsive_Lightbox_Settings {
1006
  <p class="inner">' . sprintf( __( 'If you are having problems with this plugin, please browse it\'s <a href="%s" target="_blank">Documentation</a> or talk about them in the <a href="%s" target="_blank">Support forum</a>', 'responsive-lightbox' ), 'https://www.dfactory.eu/docs/responsive-lightbox/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=docs', 'https://www.dfactory.eu/support/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=support' ) . '</p>
1007
  <hr />
1008
  <h4 class="inner">' . __( 'Do you like this plugin?', 'responsive-lightbox' ) . '</h4>
1009
- <p class="inner"><a href="http://wordpress.org/support/view/plugin-reviews/responsive-lightbox" target="_blank" title="' . __( 'Rate it 5', 'responsive-lightbox' ) . '">' . __( 'Rate it 5', 'responsive-lightbox' ) . '</a> ' . __( 'on WordPress.org', 'responsive-lightbox' ) . '<br />' .
1010
- __( 'Blog about it & link to the', 'responsive-lightbox' ) . ' <a href="http://www.dfactory.eu/plugins/responsive-lightbox/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=blog-about" target="_blank" title="' . __( 'plugin page', 'responsive-lightbox' ) . '">' . __( 'plugin page', 'responsive-lightbox' ) . '</a><br />' .
1011
- __( 'Check out our other', 'responsive-lightbox' ) . ' <a href="http://www.dfactory.eu/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=other-plugins" target="_blank" title="' . __( 'WordPress plugins', 'responsive-lightbox' ) . '">' . __( 'WordPress plugins', 'responsive-lightbox' ) . '</a>
1012
  </p>
1013
  <hr />
1014
  <p class="df-link inner">Created by <a href="http://www.dfactory.eu/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=created-by" target="_blank" title="dFactory - Quality plugins for WordPress"><img src="' . RESPONSIVE_LIGHTBOX_URL . '/images/logo-dfactory.png' . '" title="dFactory - Quality plugins for WordPress" alt="dFactory - Quality plugins for WordPress" /></a></p>
1006
  <p class="inner">' . sprintf( __( 'If you are having problems with this plugin, please browse it\'s <a href="%s" target="_blank">Documentation</a> or talk about them in the <a href="%s" target="_blank">Support forum</a>', 'responsive-lightbox' ), 'https://www.dfactory.eu/docs/responsive-lightbox/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=docs', 'https://www.dfactory.eu/support/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=support' ) . '</p>
1007
  <hr />
1008
  <h4 class="inner">' . __( 'Do you like this plugin?', 'responsive-lightbox' ) . '</h4>
1009
+ <p class="inner">' . sprintf( __( '<a href="%s" target="_blank">Rate it 5</a> on WordPress.org', 'responsive-lightbox' ), 'https://wordpress.org/support/plugin/responsive-lightbox/reviews/?filter=5' ) . '<br />' .
1010
+ sprintf( __( 'Blog about it & link to the <a href="%s" target="_blank">plugin page</a>.', 'responsive-lightbox' ), 'https://dfactory.eu/plugins/responsive-lightbox/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=blog-about' ) . '<br />' .
1011
+ sprintf( __( 'Check out our other <a href="%s" target="_blank">WordPress plugins</a>.', 'responsive-lightbox' ), 'https://dfactory.eu/plugins/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=other-plugins' ) . '
1012
  </p>
1013
  <hr />
1014
  <p class="df-link inner">Created by <a href="http://www.dfactory.eu/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=created-by" target="_blank" title="dFactory - Quality plugins for WordPress"><img src="' . RESPONSIVE_LIGHTBOX_URL . '/images/logo-dfactory.png' . '" title="dFactory - Quality plugins for WordPress" alt="dFactory - Quality plugins for WordPress" /></a></p>
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Responsive Lightbox by dFactory ===
2
  Contributors: dfactory
3
  Donate link: http://www.dfactory.eu/
4
- Tags: gallery, images, lightbox, photos, theme, photo, image, picture, slideshow, modal, overlay, video, videos
5
  Requires at least: 4.0
6
- Tested up to: 4.7.1
7
- Stable tag: 1.6.11
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -62,6 +62,9 @@ No questions yet.
62
 
63
  == Changelog ==
64
 
 
 
 
65
  = 1.6.11 =
66
  * Tweak: Added plugin documentation link
67
  * Tweak: Nivo lightbox update to 1.3.1
@@ -287,6 +290,5 @@ Initial release
287
 
288
  == Upgrade Notice ==
289
 
290
- = 1.6.11 =
291
- * Tweak: Added plugin documentation link
292
- * Tweak: Nivo lightbox update to 1.3.1
1
  === Responsive Lightbox by dFactory ===
2
  Contributors: dfactory
3
  Donate link: http://www.dfactory.eu/
4
+ Tags: gallery, images, lightbox, photos, theme, photo, image, picture, slideshow, modal, overlay, video
5
  Requires at least: 4.0
6
+ Tested up to: 4.7.2
7
+ Stable tag: 1.6.12
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
62
 
63
  == Changelog ==
64
 
65
+ = 1.6.12 =
66
+ * Fix: WooCommerce single product image lightbox
67
+
68
  = 1.6.11 =
69
  * Tweak: Added plugin documentation link
70
  * Tweak: Nivo lightbox update to 1.3.1
290
 
291
  == Upgrade Notice ==
292
 
293
+ = 1.6.12 =
294
+ * Fix: WooCommerce single product image lightbox
 
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.6.11
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
@@ -36,7 +36,7 @@ include_once( RESPONSIVE_LIGHTBOX_PATH . 'includes/class-settings.php' );
36
  * Responsive Lightbox class.
37
  *
38
  * @class Responsive_Lightbox
39
- * @version 1.6.11
40
  */
41
  class Responsive_Lightbox {
42
 
@@ -155,7 +155,7 @@ class Responsive_Lightbox {
155
  'gallery_fade_out' => 300
156
  )
157
  ),
158
- 'version' => '1.6.11'
159
  );
160
  public $options = array();
161
  private $notices = array();
@@ -762,6 +762,30 @@ class Responsive_Lightbox {
762
  private function get_boolean_value( $option ) {
763
  return ( $option == true ? 1 : 0 );
764
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
765
 
766
  }
767
 
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.6.12
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
36
  * Responsive Lightbox class.
37
  *
38
  * @class Responsive_Lightbox
39
+ * @version 1.6.12
40
  */
41
  class Responsive_Lightbox {
42
 
155
  'gallery_fade_out' => 300
156
  )
157
  ),
158
+ 'version' => '1.6.12'
159
  );
160
  public $options = array();
161
  private $notices = array();
762
  private function get_boolean_value( $option ) {
763
  return ( $option == true ? 1 : 0 );
764
  }
765
+
766
+ /**
767
+ * Helper: convert hex color to rgb color.
768
+ *
769
+ * @param type $color
770
+ * @return array
771
+ */
772
+ public function hex2rgb( $color ) {
773
+ if ( $color[0] == '#' ) {
774
+ $color = substr( $color, 1 );
775
+ }
776
+ if ( strlen( $color ) == 6 ) {
777
+ list( $r, $g, $b ) = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );
778
+ } elseif ( strlen( $color ) == 3 ) {
779
+ list( $r, $g, $b ) = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] );
780
+ } else {
781
+ return false;
782
+ }
783
+ $r = hexdec( $r );
784
+ $g = hexdec( $g );
785
+ $b = hexdec( $b );
786
+
787
+ return array( $r, $g, $b );
788
+ }
789
 
790
  }
791