Photo Gallery by Envira – Responsive Image Gallery for WordPress - Version 1.6.1.5

Version Description

  • Fix: Minor bug fixes
Download this release

Release Info

Developer chrisakelley
Plugin Icon 128x128 Photo Gallery by Envira – Responsive Image Gallery for WordPress
Version 1.6.1.5
Comparing to
See all releases

Code changes from version 1.6.1.4 to 1.6.1.5

assets/css/justifiedGallery.css CHANGED
@@ -1,163 +1,6 @@
1
- .envira-js-desaturate, .envira-js-desaturate-hover:hover {
2
- filter: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feColorMatrix type="matrix" color-interpolation-filters="sRGB" values="0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0" /></filter></svg>#filter');
3
- -webkit-filter: grayscale(100%);
4
- filter: grayscale(100%);
5
- -webkit-backface-visibility: hidden;
6
- -webkit-transform:translate3d(0,0,0);
7
- }
8
- .envira-js-blur, .envira-js-blur:hover {
9
- filter: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feGaussianBlur stdDeviation="3" /></filter></svg>#filter');
10
- -webkit-filter: blur(3px);
11
- filter: blur(3px);
12
- filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=3);
13
- -webkit-backface-visibility: hidden;
14
- -webkit-transform:translate3d(0,0,0);
15
- }
16
- .envira-js-vintage, .envira-js-vintage:hover {
17
- filter: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feColorMatrix type="matrix" color-interpolation-filters="sRGB" values="0.5751000000000001 0.5383 0.1323 0 0 0.24429999999999996 0.7802000000000001 0.11760000000000001 0 0 0.1904 0.3738 0.39170000000000005 0 0 0 0 0 1 0" /><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="0.9" /><feFuncG type="linear" slope="0.9" /><feFuncB type="linear" slope="0.9" /></feComponentTransfer><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="1.3" intercept="-0.15000000000000002" /><feFuncG type="linear" slope="1.3" intercept="-0.15000000000000002" /><feFuncB type="linear" slope="1.3" intercept="-0.15000000000000002" /></feComponentTransfer></filter></svg>#filter');
18
- -webkit-filter: sepia(70%) brightness(90%) contrast(130%);
19
- filter: sepia(70%) brightness(90%) contrast(130%);
20
- -webkit-backface-visibility: hidden;
21
- -webkit-transform:translate3d(0,0,0);
22
- }
23
- .envira-js-threshold, .envira-js-threshold:hover {
24
- filter: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feColorMatrix type="matrix" color-interpolation-filters="sRGB" values="0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0" /><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="3" intercept="-1" /><feFuncG type="linear" slope="3" intercept="-1" /><feFuncB type="linear" slope="3" intercept="-1" /></feComponentTransfer><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="1.7" /><feFuncG type="linear" slope="1.7" /><feFuncB type="linear" slope="1.7" /></feComponentTransfer></filter></svg>#filter');
25
- -webkit-filter: grayscale(100%) contrast(300%) brightness(170%);
26
- filter: grayscale(100%) contrast(300%) brightness(170%);
27
- -webkit-backface-visibility: hidden;
28
- -webkit-transform:translate3d(0,0,0);
29
- }
30
- /*!
31
  * Justified Gallery - v3.6.2
32
  * http://miromannino.github.io/Justified-Gallery/
33
  * Copyright (c) 2016 Miro Mannino
34
  * Licensed under the MIT license.
35
- */
36
- .justified-gallery {
37
- width: 100%;
38
- position: relative;
39
- overflow: hidden;
40
- }
41
- .justified-gallery > div > div {
42
- position: absolute;
43
- display: inline-block;
44
- overflow: hidden;
45
- /* opacity: 0;
46
- filter: alpha(opacity=0); */
47
- /* IE8 or Earlier */
48
- }
49
- /*.justified-gallery > a > img,
50
- .justified-gallery > div > img,
51
- .justified-gallery > a > a > img,
52
- .justified-gallery > div > a > img,
53
- .justified-gallery > div > div > a > img,*/
54
- .justified-gallery > div > div > a > img,
55
- .justified-gallery > div > div > img,
56
- .justified-gallery > div > div > a > div.effect-wrapper > img {
57
- position: absolute;
58
- top: 50%;
59
- left: 50%;
60
- margin: 0;
61
- padding: 0;
62
- border: none;
63
- }
64
- .justified-gallery > div > div > a > .caption,
65
- .justified-gallery > div > div > .caption,
66
- .justified-gallery > div > div .caption {
67
- display: none;
68
- position: absolute;
69
- bottom: 0;
70
- padding: 5px;
71
- background-color: #000000;
72
- left: 0;
73
- right: 0;
74
- margin: 0;
75
- color: white;
76
- font-size: 12px;
77
- font-weight: 300;
78
- font-family: sans-serif;
79
- z-index: 2;
80
- }
81
- .justified-gallery > div > div > a > .caption.caption-visible,
82
- .justified-gallery > div > div > .caption.caption-visible,
83
- .justified-gallery > div > .caption.caption-visible {
84
- display: initial;
85
- opacity: 0.7;
86
- filter: "alpha(opacity=70)";
87
- /* IE8 or Earlier */
88
- -webkit-transition: opacity 500ms ease-in;
89
- -moz-transition: opacity 500ms ease-in;
90
- -o-transition: opacity 500ms ease-in;
91
- transition: opacity 500ms ease-in;
92
- }
93
-
94
- .justified-gallery > div > div > a > .envira-exif,
95
- .justified-gallery > div > div > .envira-exif,
96
- .justified-gallery > div > div .envira-exif {
97
- display: none;
98
- opacity: 0.8;
99
- position: absolute;
100
- top: 0;
101
- padding: 5px;
102
- background: rgba(255,255,255,0.7);
103
- left: 0;
104
- right: 0;
105
- margin: 0;
106
- color: black;
107
- font-size: 10px;
108
- font-weight: 300;
109
- font-family: sans-serif;
110
- }
111
- .justified-gallery > div > div > a > .envira-exif.exif-visible,
112
- .justified-gallery > div > .envira-exif.exif-visible {
113
- display: initial;
114
- opacity: 0.7;
115
- filter: "alpha(opacity=70)";
116
- /* IE8 or Earlier */
117
- -webkit-transition: opacity 500ms ease-in;
118
- -moz-transition: opacity 500ms ease-in;
119
- -o-transition: opacity 500ms ease-in;
120
- transition: opacity 500ms ease-in;
121
- }
122
-
123
-
124
-
125
-
126
-
127
-
128
- .justified-gallery > .entry-visible {
129
- opacity: 1.0;
130
- filter: alpha(opacity=100);
131
- /* IE8 or Earlier */
132
- -webkit-transition: opacity 500ms ease-in;
133
- -moz-transition: opacity 500ms ease-in;
134
- -o-transition: opacity 500ms ease-in;
135
- transition: opacity 500ms ease-in;
136
- }
137
- .justified-gallery > .jg-filtered {
138
- display: none;
139
- }
140
- .justified-gallery > .spinner {
141
- position: absolute;
142
- bottom: 0;
143
- margin-left: -24px;
144
- padding: 10px 0 10px 0;
145
- left: 50%;
146
- opacity: initial;
147
- filter: initial;
148
- overflow: initial;
149
- }
150
- .justified-gallery > .spinner > span {
151
- display: inline-block;
152
- opacity: 0;
153
- filter: alpha(opacity=0);
154
- /* IE8 or Earlier */
155
- width: 8px;
156
- height: 8px;
157
- margin: 0 4px 0 4px;
158
- background-color: #000;
159
- border-top-left-radius: 6px;
160
- border-top-right-radius: 6px;
161
- border-bottom-right-radius: 6px;
162
- border-bottom-left-radius: 6px;
163
- }
1
+ .envira-js-desaturate,.envira-js-desaturate-hover:hover{filter:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feColorMatrix type="matrix" color-interpolation-filters="sRGB" values="0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0" /></filter></svg>#filter');-webkit-filter:grayscale(100%);filter:grayscale(100%);-webkit-backface-visibility:hidden;-webkit-transform:translate3d(0, 0, 0)}.envira-js-blur,.envira-js-blur:hover{filter:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feGaussianBlur stdDeviation="3" /></filter></svg>#filter');-webkit-filter:blur(3px);filter:blur(3px);filter:progid:DXImageTransform.Microsoft.Blur(pixelradius=3);-webkit-backface-visibility:hidden;-webkit-transform:translate3d(0, 0, 0)}.envira-js-vintage,.envira-js-vintage:hover{filter:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feColorMatrix type="matrix" color-interpolation-filters="sRGB" values="0.5751000000000001 0.5383 0.1323 0 0 0.24429999999999996 0.7802000000000001 0.11760000000000001 0 0 0.1904 0.3738 0.39170000000000005 0 0 0 0 0 1 0" /><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="0.9" /><feFuncG type="linear" slope="0.9" /><feFuncB type="linear" slope="0.9" /></feComponentTransfer><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="1.3" intercept="-0.15000000000000002" /><feFuncG type="linear" slope="1.3" intercept="-0.15000000000000002" /><feFuncB type="linear" slope="1.3" intercept="-0.15000000000000002" /></feComponentTransfer></filter></svg>#filter');-webkit-filter:sepia(70%) brightness(90%) contrast(130%);filter:sepia(70%) brightness(90%) contrast(130%);-webkit-backface-visibility:hidden;-webkit-transform:translate3d(0, 0, 0)}.envira-js-threshold,.envira-js-threshold:hover{filter:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feColorMatrix type="matrix" color-interpolation-filters="sRGB" values="0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0" /><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="3" intercept="-1" /><feFuncG type="linear" slope="3" intercept="-1" /><feFuncB type="linear" slope="3" intercept="-1" /></feComponentTransfer><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="1.7" /><feFuncG type="linear" slope="1.7" /><feFuncB type="linear" slope="1.7" /></feComponentTransfer></filter></svg>#filter');-webkit-filter:grayscale(100%) contrast(300%) brightness(170%);filter:grayscale(100%) contrast(300%) brightness(170%);-webkit-backface-visibility:hidden;-webkit-transform:translate3d(0, 0, 0)}/*!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  * Justified Gallery - v3.6.2
3
  * http://miromannino.github.io/Justified-Gallery/
4
  * Copyright (c) 2016 Miro Mannino
5
  * Licensed under the MIT license.
6
+ */.justified-gallery{width:100%;position:relative;overflow:hidden}.justified-gallery>div>div{position:absolute;display:inline-block;overflow:hidden}.justified-gallery>div>div>a>img,.justified-gallery>div>div>img,.justified-gallery>div>div>a>div.effect-wrapper>img{position:absolute;top:50%;left:50%;margin:0;padding:0;border:none}.justified-gallery>div>div>a>.caption,.justified-gallery>div>div>.caption,.justified-gallery>div>div .caption{display:none;position:absolute;bottom:0;padding:5px;background-color:#000000;left:0;right:0;margin:0;color:white;font-size:12px;font-weight:300;font-family:sans-serif;z-index:2}.justified-gallery>div>div>a>.caption.caption-visible,.justified-gallery>div>div>.caption.caption-visible,.justified-gallery>div>.caption.caption-visible{display:initial;opacity:0.7;filter:"alpha(opacity=70)";-webkit-transition:opacity 500ms ease-in;-moz-transition:opacity 500ms ease-in;-o-transition:opacity 500ms ease-in;transition:opacity 500ms ease-in}.justified-gallery>div>div>a>.envira-exif,.justified-gallery>div>div>.envira-exif,.justified-gallery>div>div .envira-exif{display:none;opacity:0.8;position:absolute;top:0;padding:5px;background:rgba(255,255,255,0.7);left:0;right:0;margin:0;color:black;font-size:10px;font-weight:300;font-family:sans-serif}.justified-gallery>div>div>a>.envira-exif.exif-visible,.justified-gallery>div>.envira-exif.exif-visible{display:initial;opacity:0.7;filter:"alpha(opacity=70)";-webkit-transition:opacity 500ms ease-in;-moz-transition:opacity 500ms ease-in;-o-transition:opacity 500ms ease-in;transition:opacity 500ms ease-in}.justified-gallery>.entry-visible{opacity:1.0;filter:alpha(opacity=100);-webkit-transition:opacity 500ms ease-in;-moz-transition:opacity 500ms ease-in;-o-transition:opacity 500ms ease-in;transition:opacity 500ms ease-in}.justified-gallery>.jg-filtered{display:none}.justified-gallery>.spinner{position:absolute;bottom:0;margin-left:-24px;padding:10px 0 10px 0;left:50%;opacity:initial;filter:initial;overflow:initial}.justified-gallery>.spinner>span{display:inline-block;opacity:0;filter:alpha(opacity=0);width:8px;height:8px;margin:0 4px 0 4px;background-color:#000;border-top-left-radius:6px;border-top-right-radius:6px;border-bottom-right-radius:6px;border-bottom-left-radius:6px}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/envira.js CHANGED
@@ -77,30 +77,13 @@ jQuery( document ).ready( function( $ ) {
77
  }
78
  );
79
 
80
-
81
-
82
- /* window["envira_container_" + event.gallery_id].enviratope('layout'); */
83
-
84
  }
85
 
86
 
87
  $('#envira-gallery-' + event.gallery_id).enviratope('layout');
88
 
89
- /* window["envira_container_" + event.gallery_id].enviratope('layout'); */
90
  }
91
 
92
-
93
- // window["envira_container_" + event.gallery_id].enviraImagesLoaded()
94
- // .done(function() {
95
- // window["envira_container_" + event.gallery_id].enviratope('layout');
96
- // })
97
- // .progress(function() {
98
- // window["envira_container_" + event.gallery_id].enviratope('layout');
99
- // });
100
-
101
-
102
-
103
- /* envira_container_8025.enviratope('layout'); */
104
  }
105
  });
106
 
77
  }
78
  );
79
 
 
 
 
 
80
  }
81
 
82
 
83
  $('#envira-gallery-' + event.gallery_id).enviratope('layout');
84
 
 
85
  }
86
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  }
88
  });
89
 
assets/js/lib/responsivelyLazy.js CHANGED
@@ -20,9 +20,6 @@ var responsivelyLazy = (function () {
20
 
21
  var isVisible = function (element) {
22
 
23
- // //console.log ('windowWidth: ' + windowWidth);
24
- // //console.log ('windowHeight: ' + windowHeight);
25
-
26
  if (windowWidth === null) {
27
 
28
  windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
@@ -33,31 +30,16 @@ var responsivelyLazy = (function () {
33
  }
34
  }
35
 
36
- //console.log ('checking to see if element is isVisible');
37
- // //console.log (element);
38
-
39
  var rect = element.getBoundingClientRect();
40
 
41
  var elementTop = rect.top;
42
  var elementLeft = rect.left;
43
  var elementWidth = rect.width;
44
  var elementHeight = rect.height;
45
- // //console.log ('elementTop: ' + elementTop);
46
- // //console.log ('elementLeft: ' + elementLeft);
47
- // //console.log ('elementWidth: ' + elementWidth);
48
- // //console.log ('elementHeight: ' + elementHeight);
49
  var test = elementTop < windowHeight && elementTop + elementHeight > 0 && elementLeft < windowWidth && elementLeft + elementWidth > 0;
50
- // //console.log ('test');
51
- // //console.log (test);
52
 
53
  if ( test === false ) {
54
- // //console.log (element);
55
- // //console.log ('windowWidth: ' + windowWidth);
56
- // //console.log ('windowHeight: ' + windowHeight);
57
- // //console.log ('elementTop: ' + elementTop);
58
- // //console.log ('elementLeft: ' + elementLeft);
59
- // //console.log ('elementWidth: ' + elementWidth);
60
- // //console.log ('elementHeight: ' + elementHeight);
61
  }
62
  return test;
63
 
@@ -68,7 +50,6 @@ var responsivelyLazy = (function () {
68
 
69
  var updateElement = function (container, element) {
70
  var options = element.getAttribute('data-envira-srcset');
71
- // console.log ('options (what data-envira-srcset says): ' + options);
72
  if (options !== null) {
73
  options = options.trim();
74
  if (options.length > 0) {
@@ -132,7 +113,6 @@ var responsivelyLazy = (function () {
132
  for (var j = 0; j < optionsCount; j++) {
133
  var optionData = options[j];
134
  if (optionData[1] >= containerWidth) {
135
- //console.log( 'bestSelectedOption = ' + optionData );
136
  bestSelectedOption = optionData;
137
  break;
138
  } else {
@@ -148,10 +128,6 @@ var responsivelyLazy = (function () {
148
  container.lastSetOption = ['', 0];
149
  }
150
  if (container.lastSetOption[1] < bestSelectedOption[1]) {
151
- //console.log ('listing all bestSelectedOptions');
152
- //console.log ( bestSelectedOption );
153
- //console.log ('listing all container.lastSetOption');
154
- //console.log ( container.lastSetOption );
155
  var fireEvent = container.lastSetOption[1] === 0;
156
  var url = bestSelectedOption[0];
157
  var image = new Image();
@@ -171,9 +147,6 @@ var responsivelyLazy = (function () {
171
 
172
  image.onload = function () {
173
 
174
-
175
- /* console.info("Image loaded !"); */
176
-
177
  if ( container.getAttribute('class') == 'envira-lazy' ) {
178
  // this is a legacy layout
179
  var the_image = container.firstElementChild;
@@ -228,13 +201,10 @@ var responsivelyLazy = (function () {
228
 
229
  windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
230
  windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
231
-
232
- //console.log('updateWindowSize');
233
  };
234
 
235
  var setGalleryClass = function ( theClass ) {
236
  galleryClass = theClass;
237
- // alert ('setting - ' + galleryClass);
238
  }
239
 
240
  var run = function ( galleryClass ) {
@@ -244,22 +214,11 @@ var responsivelyLazy = (function () {
244
  }
245
 
246
  var update = function (elements, unknownHeight) {
247
- // //console.log ('elements'); alert('elements');
248
- // //console.log (elements);
249
- // //console.log ('unknownHeight');
250
- // //console.log (unknownHeight);
251
  var elementsCount = elements.length;
252
  for (var i = 0; i < elementsCount; i++) {
253
  var element = elements[i];
254
  var container = unknownHeight ? element : element.parentNode;
255
- // //console.log( isVisible(container) );
256
- // //console.log( (container) );
257
- // //console.log( (elements[i]) );
258
  if ( isVisible(container) === true ) {
259
- // console.log('updating element');
260
- // console.log(element);
261
- // console.log('container')
262
- // console.log(container
263
  updateElement(container, element);
264
  }
265
  }
@@ -269,9 +228,6 @@ var responsivelyLazy = (function () {
269
  return;
270
  }
271
 
272
- // console.log(envira_lazy_load_delay);
273
- // console.log(envira_lazy_load_initial);
274
-
275
  if ( envira_lazy_load_delay === 'undefined' || envira_lazy_load_initial === false || envira_lazy_load_initial === 'undefined' ) {
276
  /* if we can't locate these vars, at least define the delay - there is no delay, super fast */
277
  envira_lazy_load_delay = 0;
@@ -279,7 +235,6 @@ var responsivelyLazy = (function () {
279
 
280
 
281
  myVar = setTimeout(function () {
282
- // console.log('fired');
283
 
284
  if ( jQuery( galleryClass + ' .envira-lazy > img').exists() ) {
285
  //console.log('exists');
@@ -345,12 +300,10 @@ var responsivelyLazy = (function () {
345
 
346
  var requestAnimationFrameFunction = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
347
  window.setTimeout(callback, 1000 / 60);
348
- //console.log ('requestAnimationFrameFunction');
349
  };
350
 
351
  var hasChange = true;
352
  var runIfHasChange = function () {
353
- // //console.log (justifiedReady);
354
  if ( hasChange ) {
355
  hasChange = false;
356
  // run();
@@ -367,7 +320,6 @@ var responsivelyLazy = (function () {
367
  };
368
 
369
  var updateParentNodesScrollListeners = function () {
370
- //console.log('scroll listen');
371
  var elements = document.querySelectorAll('.envira-lazy');
372
  var elementsCount = elements.length;
373
  for (var i = 0; i < elementsCount; i++) {
@@ -382,8 +334,6 @@ var responsivelyLazy = (function () {
382
  }
383
  };
384
 
385
- //runIfHasChange();
386
-
387
  }
388
 
389
  var attachEvents = function () {
20
 
21
  var isVisible = function (element) {
22
 
 
 
 
23
  if (windowWidth === null) {
24
 
25
  windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
30
  }
31
  }
32
 
 
 
 
33
  var rect = element.getBoundingClientRect();
34
 
35
  var elementTop = rect.top;
36
  var elementLeft = rect.left;
37
  var elementWidth = rect.width;
38
  var elementHeight = rect.height;
 
 
 
 
39
  var test = elementTop < windowHeight && elementTop + elementHeight > 0 && elementLeft < windowWidth && elementLeft + elementWidth > 0;
 
 
40
 
41
  if ( test === false ) {
42
+
 
 
 
 
 
 
43
  }
44
  return test;
45
 
50
 
51
  var updateElement = function (container, element) {
52
  var options = element.getAttribute('data-envira-srcset');
 
53
  if (options !== null) {
54
  options = options.trim();
55
  if (options.length > 0) {
113
  for (var j = 0; j < optionsCount; j++) {
114
  var optionData = options[j];
115
  if (optionData[1] >= containerWidth) {
 
116
  bestSelectedOption = optionData;
117
  break;
118
  } else {
128
  container.lastSetOption = ['', 0];
129
  }
130
  if (container.lastSetOption[1] < bestSelectedOption[1]) {
 
 
 
 
131
  var fireEvent = container.lastSetOption[1] === 0;
132
  var url = bestSelectedOption[0];
133
  var image = new Image();
147
 
148
  image.onload = function () {
149
 
 
 
 
150
  if ( container.getAttribute('class') == 'envira-lazy' ) {
151
  // this is a legacy layout
152
  var the_image = container.firstElementChild;
201
 
202
  windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
203
  windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
 
 
204
  };
205
 
206
  var setGalleryClass = function ( theClass ) {
207
  galleryClass = theClass;
 
208
  }
209
 
210
  var run = function ( galleryClass ) {
214
  }
215
 
216
  var update = function (elements, unknownHeight) {
 
 
 
 
217
  var elementsCount = elements.length;
218
  for (var i = 0; i < elementsCount; i++) {
219
  var element = elements[i];
220
  var container = unknownHeight ? element : element.parentNode;
 
 
 
221
  if ( isVisible(container) === true ) {
 
 
 
 
222
  updateElement(container, element);
223
  }
224
  }
228
  return;
229
  }
230
 
 
 
 
231
  if ( envira_lazy_load_delay === 'undefined' || envira_lazy_load_initial === false || envira_lazy_load_initial === 'undefined' ) {
232
  /* if we can't locate these vars, at least define the delay - there is no delay, super fast */
233
  envira_lazy_load_delay = 0;
235
 
236
 
237
  myVar = setTimeout(function () {
 
238
 
239
  if ( jQuery( galleryClass + ' .envira-lazy > img').exists() ) {
240
  //console.log('exists');
300
 
301
  var requestAnimationFrameFunction = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
302
  window.setTimeout(callback, 1000 / 60);
 
303
  };
304
 
305
  var hasChange = true;
306
  var runIfHasChange = function () {
 
307
  if ( hasChange ) {
308
  hasChange = false;
309
  // run();
320
  };
321
 
322
  var updateParentNodesScrollListeners = function () {
 
323
  var elements = document.querySelectorAll('.envira-lazy');
324
  var elementsCount = elements.length;
325
  for (var i = 0; i < elementsCount; i++) {
334
  }
335
  };
336
 
 
 
337
  }
338
 
339
  var attachEvents = function () {
envira-gallery-lite.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
6
  * Author: Envira Gallery Team
7
  * Author URI: http://enviragallery.com
8
- * Version: 1.6.1.4
9
  * Text Domain: envira-gallery
10
  *
11
  * Envira Gallery is free software: you can redistribute it and/or modify
@@ -53,7 +53,7 @@ class Envira_Gallery_Lite {
53
  *
54
  * @var string
55
  */
56
- public $version = '1.6.1.4';
57
 
58
  /**
59
  * The name of the plugin.
@@ -507,6 +507,9 @@ function envira_gallery_lite_activation_hook( $network_wide ) {
507
  wp_die( sprintf( __( 'Sorry, but your version of WordPress does not meet Envira Gallery\'s required version of <strong>4.0</strong> to run properly. The plugin has been deactivated. <a href="%s">Click here to return to the Dashboard</a>.', 'envira-gallery' ), get_admin_url() ) );
508
  }
509
 
 
 
 
510
  }
511
 
512
  // Load the main plugin class.
5
  * Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
6
  * Author: Envira Gallery Team
7
  * Author URI: http://enviragallery.com
8
+ * Version: 1.6.1.5
9
  * Text Domain: envira-gallery
10
  *
11
  * Envira Gallery is free software: you can redistribute it and/or modify
53
  *
54
  * @var string
55
  */
56
+ public $version = '1.6.1.5';
57
 
58
  /**
59
  * The name of the plugin.
507
  wp_die( sprintf( __( 'Sorry, but your version of WordPress does not meet Envira Gallery\'s required version of <strong>4.0</strong> to run properly. The plugin has been deactivated. <a href="%s">Click here to return to the Dashboard</a>.', 'envira-gallery' ), get_admin_url() ) );
508
  }
509
 
510
+ // Make sure Envira Pro plugin, if activated is deactivated
511
+ deactivate_plugins( 'envira-gallery/envira-gallery.php' );
512
+
513
  }
514
 
515
  // Load the main plugin class.
includes/admin/media-view.php CHANGED
@@ -279,6 +279,15 @@ class Envira_Gallery_Media_View {
279
  </span>
280
  </label>
281
 
 
 
 
 
 
 
 
 
 
282
  <!-- Addons can populate the UI here -->
283
  <div class="envira-addons"></div>
284
  </div>
279
  </span>
280
  </label>
281
 
282
+ <!-- Link in New Window -->
283
+ <label class="setting">
284
+ <span class="name"><?php _e( 'Open URL in New Window?', 'envira-gallery' ); ?></span>
285
+ <span class="description">
286
+ <input type="checkbox" name="link_new_window" value="1"<# if ( data.link_new_window == '1' ) { #> checked <# } #> />
287
+ <?php _e( 'Opens your image links in a new browser window / tab.', 'envira-gallery' ); ?>
288
+ </span>
289
+ </label>
290
+
291
  <!-- Addons can populate the UI here -->
292
  <div class="envira-addons"></div>
293
  </div>
includes/global/shortcode.php CHANGED
@@ -380,8 +380,11 @@ class Envira_Gallery_Shortcode {
380
  $create_link = false;
381
  }
382
 
 
 
 
383
  if ( $create_link ) {
384
- $output .= '<a href="' . esc_url( $item['link'] ) . '" class="envira-gallery-' . sanitize_html_class( $data['id'] ) . ' envira-gallery-link" ' . $html5_attribute . '="enviragallery' . sanitize_html_class( $data['id'] ) . '" title="' . $title . '" data-envira-caption="' . $caption . '" data-envira-retina="' . ( isset( $item['lightbox_retina_image'] ) ? $item['lightbox_retina_image'] : '' ) . '" data-thumbnail="' . esc_url( $item['thumb'] ) . '"' . ( ( isset($item['link_new_window']) && $item['link_new_window'] == 1 ) ? ' target="_blank"' : '' ) . ' ' . apply_filters( 'envira_gallery_output_link_attr', '', $id, $item, $data, $i ) . ' itemprop="contentUrl">';
385
  }
386
 
387
 
380
  $create_link = false;
381
  }
382
 
383
+ // Filter the ability to create a link
384
+ $create_link = apply_filters( 'envira_gallery_create_link', $create_link, $data, $id, $item, $i, $this->is_mobile );
385
+
386
  if ( $create_link ) {
387
+ $output .= '<a href="' . esc_url( $item['link'] ) . '" class="' . ( ( isset($item['link_new_window']) && $item['link_new_window'] == 1 ) ? '' : 'envira-gallery-' . sanitize_html_class( $data['id'] ) . ' ' ) . 'envira-gallery-link" ' . $html5_attribute . '="enviragallery' . sanitize_html_class( $data['id'] ) . '" title="' . $title . '" data-envira-caption="' . $caption . '" data-envira-retina="' . ( isset( $item['lightbox_retina_image'] ) ? $item['lightbox_retina_image'] : '' ) . '" data-thumbnail="' . esc_url( $item['thumb'] ) . '"' . ( ( isset($item['link_new_window']) && $item['link_new_window'] == 1 ) ? ' target="_blank"' : '' ) . ' ' . apply_filters( 'envira_gallery_output_link_attr', '', $id, $item, $data, $i ) . ' itemprop="contentUrl">';
388
  }
389
 
390
 
readme.txt CHANGED
@@ -229,6 +229,14 @@ Also, I'm an <a href="https://thomasgriffin.io" rel="me" title="WordPress Develo
229
 
230
  == Changelog ==
231
 
 
 
 
 
 
 
 
 
232
  = 1.6.1.3 =
233
 
234
  * Fix: Compress CSS files.
@@ -249,12 +257,12 @@ Also, I'm an <a href="https://thomasgriffin.io" rel="me" title="WordPress Develo
249
 
250
  = 1.6.0 =
251
 
252
- * Added: Lazy loading
253
  * Fix: Minor bug fixes
254
 
255
  = 1.5.6.4 =
256
 
257
- * Fix: CSS issues TwentySeventeen
258
  * Fix: Minor bug fixes.
259
 
260
  = 1.5.6.3 =
229
 
230
  == Changelog ==
231
 
232
+ = 1.6.1.5 =
233
+
234
+ * Fix: Minor bug fixes
235
+
236
+ = 1.6.1.4 =
237
+
238
+ * Fix: Minor bug fixes
239
+
240
  = 1.6.1.3 =
241
 
242
  * Fix: Compress CSS files.
257
 
258
  = 1.6.0 =
259
 
260
+ * Added: Lazy loading
261
  * Fix: Minor bug fixes
262
 
263
  = 1.5.6.4 =
264
 
265
+ * Fix: CSS issues TwentySeventeen
266
  * Fix: Minor bug fixes.
267
 
268
  = 1.5.6.3 =