Lazy Load by WP Rocket - Version 2.3

Version Description

Enhancement: Add support for browser native lazyload Bugfix: Prevent broken image in some cases for picture element Bugfix: Prevent wrong lazy attributes for srcset and sizes on an image inside a picture element

Download this release

Release Info

Developer wp_media
Plugin Icon 128x128 Lazy Load by WP Rocket
Version 2.3
Comparing to
See all releases

Code changes from version 2.2.3 to 2.3

assets/js/12.0/lazyload.js ADDED
@@ -0,0 +1,491 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ (function (global, factory) {
6
+ (typeof exports === "undefined" ? "undefined" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.LazyLoad = factory();
7
+ })(this, function () {
8
+ 'use strict';
9
+
10
+ var runningOnBrowser = typeof window !== "undefined";
11
+ var isBot = runningOnBrowser && !("onscroll" in window) || typeof navigator !== "undefined" && /(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent);
12
+ var supportsIntersectionObserver = runningOnBrowser && "IntersectionObserver" in window;
13
+ var supportsClassList = runningOnBrowser && "classList" in document.createElement("p");
14
+ var defaultSettings = {
15
+ elements_selector: "img",
16
+ container: isBot || runningOnBrowser ? document : null,
17
+ threshold: 300,
18
+ thresholds: null,
19
+ data_src: "src",
20
+ data_srcset: "srcset",
21
+ data_sizes: "sizes",
22
+ data_bg: "bg",
23
+ class_loading: "loading",
24
+ class_loaded: "loaded",
25
+ class_error: "error",
26
+ load_delay: 0,
27
+ auto_unobserve: true,
28
+ callback_enter: null,
29
+ callback_exit: null,
30
+ callback_reveal: null,
31
+ callback_loaded: null,
32
+ callback_error: null,
33
+ callback_finish: null,
34
+ use_native: false
35
+ };
36
+
37
+ var getInstanceSettings = function getInstanceSettings(customSettings) {
38
+ return _extends({}, defaultSettings, customSettings);
39
+ };
40
+ /* Creates instance and notifies it through the window element */
41
+
42
+
43
+ var createInstance = function createInstance(classObj, options) {
44
+ var event;
45
+ var eventString = "LazyLoad::Initialized";
46
+ var instance = new classObj(options);
47
+
48
+ try {
49
+ // Works in modern browsers
50
+ event = new CustomEvent(eventString, {
51
+ detail: {
52
+ instance: instance
53
+ }
54
+ });
55
+ } catch (err) {
56
+ // Works in Internet Explorer (all versions)
57
+ event = document.createEvent("CustomEvent");
58
+ event.initCustomEvent(eventString, false, false, {
59
+ instance: instance
60
+ });
61
+ }
62
+
63
+ window.dispatchEvent(event);
64
+ };
65
+ /* Auto initialization of one or more instances of lazyload, depending on the
66
+ options passed in (plain object or an array) */
67
+
68
+
69
+ function autoInitialize(classObj, options) {
70
+ if (!options) {
71
+ return;
72
+ }
73
+
74
+ if (!options.length) {
75
+ // Plain object
76
+ createInstance(classObj, options);
77
+ } else {
78
+ // Array of objects
79
+ for (var i = 0, optionsItem; optionsItem = options[i]; i += 1) {
80
+ createInstance(classObj, optionsItem);
81
+ }
82
+ }
83
+ }
84
+
85
+ var dataPrefix = "data-";
86
+ var processedDataName = "was-processed";
87
+ var timeoutDataName = "ll-timeout";
88
+ var trueString = "true";
89
+
90
+ var getData = function getData(element, attribute) {
91
+ return element.getAttribute(dataPrefix + attribute);
92
+ };
93
+
94
+ var setData = function setData(element, attribute, value) {
95
+ var attrName = dataPrefix + attribute;
96
+
97
+ if (value === null) {
98
+ element.removeAttribute(attrName);
99
+ return;
100
+ }
101
+
102
+ element.setAttribute(attrName, value);
103
+ };
104
+
105
+ var setWasProcessedData = function setWasProcessedData(element) {
106
+ return setData(element, processedDataName, trueString);
107
+ };
108
+
109
+ var getWasProcessedData = function getWasProcessedData(element) {
110
+ return getData(element, processedDataName) === trueString;
111
+ };
112
+
113
+ var setTimeoutData = function setTimeoutData(element, value) {
114
+ return setData(element, timeoutDataName, value);
115
+ };
116
+
117
+ var getTimeoutData = function getTimeoutData(element) {
118
+ return getData(element, timeoutDataName);
119
+ };
120
+
121
+ var purgeProcessedElements = function purgeProcessedElements(elements) {
122
+ return elements.filter(function (element) {
123
+ return !getWasProcessedData(element);
124
+ });
125
+ };
126
+
127
+ var purgeOneElement = function purgeOneElement(elements, elementToPurge) {
128
+ return elements.filter(function (element) {
129
+ return element !== elementToPurge;
130
+ });
131
+ };
132
+
133
+ var callbackIfSet = function callbackIfSet(callback, argument) {
134
+ if (callback) {
135
+ callback(argument);
136
+ }
137
+ };
138
+
139
+ var updateLoadingCount = function updateLoadingCount(instance, plusMinus) {
140
+ instance._loadingCount += plusMinus;
141
+
142
+ if (instance._elements.length === 0 && instance._loadingCount === 0) {
143
+ callbackIfSet(instance._settings.callback_finish);
144
+ }
145
+ };
146
+
147
+ var getSourceTags = function getSourceTags(parentTag) {
148
+ var sourceTags = [];
149
+
150
+ for (var i = 0, childTag; childTag = parentTag.children[i]; i += 1) {
151
+ if (childTag.tagName === "SOURCE") {
152
+ sourceTags.push(childTag);
153
+ }
154
+ }
155
+
156
+ return sourceTags;
157
+ };
158
+
159
+ var setAttributeIfValue = function setAttributeIfValue(element, attrName, value) {
160
+ if (!value) {
161
+ return;
162
+ }
163
+
164
+ element.setAttribute(attrName, value);
165
+ };
166
+
167
+ var setImageAttributes = function setImageAttributes(element, settings) {
168
+ setAttributeIfValue(element, "sizes", getData(element, settings.data_sizes));
169
+ setAttributeIfValue(element, "srcset", getData(element, settings.data_srcset));
170
+ setAttributeIfValue(element, "src", getData(element, settings.data_src));
171
+ };
172
+
173
+ var setSourcesImg = function setSourcesImg(element, settings) {
174
+ var parent = element.parentNode;
175
+
176
+ if (parent && parent.tagName === "PICTURE") {
177
+ var sourceTags = getSourceTags(parent);
178
+ sourceTags.forEach(function (sourceTag) {
179
+ setImageAttributes(sourceTag, settings);
180
+ });
181
+ }
182
+
183
+ setImageAttributes(element, settings);
184
+ };
185
+
186
+ var setSourcesIframe = function setSourcesIframe(element, settings) {
187
+ setAttributeIfValue(element, "src", getData(element, settings.data_src));
188
+ };
189
+
190
+ var setSourcesVideo = function setSourcesVideo(element, settings) {
191
+ var sourceTags = getSourceTags(element);
192
+ sourceTags.forEach(function (sourceTag) {
193
+ setAttributeIfValue(sourceTag, "src", getData(sourceTag, settings.data_src));
194
+ });
195
+ setAttributeIfValue(element, "src", getData(element, settings.data_src));
196
+ element.load();
197
+ };
198
+
199
+ var setSourcesBgImage = function setSourcesBgImage(element, settings) {
200
+ var srcDataValue = getData(element, settings.data_src);
201
+ var bgDataValue = getData(element, settings.data_bg);
202
+
203
+ if (srcDataValue) {
204
+ element.style.backgroundImage = "url(\"".concat(srcDataValue, "\")");
205
+ }
206
+
207
+ if (bgDataValue) {
208
+ element.style.backgroundImage = bgDataValue;
209
+ }
210
+ };
211
+
212
+ var setSourcesFunctions = {
213
+ IMG: setSourcesImg,
214
+ IFRAME: setSourcesIframe,
215
+ VIDEO: setSourcesVideo
216
+ };
217
+
218
+ var setSources = function setSources(element, instance) {
219
+ var settings = instance._settings;
220
+ var tagName = element.tagName;
221
+ var setSourcesFunction = setSourcesFunctions[tagName];
222
+
223
+ if (setSourcesFunction) {
224
+ setSourcesFunction(element, settings);
225
+ updateLoadingCount(instance, 1);
226
+ instance._elements = purgeOneElement(instance._elements, element);
227
+ return;
228
+ }
229
+
230
+ setSourcesBgImage(element, settings);
231
+ };
232
+
233
+ var addClass = function addClass(element, className) {
234
+ if (supportsClassList) {
235
+ element.classList.add(className);
236
+ return;
237
+ }
238
+
239
+ element.className += (element.className ? " " : "") + className;
240
+ };
241
+
242
+ var removeClass = function removeClass(element, className) {
243
+ if (supportsClassList) {
244
+ element.classList.remove(className);
245
+ return;
246
+ }
247
+
248
+ element.className = element.className.replace(new RegExp("(^|\\s+)" + className + "(\\s+|$)"), " ").replace(/^\s+/, "").replace(/\s+$/, "");
249
+ };
250
+
251
+ var genericLoadEventName = "load";
252
+ var mediaLoadEventName = "loadeddata";
253
+ var errorEventName = "error";
254
+
255
+ var addEventListener = function addEventListener(element, eventName, handler) {
256
+ element.addEventListener(eventName, handler);
257
+ };
258
+
259
+ var removeEventListener = function removeEventListener(element, eventName, handler) {
260
+ element.removeEventListener(eventName, handler);
261
+ };
262
+
263
+ var addEventListeners = function addEventListeners(element, loadHandler, errorHandler) {
264
+ addEventListener(element, genericLoadEventName, loadHandler);
265
+ addEventListener(element, mediaLoadEventName, loadHandler);
266
+ addEventListener(element, errorEventName, errorHandler);
267
+ };
268
+
269
+ var removeEventListeners = function removeEventListeners(element, loadHandler, errorHandler) {
270
+ removeEventListener(element, genericLoadEventName, loadHandler);
271
+ removeEventListener(element, mediaLoadEventName, loadHandler);
272
+ removeEventListener(element, errorEventName, errorHandler);
273
+ };
274
+
275
+ var eventHandler = function eventHandler(event, success, instance) {
276
+ var settings = instance._settings;
277
+ var className = success ? settings.class_loaded : settings.class_error;
278
+ var callback = success ? settings.callback_loaded : settings.callback_error;
279
+ var element = event.target;
280
+ removeClass(element, settings.class_loading);
281
+ addClass(element, className);
282
+ callbackIfSet(callback, element);
283
+ updateLoadingCount(instance, -1);
284
+ };
285
+
286
+ var addOneShotEventListeners = function addOneShotEventListeners(element, instance) {
287
+ var loadHandler = function loadHandler(event) {
288
+ eventHandler(event, true, instance);
289
+ removeEventListeners(element, loadHandler, errorHandler);
290
+ };
291
+
292
+ var errorHandler = function errorHandler(event) {
293
+ eventHandler(event, false, instance);
294
+ removeEventListeners(element, loadHandler, errorHandler);
295
+ };
296
+
297
+ addEventListeners(element, loadHandler, errorHandler);
298
+ };
299
+
300
+ var managedTags = ["IMG", "IFRAME", "VIDEO"];
301
+
302
+ var onEnter = function onEnter(element, instance) {
303
+ var settings = instance._settings;
304
+ callbackIfSet(settings.callback_enter, element);
305
+
306
+ if (!settings.load_delay) {
307
+ revealAndUnobserve(element, instance);
308
+ return;
309
+ }
310
+
311
+ delayLoad(element, instance);
312
+ };
313
+
314
+ var revealAndUnobserve = function revealAndUnobserve(element, instance) {
315
+ var observer = instance._observer;
316
+ revealElement(element, instance);
317
+
318
+ if (observer && instance._settings.auto_unobserve) {
319
+ observer.unobserve(element);
320
+ }
321
+ };
322
+
323
+ var onExit = function onExit(element, instance) {
324
+ var settings = instance._settings;
325
+ callbackIfSet(settings.callback_exit, element);
326
+
327
+ if (!settings.load_delay) {
328
+ return;
329
+ }
330
+
331
+ cancelDelayLoad(element);
332
+ };
333
+
334
+ var cancelDelayLoad = function cancelDelayLoad(element) {
335
+ var timeoutId = getTimeoutData(element);
336
+
337
+ if (!timeoutId) {
338
+ return; // do nothing if timeout doesn't exist
339
+ }
340
+
341
+ clearTimeout(timeoutId);
342
+ setTimeoutData(element, null);
343
+ };
344
+
345
+ var delayLoad = function delayLoad(element, instance) {
346
+ var loadDelay = instance._settings.load_delay;
347
+ var timeoutId = getTimeoutData(element);
348
+
349
+ if (timeoutId) {
350
+ return; // do nothing if timeout already set
351
+ }
352
+
353
+ timeoutId = setTimeout(function () {
354
+ revealAndUnobserve(element, instance);
355
+ cancelDelayLoad(element);
356
+ }, loadDelay);
357
+ setTimeoutData(element, timeoutId);
358
+ };
359
+
360
+ var revealElement = function revealElement(element, instance, force) {
361
+ var settings = instance._settings;
362
+
363
+ if (!force && getWasProcessedData(element)) {
364
+ return; // element has already been processed and force wasn't true
365
+ }
366
+
367
+ if (managedTags.indexOf(element.tagName) > -1) {
368
+ addOneShotEventListeners(element, instance);
369
+ addClass(element, settings.class_loading);
370
+ }
371
+
372
+ setSources(element, instance);
373
+ setWasProcessedData(element);
374
+ callbackIfSet(settings.callback_reveal, element);
375
+ callbackIfSet(settings.callback_set, element);
376
+ };
377
+
378
+ var isIntersecting = function isIntersecting(entry) {
379
+ return entry.isIntersecting || entry.intersectionRatio > 0;
380
+ };
381
+
382
+ var getObserverSettings = function getObserverSettings(settings) {
383
+ return {
384
+ root: settings.container === document ? null : settings.container,
385
+ rootMargin: settings.thresholds || settings.threshold + "px"
386
+ };
387
+ };
388
+
389
+ var setObserver = function setObserver(instance) {
390
+ if (!supportsIntersectionObserver) {
391
+ return false;
392
+ }
393
+
394
+ instance._observer = new IntersectionObserver(function (entries) {
395
+ entries.forEach(function (entry) {
396
+ return isIntersecting(entry) ? onEnter(entry.target, instance) : onExit(entry.target, instance);
397
+ });
398
+ }, getObserverSettings(instance._settings));
399
+ return true;
400
+ };
401
+
402
+ var nativeLazyTags = ["IMG", "IFRAME"];
403
+
404
+ var shouldUseNative = function shouldUseNative(settings) {
405
+ return settings.use_native && "loading" in HTMLImageElement.prototype;
406
+ };
407
+
408
+ var loadAllNative = function loadAllNative(instance) {
409
+ instance._elements.forEach(function (element) {
410
+ if (nativeLazyTags.indexOf(element.tagName) === -1) {
411
+ return;
412
+ }
413
+
414
+ element.setAttribute("loading", "lazy");
415
+ revealElement(element, instance);
416
+ });
417
+ };
418
+
419
+ var nodeSetToArray = function nodeSetToArray(nodeSet) {
420
+ return Array.prototype.slice.call(nodeSet);
421
+ };
422
+
423
+ var queryElements = function queryElements(settings) {
424
+ return settings.container.querySelectorAll(settings.elements_selector);
425
+ };
426
+
427
+ var getElements = function getElements(elements, settings) {
428
+ return purgeProcessedElements(nodeSetToArray(elements || queryElements(settings)));
429
+ };
430
+
431
+ var LazyLoad = function LazyLoad(customSettings, elements) {
432
+ this._settings = getInstanceSettings(customSettings);
433
+ this._loadingCount = 0;
434
+ setObserver(this);
435
+ this.update(elements);
436
+ };
437
+
438
+ LazyLoad.prototype = {
439
+ update: function update(elements) {
440
+ var _this = this;
441
+
442
+ var settings = this._settings;
443
+ this._elements = getElements(elements, settings);
444
+
445
+ if (isBot || !this._observer) {
446
+ this.loadAll();
447
+ return;
448
+ }
449
+
450
+ if (shouldUseNative(settings)) {
451
+ loadAllNative(this);
452
+ this._elements = getElements(elements, settings);
453
+ }
454
+
455
+ this._elements.forEach(function (element) {
456
+ _this._observer.observe(element);
457
+ });
458
+ },
459
+ destroy: function destroy() {
460
+ var _this2 = this;
461
+
462
+ if (this._observer) {
463
+ this._elements.forEach(function (element) {
464
+ _this2._observer.unobserve(element);
465
+ });
466
+
467
+ this._observer = null;
468
+ }
469
+
470
+ this._elements = null;
471
+ this._settings = null;
472
+ },
473
+ load: function load(element, force) {
474
+ revealElement(element, this, force);
475
+ },
476
+ loadAll: function loadAll() {
477
+ var _this3 = this;
478
+
479
+ this._elements.forEach(function (element) {
480
+ revealAndUnobserve(element, _this3);
481
+ });
482
+ }
483
+ };
484
+ /* Automatic instances creation if required (useful for async script loading) */
485
+
486
+ if (runningOnBrowser) {
487
+ autoInitialize(LazyLoad, window.lazyLoadOptions);
488
+ }
489
+
490
+ return LazyLoad;
491
+ });
assets/js/12.0/lazyload.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.LazyLoad=e()}(this,function(){"use strict";var t="undefined"!=typeof window,e=t&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),n=t&&"IntersectionObserver"in window,o=t&&"classList"in document.createElement("p"),r={elements_selector:"img",container:e||t?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_reveal:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},a=function(t,e){var n,o=new t(e);try{n=new CustomEvent("LazyLoad::Initialized",{detail:{instance:o}})}catch(t){(n=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:o})}window.dispatchEvent(n)};var i=function(t,e){return t.getAttribute("data-"+e)},s=function(t,e,n){var o="data-"+e;null!==n?t.setAttribute(o,n):t.removeAttribute(o)},c=function(t){return"true"===i(t,"was-processed")},l=function(t,e){return s(t,"ll-timeout",e)},u=function(t){return i(t,"ll-timeout")},d=function(t,e){t&&t(e)},f=function(t,e){t._loadingCount+=e,0===t._elements.length&&0===t._loadingCount&&d(t._settings.callback_finish)},_=function(t){for(var e,n=[],o=0;e=t.children[o];o+=1)"SOURCE"===e.tagName&&n.push(e);return n},v=function(t,e,n){n&&t.setAttribute(e,n)},g=function(t,e){v(t,"sizes",i(t,e.data_sizes)),v(t,"srcset",i(t,e.data_srcset)),v(t,"src",i(t,e.data_src))},m={IMG:function(t,e){var n=t.parentNode;n&&"PICTURE"===n.tagName&&_(n).forEach(function(t){g(t,e)});g(t,e)},IFRAME:function(t,e){v(t,"src",i(t,e.data_src))},VIDEO:function(t,e){_(t).forEach(function(t){v(t,"src",i(t,e.data_src))}),v(t,"src",i(t,e.data_src)),t.load()}},b=function(t,e){var n,o,r=e._settings,a=t.tagName,s=m[a];if(s)return s(t,r),f(e,1),void(e._elements=(n=e._elements,o=t,n.filter(function(t){return t!==o})));!function(t,e){var n=i(t,e.data_src),o=i(t,e.data_bg);n&&(t.style.backgroundImage='url("'.concat(n,'")')),o&&(t.style.backgroundImage=o)}(t,r)},h=function(t,e){o?t.classList.add(e):t.className+=(t.className?" ":"")+e},p=function(t,e,n){t.addEventListener(e,n)},y=function(t,e,n){t.removeEventListener(e,n)},E=function(t,e,n){y(t,"load",e),y(t,"loadeddata",e),y(t,"error",n)},w=function(t,e,n){var r=n._settings,a=e?r.class_loaded:r.class_error,i=e?r.callback_loaded:r.callback_error,s=t.target;!function(t,e){o?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")}(s,r.class_loading),h(s,a),d(i,s),f(n,-1)},I=function(t,e){var n=function n(r){w(r,!0,e),E(t,n,o)},o=function o(r){w(r,!1,e),E(t,n,o)};!function(t,e,n){p(t,"load",e),p(t,"loadeddata",e),p(t,"error",n)}(t,n,o)},k=["IMG","IFRAME","VIDEO"],A=function(t,e){var n=e._observer;z(t,e),n&&e._settings.auto_unobserve&&n.unobserve(t)},L=function(t){var e=u(t);e&&(clearTimeout(e),l(t,null))},x=function(t,e){var n=e._settings.load_delay,o=u(t);o||(o=setTimeout(function(){A(t,e),L(t)},n),l(t,o))},z=function(t,e,n){var o=e._settings;!n&&c(t)||(k.indexOf(t.tagName)>-1&&(I(t,e),h(t,o.class_loading)),b(t,e),function(t){s(t,"was-processed","true")}(t),d(o.callback_reveal,t),d(o.callback_set,t))},O=function(t){return!!n&&(t._observer=new IntersectionObserver(function(e){e.forEach(function(e){return function(t){return t.isIntersecting||t.intersectionRatio>0}(e)?function(t,e){var n=e._settings;d(n.callback_enter,t),n.load_delay?x(t,e):A(t,e)}(e.target,t):function(t,e){var n=e._settings;d(n.callback_exit,t),n.load_delay&&L(t)}(e.target,t)})},{root:(e=t._settings).container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}),!0);var e},N=["IMG","IFRAME"],C=function(t,e){return function(t){return t.filter(function(t){return!c(t)})}((n=t||function(t){return t.container.querySelectorAll(t.elements_selector)}(e),Array.prototype.slice.call(n)));var n},M=function(t,e){this._settings=function(t){return _extends({},r,t)}(t),this._loadingCount=0,O(this),this.update(e)};return M.prototype={update:function(t){var n,o=this,r=this._settings;(this._elements=C(t,r),!e&&this._observer)?(function(t){return t.use_native&&"loading"in HTMLImageElement.prototype}(r)&&((n=this)._elements.forEach(function(t){-1!==N.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),z(t,n))}),this._elements=C(t,r)),this._elements.forEach(function(t){o._observer.observe(t)})):this.loadAll()},destroy:function(){var t=this;this._observer&&(this._elements.forEach(function(e){t._observer.unobserve(e)}),this._observer=null),this._elements=null,this._settings=null},load:function(t,e){z(t,this,e)},loadAll:function(){var t=this;this._elements.forEach(function(e){A(e,t)})}},t&&function(t,e){if(e)if(e.length)for(var n,o=0;n=e[o];o+=1)a(t,n);else a(t,e)}(M,window.lazyLoadOptions),M});
2
+ //# sourceMappingURL=lazyload.min.js.map
assets/js/12.0/lazyload.min.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["lazyload.js"],"names":["global","factory","exports","_typeof","module","define","amd","LazyLoad","this","runningOnBrowser","window","isBot","test","defaultSettings","elements_selector","threshold","thresholds","document","createElement","data_srcset","data_sizes","data_bg","class_loading","class_loaded","class_error","load_delay","auto_unobserve","callback_enter","callback_exit","callback_reveal","callback_loaded","callback_error","callback_finish","use_native","getInstanceSettings","createInstance","classObj","options","event","detail","instance","CustomEvent","err","createEvent","eventString","dispatchEvent","dataPrefix","element","attribute","processedDataName","setData","value","attrName","getData","removeAttribute","getWasProcessedData","setTimeoutData","setWasProcessedData","getTimeoutData","callback","argument","updateLoadingCount","_loadingCount","plusMinus","_elements","length","callbackIfSet","_settings","getSourceTags","parentTag","childTag","sourceTags","i","children","setAttribute","setAttributeIfValue","tagName","settings","data_src","backgroundImage","IMG","parent","parentNode","forEach","sourceTag","setImageAttributes","IFRAME","VIDEO","load","setSources","elements","setSourcesFunctions","setSourcesFunction","setSourcesVideo","timeoutDataName","srcDataValue","bgDataValue","setSourcesBgImage","addClass","className","addEventListener","eventName","handler","removeEventListener","genericLoadEventName","errorHandler","removeClass","loadHandler","addEventListeners","errorEventName","success","removeEventListeners","target","supportsClassList","remove","replace","RegExp","eventHandler","addOneShotEventListeners","revealAndUnobserve","observer","unobserve","cancelDelayLoad","timeoutId","clearTimeout","loadDelay","revealElement","force","managedTags","indexOf","setTimeout","callback_set","setObserver","_observer","IntersectionObserver","entries","entry","delayLoad","onEnter","root","container","rootMargin","isIntersecting","nativeLazyTags","getElements","trueString","purgeProcessedElements","getObserverSettings","querySelectorAll","queryElements","shouldUseNative","customSettings","loadAllNative","prototype","update","_this","nodeSetToArray","loadAll","destroy","_this2","_this3","autoInitialize","optionsItem"],"mappings":"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","file":"lazyload.min.js","sourcesContent":["(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.LazyLoad = factory());\n}(this, (function () { 'use strict';\n\nconst runningOnBrowser = typeof window !== \"undefined\";\r\n\r\nconst isBot =\r\n\t(runningOnBrowser && !(\"onscroll\" in window)) ||\r\n\t(typeof navigator !== \"undefined\" &&\r\n\t\t/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent));\r\n\r\nconst supportsIntersectionObserver =\r\n\trunningOnBrowser && \"IntersectionObserver\" in window;\r\n\r\nconst supportsClassList =\r\n\trunningOnBrowser && \"classList\" in document.createElement(\"p\");\n\nconst defaultSettings = {\r\n\telements_selector: \"img\",\r\n\tcontainer: isBot || runningOnBrowser ? document : null,\r\n\tthreshold: 300,\r\n\tthresholds: null,\r\n\tdata_src: \"src\",\r\n\tdata_srcset: \"srcset\",\r\n\tdata_sizes: \"sizes\",\r\n\tdata_bg: \"bg\",\r\n\tclass_loading: \"loading\",\r\n\tclass_loaded: \"loaded\",\r\n\tclass_error: \"error\",\r\n\tload_delay: 0,\r\n\tauto_unobserve: true,\r\n\tcallback_enter: null,\r\n\tcallback_exit: null,\r\n\tcallback_reveal: null,\r\n\tcallback_loaded: null,\r\n\tcallback_error: null,\r\n\tcallback_finish: null,\r\n\tuse_native: false\r\n};\r\n\r\nvar getInstanceSettings = customSettings => {\r\n\treturn Object.assign({}, defaultSettings, customSettings);\r\n};\n\n/* Creates instance and notifies it through the window element */\r\nconst createInstance = function(classObj, options) {\r\n\tvar event;\r\n\tlet eventString = \"LazyLoad::Initialized\";\r\n\tlet instance = new classObj(options);\r\n\ttry {\r\n\t\t// Works in modern browsers\r\n\t\tevent = new CustomEvent(eventString, { detail: { instance } });\r\n\t} catch (err) {\r\n\t\t// Works in Internet Explorer (all versions)\r\n\t\tevent = document.createEvent(\"CustomEvent\");\r\n\t\tevent.initCustomEvent(eventString, false, false, { instance });\r\n\t}\r\n\twindow.dispatchEvent(event);\r\n};\r\n\r\n/* Auto initialization of one or more instances of lazyload, depending on the \r\n options passed in (plain object or an array) */\r\nfunction autoInitialize(classObj, options) {\r\n\tif (!options) {\r\n\t\treturn;\r\n\t}\r\n\tif (!options.length) {\r\n\t\t// Plain object\r\n\t\tcreateInstance(classObj, options);\r\n\t} else {\r\n\t\t// Array of objects\r\n\t\tfor (let i = 0, optionsItem; (optionsItem = options[i]); i += 1) {\r\n\t\t\tcreateInstance(classObj, optionsItem);\r\n\t\t}\r\n\t}\r\n}\n\nconst dataPrefix = \"data-\";\r\nconst processedDataName = \"was-processed\";\r\nconst timeoutDataName = \"ll-timeout\";\r\nconst trueString = \"true\";\r\n\r\nconst getData = (element, attribute) => {\r\n\treturn element.getAttribute(dataPrefix + attribute);\r\n};\r\n\r\nconst setData = (element, attribute, value) => {\r\n\tvar attrName = dataPrefix + attribute;\r\n\tif (value === null) {\r\n\t\telement.removeAttribute(attrName);\r\n\t\treturn;\r\n\t}\r\n\telement.setAttribute(attrName, value);\r\n};\r\n\r\nconst setWasProcessedData = element =>\r\n\tsetData(element, processedDataName, trueString);\r\n\r\nconst getWasProcessedData = element =>\r\n\tgetData(element, processedDataName) === trueString;\r\n\r\nconst setTimeoutData = (element, value) =>\r\n\tsetData(element, timeoutDataName, value);\r\n\r\nconst getTimeoutData = element => getData(element, timeoutDataName);\n\nconst purgeProcessedElements = elements => {\r\n\treturn elements.filter(element => !getWasProcessedData(element));\r\n};\r\n\r\nconst purgeOneElement = (elements, elementToPurge) => {\r\n\treturn elements.filter(element => element !== elementToPurge);\r\n};\n\nconst callbackIfSet = (callback, argument) => {\r\n\tif (callback) {\r\n\t\tcallback(argument);\r\n\t}\r\n};\n\nconst updateLoadingCount = (instance, plusMinus) => {\r\n\tinstance._loadingCount += plusMinus;\r\n\tif (instance._elements.length === 0 && instance._loadingCount === 0) {\r\n\t\tcallbackIfSet(instance._settings.callback_finish);\r\n\t}\r\n};\n\nconst getSourceTags = parentTag => {\r\n\tlet sourceTags = [];\r\n\tfor (let i = 0, childTag; (childTag = parentTag.children[i]); i += 1) {\r\n\t\tif (childTag.tagName === \"SOURCE\") {\r\n\t\t\tsourceTags.push(childTag);\r\n\t\t}\r\n\t}\r\n\treturn sourceTags;\r\n};\r\n\r\nconst setAttributeIfValue = (element, attrName, value) => {\r\n\tif (!value) {\r\n\t\treturn;\r\n\t}\r\n\telement.setAttribute(attrName, value);\r\n};\r\n\r\nconst setImageAttributes = (element, settings) => {\r\n\tsetAttributeIfValue(\r\n\t\telement,\r\n\t\t\"sizes\",\r\n\t\tgetData(element, settings.data_sizes)\r\n\t);\r\n\tsetAttributeIfValue(\r\n\t\telement,\r\n\t\t\"srcset\",\r\n\t\tgetData(element, settings.data_srcset)\r\n\t);\r\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\r\n};\r\n\r\nconst setSourcesImg = (element, settings) => {\r\n\tconst parent = element.parentNode;\r\n\r\n\tif (parent && parent.tagName === \"PICTURE\") {\r\n\t\tlet sourceTags = getSourceTags(parent);\r\n\t\tsourceTags.forEach(sourceTag => {\r\n\t\t\tsetImageAttributes(sourceTag, settings);\r\n\t\t});\r\n\t}\r\n\r\n\tsetImageAttributes(element, settings);\r\n};\r\n\r\nconst setSourcesIframe = (element, settings) => {\r\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\r\n};\r\n\r\nconst setSourcesVideo = (element, settings) => {\r\n\tlet sourceTags = getSourceTags(element);\r\n\tsourceTags.forEach(sourceTag => {\r\n\t\tsetAttributeIfValue(\r\n\t\t\tsourceTag,\r\n\t\t\t\"src\",\r\n\t\t\tgetData(sourceTag, settings.data_src)\r\n\t\t);\r\n\t});\r\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\r\n\telement.load();\r\n};\r\n\r\nconst setSourcesBgImage = (element, settings) => {\r\n\tconst srcDataValue = getData(element, settings.data_src);\r\n\tconst bgDataValue = getData(element, settings.data_bg);\r\n\r\n\tif (srcDataValue) {\r\n\t\telement.style.backgroundImage = `url(\"${srcDataValue}\")`;\r\n\t}\r\n\r\n\tif (bgDataValue) {\r\n\t\telement.style.backgroundImage = bgDataValue;\r\n\t}\r\n};\r\n\r\nconst setSourcesFunctions = {\r\n\tIMG: setSourcesImg,\r\n\tIFRAME: setSourcesIframe,\r\n\tVIDEO: setSourcesVideo\r\n};\r\n\r\nconst setSources = (element, instance) => {\r\n\tconst settings = instance._settings;\r\n\tconst tagName = element.tagName;\r\n\tconst setSourcesFunction = setSourcesFunctions[tagName];\r\n\tif (setSourcesFunction) {\r\n\t\tsetSourcesFunction(element, settings);\r\n\t\tupdateLoadingCount(instance, 1);\r\n\t\tinstance._elements = purgeOneElement(instance._elements, element);\r\n\t\treturn;\r\n\t}\r\n\tsetSourcesBgImage(element, settings);\r\n};\n\nconst addClass = (element, className) => {\r\n\tif (supportsClassList) {\r\n\t\telement.classList.add(className);\r\n\t\treturn;\r\n\t}\r\n\telement.className += (element.className ? \" \" : \"\") + className;\r\n};\r\n\r\nconst removeClass = (element, className) => {\r\n\tif (supportsClassList) {\r\n\t\telement.classList.remove(className);\r\n\t\treturn;\r\n\t}\r\n\telement.className = element.className.\r\n\t\treplace(new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), \" \").\r\n\t\treplace(/^\\s+/, \"\").\r\n\t\treplace(/\\s+$/, \"\");\r\n};\n\nconst genericLoadEventName = \"load\";\r\nconst mediaLoadEventName = \"loadeddata\";\r\nconst errorEventName = \"error\";\r\n\r\nconst addEventListener = (element, eventName, handler) => {\r\n\telement.addEventListener(eventName, handler);\r\n};\r\n\r\nconst removeEventListener = (element, eventName, handler) => {\r\n\telement.removeEventListener(eventName, handler);\r\n};\r\n\r\nconst addEventListeners = (element, loadHandler, errorHandler) => {\r\n\taddEventListener(element, genericLoadEventName, loadHandler);\r\n\taddEventListener(element, mediaLoadEventName, loadHandler);\r\n\taddEventListener(element, errorEventName, errorHandler);\r\n};\r\n\r\nconst removeEventListeners = (element, loadHandler, errorHandler) => {\r\n\tremoveEventListener(element, genericLoadEventName, loadHandler);\r\n\tremoveEventListener(element, mediaLoadEventName, loadHandler);\r\n\tremoveEventListener(element, errorEventName, errorHandler);\r\n};\r\n\r\nconst eventHandler = function(event, success, instance) {\r\n\tvar settings = instance._settings;\r\n\tconst className = success ? settings.class_loaded : settings.class_error;\r\n\tconst callback = success\r\n\t\t? settings.callback_loaded\r\n\t\t: settings.callback_error;\r\n\tconst element = event.target;\r\n\r\n\tremoveClass(element, settings.class_loading);\r\n\taddClass(element, className);\r\n\tcallbackIfSet(callback, element);\r\n\r\n\tupdateLoadingCount(instance, -1);\r\n};\r\n\r\nconst addOneShotEventListeners = (element, instance) => {\r\n\tconst loadHandler = event => {\r\n\t\teventHandler(event, true, instance);\r\n\t\tremoveEventListeners(element, loadHandler, errorHandler);\r\n\t};\r\n\tconst errorHandler = event => {\r\n\t\teventHandler(event, false, instance);\r\n\t\tremoveEventListeners(element, loadHandler, errorHandler);\r\n\t};\r\n\taddEventListeners(element, loadHandler, errorHandler);\r\n};\n\nconst managedTags = [\"IMG\", \"IFRAME\", \"VIDEO\"];\r\n\r\nconst onEnter = (element, instance) => {\r\n\tconst settings = instance._settings;\r\n\tcallbackIfSet(settings.callback_enter, element);\r\n\tif (!settings.load_delay) {\r\n\t\trevealAndUnobserve(element, instance);\r\n\t\treturn;\r\n\t}\r\n\tdelayLoad(element, instance);\r\n};\r\n\r\nconst revealAndUnobserve = (element, instance) => {\r\n\tvar observer = instance._observer;\r\n\trevealElement(element, instance);\r\n\tif (observer && instance._settings.auto_unobserve) {\r\n\t\tobserver.unobserve(element);\r\n\t}\r\n};\r\n\r\nconst onExit = (element, instance) => {\r\n\tconst settings = instance._settings;\r\n\tcallbackIfSet(settings.callback_exit, element);\r\n\tif (!settings.load_delay) {\r\n\t\treturn;\r\n\t}\r\n\tcancelDelayLoad(element);\r\n};\r\n\r\nconst cancelDelayLoad = element => {\r\n\tvar timeoutId = getTimeoutData(element);\r\n\tif (!timeoutId) {\r\n\t\treturn; // do nothing if timeout doesn't exist\r\n\t}\r\n\tclearTimeout(timeoutId);\r\n\tsetTimeoutData(element, null);\r\n};\r\n\r\nconst delayLoad = (element, instance) => {\r\n\tvar loadDelay = instance._settings.load_delay;\r\n\tvar timeoutId = getTimeoutData(element);\r\n\tif (timeoutId) {\r\n\t\treturn; // do nothing if timeout already set\r\n\t}\r\n\ttimeoutId = setTimeout(function() {\r\n\t\trevealAndUnobserve(element, instance);\r\n\t\tcancelDelayLoad(element);\r\n\t}, loadDelay);\r\n\tsetTimeoutData(element, timeoutId);\r\n};\r\n\r\nconst revealElement = (element, instance, force) => {\r\n\tvar settings = instance._settings;\r\n\tif (!force && getWasProcessedData(element)) {\r\n\t\treturn; // element has already been processed and force wasn't true\r\n\t}\r\n\tif (managedTags.indexOf(element.tagName) > -1) {\r\n\t\taddOneShotEventListeners(element, instance);\r\n\t\taddClass(element, settings.class_loading);\r\n\t}\r\n\tsetSources(element, instance);\r\n\tsetWasProcessedData(element);\r\n\tcallbackIfSet(settings.callback_reveal, element);\r\n\tcallbackIfSet(settings.callback_set, element);\r\n};\n\nconst isIntersecting = entry =>\r\n\tentry.isIntersecting || entry.intersectionRatio > 0;\r\n\r\nconst getObserverSettings = settings => ({\r\n\troot: settings.container === document ? null : settings.container,\r\n\trootMargin: settings.thresholds || settings.threshold + \"px\"\r\n});\r\n\r\nconst setObserver = instance => {\r\n\tif (!supportsIntersectionObserver) {\r\n\t\treturn false;\r\n\t}\r\n\tinstance._observer = new IntersectionObserver(entries => {\r\n\t\tentries.forEach(entry =>\r\n\t\t\tisIntersecting(entry)\r\n\t\t\t\t? onEnter(entry.target, instance)\r\n\t\t\t\t: onExit(entry.target, instance)\r\n\t\t);\r\n\t}, getObserverSettings(instance._settings));\r\n\treturn true;\r\n};\n\nconst nativeLazyTags = [\"IMG\", \"IFRAME\"];\r\n\r\nconst shouldUseNative = settings =>\r\n\tsettings.use_native && \"loading\" in HTMLImageElement.prototype;\r\n\r\nconst loadAllNative = instance => {\r\n\tinstance._elements.forEach(element => {\r\n\t\tif (nativeLazyTags.indexOf(element.tagName) === -1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telement.setAttribute(\"loading\", \"lazy\");\r\n\t\trevealElement(element, instance);\r\n\t});\r\n};\n\nconst nodeSetToArray = nodeSet => Array.prototype.slice.call(nodeSet);\n\nconst queryElements = settings =>\r\n\tsettings.container.querySelectorAll(settings.elements_selector);\r\n\r\nconst getElements = (elements, settings) =>\r\n\tpurgeProcessedElements(nodeSetToArray(elements || queryElements(settings)));\n\nconst LazyLoad = function(customSettings, elements) {\r\n\tthis._settings = getInstanceSettings(customSettings);\r\n\tthis._loadingCount = 0;\r\n\tsetObserver(this);\r\n\tthis.update(elements);\r\n};\r\n\r\nLazyLoad.prototype = {\r\n\tupdate: function(elements) {\r\n\t\tvar settings = this._settings;\r\n\t\tthis._elements = getElements(elements, settings);\r\n\t\tif (isBot || !this._observer) {\r\n\t\t\tthis.loadAll();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (shouldUseNative(settings)) {\r\n\t\t\tloadAllNative(this);\r\n\t\t\tthis._elements = getElements(elements, settings);\r\n\t\t}\r\n\t\tthis._elements.forEach(element => {\r\n\t\t\tthis._observer.observe(element);\r\n\t\t});\r\n\t},\r\n\r\n\tdestroy: function() {\r\n\t\tif (this._observer) {\r\n\t\t\tthis._elements.forEach(element => {\r\n\t\t\t\tthis._observer.unobserve(element);\r\n\t\t\t});\r\n\t\t\tthis._observer = null;\r\n\t\t}\r\n\t\tthis._elements = null;\r\n\t\tthis._settings = null;\r\n\t},\r\n\r\n\tload: function(element, force) {\r\n\t\trevealElement(element, this, force);\r\n\t},\r\n\r\n\tloadAll: function() {\r\n\t\tthis._elements.forEach(element => {\r\n\t\t\trevealAndUnobserve(element, this);\r\n\t\t});\r\n\t}\r\n};\r\n\r\n/* Automatic instances creation if required (useful for async script loading) */\r\nif (runningOnBrowser) {\r\n\tautoInitialize(LazyLoad, window.lazyLoadOptions);\r\n}\n\nreturn LazyLoad;\n\n})));\n"]}
composer.lock CHANGED
@@ -8,16 +8,16 @@
8
  "packages": [
9
  {
10
  "name": "composer/installers",
11
- "version": "v1.6.0",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/composer/installers.git",
15
- "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
16
  },
17
  "dist": {
18
  "type": "zip",
19
- "url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
20
- "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
21
  "shasum": ""
22
  },
23
  "require": {
@@ -73,6 +73,7 @@
73
  "RadPHP",
74
  "SMF",
75
  "Thelia",
 
76
  "WolfCMS",
77
  "agl",
78
  "aimeos",
@@ -95,6 +96,7 @@
95
  "installer",
96
  "itop",
97
  "joomla",
 
98
  "kohana",
99
  "laravel",
100
  "lavalite",
@@ -124,7 +126,7 @@
124
  "zend",
125
  "zikula"
126
  ],
127
- "time": "2018-08-27T06:10:37+00:00"
128
  },
129
  {
130
  "name": "container-interop/container-interop",
@@ -273,16 +275,16 @@
273
  },
274
  {
275
  "name": "wp-media/rocket-lazyload-common",
276
- "version": "v2.4",
277
  "source": {
278
  "type": "git",
279
  "url": "https://github.com/wp-media/rocket-lazyload-common.git",
280
- "reference": "fcebb3db1687ce4f88854c6fbc67a36e8ae9e2bf"
281
  },
282
  "dist": {
283
  "type": "zip",
284
- "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/fcebb3db1687ce4f88854c6fbc67a36e8ae9e2bf",
285
- "reference": "fcebb3db1687ce4f88854c6fbc67a36e8ae9e2bf",
286
  "shasum": ""
287
  },
288
  "require": {
@@ -317,7 +319,7 @@
317
  }
318
  ],
319
  "description": "Common Code between WP Rocket and Lazyload by WP Rocket",
320
- "time": "2019-07-08T16:41:10+00:00"
321
  }
322
  ],
323
  "packages-dev": [
@@ -364,16 +366,16 @@
364
  },
365
  {
366
  "name": "brain/monkey",
367
- "version": "v2.3.0",
368
  "source": {
369
  "type": "git",
370
  "url": "https://github.com/Brain-WP/BrainMonkey.git",
371
- "reference": "e19ad8f13c31c51507dcad10f186552907384471"
372
  },
373
  "dist": {
374
  "type": "zip",
375
- "url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/e19ad8f13c31c51507dcad10f186552907384471",
376
- "reference": "e19ad8f13c31c51507dcad10f186552907384471",
377
  "shasum": ""
378
  },
379
  "require": {
@@ -424,7 +426,7 @@
424
  "test",
425
  "testing"
426
  ],
427
- "time": "2019-07-22T16:10:56+00:00"
428
  },
429
  {
430
  "name": "dealerdirect/phpcodesniffer-composer-installer",
@@ -598,16 +600,16 @@
598
  },
599
  {
600
  "name": "mockery/mockery",
601
- "version": "1.2.2",
602
  "source": {
603
  "type": "git",
604
  "url": "https://github.com/mockery/mockery.git",
605
- "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2"
606
  },
607
  "dist": {
608
  "type": "zip",
609
- "url": "https://api.github.com/repos/mockery/mockery/zipball/0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2",
610
- "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2",
611
  "shasum": ""
612
  },
613
  "require": {
@@ -659,20 +661,20 @@
659
  "test double",
660
  "testing"
661
  ],
662
- "time": "2019-02-13T09:37:52+00:00"
663
  },
664
  {
665
  "name": "myclabs/deep-copy",
666
- "version": "1.9.1",
667
  "source": {
668
  "type": "git",
669
  "url": "https://github.com/myclabs/DeepCopy.git",
670
- "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72"
671
  },
672
  "dist": {
673
  "type": "zip",
674
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
675
- "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
676
  "shasum": ""
677
  },
678
  "require": {
@@ -707,20 +709,20 @@
707
  "object",
708
  "object graph"
709
  ],
710
- "time": "2019-04-07T13:18:21+00:00"
711
  },
712
  {
713
  "name": "phpcompatibility/php-compatibility",
714
- "version": "9.2.0",
715
  "source": {
716
  "type": "git",
717
  "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
718
- "reference": "3db1bf1e28123fd574a4ae2e9a84072826d51b5e"
719
  },
720
  "dist": {
721
  "type": "zip",
722
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/3db1bf1e28123fd574a4ae2e9a84072826d51b5e",
723
- "reference": "3db1bf1e28123fd574a4ae2e9a84072826d51b5e",
724
  "shasum": ""
725
  },
726
  "require": {
@@ -743,19 +745,19 @@
743
  "LGPL-3.0-or-later"
744
  ],
745
  "authors": [
746
- {
747
- "name": "Contributors",
748
- "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
749
- },
750
  {
751
  "name": "Wim Godden",
752
- "role": "lead",
753
- "homepage": "https://github.com/wimg"
754
  },
755
  {
756
  "name": "Juliette Reinders Folmer",
757
- "role": "lead",
758
- "homepage": "https://github.com/jrfnl"
 
 
 
 
759
  }
760
  ],
761
  "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
@@ -765,30 +767,32 @@
765
  "phpcs",
766
  "standards"
767
  ],
768
- "time": "2019-06-27T19:58:56+00:00"
769
  },
770
  {
771
  "name": "phpcompatibility/phpcompatibility-paragonie",
772
- "version": "1.0.1",
773
  "source": {
774
  "type": "git",
775
  "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
776
- "reference": "9160de79fcd683b5c99e9c4133728d91529753ea"
777
  },
778
  "dist": {
779
  "type": "zip",
780
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/9160de79fcd683b5c99e9c4133728d91529753ea",
781
- "reference": "9160de79fcd683b5c99e9c4133728d91529753ea",
782
  "shasum": ""
783
  },
784
  "require": {
785
  "phpcompatibility/php-compatibility": "^9.0"
786
  },
787
  "require-dev": {
788
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4"
 
 
789
  },
790
  "suggest": {
791
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
792
  "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
793
  },
794
  "type": "phpcodesniffer-standard",
@@ -815,20 +819,20 @@
815
  "polyfill",
816
  "standards"
817
  ],
818
- "time": "2018-12-16T19:10:44+00:00"
819
  },
820
  {
821
  "name": "phpcompatibility/phpcompatibility-wp",
822
- "version": "2.0.0",
823
  "source": {
824
  "type": "git",
825
  "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
826
- "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd"
827
  },
828
  "dist": {
829
  "type": "zip",
830
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/cb303f0067cd5b366a41d4fb0e254fb40ff02efd",
831
- "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd",
832
  "shasum": ""
833
  },
834
  "require": {
@@ -836,10 +840,10 @@
836
  "phpcompatibility/phpcompatibility-paragonie": "^1.0"
837
  },
838
  "require-dev": {
839
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3"
840
  },
841
  "suggest": {
842
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
843
  "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
844
  },
845
  "type": "phpcodesniffer-standard",
@@ -865,7 +869,7 @@
865
  "standards",
866
  "wordpress"
867
  ],
868
- "time": "2018-10-07T18:31:37+00:00"
869
  },
870
  {
871
  "name": "phpdocumentor/reflection-common",
@@ -1400,8 +1404,8 @@
1400
  "authors": [
1401
  {
1402
  "name": "Sebastian Bergmann",
1403
- "role": "lead",
1404
- "email": "sebastian@phpunit.de"
1405
  }
1406
  ],
1407
  "description": "The PHP Unit Testing framework.",
@@ -2039,16 +2043,16 @@
2039
  },
2040
  {
2041
  "name": "symfony/polyfill-ctype",
2042
- "version": "v1.11.0",
2043
  "source": {
2044
  "type": "git",
2045
  "url": "https://github.com/symfony/polyfill-ctype.git",
2046
- "reference": "82ebae02209c21113908c229e9883c419720738a"
2047
  },
2048
  "dist": {
2049
  "type": "zip",
2050
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
2051
- "reference": "82ebae02209c21113908c229e9883c419720738a",
2052
  "shasum": ""
2053
  },
2054
  "require": {
@@ -2060,7 +2064,7 @@
2060
  "type": "library",
2061
  "extra": {
2062
  "branch-alias": {
2063
- "dev-master": "1.11-dev"
2064
  }
2065
  },
2066
  "autoload": {
@@ -2076,13 +2080,13 @@
2076
  "MIT"
2077
  ],
2078
  "authors": [
2079
- {
2080
- "name": "Symfony Community",
2081
- "homepage": "https://symfony.com/contributors"
2082
- },
2083
  {
2084
  "name": "Gert de Pagter",
2085
  "email": "BackEndTea@gmail.com"
 
 
 
 
2086
  }
2087
  ],
2088
  "description": "Symfony polyfill for ctype functions",
@@ -2093,20 +2097,20 @@
2093
  "polyfill",
2094
  "portable"
2095
  ],
2096
- "time": "2019-02-06T07:57:58+00:00"
2097
  },
2098
  {
2099
  "name": "symfony/yaml",
2100
- "version": "v4.3.2",
2101
  "source": {
2102
  "type": "git",
2103
  "url": "https://github.com/symfony/yaml.git",
2104
- "reference": "c60ecf5ba842324433b46f58dc7afc4487dbab99"
2105
  },
2106
  "dist": {
2107
  "type": "zip",
2108
- "url": "https://api.github.com/repos/symfony/yaml/zipball/c60ecf5ba842324433b46f58dc7afc4487dbab99",
2109
- "reference": "c60ecf5ba842324433b46f58dc7afc4487dbab99",
2110
  "shasum": ""
2111
  },
2112
  "require": {
@@ -2152,20 +2156,20 @@
2152
  ],
2153
  "description": "Symfony Yaml Component",
2154
  "homepage": "https://symfony.com",
2155
- "time": "2019-04-06T14:04:46+00:00"
2156
  },
2157
  {
2158
  "name": "webmozart/assert",
2159
- "version": "1.4.0",
2160
  "source": {
2161
  "type": "git",
2162
  "url": "https://github.com/webmozart/assert.git",
2163
- "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
2164
  },
2165
  "dist": {
2166
  "type": "zip",
2167
- "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
2168
- "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
2169
  "shasum": ""
2170
  },
2171
  "require": {
@@ -2173,8 +2177,7 @@
2173
  "symfony/polyfill-ctype": "^1.8"
2174
  },
2175
  "require-dev": {
2176
- "phpunit/phpunit": "^4.6",
2177
- "sebastian/version": "^1.0.1"
2178
  },
2179
  "type": "library",
2180
  "extra": {
@@ -2203,7 +2206,7 @@
2203
  "check",
2204
  "validate"
2205
  ],
2206
- "time": "2018-12-25T11:19:39+00:00"
2207
  },
2208
  {
2209
  "name": "wp-coding-standards/wpcs",
8
  "packages": [
9
  {
10
  "name": "composer/installers",
11
+ "version": "v1.7.0",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/composer/installers.git",
15
+ "reference": "141b272484481432cda342727a427dc1e206bfa0"
16
  },
17
  "dist": {
18
  "type": "zip",
19
+ "url": "https://api.github.com/repos/composer/installers/zipball/141b272484481432cda342727a427dc1e206bfa0",
20
+ "reference": "141b272484481432cda342727a427dc1e206bfa0",
21
  "shasum": ""
22
  },
23
  "require": {
73
  "RadPHP",
74
  "SMF",
75
  "Thelia",
76
+ "Whmcs",
77
  "WolfCMS",
78
  "agl",
79
  "aimeos",
96
  "installer",
97
  "itop",
98
  "joomla",
99
+ "known",
100
  "kohana",
101
  "laravel",
102
  "lavalite",
126
  "zend",
127
  "zikula"
128
  ],
129
+ "time": "2019-08-12T15:00:31+00:00"
130
  },
131
  {
132
  "name": "container-interop/container-interop",
275
  },
276
  {
277
  "name": "wp-media/rocket-lazyload-common",
278
+ "version": "v2.5",
279
  "source": {
280
  "type": "git",
281
  "url": "https://github.com/wp-media/rocket-lazyload-common.git",
282
+ "reference": "54e4e8b08293d113bf871e476d9cf899e9961391"
283
  },
284
  "dist": {
285
  "type": "zip",
286
+ "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/54e4e8b08293d113bf871e476d9cf899e9961391",
287
+ "reference": "54e4e8b08293d113bf871e476d9cf899e9961391",
288
  "shasum": ""
289
  },
290
  "require": {
319
  }
320
  ],
321
  "description": "Common Code between WP Rocket and Lazyload by WP Rocket",
322
+ "time": "2019-09-05T02:40:02+00:00"
323
  }
324
  ],
325
  "packages-dev": [
366
  },
367
  {
368
  "name": "brain/monkey",
369
+ "version": "2.3.1",
370
  "source": {
371
  "type": "git",
372
  "url": "https://github.com/Brain-WP/BrainMonkey.git",
373
+ "reference": "74cdccad5dbb7edc59f59e1ad6ef392f83a34776"
374
  },
375
  "dist": {
376
  "type": "zip",
377
+ "url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/74cdccad5dbb7edc59f59e1ad6ef392f83a34776",
378
+ "reference": "74cdccad5dbb7edc59f59e1ad6ef392f83a34776",
379
  "shasum": ""
380
  },
381
  "require": {
426
  "test",
427
  "testing"
428
  ],
429
+ "time": "2019-07-26T19:00:28+00:00"
430
  },
431
  {
432
  "name": "dealerdirect/phpcodesniffer-composer-installer",
600
  },
601
  {
602
  "name": "mockery/mockery",
603
+ "version": "1.2.3",
604
  "source": {
605
  "type": "git",
606
  "url": "https://github.com/mockery/mockery.git",
607
+ "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031"
608
  },
609
  "dist": {
610
  "type": "zip",
611
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/4eff936d83eb809bde2c57a3cea0ee9643769031",
612
+ "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031",
613
  "shasum": ""
614
  },
615
  "require": {
661
  "test double",
662
  "testing"
663
  ],
664
+ "time": "2019-08-07T15:01:07+00:00"
665
  },
666
  {
667
  "name": "myclabs/deep-copy",
668
+ "version": "1.9.3",
669
  "source": {
670
  "type": "git",
671
  "url": "https://github.com/myclabs/DeepCopy.git",
672
+ "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
673
  },
674
  "dist": {
675
  "type": "zip",
676
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
677
+ "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
678
  "shasum": ""
679
  },
680
  "require": {
709
  "object",
710
  "object graph"
711
  ],
712
+ "time": "2019-08-09T12:45:53+00:00"
713
  },
714
  {
715
  "name": "phpcompatibility/php-compatibility",
716
+ "version": "9.3.0",
717
  "source": {
718
  "type": "git",
719
  "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
720
+ "reference": "06cc8d2c2ed62a70f52963dbdf5eaa1ec0fe34c5"
721
  },
722
  "dist": {
723
  "type": "zip",
724
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/06cc8d2c2ed62a70f52963dbdf5eaa1ec0fe34c5",
725
+ "reference": "06cc8d2c2ed62a70f52963dbdf5eaa1ec0fe34c5",
726
  "shasum": ""
727
  },
728
  "require": {
745
  "LGPL-3.0-or-later"
746
  ],
747
  "authors": [
 
 
 
 
748
  {
749
  "name": "Wim Godden",
750
+ "homepage": "https://github.com/wimg",
751
+ "role": "lead"
752
  },
753
  {
754
  "name": "Juliette Reinders Folmer",
755
+ "homepage": "https://github.com/jrfnl",
756
+ "role": "lead"
757
+ },
758
+ {
759
+ "name": "Contributors",
760
+ "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
761
  }
762
  ],
763
  "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
767
  "phpcs",
768
  "standards"
769
  ],
770
+ "time": "2019-08-28T15:29:06+00:00"
771
  },
772
  {
773
  "name": "phpcompatibility/phpcompatibility-paragonie",
774
+ "version": "1.1.0",
775
  "source": {
776
  "type": "git",
777
  "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
778
+ "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936"
779
  },
780
  "dist": {
781
  "type": "zip",
782
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
783
+ "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
784
  "shasum": ""
785
  },
786
  "require": {
787
  "phpcompatibility/php-compatibility": "^9.0"
788
  },
789
  "require-dev": {
790
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5",
791
+ "paragonie/random_compat": "dev-master",
792
+ "paragonie/sodium_compat": "dev-master"
793
  },
794
  "suggest": {
795
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
796
  "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
797
  },
798
  "type": "phpcodesniffer-standard",
819
  "polyfill",
820
  "standards"
821
  ],
822
+ "time": "2019-08-28T15:58:19+00:00"
823
  },
824
  {
825
  "name": "phpcompatibility/phpcompatibility-wp",
826
+ "version": "2.1.0",
827
  "source": {
828
  "type": "git",
829
  "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
830
+ "reference": "41bef18ba688af638b7310666db28e1ea9158b2f"
831
  },
832
  "dist": {
833
  "type": "zip",
834
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/41bef18ba688af638b7310666db28e1ea9158b2f",
835
+ "reference": "41bef18ba688af638b7310666db28e1ea9158b2f",
836
  "shasum": ""
837
  },
838
  "require": {
840
  "phpcompatibility/phpcompatibility-paragonie": "^1.0"
841
  },
842
  "require-dev": {
843
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5"
844
  },
845
  "suggest": {
846
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
847
  "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
848
  },
849
  "type": "phpcodesniffer-standard",
869
  "standards",
870
  "wordpress"
871
  ],
872
+ "time": "2019-08-28T14:22:28+00:00"
873
  },
874
  {
875
  "name": "phpdocumentor/reflection-common",
1404
  "authors": [
1405
  {
1406
  "name": "Sebastian Bergmann",
1407
+ "email": "sebastian@phpunit.de",
1408
+ "role": "lead"
1409
  }
1410
  ],
1411
  "description": "The PHP Unit Testing framework.",
2043
  },
2044
  {
2045
  "name": "symfony/polyfill-ctype",
2046
+ "version": "v1.12.0",
2047
  "source": {
2048
  "type": "git",
2049
  "url": "https://github.com/symfony/polyfill-ctype.git",
2050
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
2051
  },
2052
  "dist": {
2053
  "type": "zip",
2054
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
2055
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
2056
  "shasum": ""
2057
  },
2058
  "require": {
2064
  "type": "library",
2065
  "extra": {
2066
  "branch-alias": {
2067
+ "dev-master": "1.12-dev"
2068
  }
2069
  },
2070
  "autoload": {
2080
  "MIT"
2081
  ],
2082
  "authors": [
 
 
 
 
2083
  {
2084
  "name": "Gert de Pagter",
2085
  "email": "BackEndTea@gmail.com"
2086
+ },
2087
+ {
2088
+ "name": "Symfony Community",
2089
+ "homepage": "https://symfony.com/contributors"
2090
  }
2091
  ],
2092
  "description": "Symfony polyfill for ctype functions",
2097
  "polyfill",
2098
  "portable"
2099
  ],
2100
+ "time": "2019-08-06T08:03:45+00:00"
2101
  },
2102
  {
2103
  "name": "symfony/yaml",
2104
+ "version": "v4.3.4",
2105
  "source": {
2106
  "type": "git",
2107
  "url": "https://github.com/symfony/yaml.git",
2108
+ "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686"
2109
  },
2110
  "dist": {
2111
  "type": "zip",
2112
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686",
2113
+ "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686",
2114
  "shasum": ""
2115
  },
2116
  "require": {
2156
  ],
2157
  "description": "Symfony Yaml Component",
2158
  "homepage": "https://symfony.com",
2159
+ "time": "2019-08-20T14:27:59+00:00"
2160
  },
2161
  {
2162
  "name": "webmozart/assert",
2163
+ "version": "1.5.0",
2164
  "source": {
2165
  "type": "git",
2166
  "url": "https://github.com/webmozart/assert.git",
2167
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
2168
  },
2169
  "dist": {
2170
  "type": "zip",
2171
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
2172
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
2173
  "shasum": ""
2174
  },
2175
  "require": {
2177
  "symfony/polyfill-ctype": "^1.8"
2178
  },
2179
  "require-dev": {
2180
+ "phpunit/phpunit": "^4.8.36 || ^7.5.13"
 
2181
  },
2182
  "type": "library",
2183
  "extra": {
2206
  "check",
2207
  "validate"
2208
  ],
2209
+ "time": "2019-08-24T08:43:50+00:00"
2210
  },
2211
  {
2212
  "name": "wp-coding-standards/wpcs",
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smili
4
  Requires at least: 4.7
5
  Tested up to: 5.2
6
  Requires PHP: 5.6
7
- Stable tag: 2.2.3
8
 
9
  Lazy Load your images and iframes, replace Youtube videos by a preview thumbnail.
10
 
@@ -85,6 +85,11 @@ You can also apply it manually. The element you want to apply lazyload on must h
85
  The element must have the class `rocket-lazyload`, and a `data-bg` attribute, which value is the CSS url for the image.
86
 
87
  == Changelog ==
 
 
 
 
 
88
  = 2.2.3 =
89
  * Enhancement: Improve compatibility for the picture element
90
  * Enhancement: Apply lazyload on background images set on section, span and li elements
4
  Requires at least: 4.7
5
  Tested up to: 5.2
6
  Requires PHP: 5.6
7
+ Stable tag: 2.3
8
 
9
  Lazy Load your images and iframes, replace Youtube videos by a preview thumbnail.
10
 
85
  The element must have the class `rocket-lazyload`, and a `data-bg` attribute, which value is the CSS url for the image.
86
 
87
  == Changelog ==
88
+ = 2.3 =
89
+ Enhancement: Add support for browser native lazyload
90
+ Bugfix: Prevent broken image in some cases for picture element
91
+ Bugfix: Prevent wrong lazy attributes for srcset and sizes on an image inside a picture element
92
+
93
  = 2.2.3 =
94
  * Enhancement: Improve compatibility for the picture element
95
  * Enhancement: Apply lazyload on background images set on section, span and li elements
rocket-lazy-load.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Lazy Load by WP Rocket
4
  * Plugin URI: http://wordpress.org/plugins/rocket-lazy-load/
5
  * Description: The tiny Lazy Load script for WordPress without jQuery or others libraries.
6
- * Version: 2.2.3
7
  * Author: WP Rocket
8
  * Author URI: https://wp-rocket.me
9
  * Text Domain: rocket-lazy-load
@@ -29,7 +29,7 @@
29
 
30
  defined('ABSPATH') || die('Cheatin\' uh?');
31
 
32
- define('ROCKET_LL_VERSION', '2.2.3');
33
  define('ROCKET_LL_WP_VERSION', '4.7');
34
  define('ROCKET_LL_PHP_VERSION', '5.6');
35
  define('ROCKET_LL_BASENAME', plugin_basename(__FILE__));
@@ -54,7 +54,7 @@ function rocket_lazyload_textdomain()
54
  $locale = get_locale();
55
 
56
  // This filter is documented in /wp-includes/l10n.php.
57
- $locale = apply_filters('plugin_locale', $locale, 'rocket-lazy-load'); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound.
58
  load_textdomain('rocket-lazy-load', WP_LANG_DIR . '/plugins/rocket-lazy-load-' . $locale . '.mo');
59
 
60
  load_plugin_textdomain('rocket-lazy-load', false, dirname(plugin_basename(__FILE__)) . '/languages/');
3
  * Plugin Name: Lazy Load by WP Rocket
4
  * Plugin URI: http://wordpress.org/plugins/rocket-lazy-load/
5
  * Description: The tiny Lazy Load script for WordPress without jQuery or others libraries.
6
+ * Version: 2.3
7
  * Author: WP Rocket
8
  * Author URI: https://wp-rocket.me
9
  * Text Domain: rocket-lazy-load
29
 
30
  defined('ABSPATH') || die('Cheatin\' uh?');
31
 
32
+ define('ROCKET_LL_VERSION', '2.3');
33
  define('ROCKET_LL_WP_VERSION', '4.7');
34
  define('ROCKET_LL_PHP_VERSION', '5.6');
35
  define('ROCKET_LL_BASENAME', plugin_basename(__FILE__));
54
  $locale = get_locale();
55
 
56
  // This filter is documented in /wp-includes/l10n.php.
57
+ $locale = apply_filters('plugin_locale', $locale, 'rocket-lazy-load'); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals
58
  load_textdomain('rocket-lazy-load', WP_LANG_DIR . '/plugins/rocket-lazy-load-' . $locale . '.mo');
59
 
60
  load_plugin_textdomain('rocket-lazy-load', false, dirname(plugin_basename(__FILE__)) . '/languages/');
src/Subscriber/LazyloadSubscriber.php CHANGED
@@ -138,21 +138,23 @@ class LazyloadSubscriber implements SubscriberInterface
138
 
139
  $script_args = [
140
  'base_url' => ROCKET_LL_FRONT_JS_URL,
141
- 'version' => '11.0.6',
142
  'polyfill' => $polyfill,
143
  ];
144
 
145
  $inline_args = [
146
  'threshold' => $threshold,
 
 
 
147
  ];
148
 
149
- if ($this->option_array->get('images')) {
150
- $inline_args['elements']['image'] = 'img[data-lazy-src]';
151
- $inline_args['elements']['background_image'] = '.rocket-lazyload';
152
  }
153
 
154
- if ($this->option_array->get('iframes')) {
155
- $inline_args['elements']['iframe'] = 'iframe[data-lazy-src]';
156
  }
157
 
158
  /**
138
 
139
  $script_args = [
140
  'base_url' => ROCKET_LL_FRONT_JS_URL,
141
+ 'version' => '12.0',
142
  'polyfill' => $polyfill,
143
  ];
144
 
145
  $inline_args = [
146
  'threshold' => $threshold,
147
+ 'options' => [
148
+ 'use_native' => 'true',
149
+ ],
150
  ];
151
 
152
+ if ($this->option_array->get('images') || $this->option_array->get('iframes')) {
153
+ $inline_args['elements']['loading'] = '[loading=lazy]';
 
154
  }
155
 
156
+ if ($this->option_array->get('images')) {
157
+ $inline_args['elements']['background_image'] = '.rocket-lazyload';
158
  }
159
 
160
  /**
vendor/composer/installed.json CHANGED
@@ -152,17 +152,17 @@
152
  },
153
  {
154
  "name": "composer/installers",
155
- "version": "v1.6.0",
156
- "version_normalized": "1.6.0.0",
157
  "source": {
158
  "type": "git",
159
  "url": "https://github.com/composer/installers.git",
160
- "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
161
  },
162
  "dist": {
163
  "type": "zip",
164
- "url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
165
- "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
166
  "shasum": ""
167
  },
168
  "require": {
@@ -176,7 +176,7 @@
176
  "composer/composer": "1.0.*@dev",
177
  "phpunit/phpunit": "^4.8.36"
178
  },
179
- "time": "2018-08-27T06:10:37+00:00",
180
  "type": "composer-plugin",
181
  "extra": {
182
  "class": "Composer\\Installers\\Plugin",
@@ -220,6 +220,7 @@
220
  "RadPHP",
221
  "SMF",
222
  "Thelia",
 
223
  "WolfCMS",
224
  "agl",
225
  "aimeos",
@@ -242,6 +243,7 @@
242
  "installer",
243
  "itop",
244
  "joomla",
 
245
  "kohana",
246
  "laravel",
247
  "lavalite",
@@ -274,17 +276,17 @@
274
  },
275
  {
276
  "name": "wp-media/rocket-lazyload-common",
277
- "version": "v2.4",
278
- "version_normalized": "2.4.0.0",
279
  "source": {
280
  "type": "git",
281
  "url": "https://github.com/wp-media/rocket-lazyload-common.git",
282
- "reference": "fcebb3db1687ce4f88854c6fbc67a36e8ae9e2bf"
283
  },
284
  "dist": {
285
  "type": "zip",
286
- "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/fcebb3db1687ce4f88854c6fbc67a36e8ae9e2bf",
287
- "reference": "fcebb3db1687ce4f88854c6fbc67a36e8ae9e2bf",
288
  "shasum": ""
289
  },
290
  "require": {
@@ -302,7 +304,7 @@
302
  "symfony/yaml": "2.8.*",
303
  "wp-coding-standards/wpcs": "^2.0.0"
304
  },
305
- "time": "2019-07-08T16:41:10+00:00",
306
  "type": "library",
307
  "installation-source": "dist",
308
  "autoload": {
152
  },
153
  {
154
  "name": "composer/installers",
155
+ "version": "v1.7.0",
156
+ "version_normalized": "1.7.0.0",
157
  "source": {
158
  "type": "git",
159
  "url": "https://github.com/composer/installers.git",
160
+ "reference": "141b272484481432cda342727a427dc1e206bfa0"
161
  },
162
  "dist": {
163
  "type": "zip",
164
+ "url": "https://api.github.com/repos/composer/installers/zipball/141b272484481432cda342727a427dc1e206bfa0",
165
+ "reference": "141b272484481432cda342727a427dc1e206bfa0",
166
  "shasum": ""
167
  },
168
  "require": {
176
  "composer/composer": "1.0.*@dev",
177
  "phpunit/phpunit": "^4.8.36"
178
  },
179
+ "time": "2019-08-12T15:00:31+00:00",
180
  "type": "composer-plugin",
181
  "extra": {
182
  "class": "Composer\\Installers\\Plugin",
220
  "RadPHP",
221
  "SMF",
222
  "Thelia",
223
+ "Whmcs",
224
  "WolfCMS",
225
  "agl",
226
  "aimeos",
243
  "installer",
244
  "itop",
245
  "joomla",
246
+ "known",
247
  "kohana",
248
  "laravel",
249
  "lavalite",
276
  },
277
  {
278
  "name": "wp-media/rocket-lazyload-common",
279
+ "version": "v2.5",
280
+ "version_normalized": "2.5.0.0",
281
  "source": {
282
  "type": "git",
283
  "url": "https://github.com/wp-media/rocket-lazyload-common.git",
284
+ "reference": "54e4e8b08293d113bf871e476d9cf899e9961391"
285
  },
286
  "dist": {
287
  "type": "zip",
288
+ "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/54e4e8b08293d113bf871e476d9cf899e9961391",
289
+ "reference": "54e4e8b08293d113bf871e476d9cf899e9961391",
290
  "shasum": ""
291
  },
292
  "require": {
304
  "symfony/yaml": "2.8.*",
305
  "wp-coding-standards/wpcs": "^2.0.0"
306
  },
307
+ "time": "2019-09-05T02:40:02+00:00",
308
  "type": "library",
309
  "installation-source": "dist",
310
  "autoload": {
vendor/composer/installers/composer.json CHANGED
@@ -31,6 +31,7 @@
31
  "iTop",
32
  "Joomla",
33
  "Kanboard",
 
34
  "Kohana",
35
  "Lan Management System",
36
  "Laravel",
@@ -65,6 +66,7 @@
65
  "symfony",
66
  "Thelia",
67
  "TYPO3",
 
68
  "WolfCMS",
69
  "WordPress",
70
  "YAWIK",
31
  "iTop",
32
  "Joomla",
33
  "Kanboard",
34
+ "Known",
35
  "Kohana",
36
  "Lan Management System",
37
  "Laravel",
66
  "symfony",
67
  "Thelia",
68
  "TYPO3",
69
+ "WHMCS",
70
  "WolfCMS",
71
  "WordPress",
72
  "YAWIK",
vendor/composer/installers/src/Composer/Installers/DframeInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class DframeInstaller extends BaseInstaller
6
+ {
7
+ protected $locations = array(
8
+ 'module' => 'modules/{$vendor}/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php CHANGED
@@ -4,13 +4,17 @@ namespace Composer\Installers;
4
  class DrupalInstaller extends BaseInstaller
5
  {
6
  protected $locations = array(
7
- 'core' => 'core/',
8
- 'module' => 'modules/{$name}/',
9
- 'theme' => 'themes/{$name}/',
10
- 'library' => 'libraries/{$name}/',
11
- 'profile' => 'profiles/{$name}/',
12
- 'drush' => 'drush/{$name}/',
13
- 'custom-theme' => 'themes/custom/{$name}/',
14
- 'custom-module' => 'modules/custom/{$name}/',
 
 
 
 
15
  );
16
  }
4
  class DrupalInstaller extends BaseInstaller
5
  {
6
  protected $locations = array(
7
+ 'core' => 'core/',
8
+ 'module' => 'modules/{$name}/',
9
+ 'theme' => 'themes/{$name}/',
10
+ 'library' => 'libraries/{$name}/',
11
+ 'profile' => 'profiles/{$name}/',
12
+ 'drush' => 'drush/{$name}/',
13
+ 'custom-theme' => 'themes/custom/{$name}/',
14
+ 'custom-module' => 'modules/custom/{$name}/',
15
+ 'custom-profile' => 'profiles/custom/{$name}/',
16
+ 'drupal-multisite' => 'sites/{$name}/',
17
+ 'console' => 'console/{$name}/',
18
+ 'console-language' => 'console/language/{$name}/',
19
  );
20
  }
vendor/composer/installers/src/Composer/Installers/Installer.php CHANGED
@@ -35,6 +35,7 @@ class Installer extends LibraryInstaller
35
  'concrete5' => 'Concrete5Installer',
36
  'craft' => 'CraftInstaller',
37
  'croogo' => 'CroogoInstaller',
 
38
  'dokuwiki' => 'DokuWikiInstaller',
39
  'dolibarr' => 'DolibarrInstaller',
40
  'decibel' => 'DecibelInstaller',
@@ -53,6 +54,7 @@ class Installer extends LibraryInstaller
53
  'joomla' => 'JoomlaInstaller',
54
  'kanboard' => 'KanboardInstaller',
55
  'kirby' => 'KirbyInstaller',
 
56
  'kodicms' => 'KodiCMSInstaller',
57
  'kohana' => 'KohanaInstaller',
58
  'lms' => 'LanManagementSystemInstaller',
@@ -85,6 +87,7 @@ class Installer extends LibraryInstaller
85
  'phifty' => 'PhiftyInstaller',
86
  'porto' => 'PortoInstaller',
87
  'redaxo' => 'RedaxoInstaller',
 
88
  'reindex' => 'ReIndexInstaller',
89
  'roundcube' => 'RoundcubeInstaller',
90
  'shopware' => 'ShopwareInstaller',
@@ -93,6 +96,7 @@ class Installer extends LibraryInstaller
93
  'smf' => 'SMFInstaller',
94
  'sydes' => 'SyDESInstaller',
95
  'symfony1' => 'Symfony1Installer',
 
96
  'thelia' => 'TheliaInstaller',
97
  'tusk' => 'TuskInstaller',
98
  'typo3-cms' => 'TYPO3CmsInstaller',
35
  'concrete5' => 'Concrete5Installer',
36
  'craft' => 'CraftInstaller',
37
  'croogo' => 'CroogoInstaller',
38
+ 'dframe' => 'DframeInstaller',
39
  'dokuwiki' => 'DokuWikiInstaller',
40
  'dolibarr' => 'DolibarrInstaller',
41
  'decibel' => 'DecibelInstaller',
54
  'joomla' => 'JoomlaInstaller',
55
  'kanboard' => 'KanboardInstaller',
56
  'kirby' => 'KirbyInstaller',
57
+ 'known' => 'KnownInstaller',
58
  'kodicms' => 'KodiCMSInstaller',
59
  'kohana' => 'KohanaInstaller',
60
  'lms' => 'LanManagementSystemInstaller',
87
  'phifty' => 'PhiftyInstaller',
88
  'porto' => 'PortoInstaller',
89
  'redaxo' => 'RedaxoInstaller',
90
+ 'redaxo5' => 'Redaxo5Installer',
91
  'reindex' => 'ReIndexInstaller',
92
  'roundcube' => 'RoundcubeInstaller',
93
  'shopware' => 'ShopwareInstaller',
96
  'smf' => 'SMFInstaller',
97
  'sydes' => 'SyDESInstaller',
98
  'symfony1' => 'Symfony1Installer',
99
+ 'tao' => 'TaoInstaller',
100
  'thelia' => 'TheliaInstaller',
101
  'tusk' => 'TuskInstaller',
102
  'typo3-cms' => 'TYPO3CmsInstaller',
vendor/composer/installers/src/Composer/Installers/KnownInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KnownInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'IdnoPlugins/{$name}/',
8
+ 'theme' => 'Themes/{$name}/',
9
+ 'console' => 'ConsolePlugins/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php CHANGED
@@ -4,12 +4,12 @@ namespace Composer\Installers;
4
  class MicroweberInstaller extends BaseInstaller
5
  {
6
  protected $locations = array(
7
- 'module' => 'userfiles/modules/{$name}/',
8
- 'module-skin' => 'userfiles/modules/{$name}/templates/',
9
- 'template' => 'userfiles/templates/{$name}/',
10
- 'element' => 'userfiles/elements/{$name}/',
11
- 'vendor' => 'vendor/{$name}/',
12
- 'components' => 'components/{$name}/'
13
  );
14
 
15
  /**
@@ -22,89 +22,97 @@ class MicroweberInstaller extends BaseInstaller
22
  */
23
  public function inflectPackageVars($vars)
24
  {
25
- if ($vars['type'] === 'microweber-template') {
26
- return $this->inflectTemplateVars($vars);
27
- }
28
- if ($vars['type'] === 'microweber-templates') {
29
- return $this->inflectTemplatesVars($vars);
30
- }
31
- if ($vars['type'] === 'microweber-core') {
32
- return $this->inflectCoreVars($vars);
33
- }
34
- if ($vars['type'] === 'microweber-adapter') {
35
- return $this->inflectCoreVars($vars);
36
- }
37
- if ($vars['type'] === 'microweber-module') {
38
- return $this->inflectModuleVars($vars);
39
- }
40
- if ($vars['type'] === 'microweber-modules') {
41
- return $this->inflectModulesVars($vars);
42
- }
43
- if ($vars['type'] === 'microweber-skin') {
44
- return $this->inflectSkinVars($vars);
45
- }
46
- if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
47
- return $this->inflectElementVars($vars);
 
 
 
 
 
 
 
48
  }
49
 
 
50
  return $vars;
51
  }
52
 
53
  protected function inflectTemplateVars($vars)
54
  {
55
- $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
56
- $vars['name'] = preg_replace('/template-$/', '', $vars['name']);
57
 
58
  return $vars;
59
  }
60
 
61
  protected function inflectTemplatesVars($vars)
62
  {
63
- $vars['name'] = preg_replace('/-templates$/', '', $vars['name']);
64
- $vars['name'] = preg_replace('/templates-$/', '', $vars['name']);
65
 
66
  return $vars;
67
  }
68
 
69
  protected function inflectCoreVars($vars)
70
  {
71
- $vars['name'] = preg_replace('/-providers$/', '', $vars['name']);
72
- $vars['name'] = preg_replace('/-provider$/', '', $vars['name']);
73
- $vars['name'] = preg_replace('/-adapter$/', '', $vars['name']);
74
 
75
  return $vars;
76
  }
77
 
78
  protected function inflectModuleVars($vars)
79
  {
80
- $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
81
- $vars['name'] = preg_replace('/module-$/', '', $vars['name']);
82
 
83
  return $vars;
84
  }
85
 
86
  protected function inflectModulesVars($vars)
87
  {
88
- $vars['name'] = preg_replace('/-modules$/', '', $vars['name']);
89
- $vars['name'] = preg_replace('/modules-$/', '', $vars['name']);
90
 
91
  return $vars;
92
  }
93
 
94
  protected function inflectSkinVars($vars)
95
  {
96
- $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
97
- $vars['name'] = preg_replace('/skin-$/', '', $vars['name']);
98
 
99
  return $vars;
100
  }
101
 
102
  protected function inflectElementVars($vars)
103
  {
104
- $vars['name'] = preg_replace('/-elements$/', '', $vars['name']);
105
- $vars['name'] = preg_replace('/elements-$/', '', $vars['name']);
106
- $vars['name'] = preg_replace('/-element$/', '', $vars['name']);
107
- $vars['name'] = preg_replace('/element-$/', '', $vars['name']);
108
 
109
  return $vars;
110
  }
4
  class MicroweberInstaller extends BaseInstaller
5
  {
6
  protected $locations = array(
7
+ 'module' => 'userfiles/modules/{$install_item_dir}/',
8
+ 'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
9
+ 'template' => 'userfiles/templates/{$install_item_dir}/',
10
+ 'element' => 'userfiles/elements/{$install_item_dir}/',
11
+ 'vendor' => 'vendor/{$install_item_dir}/',
12
+ 'components' => 'components/{$install_item_dir}/'
13
  );
14
 
15
  /**
22
  */
23
  public function inflectPackageVars($vars)
24
  {
25
+
26
+
27
+ if ($this->package->getTargetDir()) {
28
+ $vars['install_item_dir'] = $this->package->getTargetDir();
29
+ } else {
30
+ $vars['install_item_dir'] = $vars['name'];
31
+ if ($vars['type'] === 'microweber-template') {
32
+ return $this->inflectTemplateVars($vars);
33
+ }
34
+ if ($vars['type'] === 'microweber-templates') {
35
+ return $this->inflectTemplatesVars($vars);
36
+ }
37
+ if ($vars['type'] === 'microweber-core') {
38
+ return $this->inflectCoreVars($vars);
39
+ }
40
+ if ($vars['type'] === 'microweber-adapter') {
41
+ return $this->inflectCoreVars($vars);
42
+ }
43
+ if ($vars['type'] === 'microweber-module') {
44
+ return $this->inflectModuleVars($vars);
45
+ }
46
+ if ($vars['type'] === 'microweber-modules') {
47
+ return $this->inflectModulesVars($vars);
48
+ }
49
+ if ($vars['type'] === 'microweber-skin') {
50
+ return $this->inflectSkinVars($vars);
51
+ }
52
+ if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
53
+ return $this->inflectElementVars($vars);
54
+ }
55
  }
56
 
57
+
58
  return $vars;
59
  }
60
 
61
  protected function inflectTemplateVars($vars)
62
  {
63
+ $vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']);
64
+ $vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']);
65
 
66
  return $vars;
67
  }
68
 
69
  protected function inflectTemplatesVars($vars)
70
  {
71
+ $vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']);
72
+ $vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']);
73
 
74
  return $vars;
75
  }
76
 
77
  protected function inflectCoreVars($vars)
78
  {
79
+ $vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']);
80
+ $vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']);
81
+ $vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']);
82
 
83
  return $vars;
84
  }
85
 
86
  protected function inflectModuleVars($vars)
87
  {
88
+ $vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']);
89
+ $vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']);
90
 
91
  return $vars;
92
  }
93
 
94
  protected function inflectModulesVars($vars)
95
  {
96
+ $vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']);
97
+ $vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']);
98
 
99
  return $vars;
100
  }
101
 
102
  protected function inflectSkinVars($vars)
103
  {
104
+ $vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']);
105
+ $vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']);
106
 
107
  return $vars;
108
  }
109
 
110
  protected function inflectElementVars($vars)
111
  {
112
+ $vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']);
113
+ $vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']);
114
+ $vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']);
115
+ $vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']);
116
 
117
  return $vars;
118
  }
vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php CHANGED
@@ -20,6 +20,7 @@ class MoodleInstaller extends BaseInstaller
20
  'calendartype' => 'calendar/type/{$name}/',
21
  'format' => 'course/format/{$name}/',
22
  'coursereport' => 'course/report/{$name}/',
 
23
  'datafield' => 'mod/data/field/{$name}/',
24
  'datapreset' => 'mod/data/preset/{$name}/',
25
  'editor' => 'lib/editor/{$name}/',
20
  'calendartype' => 'calendar/type/{$name}/',
21
  'format' => 'course/format/{$name}/',
22
  'coursereport' => 'course/report/{$name}/',
23
+ 'customcertelement' => 'mod/customcert/element/{$name}/',
24
  'datafield' => 'mod/data/field/{$name}/',
25
  'datapreset' => 'mod/data/preset/{$name}/',
26
  'editor' => 'lib/editor/{$name}/',
vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class Redaxo5Installer extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'addon' => 'redaxo/src/addons/{$name}/',
8
+ 'bestyle-plugin' => 'redaxo/src/addons/be_style/plugins/{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/TaoInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle TAO extensions.
6
+ */
7
+ class TaoInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'extension' => '{$name}'
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php CHANGED
@@ -5,6 +5,17 @@ namespace Composer\Installers;
5
  class WHMCSInstaller extends BaseInstaller
6
  {
7
  protected $locations = array(
8
- 'gateway' => 'modules/gateways/{$name}/',
 
 
 
 
 
 
 
 
 
 
 
9
  );
10
  }
5
  class WHMCSInstaller extends BaseInstaller
6
  {
7
  protected $locations = array(
8
+ 'addons' => 'modules/addons/{$vendor}_{$name}/',
9
+ 'fraud' => 'modules/fraud/{$vendor}_{$name}/',
10
+ 'gateways' => 'modules/gateways/{$vendor}_{$name}/',
11
+ 'notifications' => 'modules/notifications/{$vendor}_{$name}/',
12
+ 'registrars' => 'modules/registrars/{$vendor}_{$name}/',
13
+ 'reports' => 'modules/reports/{$vendor}_{$name}/',
14
+ 'security' => 'modules/security/{$vendor}_{$name}/',
15
+ 'servers' => 'modules/servers/{$vendor}_{$name}/',
16
+ 'social' => 'modules/social/{$vendor}_{$name}/',
17
+ 'support' => 'modules/support/{$vendor}_{$name}/',
18
+ 'templates' => 'templates/{$vendor}_{$name}/',
19
+ 'includes' => 'includes/{$vendor}_{$name}/'
20
  );
21
  }
vendor/wp-media/rocket-lazyload-common/composer.lock CHANGED
@@ -50,16 +50,16 @@
50
  },
51
  {
52
  "name": "brain/monkey",
53
- "version": "2.2.0",
54
  "source": {
55
  "type": "git",
56
  "url": "https://github.com/Brain-WP/BrainMonkey.git",
57
- "reference": "ed9e0698bc1292f33698719da8ca1aa2e18acc51"
58
  },
59
  "dist": {
60
  "type": "zip",
61
- "url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/ed9e0698bc1292f33698719da8ca1aa2e18acc51",
62
- "reference": "ed9e0698bc1292f33698719da8ca1aa2e18acc51",
63
  "shasum": ""
64
  },
65
  "require": {
@@ -92,9 +92,9 @@
92
  "authors": [
93
  {
94
  "name": "Giuseppe Mazzapica",
 
95
  "email": "giuseppe.mazzapica@gmail.com",
96
- "homepage": "https://gmazzap.me",
97
- "role": "Developer"
98
  }
99
  ],
100
  "description": "Mocking utility for PHP functions and WordPress plugin API",
@@ -110,7 +110,7 @@
110
  "test",
111
  "testing"
112
  ],
113
- "time": "2017-12-01T16:32:09+00:00"
114
  },
115
  {
116
  "name": "dealerdirect/phpcodesniffer-composer-installer",
@@ -282,16 +282,16 @@
282
  },
283
  {
284
  "name": "mockery/mockery",
285
- "version": "1.2.2",
286
  "source": {
287
  "type": "git",
288
  "url": "https://github.com/mockery/mockery.git",
289
- "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2"
290
  },
291
  "dist": {
292
  "type": "zip",
293
- "url": "https://api.github.com/repos/mockery/mockery/zipball/0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2",
294
- "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2",
295
  "shasum": ""
296
  },
297
  "require": {
@@ -343,7 +343,7 @@
343
  "test double",
344
  "testing"
345
  ],
346
- "time": "2019-02-13T09:37:52+00:00"
347
  },
348
  {
349
  "name": "myclabs/deep-copy",
@@ -389,16 +389,16 @@
389
  },
390
  {
391
  "name": "phpcompatibility/php-compatibility",
392
- "version": "9.1.1",
393
  "source": {
394
  "type": "git",
395
  "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
396
- "reference": "2b63c5d284ab8857f7b1d5c240ddb507a6b2293c"
397
  },
398
  "dist": {
399
  "type": "zip",
400
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/2b63c5d284ab8857f7b1d5c240ddb507a6b2293c",
401
- "reference": "2b63c5d284ab8857f7b1d5c240ddb507a6b2293c",
402
  "shasum": ""
403
  },
404
  "require": {
@@ -412,7 +412,7 @@
412
  "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
413
  },
414
  "suggest": {
415
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
416
  "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
417
  },
418
  "type": "phpcodesniffer-standard",
@@ -421,10 +421,6 @@
421
  "LGPL-3.0-or-later"
422
  ],
423
  "authors": [
424
- {
425
- "name": "Contributors",
426
- "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
427
- },
428
  {
429
  "name": "Wim Godden",
430
  "homepage": "https://github.com/wimg",
@@ -434,6 +430,10 @@
434
  "name": "Juliette Reinders Folmer",
435
  "homepage": "https://github.com/jrfnl",
436
  "role": "lead"
 
 
 
 
437
  }
438
  ],
439
  "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
@@ -443,30 +443,32 @@
443
  "phpcs",
444
  "standards"
445
  ],
446
- "time": "2018-12-30T23:16:27+00:00"
447
  },
448
  {
449
  "name": "phpcompatibility/phpcompatibility-paragonie",
450
- "version": "1.0.1",
451
  "source": {
452
  "type": "git",
453
  "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
454
- "reference": "9160de79fcd683b5c99e9c4133728d91529753ea"
455
  },
456
  "dist": {
457
  "type": "zip",
458
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/9160de79fcd683b5c99e9c4133728d91529753ea",
459
- "reference": "9160de79fcd683b5c99e9c4133728d91529753ea",
460
  "shasum": ""
461
  },
462
  "require": {
463
  "phpcompatibility/php-compatibility": "^9.0"
464
  },
465
  "require-dev": {
466
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4"
 
 
467
  },
468
  "suggest": {
469
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
470
  "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
471
  },
472
  "type": "phpcodesniffer-standard",
@@ -493,20 +495,20 @@
493
  "polyfill",
494
  "standards"
495
  ],
496
- "time": "2018-12-16T19:10:44+00:00"
497
  },
498
  {
499
  "name": "phpcompatibility/phpcompatibility-wp",
500
- "version": "2.0.0",
501
  "source": {
502
  "type": "git",
503
  "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
504
- "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd"
505
  },
506
  "dist": {
507
  "type": "zip",
508
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/cb303f0067cd5b366a41d4fb0e254fb40ff02efd",
509
- "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd",
510
  "shasum": ""
511
  },
512
  "require": {
@@ -514,10 +516,10 @@
514
  "phpcompatibility/phpcompatibility-paragonie": "^1.0"
515
  },
516
  "require-dev": {
517
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3"
518
  },
519
  "suggest": {
520
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
521
  "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
522
  },
523
  "type": "phpcodesniffer-standard",
@@ -543,7 +545,7 @@
543
  "standards",
544
  "wordpress"
545
  ],
546
- "time": "2018-10-07T18:31:37+00:00"
547
  },
548
  {
549
  "name": "phpdocumentor/reflection-common",
@@ -693,16 +695,16 @@
693
  },
694
  {
695
  "name": "phpspec/prophecy",
696
- "version": "1.8.0",
697
  "source": {
698
  "type": "git",
699
  "url": "https://github.com/phpspec/prophecy.git",
700
- "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
701
  },
702
  "dist": {
703
  "type": "zip",
704
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
705
- "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
706
  "shasum": ""
707
  },
708
  "require": {
@@ -723,8 +725,8 @@
723
  }
724
  },
725
  "autoload": {
726
- "psr-0": {
727
- "Prophecy\\": "src/"
728
  }
729
  },
730
  "notification-url": "https://packagist.org/downloads/",
@@ -752,7 +754,7 @@
752
  "spy",
753
  "stub"
754
  ],
755
- "time": "2018-08-05T17:53:17+00:00"
756
  },
757
  {
758
  "name": "phpunit/php-code-coverage",
@@ -1659,16 +1661,16 @@
1659
  },
1660
  {
1661
  "name": "squizlabs/php_codesniffer",
1662
- "version": "3.4.0",
1663
  "source": {
1664
  "type": "git",
1665
  "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
1666
- "reference": "379deb987e26c7cd103a7b387aea178baec96e48"
1667
  },
1668
  "dist": {
1669
  "type": "zip",
1670
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48",
1671
- "reference": "379deb987e26c7cd103a7b387aea178baec96e48",
1672
  "shasum": ""
1673
  },
1674
  "require": {
@@ -1701,25 +1703,25 @@
1701
  }
1702
  ],
1703
  "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
1704
- "homepage": "http://www.squizlabs.com/php-codesniffer",
1705
  "keywords": [
1706
  "phpcs",
1707
  "standards"
1708
  ],
1709
- "time": "2018-12-19T23:57:18+00:00"
1710
  },
1711
  {
1712
  "name": "symfony/polyfill-ctype",
1713
- "version": "v1.10.0",
1714
  "source": {
1715
  "type": "git",
1716
  "url": "https://github.com/symfony/polyfill-ctype.git",
1717
- "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
1718
  },
1719
  "dist": {
1720
  "type": "zip",
1721
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
1722
- "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
1723
  "shasum": ""
1724
  },
1725
  "require": {
@@ -1731,7 +1733,7 @@
1731
  "type": "library",
1732
  "extra": {
1733
  "branch-alias": {
1734
- "dev-master": "1.9-dev"
1735
  }
1736
  },
1737
  "autoload": {
@@ -1748,12 +1750,12 @@
1748
  ],
1749
  "authors": [
1750
  {
1751
- "name": "Symfony Community",
1752
- "homepage": "https://symfony.com/contributors"
1753
  },
1754
  {
1755
- "name": "Gert de Pagter",
1756
- "email": "backendtea@gmail.com"
1757
  }
1758
  ],
1759
  "description": "Symfony polyfill for ctype functions",
@@ -1764,11 +1766,11 @@
1764
  "polyfill",
1765
  "portable"
1766
  ],
1767
- "time": "2018-08-06T14:22:27+00:00"
1768
  },
1769
  {
1770
  "name": "symfony/yaml",
1771
- "version": "v2.8.49",
1772
  "source": {
1773
  "type": "git",
1774
  "url": "https://github.com/symfony/yaml.git",
@@ -1818,16 +1820,16 @@
1818
  },
1819
  {
1820
  "name": "webmozart/assert",
1821
- "version": "1.4.0",
1822
  "source": {
1823
  "type": "git",
1824
  "url": "https://github.com/webmozart/assert.git",
1825
- "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
1826
  },
1827
  "dist": {
1828
  "type": "zip",
1829
- "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
1830
- "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
1831
  "shasum": ""
1832
  },
1833
  "require": {
@@ -1835,8 +1837,7 @@
1835
  "symfony/polyfill-ctype": "^1.8"
1836
  },
1837
  "require-dev": {
1838
- "phpunit/phpunit": "^4.6",
1839
- "sebastian/version": "^1.0.1"
1840
  },
1841
  "type": "library",
1842
  "extra": {
@@ -1865,20 +1866,20 @@
1865
  "check",
1866
  "validate"
1867
  ],
1868
- "time": "2018-12-25T11:19:39+00:00"
1869
  },
1870
  {
1871
  "name": "wp-coding-standards/wpcs",
1872
- "version": "2.0.0",
1873
  "source": {
1874
  "type": "git",
1875
- "url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git",
1876
- "reference": "c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce"
1877
  },
1878
  "dist": {
1879
  "type": "zip",
1880
- "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce",
1881
- "reference": "c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce",
1882
  "shasum": ""
1883
  },
1884
  "require": {
@@ -1891,7 +1892,7 @@
1891
  "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
1892
  },
1893
  "suggest": {
1894
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
1895
  },
1896
  "type": "phpcodesniffer-standard",
1897
  "notification-url": "https://packagist.org/downloads/",
@@ -1910,7 +1911,7 @@
1910
  "standards",
1911
  "wordpress"
1912
  ],
1913
- "time": "2019-01-16T10:13:16+00:00"
1914
  }
1915
  ],
1916
  "aliases": [],
50
  },
51
  {
52
  "name": "brain/monkey",
53
+ "version": "2.3.1",
54
  "source": {
55
  "type": "git",
56
  "url": "https://github.com/Brain-WP/BrainMonkey.git",
57
+ "reference": "74cdccad5dbb7edc59f59e1ad6ef392f83a34776"
58
  },
59
  "dist": {
60
  "type": "zip",
61
+ "url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/74cdccad5dbb7edc59f59e1ad6ef392f83a34776",
62
+ "reference": "74cdccad5dbb7edc59f59e1ad6ef392f83a34776",
63
  "shasum": ""
64
  },
65
  "require": {
92
  "authors": [
93
  {
94
  "name": "Giuseppe Mazzapica",
95
+ "role": "Developer",
96
  "email": "giuseppe.mazzapica@gmail.com",
97
+ "homepage": "https://gmazzap.me"
 
98
  }
99
  ],
100
  "description": "Mocking utility for PHP functions and WordPress plugin API",
110
  "test",
111
  "testing"
112
  ],
113
+ "time": "2019-07-26T19:00:28+00:00"
114
  },
115
  {
116
  "name": "dealerdirect/phpcodesniffer-composer-installer",
282
  },
283
  {
284
  "name": "mockery/mockery",
285
+ "version": "1.2.3",
286
  "source": {
287
  "type": "git",
288
  "url": "https://github.com/mockery/mockery.git",
289
+ "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031"
290
  },
291
  "dist": {
292
  "type": "zip",
293
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/4eff936d83eb809bde2c57a3cea0ee9643769031",
294
+ "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031",
295
  "shasum": ""
296
  },
297
  "require": {
343
  "test double",
344
  "testing"
345
  ],
346
+ "time": "2019-08-07T15:01:07+00:00"
347
  },
348
  {
349
  "name": "myclabs/deep-copy",
389
  },
390
  {
391
  "name": "phpcompatibility/php-compatibility",
392
+ "version": "9.3.0",
393
  "source": {
394
  "type": "git",
395
  "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
396
+ "reference": "06cc8d2c2ed62a70f52963dbdf5eaa1ec0fe34c5"
397
  },
398
  "dist": {
399
  "type": "zip",
400
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/06cc8d2c2ed62a70f52963dbdf5eaa1ec0fe34c5",
401
+ "reference": "06cc8d2c2ed62a70f52963dbdf5eaa1ec0fe34c5",
402
  "shasum": ""
403
  },
404
  "require": {
412
  "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
413
  },
414
  "suggest": {
415
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
416
  "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
417
  },
418
  "type": "phpcodesniffer-standard",
421
  "LGPL-3.0-or-later"
422
  ],
423
  "authors": [
 
 
 
 
424
  {
425
  "name": "Wim Godden",
426
  "homepage": "https://github.com/wimg",
430
  "name": "Juliette Reinders Folmer",
431
  "homepage": "https://github.com/jrfnl",
432
  "role": "lead"
433
+ },
434
+ {
435
+ "name": "Contributors",
436
+ "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
437
  }
438
  ],
439
  "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
443
  "phpcs",
444
  "standards"
445
  ],
446
+ "time": "2019-08-28T15:29:06+00:00"
447
  },
448
  {
449
  "name": "phpcompatibility/phpcompatibility-paragonie",
450
+ "version": "1.1.0",
451
  "source": {
452
  "type": "git",
453
  "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
454
+ "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936"
455
  },
456
  "dist": {
457
  "type": "zip",
458
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
459
+ "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
460
  "shasum": ""
461
  },
462
  "require": {
463
  "phpcompatibility/php-compatibility": "^9.0"
464
  },
465
  "require-dev": {
466
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5",
467
+ "paragonie/random_compat": "dev-master",
468
+ "paragonie/sodium_compat": "dev-master"
469
  },
470
  "suggest": {
471
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
472
  "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
473
  },
474
  "type": "phpcodesniffer-standard",
495
  "polyfill",
496
  "standards"
497
  ],
498
+ "time": "2019-08-28T15:58:19+00:00"
499
  },
500
  {
501
  "name": "phpcompatibility/phpcompatibility-wp",
502
+ "version": "2.1.0",
503
  "source": {
504
  "type": "git",
505
  "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
506
+ "reference": "41bef18ba688af638b7310666db28e1ea9158b2f"
507
  },
508
  "dist": {
509
  "type": "zip",
510
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/41bef18ba688af638b7310666db28e1ea9158b2f",
511
+ "reference": "41bef18ba688af638b7310666db28e1ea9158b2f",
512
  "shasum": ""
513
  },
514
  "require": {
516
  "phpcompatibility/phpcompatibility-paragonie": "^1.0"
517
  },
518
  "require-dev": {
519
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5"
520
  },
521
  "suggest": {
522
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
523
  "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
524
  },
525
  "type": "phpcodesniffer-standard",
545
  "standards",
546
  "wordpress"
547
  ],
548
+ "time": "2019-08-28T14:22:28+00:00"
549
  },
550
  {
551
  "name": "phpdocumentor/reflection-common",
695
  },
696
  {
697
  "name": "phpspec/prophecy",
698
+ "version": "1.8.1",
699
  "source": {
700
  "type": "git",
701
  "url": "https://github.com/phpspec/prophecy.git",
702
+ "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76"
703
  },
704
  "dist": {
705
  "type": "zip",
706
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
707
+ "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
708
  "shasum": ""
709
  },
710
  "require": {
725
  }
726
  },
727
  "autoload": {
728
+ "psr-4": {
729
+ "Prophecy\\": "src/Prophecy"
730
  }
731
  },
732
  "notification-url": "https://packagist.org/downloads/",
754
  "spy",
755
  "stub"
756
  ],
757
+ "time": "2019-06-13T12:50:23+00:00"
758
  },
759
  {
760
  "name": "phpunit/php-code-coverage",
1661
  },
1662
  {
1663
  "name": "squizlabs/php_codesniffer",
1664
+ "version": "3.4.2",
1665
  "source": {
1666
  "type": "git",
1667
  "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
1668
+ "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8"
1669
  },
1670
  "dist": {
1671
  "type": "zip",
1672
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
1673
+ "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
1674
  "shasum": ""
1675
  },
1676
  "require": {
1703
  }
1704
  ],
1705
  "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
1706
+ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
1707
  "keywords": [
1708
  "phpcs",
1709
  "standards"
1710
  ],
1711
+ "time": "2019-04-10T23:49:02+00:00"
1712
  },
1713
  {
1714
  "name": "symfony/polyfill-ctype",
1715
+ "version": "v1.12.0",
1716
  "source": {
1717
  "type": "git",
1718
  "url": "https://github.com/symfony/polyfill-ctype.git",
1719
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
1720
  },
1721
  "dist": {
1722
  "type": "zip",
1723
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
1724
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
1725
  "shasum": ""
1726
  },
1727
  "require": {
1733
  "type": "library",
1734
  "extra": {
1735
  "branch-alias": {
1736
+ "dev-master": "1.12-dev"
1737
  }
1738
  },
1739
  "autoload": {
1750
  ],
1751
  "authors": [
1752
  {
1753
+ "name": "Gert de Pagter",
1754
+ "email": "BackEndTea@gmail.com"
1755
  },
1756
  {
1757
+ "name": "Symfony Community",
1758
+ "homepage": "https://symfony.com/contributors"
1759
  }
1760
  ],
1761
  "description": "Symfony polyfill for ctype functions",
1766
  "polyfill",
1767
  "portable"
1768
  ],
1769
+ "time": "2019-08-06T08:03:45+00:00"
1770
  },
1771
  {
1772
  "name": "symfony/yaml",
1773
+ "version": "v2.8.50",
1774
  "source": {
1775
  "type": "git",
1776
  "url": "https://github.com/symfony/yaml.git",
1820
  },
1821
  {
1822
  "name": "webmozart/assert",
1823
+ "version": "1.5.0",
1824
  "source": {
1825
  "type": "git",
1826
  "url": "https://github.com/webmozart/assert.git",
1827
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
1828
  },
1829
  "dist": {
1830
  "type": "zip",
1831
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
1832
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
1833
  "shasum": ""
1834
  },
1835
  "require": {
1837
  "symfony/polyfill-ctype": "^1.8"
1838
  },
1839
  "require-dev": {
1840
+ "phpunit/phpunit": "^4.8.36 || ^7.5.13"
 
1841
  },
1842
  "type": "library",
1843
  "extra": {
1866
  "check",
1867
  "validate"
1868
  ],
1869
+ "time": "2019-08-24T08:43:50+00:00"
1870
  },
1871
  {
1872
  "name": "wp-coding-standards/wpcs",
1873
+ "version": "2.1.1",
1874
  "source": {
1875
  "type": "git",
1876
+ "url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
1877
+ "reference": "bd9c33152115e6741e3510ff7189605b35167908"
1878
  },
1879
  "dist": {
1880
  "type": "zip",
1881
+ "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bd9c33152115e6741e3510ff7189605b35167908",
1882
+ "reference": "bd9c33152115e6741e3510ff7189605b35167908",
1883
  "shasum": ""
1884
  },
1885
  "require": {
1892
  "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
1893
  },
1894
  "suggest": {
1895
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
1896
  },
1897
  "type": "phpcodesniffer-standard",
1898
  "notification-url": "https://packagist.org/downloads/",
1911
  "standards",
1912
  "wordpress"
1913
  ],
1914
+ "time": "2019-05-21T02:50:00+00:00"
1915
  }
1916
  ],
1917
  "aliases": [],
vendor/wp-media/rocket-lazyload-common/src/Assets.php CHANGED
@@ -27,7 +27,7 @@ class Assets
27
  * Gets the inline lazyload script configuration
28
  *
29
  * @param array $args Array of arguments to populate the lazyload script options.
30
- * @return void
31
  */
32
  public function getInlineLazyloadScript($args = [])
33
  {
27
  * Gets the inline lazyload script configuration
28
  *
29
  * @param array $args Array of arguments to populate the lazyload script options.
30
+ * @return string
31
  */
32
  public function getInlineLazyloadScript($args = [])
33
  {
vendor/wp-media/rocket-lazyload-common/src/Iframe.php CHANGED
@@ -107,8 +107,6 @@ class Iframe
107
  'data-no-lazy=',
108
  'recaptcha/api/fallback',
109
  'loading="eager"',
110
- 'loading="lazy"',
111
- 'loading="auto"',
112
  ]
113
  );
114
  }
@@ -133,6 +131,10 @@ class Iframe
133
  $placeholder_atts = str_replace($iframe['src'], $placeholder, $iframe['atts']);
134
  $iframe_lazyload = str_replace($iframe['atts'], $placeholder_atts . ' data-rocket-lazyload="fitvidscompatible" data-lazy-src="' . esc_url($iframe['src']) . '"', $iframe[0]);
135
 
 
 
 
 
136
  /**
137
  * Filter the LazyLoad HTML output on iframes
138
  *
107
  'data-no-lazy=',
108
  'recaptcha/api/fallback',
109
  'loading="eager"',
 
 
110
  ]
111
  );
112
  }
131
  $placeholder_atts = str_replace($iframe['src'], $placeholder, $iframe['atts']);
132
  $iframe_lazyload = str_replace($iframe['atts'], $placeholder_atts . ' data-rocket-lazyload="fitvidscompatible" data-lazy-src="' . esc_url($iframe['src']) . '"', $iframe[0]);
133
 
134
+ if (! preg_match('@\sloading\s*=\s*(\'|")(?:lazy|auto)\1@i', $iframe_lazyload)) {
135
+ $iframe_lazyload = str_replace('<iframe', '<iframe loading="lazy"', $iframe_lazyload);
136
+ }
137
+
138
  /**
139
  * Filter the LazyLoad HTML output on iframes
140
  *
vendor/wp-media/rocket-lazyload-common/src/Image.php CHANGED
@@ -34,8 +34,9 @@ class Image
34
  continue;
35
  }
36
 
37
- $image_lazyload = $this->replaceImage($image);
38
- $html = str_replace($image[0], $image_lazyload, $html);
 
39
 
40
  unset($image_lazyload);
41
  }
@@ -139,17 +140,17 @@ class Image
139
  continue;
140
  }
141
 
142
- if (! preg_match('#<img(?<atts>\s.+)\s?/?>#is', $picture[0], $img)) {
143
  continue;
144
  }
145
 
146
- if (! $this->canLazyload($img)) {
 
 
147
  continue;
148
  }
149
 
150
- $img_lazy = preg_replace('/([\s"\'])src/i', '\1data-lazy-src', $img[0]);
151
- $img_lazy = $this->addLazyClass($img_lazy);
152
- $img_lazy = apply_filters('rocket_lazyload_html', $img_lazy);
153
  $html = str_replace($img[0], $img_lazy, $html);
154
 
155
  unset($img_lazy);
@@ -253,8 +254,6 @@ class Image
253
  'class="ls-l',
254
  'class="ls-bg',
255
  'soliloquy-image',
256
- 'loading="auto"',
257
- 'loading="lazy"',
258
  'loading="eager"',
259
  'swatch-img',
260
  'data-height-percentage',
@@ -312,6 +311,10 @@ class Image
312
 
313
  $image_lazyload = str_replace($image['atts'], $placeholder_atts . ' data-lazy-src="' . $image['src'] . '"', $image[0]);
314
 
 
 
 
 
315
  /**
316
  * Filter the LazyLoad HTML output
317
  *
@@ -319,12 +322,22 @@ class Image
319
  *
320
  * @param string $html Output that will be printed
321
  */
322
- $image_lazyload = apply_filters('rocket_lazyload_html', $image_lazyload);
323
- $image_lazyload .= '<noscript>' . $image[0] . '</noscript>';
324
 
325
  return $image_lazyload;
326
  }
327
 
 
 
 
 
 
 
 
 
 
 
 
328
  /**
329
  * Applies lazyload on srcset and sizes attributes
330
  *
@@ -333,13 +346,8 @@ class Image
333
  */
334
  public function lazyloadResponsiveAttributes($html)
335
  {
336
- if (preg_match('/srcset=("(?:[^"]+)"|\'(?:[^\']+)\'|(?:[^ >]+))/i', $html)) {
337
- $html = str_replace('srcset=', 'data-lazy-srcset=', $html);
338
- }
339
-
340
- if (preg_match('/sizes=("(?:[^"]+)"|\'(?:[^\']+)\'|(?:[^ >]+))/i', $html)) {
341
- $html = str_replace('sizes=', 'data-lazy-sizes=', $html);
342
- }
343
 
344
  return $html;
345
  }
34
  continue;
35
  }
36
 
37
+ $image_lazyload = $this->replaceImage($image);
38
+ $image_lazyload .= $this->noscript($image[0]);
39
+ $html = str_replace($image[0], $image_lazyload, $html);
40
 
41
  unset($image_lazyload);
42
  }
140
  continue;
141
  }
142
 
143
+ if (! preg_match('#<img(?<atts>\s.+)\s?/?>#iUs', $picture[0], $img)) {
144
  continue;
145
  }
146
 
147
+ $img = $this->canLazyload($img);
148
+
149
+ if (! $img) {
150
  continue;
151
  }
152
 
153
+ $img_lazy = $this->replaceImage($img);
 
 
154
  $html = str_replace($img[0], $img_lazy, $html);
155
 
156
  unset($img_lazy);
254
  'class="ls-l',
255
  'class="ls-bg',
256
  'soliloquy-image',
 
 
257
  'loading="eager"',
258
  'swatch-img',
259
  'data-height-percentage',
311
 
312
  $image_lazyload = str_replace($image['atts'], $placeholder_atts . ' data-lazy-src="' . $image['src'] . '"', $image[0]);
313
 
314
+ if (! preg_match('@\sloading\s*=\s*(\'|")(?:lazy|auto)\1@i', $image_lazyload)) {
315
+ $image_lazyload = str_replace('<img', '<img loading="lazy"', $image_lazyload);
316
+ }
317
+
318
  /**
319
  * Filter the LazyLoad HTML output
320
  *
322
  *
323
  * @param string $html Output that will be printed
324
  */
325
+ $image_lazyload = apply_filters('rocket_lazyload_html', $image_lazyload);
 
326
 
327
  return $image_lazyload;
328
  }
329
 
330
+ /**
331
+ * Returns the HTML tag wrapped inside noscript tags
332
+ *
333
+ * @param string $element Element to wrap.
334
+ * @return string
335
+ */
336
+ private function noscript($element)
337
+ {
338
+ return '<noscript>' . $element . '</noscript>';
339
+ }
340
+
341
  /**
342
  * Applies lazyload on srcset and sizes attributes
343
  *
346
  */
347
  public function lazyloadResponsiveAttributes($html)
348
  {
349
+ $html = preg_replace('/[\s|"|\'](srcset)\s*=\s*("|\')([^"|\']+)\2/i', ' data-lazy-$1=$2$3$2', $html);
350
+ $html = preg_replace('/[\s|"|\'](sizes)\s*=\s*("|\')([^"|\']+)\2/i', ' data-lazy-$1=$2$3$2', $html);
 
 
 
 
 
351
 
352
  return $html;
353
  }