Responsive Lightbox & Gallery - Version 2.4.2

Version Description

  • Fix: Potential XSS vulnerabilities related to settings validation
  • Fix: Missing image alt attribute
  • Fix: Undefined array key "type"
  • Fix: Possible invalid data passed to attachment_url_to_postid function
Download this release

Release Info

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

Code changes from version 2.4.1 to 2.4.2

assets/imagesloaded/LICENSE CHANGED
@@ -1,19 +1,7 @@
1
- MIT License
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
 
10
- The above copyright notice and this permission notice shall be included in all
11
- copies or substantial portions of the Software.
12
 
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- SOFTWARE.
1
+ Copyright (c) 2011-2022 [David DeSandro](https://desandro.com) and [contributors](https://github.com/desandro/imagesloaded/graphs/contributors)
2
 
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 
 
 
 
 
4
 
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 
6
 
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 
 
 
 
 
assets/imagesloaded/README.md CHANGED
@@ -2,7 +2,7 @@
2
 
3
  <p class="tagline">JavaScript is all like "You images done yet or what?"</p>
4
 
5
- [imagesloaded.desandro.com](http://imagesloaded.desandro.com)
6
 
7
  Detect when images have been loaded.
8
 
@@ -10,22 +10,22 @@ Detect when images have been loaded.
10
 
11
  ### Download
12
 
13
- + [imagesloaded.pkgd.min.js](https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js) minified
14
- + [imagesloaded.pkgd.js](https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.js) un-minified
15
 
16
  ### CDN
17
 
18
  ``` html
19
- <script src="https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js"></script>
20
  <!-- or -->
21
- <script src="https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.js"></script>
22
  ```
23
 
24
  ### Package managers
25
 
26
- Install via [npm](https://www.npmjs.com/package/imagesloaded): `npm install imagesloaded`
27
 
28
- Install via [Bower](http://bower.io): `bower install imagesloaded --save`
29
 
30
  ## jQuery
31
 
@@ -46,7 +46,7 @@ $('#container').imagesLoaded( {
46
  );
47
  ```
48
 
49
- `.imagesLoaded()` returns a [jQuery Deferred object](http://api.jquery.com/category/deferred-object/). This allows you to use `.always()`, `.done()`, `.fail()` and `.progress()`.
50
 
51
  ``` js
52
  $('#container').imagesLoaded()
@@ -126,7 +126,7 @@ imagesLoaded( '#container', { background: true }, function() {
126
  });
127
  ```
128
 
129
- [See jQuery demo](http://codepen.io/desandro/pen/pjVMPB) or [vanilla JS demo](http://codepen.io/desandro/pen/avKooW) on CodePen.
130
 
131
  Set to a selector string like `{ background: '.item' }` to detect when the background images of child elements have loaded.
132
 
@@ -142,7 +142,7 @@ imagesLoaded( '#container', { background: '.item' }, function() {
142
  });
143
  ```
144
 
145
- [See jQuery demo](http://codepen.io/desandro/pen/avKoZL) or [vanilla JS demo](http://codepen.io/desandro/pen/vNrBGz) on CodePen.
146
 
147
  ## Events
148
 
@@ -238,32 +238,6 @@ imgLoad.on( 'always', function() {
238
  });
239
  ```
240
 
241
- ## Browserify
242
-
243
- imagesLoaded works with [Browserify](http://browserify.org/).
244
-
245
- ``` bash
246
- npm install imagesloaded --save
247
- ```
248
-
249
- ``` js
250
- var imagesLoaded = require('imagesloaded');
251
-
252
- imagesLoaded( elem, function() {...} );
253
- ```
254
-
255
- Use `.makeJQueryPlugin` to make to use `.imagesLoaded()` jQuery plugin.
256
-
257
- ``` js
258
- var $ = require('jquery');
259
- var imagesLoaded = require('imagesloaded');
260
-
261
- // provide jQuery argument
262
- imagesLoaded.makeJQueryPlugin( $ );
263
- // now use .imagesLoaded() jQuery plugin
264
- $('#container').imagesLoaded( function() {...});
265
- ```
266
-
267
  ## Webpack
268
 
269
  Install imagesLoaded with npm.
@@ -302,61 +276,50 @@ Run webpack.
302
  webpack main.js bundle.js
303
  ```
304
 
305
- ## RequireJS
306
-
307
- imagesLoaded works with [RequireJS](http://requirejs.org).
308
 
309
- You can require [imagesloaded.pkgd.js](http://imagesloaded.desandro.com/imagesloaded.pkgd.js).
310
 
311
- ``` js
312
- requirejs( [
313
- 'path/to/imagesloaded.pkgd.js',
314
- ], function( imagesLoaded ) {
315
- imagesLoaded( '#container', function() { ... });
316
- });
317
  ```
318
 
319
- Use `.makeJQueryPlugin` to make `.imagesLoaded()` jQuery plugin.
320
-
321
  ``` js
322
- requirejs( [
323
- 'jquery',
324
- 'path/to/imagesloaded.pkgd.js',
325
- ], function( $, imagesLoaded ) {
326
- // provide jQuery argument
327
- imagesLoaded.makeJQueryPlugin( $ );
328
- // now use .imagesLoaded() jQuery plugin
329
- $('#container').imagesLoaded( function() {...});
330
- });
331
  ```
332
 
333
- You can manage dependencies with [Bower](http://bower.io). Set `baseUrl` to `bower_components` and set a path config for all your application code.
334
 
335
  ``` js
336
- requirejs.config({
337
- baseUrl: 'bower_components/',
338
- paths: { // path to your app
339
- app: '../'
340
- }
341
- });
342
 
343
- requirejs( [
344
- 'imagesloaded/imagesloaded',
345
- 'app/my-component.js'
346
- ], function( imagesLoaded, myComp ) {
347
- imagesLoaded( '#container', function() { ... });
348
- });
349
  ```
350
 
 
351
  ## Browser support
352
 
353
- + IE9+
354
- + Android 2.3+
355
- + iOS Safari 4+
356
- + All other modern browsers
 
 
 
 
357
 
358
- Use [imagesLoaded v3](http://imagesloaded.desandro.com/v3/) for IE8 support.
 
 
 
 
359
 
360
  ## MIT License
361
 
362
- imagesLoaded is released under the [MIT License](http://desandro.mit-license.org/). Have at it.
2
 
3
  <p class="tagline">JavaScript is all like "You images done yet or what?"</p>
4
 
5
+ [imagesloaded.desandro.com](https://imagesloaded.desandro.com)
6
 
7
  Detect when images have been loaded.
8
 
10
 
11
  ### Download
12
 
13
+ + [imagesloaded.pkgd.min.js](https://unpkg.com/imagesloaded@5/imagesloaded.pkgd.min.js) minified
14
+ + [imagesloaded.pkgd.js](https://unpkg.com/imagesloaded@5/imagesloaded.pkgd.js) un-minified
15
 
16
  ### CDN
17
 
18
  ``` html
19
+ <script src="https://unpkg.com/imagesloaded@5/imagesloaded.pkgd.min.js"></script>
20
  <!-- or -->
21
+ <script src="https://unpkg.com/imagesloaded@5/imagesloaded.pkgd.js"></script>
22
  ```
23
 
24
  ### Package managers
25
 
26
+ Install via npm: `npm install imagesloaded`
27
 
28
+ Install via Yarn: `yarn add imagesloaded`
29
 
30
  ## jQuery
31
 
46
  );
47
  ```
48
 
49
+ `.imagesLoaded()` returns a [jQuery Deferred object](https://api.jquery.com/category/deferred-object/). This allows you to use `.always()`, `.done()`, `.fail()` and `.progress()`.
50
 
51
  ``` js
52
  $('#container').imagesLoaded()
126
  });
127
  ```
128
 
129
+ [See jQuery demo](https://codepen.io/desandro/pen/pjVMPB) or [vanilla JS demo](https://codepen.io/desandro/pen/avKooW) on CodePen.
130
 
131
  Set to a selector string like `{ background: '.item' }` to detect when the background images of child elements have loaded.
132
 
142
  });
143
  ```
144
 
145
+ [See jQuery demo](https://codepen.io/desandro/pen/avKoZL) or [vanilla JS demo](https://codepen.io/desandro/pen/vNrBGz) on CodePen.
146
 
147
  ## Events
148
 
238
  });
239
  ```
240
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  ## Webpack
242
 
243
  Install imagesLoaded with npm.
276
  webpack main.js bundle.js
277
  ```
278
 
279
+ ## Browserify
 
 
280
 
281
+ imagesLoaded works with [Browserify](https://browserify.org/).
282
 
283
+ ``` bash
284
+ npm install imagesloaded --save
 
 
 
 
285
  ```
286
 
 
 
287
  ``` js
288
+ var imagesLoaded = require('imagesloaded');
289
+
290
+ imagesLoaded( elem, function() {...} );
 
 
 
 
 
 
291
  ```
292
 
293
+ Use `.makeJQueryPlugin` to make to use `.imagesLoaded()` jQuery plugin.
294
 
295
  ``` js
296
+ var $ = require('jquery');
297
+ var imagesLoaded = require('imagesloaded');
 
 
 
 
298
 
299
+ // provide jQuery argument
300
+ imagesLoaded.makeJQueryPlugin( $ );
301
+ // now use .imagesLoaded() jQuery plugin
302
+ $('#container').imagesLoaded( function() {...});
 
 
303
  ```
304
 
305
+
306
  ## Browser support
307
 
308
+ + Chrome 49+
309
+ + Firefox 41+
310
+ + Edge 14+
311
+ + iOS Safari 8+
312
+
313
+ Use [imagesLoaded v4](https://github.com/desandro/imagesloaded/tree/v4.1.4) for Internet Explorer and other older browser support.
314
+
315
+ ## Development
316
 
317
+ Development uses Node.js v16 with npm v8
318
+
319
+ ``` bash
320
+ nvm use
321
+ ```
322
 
323
  ## MIT License
324
 
325
+ imagesLoaded is released under the [MIT License](https://desandro.mit-license.org/). Have at it.
assets/imagesloaded/imagesloaded.pkgd.js CHANGED
@@ -1,497 +1,441 @@
1
- /*!
2
- * imagesLoaded PACKAGED v4.1.4
3
- * JavaScript is all like "You images are done yet or what?"
4
- * MIT License
5
- */
6
-
7
- /**
8
- * EvEmitter v1.1.0
9
- * Lil' event emitter
10
- * MIT License
11
- */
12
-
13
- /* jshint unused: true, undef: true, strict: true */
14
-
15
- ( function( global, factory ) {
16
- // universal module definition
17
- /* jshint strict: false */ /* globals define, module, window */
18
- if ( typeof define == 'function' && define.amd ) {
19
- // AMD - RequireJS
20
- define( 'ev-emitter/ev-emitter',factory );
21
- } else if ( typeof module == 'object' && module.exports ) {
22
- // CommonJS - Browserify, Webpack
23
- module.exports = factory();
24
- } else {
25
- // Browser globals
26
- global.EvEmitter = factory();
27
- }
28
-
29
- }( typeof window != 'undefined' ? window : this, function() {
30
-
31
-
32
-
33
- function EvEmitter() {}
34
-
35
- var proto = EvEmitter.prototype;
36
-
37
- proto.on = function( eventName, listener ) {
38
- if ( !eventName || !listener ) {
39
- return;
40
- }
41
- // set events hash
42
- var events = this._events = this._events || {};
43
- // set listeners array
44
- var listeners = events[ eventName ] = events[ eventName ] || [];
45
- // only add once
46
- if ( listeners.indexOf( listener ) == -1 ) {
47
- listeners.push( listener );
48
- }
49
-
50
- return this;
51
- };
52
-
53
- proto.once = function( eventName, listener ) {
54
- if ( !eventName || !listener ) {
55
- return;
56
- }
57
- // add event
58
- this.on( eventName, listener );
59
- // set once flag
60
- // set onceEvents hash
61
- var onceEvents = this._onceEvents = this._onceEvents || {};
62
- // set onceListeners object
63
- var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
64
- // set flag
65
- onceListeners[ listener ] = true;
66
-
67
- return this;
68
- };
69
-
70
- proto.off = function( eventName, listener ) {
71
- var listeners = this._events && this._events[ eventName ];
72
- if ( !listeners || !listeners.length ) {
73
- return;
74
- }
75
- var index = listeners.indexOf( listener );
76
- if ( index != -1 ) {
77
- listeners.splice( index, 1 );
78
- }
79
-
80
- return this;
81
- };
82
-
83
- proto.emitEvent = function( eventName, args ) {
84
- var listeners = this._events && this._events[ eventName ];
85
- if ( !listeners || !listeners.length ) {
86
- return;
87
- }
88
- // copy over to avoid interference if .off() in listener
89
- listeners = listeners.slice(0);
90
- args = args || [];
91
- // once stuff
92
- var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
93
-
94
- for ( var i=0; i < listeners.length; i++ ) {
95
- var listener = listeners[i]
96
- var isOnce = onceListeners && onceListeners[ listener ];
97
- if ( isOnce ) {
98
- // remove listener
99
- // remove before trigger to prevent recursion
100
- this.off( eventName, listener );
101
- // unset once flag
102
- delete onceListeners[ listener ];
103
- }
104
- // trigger listener
105
- listener.apply( this, args );
106
- }
107
-
108
- return this;
109
- };
110
-
111
- proto.allOff = function() {
112
- delete this._events;
113
- delete this._onceEvents;
114
- };
115
-
116
- return EvEmitter;
117
-
118
- }));
119
-
120
- /*!
121
- * imagesLoaded v4.1.4
122
- * JavaScript is all like "You images are done yet or what?"
123
- * MIT License
124
- */
125
-
126
- ( function( window, factory ) { 'use strict';
127
- // universal module definition
128
-
129
- /*global define: false, module: false, require: false */
130
-
131
- if ( typeof define == 'function' && define.amd ) {
132
- // AMD
133
- define( [
134
- 'ev-emitter/ev-emitter'
135
- ], function( EvEmitter ) {
136
- return factory( window, EvEmitter );
137
- });
138
- } else if ( typeof module == 'object' && module.exports ) {
139
- // CommonJS
140
- module.exports = factory(
141
- window,
142
- require('ev-emitter')
143
- );
144
- } else {
145
- // browser global
146
- window.imagesLoaded = factory(
147
- window,
148
- window.EvEmitter
149
- );
150
- }
151
-
152
- })( typeof window !== 'undefined' ? window : this,
153
-
154
- // -------------------------- factory -------------------------- //
155
-
156
- function factory( window, EvEmitter ) {
157
-
158
-
159
-
160
- var $ = window.jQuery;
161
- var console = window.console;
162
-
163
- // -------------------------- helpers -------------------------- //
164
-
165
- // extend objects
166
- function extend( a, b ) {
167
- for ( var prop in b ) {
168
- a[ prop ] = b[ prop ];
169
- }
170
- return a;
171
- }
172
-
173
- var arraySlice = Array.prototype.slice;
174
-
175
- // turn element or nodeList into an array
176
- function makeArray( obj ) {
177
- if ( Array.isArray( obj ) ) {
178
- // use object if already an array
179
- return obj;
180
- }
181
-
182
- var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
183
- if ( isArrayLike ) {
184
- // convert nodeList to array
185
- return arraySlice.call( obj );
186
- }
187
-
188
- // array of single index
189
- return [ obj ];
190
- }
191
-
192
- // -------------------------- imagesLoaded -------------------------- //
193
-
194
- /**
195
- * @param {Array, Element, NodeList, String} elem
196
- * @param {Object or Function} options - if function, use as callback
197
- * @param {Function} onAlways - callback function
198
- */
199
- function ImagesLoaded( elem, options, onAlways ) {
200
- // coerce ImagesLoaded() without new, to be new ImagesLoaded()
201
- if ( !( this instanceof ImagesLoaded ) ) {
202
- return new ImagesLoaded( elem, options, onAlways );
203
- }
204
- // use elem as selector string
205
- var queryElem = elem;
206
- if ( typeof elem == 'string' ) {
207
- queryElem = document.querySelectorAll( elem );
208
- }
209
- // bail if bad element
210
- if ( !queryElem ) {
211
- console.error( 'Bad element for imagesLoaded ' + ( queryElem || elem ) );
212
- return;
213
- }
214
-
215
- this.elements = makeArray( queryElem );
216
- this.options = extend( {}, this.options );
217
- // shift arguments if no options set
218
- if ( typeof options == 'function' ) {
219
- onAlways = options;
220
- } else {
221
- extend( this.options, options );
222
- }
223
-
224
- if ( onAlways ) {
225
- this.on( 'always', onAlways );
226
- }
227
-
228
- this.getImages();
229
-
230
- if ( $ ) {
231
- // add jQuery Deferred object
232
- this.jqDeferred = new $.Deferred();
233
- }
234
-
235
- // HACK check async to allow time to bind listeners
236
- setTimeout( this.check.bind( this ) );
237
- }
238
-
239
- ImagesLoaded.prototype = Object.create( EvEmitter.prototype );
240
-
241
- ImagesLoaded.prototype.options = {};
242
-
243
- ImagesLoaded.prototype.getImages = function() {
244
- this.images = [];
245
-
246
- // filter & find items if we have an item selector
247
- this.elements.forEach( this.addElementImages, this );
248
- };
249
-
250
- /**
251
- * @param {Node} element
252
- */
253
- ImagesLoaded.prototype.addElementImages = function( elem ) {
254
- // filter siblings
255
- if ( elem.nodeName == 'IMG' ) {
256
- this.addImage( elem );
257
- }
258
- // get background image on element
259
- if ( this.options.background === true ) {
260
- this.addElementBackgroundImages( elem );
261
- }
262
-
263
- // find children
264
- // no non-element nodes, #143
265
- var nodeType = elem.nodeType;
266
- if ( !nodeType || !elementNodeTypes[ nodeType ] ) {
267
- return;
268
- }
269
- var childImgs = elem.querySelectorAll('img');
270
- // concat childElems to filterFound array
271
- for ( var i=0; i < childImgs.length; i++ ) {
272
- var img = childImgs[i];
273
- this.addImage( img );
274
- }
275
-
276
- // get child background images
277
- if ( typeof this.options.background == 'string' ) {
278
- var children = elem.querySelectorAll( this.options.background );
279
- for ( i=0; i < children.length; i++ ) {
280
- var child = children[i];
281
- this.addElementBackgroundImages( child );
282
- }
283
- }
284
- };
285
-
286
- var elementNodeTypes = {
287
- 1: true,
288
- 9: true,
289
- 11: true
290
- };
291
-
292
- ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {
293
- var style = getComputedStyle( elem );
294
- if ( !style ) {
295
- // Firefox returns null if in a hidden iframe https://bugzil.la/548397
296
- return;
297
- }
298
- // get url inside url("...")
299
- var reURL = /url\((['"])?(.*?)\1\)/gi;
300
- var matches = reURL.exec( style.backgroundImage );
301
- while ( matches !== null ) {
302
- var url = matches && matches[2];
303
- if ( url ) {
304
- this.addBackground( url, elem );
305
- }
306
- matches = reURL.exec( style.backgroundImage );
307
- }
308
- };
309
-
310
- /**
311
- * @param {Image} img
312
- */
313
- ImagesLoaded.prototype.addImage = function( img ) {
314
- var loadingImage = new LoadingImage( img );
315
- this.images.push( loadingImage );
316
- };
317
-
318
- ImagesLoaded.prototype.addBackground = function( url, elem ) {
319
- var background = new Background( url, elem );
320
- this.images.push( background );
321
- };
322
-
323
- ImagesLoaded.prototype.check = function() {
324
- var _this = this;
325
- this.progressedCount = 0;
326
- this.hasAnyBroken = false;
327
- // complete if no images
328
- if ( !this.images.length ) {
329
- this.complete();
330
- return;
331
- }
332
-
333
- function onProgress( image, elem, message ) {
334
- // HACK - Chrome triggers event before object properties have changed. #83
335
- setTimeout( function() {
336
- _this.progress( image, elem, message );
337
- });
338
- }
339
-
340
- this.images.forEach( function( loadingImage ) {
341
- loadingImage.once( 'progress', onProgress );
342
- loadingImage.check();
343
- });
344
- };
345
-
346
- ImagesLoaded.prototype.progress = function( image, elem, message ) {
347
- this.progressedCount++;
348
- this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
349
- // progress event
350
- this.emitEvent( 'progress', [ this, image, elem ] );
351
- if ( this.jqDeferred && this.jqDeferred.notify ) {
352
- this.jqDeferred.notify( this, image );
353
- }
354
- // check if completed
355
- if ( this.progressedCount == this.images.length ) {
356
- this.complete();
357
- }
358
-
359
- if ( this.options.debug && console ) {
360
- console.log( 'progress: ' + message, image, elem );
361
- }
362
- };
363
-
364
- ImagesLoaded.prototype.complete = function() {
365
- var eventName = this.hasAnyBroken ? 'fail' : 'done';
366
- this.isComplete = true;
367
- this.emitEvent( eventName, [ this ] );
368
- this.emitEvent( 'always', [ this ] );
369
- if ( this.jqDeferred ) {
370
- var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
371
- this.jqDeferred[ jqMethod ]( this );
372
- }
373
- };
374
-
375
- // -------------------------- -------------------------- //
376
-
377
- function LoadingImage( img ) {
378
- this.img = img;
379
- }
380
-
381
- LoadingImage.prototype = Object.create( EvEmitter.prototype );
382
-
383
- LoadingImage.prototype.check = function() {
384
- // If complete is true and browser supports natural sizes,
385
- // try to check for image status manually.
386
- var isComplete = this.getIsImageComplete();
387
- if ( isComplete ) {
388
- // report based on naturalWidth
389
- this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
390
- return;
391
- }
392
-
393
- // If none of the checks above matched, simulate loading on detached element.
394
- this.proxyImage = new Image();
395
- this.proxyImage.addEventListener( 'load', this );
396
- this.proxyImage.addEventListener( 'error', this );
397
- // bind to image as well for Firefox. #191
398
- this.img.addEventListener( 'load', this );
399
- this.img.addEventListener( 'error', this );
400
- this.proxyImage.src = this.img.src;
401
- };
402
-
403
- LoadingImage.prototype.getIsImageComplete = function() {
404
- // check for non-zero, non-undefined naturalWidth
405
- // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671
406
- return this.img.complete && this.img.naturalWidth;
407
- };
408
-
409
- LoadingImage.prototype.confirm = function( isLoaded, message ) {
410
- this.isLoaded = isLoaded;
411
- this.emitEvent( 'progress', [ this, this.img, message ] );
412
- };
413
-
414
- // ----- events ----- //
415
-
416
- // trigger specified handler for event type
417
- LoadingImage.prototype.handleEvent = function( event ) {
418
- var method = 'on' + event.type;
419
- if ( this[ method ] ) {
420
- this[ method ]( event );
421
- }
422
- };
423
-
424
- LoadingImage.prototype.onload = function() {
425
- this.confirm( true, 'onload' );
426
- this.unbindEvents();
427
- };
428
-
429
- LoadingImage.prototype.onerror = function() {
430
- this.confirm( false, 'onerror' );
431
- this.unbindEvents();
432
- };
433
-
434
- LoadingImage.prototype.unbindEvents = function() {
435
- this.proxyImage.removeEventListener( 'load', this );
436
- this.proxyImage.removeEventListener( 'error', this );
437
- this.img.removeEventListener( 'load', this );
438
- this.img.removeEventListener( 'error', this );
439
- };
440
-
441
- // -------------------------- Background -------------------------- //
442
-
443
- function Background( url, element ) {
444
- this.url = url;
445
- this.element = element;
446
- this.img = new Image();
447
- }
448
-
449
- // inherit LoadingImage prototype
450
- Background.prototype = Object.create( LoadingImage.prototype );
451
-
452
- Background.prototype.check = function() {
453
- this.img.addEventListener( 'load', this );
454
- this.img.addEventListener( 'error', this );
455
- this.img.src = this.url;
456
- // check if image is already complete
457
- var isComplete = this.getIsImageComplete();
458
- if ( isComplete ) {
459
- this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
460
- this.unbindEvents();
461
- }
462
- };
463
-
464
- Background.prototype.unbindEvents = function() {
465
- this.img.removeEventListener( 'load', this );
466
- this.img.removeEventListener( 'error', this );
467
- };
468
-
469
- Background.prototype.confirm = function( isLoaded, message ) {
470
- this.isLoaded = isLoaded;
471
- this.emitEvent( 'progress', [ this, this.element, message ] );
472
- };
473
-
474
- // -------------------------- jQuery -------------------------- //
475
-
476
- ImagesLoaded.makeJQueryPlugin = function( jQuery ) {
477
- jQuery = jQuery || window.jQuery;
478
- if ( !jQuery ) {
479
- return;
480
- }
481
- // set local variable
482
- $ = jQuery;
483
- // $().imagesLoaded()
484
- $.fn.imagesLoaded = function( options, callback ) {
485
- var instance = new ImagesLoaded( this, options, callback );
486
- return instance.jqDeferred.promise( $(this) );
487
- };
488
- };
489
- // try making plugin
490
- ImagesLoaded.makeJQueryPlugin();
491
-
492
- // -------------------------- -------------------------- //
493
-
494
- return ImagesLoaded;
495
-
496
- });
497
-
1
+ /*!
2
+ * imagesLoaded PACKAGED v5.0.0
3
+ * JavaScript is all like "You images are done yet or what?"
4
+ * MIT License
5
+ */
6
+
7
+ /**
8
+ * EvEmitter v2.1.1
9
+ * Lil' event emitter
10
+ * MIT License
11
+ */
12
+
13
+ ( function( global, factory ) {
14
+ // universal module definition
15
+ if ( typeof module == 'object' && module.exports ) {
16
+ // CommonJS - Browserify, Webpack
17
+ module.exports = factory();
18
+ } else {
19
+ // Browser globals
20
+ global.EvEmitter = factory();
21
+ }
22
+
23
+ }( typeof window != 'undefined' ? window : this, function() {
24
+
25
+ function EvEmitter() {}
26
+
27
+ let proto = EvEmitter.prototype;
28
+
29
+ proto.on = function( eventName, listener ) {
30
+ if ( !eventName || !listener ) return this;
31
+
32
+ // set events hash
33
+ let events = this._events = this._events || {};
34
+ // set listeners array
35
+ let listeners = events[ eventName ] = events[ eventName ] || [];
36
+ // only add once
37
+ if ( !listeners.includes( listener ) ) {
38
+ listeners.push( listener );
39
+ }
40
+
41
+ return this;
42
+ };
43
+
44
+ proto.once = function( eventName, listener ) {
45
+ if ( !eventName || !listener ) return this;
46
+
47
+ // add event
48
+ this.on( eventName, listener );
49
+ // set once flag
50
+ // set onceEvents hash
51
+ let onceEvents = this._onceEvents = this._onceEvents || {};
52
+ // set onceListeners object
53
+ let onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
54
+ // set flag
55
+ onceListeners[ listener ] = true;
56
+
57
+ return this;
58
+ };
59
+
60
+ proto.off = function( eventName, listener ) {
61
+ let listeners = this._events && this._events[ eventName ];
62
+ if ( !listeners || !listeners.length ) return this;
63
+
64
+ let index = listeners.indexOf( listener );
65
+ if ( index != -1 ) {
66
+ listeners.splice( index, 1 );
67
+ }
68
+
69
+ return this;
70
+ };
71
+
72
+ proto.emitEvent = function( eventName, args ) {
73
+ let listeners = this._events && this._events[ eventName ];
74
+ if ( !listeners || !listeners.length ) return this;
75
+
76
+ // copy over to avoid interference if .off() in listener
77
+ listeners = listeners.slice( 0 );
78
+ args = args || [];
79
+ // once stuff
80
+ let onceListeners = this._onceEvents && this._onceEvents[ eventName ];
81
+
82
+ for ( let listener of listeners ) {
83
+ let isOnce = onceListeners && onceListeners[ listener ];
84
+ if ( isOnce ) {
85
+ // remove listener
86
+ // remove before trigger to prevent recursion
87
+ this.off( eventName, listener );
88
+ // unset once flag
89
+ delete onceListeners[ listener ];
90
+ }
91
+ // trigger listener
92
+ listener.apply( this, args );
93
+ }
94
+
95
+ return this;
96
+ };
97
+
98
+ proto.allOff = function() {
99
+ delete this._events;
100
+ delete this._onceEvents;
101
+ return this;
102
+ };
103
+
104
+ return EvEmitter;
105
+
106
+ } ) );
107
+ /*!
108
+ * imagesLoaded v5.0.0
109
+ * JavaScript is all like "You images are done yet or what?"
110
+ * MIT License
111
+ */
112
+
113
+ ( function( window, factory ) {
114
+ // universal module definition
115
+ if ( typeof module == 'object' && module.exports ) {
116
+ // CommonJS
117
+ module.exports = factory( window, require('ev-emitter') );
118
+ } else {
119
+ // browser global
120
+ window.imagesLoaded = factory( window, window.EvEmitter );
121
+ }
122
+
123
+ } )( typeof window !== 'undefined' ? window : this,
124
+ function factory( window, EvEmitter ) {
125
+
126
+ let $ = window.jQuery;
127
+ let console = window.console;
128
+
129
+ // -------------------------- helpers -------------------------- //
130
+
131
+ // turn element or nodeList into an array
132
+ function makeArray( obj ) {
133
+ // use object if already an array
134
+ if ( Array.isArray( obj ) ) return obj;
135
+
136
+ let isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
137
+ // convert nodeList to array
138
+ if ( isArrayLike ) return [ ...obj ];
139
+
140
+ // array of single index
141
+ return [ obj ];
142
+ }
143
+
144
+ // -------------------------- imagesLoaded -------------------------- //
145
+
146
+ /**
147
+ * @param {[Array, Element, NodeList, String]} elem
148
+ * @param {[Object, Function]} options - if function, use as callback
149
+ * @param {Function} onAlways - callback function
150
+ * @returns {ImagesLoaded}
151
+ */
152
+ function ImagesLoaded( elem, options, onAlways ) {
153
+ // coerce ImagesLoaded() without new, to be new ImagesLoaded()
154
+ if ( !( this instanceof ImagesLoaded ) ) {
155
+ return new ImagesLoaded( elem, options, onAlways );
156
+ }
157
+ // use elem as selector string
158
+ let queryElem = elem;
159
+ if ( typeof elem == 'string' ) {
160
+ queryElem = document.querySelectorAll( elem );
161
+ }
162
+ // bail if bad element
163
+ if ( !queryElem ) {
164
+ console.error(`Bad element for imagesLoaded ${queryElem || elem}`);
165
+ return;
166
+ }
167
+
168
+ this.elements = makeArray( queryElem );
169
+ this.options = {};
170
+ // shift arguments if no options set
171
+ if ( typeof options == 'function' ) {
172
+ onAlways = options;
173
+ } else {
174
+ Object.assign( this.options, options );
175
+ }
176
+
177
+ if ( onAlways ) this.on( 'always', onAlways );
178
+
179
+ this.getImages();
180
+ // add jQuery Deferred object
181
+ if ( $ ) this.jqDeferred = new $.Deferred();
182
+
183
+ // HACK check async to allow time to bind listeners
184
+ setTimeout( this.check.bind( this ) );
185
+ }
186
+
187
+ ImagesLoaded.prototype = Object.create( EvEmitter.prototype );
188
+
189
+ ImagesLoaded.prototype.getImages = function() {
190
+ this.images = [];
191
+
192
+ // filter & find items if we have an item selector
193
+ this.elements.forEach( this.addElementImages, this );
194
+ };
195
+
196
+ const elementNodeTypes = [ 1, 9, 11 ];
197
+
198
+ /**
199
+ * @param {Node} elem
200
+ */
201
+ ImagesLoaded.prototype.addElementImages = function( elem ) {
202
+ // filter siblings
203
+ if ( elem.nodeName === 'IMG' ) {
204
+ this.addImage( elem );
205
+ }
206
+ // get background image on element
207
+ if ( this.options.background === true ) {
208
+ this.addElementBackgroundImages( elem );
209
+ }
210
+
211
+ // find children
212
+ // no non-element nodes, #143
213
+ let { nodeType } = elem;
214
+ if ( !nodeType || !elementNodeTypes.includes( nodeType ) ) return;
215
+
216
+ let childImgs = elem.querySelectorAll('img');
217
+ // concat childElems to filterFound array
218
+ for ( let img of childImgs ) {
219
+ this.addImage( img );
220
+ }
221
+
222
+ // get child background images
223
+ if ( typeof this.options.background == 'string' ) {
224
+ let children = elem.querySelectorAll( this.options.background );
225
+ for ( let child of children ) {
226
+ this.addElementBackgroundImages( child );
227
+ }
228
+ }
229
+ };
230
+
231
+ const reURL = /url\((['"])?(.*?)\1\)/gi;
232
+
233
+ ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {
234
+ let style = getComputedStyle( elem );
235
+ // Firefox returns null if in a hidden iframe https://bugzil.la/548397
236
+ if ( !style ) return;
237
+
238
+ // get url inside url("...")
239
+ let matches = reURL.exec( style.backgroundImage );
240
+ while ( matches !== null ) {
241
+ let url = matches && matches[2];
242
+ if ( url ) {
243
+ this.addBackground( url, elem );
244
+ }
245
+ matches = reURL.exec( style.backgroundImage );
246
+ }
247
+ };
248
+
249
+ /**
250
+ * @param {Image} img
251
+ */
252
+ ImagesLoaded.prototype.addImage = function( img ) {
253
+ let loadingImage = new LoadingImage( img );
254
+ this.images.push( loadingImage );
255
+ };
256
+
257
+ ImagesLoaded.prototype.addBackground = function( url, elem ) {
258
+ let background = new Background( url, elem );
259
+ this.images.push( background );
260
+ };
261
+
262
+ ImagesLoaded.prototype.check = function() {
263
+ this.progressedCount = 0;
264
+ this.hasAnyBroken = false;
265
+ // complete if no images
266
+ if ( !this.images.length ) {
267
+ this.complete();
268
+ return;
269
+ }
270
+
271
+ /* eslint-disable-next-line func-style */
272
+ let onProgress = ( image, elem, message ) => {
273
+ // HACK - Chrome triggers event before object properties have changed. #83
274
+ setTimeout( () => {
275
+ this.progress( image, elem, message );
276
+ } );
277
+ };
278
+
279
+ this.images.forEach( function( loadingImage ) {
280
+ loadingImage.once( 'progress', onProgress );
281
+ loadingImage.check();
282
+ } );
283
+ };
284
+
285
+ ImagesLoaded.prototype.progress = function( image, elem, message ) {
286
+ this.progressedCount++;
287
+ this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
288
+ // progress event
289
+ this.emitEvent( 'progress', [ this, image, elem ] );
290
+ if ( this.jqDeferred && this.jqDeferred.notify ) {
291
+ this.jqDeferred.notify( this, image );
292
+ }
293
+ // check if completed
294
+ if ( this.progressedCount === this.images.length ) {
295
+ this.complete();
296
+ }
297
+
298
+ if ( this.options.debug && console ) {
299
+ console.log( `progress: ${message}`, image, elem );
300
+ }
301
+ };
302
+
303
+ ImagesLoaded.prototype.complete = function() {
304
+ let eventName = this.hasAnyBroken ? 'fail' : 'done';
305
+ this.isComplete = true;
306
+ this.emitEvent( eventName, [ this ] );
307
+ this.emitEvent( 'always', [ this ] );
308
+ if ( this.jqDeferred ) {
309
+ let jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
310
+ this.jqDeferred[ jqMethod ]( this );
311
+ }
312
+ };
313
+
314
+ // -------------------------- -------------------------- //
315
+
316
+ function LoadingImage( img ) {
317
+ this.img = img;
318
+ }
319
+
320
+ LoadingImage.prototype = Object.create( EvEmitter.prototype );
321
+
322
+ LoadingImage.prototype.check = function() {
323
+ // If complete is true and browser supports natural sizes,
324
+ // try to check for image status manually.
325
+ let isComplete = this.getIsImageComplete();
326
+ if ( isComplete ) {
327
+ // report based on naturalWidth
328
+ this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
329
+ return;
330
+ }
331
+
332
+ // If none of the checks above matched, simulate loading on detached element.
333
+ this.proxyImage = new Image();
334
+ // add crossOrigin attribute. #204
335
+ if ( this.img.crossOrigin ) {
336
+ this.proxyImage.crossOrigin = this.img.crossOrigin;
337
+ }
338
+ this.proxyImage.addEventListener( 'load', this );
339
+ this.proxyImage.addEventListener( 'error', this );
340
+ // bind to image as well for Firefox. #191
341
+ this.img.addEventListener( 'load', this );
342
+ this.img.addEventListener( 'error', this );
343
+ this.proxyImage.src = this.img.currentSrc || this.img.src;
344
+ };
345
+
346
+ LoadingImage.prototype.getIsImageComplete = function() {
347
+ // check for non-zero, non-undefined naturalWidth
348
+ // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671
349
+ return this.img.complete && this.img.naturalWidth;
350
+ };
351
+
352
+ LoadingImage.prototype.confirm = function( isLoaded, message ) {
353
+ this.isLoaded = isLoaded;
354
+ let { parentNode } = this.img;
355
+ // emit progress with parent <picture> or self <img>
356
+ let elem = parentNode.nodeName === 'PICTURE' ? parentNode : this.img;
357
+ this.emitEvent( 'progress', [ this, elem, message ] );
358
+ };
359
+
360
+ // ----- events ----- //
361
+
362
+ // trigger specified handler for event type
363
+ LoadingImage.prototype.handleEvent = function( event ) {
364
+ let method = 'on' + event.type;
365
+ if ( this[ method ] ) {
366
+ this[ method ]( event );
367
+ }
368
+ };
369
+
370
+ LoadingImage.prototype.onload = function() {
371
+ this.confirm( true, 'onload' );
372
+ this.unbindEvents();
373
+ };
374
+
375
+ LoadingImage.prototype.onerror = function() {
376
+ this.confirm( false, 'onerror' );
377
+ this.unbindEvents();
378
+ };
379
+
380
+ LoadingImage.prototype.unbindEvents = function() {
381
+ this.proxyImage.removeEventListener( 'load', this );
382
+ this.proxyImage.removeEventListener( 'error', this );
383
+ this.img.removeEventListener( 'load', this );
384
+ this.img.removeEventListener( 'error', this );
385
+ };
386
+
387
+ // -------------------------- Background -------------------------- //
388
+
389
+ function Background( url, element ) {
390
+ this.url = url;
391
+ this.element = element;
392
+ this.img = new Image();
393
+ }
394
+
395
+ // inherit LoadingImage prototype
396
+ Background.prototype = Object.create( LoadingImage.prototype );
397
+
398
+ Background.prototype.check = function() {
399
+ this.img.addEventListener( 'load', this );
400
+ this.img.addEventListener( 'error', this );
401
+ this.img.src = this.url;
402
+ // check if image is already complete
403
+ let isComplete = this.getIsImageComplete();
404
+ if ( isComplete ) {
405
+ this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
406
+ this.unbindEvents();
407
+ }
408
+ };
409
+
410
+ Background.prototype.unbindEvents = function() {
411
+ this.img.removeEventListener( 'load', this );
412
+ this.img.removeEventListener( 'error', this );
413
+ };
414
+
415
+ Background.prototype.confirm = function( isLoaded, message ) {
416
+ this.isLoaded = isLoaded;
417
+ this.emitEvent( 'progress', [ this, this.element, message ] );
418
+ };
419
+
420
+ // -------------------------- jQuery -------------------------- //
421
+
422
+ ImagesLoaded.makeJQueryPlugin = function( jQuery ) {
423
+ jQuery = jQuery || window.jQuery;
424
+ if ( !jQuery ) return;
425
+
426
+ // set local variable
427
+ $ = jQuery;
428
+ // $().imagesLoaded()
429
+ $.fn.imagesLoaded = function( options, onAlways ) {
430
+ let instance = new ImagesLoaded( this, options, onAlways );
431
+ return instance.jqDeferred.promise( $( this ) );
432
+ };
433
+ };
434
+ // try making plugin
435
+ ImagesLoaded.makeJQueryPlugin();
436
+
437
+ // -------------------------- -------------------------- //
438
+
439
+ return ImagesLoaded;
440
+
441
+ } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/imagesloaded/imagesloaded.pkgd.min.js CHANGED
@@ -1,7 +1,12 @@
1
- /*!
2
- * imagesLoaded PACKAGED v4.1.4
3
- * JavaScript is all like "You images are done yet or what?"
4
- * MIT License
5
- */
6
-
7
- !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
 
 
 
 
 
1
+ /*!
2
+ * imagesLoaded PACKAGED v5.0.0
3
+ * JavaScript is all like "You images are done yet or what?"
4
+ * MIT License
5
+ */
6
+ !function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
7
+ /*!
8
+ * imagesLoaded v5.0.0
9
+ * JavaScript is all like "You images are done yet or what?"
10
+ * MIT License
11
+ */
12
+ function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));
css/admin-galleries.css CHANGED
@@ -354,6 +354,10 @@
354
  margin: 4px 0 0 5px;
355
  float: none;
356
  }
 
 
 
 
357
  .rl-gallery-sortable-placeholder {
358
  width: 148px;
359
  height: 148px;
354
  margin: 4px 0 0 5px;
355
  float: none;
356
  }
357
+ .rl-gallery-preview-inside p.description {
358
+ margin-top: 12px;
359
+ min-height: 20px;
360
+ }
361
  .rl-gallery-sortable-placeholder {
362
  width: 148px;
363
  height: 148px;
css/gallery.css CHANGED
@@ -1,571 +1,572 @@
1
- /* Cleanup */
2
- .rl-gallery .rl-gallery-item {
3
- overflow: hidden;
4
- }
5
-
6
- .rl-gallery .rl-gallery-link {
7
- position: relative;
8
- display: block;
9
- }
10
-
11
- .rl-gallery .rl-gallery-link,
12
- .rl-gallery .rl-gallery-link img {
13
- border: none;
14
- outline: none;
15
- box-shadow: none;
16
- }
17
-
18
- .rl-gallery .rl-gallery-link img {
19
- z-index: 0;
20
- }
21
-
22
- .rl-gallery .rl-gallery-link .rl-gallery-caption {
23
- position: absolute;
24
- width: 100%;
25
- display: block;
26
- z-index: 2;
27
- bottom: 0;
28
- background-color: rgba(0,0,0,0.8);
29
- overflow: hidden;
30
- word-wrap: break-word;
31
- padding: 1em 1.5em;
32
- font-weight: normal;
33
- line-height: 1em;
34
- text-align: left;
35
- word-wrap: break-word;
36
- backface-visibility: hidden;
37
- box-sizing: border-box;
38
- filter: "alpha(opacity=100)";
39
- opacity: 1;
40
- -webkit-transition: transform 0.3s, opacity 0.3s;
41
- -moz-transition: transform 0.3s, opacity 0.3s;
42
- -ms-transition: transform 0.3s, opacity 0.3s;
43
- -o-transition: transform 0.3s, opacity 0.3s;
44
- transition: transform 0.3s, opacity 0.3s;
45
- }
46
-
47
- *.rl-gallery[class^="rl-hover-effect-"] .rl-gallery-link .rl-gallery-caption,
48
- *.rl-gallery[class*="rl-hover-effect-"] .rl-gallery-link .rl-gallery-caption {
49
- filter: "alpha(opacity=0)";
50
- opacity: 0;
51
- }
52
-
53
- .rl-gallery .rl-gallery-item-title,
54
- .rl-gallery .rl-gallery-item-caption {
55
- display: block;
56
- font-size: 0.85em;
57
- color: #fff;
58
- }
59
-
60
- .rl-gallery .rl-gallery-item-caption {
61
- display: block;
62
- font-size: 0.75em;
63
- color: #ccc;
64
- }
65
-
66
- .rl-gallery:not(.rl-hidden-text) .rl-gallery-link:after {
67
- position: absolute;
68
- height: 100%;
69
- width: 100%;
70
- z-index: 1;
71
- background-color: rgba(0,0,0,0.8);
72
- display: block;
73
- content: '';
74
- filter: "alpha(opacity=0)";
75
- opacity: 0;
76
- top: 0;
77
- left: 0;
78
- -webkit-transition: transform 0.3s, opacity 0.3s;
79
- -moz-transition: transform 0.3s, opacity 0.3s;
80
- -ms-transition: transform 0.3s, opacity 0.3s;
81
- -o-transition: transform 0.3s, opacity 0.3s;
82
- transition: transform 0.3s, opacity 0.3s;
83
- }
84
-
85
- .rl-gallery .rl-gallery-link:hover .rl-gallery-caption,
86
- .rl-gallery .rl-gallery-link.hover .rl-gallery-caption {
87
- filter: "alpha(opacity=100)";
88
- opacity: 1;
89
- }
90
-
91
- /* Font */
92
- @font-face {
93
- font-family: 'responsive-lightbox';
94
- src: url('../font/responsive-lightbox.eot?86939755');
95
- src: url('../font/responsive-lightbox.eot?86939755#iefix') format('embedded-opentype'),
96
- url('../font/responsive-lightbox.woff2?86939755') format('woff2'),
97
- url('../font/responsive-lightbox.woff?86939755') format('woff'),
98
- url('../font/responsive-lightbox.ttf?86939755') format('truetype'),
99
- url('../font/responsive-lightbox.svg?86939755#responsive-lightbox') format('svg');
100
- font-weight: normal;
101
- font-style: normal;
102
- }
103
- /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
104
- /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
105
- /*
106
- @media screen and (-webkit-min-device-pixel-ratio:0) {
107
- @font-face {
108
- font-family: 'responsive-lightbox';
109
- src: url('../font/responsive-lightbox.svg?86939755#responsive-lightbox') format('svg');
110
- }
111
- }
112
- */
113
-
114
- [class^="rl-hover-icon-"] .rl-gallery-link:before,
115
- [class*="rl-hover-icon-"] .rl-gallery-link:before {
116
- font-family: "responsive-lightbox";
117
- font-style: normal;
118
- font-weight: normal;
119
- speak: none;
120
- display: flex;
121
- flex-direction: row;
122
- align-items: center;
123
- justify-content: center;
124
- text-decoration: none;
125
- width: 1em;
126
- height: 1em;
127
- text-align: center;
128
- font-variant: normal;
129
- text-transform: none;
130
- line-height: 1em;
131
- -webkit-font-smoothing: antialiased;
132
- -moz-osx-font-smoothing: grayscale;
133
- position: absolute;
134
- top: 50%;
135
- left: 50%;
136
- margin-top: -1em;
137
- margin-left: -1em;
138
- background-color: rgba(0,0,0,0.8);
139
- color: #fff;
140
- padding: 1em;
141
- border-radius: 50%;
142
- filter: "alpha(opacity=0)";
143
- opacity: 0;
144
- z-index: 4;
145
- -webkit-transition: transform 0.3s, opacity 0.3s;
146
- -moz-transition: transform 0.3s, opacity 0.3s;
147
- -ms-transition: transform 0.3s, opacity 0.3s;
148
- -o-transition: transform 0.3s, opacity 0.3s;
149
- transition: transform 0.3s, opacity 0.3s;
150
- }
151
-
152
- .rl-hover-icon-1 .rl-gallery-link:before { content: '\e800'; }
153
- .rl-hover-icon-2 .rl-gallery-link:before { content: '\e801'; }
154
- .rl-hover-icon-3 .rl-gallery-link:before { content: '\e802'; }
155
- .rl-hover-icon-4 .rl-gallery-link:before { content: '\e803'; }
156
- .rl-hover-icon-5 .rl-gallery-link:before { content: '\f0fe'; }
157
- .rl-hover-icon-6 .rl-gallery-link:before { content: '\e809'; }
158
- .rl-hover-icon-7 .rl-gallery-link:before { content: '\e80a'; }
159
- .rl-hover-icon-8 .rl-gallery-link:before { content: '\e80b'; }
160
- .rl-hover-icon-9 .rl-gallery-link:before { content: '\e80d'; }
161
- .rl-hover-icon-10 .rl-gallery-link:before { content: '\e80e'; }
162
- .rl-hover-icon-11 .rl-gallery-link:before { content: '\f08e'; }
163
- .rl-hover-icon-12 .rl-gallery-link:before { content: '\f0b2'; }
164
- .rl-hover-icon-13 .rl-gallery-link:before { content: '\e804'; }
165
- .rl-hover-icon-14 .rl-gallery-link:before { content: '\f14c'; }
166
- .rl-hover-icon-15 .rl-gallery-link:before { content: '\f196'; }
167
- .rl-hover-icon-16 .rl-gallery-link:before { content: '\f24d'; }
168
-
169
- [class^="rl-hover-effect-"][class^="rl-hover-icon-"] .rl-gallery-link:hover:before,
170
- [class*="rl-hover-effect-"][class*="rl-hover-icon-"] .rl-gallery-link:hover:before,
171
- [class^="rl-hover-effect-"][class^="rl-hover-icon-"] .rl-gallery-link.hover:before,
172
- [class*="rl-hover-effect-"][class*="rl-hover-icon-"] .rl-gallery-link.hover:before {
173
- filter: "alpha(opacity=100)";
174
- opacity: 1;
175
- }
176
-
177
- /* Hover effect 1 */
178
-
179
- .rl-gallery.rl-hover-effect-1 .rl-gallery-link .rl-gallery-caption {
180
- background: none;
181
- }
182
- .rl-gallery.rl-hover-effect-1 .rl-gallery-link:hover .rl-gallery-caption,
183
- .rl-gallery.rl-hover-effect-1 .rl-gallery-link.hover .rl-gallery-caption {
184
- filter: "alpha(opacity=100)";
185
- opacity: 1;
186
- }
187
- .rl-gallery.rl-hover-effect-1 .rl-gallery-link:before {
188
- background: none;
189
- }
190
- .rl-gallery.rl-hover-effect-1 .rl-gallery-link:hover:after,
191
- .rl-gallery.rl-hover-effect-1 .rl-gallery-link.hover:after {
192
- filter: "alpha(opacity=100)";
193
- opacity: 1;
194
- }
195
-
196
- /* Hover effect 2 */
197
-
198
- .rl-gallery.rl-hover-effect-2 .rl-gallery-link:hover .rl-gallery-caption,
199
- .rl-gallery.rl-hover-effect-2 .rl-gallery-link.hover .rl-gallery-caption {
200
- filter: "alpha(opacity=100)";
201
- opacity: 1;
202
- }
203
-
204
- /* Hover effect 3 */
205
-
206
- .rl-gallery.rl-hover-effect-3 {
207
- overflow: visible;
208
- }
209
- .rl-gallery.rl-hover-effect-3 .rl-gallery-item {
210
- overflow: visible;
211
- }
212
- .rl-gallery.rl-hover-effect-3 .rl-gallery-link {
213
- overflow: visible;
214
- }
215
- .rl-gallery.rl-hover-effect-3 .rl-gallery-link .rl-gallery-caption {
216
- position: absolute;
217
- background: none;
218
- }
219
- .rl-gallery.rl-hover-effect-3 .rl-gallery-link:hover .rl-gallery-caption,
220
- .rl-gallery.rl-hover-effect-3 .rl-gallery-link.hover .rl-gallery-caption {
221
- -webkit-transform: translate(15px, 15px);
222
- -moz-transform: translate(15px, 15px);
223
- -ms-transform: translate(15px, 15px);
224
- -o-transform: translate(15px, 15px);
225
- transform: translate(15px, 15px);
226
- }
227
- .rl-gallery.rl-hover-effect-3 .rl-gallery-link:hover:after,
228
- .rl-gallery.rl-hover-effect-3 .rl-gallery-link.hover:after {
229
- filter: "alpha(opacity=100)";
230
- opacity: 1;
231
- -webkit-transform: translate(15px, 15px);
232
- -moz-transform: translate(15px, 15px);
233
- -ms-transform: translate(15px, 15px);
234
- -o-transform: translate(15px, 15px);
235
- transform: translate(15px, 15px);
236
- }
237
- .rl-gallery.rl-hover-effect-3[class^="rl-hover-icon-"] .rl-gallery-link:before,
238
- .rl-gallery.rl-hover-effect-3[class*="rl-hover-icon-"] .rl-gallery-link:before {
239
- background: none;
240
- }
241
- .rl-gallery.rl-hover-effect-3[class^="rl-hover-icon-"] .rl-gallery-link:hover:before,
242
- .rl-gallery.rl-hover-effect-3[class*="rl-hover-icon-"] .rl-gallery-link:hover:before,
243
- .rl-gallery.rl-hover-effect-3[class^="rl-hover-icon-"] .rl-gallery-link.hover:before,
244
- .rl-gallery.rl-hover-effect-3[class*="rl-hover-icon-"] .rl-gallery-link.hover:before {
245
- -webkit-transform: translate(15px, 15px);
246
- -moz-transform: translate(15px, 15px);
247
- -ms-transform: translate(15px, 15px);
248
- -o-transform: translate(15px, 15px);
249
- transform: translate(15px, 15px);
250
- }
251
-
252
- /* Hover effect 4 */
253
-
254
- .rl-gallery.rl-hover-effect-4 .rl-gallery-link .rl-gallery-caption {
255
- background: none;
256
- height: auto;
257
- filter: "alpha(opacity=100)";
258
- opacity: 1;
259
- -webkit-transform: translateY(100%);
260
- -moz-transform: translateY(100%);
261
- -ms-transform: translateY(100%);
262
- -o-transform: translateY(100%);
263
- transform: translateY(100%);
264
- }
265
- .rl-gallery.rl-hover-effect-4 .rl-gallery-link:hover .rl-gallery-caption,
266
- .rl-gallery.rl-hover-effect-4 .rl-gallery-link.hover .rl-gallery-caption {
267
- -webkit-transform: translateY(0);
268
- -moz-transform: translateY(0);
269
- -ms-transform: translateY(0);
270
- -o-transform: translateY(0);
271
- transform: translateY(0);
272
- }
273
- .rl-gallery.rl-hover-effect-4 .rl-gallery-link {
274
- overflow: hidden;
275
- }
276
- .rl-gallery.rl-hover-effect-4 .rl-gallery-link:before {
277
- background: none;
278
- webkit-transform: translateY(-25%);
279
- -moz-transform: translateY(-25%);
280
- -ms-transform: translateY(-25%);
281
- -o-transform: translateY(-25%);
282
- transform: translateY(-25%);
283
- }
284
- .rl-gallery.rl-hover-effect-4 .rl-gallery-link:hover:before,
285
- .rl-gallery.rl-hover-effect-4 .rl-gallery-link.hover:before {
286
- webkit-transform: translateY(0);
287
- -moz-transform: translateY(0);
288
- -ms-transform: translateY(0);
289
- -o-transform: translateY(0);
290
- transform: translateY(0);
291
- }
292
- .rl-gallery.rl-hover-effect-4 .rl-gallery-link:after {
293
- filter: "alpha(opacity=100)";
294
- opacity: 1;
295
- top: -100%;
296
- }
297
- .rl-gallery.rl-hover-effect-4 .rl-gallery-link:hover:after,
298
- .rl-gallery.rl-hover-effect-4 .rl-gallery-link.hover:after {
299
- -webkit-transform: translateY(100%);
300
- -moz-transform: translateY(100%);
301
- -ms-transform: translateY(100%);
302
- -o-transform: translateY(100%);
303
- transform: translateY(100%);
304
- }
305
-
306
- /* Hover effect 5 */
307
-
308
- .rl-gallery.rl-hover-effect-5 .rl-gallery-link .rl-gallery-caption {
309
- background: none;
310
- height: 100%;
311
- filter: "alpha(opacity=100)";
312
- opacity: 1;
313
- -webkit-transform: translateY(100%);
314
- -moz-transform: translateY(100%);
315
- -ms-transform: translateY(100%);
316
- -o-transform: translateY(100%);
317
- transform: translateY(100%);
318
- }
319
- .rl-gallery.rl-hover-effect-5 .rl-gallery-link:hover .rl-gallery-caption,
320
- .rl-gallery.rl-hover-effect-5 .rl-gallery-link.hover .rl-gallery-caption {
321
- -webkit-transform: translateY(0);
322
- -moz-transform: translateY(0);
323
- -ms-transform: translateY(0);
324
- -o-transform: translateY(0);
325
- transform: translateY(0);
326
- }
327
- .rl-gallery.rl-hover-effect-5 .rl-gallery-link {
328
- overflow: hidden;
329
- }
330
- .rl-gallery.rl-hover-effect-5 .rl-gallery-link:before {
331
- background: none;
332
- }
333
- .rl-gallery.rl-hover-effect-5 .rl-gallery-link:hover:before,
334
- .rl-gallery.rl-hover-effect-5 .rl-gallery-link.hover:before {
335
- webkit-transform: translateY(2em);
336
- -moz-transform: translateY(2em);
337
- -ms-transform: translateY(2em);
338
- -o-transform: translateY(2em);
339
- transform: translateY(2em);
340
- }
341
- .rl-gallery.rl-hover-effect-5 .rl-gallery-link:after {
342
- filter: "alpha(opacity=100)";
343
- opacity: 1;
344
- top: -100%;
345
- }
346
- .rl-gallery.rl-hover-effect-5 .rl-gallery-link:hover:after,
347
- .rl-gallery.rl-hover-effect-5 .rl-gallery-link.hover:after {
348
- -webkit-transform: translateY(100%);
349
- -moz-transform: translateY(100%);
350
- -ms-transform: translateY(100%);
351
- -o-transform: translateY(100%);
352
- transform: translateY(100%);
353
- }
354
-
355
- /* Hover effect 6 */
356
-
357
- .rl-gallery.rl-hover-effect-6 .rl-gallery-link {
358
- overflow: hidden;
359
- }
360
- .rl-gallery.rl-hover-effect-6 .rl-gallery-link img {
361
- z-index: 3;
362
- -webkit-transition: transform 0.3s;
363
- -moz-transition: transform 0.3s;
364
- -ms-transition: transform 0.3s;
365
- -o-transition: transform 0.3s;
366
- transition: transform 0.3s;
367
- }
368
- .rl-gallery.rl-hover-effect-6 .rl-gallery-link:hover img,
369
- .rl-gallery.rl-hover-effect-6 .rl-gallery-link.hover img {
370
- -webkit-transform: scale(0.3);
371
- -ms-transform: scale(0.3);
372
- -o-transform: scale(0.3);
373
- transform: scale(0.3);
374
- }
375
- .rl-gallery.rl-hover-effect-6 .rl-gallery-link:before {
376
- background: none;
377
- }
378
- .rl-gallery.rl-hover-effect-6 .rl-gallery-link .rl-gallery-caption {
379
- background: none;
380
- -webkit-transform: scale(0.7);
381
- -moz-transform: scale(0.7);
382
- -ms-transform: scale(0.7);
383
- -o-transform: scale(0.7);
384
- transform: scale(0.7);
385
- }
386
- .rl-gallery.rl-hover-effect-6 .rl-gallery-link:hover .rl-gallery-caption,
387
- .rl-gallery.rl-hover-effect-6 .rl-gallery-link.hover .rl-gallery-caption {
388
- -webkit-transform: scale(1);
389
- -moz-transform: scale(1);
390
- -ms-transform: scale(1);
391
- -o-transform: scale(1);
392
- transform: scale(1);
393
- }
394
-
395
- .rl-gallery.rl-hover-effect-6 .rl-gallery-link:hover:after,
396
- .rl-gallery.rl-hover-effect-6 .rl-gallery-link.hover:after {
397
- filter: "alpha(opacity=100)";
398
- opacity: 1;
399
- -webkit-transform: scale(1);
400
- -moz-transform: scale(1);
401
- -ms-transform: scale(1);
402
- -o-transform: scale(1);
403
- transform: scale(1);
404
- }
405
-
406
- /* Hover effect 7 */
407
-
408
- .rl-gallery.rl-hover-effect-7 .rl-gallery-link {
409
- overflow: visible;
410
- }
411
- .rl-gallery.rl-hover-effect-7 .rl-gallery-link:before {
412
- filter: "alpha(opacity=100)";
413
- opacity: 1;
414
- top: -2em;
415
- }
416
- .rl-gallery.rl-hover-effect-7 .rl-gallery-link:hover:before,
417
- .rl-gallery.rl-hover-effect-7 .rl-gallery-link.hover:before {
418
- webkit-transform: translateY(4em);
419
- -moz-transform: translateY(4em);
420
- -ms-transform: translateY(4em);
421
- -o-transform: translateY(4em);
422
- transform: translateY(4em);
423
- }
424
- .rl-gallery.rl-hover-effect-7 .rl-gallery-link img {
425
- position: relative;
426
- z-index: 3;
427
- -webkit-transition: transform 0.3s;
428
- -moz-transition: transform 0.3s;
429
- -ms-transition: transform 0.3s;
430
- -o-transition: transform 0.3s;
431
- transition: transform 0.3s;
432
- }
433
- .rl-gallery.rl-hover-effect-7 .rl-gallery-link:hover img,
434
- .rl-gallery.rl-hover-effect-7 .rl-gallery-link.hover img {
435
- -webkit-transform: translateY(-5em);
436
- -moz-transform: translateY(-5em);
437
- -ms-transform: translateY(-5em);
438
- -o-transform: translateY(-5em);
439
- transform: translateY(-5em);
440
- }
441
- .rl-gallery.rl-hover-effect-7 .rl-gallery-link .rl-gallery-caption {
442
- height: 5em;
443
- filter: "alpha(opacity=100)";
444
- opacity: 1;
445
- }
446
-
447
- /* Hover effect 8 */
448
-
449
- .rl-gallery.rl-hover-effect-8 .rl-gallery-link {
450
- overflow: hidden;
451
- }
452
- .rl-gallery.rl-hover-effect-8 .rl-gallery-link:before {
453
- filter: "alpha(opacity=100)";
454
- opacity: 1;
455
- top: -2em;
456
- }
457
- .rl-gallery.rl-hover-effect-8 .rl-gallery-link:hover:before,
458
- .rl-gallery.rl-hover-effect-8 .rl-gallery-link.hover:before {
459
- webkit-transform: translateY(4em);
460
- -moz-transform: translateY(4em);
461
- -ms-transform: translateY(4em);
462
- -o-transform: translateY(4em);
463
- transform: translateY(4em);
464
- }
465
- .rl-gallery.rl-hover-effect-8 .rl-gallery-link img {
466
- z-index: 1;
467
- -webkit-transition: transform 0.3s;
468
- -moz-transition: transform 0.3s;
469
- -ms-transition: transform 0.3s;
470
- -o-transition: transform 0.3s;
471
- transition: transform 0.3s;
472
- }
473
- .rl-gallery.rl-hover-effect-8 .rl-gallery-link:hover img {
474
- -webkit-transform: translateY(-3em);
475
- -moz-transform: translateY(-3em);
476
- -ms-transform: translateY(-3em);
477
- -o-transform: translateY(-3em);
478
- transform: translateY(-3em);
479
- }
480
- .rl-gallery.rl-hover-effect-8 .rl-gallery-link .rl-gallery-caption {
481
- height: 5em;
482
- filter: "alpha(opacity=100)";
483
- opacity: 1;
484
- -webkit-transform: translateY(100%);
485
- -moz-transform: translateY(100%);
486
- -ms-transform: translateY(100%);
487
- -o-transform: translateY(100%);
488
- transform: translateY(100%);
489
- }
490
- .rl-gallery.rl-hover-effect-8 .rl-gallery-link:hover .rl-gallery-caption,
491
- .rl-gallery.rl-hover-effect-8 .rl-gallery-link.hover .rl-gallery-caption {
492
- -webkit-transform: translateY(0px);
493
- -moz-transform: translateY(0px);
494
- -ms-transform: translateY(0px);
495
- -o-transform: translateY(0px);
496
- transform: translateY(0px);
497
- }
498
-
499
- /* Hover effect 9 */
500
-
501
- .rl-gallery.rl-hover-effect-9 .rl-gallery-link {
502
- overflow: hidden;
503
- }
504
- .rl-gallery.rl-hover-effect-9 .rl-gallery-link img {
505
- z-index: 3;
506
- -webkit-transition: transform 0.3s;
507
- -moz-transition: transform 0.3s;
508
- -ms-transition: transform 0.3s;
509
- -o-transition: transform 0.3s;
510
- transition: transform 0.3s;
511
- }
512
- .rl-gallery.rl-hover-effect-9 .rl-gallery-link:before {
513
- background: none;
514
- -webkit-transform: scale(0);
515
- -moz-transform: scale(0);
516
- -ms-transform: scale(0);
517
- -o-transform: scale(0);
518
- transform: scale(0);
519
- }
520
- .rl-gallery.rl-hover-effect-9 .rl-gallery-link:hover:before,
521
- .rl-gallery.rl-hover-effect-9 .rl-gallery-link.hover:before {
522
- -webkit-transform: scale(1);
523
- -moz-transform: scale(1);
524
- -ms-transform: scale(1);
525
- -o-transform: scale(1);
526
- transform: scale(1);
527
- }
528
- .rl-gallery.rl-hover-effect-9 .rl-gallery-link .rl-gallery-caption {
529
- background: none;
530
- -webkit-transform: scale(0.7);
531
- -moz-transform: scale(0.7);
532
- -ms-transform: scale(0.7);
533
- -o-transform: scale(0.7);
534
- transform: scale(0.7);
535
- }
536
- .rl-gallery.rl-hover-effect-9 .rl-gallery-link:hover .rl-gallery-caption,
537
- .rl-gallery.rl-hover-effect-9 .rl-gallery-link.hover .rl-gallery-caption {
538
- -webkit-transform: scale(1);
539
- -moz-transform: scale(1);
540
- -ms-transform: scale(1);
541
- -o-transform: scale(1);
542
- transform: scale(1);
543
- }
544
- .rl-gallery.rl-hover-effect-9 .rl-gallery-link:after {
545
- height: calc(100% - 1em);
546
- width: calc(100% - 1em);
547
- margin: 0.5em;
548
- }
549
- .rl-gallery.rl-hover-effect-9 .rl-gallery-link:hover:after,
550
- .rl-gallery.rl-hover-effect-9 .rl-gallery-link.hover:after {
551
- filter: "alpha(opacity=100)";
552
- opacity: 1;
553
- -webkit-transform: scale(1);
554
- -moz-transform: scale(1);
555
- -ms-transform: scale(1);
556
- -o-transform: scale(1);
557
- transform: scale(1);
558
- }
559
-
560
- .rl-gallery.rl-justified-gallery .rl-gallery-link {
561
- position: absolute;
562
- }
563
- .rl-gallery.rl-justified-gallery {
564
- overflow: visible;
565
- }
566
- .rl-gallery-button {
567
- text-align: center;
568
- }
569
- .rl-loading {
570
- opacity: 0.5;
 
571
  }
1
+ /* Cleanup */
2
+ .rl-gallery .rl-gallery-item {
3
+ overflow: hidden;
4
+ }
5
+
6
+ .rl-gallery .rl-gallery-link {
7
+ position: relative;
8
+ display: block;
9
+ }
10
+
11
+ .rl-gallery .rl-gallery-link,
12
+ .rl-gallery .rl-gallery-link img {
13
+ border: none;
14
+ outline: none;
15
+ box-shadow: none;
16
+ }
17
+
18
+ .rl-gallery .rl-gallery-link img {
19
+ z-index: 0;
20
+ }
21
+
22
+ .rl-gallery .rl-gallery-link .rl-gallery-caption {
23
+ position: absolute;
24
+ width: 100%;
25
+ display: block;
26
+ z-index: 2;
27
+ bottom: 0;
28
+ background-color: rgba(0,0,0,0.8);
29
+ overflow: hidden;
30
+ word-wrap: break-word;
31
+ padding: 1em 1.5em;
32
+ font-weight: normal;
33
+ line-height: 1em;
34
+ text-align: left;
35
+ word-wrap: break-word;
36
+ backface-visibility: hidden;
37
+ box-sizing: border-box;
38
+ filter: "alpha(opacity=100)";
39
+ opacity: 1;
40
+ -webkit-transition: transform 0.3s, opacity 0.3s;
41
+ -moz-transition: transform 0.3s, opacity 0.3s;
42
+ -ms-transition: transform 0.3s, opacity 0.3s;
43
+ -o-transition: transform 0.3s, opacity 0.3s;
44
+ transition: transform 0.3s, opacity 0.3s;
45
+ }
46
+
47
+ *.rl-gallery[class^="rl-hover-effect-"] .rl-gallery-link .rl-gallery-caption,
48
+ *.rl-gallery[class*="rl-hover-effect-"] .rl-gallery-link .rl-gallery-caption {
49
+ filter: "alpha(opacity=0)";
50
+ opacity: 0;
51
+ }
52
+
53
+ .rl-gallery .rl-gallery-item-title,
54
+ .rl-gallery .rl-gallery-item-caption {
55
+ display: block;
56
+ font-size: 0.85em;
57
+ color: #fff;
58
+ }
59
+
60
+ .rl-gallery .rl-gallery-item-caption {
61
+ display: block;
62
+ font-size: 0.75em;
63
+ color: #ccc;
64
+ }
65
+
66
+ .rl-gallery:not(.rl-hidden-text) .rl-gallery-link:after {
67
+ position: absolute;
68
+ height: 100%;
69
+ width: 100%;
70
+ z-index: 1;
71
+ background-color: rgba(0,0,0,0.8);
72
+ display: block;
73
+ content: '';
74
+ filter: "alpha(opacity=0)";
75
+ opacity: 0;
76
+ top: 0;
77
+ left: 0;
78
+ -webkit-transition: transform 0.3s, opacity 0.3s;
79
+ -moz-transition: transform 0.3s, opacity 0.3s;
80
+ -ms-transition: transform 0.3s, opacity 0.3s;
81
+ -o-transition: transform 0.3s, opacity 0.3s;
82
+ transition: transform 0.3s, opacity 0.3s;
83
+ }
84
+
85
+ .rl-gallery .rl-gallery-link:hover .rl-gallery-caption,
86
+ .rl-gallery .rl-gallery-link.hover .rl-gallery-caption {
87
+ filter: "alpha(opacity=100)";
88
+ opacity: 1;
89
+ }
90
+
91
+ /* Font */
92
+ @font-face {
93
+ font-family: 'responsive-lightbox';
94
+ src: url('../font/responsive-lightbox.eot?86939755');
95
+ src: url('../font/responsive-lightbox.eot?86939755#iefix') format('embedded-opentype'),
96
+ url('../font/responsive-lightbox.woff2?86939755') format('woff2'),
97
+ url('../font/responsive-lightbox.woff?86939755') format('woff'),
98
+ url('../font/responsive-lightbox.ttf?86939755') format('truetype'),
99
+ url('../font/responsive-lightbox.svg?86939755#responsive-lightbox') format('svg');
100
+ font-weight: normal;
101
+ font-style: normal;
102
+ }
103
+ /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
104
+ /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
105
+ /*
106
+ @media screen and (-webkit-min-device-pixel-ratio:0) {
107
+ @font-face {
108
+ font-family: 'responsive-lightbox';
109
+ src: url('../font/responsive-lightbox.svg?86939755#responsive-lightbox') format('svg');
110
+ }
111
+ }
112
+ */
113
+
114
+ [class^="rl-hover-icon-"] .rl-gallery-link:before,
115
+ [class*="rl-hover-icon-"] .rl-gallery-link:before {
116
+ font-family: "responsive-lightbox";
117
+ font-style: normal;
118
+ font-weight: normal;
119
+ speak: none;
120
+ display: flex;
121
+ flex-direction: row;
122
+ align-items: center;
123
+ justify-content: center;
124
+ text-decoration: none;
125
+ width: 1em;
126
+ height: 1em;
127
+ text-align: center;
128
+ font-variant: normal;
129
+ text-transform: none;
130
+ line-height: 1em;
131
+ -webkit-font-smoothing: antialiased;
132
+ -moz-osx-font-smoothing: grayscale;
133
+ position: absolute;
134
+ top: 50%;
135
+ left: 50%;
136
+ margin-top: -1em;
137
+ margin-left: -1em;
138
+ background-color: rgba(0,0,0,0.8);
139
+ color: #fff;
140
+ padding: 1em;
141
+ border-radius: 50%;
142
+ filter: "alpha(opacity=0)";
143
+ opacity: 0;
144
+ z-index: 4;
145
+ -webkit-transition: transform 0.3s, opacity 0.3s;
146
+ -moz-transition: transform 0.3s, opacity 0.3s;
147
+ -ms-transition: transform 0.3s, opacity 0.3s;
148
+ -o-transition: transform 0.3s, opacity 0.3s;
149
+ transition: transform 0.3s, opacity 0.3s;
150
+ }
151
+
152
+ .rl-hover-icon-1 .rl-gallery-link:before { content: '\e800'; }
153
+ .rl-hover-icon-2 .rl-gallery-link:before { content: '\e801'; }
154
+ .rl-hover-icon-3 .rl-gallery-link:before { content: '\e802'; }
155
+ .rl-hover-icon-4 .rl-gallery-link:before { content: '\e803'; }
156
+ .rl-hover-icon-5 .rl-gallery-link:before { content: '\f0fe'; }
157
+ .rl-hover-icon-6 .rl-gallery-link:before { content: '\e809'; }
158
+ .rl-hover-icon-7 .rl-gallery-link:before { content: '\e80a'; }
159
+ .rl-hover-icon-8 .rl-gallery-link:before { content: '\e80b'; }
160
+ .rl-hover-icon-9 .rl-gallery-link:before { content: '\e80d'; }
161
+ .rl-hover-icon-10 .rl-gallery-link:before { content: '\e80e'; }
162
+ .rl-hover-icon-11 .rl-gallery-link:before { content: '\f08e'; }
163
+ .rl-hover-icon-12 .rl-gallery-link:before { content: '\f0b2'; }
164
+ .rl-hover-icon-13 .rl-gallery-link:before { content: '\e804'; }
165
+ .rl-hover-icon-14 .rl-gallery-link:before { content: '\f14c'; }
166
+ .rl-hover-icon-15 .rl-gallery-link:before { content: '\f196'; }
167
+ .rl-hover-icon-16 .rl-gallery-link:before { content: '\f24d'; }
168
+
169
+ [class^="rl-hover-effect-"][class^="rl-hover-icon-"] .rl-gallery-link:hover:before,
170
+ [class*="rl-hover-effect-"][class*="rl-hover-icon-"] .rl-gallery-link:hover:before,
171
+ [class^="rl-hover-effect-"][class^="rl-hover-icon-"] .rl-gallery-link.hover:before,
172
+ [class*="rl-hover-effect-"][class*="rl-hover-icon-"] .rl-gallery-link.hover:before {
173
+ filter: "alpha(opacity=100)";
174
+ opacity: 1;
175
+ }
176
+
177
+ /* Hover effect 1 */
178
+
179
+ .rl-gallery.rl-hover-effect-1 .rl-gallery-link .rl-gallery-caption {
180
+ background: none;
181
+ }
182
+ .rl-gallery.rl-hover-effect-1 .rl-gallery-link:hover .rl-gallery-caption,
183
+ .rl-gallery.rl-hover-effect-1 .rl-gallery-link.hover .rl-gallery-caption {
184
+ filter: "alpha(opacity=100)";
185
+ opacity: 1;
186
+ }
187
+ .rl-gallery.rl-hover-effect-1 .rl-gallery-link:before {
188
+ background: none;
189
+ }
190
+ .rl-gallery.rl-hover-effect-1 .rl-gallery-link:hover:after,
191
+ .rl-gallery.rl-hover-effect-1 .rl-gallery-link.hover:after {
192
+ filter: "alpha(opacity=100)";
193
+ opacity: 1;
194
+ }
195
+
196
+ /* Hover effect 2 */
197
+
198
+ .rl-gallery.rl-hover-effect-2 .rl-gallery-link:hover .rl-gallery-caption,
199
+ .rl-gallery.rl-hover-effect-2 .rl-gallery-link.hover .rl-gallery-caption {
200
+ filter: "alpha(opacity=100)";
201
+ opacity: 1;
202
+ }
203
+
204
+ /* Hover effect 3 */
205
+
206
+ .rl-gallery.rl-hover-effect-3 {
207
+ overflow: visible;
208
+ }
209
+ .rl-gallery.rl-hover-effect-3 .rl-gallery-item {
210
+ overflow: visible;
211
+ }
212
+ .rl-gallery.rl-hover-effect-3 .rl-gallery-link {
213
+ overflow: visible;
214
+ }
215
+ .rl-gallery.rl-hover-effect-3 .rl-gallery-link .rl-gallery-caption {
216
+ position: absolute;
217
+ background: none;
218
+ }
219
+ .rl-gallery.rl-hover-effect-3 .rl-gallery-link:hover .rl-gallery-caption,
220
+ .rl-gallery.rl-hover-effect-3 .rl-gallery-link.hover .rl-gallery-caption {
221
+ -webkit-transform: translate(15px, 15px);
222
+ -moz-transform: translate(15px, 15px);
223
+ -ms-transform: translate(15px, 15px);
224
+ -o-transform: translate(15px, 15px);
225
+ transform: translate(15px, 15px);
226
+ }
227
+ .rl-gallery.rl-hover-effect-3 .rl-gallery-link:hover:after,
228
+ .rl-gallery.rl-hover-effect-3 .rl-gallery-link.hover:after {
229
+ filter: "alpha(opacity=100)";
230
+ opacity: 1;
231
+ -webkit-transform: translate(15px, 15px);
232
+ -moz-transform: translate(15px, 15px);
233
+ -ms-transform: translate(15px, 15px);
234
+ -o-transform: translate(15px, 15px);
235
+ transform: translate(15px, 15px);
236
+ }
237
+ .rl-gallery.rl-hover-effect-3[class^="rl-hover-icon-"] .rl-gallery-link:before,
238
+ .rl-gallery.rl-hover-effect-3[class*="rl-hover-icon-"] .rl-gallery-link:before {
239
+ background: none;
240
+ }
241
+ .rl-gallery.rl-hover-effect-3[class^="rl-hover-icon-"] .rl-gallery-link:hover:before,
242
+ .rl-gallery.rl-hover-effect-3[class*="rl-hover-icon-"] .rl-gallery-link:hover:before,
243
+ .rl-gallery.rl-hover-effect-3[class^="rl-hover-icon-"] .rl-gallery-link.hover:before,
244
+ .rl-gallery.rl-hover-effect-3[class*="rl-hover-icon-"] .rl-gallery-link.hover:before {
245
+ -webkit-transform: translate(15px, 15px);
246
+ -moz-transform: translate(15px, 15px);
247
+ -ms-transform: translate(15px, 15px);
248
+ -o-transform: translate(15px, 15px);
249
+ transform: translate(15px, 15px);
250
+ }
251
+
252
+ /* Hover effect 4 */
253
+
254
+ .rl-gallery.rl-hover-effect-4 .rl-gallery-link .rl-gallery-caption {
255
+ background: none;
256
+ height: auto;
257
+ filter: "alpha(opacity=100)";
258
+ opacity: 1;
259
+ -webkit-transform: translateY(100%);
260
+ -moz-transform: translateY(100%);
261
+ -ms-transform: translateY(100%);
262
+ -o-transform: translateY(100%);
263
+ transform: translateY(100%);
264
+ }
265
+ .rl-gallery.rl-hover-effect-4 .rl-gallery-link:hover .rl-gallery-caption,
266
+ .rl-gallery.rl-hover-effect-4 .rl-gallery-link.hover .rl-gallery-caption {
267
+ -webkit-transform: translateY(0);
268
+ -moz-transform: translateY(0);
269
+ -ms-transform: translateY(0);
270
+ -o-transform: translateY(0);
271
+ transform: translateY(0);
272
+ }
273
+ .rl-gallery.rl-hover-effect-4 .rl-gallery-link {
274
+ overflow: hidden;
275
+ }
276
+ .rl-gallery.rl-hover-effect-4 .rl-gallery-link:before {
277
+ background: none;
278
+ webkit-transform: translateY(-25%);
279
+ -moz-transform: translateY(-25%);
280
+ -ms-transform: translateY(-25%);
281
+ -o-transform: translateY(-25%);
282
+ transform: translateY(-25%);
283
+ }
284
+ .rl-gallery.rl-hover-effect-4 .rl-gallery-link:hover:before,
285
+ .rl-gallery.rl-hover-effect-4 .rl-gallery-link.hover:before {
286
+ webkit-transform: translateY(0);
287
+ -moz-transform: translateY(0);
288
+ -ms-transform: translateY(0);
289
+ -o-transform: translateY(0);
290
+ transform: translateY(0);
291
+ }
292
+ .rl-gallery.rl-hover-effect-4 .rl-gallery-link:after {
293
+ filter: "alpha(opacity=100)";
294
+ opacity: 1;
295
+ top: -100%;
296
+ }
297
+ .rl-gallery.rl-hover-effect-4 .rl-gallery-link:hover:after,
298
+ .rl-gallery.rl-hover-effect-4 .rl-gallery-link.hover:after {
299
+ -webkit-transform: translateY(100%);
300
+ -moz-transform: translateY(100%);
301
+ -ms-transform: translateY(100%);
302
+ -o-transform: translateY(100%);
303
+ transform: translateY(100%);
304
+ }
305
+
306
+ /* Hover effect 5 */
307
+
308
+ .rl-gallery.rl-hover-effect-5 .rl-gallery-link .rl-gallery-caption {
309
+ background: none;
310
+ height: 100%;
311
+ filter: "alpha(opacity=100)";
312
+ opacity: 1;
313
+ -webkit-transform: translateY(100%);
314
+ -moz-transform: translateY(100%);
315
+ -ms-transform: translateY(100%);
316
+ -o-transform: translateY(100%);
317
+ transform: translateY(100%);
318
+ }
319
+ .rl-gallery.rl-hover-effect-5 .rl-gallery-link:hover .rl-gallery-caption,
320
+ .rl-gallery.rl-hover-effect-5 .rl-gallery-link.hover .rl-gallery-caption {
321
+ -webkit-transform: translateY(0);
322
+ -moz-transform: translateY(0);
323
+ -ms-transform: translateY(0);
324
+ -o-transform: translateY(0);
325
+ transform: translateY(0);
326
+ }
327
+ .rl-gallery.rl-hover-effect-5 .rl-gallery-link {
328
+ overflow: hidden;
329
+ }
330
+ .rl-gallery.rl-hover-effect-5 .rl-gallery-link:before {
331
+ background: none;
332
+ }
333
+ .rl-gallery.rl-hover-effect-5 .rl-gallery-link:hover:before,
334
+ .rl-gallery.rl-hover-effect-5 .rl-gallery-link.hover:before {
335
+ webkit-transform: translateY(2em);
336
+ -moz-transform: translateY(2em);
337
+ -ms-transform: translateY(2em);
338
+ -o-transform: translateY(2em);
339
+ transform: translateY(2em);
340
+ }
341
+ .rl-gallery.rl-hover-effect-5 .rl-gallery-link:after {
342
+ filter: "alpha(opacity=100)";
343
+ opacity: 1;
344
+ top: -100%;
345
+ }
346
+ .rl-gallery.rl-hover-effect-5 .rl-gallery-link:hover:after,
347
+ .rl-gallery.rl-hover-effect-5 .rl-gallery-link.hover:after {
348
+ -webkit-transform: translateY(100%);
349
+ -moz-transform: translateY(100%);
350
+ -ms-transform: translateY(100%);
351
+ -o-transform: translateY(100%);
352
+ transform: translateY(100%);
353
+ }
354
+
355
+ /* Hover effect 6 */
356
+
357
+ .rl-gallery.rl-hover-effect-6 .rl-gallery-link {
358
+ overflow: hidden;
359
+ }
360
+ .rl-gallery.rl-hover-effect-6 .rl-gallery-link img {
361
+ z-index: 3;
362
+ -webkit-transition: transform 0.3s;
363
+ -moz-transition: transform 0.3s;
364
+ -ms-transition: transform 0.3s;
365
+ -o-transition: transform 0.3s;
366
+ transition: transform 0.3s;
367
+ }
368
+ .rl-gallery.rl-hover-effect-6 .rl-gallery-link:hover img,
369
+ .rl-gallery.rl-hover-effect-6 .rl-gallery-link.hover img {
370
+ -webkit-transform: scale(0.3);
371
+ -ms-transform: scale(0.3);
372
+ -o-transform: scale(0.3);
373
+ transform: scale(0.3);
374
+ }
375
+ .rl-gallery.rl-hover-effect-6 .rl-gallery-link:before {
376
+ background: none;
377
+ }
378
+ .rl-gallery.rl-hover-effect-6 .rl-gallery-link .rl-gallery-caption {
379
+ background: none;
380
+ -webkit-transform: scale(0.7);
381
+ -moz-transform: scale(0.7);
382
+ -ms-transform: scale(0.7);
383
+ -o-transform: scale(0.7);
384
+ transform: scale(0.7);
385
+ }
386
+ .rl-gallery.rl-hover-effect-6 .rl-gallery-link:hover .rl-gallery-caption,
387
+ .rl-gallery.rl-hover-effect-6 .rl-gallery-link.hover .rl-gallery-caption {
388
+ -webkit-transform: scale(1);
389
+ -moz-transform: scale(1);
390
+ -ms-transform: scale(1);
391
+ -o-transform: scale(1);
392
+ transform: scale(1);
393
+ }
394
+
395
+ .rl-gallery.rl-hover-effect-6 .rl-gallery-link:hover:after,
396
+ .rl-gallery.rl-hover-effect-6 .rl-gallery-link.hover:after {
397
+ filter: "alpha(opacity=100)";
398
+ opacity: 1;
399
+ -webkit-transform: scale(1);
400
+ -moz-transform: scale(1);
401
+ -ms-transform: scale(1);
402
+ -o-transform: scale(1);
403
+ transform: scale(1);
404
+ }
405
+
406
+ /* Hover effect 7 */
407
+
408
+ .rl-gallery.rl-hover-effect-7 .rl-gallery-link {
409
+ overflow: visible;
410
+ }
411
+ .rl-gallery.rl-hover-effect-7 .rl-gallery-link:before {
412
+ filter: "alpha(opacity=100)";
413
+ opacity: 1;
414
+ top: -2em;
415
+ }
416
+ .rl-gallery.rl-hover-effect-7 .rl-gallery-link:hover:before,
417
+ .rl-gallery.rl-hover-effect-7 .rl-gallery-link.hover:before {
418
+ webkit-transform: translateY(4em);
419
+ -moz-transform: translateY(4em);
420
+ -ms-transform: translateY(4em);
421
+ -o-transform: translateY(4em);
422
+ transform: translateY(4em);
423
+ }
424
+ .rl-gallery.rl-hover-effect-7 .rl-gallery-link img {
425
+ position: relative;
426
+ z-index: 3;
427
+ -webkit-transition: transform 0.3s;
428
+ -moz-transition: transform 0.3s;
429
+ -ms-transition: transform 0.3s;
430
+ -o-transition: transform 0.3s;
431
+ transition: transform 0.3s;
432
+ }
433
+ .rl-gallery.rl-hover-effect-7 .rl-gallery-link:hover img,
434
+ .rl-gallery.rl-hover-effect-7 .rl-gallery-link.hover img {
435
+ -webkit-transform: translateY(-5em);
436
+ -moz-transform: translateY(-5em);
437
+ -ms-transform: translateY(-5em);
438
+ -o-transform: translateY(-5em);
439
+ transform: translateY(-5em);
440
+ }
441
+ .rl-gallery.rl-hover-effect-7 .rl-gallery-link .rl-gallery-caption {
442
+ height: 5em;
443
+ filter: "alpha(opacity=100)";
444
+ opacity: 1;
445
+ }
446
+
447
+ /* Hover effect 8 */
448
+
449
+ .rl-gallery.rl-hover-effect-8 .rl-gallery-link {
450
+ overflow: hidden;
451
+ }
452
+ .rl-gallery.rl-hover-effect-8 .rl-gallery-link:before {
453
+ filter: "alpha(opacity=100)";
454
+ opacity: 1;
455
+ top: -2em;
456
+ }
457
+ .rl-gallery.rl-hover-effect-8 .rl-gallery-link:hover:before,
458
+ .rl-gallery.rl-hover-effect-8 .rl-gallery-link.hover:before {
459
+ webkit-transform: translateY(4em);
460
+ -moz-transform: translateY(4em);
461
+ -ms-transform: translateY(4em);
462
+ -o-transform: translateY(4em);
463
+ transform: translateY(4em);
464
+ }
465
+ .rl-gallery.rl-hover-effect-8 .rl-gallery-link img {
466
+ z-index: 1;
467
+ -webkit-transition: transform 0.3s;
468
+ -moz-transition: transform 0.3s;
469
+ -ms-transition: transform 0.3s;
470
+ -o-transition: transform 0.3s;
471
+ transition: transform 0.3s;
472
+ }
473
+ .rl-gallery.rl-hover-effect-8 .rl-gallery-link:hover img {
474
+ -webkit-transform: translateY(-3em);
475
+ -moz-transform: translateY(-3em);
476
+ -ms-transform: translateY(-3em);
477
+ -o-transform: translateY(-3em);
478
+ transform: translateY(-3em);
479
+ }
480
+ .rl-gallery.rl-hover-effect-8 .rl-gallery-link .rl-gallery-caption {
481
+ height: 5em;
482
+ filter: "alpha(opacity=100)";
483
+ opacity: 1;
484
+ -webkit-transform: translateY(100%);
485
+ -moz-transform: translateY(100%);
486
+ -ms-transform: translateY(100%);
487
+ -o-transform: translateY(100%);
488
+ transform: translateY(100%);
489
+ }
490
+ .rl-gallery.rl-hover-effect-8 .rl-gallery-link:hover .rl-gallery-caption,
491
+ .rl-gallery.rl-hover-effect-8 .rl-gallery-link.hover .rl-gallery-caption {
492
+ -webkit-transform: translateY(0px);
493
+ -moz-transform: translateY(0px);
494
+ -ms-transform: translateY(0px);
495
+ -o-transform: translateY(0px);
496
+ transform: translateY(0px);
497
+ }
498
+
499
+ /* Hover effect 9 */
500
+
501
+ .rl-gallery.rl-hover-effect-9 .rl-gallery-link {
502
+ overflow: hidden;
503
+ }
504
+ .rl-gallery.rl-hover-effect-9 .rl-gallery-link img {
505
+ z-index: 3;
506
+ -webkit-transition: transform 0.3s;
507
+ -moz-transition: transform 0.3s;
508
+ -ms-transition: transform 0.3s;
509
+ -o-transition: transform 0.3s;
510
+ transition: transform 0.3s;
511
+ }
512
+ .rl-gallery.rl-hover-effect-9 .rl-gallery-link:before {
513
+ background: none;
514
+ -webkit-transform: scale(0);
515
+ -moz-transform: scale(0);
516
+ -ms-transform: scale(0);
517
+ -o-transform: scale(0);
518
+ transform: scale(0);
519
+ }
520
+ .rl-gallery.rl-hover-effect-9 .rl-gallery-link:hover:before,
521
+ .rl-gallery.rl-hover-effect-9 .rl-gallery-link.hover:before {
522
+ -webkit-transform: scale(1);
523
+ -moz-transform: scale(1);
524
+ -ms-transform: scale(1);
525
+ -o-transform: scale(1);
526
+ transform: scale(1);
527
+ }
528
+ .rl-gallery.rl-hover-effect-9 .rl-gallery-link .rl-gallery-caption {
529
+ background: none;
530
+ -webkit-transform: scale(0.7);
531
+ -moz-transform: scale(0.7);
532
+ -ms-transform: scale(0.7);
533
+ -o-transform: scale(0.7);
534
+ transform: scale(0.7);
535
+ }
536
+ .rl-gallery.rl-hover-effect-9 .rl-gallery-link:hover .rl-gallery-caption,
537
+ .rl-gallery.rl-hover-effect-9 .rl-gallery-link.hover .rl-gallery-caption {
538
+ -webkit-transform: scale(1);
539
+ -moz-transform: scale(1);
540
+ -ms-transform: scale(1);
541
+ -o-transform: scale(1);
542
+ transform: scale(1);
543
+ }
544
+ .rl-gallery.rl-hover-effect-9 .rl-gallery-link:after {
545
+ height: calc(100% - 1em);
546
+ width: calc(100% - 1em);
547
+ margin: 0.5em;
548
+ }
549
+ .rl-gallery.rl-hover-effect-9 .rl-gallery-link:hover:after,
550
+ .rl-gallery.rl-hover-effect-9 .rl-gallery-link.hover:after {
551
+ filter: "alpha(opacity=100)";
552
+ opacity: 1;
553
+ -webkit-transform: scale(1);
554
+ -moz-transform: scale(1);
555
+ -ms-transform: scale(1);
556
+ -o-transform: scale(1);
557
+ transform: scale(1);
558
+ }
559
+
560
+ .rl-gallery.rl-justified-gallery .rl-gallery-link {
561
+ position: absolute;
562
+ }
563
+ .rl-gallery.rl-justified-gallery {
564
+ overflow: visible;
565
+ }
566
+ .rl-gallery-button {
567
+ text-align: center;
568
+ }
569
+ .rl-loading {
570
+ opacity: 0.5;
571
+ pointer-events: none;
572
  }
includes/class-frontend.php CHANGED
@@ -263,7 +263,7 @@ class Responsive_Lightbox_Frontend {
263
  if ( $result[1] !== 'norl' ) {
264
  // gallery?
265
  if ( $args['settings']['plugin']['images_as_gallery'] || $args['settings']['plugin']['force_custom_gallery'] )
266
- $link = preg_replace( '/data-rel=(\'|")(.*?)(\'|")/s', 'data-rel="' . $args['selector'] . '-gallery-' . $this->gallery_no . '" data-rl_title="__RL_IMAGE_TITLE__" data-rl_caption="__RL_IMAGE_CAPTION__"' . ( $args['script'] === 'magnific' ? ' data-magnific_type="gallery"' : '' ) . ( $args['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $args['link_number'] . '"' : '' ), $link );
267
  // single image
268
  else
269
  $link = preg_replace( '/data-rel=(\'|")(.*?)(\'|")/s', 'data-rel="' . $args['selector'] . '-image-' . base64_encode( $result[1] ) . '"' . ( $args['script'] === 'magnific' ? ' data-magnific_type="image"' : '' ) . ( $args['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $args['link_number'] . '"' : '' ) . ' data-rl_title="__RL_IMAGE_TITLE__" data-rl_caption="__RL_IMAGE_CAPTION__"', $link );
@@ -414,21 +414,13 @@ class Responsive_Lightbox_Frontend {
414
  if ( ! ( isset( $args['link'] ) && $args['link'] != 'file' ) ) {
415
  // gallery image size
416
  if ( ! empty( $args['image_id'] ) ) {
417
- if ( $args['settings']['plugin']['gallery_image_size'] !== 'full' ) {
418
  $args['src'] = wp_get_attachment_image_src( $args['image_id'], $args['settings']['plugin']['gallery_image_size'] );
419
 
420
- if ( preg_match( '/<a.*? href=("|\').*?("|\').*?>/is', $link ) === 1 )
421
- $link = preg_replace( '/(<a.*? href=(?:"|\')).*?((?:"|\').*?>)/', '$1' . $args['src'][0] . '$2', $link );
422
- else
423
- $link = preg_replace( '/(<a.*?)>/', '$1 href="' . $args['src'][0] . '">', $link );
424
- } else {
425
- $args['src'] = wp_get_attachment_image_src( $args['image_id'], 'full' );
426
-
427
- if ( preg_match( '/<a.*? href=("|\').*?("|\').*?>/is', $link ) === 1 )
428
- $link = preg_replace( '/(<a.*? href=(?:"|\')).*?((?:"|\').*?>)/', '$1' . $args['src'][0] . '$2', $link );
429
- else
430
- $link = preg_replace( '/(<a.*?)>/', '$1 href="' . $args['src'][0] . '">', $link );
431
- }
432
  }
433
 
434
  if ( $args['script'] === 'magnific' )
@@ -864,8 +856,12 @@ class Responsive_Lightbox_Frontend {
864
  // create image source data
865
  $args['src'] = array( $new_image['url'], $new_image['width'], $new_image['height'], $new_image );
866
 
 
 
 
 
867
  // set alt text
868
- $images[$index]['alt'] = ! empty( $new_image['alt'] ) ? esc_attr( $new_image['alt'] ) : ( ! empty( $new_image['id'] ) ? get_post_meta( $new_image['id'], '_wp_attachment_image_alt', true ) : '' );
869
 
870
  // set lightbox image title
871
  if ( $args['settings']['plugin']['gallery_image_title'] === 'default' )
@@ -931,8 +927,10 @@ class Responsive_Lightbox_Frontend {
931
 
932
  $attr = apply_filters( 'rl_gallery_image_link_attributes', $attr, $attachment_id, $image, $args );
933
 
 
934
  $attr = array_map( 'esc_attr', $attr );
935
- $link = rtrim( "<a " );
 
936
 
937
  foreach ( $attr as $name => $value ) {
938
  $link .= " $name=" . '"' . $value . '"';
@@ -940,7 +938,7 @@ class Responsive_Lightbox_Frontend {
940
 
941
  $link .= '>';
942
  $link .= apply_filters( 'rl_gallery_image_link_before', '', $attachment_id, $args );
943
- $link .= '<img src="' . $thumbnail[0] . '" width="' . $thumbnail[1] . '" height="' . $thumbnail[2] . '" />';
944
 
945
  // embed element?
946
  if ( preg_match( '/^e\d+$/', $attachment_id ) === 1 ) {
@@ -964,7 +962,6 @@ class Responsive_Lightbox_Frontend {
964
  }
965
 
966
  $link .= apply_filters( 'rl_gallery_image_link_after', '', $attachment_id, $args );
967
-
968
  $link .= '</a>';
969
 
970
  return apply_filters( 'rl_gallery_image_link', $link, $attachment_id, $image, $thumbnail, $args );
@@ -1334,23 +1331,27 @@ class Responsive_Lightbox_Frontend {
1334
  }
1335
 
1336
  /**
1337
- * Get attachment id by url function, adjusted to work for cropped images
1338
  *
1339
  * @param string $url
1340
  * @return int
1341
  */
1342
  public function get_attachment_id_by_url( $url ) {
 
1343
  $url = ! empty( $url ) ? esc_url( $url ) : '';
1344
 
 
 
 
1345
  // get cached data
1346
- // $post_id = wp_cache_get( md5( $url ), 'rl-attachment_id_by_url' );
1347
  $post_ids = get_transient( 'rl-attachment_ids_by_url' );
1348
- $post_id = 0;
1349
 
1350
  // cached url not found?
1351
  if ( $post_ids === false || ! in_array( $url, array_keys( $post_ids ) ) ) {
 
1352
  $post_id = attachment_url_to_postid( $url );
1353
 
 
1354
  if ( ! $post_id ) {
1355
  $dir = wp_upload_dir();
1356
  $path = $url;
@@ -1358,21 +1359,26 @@ class Responsive_Lightbox_Frontend {
1358
  if ( strpos( $path, $dir['baseurl'] . '/' ) === 0 )
1359
  $path = substr( $path, strlen( $dir['baseurl'] . '/' ) );
1360
 
 
1361
  if ( preg_match( '/^(.*)(\-\d*x\d*)(\.\w{1,})/i', $path, $matches ) )
1362
  $post_id = attachment_url_to_postid( $dir['baseurl'] . '/' . $matches[1] . $matches[3] );
 
 
 
 
1363
  }
1364
 
1365
  // set the cache expiration, 24 hours by default
1366
- $expire = absint( apply_filters( 'rl_object_cache_expire', DAY_IN_SECONDS ) );
1367
-
1368
- // wp_cache_add( md5( $url ), $post_id, 'rl-attachment_id_by_url', $expire );
1369
 
 
1370
  $post_ids[$url] = $post_id;
1371
 
 
1372
  set_transient( 'rl-attachment_ids_by_url', $post_ids, $expire );
1373
  // cached url found
1374
  } elseif ( ! empty( $post_ids[$url] ) )
1375
- $post_id = absint( $post_ids[$url] );
1376
 
1377
  return (int) apply_filters( 'rl_get_attachment_id_by_url', $post_id, $url );
1378
  }
263
  if ( $result[1] !== 'norl' ) {
264
  // gallery?
265
  if ( $args['settings']['plugin']['images_as_gallery'] || $args['settings']['plugin']['force_custom_gallery'] )
266
+ $link = preg_replace( '/data-rel=(\'|")(.*?)(\'|")/s', 'data-rel="' . $args['selector'] . '-gallery-' . base64_encode( $result[1] ) . '" data-rl_title="__RL_IMAGE_TITLE__" data-rl_caption="__RL_IMAGE_CAPTION__"' . ( $args['script'] === 'magnific' ? ' data-magnific_type="gallery"' : '' ) . ( $args['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $args['link_number'] . '"' : '' ), $link );
267
  // single image
268
  else
269
  $link = preg_replace( '/data-rel=(\'|")(.*?)(\'|")/s', 'data-rel="' . $args['selector'] . '-image-' . base64_encode( $result[1] ) . '"' . ( $args['script'] === 'magnific' ? ' data-magnific_type="image"' : '' ) . ( $args['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $args['link_number'] . '"' : '' ) . ' data-rl_title="__RL_IMAGE_TITLE__" data-rl_caption="__RL_IMAGE_CAPTION__"', $link );
414
  if ( ! ( isset( $args['link'] ) && $args['link'] != 'file' ) ) {
415
  // gallery image size
416
  if ( ! empty( $args['image_id'] ) ) {
417
+ if ( empty( $args['src'] ) )
418
  $args['src'] = wp_get_attachment_image_src( $args['image_id'], $args['settings']['plugin']['gallery_image_size'] );
419
 
420
+ if ( preg_match( '/<a.*? href=("|\').*?("|\').*?>/is', $link ) === 1 )
421
+ $link = preg_replace( '/(<a.*? href=(?:"|\')).*?((?:"|\').*?>)/', '$1' . $args['src'][0] . '$2', $link );
422
+ else
423
+ $link = preg_replace( '/(<a.*?)>/', '$1 href="' . $args['src'][0] . '">', $link );
 
 
 
 
 
 
 
 
424
  }
425
 
426
  if ( $args['script'] === 'magnific' )
856
  // create image source data
857
  $args['src'] = array( $new_image['url'], $new_image['width'], $new_image['height'], $new_image );
858
 
859
+ // update image id
860
+ if ( ! empty( $new_image['id'] ) )
861
+ $args['image_id'] = $new_image['id'];
862
+
863
  // set alt text
864
+ $images[$index]['alt'] = $shortcode_atts['alt'] = ! empty( $new_image['alt'] ) ? $new_image['alt'] : ( ! empty( $new_image['id'] ) ? get_post_meta( $new_image['id'], '_wp_attachment_image_alt', true ) : '' );
865
 
866
  // set lightbox image title
867
  if ( $args['settings']['plugin']['gallery_image_title'] === 'default' )
927
 
928
  $attr = apply_filters( 'rl_gallery_image_link_attributes', $attr, $attachment_id, $image, $args );
929
 
930
+ // escape attributes
931
  $attr = array_map( 'esc_attr', $attr );
932
+
933
+ $link = '<a';
934
 
935
  foreach ( $attr as $name => $value ) {
936
  $link .= " $name=" . '"' . $value . '"';
938
 
939
  $link .= '>';
940
  $link .= apply_filters( 'rl_gallery_image_link_before', '', $attachment_id, $args );
941
+ $link .= '<img src="' . esc_url( $thumbnail[0] ) . '" width="' . (int) $thumbnail[1] . '" height="' . (int) $thumbnail[2] . '" alt="' . esc_attr( $args['alt'] ) . '" />';
942
 
943
  // embed element?
944
  if ( preg_match( '/^e\d+$/', $attachment_id ) === 1 ) {
962
  }
963
 
964
  $link .= apply_filters( 'rl_gallery_image_link_after', '', $attachment_id, $args );
 
965
  $link .= '</a>';
966
 
967
  return apply_filters( 'rl_gallery_image_link', $link, $attachment_id, $image, $thumbnail, $args );
1331
  }
1332
 
1333
  /**
1334
+ * Get attachment id by url function, adjusted to work for cropped and scaled images.
1335
  *
1336
  * @param string $url
1337
  * @return int
1338
  */
1339
  public function get_attachment_id_by_url( $url ) {
1340
+ // parse url
1341
  $url = ! empty( $url ) ? esc_url( $url ) : '';
1342
 
1343
+ // set post id
1344
+ $post_id = 0;
1345
+
1346
  // get cached data
 
1347
  $post_ids = get_transient( 'rl-attachment_ids_by_url' );
 
1348
 
1349
  // cached url not found?
1350
  if ( $post_ids === false || ! in_array( $url, array_keys( $post_ids ) ) ) {
1351
+ // try to get post id
1352
  $post_id = attachment_url_to_postid( $url );
1353
 
1354
+ // no post id?
1355
  if ( ! $post_id ) {
1356
  $dir = wp_upload_dir();
1357
  $path = $url;
1359
  if ( strpos( $path, $dir['baseurl'] . '/' ) === 0 )
1360
  $path = substr( $path, strlen( $dir['baseurl'] . '/' ) );
1361
 
1362
+ // try to check full size image
1363
  if ( preg_match( '/^(.*)(\-\d*x\d*)(\.\w{1,})/i', $path, $matches ) )
1364
  $post_id = attachment_url_to_postid( $dir['baseurl'] . '/' . $matches[1] . $matches[3] );
1365
+
1366
+ // try to check scaled size image
1367
+ if ( ! $post_id && ! empty( $matches[1] ) && ! empty( $matches[3] ) )
1368
+ $post_id = attachment_url_to_postid( $dir['baseurl'] . '/' . $matches[1] . '-scaled' . $matches[3] );
1369
  }
1370
 
1371
  // set the cache expiration, 24 hours by default
1372
+ $expire = (int) apply_filters( 'rl_object_cache_expire', DAY_IN_SECONDS );
 
 
1373
 
1374
+ // update post ids
1375
  $post_ids[$url] = $post_id;
1376
 
1377
+ // set transient
1378
  set_transient( 'rl-attachment_ids_by_url', $post_ids, $expire );
1379
  // cached url found
1380
  } elseif ( ! empty( $post_ids[$url] ) )
1381
+ $post_id = $post_ids[$url];
1382
 
1383
  return (int) apply_filters( 'rl_get_attachment_id_by_url', $post_id, $url );
1384
  }
includes/class-galleries.php CHANGED
@@ -1457,6 +1457,7 @@ class Responsive_Lightbox_Galleries {
1457
  <td colspan="2" class="rl-colspan">
1458
  <div class="rl-gallery-preview-inside">
1459
  <a href="#" class="rl-gallery-update-preview button button-secondary">' . __( 'Update preview', 'responsive-lightbox' ) . '</a><span class="spinner" style="display: none;"></span>
 
1460
  </div>
1461
  <div class="rl-gallery-content">
1462
  <ul class="rl-gallery-images rl-gallery-images-' . $menu_item . '">';
@@ -4738,7 +4739,7 @@ class Responsive_Lightbox_Galleries {
4738
 
4739
  // display count
4740
  if ( ! empty( $image ) )
4741
- echo '<span class="media-icon image-icon">' . $image . '</span><span>' . sprintf( _n( '%s image', '%s images', $images_count, 'responsive-lightbox' ), $images_count ) . '</span>';
4742
  else
4743
  echo '<span class="media-icon image-icon">' . wp_get_attachment_image( 0, array( 60, 60 ), true, array( 'alt' => '' ) ) . '</span>';
4744
  break;
1457
  <td colspan="2" class="rl-colspan">
1458
  <div class="rl-gallery-preview-inside">
1459
  <a href="#" class="rl-gallery-update-preview button button-secondary">' . __( 'Update preview', 'responsive-lightbox' ) . '</a><span class="spinner" style="display: none;"></span>
1460
+ <p class="description">' . __( 'Use this button after any change of the options below to see updated gallery preview.', 'responsive-lightbox' ) . '</p>
1461
  </div>
1462
  <div class="rl-gallery-content">
1463
  <ul class="rl-gallery-images rl-gallery-images-' . $menu_item . '">';
4739
 
4740
  // display count
4741
  if ( ! empty( $image ) )
4742
+ echo '<span class="media-icon image-icon">' . $image . '</span><span>' . sprintf( _n( '%s element', '%s elements', $images_count, 'responsive-lightbox' ), $images_count ) . '</span>';
4743
  else
4744
  echo '<span class="media-icon image-icon">' . wp_get_attachment_image( 0, array( 60, 60 ), true, array( 'alt' => '' ) ) . '</span>';
4745
  break;
includes/class-settings.php CHANGED
@@ -1999,8 +1999,8 @@ class Responsive_Lightbox_Settings {
1999
  'disabled' => isset( $field['disabled'] ) ? (bool) $field['disabled'] : false,
2000
  'append' => ! empty( $field['append'] ) ? esc_html( $field['append'] ) : '',
2001
  'prepend' => ! empty( $field['prepend'] ) ? esc_html( $field['prepend'] ) : '',
2002
- 'min' => ! empty( $field['min'] ) ? (int) $field['min'] : '',
2003
- 'max' => ! empty( $field['max'] ) ? (int) $field['max'] : '',
2004
  'options' => ! empty( $field['options'] ) ? $field['options'] : '',
2005
  'fields' => ! empty( $field['fields'] ) ? $field['fields'] : '',
2006
  'after_field' => ! empty( $field['after_field'] ) ? $field['after_field'] : '',
@@ -2101,7 +2101,7 @@ class Responsive_Lightbox_Settings {
2101
  break;
2102
 
2103
  case 'select':
2104
- $html .= '<select id="' . $args['id'] . '" name="' . $args['name'] . '" value="' . $args['value'] . '" ' . ( isset( $args['disabled'] ) && $args['disabled'] == true ? ' disabled="disabled"' : '' ) . '/>';
2105
 
2106
  foreach ( $args['options'] as $key => $name ) {
2107
  $html .= '<option value="' . $key . '" ' . selected( $args['value'], $key, false ) . '>' . $name . '</option>';
@@ -2127,17 +2127,17 @@ class Responsive_Lightbox_Settings {
2127
  break;
2128
 
2129
  case 'range':
2130
- $html .= '<input id="' . $args['id'] . '" type="range" name="' . $args['name'] . '" value="' . $args['value'] . '" min="' . $args['min'] . '" max="' . $args['max'] . '" oninput="this.form.' . $args['id'] . '_range.value=this.value" />';
2131
  $html .= '<output name="' . $args['id'] . '_range">' . (int) $args['value'] . '</output>';
2132
  break;
2133
 
2134
  case 'color_picker':
2135
- $html .= '<input id="' . $args['id'] . '" class="color-picker" type="text" value="' . $args['value'] . '" name="' . $args['name'] . '" data-default-color="' . $args['default'] . '" />';
2136
  break;
2137
 
2138
  case 'number':
2139
  $html .= ( ! empty( $args['prepend'] ) ? '<span>' . $args['prepend'] . '</span> ' : '' );
2140
- $html .= '<input id="' . $args['id'] . '" type="text" value="' . $args['value'] . '" name="' . $args['name'] . '" />';
2141
  $html .= ( ! empty( $args['append'] ) ? ' <span>' . $args['append'] . '</span>' : '' );
2142
  break;
2143
 
@@ -2154,7 +2154,7 @@ class Responsive_Lightbox_Settings {
2154
  case 'text':
2155
  default :
2156
  $html .= ( ! empty( $args['prepend'] ) ? '<span>' . $args['prepend'] . '</span> ' : '' );
2157
- $html .= '<input id="' . $args['id'] . '" class="' . $args['class'] . '" type="text" value="' . $args['value'] . '" name="' . $args['name'] . '" />';
2158
  $html .= ( ! empty( $args['append'] ) ? ' <span>' . $args['append'] . '</span>' : '' );
2159
  }
2160
 
@@ -2202,7 +2202,8 @@ class Responsive_Lightbox_Settings {
2202
  break;
2203
 
2204
  case 'color_picker':
2205
- $value = ! $value || '#' == $value ? '' : esc_attr( $value );
 
2206
  break;
2207
 
2208
  case 'number':
@@ -2222,6 +2223,17 @@ class Responsive_Lightbox_Settings {
2222
  break;
2223
 
2224
  case 'text':
 
 
 
 
 
 
 
 
 
 
 
2225
  case 'select':
2226
  default:
2227
  $value = is_array( $value ) ? array_map( 'sanitize_text_field', $value ) : sanitize_text_field( $value );
@@ -2270,24 +2282,33 @@ class Responsive_Lightbox_Settings {
2270
  if ( $field['type'] === 'multiple' ) {
2271
  if ( $field['fields'] ) {
2272
  foreach ( $field['fields'] as $subfield_id => $subfield ) {
 
 
 
 
 
2273
  // if subfield has parent
2274
  if ( ! empty( $this->settings[$setting_id]['fields'][$field_id]['fields'][$subfield_id]['parent'] ) ) {
2275
  $field_parent = $this->settings[$setting_id]['fields'][$field_id]['fields'][$subfield_id]['parent'];
2276
 
2277
- $input[$field_parent][$subfield_id] = isset( $input[$field_parent][$subfield_id] ) ? $this->sanitize_field( $input[$field_parent][$subfield_id], $subfield['type'] ) : ( $subfield['type'] === 'boolean' ? false : $rl->defaults[$setting_id][$field_parent][$subfield_id] );
2278
  } else {
2279
- $input[$subfield_id] = isset( $input[$subfield_id] ) ? $this->sanitize_field( $input[$subfield_id], $subfield['type'] ) : ( $subfield['type'] === 'boolean' ? false : $rl->defaults[$setting_id][$field_id][$subfield_id] );
2280
  }
2281
  }
2282
  }
2283
  } else {
 
 
 
 
2284
  // if field has parent
2285
  if ( ! empty( $this->settings[$setting_id]['fields'][$field_id]['parent'] ) ) {
2286
  $field_parent = $this->settings[$setting_id]['fields'][$field_id]['parent'];
2287
 
2288
- $input[$field_parent][$field_id] = isset( $input[$field_parent][$field_id] ) ? ( $field['type'] === 'checkbox' ? array_keys( $this->sanitize_field( $input[$field_parent][$field_id], $field['type'] ) ) : $this->sanitize_field( $input[$field_parent][$field_id], $field['type'] ) ) : ( in_array( $field['type'], array( 'boolean', 'checkbox' ) ) ? false : $rl->defaults[$setting_id][$field_parent][$field_id] );
2289
  } else {
2290
- $input[$field_id] = isset( $input[$field_id] ) ? ( $field['type'] === 'checkbox' ? array_keys( $this->sanitize_field( $input[$field_id], $field['type'] ) ) : $this->sanitize_field( $input[$field_id], $field['type'] ) ) : ( in_array( $field['type'], array( 'boolean', 'checkbox' ) ) ? false : $rl->defaults[$setting_id][$field_id] );
2291
  }
2292
  }
2293
  }
1999
  'disabled' => isset( $field['disabled'] ) ? (bool) $field['disabled'] : false,
2000
  'append' => ! empty( $field['append'] ) ? esc_html( $field['append'] ) : '',
2001
  'prepend' => ! empty( $field['prepend'] ) ? esc_html( $field['prepend'] ) : '',
2002
+ 'min' => isset( $field['min'] ) ? (int) $field['min'] : '',
2003
+ 'max' => isset( $field['max'] ) ? (int) $field['max'] : '',
2004
  'options' => ! empty( $field['options'] ) ? $field['options'] : '',
2005
  'fields' => ! empty( $field['fields'] ) ? $field['fields'] : '',
2006
  'after_field' => ! empty( $field['after_field'] ) ? $field['after_field'] : '',
2101
  break;
2102
 
2103
  case 'select':
2104
+ $html .= '<select id="' . $args['id'] . '" name="' . $args['name'] . '" value="' . esc_attr( $args['value'] ) . '" ' . ( isset( $args['disabled'] ) && $args['disabled'] == true ? ' disabled="disabled"' : '' ) . '/>';
2105
 
2106
  foreach ( $args['options'] as $key => $name ) {
2107
  $html .= '<option value="' . $key . '" ' . selected( $args['value'], $key, false ) . '>' . $name . '</option>';
2127
  break;
2128
 
2129
  case 'range':
2130
+ $html .= '<input id="' . $args['id'] . '" type="range" name="' . $args['name'] . '" value="' . (int) $args['value'] . '" min="' . $args['min'] . '" max="' . $args['max'] . '" oninput="this.form.' . $args['id'] . '_range.value=this.value" />';
2131
  $html .= '<output name="' . $args['id'] . '_range">' . (int) $args['value'] . '</output>';
2132
  break;
2133
 
2134
  case 'color_picker':
2135
+ $html .= '<input id="' . $args['id'] . '" class="color-picker" type="text" value="' . esc_attr( $args['value'] ) . '" name="' . $args['name'] . '" data-default-color="' . $args['default'] . '" />';
2136
  break;
2137
 
2138
  case 'number':
2139
  $html .= ( ! empty( $args['prepend'] ) ? '<span>' . $args['prepend'] . '</span> ' : '' );
2140
+ $html .= '<input id="' . $args['id'] . '" type="number" value="' . (int) $args['value'] . '" name="' . $args['name'] . '" />';
2141
  $html .= ( ! empty( $args['append'] ) ? ' <span>' . $args['append'] . '</span>' : '' );
2142
  break;
2143
 
2154
  case 'text':
2155
  default :
2156
  $html .= ( ! empty( $args['prepend'] ) ? '<span>' . $args['prepend'] . '</span> ' : '' );
2157
+ $html .= '<input id="' . $args['id'] . '" class="' . $args['class'] . '" type="text" value="' . esc_attr( $args['value'] ) . '" name="' . $args['name'] . '" />';
2158
  $html .= ( ! empty( $args['append'] ) ? ' <span>' . $args['append'] . '</span>' : '' );
2159
  }
2160
 
2202
  break;
2203
 
2204
  case 'color_picker':
2205
+ if ( empty( $value ) || preg_match( '/^#[a-f0-9]{6}$/i', $value ) !== 1 )
2206
+ $value = '#666666';
2207
  break;
2208
 
2209
  case 'number':
2223
  break;
2224
 
2225
  case 'text':
2226
+ if ( ! empty( $args ) ) {
2227
+ // validate custom events
2228
+ if ( $args['setting_id'] === 'settings' ) {
2229
+ if ( $args['field_id'] === 'enable_custom_events' && $args['subfield_id'] === 'custom_events' )
2230
+ $value = preg_replace( '/[^a-z0-9 ]/i', '', $value );
2231
+ } elseif ( $args['setting_id'] === 'builder' ) {
2232
+ if ( $args['field_id'] === 'permalink' || $args['field_id'] === 'permalink_categories' || $args['field_id'] === 'permalink_tags' )
2233
+ $value = sanitize_title( $value );
2234
+ }
2235
+
2236
+ }
2237
  case 'select':
2238
  default:
2239
  $value = is_array( $value ) ? array_map( 'sanitize_text_field', $value ) : sanitize_text_field( $value );
2282
  if ( $field['type'] === 'multiple' ) {
2283
  if ( $field['fields'] ) {
2284
  foreach ( $field['fields'] as $subfield_id => $subfield ) {
2285
+ $args = $subfield;
2286
+ $args['setting_id'] = $setting_id;
2287
+ $args['field_id'] = $field_id;
2288
+ $args['subfield_id'] = $subfield_id;
2289
+
2290
  // if subfield has parent
2291
  if ( ! empty( $this->settings[$setting_id]['fields'][$field_id]['fields'][$subfield_id]['parent'] ) ) {
2292
  $field_parent = $this->settings[$setting_id]['fields'][$field_id]['fields'][$subfield_id]['parent'];
2293
 
2294
+ $input[$field_parent][$subfield_id] = isset( $input[$field_parent][$subfield_id] ) ? $this->sanitize_field( $input[$field_parent][$subfield_id], $subfield['type'], $args ) : ( $subfield['type'] === 'boolean' ? false : $rl->defaults[$setting_id][$field_parent][$subfield_id] );
2295
  } else {
2296
+ $input[$subfield_id] = isset( $input[$subfield_id] ) ? $this->sanitize_field( $input[$subfield_id], $subfield['type'], $args ) : ( $subfield['type'] === 'boolean' ? false : $rl->defaults[$setting_id][$field_id][$subfield_id] );
2297
  }
2298
  }
2299
  }
2300
  } else {
2301
+ $args = $field;
2302
+ $args['setting_id'] = $setting_id;
2303
+ $args['field_id'] = $field_id;
2304
+
2305
  // if field has parent
2306
  if ( ! empty( $this->settings[$setting_id]['fields'][$field_id]['parent'] ) ) {
2307
  $field_parent = $this->settings[$setting_id]['fields'][$field_id]['parent'];
2308
 
2309
+ $input[$field_parent][$field_id] = isset( $input[$field_parent][$field_id] ) ? ( $field['type'] === 'checkbox' ? array_keys( $this->sanitize_field( $input[$field_parent][$field_id], $field['type'], $args ) ) : $this->sanitize_field( $input[$field_parent][$field_id], $field['type'], $args ) ) : ( in_array( $field['type'], array( 'boolean', 'checkbox' ) ) ? false : $rl->defaults[$setting_id][$field_parent][$field_id] );
2310
  } else {
2311
+ $input[$field_id] = isset( $input[$field_id] ) ? ( $field['type'] === 'checkbox' ? array_keys( $this->sanitize_field( $input[$field_id], $field['type'], $args ) ) : $this->sanitize_field( $input[$field_id], $field['type'], $args ) ) : ( in_array( $field['type'], array( 'boolean', 'checkbox' ) ) ? false : $rl->defaults[$setting_id][$field_id] );
2312
  }
2313
  }
2314
  }
includes/providers/class-flickr.php CHANGED
@@ -256,7 +256,8 @@ class Responsive_Lightbox_Remote_Library_Flickr extends Responsive_Lightbox_Remo
256
  'thumbnail_orientation' => $small[2] > $small[1] ? 'portrait' : 'landscape',
257
  'media_provider' => 'flickr',
258
  'filename' => basename( $large[0] ),
259
- 'dimensions' => $large[1] . ' x ' . $large[2]
 
260
  ];
261
 
262
  // create thumbnail link
256
  'thumbnail_orientation' => $small[2] > $small[1] ? 'portrait' : 'landscape',
257
  'media_provider' => 'flickr',
258
  'filename' => basename( $large[0] ),
259
+ 'dimensions' => $large[1] . ' x ' . $large[2],
260
+ 'type' => 'image'
261
  ];
262
 
263
  // create thumbnail link
includes/providers/class-unsplash.php CHANGED
@@ -210,7 +210,8 @@ class Responsive_Lightbox_Remote_Library_Unsplash extends Responsive_Lightbox_Re
210
  'thumbnail_orientation' => $thumbnail_height > $thumbnail_width ? 'portrait' : 'landscape',
211
  'media_provider' => 'unsplash',
212
  'filename' => basename( $result['urls']['raw'] ),
213
- 'dimensions' => $width . ' x ' . $height
 
214
  ];
215
 
216
  // create thumbnail link
210
  'thumbnail_orientation' => $thumbnail_height > $thumbnail_width ? 'portrait' : 'landscape',
211
  'media_provider' => 'unsplash',
212
  'filename' => basename( $result['urls']['raw'] ),
213
+ 'dimensions' => $width . ' x ' . $height,
214
+ 'type' => 'image'
215
  ];
216
 
217
  // create thumbnail link
includes/providers/class-wikimedia.php CHANGED
@@ -259,6 +259,7 @@ class Responsive_Lightbox_Remote_Library_Wikimedia extends Responsive_Lightbox_R
259
  'media_provider' => 'wikimedia',
260
  'filename' => $result['name'],
261
  'dimensions' => $width . ' x ' . $height,
 
262
  ];
263
 
264
  // create thumbnail link
259
  'media_provider' => 'wikimedia',
260
  'filename' => $result['name'],
261
  'dimensions' => $width . ' x ' . $height,
262
+ 'type' => 'image'
263
  ];
264
 
265
  // create thumbnail link
js/admin-plugins.js CHANGED
@@ -56,7 +56,10 @@
56
 
57
  // change radio
58
  $( document ).on( 'change', 'input[name="rl_deactivation_option"]', function( e ) {
59
- if ( $( this ).val() === '6' )
 
 
 
60
  $( '.rl-deactivation-textarea textarea' ).prop( 'disabled', false );
61
  else
62
  $( '.rl-deactivation-textarea textarea' ).prop( 'disabled', true );
56
 
57
  // change radio
58
  $( document ).on( 'change', 'input[name="rl_deactivation_option"]', function( e ) {
59
+ var last = $( 'input[name="rl_deactivation_option"]' ).last().get( 0 );
60
+
61
+ // last element?
62
+ if ( $( this ).get( 0 ) === last )
63
  $( '.rl-deactivation-textarea textarea' ).prop( 'disabled', false );
64
  else
65
  $( '.rl-deactivation-textarea textarea' ).prop( 'disabled', true );
js/front.js CHANGED
@@ -54,6 +54,8 @@
54
 
55
  // any infinite galleries?
56
  if ( containers.length > 0 ) {
 
 
57
  for ( var i = 0; i < containers.length; i++ ) {
58
  var container = containers[i];
59
  var gallery = container.find( '.rl-gallery' );
@@ -61,39 +63,46 @@
61
  var galleryScrollType = container.find( '.rl-pagination-bottom' ).data( 'button' );
62
  var galleryButton = typeof galleryScrollType !== 'undefined' && galleryScrollType === 'manually';
63
 
 
 
 
 
 
 
 
64
  // initialize infinite scroll
65
- gallery.infiniteScroll( {
66
- path: '.rl-gallery-container[data-gallery_id="' + galleryId + '"] .rl-pagination-bottom .next',
67
- append: '.rl-gallery-container[data-gallery_id="' + galleryId + '"] .rl-gallery-item',
68
  status: false,
69
- hideNav: '.rl-gallery-container[data-gallery_id="' + galleryId + '"] .rl-pagination-bottom',
70
- prefill: ! galleryButton,
71
  loadOnScroll: true,
72
- scrollThreshold: galleryButton ? false : 400,
73
- button: galleryButton ? '.rl-gallery-container[data-gallery_id="' + galleryId + '"] .rl-load-more' : false,
74
- debug: true,
75
  history: false,
76
  responseBody: 'text',
77
  onInit: function() {
 
 
 
78
  // infinite with button?
79
- if ( container.hasClass( 'rl-pagination-infinite' ) && galleryButton ) {
80
  // remove loading class
81
- container.removeClass( 'rl-loading' );
82
  }
83
 
84
- // store gallery ID for append event
85
- var _galleryId = galleryId;
86
-
87
  // request event
88
  this.on( 'request', function() {
89
  // add loading class
90
- container.addClass( 'rl-loading' );
91
  } );
92
 
93
  // append event
94
  this.on( 'append', function( body, path, items, response ) {
95
  // remove loading class
96
- container.removeClass( 'rl-loading' );
97
 
98
  $.event.trigger( {
99
  type: 'doResponsiveLightbox',
@@ -101,10 +110,11 @@
101
  selector: rlArgs.selector,
102
  args: rlArgs,
103
  pagination_type: 'infinite',
104
- gallery_id: _galleryId,
105
- masonry: gallery.hasClass( 'rl-masonry-gallery' ) || gallery.hasClass( 'rl-basicmasonry-gallery' ),
 
106
  infinite: {
107
- gallery: gallery,
108
  body: body,
109
  items: items,
110
  response: response
@@ -179,11 +189,16 @@
179
 
180
  var script = event.script;
181
  var selector = event.selector;
182
- var args = event.args;
183
 
184
  if ( typeof script === 'undefined' || typeof selector === 'undefined' )
185
  return false;
186
 
 
 
 
 
 
 
187
  rl_view_image = function( script, url ) {
188
  $.event.trigger( {
189
  type: 'doLightboxViewImage',
@@ -252,7 +267,22 @@
252
  }
253
  }, 10 );
254
 
255
- // initialize lightbox
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  switch ( script ) {
257
  case 'swipebox':
258
  var slide = $( '#swipebox-overlay' ).find( '.slide.current' );
@@ -834,6 +864,6 @@
834
  }
835
  break;
836
  }
837
- } );
838
 
839
  } )( jQuery );
54
 
55
  // any infinite galleries?
56
  if ( containers.length > 0 ) {
57
+ var infArgs = [];
58
+
59
  for ( var i = 0; i < containers.length; i++ ) {
60
  var container = containers[i];
61
  var gallery = container.find( '.rl-gallery' );
63
  var galleryScrollType = container.find( '.rl-pagination-bottom' ).data( 'button' );
64
  var galleryButton = typeof galleryScrollType !== 'undefined' && galleryScrollType === 'manually';
65
 
66
+ infArgs[i] = {
67
+ container: container,
68
+ gallery: gallery,
69
+ galleryId: galleryId,
70
+ galleryButton: galleryButton
71
+ };
72
+
73
  // initialize infinite scroll
74
+ infArgs[i].gallery.infiniteScroll( {
75
+ path: '.rl-gallery-container[data-gallery_id="' + infArgs[i].galleryId + '"] .rl-pagination-bottom .next',
76
+ append: '.rl-gallery-container[data-gallery_id="' + infArgs[i].galleryId + '"] .rl-gallery-item',
77
  status: false,
78
+ hideNav: '.rl-gallery-container[data-gallery_id="' + infArgs[i].galleryId + '"] .rl-pagination-bottom',
79
+ prefill: ! infArgs[i].galleryButton,
80
  loadOnScroll: true,
81
+ scrollThreshold: infArgs[i].galleryButton ? false : 400,
82
+ button: infArgs[i].galleryButton ? '.rl-gallery-container[data-gallery_id="' + infArgs[i].galleryId + '"] .rl-load-more' : false,
83
+ debug: false,
84
  history: false,
85
  responseBody: 'text',
86
  onInit: function() {
87
+ // get current arguments
88
+ var args = infArgs[i];
89
+
90
  // infinite with button?
91
+ if ( args.container.hasClass( 'rl-pagination-infinite' ) && args.galleryButton ) {
92
  // remove loading class
93
+ args.container.removeClass( 'rl-loading' );
94
  }
95
 
 
 
 
96
  // request event
97
  this.on( 'request', function() {
98
  // add loading class
99
+ args.container.addClass( 'rl-loading' );
100
  } );
101
 
102
  // append event
103
  this.on( 'append', function( body, path, items, response ) {
104
  // remove loading class
105
+ args.container.removeClass( 'rl-loading' );
106
 
107
  $.event.trigger( {
108
  type: 'doResponsiveLightbox',
110
  selector: rlArgs.selector,
111
  args: rlArgs,
112
  pagination_type: 'infinite',
113
+ gallery_id: args.galleryId,
114
+ masonry: args.gallery.hasClass( 'rl-masonry-gallery' ) || args.gallery.hasClass( 'rl-basicmasonry-gallery' ),
115
+ delayLightbox: args.gallery.hasClass( 'rl-expander-gallery' ),
116
  infinite: {
117
+ gallery: args.gallery,
118
  body: body,
119
  items: items,
120
  response: response
189
 
190
  var script = event.script;
191
  var selector = event.selector;
 
192
 
193
  if ( typeof script === 'undefined' || typeof selector === 'undefined' )
194
  return false;
195
 
196
+ var args = event.args;
197
+ var delayLightbox = false;
198
+
199
+ if ( typeof event.delayLightbox !== 'undefined' && event.delayLightbox === true )
200
+ delayLightbox = true;
201
+
202
  rl_view_image = function( script, url ) {
203
  $.event.trigger( {
204
  type: 'doLightboxViewImage',
267
  }
268
  }, 10 );
269
 
270
+ if ( delayLightbox ) {
271
+ setTimeout( function() {
272
+ initLightbox( event );
273
+ }, 0 );
274
+ } else
275
+ initLightbox( event );
276
+ } );
277
+
278
+ /**
279
+ * Initialize lightbox script.
280
+ */
281
+ function initLightbox( event ) {
282
+ var script = event.script;
283
+ var selector = event.selector;
284
+ var args = event.args;
285
+
286
  switch ( script ) {
287
  case 'swipebox':
288
  var slide = $( '#swipebox-overlay' ).find( '.slide.current' );
864
  }
865
  break;
866
  }
867
+ }
868
 
869
  } )( jQuery );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dfactory
3
  Donate link: http://www.dfactory.eu/
4
  Tags: gallery, galleries, image, images, responsive, lightbox, photo, photography, masonry, video, builder
5
  Requires at least: 5.0
6
- Tested up to: 6.0
7
- Stable tag: 2.4.1
8
  Requires PHP: 5.4
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
@@ -140,6 +140,12 @@ Responsive Lightbox and Gallery plugin comes with many styles and effects alread
140
 
141
  == Changelog ==
142
 
 
 
 
 
 
 
143
  = 2.4.1 =
144
  * Fix: WooCommerce product gallery
145
  * Fix: WooCommerce gallery lightbox
@@ -496,6 +502,5 @@ Initial release
496
 
497
  == Upgrade Notice ==
498
 
499
- = 2.4.1 =
500
- * Fix: WooCommerce product gallery
501
- * Fix: WooCommerce gallery lightbox
3
  Donate link: http://www.dfactory.eu/
4
  Tags: gallery, galleries, image, images, responsive, lightbox, photo, photography, masonry, video, builder
5
  Requires at least: 5.0
6
+ Tested up to: 6.1
7
+ Stable tag: 2.4.2
8
  Requires PHP: 5.4
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
140
 
141
  == Changelog ==
142
 
143
+ = 2.4.2 =
144
+ * Fix: Potential XSS vulnerabilities related to settings validation
145
+ * Fix: Missing image alt attribute
146
+ * Fix: Undefined array key "type"
147
+ * Fix: Possible invalid data passed to attachment_url_to_postid function
148
+
149
  = 2.4.1 =
150
  * Fix: WooCommerce product gallery
151
  * Fix: WooCommerce gallery lightbox
502
 
503
  == Upgrade Notice ==
504
 
505
+ = 2.4.2 =
506
+ * Fix: Potential XSS vulnerabilities related to settings validation
 
responsive-lightbox.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Responsive Lightbox & Gallery
4
  Description: Responsive Lightbox & Gallery allows users to create galleries and view larger versions of images, galleries and videos in a lightbox (overlay) effect optimized for mobile devices.
5
- Version: 2.4.1
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
@@ -43,7 +43,7 @@ include_once( RESPONSIVE_LIGHTBOX_PATH . 'includes' . DIRECTORY_SEPARATOR . 'fun
43
  * Responsive Lightbox class.
44
  *
45
  * @class Responsive_Lightbox
46
- * @version 2.4.1
47
  */
48
  class Responsive_Lightbox {
49
 
@@ -304,7 +304,7 @@ class Responsive_Lightbox {
304
  'origin_left' => true,
305
  'origin_top' => true
306
  ],
307
- 'version' => '2.4.1',
308
  'activation_date' => ''
309
  ];
310
  public $options = [];
2
  /*
3
  Plugin Name: Responsive Lightbox & Gallery
4
  Description: Responsive Lightbox & Gallery allows users to create galleries and view larger versions of images, galleries and videos in a lightbox (overlay) effect optimized for mobile devices.
5
+ Version: 2.4.2
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
43
  * Responsive Lightbox class.
44
  *
45
  * @class Responsive_Lightbox
46
+ * @version 2.4.2
47
  */
48
  class Responsive_Lightbox {
49
 
304
  'origin_left' => true,
305
  'origin_top' => true
306
  ],
307
+ 'version' => '2.4.2',
308
  'activation_date' => ''
309
  ];
310
  public $options = [];