Responsive Lightbox & Gallery - Version 1.4.13

Version Description

  • Fix: Reverted back the regex change in lightbox selector to gallery links
Download this release

Release Info

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

Code changes from version 1.4.12 to 1.4.13

Files changed (2) hide show
  1. readme.txt +6 -3
  2. responsive-lightbox.php +7 -10
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.6
6
Tested up to: 4.2.2
7
- Stable tag: 1.4.12
8
License: MIT License
9
License URI: http://opensource.org/licenses/MIT
10
@@ -65,6 +65,9 @@ No questions yet.
65
66
== Changelog ==
67
68
= 1.4.12 =
69
* Fix: jQuery prettyPhoto DOM Cross-Site Scripting (XSS) vulnerability
70
* Tweak: Added regex filetype check before applying lightbox selector to gallery links.
@@ -190,5 +193,5 @@ Initial release
190
191
== Upgrade Notice ==
192
193
- = 1.4.12 =
194
- * Fix: jQuery prettyPhoto DOM Cross-Site Scripting (XSS) vulnerability
4
Tags: gallery, images, lightbox, links, photos, template, theme, photo, image, picture, slideshow, modal, overlay, YouTube, Vimeo, video, videos
5
Requires at least: 3.6
6
Tested up to: 4.2.2
7
+ Stable tag: 1.4.13
8
License: MIT License
9
License URI: http://opensource.org/licenses/MIT
10
65
66
== Changelog ==
67
68
+ = 1.4.13 =
69
+ * Fix: Reverted back the regex change in lightbox selector to gallery links
70
+
71
= 1.4.12 =
72
* Fix: jQuery prettyPhoto DOM Cross-Site Scripting (XSS) vulnerability
73
* Tweak: Added regex filetype check before applying lightbox selector to gallery links.
193
194
== Upgrade Notice ==
195
196
+ = 1.4.13 =
197
+ * Fix: Reverted back the regex change in lightbox selector to gallery links
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.4.12
6
Author: dFactory
7
Author URI: http://www.dfactory.eu/
8
Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
@@ -28,7 +28,7 @@ if ( ! defined( 'ABSPATH' ) )
28
* Responsive Lightbox class.
29
*
30
* @class Responsive_Lightbox
31
- * @version 1.4.12
32
*/
33
class Responsive_Lightbox {
34
@@ -122,7 +122,7 @@ class Responsive_Lightbox {
122
'quit_on_document_click' => true
123
)
124
),
125
- 'version' => '1.4.12'
126
);
127
private $scripts = array();
128
private $options = array();
@@ -256,14 +256,11 @@ class Responsive_Lightbox {
256
257
return $style;
258
}
259
-
260
public function add_gallery_lightbox_selector( $link, $id, $size, $permalink, $icon, $text ) {
261
- if ( preg_match( '/<a(.*?)href=(?:\'|")([^<]*?).(bmp|gif|jpeg|jpg|png)(?:\'|")(.*?)>/i', $link ) === 1 ) {
262
- $link = ( preg_match( '/<a.*? rel=("|\').*?("|\')>/', $link ) === 1 ? preg_replace( '/(<a.*? rel=(?:"|\').*?)((?:"|\').*?>)/', '$1 ' . $this->options['settings']['selector'] . '[gallery-' . $this->gallery_no . ']' . '$2', $link ) : preg_replace( '/(<a.*?)>/', '$1 rel="' . $this->options['settings']['selector'] . '[gallery-' . $this->gallery_no . ']' . '">', $link ) );
263
- $link = ( preg_match( '/<a.*? href=("|\').*?("|\')>/', $link ) === 1 ? preg_replace( '/(<a.*? href=(?:"|\')).*?((?:"|\').*?>)/', '$1' . wp_get_attachment_url( $id ) . '$2', $link ) : preg_replace( '/(<a.*?)>/', '$1 href="' . wp_get_attachment_url( $id ) . '">', $link ) );
264
- }
265
-
266
- return apply_filters( 'rl_lightbox_attachment_link', $link, $id, $size, $permalink, $icon, $text );
267
}
268
269
public function load_defaults() {
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.4.13
6
Author: dFactory
7
Author URI: http://www.dfactory.eu/
8
Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
28
* Responsive Lightbox class.
29
*
30
* @class Responsive_Lightbox
31
+ * @version 1.4.13
32
*/
33
class Responsive_Lightbox {
34
122
'quit_on_document_click' => true
123
)
124
),
125
+ 'version' => '1.4.13'
126
);
127
private $scripts = array();
128
private $options = array();
256
257
return $style;
258
}
259
+
260
public function add_gallery_lightbox_selector( $link, $id, $size, $permalink, $icon, $text ) {
261
+ $link = (preg_match( '/<a.*? rel=("|\').*?("|\')>/', $link ) === 1 ? preg_replace( '/(<a.*? rel=(?:"|\').*?)((?:"|\').*?>)/', '$1 ' . $this->options['settings']['selector'] . '[gallery-' . $this->gallery_no . ']' . '$2', $link ) : preg_replace( '/(<a.*?)>/', '$1 rel="' . $this->options['settings']['selector'] . '[gallery-' . $this->gallery_no . ']' . '">', $link ));
262
+
263
+ return apply_filters( 'rl_lightbox_attachment_link', ( preg_match( '/<a.*? href=("|\').*?("|\')>/', $link ) === 1 ? preg_replace( '/(<a.*? href=(?:"|\')).*?((?:"|\').*?>)/', '$1' . wp_get_attachment_url( $id ) . '$2', $link ) : preg_replace( '/(<a.*?)>/', '$1 href="' . wp_get_attachment_url( $id ) . '">', $link ) ), $id, $size, $permalink, $icon, $text );
264
}
265
266
public function load_defaults() {