Lazy Load by WP Rocket - Version 1.4.5

Version Description

  • Rename Setting Page Name in WP Menu
  • New Product Banner in Settings Page
  • Conditionally load a different version of the script depending on browser support of IntersectionObserver
  • Fix a bug where images initially hidden are not correctly displayed when coming into view (slider, tabs, accordion)
Download this release

Release Info

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

Code changes from version 1.4.4 to 1.4.5

admin/actions.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
+
4
+ /**
5
+ * Manage the dismissed boxes
6
+ *
7
+ * @since 2.4 Add a delete_transient on function name (box name)
8
+ * @since 1.3.0 $args can replace $_GET when called internaly
9
+ * @since 1.1.10
10
+ *
11
+ * @param array $args An array of query args.
12
+ */
13
+ function rocket_lazyload_dismiss_boxes( $args ) {
14
+ $args = empty( $args ) ? $_GET : $args;
15
+
16
+ if ( isset( $args['box'], $args['_wpnonce'] ) ) {
17
+
18
+ if ( ! wp_verify_nonce( $args['_wpnonce'], $args['action'] . '_' . $args['box'] ) ) {
19
+ if ( defined( 'DOING_AJAX' ) ) {
20
+ wp_send_json( array( 'error' => 1 ) );
21
+ } else {
22
+ wp_nonce_ays( '' );
23
+ }
24
+ }
25
+
26
+ if ( '__rocket_lazyload_imagify_notice' === $args['box'] ) {
27
+ update_option( 'rocket_lazyload_dismiss_imagify_notice', 0 );
28
+ }
29
+
30
+ global $current_user;
31
+ $actual = get_user_meta( $current_user->ID, 'rocket_lazyload_boxes', true );
32
+ $actual = array_merge( (array) $actual, array( $args['box'] ) );
33
+ $actual = array_filter( $actual );
34
+ $actual = array_unique( $actual );
35
+ update_user_meta( $current_user->ID, 'rocket_lazyload_boxes', $actual );
36
+ delete_transient( $args['box'] );
37
+
38
+ if ( 'admin-post.php' === $GLOBALS['pagenow'] ) {
39
+ if ( defined( 'DOING_AJAX' ) ) {
40
+ wp_send_json( array( 'error' => 0 ) );
41
+ } else {
42
+ wp_safe_redirect( wp_get_referer() );
43
+ die();
44
+ }
45
+ }
46
+ }
47
+ }
48
+ add_action( 'wp_ajax_rocket_lazyload_ignore', 'rocket_lazyload_dismiss_boxes' );
49
+ add_action( 'admin_post_rocket_lazyload_ignore', 'rocket_lazyload_dismiss_boxes' );
admin/admin.php CHANGED
@@ -8,7 +8,7 @@ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
8
  * @return void
9
  */
10
  function rocket_lazyload_add_menu() {
11
- add_options_page( __( 'Rocket LazyLoad', 'rocket-lazy-load' ), __( 'Rocket LazyLoad', 'rocket-lazy-load' ), 'manage_options', 'rocket-lazyload', 'rocket_lazyload_options_output' );
12
  }
13
  add_action( 'admin_menu', 'rocket_lazyload_add_menu' );
14
 
@@ -70,6 +70,7 @@ function rocket_lazyload_options_output() {
70
 
71
  ?>
72
  <div class="wrap rocket-lazyload-settings">
 
73
  <?php $heading_tag = version_compare( $wp_version, '4.3' ) >= 0 ? 'h1' : 'h2'; ?>
74
  <<?php echo $heading_tag; ?> class="screen-reader-text"><?php echo esc_html( get_admin_page_title() ); ?></<?php echo $heading_tag; ?>>
75
  <div class="rocket-lazyload-header">
8
  * @return void
9
  */
10
  function rocket_lazyload_add_menu() {
11
+ add_options_page( __( 'LazyLoad by WP Rocket', 'rocket-lazy-load' ), __( 'LazyLoad', 'rocket-lazy-load' ), 'manage_options', 'rocket-lazyload', 'rocket_lazyload_options_output' );
12
  }
13
  add_action( 'admin_menu', 'rocket_lazyload_add_menu' );
14
 
70
 
71
  ?>
72
  <div class="wrap rocket-lazyload-settings">
73
+
74
  <?php $heading_tag = version_compare( $wp_version, '4.3' ) >= 0 ? 'h1' : 'h2'; ?>
75
  <<?php echo $heading_tag; ?> class="screen-reader-text"><?php echo esc_html( get_admin_page_title() ); ?></<?php echo $heading_tag; ?>>
76
  <div class="rocket-lazyload-header">
admin/notices.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
+
4
+ /**
5
+ * Add a message about Imagify on the Rocket LazyLoad options page.
6
+ *
7
+ * @author Geoffrey Crofte
8
+ * @return void
9
+ * @since 1.4.5
10
+ */
11
+ function rocket_lazyload_imagify_notice() {
12
+ $current_screen = get_current_screen();
13
+
14
+ // Add the notice only on the "WP Rocket" settings, "Media Library" & "Upload New Media" screens.
15
+ if ( 'admin_notices' === current_filter() && ( isset( $current_screen ) && 'settings_page_rocket-lazyload' !== $current_screen->base ) ) {
16
+ return;
17
+ }
18
+
19
+ $boxes = get_user_meta( $GLOBALS['current_user']->ID, 'rocket_lazyload_boxes', true );
20
+
21
+ if ( defined( 'IMAGIFY_VERSION' ) || in_array( __FUNCTION__, (array) $boxes, true ) || 1 === get_option( 'rocket_lazyload_dismiss_imagify_notice' ) || ! current_user_can( 'manage_options' ) ) {
22
+ return;
23
+ }
24
+
25
+ $action_url = wp_nonce_url( add_query_arg(
26
+ array(
27
+ 'action' => 'install-plugin',
28
+ 'plugin' => 'imagify',
29
+ ),
30
+ admin_url( 'update.php' )
31
+ ), 'install-plugin_imagify' );
32
+
33
+ $classes = ' install-now';
34
+ $cta_txt = esc_html__( 'Install Imagify for Free', 'rocket-lazyload' );
35
+
36
+ $dismiss_url = wp_nonce_url(
37
+ admin_url( 'admin-post.php?action=rocket_lazyload_ignore&box=' . __FUNCTION__ ),
38
+ 'rocket_lazyload_ignore_' . __FUNCTION__
39
+ );
40
+ ?>
41
+
42
+ <div id="plugin-filter" class="updated plugin-card plugin-card-imagify rktll-imagify-notice">
43
+ <a href="<?php echo $dismiss_url; ?>" class="rktll-cross"><span class="dashicons dashicons-no"></span></a>
44
+
45
+ <p class="rktll-imagify-logo">
46
+ <img src="<?php echo ROCKET_LL_ASSETS_URL ?>img/logo-imagify.png" srcset="<?php echo ROCKET_LL_ASSETS_URL ?>img/logo-imagify.svg 2x" alt="Imagify" width="150" height="18">
47
+ </p>
48
+ <p class="rktll-imagify-msg">
49
+ <?php _e( 'Speed up your website and boost your SEO by reducing image file sizes without losing quality with Imagify.', 'rocket-lazyload' ); ?>
50
+ </p>
51
+ <p class="rktll-imagify-cta">
52
+ <a data-slug="imagify" href="<?php echo $action_url; ?>" class="button button-primary<?php echo $classes; ?>"><?php echo $cta_txt; ?></a>
53
+ </p>
54
+ </div>
55
+
56
+ <?php
57
+ }
58
+ add_action( 'admin_notices', 'rocket_lazyload_imagify_notice' );
59
+
60
+ /**
61
+ * Add Script to remove Notice thanks to JS.
62
+ * @since 1.4.5
63
+ * @author Geoffrey Crofte
64
+ * @return void
65
+ */
66
+ function rocket_lazyload_notice_script() {
67
+ echo <<<HTML
68
+ <script>
69
+ jQuery( document ).ready( function( $ ){
70
+ $( '.rktll-cross' ).on( 'click', function( e ) {
71
+ e.preventDefault();
72
+ var url = $( this ).attr( 'href' ).replace( 'admin-post', 'admin-ajax' );
73
+ $.get( url ).done( $( this ).parent().hide( 'slow' ) );
74
+ });
75
+ } );
76
+ </script>
77
+ HTML;
78
+ }
79
+ add_action( 'admin_footer', 'rocket_lazyload_notice_script' );
assets/css/admin.css CHANGED
@@ -32,7 +32,7 @@
32
  flex-wrap: wrap;
33
  -webkit-box-align: center;
34
  -ms-flex-align: center;
35
- align-items: center;
36
  -webkit-box-pack: justify;
37
  -ms-flex-pack: justify;
38
  justify-content: space-between;
@@ -202,7 +202,7 @@
202
  display: flex;
203
  -webkit-box-align: center;
204
  -ms-flex-align: center;
205
- align-items: center;
206
  margin: -10px 20px 20px 20px;
207
  padding: 26px;
208
  background: #F6F6F6;
@@ -214,9 +214,11 @@
214
  flex-basis: 250px;
215
  padding-right: 38px;
216
  }
 
217
  .rocket-lazyload-cta-block {
218
  margin-top: 1.75em;
219
  }
 
220
  .rocket-lazyload-cta-promo {
221
  display: block;
222
  padding: 15px;
@@ -227,14 +229,17 @@
227
  font-weight: bold;
228
  color: #F56640;
229
  }
 
230
  .rocket-lazyload-cta-promo strong {
231
  color: #0E1B23;
232
  }
 
233
  .rocket-lazyload-cta-block.rocket-lazyload-cta-block .button-primary {
234
  width: 100%;
235
  text-align: center;
236
  font-size: 13px;
237
  }
 
238
  .rll-upgrade-item {
239
  position: relative;
240
  margin: 1.5em auto;
@@ -242,6 +247,7 @@
242
  font-size: 13px;
243
  color: #71787D;
244
  }
 
245
  .rll-upgrade-item:before {
246
  content: "✓";
247
  position: absolute;
@@ -251,24 +257,29 @@
251
  color: #39CE9A;
252
  font-weight: normal;
253
  }
 
254
  .rll-upgrade-item strong {
255
  color: #39CE9A;
256
  font-weight: bold;
257
  }
 
258
  .rocket-lazyload-upgrade p {
259
  margin: 0;
260
  }
 
261
  .rocket-lazyload-upgrade .rocket-lazyload-subtitle {
262
  margin-bottom: 8px;
263
  font-size: 14px;
264
  letter-spacing: 1px;
265
  color: #F56640;
266
  }
 
267
  .rocket-lazyload-bigtext {
268
  font-size: 28px;
269
  font-weight: bold;
270
  color: #0E1B23;
271
  }
 
272
  .rocket-lazyload-rocket-logo {
273
  display: block;
274
  margin-top: 12px;
@@ -297,6 +308,7 @@
297
  font-weight: bold;
298
  text-shadow: none;
299
  }
 
300
  .rocket-lazyload-form .button-primary:hover,
301
  .rocket-lazyload-form .button-primary:focus {
302
  text-shadow: none;
@@ -308,6 +320,102 @@
308
  margin-left: 8px;
309
  }
310
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  @media (max-width: 820px) {
312
  .rocket-lazyload-header .rocket-lazyload-rate-us {
313
  margin: 1.5em 0 0;
@@ -315,7 +423,6 @@
315
  }
316
  }
317
 
318
-
319
  @media (max-width: 650px) {
320
  .rocket-lazyload-upgrade {
321
  -ms-flex-wrap: wrap;
32
  flex-wrap: wrap;
33
  -webkit-box-align: center;
34
  -ms-flex-align: center;
35
+ align-items: center;
36
  -webkit-box-pack: justify;
37
  -ms-flex-pack: justify;
38
  justify-content: space-between;
202
  display: flex;
203
  -webkit-box-align: center;
204
  -ms-flex-align: center;
205
+ align-items: center;
206
  margin: -10px 20px 20px 20px;
207
  padding: 26px;
208
  background: #F6F6F6;
214
  flex-basis: 250px;
215
  padding-right: 38px;
216
  }
217
+
218
  .rocket-lazyload-cta-block {
219
  margin-top: 1.75em;
220
  }
221
+
222
  .rocket-lazyload-cta-promo {
223
  display: block;
224
  padding: 15px;
229
  font-weight: bold;
230
  color: #F56640;
231
  }
232
+
233
  .rocket-lazyload-cta-promo strong {
234
  color: #0E1B23;
235
  }
236
+
237
  .rocket-lazyload-cta-block.rocket-lazyload-cta-block .button-primary {
238
  width: 100%;
239
  text-align: center;
240
  font-size: 13px;
241
  }
242
+
243
  .rll-upgrade-item {
244
  position: relative;
245
  margin: 1.5em auto;
247
  font-size: 13px;
248
  color: #71787D;
249
  }
250
+
251
  .rll-upgrade-item:before {
252
  content: "✓";
253
  position: absolute;
257
  color: #39CE9A;
258
  font-weight: normal;
259
  }
260
+
261
  .rll-upgrade-item strong {
262
  color: #39CE9A;
263
  font-weight: bold;
264
  }
265
+
266
  .rocket-lazyload-upgrade p {
267
  margin: 0;
268
  }
269
+
270
  .rocket-lazyload-upgrade .rocket-lazyload-subtitle {
271
  margin-bottom: 8px;
272
  font-size: 14px;
273
  letter-spacing: 1px;
274
  color: #F56640;
275
  }
276
+
277
  .rocket-lazyload-bigtext {
278
  font-size: 28px;
279
  font-weight: bold;
280
  color: #0E1B23;
281
  }
282
+
283
  .rocket-lazyload-rocket-logo {
284
  display: block;
285
  margin-top: 12px;
308
  font-weight: bold;
309
  text-shadow: none;
310
  }
311
+
312
  .rocket-lazyload-form .button-primary:hover,
313
  .rocket-lazyload-form .button-primary:focus {
314
  text-shadow: none;
320
  margin-left: 8px;
321
  }
322
 
323
+ .rktll-imagify-notice.rktll-imagify-notice {
324
+ position: relative;
325
+ display: -webkit-box;
326
+ display: -webkit-flex;
327
+ display: -ms-flexbox;
328
+ display: flex;
329
+ -webkit-box-align: center;
330
+ -webkit-align-items: center;
331
+ -ms-flex-align: center;
332
+ -ms-grid-row-align: center;
333
+ align-items: center;
334
+ float: none;
335
+ width: auto;
336
+ padding: 5px 45px 5px 0;
337
+ border: 0 none;
338
+ box-shadow: none;
339
+ color: #FFF;
340
+ background: #2e3243;
341
+ }
342
+
343
+ .rktll-imagify-notice .rktll-cross {
344
+ position: absolute;
345
+ right: 8px;
346
+ top: 50%;
347
+ width: 22px;
348
+ height: 22px;
349
+ padding: 0;
350
+ margin-top: -11px;
351
+ background: #FFF;
352
+ color: #2e3243;
353
+ border-radius: 50%;
354
+ transition: all .275s;
355
+ }
356
+ .rktll-imagify-notice .rktll-cross:hover,
357
+ .rktll-imagify-notice .rktll-cross:focus {
358
+ opacity: .5;
359
+ color: #2e3243;
360
+ text-decoration: none;
361
+ border-bottom: 0 none;
362
+ }
363
+
364
+ .rktll-cross .dashicons,
365
+ .rktll-cross .dashicons * {
366
+ display: inline;
367
+ text-decoration: none;
368
+ vertical-align: text-bottom;
369
+ }
370
+
371
+ .rktll-imagify-notice .rktll-cross .dashicons {
372
+ position: relative;
373
+ top: 2px;
374
+ left: 1px;
375
+ transition: all .275s;
376
+ }
377
+
378
+ .rktll-imagify-notice .rktll-imagify-logo,
379
+ .rktll-imagify-notice .rktll-imagify-cta {
380
+ -webkit-flex-shrink: 0;
381
+ -ms-flex-negative: 0;
382
+ flex-shrink: 0;
383
+ }
384
+
385
+ .rktll-imagify-notice .rktll-imagify-logo {
386
+ width: 160px !important;
387
+ text-align: right;
388
+ padding: 0 15px;
389
+ line-height: 0.8;
390
+ }
391
+
392
+ .rktll-imagify-notice .rktll-imagify-msg {
393
+ width: 100% !important;
394
+ padding: 0 15px;
395
+ }
396
+
397
+ .rktll-imagify-notice .rktll-imagify-cta {
398
+ -webkit-box-flex: 1;
399
+ -webkit-flex-grow: 1;
400
+ -ms-flex-positive: 1;
401
+ flex-grow: 1;
402
+ -webkit-flex-basis: 200px;
403
+ -ms-flex-preferred-size: 200px;
404
+ flex-basis: 200px;
405
+ padding-top: 7px;
406
+ }
407
+
408
+ .rktll-imagify-notice .button.button {
409
+ height: auto;
410
+ font-weight: 600;
411
+ font-size: 14px;
412
+ box-shadow: 0 3px 0 rgba(0,0,0,.15);
413
+ border: 0 none;
414
+ padding: 4px 18px;
415
+ background: #40B1D0;
416
+ text-shadow: 1px 1px 1px rgba(0,0,0,.2);
417
+ }
418
+
419
  @media (max-width: 820px) {
420
  .rocket-lazyload-header .rocket-lazyload-rate-us {
421
  margin: 1.5em 0 0;
423
  }
424
  }
425
 
 
426
  @media (max-width: 650px) {
427
  .rocket-lazyload-upgrade {
428
  -ms-flex-wrap: wrap;
assets/img/imagify@2x.jpg DELETED
Binary file
assets/img/logo-imagify.png ADDED
Binary file
assets/img/logo-imagify.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg viewBox="0 0 250 30" xmlns="http://www.w3.org/2000/svg"><g fill="#fff" fill-rule="evenodd" transform="translate(0 .528)"><path d="m8.249 25.362l-5.789-10.06 2.098-1.23-.615-1.52-3.726 2.135 7.417 12.88 5.789-3.329c.036-.579.109-1.158.181-1.737l-1.375.543-3.98 2.315"/><path d="m5.897 10.564l1.737-.651-.398-1.556-3.401 1.302 5.21 13.712 4.776-1.809c.181-.687.47-1.375.796-2.026l-4.631 1.773-4.088-10.745"/><path d="m15.01 5.933l-2.352 9.841 7.236-1.483c.434-.217.868-.398 1.339-.543.543-.181 1.085-.326 1.628-.434.651-.109 1.339-.181 2.026-.181h.036.543l1.556-.326-4.559-4.052-1.809 2.243-5.644-5.065"/><ellipse cx="23.734" cy="5.825" rx="1.411" ry="1.411"/><path d="m15.449 18.13c.507-.76 1.122-1.411 1.773-2.026l-5.535 1.122-2.352-11.36 16.751-3.437 2.315 11.252c.615.217 1.23.47 1.809.76l-2.858-13.929-19.899 4.052 3 14.58 4.993-1.013"/><ellipse cx="24.783" cy="24.674" rx=".868" ry=".868"/><path d="m24.964 14.182c-5.68 0-10.311 4.631-10.311 10.347 0 1.266.217 2.46.651 3.582h3.473c-.507-.904-.832-1.918-.941-3h-1.122c-.326 0-.543-.253-.543-.579 0-.326.253-.579.543-.579h1.122c.109-1.556.724-2.931 1.664-4.052l-.796-.796c-.217-.217-.217-.579 0-.796.217-.217.579-.217.796 0l.796.796c1.122-.941 2.496-1.556 4.052-1.664v-1.158c0-.326.253-.579.543-.579.326 0 .579.253.579.579v1.158c1.411.109 2.713.651 3.799 1.483l.615-.434c.326-.253.76-.217 1.049.072.289.289.326.76.072 1.049l-4.595 6.512c-.832.832-2.135.868-3 .072l-.072-.072c-.832-.832-.832-2.243 0-3.075.109-.109.181-.181.289-.253l4.559-3.111c-.941-.651-2.062-1.013-3.292-1.013-3.256 0-5.861 2.641-5.861 5.897 0 1.339.434 2.569 1.194 3.546h9.37c.76-.977 1.194-2.207 1.194-3.546 0-.76-.145-1.447-.398-2.098l.832-1.158c.434.832.687 1.737.76 2.713h1.122c.326 0 .543.253.543.579 0 .326-.253.579-.543.579h-1.122c-.072 1.085-.398 2.098-.941 3h3.582c.398-1.122.651-2.315.651-3.582-.036-5.789-4.631-10.42-10.311-10.42"/><path d="m50.29.507h-3.69c-.398 0-.76.362-.76.76v26.23c0 .398.362.76.76.76h3.69c.398 0 .76-.362.76-.76v-26.23c-.036-.398-.398-.76-.76-.76"/><path d="m90.63.687c-.036-.326-.289-.579-.724-.579h-.651c-.362 0-.543.145-.687.398l-8.719 18.705h-.109l-8.719-18.705c-.109-.253-.362-.398-.687-.398h-.651c-.434 0-.687.289-.724.579l-4.703 26.628c-.072.543.253.904.76.904h3.582c.362 0 .687-.326.724-.579l2.315-15.01h.109l7.02 15.557c.109.253.326.434.687.434h.724c.362 0 .579-.181.687-.434l6.946-15.557h.109l2.352 15.01c.072.289.398.579.76.579h3.618c.507 0 .832-.362.724-.904l-4.74-26.628"/><path d="m119.1.543c-.109-.253-.289-.434-.687-.434h-.398c-.362 0-.543.181-.687.434l-12.337 26.664c-.253.507.072 1.013.687 1.013h3.437c.651 0 .977-.398 1.158-.796l1.954-4.269h11.867l1.954 4.269c.289.543.543.796 1.158.796h3.437c.579 0 .904-.507.687-1.013l-12.229-26.664m-4.884 18.198l3.871-8.719h.109l3.944 8.719h-7.923"/><path d="m164.33 14.472h-7.598c-.434 0-.76.326-.76.76v3.111c0 .398.326.724.76.724h3.184v3.365c-.796.326-2.496.977-4.703.977-4.993 0-8.9-4.161-8.9-9.08 0-4.957 3.907-9.19 8.864-9.19 2.171 0 4.269.796 5.97 2.315.362.326.724.326 1.013 0l2.46-2.569c.326-.326.289-.796-.036-1.122-2.677-2.315-6.114-3.69-9.66-3.69-7.887 0-14.219 6.368-14.219 14.291 0 7.923 6.331 14.182 14.219 14.182 5.753 0 9.841-2.569 9.841-2.569.145-.109.326-.326.326-.651v-10.13c-.072-.362-.362-.724-.76-.724"/><path d="m183.21.507h-3.69c-.398 0-.76.362-.76.76v26.23c0 .398.362.76.76.76h3.69c.398 0 .76-.362.76-.76v-26.23c0-.398-.362-.76-.76-.76"/><path d="m215.96.507h-16.14c-.434 0-.76.362-.76.76v26.23c0 .398.326.76.76.76h3.654c.398 0 .76-.362.76-.76v-10.02h9.768c.398 0 .76-.362.76-.76v-3.256c0-.398-.362-.76-.76-.76h-9.768v-7.453h11.722c.434 0 .76-.362.76-.76v-3.256c0-.362-.289-.724-.76-.724"/><path d="m249.06.507h-4.088c-.326 0-.507.181-.651.362l-6.331 9.117-6.331-9.117c-.109-.145-.326-.362-.651-.362h-4.052c-.651 0-.941.651-.651 1.158l9.04 13.242v12.59c0 .398.326.76.76.76h3.654c.398 0 .76-.362.76-.76v-12.663l9.153-13.205c.326-.507 0-1.122-.615-1.122"/></g></svg>
assets/img/wp-rocket@2x.jpg DELETED
Binary file
assets/js/lazyload-10.3.5.js ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var _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; };
2
+
3
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : 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 defaultSettings = {
11
+ elements_selector: "img",
12
+ container: document,
13
+ threshold: 300,
14
+ data_src: "src",
15
+ data_srcset: "srcset",
16
+ class_loading: "loading",
17
+ class_loaded: "loaded",
18
+ class_error: "error",
19
+ callback_load: null,
20
+ callback_error: null,
21
+ callback_set: null
22
+ };
23
+
24
+ var dataPrefix = "data-";
25
+
26
+ var getData = function getData(element, attribute) {
27
+ return element.getAttribute(dataPrefix + attribute);
28
+ };
29
+
30
+ var setData = function setData(element, attribute, value) {
31
+ return element.setAttribute(dataPrefix + attribute, value);
32
+ };
33
+
34
+ var purgeElements = function purgeElements(elements) {
35
+ return elements.filter(function (element) {
36
+ return !getData(element, "was-processed");
37
+ });
38
+ };
39
+
40
+ /* Creates instance and notifies it through the window element */
41
+ var createInstance = function createInstance(classObj, options) {
42
+ var event;
43
+ var eventString = "LazyLoad::Initialized";
44
+ var instance = new classObj(options);
45
+ try {
46
+ // Works in modern browsers
47
+ event = new CustomEvent(eventString, { detail: { instance: instance } });
48
+ } catch (err) {
49
+ // Works in Internet Explorer (all versions)
50
+ event = document.createEvent("CustomEvent");
51
+ event.initCustomEvent(eventString, false, false, { instance: instance });
52
+ }
53
+ window.dispatchEvent(event);
54
+ };
55
+
56
+ /* Auto initialization of one or more instances of lazyload, depending on the
57
+ options passed in (plain object or an array) */
58
+ var autoInitialize = function autoInitialize(classObj, options) {
59
+ if (!options.length) {
60
+ // Plain object
61
+ createInstance(classObj, options);
62
+ } else {
63
+ // Array of objects
64
+ for (var i = 0, optionsItem; optionsItem = options[i]; i += 1) {
65
+ createInstance(classObj, optionsItem);
66
+ }
67
+ }
68
+ };
69
+
70
+ var setSourcesForPicture = function setSourcesForPicture(element, settings) {
71
+ var dataSrcSet = settings.data_srcset;
72
+
73
+ var parent = element.parentNode;
74
+ if (parent.tagName !== "PICTURE") {
75
+ return;
76
+ }
77
+ for (var i = 0, pictureChild; pictureChild = parent.children[i]; i += 1) {
78
+ if (pictureChild.tagName === "SOURCE") {
79
+ var sourceSrcset = getData(pictureChild, dataSrcSet);
80
+ if (sourceSrcset) {
81
+ pictureChild.setAttribute("srcset", sourceSrcset);
82
+ }
83
+ }
84
+ }
85
+ };
86
+
87
+ var setSources = function setSources(element, settings) {
88
+ var dataSrc = settings.data_src,
89
+ dataSrcSet = settings.data_srcset;
90
+
91
+ var tagName = element.tagName;
92
+ var elementSrc = getData(element, dataSrc);
93
+ if (tagName === "IMG") {
94
+ setSourcesForPicture(element, settings);
95
+ var imgSrcset = getData(element, dataSrcSet);
96
+ if (imgSrcset) {
97
+ element.setAttribute("srcset", imgSrcset);
98
+ }
99
+ if (elementSrc) {
100
+ element.setAttribute("src", elementSrc);
101
+ }
102
+ return;
103
+ }
104
+ if (tagName === "IFRAME") {
105
+ if (elementSrc) {
106
+ element.setAttribute("src", elementSrc);
107
+ }
108
+ return;
109
+ }
110
+ if (elementSrc) {
111
+ element.style.backgroundImage = 'url("' + elementSrc + '")';
112
+ }
113
+ };
114
+
115
+ var supportsClassList = "classList" in document.createElement("p");
116
+
117
+ var addClass = function addClass(element, className) {
118
+ if (supportsClassList) {
119
+ element.classList.add(className);
120
+ return;
121
+ }
122
+ element.className += (element.className ? " " : "") + className;
123
+ };
124
+
125
+ var removeClass = function removeClass(element, className) {
126
+ if (supportsClassList) {
127
+ element.classList.remove(className);
128
+ return;
129
+ }
130
+ element.className = element.className.replace(new RegExp("(^|\\s+)" + className + "(\\s+|$)"), " ").replace(/^\s+/, "").replace(/\s+$/, "");
131
+ };
132
+
133
+ var callCallback = function callCallback(callback, argument) {
134
+ if (callback) {
135
+ callback(argument);
136
+ }
137
+ };
138
+
139
+ var loadString = "load";
140
+ var errorString = "error";
141
+
142
+ var removeListeners = function removeListeners(element, loadHandler, errorHandler) {
143
+ element.removeEventListener(loadString, loadHandler);
144
+ element.removeEventListener(errorString, errorHandler);
145
+ };
146
+
147
+ var addOneShotListeners = function addOneShotListeners(element, settings) {
148
+ var onLoad = function onLoad(event) {
149
+ onEvent(event, true, settings);
150
+ removeListeners(element, onLoad, onError);
151
+ };
152
+ var onError = function onError(event) {
153
+ onEvent(event, false, settings);
154
+ removeListeners(element, onLoad, onError);
155
+ };
156
+ element.addEventListener(loadString, onLoad);
157
+ element.addEventListener(errorString, onError);
158
+ };
159
+
160
+ var onEvent = function onEvent(event, success, settings) {
161
+ var element = event.target;
162
+ removeClass(element, settings.class_loading);
163
+ addClass(element, success ? settings.class_loaded : settings.class_error); // Setting loaded or error class
164
+ callCallback(success ? settings.callback_load : settings.callback_error, element); // Calling loaded or error callback
165
+ };
166
+
167
+ var revealElement = function revealElement(element, settings) {
168
+ if (["IMG", "IFRAME"].indexOf(element.tagName) > -1) {
169
+ addOneShotListeners(element, settings);
170
+ addClass(element, settings.class_loading);
171
+ }
172
+ setSources(element, settings);
173
+ setData(element, "was-processed", true);
174
+ callCallback(settings.callback_set, element);
175
+ };
176
+
177
+ var LazyLoad = function LazyLoad(instanceSettings, elements) {
178
+ this._settings = _extends({}, defaultSettings, instanceSettings);
179
+ this._setObserver();
180
+ this.update(elements);
181
+ };
182
+
183
+ LazyLoad.prototype = {
184
+ _setObserver: function _setObserver() {
185
+ var _this = this;
186
+
187
+ if (!("IntersectionObserver" in window)) {
188
+ return;
189
+ }
190
+
191
+ var settings = this._settings;
192
+ var onIntersection = function onIntersection(entries) {
193
+ entries.forEach(function (entry) {
194
+ if (entry.intersectionRatio > 0) {
195
+ var element = entry.target;
196
+ revealElement(element, settings);
197
+ _this._observer.unobserve(element);
198
+ }
199
+ });
200
+ _this._elements = purgeElements(_this._elements);
201
+ };
202
+ this._observer = new IntersectionObserver(onIntersection, {
203
+ root: settings.container === document ? null : settings.container,
204
+ rootMargin: settings.threshold + "px"
205
+ });
206
+ },
207
+
208
+ update: function update(elements) {
209
+ var _this2 = this;
210
+
211
+ var settings = this._settings;
212
+ var nodeSet = elements || settings.container.querySelectorAll(settings.elements_selector);
213
+
214
+ this._elements = purgeElements(Array.prototype.slice.call(nodeSet)); // nodeset to array for IE compatibility
215
+ if (this._observer) {
216
+ this._elements.forEach(function (element) {
217
+ _this2._observer.observe(element);
218
+ });
219
+ return;
220
+ }
221
+ // Fallback: load all elements at once
222
+ this._elements.forEach(function (element) {
223
+ revealElement(element, settings);
224
+ });
225
+ this._elements = purgeElements(this._elements);
226
+ },
227
+
228
+ destroy: function destroy() {
229
+ var _this3 = this;
230
+
231
+ if (this._observer) {
232
+ purgeElements(this._elements).forEach(function (element) {
233
+ _this3._observer.unobserve(element);
234
+ });
235
+ this._observer = null;
236
+ }
237
+ this._elements = null;
238
+ this._settings = null;
239
+ }
240
+ };
241
+
242
+ /* Automatic instances creation if required (useful for async script loading!) */
243
+ var autoInitOptions = window.lazyLoadOptions;
244
+ if (autoInitOptions) {
245
+ autoInitialize(LazyLoad, autoInitOptions);
246
+ }
247
+
248
+ return LazyLoad;
249
+ });
assets/js/lazyload-10.3.5.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.LazyLoad=t()}(this,function(){"use strict";var e={elements_selector:"img",container:document,threshold:300,data_src:"src",data_srcset:"srcset",class_loading:"loading",class_loaded:"loaded",class_error:"error",callback_load:null,callback_error:null,callback_set:null},t=function(e,t){return e.getAttribute("data-"+t)},n=function(e,t,n){return e.setAttribute("data-"+t,n)},r=function(e){return e.filter(function(e){return!t(e,"was-processed")})},s=function(e,t){var n,r=new e(t);try{n=new CustomEvent("LazyLoad::Initialized",{detail:{instance:r}})}catch(e){(n=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:r})}window.dispatchEvent(n)},o=function(e,n){var r=n.data_srcset,s=e.parentNode;if("PICTURE"===s.tagName)for(var o,a=0;o=s.children[a];a+=1)if("SOURCE"===o.tagName){var i=t(o,r);i&&o.setAttribute("srcset",i)}},a=function(e,n){var r=n.data_src,s=n.data_srcset,a=e.tagName,i=t(e,r);if("IMG"===a){o(e,n);var c=t(e,s);return c&&e.setAttribute("srcset",c),void(i&&e.setAttribute("src",i))}"IFRAME"!==a?i&&(e.style.backgroundImage='url("'+i+'")'):i&&e.setAttribute("src",i)},i="classList"in document.createElement("p"),c=function(e,t){i?e.classList.add(t):e.className+=(e.className?" ":"")+t},l=function(e,t){i?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},u=function(e,t){e&&e(t)},d=function(e,t,n){e.removeEventListener("load",t),e.removeEventListener("error",n)},f=function(e,t){var n=function n(s){v(s,!0,t),d(e,n,r)},r=function r(s){v(s,!1,t),d(e,n,r)};e.addEventListener("load",n),e.addEventListener("error",r)},v=function(e,t,n){var r=e.target;l(r,n.class_loading),c(r,t?n.class_loaded:n.class_error),u(t?n.callback_load:n.callback_error,r)},_=function(e,t){["IMG","IFRAME"].indexOf(e.tagName)>-1&&(f(e,t),c(e,t.class_loading)),a(e,t),n(e,"was-processed",!0),u(t.callback_set,e)},m=function(t,n){this._settings=_extends({},e,t),this._setObserver(),this.update(n)};m.prototype={_setObserver:function(){var e=this;if("IntersectionObserver"in window){var t=this._settings;this._observer=new IntersectionObserver(function(n){n.forEach(function(n){if(n.intersectionRatio>0){var r=n.target;_(r,t),e._observer.unobserve(r)}}),e._elements=r(e._elements)},{root:t.container===document?null:t.container,rootMargin:t.threshold+"px"})}},update:function(e){var t=this,n=this._settings,s=e||n.container.querySelectorAll(n.elements_selector);this._elements=r(Array.prototype.slice.call(s)),this._observer?this._elements.forEach(function(e){t._observer.observe(e)}):(this._elements.forEach(function(e){_(e,n)}),this._elements=r(this._elements))},destroy:function(){var e=this;this._observer&&(r(this._elements).forEach(function(t){e._observer.unobserve(t)}),this._observer=null),this._elements=null,this._settings=null}};var b=window.lazyLoadOptions;return b&&function(e,t){if(t.length)for(var n,r=0;n=t[r];r+=1)s(e,n);else s(e,t)}(m,b),m});
readme.txt CHANGED
@@ -2,8 +2,9 @@
2
  Contributors: creativejuiz, tabrisrp, wp_media
3
  Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smilies, avatar, gravatar
4
  Requires at least: 3.0
5
- Tested up to: 4.8
6
- Stable tag: 1.4.4
 
7
 
8
  The tiny Lazy Load script for WordPress without jQuery, works for images and iframes.
9
 
@@ -64,6 +65,12 @@ Some plugins are not compatible without lazy loading. Please open a support thre
64
 
65
  == Changelog ==
66
 
 
 
 
 
 
 
67
  = 1.4.4 =
68
  * Admin Redesign
69
 
2
  Contributors: creativejuiz, tabrisrp, wp_media
3
  Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smilies, avatar, gravatar
4
  Requires at least: 3.0
5
+ Tested up to: 4.9
6
+ Requires PHP: 5.3
7
+ Stable tag: 1.4.5
8
 
9
  The tiny Lazy Load script for WordPress without jQuery, works for images and iframes.
10
 
65
 
66
  == Changelog ==
67
 
68
+ = 1.4.5 =
69
+ * Rename Setting Page Name in WP Menu
70
+ * New Product Banner in Settings Page
71
+ * Conditionally load a different version of the script depending on browser support of IntersectionObserver
72
+ * Fix a bug where images initially hidden are not correctly displayed when coming into view (slider, tabs, accordion)
73
+
74
  = 1.4.4 =
75
  * Admin Redesign
76
 
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: 1.4.4
7
  * Author: WP Media
8
  * Author URI: https://wp-rocket.me
9
  * Text Domain: rocket-lazy-load
@@ -26,12 +26,11 @@
26
  */
27
  defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
28
 
29
- define( 'ROCKET_LL_VERSION', '1.4.4' );
30
  define( 'ROCKET_LL_PATH', realpath( plugin_dir_path( __FILE__ ) ) . '/' );
31
  define( 'ROCKET_LL_3RD_PARTY_PATH', ROCKET_LL_PATH . '3rd-party/' );
32
  define( 'ROCKET_LL_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets/' );
33
  define( 'ROCKET_LL_FRONT_JS_URL', ROCKET_LL_ASSETS_URL . 'js/' );
34
- define( 'ROCKET_LL_JS_VERSION' , '8.2' );
35
 
36
 
37
  /**
@@ -46,6 +45,8 @@ function rocket_lazyload_init() {
46
  require ROCKET_LL_3RD_PARTY_PATH . '3rd-party.php';
47
 
48
  if ( is_admin() ) {
 
 
49
  require ROCKET_LL_PATH . 'admin/admin.php';
50
  }
51
  }
@@ -104,29 +105,46 @@ function rocket_lazyload_script() {
104
  return;
105
  }
106
 
 
 
 
 
 
 
 
 
 
 
107
  $threshold = apply_filters( 'rocket_lazyload_threshold', 300 );
108
 
109
- echo <<<HTML
110
- <script>window.lazyLoadOptions = {
 
 
 
 
 
111
  elements_selector: "img, iframe",
112
  data_src: "lazy-src",
113
  data_srcset: "lazy-srcset",
 
114
  class_loading: "lazyloading",
115
  class_loaded: "lazyloaded",
116
- threshold: $threshold,
117
  callback_load: function(element) {
118
  if ( element.tagName === "IFRAME" && element.dataset.rocketLazyload == "fitvidscompatible" ) {
119
  if (element.classList.contains("lazyloaded") ) {
120
- if (typeof window.jQuery != 'undefined') {
121
  if (jQuery.fn.fitVids) {
122
  jQuery(element).parent().fitVids();
123
  }
124
  }
125
  }
126
  }
127
- }
128
- };</script>
129
- HTML;
 
130
 
131
  if ( rocket_lazyload_get_option( 'youtube' ) ) {
132
  echo <<<HTML
@@ -134,7 +152,7 @@ HTML;
134
  HTML;
135
  }
136
  }
137
- add_action( 'wp_footer', 'rocket_lazyload_script', 9 );
138
 
139
  /**
140
  * Enqueue the lazyload script
@@ -147,11 +165,6 @@ function rocket_lazyload_enqueue() {
147
  return;
148
  }
149
 
150
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
151
- $ll_url = ROCKET_LL_FRONT_JS_URL . 'lazyload-' . ROCKET_LL_JS_VERSION . $suffix . '.js';
152
-
153
- wp_enqueue_script( 'rocket-lazyload', $ll_url, null, null, true );
154
-
155
  if ( rocket_lazyload_get_option( 'youtube' ) ) {
156
  $css = '.rll-youtube-player{position:relative;padding-bottom:56.23%;height:0;overflow:hidden;max-width:100%;background:#000;margin:5px}.rll-youtube-player iframe{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;background:0 0}.rll-youtube-player img{bottom:0;display:block;left:0;margin:auto;max-width:100%;width:100%;position:absolute;right:0;top:0;border:none;height:auto;cursor:pointer;-webkit-transition:.4s all;-moz-transition:.4s all;transition:.4s all}.rll-youtube-player img:hover{-webkit-filter:brightness(75%)}.rll-youtube-player .play{height:72px;width:72px;left:50%;top:50%;margin-left:-36px;margin-top:-36px;position:absolute;background:url(' . ROCKET_LL_ASSETS_URL . 'img/play.png) no-repeat;cursor:pointer}';
157
 
@@ -162,26 +175,6 @@ function rocket_lazyload_enqueue() {
162
  }
163
  add_action( 'wp_enqueue_scripts', 'rocket_lazyload_enqueue', PHP_INT_MAX );
164
 
165
- /**
166
- * Add tags to the lazyload script to async and prevent concatenation
167
- *
168
- * @since 1.2
169
- * @author Remy Perona
170
- *
171
- * @param string $tag HTML for the script.
172
- * @param string $handle Handle for the script.
173
- *
174
- * @return string Updated HTML
175
- */
176
- function rocket_lazyload_async_script( $tag, $handle ) {
177
- if ( 'rocket-lazyload' === $handle ) {
178
- return str_replace( '<script', '<script async data-minify="1"', $tag );
179
- }
180
-
181
- return $tag;
182
- }
183
- add_filter( 'script_loader_tag', 'rocket_lazyload_async_script', 10, 2 );
184
-
185
  /**
186
  * Replace Gravatar, thumbnails, images in post content and in widget text by LazyLoad
187
  *
@@ -503,7 +496,7 @@ function rocket_lazyload_iframes( $html ) {
503
  *
504
  * @param array $html Output that will be printed.
505
  */
506
- $iframe_lazyload = apply_filters( 'rocket_lazyload_iframe_html', str_replace( $iframe[1], $placeholder . '" data-fitvidscompatible="1" data-lazy-src="' . $iframe[1], $iframe[0] ) );
507
  $iframe_lazyload .= $iframe_noscript;
508
 
509
  $html = str_replace( $iframe[0], $iframe_lazyload, $html );
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: 1.4.5
7
  * Author: WP Media
8
  * Author URI: https://wp-rocket.me
9
  * Text Domain: rocket-lazy-load
26
  */
27
  defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
28
 
29
+ define( 'ROCKET_LL_VERSION', '1.4.5' );
30
  define( 'ROCKET_LL_PATH', realpath( plugin_dir_path( __FILE__ ) ) . '/' );
31
  define( 'ROCKET_LL_3RD_PARTY_PATH', ROCKET_LL_PATH . '3rd-party/' );
32
  define( 'ROCKET_LL_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets/' );
33
  define( 'ROCKET_LL_FRONT_JS_URL', ROCKET_LL_ASSETS_URL . 'js/' );
 
34
 
35
 
36
  /**
45
  require ROCKET_LL_3RD_PARTY_PATH . '3rd-party.php';
46
 
47
  if ( is_admin() ) {
48
+ require ROCKET_LL_PATH . 'admin/actions.php';
49
+ require ROCKET_LL_PATH . 'admin/notices.php';
50
  require ROCKET_LL_PATH . 'admin/admin.php';
51
  }
52
  }
105
  return;
106
  }
107
 
108
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
109
+
110
+ /**
111
+ * Filters the threshold at which lazyload is triggered
112
+ *
113
+ * @since 1.2
114
+ * @author Remy Perona
115
+ *
116
+ * @param int $threshold Threshold value.
117
+ */
118
  $threshold = apply_filters( 'rocket_lazyload_threshold', 300 );
119
 
120
+ echo '<script>(function(w, d){
121
+ var b = d.getElementsByTagName("body")[0];
122
+ var s = d.createElement("script"); s.async = true;
123
+ var v = !("IntersectionObserver" in w) ? "8.5.2" : "10.3.5";
124
+ s.src = "' . ROCKET_LL_FRONT_JS_URL . 'lazyload-v' . $suffix . '.js";
125
+ s.src = s.src.replace( "-v", "-" + v );
126
+ w.lazyLoadOptions = {
127
  elements_selector: "img, iframe",
128
  data_src: "lazy-src",
129
  data_srcset: "lazy-srcset",
130
+ skip_invisible: false,
131
  class_loading: "lazyloading",
132
  class_loaded: "lazyloaded",
133
+ threshold: ' . $threshold . ',
134
  callback_load: function(element) {
135
  if ( element.tagName === "IFRAME" && element.dataset.rocketLazyload == "fitvidscompatible" ) {
136
  if (element.classList.contains("lazyloaded") ) {
137
+ if (typeof window.jQuery != "undefined") {
138
  if (jQuery.fn.fitVids) {
139
  jQuery(element).parent().fitVids();
140
  }
141
  }
142
  }
143
  }
144
+ }
145
+ };
146
+ b.appendChild(s);
147
+ }(window, document));</script>';
148
 
149
  if ( rocket_lazyload_get_option( 'youtube' ) ) {
150
  echo <<<HTML
152
  HTML;
153
  }
154
  }
155
+ add_action( 'wp_footer', 'rocket_lazyload_script', PHP_INT_MAX );
156
 
157
  /**
158
  * Enqueue the lazyload script
165
  return;
166
  }
167
 
 
 
 
 
 
168
  if ( rocket_lazyload_get_option( 'youtube' ) ) {
169
  $css = '.rll-youtube-player{position:relative;padding-bottom:56.23%;height:0;overflow:hidden;max-width:100%;background:#000;margin:5px}.rll-youtube-player iframe{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;background:0 0}.rll-youtube-player img{bottom:0;display:block;left:0;margin:auto;max-width:100%;width:100%;position:absolute;right:0;top:0;border:none;height:auto;cursor:pointer;-webkit-transition:.4s all;-moz-transition:.4s all;transition:.4s all}.rll-youtube-player img:hover{-webkit-filter:brightness(75%)}.rll-youtube-player .play{height:72px;width:72px;left:50%;top:50%;margin-left:-36px;margin-top:-36px;position:absolute;background:url(' . ROCKET_LL_ASSETS_URL . 'img/play.png) no-repeat;cursor:pointer}';
170
 
175
  }
176
  add_action( 'wp_enqueue_scripts', 'rocket_lazyload_enqueue', PHP_INT_MAX );
177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  /**
179
  * Replace Gravatar, thumbnails, images in post content and in widget text by LazyLoad
180
  *
496
  *
497
  * @param array $html Output that will be printed.
498
  */
499
+ $iframe_lazyload = apply_filters( 'rocket_lazyload_iframe_html', str_replace( $iframe[1], $placeholder . '" data-rocket-lazyload="fitvidscompatible" data-lazy-src="' . $iframe[1], $iframe[0] ) );
500
  $iframe_lazyload .= $iframe_noscript;
501
 
502
  $html = str_replace( $iframe[0], $iframe_lazyload, $html );
vendor/autoload.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- // autoload.php @generated by Composer
4
-
5
- require_once __DIR__ . '/composer/autoload_real.php';
6
-
7
- return ComposerAutoloaderInit6b11730bf9ca7991cb734e6839a3d592::getLoader();
 
 
 
 
 
 
 
vendor/composer/ClassLoader.php DELETED
@@ -1,445 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of Composer.
5
- *
6
- * (c) Nils Adermann <naderman@naderman.de>
7
- * Jordi Boggiano <j.boggiano@seld.be>
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
12
-
13
- namespace Composer\Autoload;
14
-
15
- /**
16
- * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
- *
18
- * $loader = new \Composer\Autoload\ClassLoader();
19
- *
20
- * // register classes with namespaces
21
- * $loader->add('Symfony\Component', __DIR__.'/component');
22
- * $loader->add('Symfony', __DIR__.'/framework');
23
- *
24
- * // activate the autoloader
25
- * $loader->register();
26
- *
27
- * // to enable searching the include path (eg. for PEAR packages)
28
- * $loader->setUseIncludePath(true);
29
- *
30
- * In this example, if you try to use a class in the Symfony\Component
31
- * namespace or one of its children (Symfony\Component\Console for instance),
32
- * the autoloader will first look for the class under the component/
33
- * directory, and it will then fallback to the framework/ directory if not
34
- * found before giving up.
35
- *
36
- * This class is loosely based on the Symfony UniversalClassLoader.
37
- *
38
- * @author Fabien Potencier <fabien@symfony.com>
39
- * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see http://www.php-fig.org/psr/psr-0/
41
- * @see http://www.php-fig.org/psr/psr-4/
42
- */
43
- class ClassLoader
44
- {
45
- // PSR-4
46
- private $prefixLengthsPsr4 = array();
47
- private $prefixDirsPsr4 = array();
48
- private $fallbackDirsPsr4 = array();
49
-
50
- // PSR-0
51
- private $prefixesPsr0 = array();
52
- private $fallbackDirsPsr0 = array();
53
-
54
- private $useIncludePath = false;
55
- private $classMap = array();
56
- private $classMapAuthoritative = false;
57
- private $missingClasses = array();
58
- private $apcuPrefix;
59
-
60
- public function getPrefixes()
61
- {
62
- if (!empty($this->prefixesPsr0)) {
63
- return call_user_func_array('array_merge', $this->prefixesPsr0);
64
- }
65
-
66
- return array();
67
- }
68
-
69
- public function getPrefixesPsr4()
70
- {
71
- return $this->prefixDirsPsr4;
72
- }
73
-
74
- public function getFallbackDirs()
75
- {
76
- return $this->fallbackDirsPsr0;
77
- }
78
-
79
- public function getFallbackDirsPsr4()
80
- {
81
- return $this->fallbackDirsPsr4;
82
- }
83
-
84
- public function getClassMap()
85
- {
86
- return $this->classMap;
87
- }
88
-
89
- /**
90
- * @param array $classMap Class to filename map
91
- */
92
- public function addClassMap(array $classMap)
93
- {
94
- if ($this->classMap) {
95
- $this->classMap = array_merge($this->classMap, $classMap);
96
- } else {
97
- $this->classMap = $classMap;
98
- }
99
- }
100
-
101
- /**
102
- * Registers a set of PSR-0 directories for a given prefix, either
103
- * appending or prepending to the ones previously set for this prefix.
104
- *
105
- * @param string $prefix The prefix
106
- * @param array|string $paths The PSR-0 root directories
107
- * @param bool $prepend Whether to prepend the directories
108
- */
109
- public function add($prefix, $paths, $prepend = false)
110
- {
111
- if (!$prefix) {
112
- if ($prepend) {
113
- $this->fallbackDirsPsr0 = array_merge(
114
- (array) $paths,
115
- $this->fallbackDirsPsr0
116
- );
117
- } else {
118
- $this->fallbackDirsPsr0 = array_merge(
119
- $this->fallbackDirsPsr0,
120
- (array) $paths
121
- );
122
- }
123
-
124
- return;
125
- }
126
-
127
- $first = $prefix[0];
128
- if (!isset($this->prefixesPsr0[$first][$prefix])) {
129
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
130
-
131
- return;
132
- }
133
- if ($prepend) {
134
- $this->prefixesPsr0[$first][$prefix] = array_merge(
135
- (array) $paths,
136
- $this->prefixesPsr0[$first][$prefix]
137
- );
138
- } else {
139
- $this->prefixesPsr0[$first][$prefix] = array_merge(
140
- $this->prefixesPsr0[$first][$prefix],
141
- (array) $paths
142
- );
143
- }
144
- }
145
-
146
- /**
147
- * Registers a set of PSR-4 directories for a given namespace, either
148
- * appending or prepending to the ones previously set for this namespace.
149
- *
150
- * @param string $prefix The prefix/namespace, with trailing '\\'
151
- * @param array|string $paths The PSR-4 base directories
152
- * @param bool $prepend Whether to prepend the directories
153
- *
154
- * @throws \InvalidArgumentException
155
- */
156
- public function addPsr4($prefix, $paths, $prepend = false)
157
- {
158
- if (!$prefix) {
159
- // Register directories for the root namespace.
160
- if ($prepend) {
161
- $this->fallbackDirsPsr4 = array_merge(
162
- (array) $paths,
163
- $this->fallbackDirsPsr4
164
- );
165
- } else {
166
- $this->fallbackDirsPsr4 = array_merge(
167
- $this->fallbackDirsPsr4,
168
- (array) $paths
169
- );
170
- }
171
- } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
172
- // Register directories for a new namespace.
173
- $length = strlen($prefix);
174
- if ('\\' !== $prefix[$length - 1]) {
175
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
176
- }
177
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
178
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
179
- } elseif ($prepend) {
180
- // Prepend directories for an already registered namespace.
181
- $this->prefixDirsPsr4[$prefix] = array_merge(
182
- (array) $paths,
183
- $this->prefixDirsPsr4[$prefix]
184
- );
185
- } else {
186
- // Append directories for an already registered namespace.
187
- $this->prefixDirsPsr4[$prefix] = array_merge(
188
- $this->prefixDirsPsr4[$prefix],
189
- (array) $paths
190
- );
191
- }
192
- }
193
-
194
- /**
195
- * Registers a set of PSR-0 directories for a given prefix,
196
- * replacing any others previously set for this prefix.
197
- *
198
- * @param string $prefix The prefix
199
- * @param array|string $paths The PSR-0 base directories
200
- */
201
- public function set($prefix, $paths)
202
- {
203
- if (!$prefix) {
204
- $this->fallbackDirsPsr0 = (array) $paths;
205
- } else {
206
- $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
207
- }
208
- }
209
-
210
- /**
211
- * Registers a set of PSR-4 directories for a given namespace,
212
- * replacing any others previously set for this namespace.
213
- *
214
- * @param string $prefix The prefix/namespace, with trailing '\\'
215
- * @param array|string $paths The PSR-4 base directories
216
- *
217
- * @throws \InvalidArgumentException
218
- */
219
- public function setPsr4($prefix, $paths)
220
- {
221
- if (!$prefix) {
222
- $this->fallbackDirsPsr4 = (array) $paths;
223
- } else {
224
- $length = strlen($prefix);
225
- if ('\\' !== $prefix[$length - 1]) {
226
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
227
- }
228
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
229
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
230
- }
231
- }
232
-
233
- /**
234
- * Turns on searching the include path for class files.
235
- *
236
- * @param bool $useIncludePath
237
- */
238
- public function setUseIncludePath($useIncludePath)
239
- {
240
- $this->useIncludePath = $useIncludePath;
241
- }
242
-
243
- /**
244
- * Can be used to check if the autoloader uses the include path to check
245
- * for classes.
246
- *
247
- * @return bool
248
- */
249
- public function getUseIncludePath()
250
- {
251
- return $this->useIncludePath;
252
- }
253
-
254
- /**
255
- * Turns off searching the prefix and fallback directories for classes
256
- * that have not been registered with the class map.
257
- *
258
- * @param bool $classMapAuthoritative
259
- */
260
- public function setClassMapAuthoritative($classMapAuthoritative)
261
- {
262
- $this->classMapAuthoritative = $classMapAuthoritative;
263
- }
264
-
265
- /**
266
- * Should class lookup fail if not found in the current class map?
267
- *
268
- * @return bool
269
- */
270
- public function isClassMapAuthoritative()
271
- {
272
- return $this->classMapAuthoritative;
273
- }
274
-
275
- /**
276
- * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
- *
278
- * @param string|null $apcuPrefix
279
- */
280
- public function setApcuPrefix($apcuPrefix)
281
- {
282
- $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
283
- }
284
-
285
- /**
286
- * The APCu prefix in use, or null if APCu caching is not enabled.
287
- *
288
- * @return string|null
289
- */
290
- public function getApcuPrefix()
291
- {
292
- return $this->apcuPrefix;
293
- }
294
-
295
- /**
296
- * Registers this instance as an autoloader.
297
- *
298
- * @param bool $prepend Whether to prepend the autoloader or not
299
- */
300
- public function register($prepend = false)
301
- {
302
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
303
- }
304
-
305
- /**
306
- * Unregisters this instance as an autoloader.
307
- */
308
- public function unregister()
309
- {
310
- spl_autoload_unregister(array($this, 'loadClass'));
311
- }
312
-
313
- /**
314
- * Loads the given class or interface.
315
- *
316
- * @param string $class The name of the class
317
- * @return bool|null True if loaded, null otherwise
318
- */
319
- public function loadClass($class)
320
- {
321
- if ($file = $this->findFile($class)) {
322
- includeFile($file);
323
-
324
- return true;
325
- }
326
- }
327
-
328
- /**
329
- * Finds the path to the file where the class is defined.
330
- *
331
- * @param string $class The name of the class
332
- *
333
- * @return string|false The path if found, false otherwise
334
- */
335
- public function findFile($class)
336
- {
337
- // class map lookup
338
- if (isset($this->classMap[$class])) {
339
- return $this->classMap[$class];
340
- }
341
- if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
342
- return false;
343
- }
344
- if (null !== $this->apcuPrefix) {
345
- $file = apcu_fetch($this->apcuPrefix.$class, $hit);
346
- if ($hit) {
347
- return $file;
348
- }
349
- }
350
-
351
- $file = $this->findFileWithExtension($class, '.php');
352
-
353
- // Search for Hack files if we are running on HHVM
354
- if (false === $file && defined('HHVM_VERSION')) {
355
- $file = $this->findFileWithExtension($class, '.hh');
356
- }
357
-
358
- if (null !== $this->apcuPrefix) {
359
- apcu_add($this->apcuPrefix.$class, $file);
360
- }
361
-
362
- if (false === $file) {
363
- // Remember that this class does not exist.
364
- $this->missingClasses[$class] = true;
365
- }
366
-
367
- return $file;
368
- }
369
-
370
- private function findFileWithExtension($class, $ext)
371
- {
372
- // PSR-4 lookup
373
- $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
374
-
375
- $first = $class[0];
376
- if (isset($this->prefixLengthsPsr4[$first])) {
377
- $subPath = $class;
378
- while (false !== $lastPos = strrpos($subPath, '\\')) {
379
- $subPath = substr($subPath, 0, $lastPos);
380
- $search = $subPath.'\\';
381
- if (isset($this->prefixDirsPsr4[$search])) {
382
- foreach ($this->prefixDirsPsr4[$search] as $dir) {
383
- $length = $this->prefixLengthsPsr4[$first][$search];
384
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
385
- return $file;
386
- }
387
- }
388
- }
389
- }
390
- }
391
-
392
- // PSR-4 fallback dirs
393
- foreach ($this->fallbackDirsPsr4 as $dir) {
394
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
395
- return $file;
396
- }
397
- }
398
-
399
- // PSR-0 lookup
400
- if (false !== $pos = strrpos($class, '\\')) {
401
- // namespaced class name
402
- $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
403
- . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404
- } else {
405
- // PEAR-like class name
406
- $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
407
- }
408
-
409
- if (isset($this->prefixesPsr0[$first])) {
410
- foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411
- if (0 === strpos($class, $prefix)) {
412
- foreach ($dirs as $dir) {
413
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
414
- return $file;
415
- }
416
- }
417
- }
418
- }
419
- }
420
-
421
- // PSR-0 fallback dirs
422
- foreach ($this->fallbackDirsPsr0 as $dir) {
423
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
424
- return $file;
425
- }
426
- }
427
-
428
- // PSR-0 include paths.
429
- if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
430
- return $file;
431
- }
432
-
433
- return false;
434
- }
435
- }
436
-
437
- /**
438
- * Scope isolated include.
439
- *
440
- * Prevents access to $this/self from included files.
441
- */
442
- function includeFile($file)
443
- {
444
- include $file;
445
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/LICENSE DELETED
@@ -1,21 +0,0 @@
1
-
2
- Copyright (c) Nils Adermann, Jordi Boggiano
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is furnished
9
- to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all
12
- copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- THE SOFTWARE.
21
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_classmap.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_classmap.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_namespaces.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_namespaces.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_psr4.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_psr4.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_real.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
-
3
- // autoload_real.php @generated by Composer
4
-
5
- class ComposerAutoloaderInit6b11730bf9ca7991cb734e6839a3d592
6
- {
7
- private static $loader;
8
-
9
- public static function loadClassLoader($class)
10
- {
11
- if ('Composer\Autoload\ClassLoader' === $class) {
12
- require __DIR__ . '/ClassLoader.php';
13
- }
14
- }
15
-
16
- public static function getLoader()
17
- {
18
- if (null !== self::$loader) {
19
- return self::$loader;
20
- }
21
-
22
- spl_autoload_register(array('ComposerAutoloaderInit6b11730bf9ca7991cb734e6839a3d592', 'loadClassLoader'), true, true);
23
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit6b11730bf9ca7991cb734e6839a3d592', 'loadClassLoader'));
25
-
26
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
- if ($useStaticLoader) {
28
- require_once __DIR__ . '/autoload_static.php';
29
-
30
- call_user_func(\Composer\Autoload\ComposerStaticInit6b11730bf9ca7991cb734e6839a3d592::getInitializer($loader));
31
- } else {
32
- $map = require __DIR__ . '/autoload_namespaces.php';
33
- foreach ($map as $namespace => $path) {
34
- $loader->set($namespace, $path);
35
- }
36
-
37
- $map = require __DIR__ . '/autoload_psr4.php';
38
- foreach ($map as $namespace => $path) {
39
- $loader->setPsr4($namespace, $path);
40
- }
41
-
42
- $classMap = require __DIR__ . '/autoload_classmap.php';
43
- if ($classMap) {
44
- $loader->addClassMap($classMap);
45
- }
46
- }
47
-
48
- $loader->register(true);
49
-
50
- return $loader;
51
- }
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_static.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
-
3
- // autoload_static.php @generated by Composer
4
-
5
- namespace Composer\Autoload;
6
-
7
- class ComposerStaticInit6b11730bf9ca7991cb734e6839a3d592
8
- {
9
- public static function getInitializer(ClassLoader $loader)
10
- {
11
- return \Closure::bind(function () use ($loader) {
12
-
13
- }, null, ClassLoader::class);
14
- }
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installed.json DELETED
@@ -1 +0,0 @@
1
- []