Speed Booster Pack - Version 3.2

Version Description

  • * Added Lazy Load feature to improve the web page loading times of your images.
Download this release

Release Info

Developer ShortPixel
Plugin Icon 128x128 Speed Booster Pack
Version 3.2
Comparing to
See all releases

Code changes from version 3.1 to 3.2

css/sbp-fade-in.css ADDED
@@ -0,0 +1 @@
 
1
+ img.crazy_lazy {opacity:0}
css/sbp_style.min.css CHANGED
@@ -1 +1 @@
1
- .postbox,.wrap .sb-pack .sbp-box{position:relative;overflow:hidden}.wrap .sb-pack .welcome-panel .welcome-panel-column:first-child{display:block!important}.wrap .sb-pack .welcome-panel h4{margin:1.33em 0 20px}.wrap .sb-pack .sbp-inline-wrap{display:inline-block;margin-right:10px;vertical-align:top}.wrap .sb-pack .sbp-more-width{width:300px}.wrap .sb-pack input[type=text]{line-height:1.3}.wrap .sb-pack .sbp-all-enqueued{background-color:#FCFCFC;padding:5px 0 10px;border:1px solid #ddd;width:auto}.wrap .sb-pack .sbp-title-scripts,.wrap .sb-pack .sbp-width{min-width:200px;width:auto;padding:0 20px}.wrap .sb-pack .sbp-title-scripts{display:inline-block;font-weight:700}.wrap .sb-pack #poststuff h2{font-size:26px;padding:9px 15px 20px 0;font-weight:700;line-height:1.3}.wrap .sb-pack #poststuff .main-sbp-title h3{font-size:24px;padding:8px 0 20px;font-weight:700;color:#FA5148}.wrap .sb-pack .handlediv{color:#80828F}.wrap .sb-pack .meta-box-sortables .postbox .handlediv:before{right:20px;font:400 30px/1.2 dashicons;padding:8px 0;content:"\f343"}.wrap .sb-pack .meta-box-sortables .postbox.closed .handlediv:before{content:"\f347"}.wrap .sb-pack .postbox .inside{padding:0 20px 20px}.wrap .sb-pack #poststuff .inside{margin:26px 0 0}.wrap .sb-pack #poststuff h3{font-size:24px;padding:8px 20px;font-weight:700;display:inline-block}.wrap .sb-pack .sbp-columns1{display:inline-block}.wrap .sb-pack .sbp-columns2{display:inline-block;max-width:73%}.wrap .sb-pack .sbp-title-div{height:50px;clear:both}.wrap .sb-pack .sbp-amount{background-color:transparent;border:none;box-shadow:none;font-size:16px}.wrap .sb-pack .sbp-slider{width:40%}.wrap .sb-pack p{color:#464646;line-height:1.6}.wrap .sb-pack .debug-info{margin-top:19px;border:1px solid #1A9E51;padding:17px 10px;background-color:#2DCB73;color:#FFF;font-size:16px;line-height:1.6;text-shadow:1px 1px #1A9E51}.wrap .sb-pack .td-margin{margin:1.5em 0}.wrap .sb-pack .sbp-div-head{border-bottom:1px solid #E1E1E1;margin:0 0 5px;padding:0 0 5px}.wrap .sb-pack .td-border{border-bottom:1px solid #E1E1E1;margin:10px 0}.wrap .sb-pack .td-border-last{border-bottom:1px solid #E1E1E1;margin:1.5em 0}.wrap .sb-pack .sbp-radio-content{display:block}.wrap .sb-pack .sbp-radio-content label{display:block!important}.wrap .sb-pack .sbp-box hr{margin-left:70px}.wrap .sb-pack .sbp-1{padding-top:10px}.wrap .sb-pack .sbp-2{padding-bottom:15px}.wrap .sb-pack .sbp-3{padding-top:5px}.wrap .sb-pack .sbp-title-div .sbp-title{font-size:23px;font-weight:300;line-height:26px;padding-top:16px;padding-right:15px;display:block;float:left}.wrap .sb-pack .sbp-box{background:#fff;border:1px solid #E5E5E5;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:15px;margin-bottom:15px}.wrap .sb-pack .ui-widget-content,.wrap .sb-pack label:before{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.wrap .sb-pack .sbp-box p{margin:5px 0 5px 70px;color:#777}.wrap .sb-pack .sbp-infos{display:block;margin:0 auto;padding-left:70px;font-weight:700;color:#777}.wrap .sb-pack .sbp-infos span{color:#777;font-weight:400}.wrap .sb-pack .sbp-infos-title{font-weight:700;color:#777}.wrap .sb-pack .sbp-box-legend,.wrap .sb-pack .sbp-box-version{position:absolute;left:0;top:0;height:100%}.wrap .sb-pack .sbp-box-version{background:#80828F;padding:20px 15px}.wrap .sb-pack .sbp-box-legend{background:#FCC500;padding:15px}.wrap .sb-pack .sbp-box-legend:hover{background-color:#F39C12}.wrap .sb-pack .sbp-box-version:hover{background-color:#6C6E79}.wrap .sb-pack .sbp-icon-help,.wrap .sb-pack .sbp-icon-version{color:#FFF;font-size:25px}.wrap .sb-pack .sbp-icon:before{content:"\f185";display:inline-block;-webkit-font-smoothing:antialiased;font:400 36px/.6 dashicons;vertical-align:top;color:#FA5148;padding-right:5px}.wrap .sb-pack .sbp-icon-information:before{content:"\f348";display:inline-block;-webkit-font-smoothing:antialiased;font:400 28px/1 dashicons;vertical-align:middle;color:#C9D6E2;padding-right:5px}.wrap .sb-pack label{display:inline-block;cursor:pointer;position:relative;padding-left:35px;font-size:16px}.wrap .sb-pack label:before{content:"\2717";font-size:16px;-webkit-font-smoothing:antialiased;text-align:center;color:#fff;display:inline-block;width:26px;height:26px;margin-right:10px;position:absolute;left:0;background:#C9D6E2;box-shadow:inset 0 1px 2px rgba(0,0,0,.1);border:1px solid #B2BFCA}.wrap .sb-pack input[type=checkbox],.wrap .sb-pack input[type=radio]{display:none}.wrap .sb-pack input[type=checkbox]:checked+label:before{content:"\2714";background:#2DCB73;text-shadow:1px 1px 1px #148D44;border:1px solid #1A9E51;font-size:16px;-webkit-font-smoothing:antialiased;color:#fff;text-align:center}.wrap .sb-pack .sbp-icon-version:before{content:"\f348";display:inline-block;-webkit-font-smoothing:antialiased;font:400 30px/1 dashicons;vertical-align:top}.wrap .sb-pack .sbp-icon-help:before{content:"\f123";display:inline-block;-webkit-font-smoothing:antialiased;font:400 30px/1 dashicons;vertical-align:top}.wrap .sb-pack .sbp-stats{font-size:16px;line-height:1.5}.wrap .sb-pack .ui-widget-content .ui-state-default,.wrap .sb-pack .ui-widget-header .ui-state-default,.wrap .sb-pack.ui-state-default{border:1px solid #1A9E51;background-color:#2DCB73;font-weight:400;color:#555;outline:0;cursor:pointer}.wrap .sb-pack .ui-corner-all,.wrap .sb-pack .ui-corner-bl,.wrap .sb-pack .ui-corner-bottom,.wrap .sb-pack .ui-corner-left{border-bottom-left-radius:0}.wrap .sb-pack .ui-state-default:before,.wrap .sb-pack .ui-widget-content .ui-state-default:before,.wrap .sb-pack .ui-widget-header .ui-state-default:before{content:"\2630";display:inline-block;-webkit-font-smoothing:antialiased;color:#fff;font-weight:700;text-shadow:0 1px #1A9E51;line-height:1.8em}.wrap .sb-pack .ui-state-default a,.wrap .sb-pack .ui-state-default a:link,.wrap .sb-pack .ui-state-default a:visited{color:#fff;text-decoration:none}.wrap .sb-pack .ui-state-focus,.wrap .sb-pack .ui-state-hover,.wrap .sb-pack .ui-widget-content .ui-state-focus,.wrap .sb-pack .ui-widget-content .ui-state-hover,.wrap .sb-pack .ui-widget-header .ui-state-focus,.wrap .sb-pack .ui-widget-header .ui-state-hover{background:#3CE281}.wrap .sb-pack .ui-corner-all,.wrap .sb-pack .ui-corner-left,.wrap .sb-pack .ui-corner-tl,.wrap .sb-pack .ui-corner-top{border-top-left-radius:0}.wrap .sb-pack .ui-corner-all,.wrap .sb-pack .ui-corner-right,.wrap .sb-pack .ui-corner-top,.wrap .sb-pack .ui-corner-tr{border-top-right-radius:0}.wrap .sb-pack .ui-corner-all,.wrap .sb-pack .ui-corner-bottom,.wrap .sb-pack .ui-corner-br,.wrap .sb-pack .ui-corner-right{border-bottom-right-radius:0}.wrap .sb-pack .ui-slider-horizontal{height:1.3em}.wrap .sb-pack .ui-slider .ui-slider-handle{width:1.8em;height:1.8em;cursor:pointer;text-align:center}.wrap .sb-pack .ui-widget-content{box-shadow:inset 0 1px 2px rgba(0,0,0,.1);border:1px solid #B2BFCA;background:#F1F2F7;color:#222}.wrap .sb-pack .sbp-progress.queries,.wrap .sb-pack .sbp-progress.time{height:30px;width:77%;display:inline-block;position:relative;background-color:#F1F2F7;overflow:hidden;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.wrap .sbp-progress.queries>span,.wrap .sbp-progress.time>span{background-color:#7EDBA5;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#7EDBA5),color-stop(1,#2DCB73));background-image:-webkit-linear-gradient(top,#7EDBA5,#2DCB73);background-image:-moz-linear-gradient(top,#7EDBA5,#2DCB73);background-image:-ms-linear-gradient(top,#7EDBA5,#2DCB73);background-image:-o-linear-gradient(top,#7EDBA5,#f36d0a);color:#fff;width:0;max-width:98%;float:left;display:block;height:100%;position:relative;overflow:hidden}.wrap .sb-pack .sbp-progress.time>span{-webkit-animation:progress-bar-time 2s 1 forwards;-moz-animation:progress-bar-time 2s 1 forwards;-ms-animation:progress-bar-time 2s 1 forwards;-o-animation:progress-bar-time 2s 1 forwards;animation:progress-bar-time 2s 1 forwards}.wrap .sb-pack .sbp-progress.queries>span{-webkit-animation:progress-bar-queries 2s 1 forwards;-moz-animation:progress-bar-queries 2s 1 forwards;-ms-animation:progress-bar-queries 2s 1 forwards;-o-animation:progress-bar-queries 2s 1 forwards;animation:progress-bar-queries 2s 1 forwards}.wrap .sb-pack .sbp-values{float:right;padding:0 5px;background-color:#1AB4EF;color:#fff;width:18%;height:30px;line-height:30px;text-align:center;text-shadow:0 -2px #1AB4EF}.wrap .sb-pack .sbp-numbers{-webkit-animation:opacity 2s;-moz-animation:opacity 2s;-ms-animation:opacity 2s;-o-animation:opacity 2s;animation:opacity 2s;transition-delay:2s;-moz-transition-delay:2s;-webkit-transition-delay:2s;-o-transition-delay:2s;font-size:16px}@keyframes opacity{from{opacity:0}to{opacity:1}}@-moz-keyframes opacity{from{opacity:0}to{opacity:1}}@-webkit-keyframes opacity{from{opacity:0}to{opacity:1}}@-ms-keyframes opacity{from{opacity:0}to{opacity:1}}​ @-o-keyframes opacity{from{opacity:0}to{opacity:1}}​ @media screen and (max-width:783px){.wrap .sb-pack input.regular-text{width:14em}}@media screen and (min-width:784px){.wrap .sb-pack input.regular-text{width:45em}}
1
+ .postbox,.wrap .sb-pack .sbp-box{position:relative;overflow:hidden}.wrap .sb-pack .welcome-panel .welcome-panel-column:first-child{display:block!important}.wrap .sb-pack .welcome-panel h4{margin:1.33em 0 20px}.wrap .sb-pack .sbp-inline-wrap{display:inline-block;margin-right:10px;vertical-align:top}.wrap .sb-pack .sbp-more-width{width:300px}.wrap .sb-pack input[type=text]{line-height:1.3}.wrap .sb-pack .sbp-all-enqueued{background-color:#FCFCFC;padding:5px 0 10px;border:1px solid #ddd;width:auto}.wrap .sb-pack .sbp-title-scripts,.wrap .sb-pack .sbp-width{min-width:200px;width:auto;padding:0 20px}.wrap .sb-pack .sbp-title-scripts{display:inline-block;font-weight:700}.wrap .sb-pack #poststuff h2{font-size:26px;padding:9px 15px 20px 0;font-weight:700;line-height:1.3}.wrap .sb-pack #poststuff .main-sbp-title h3{font-size:24px;padding:8px 0 20px;font-weight:700;color:#FA5148}.wrap .sb-pack .handlediv{color:#80828F;padding: 10px 0 0;cursor:pointer}.wrap .sb-pack .meta-box-sortables .postbox .handlediv:before{right:20px;font:400 30px/1.2 dashicons;padding:8px 0;content:"\f343"}.wrap .sb-pack .meta-box-sortables .postbox.closed .handlediv:before{content:"\f347"}.wrap .sb-pack .postbox .inside{padding:0 20px 20px}.wrap .sb-pack #poststuff .inside{margin:26px 0 0}.wrap .sb-pack #poststuff h3{font-size:24px;padding:8px 20px;font-weight:700;display:inline-block}.wrap .sb-pack .sbp-columns1{display:inline-block}.wrap .sb-pack .sbp-columns2{display:inline-block;max-width:73%}.wrap .sb-pack .sbp-title-div{height:50px;clear:both}.wrap .sb-pack .sbp-amount{background-color:transparent;border:none;box-shadow:none;font-size:16px}.wrap .sb-pack .sbp-slider{width:40%}.wrap .sb-pack p{color:#464646;line-height:1.6}.wrap .sb-pack .debug-info{margin-top:19px;border:1px solid #1A9E51;padding:17px 10px;background-color:#2DCB73;color:#FFF;font-size:16px;line-height:1.6;text-shadow:1px 1px #1A9E51}.wrap .sb-pack .td-margin{margin:1.5em 0}.wrap .sb-pack .sbp-div-head{border-bottom:1px solid #E1E1E1;margin:0 0 5px;padding:0 0 5px}.wrap .sb-pack .td-border{border-bottom:1px solid #E1E1E1;margin:10px 0}.wrap .sb-pack .td-border-last{border-bottom:1px solid #E1E1E1;margin:1.5em 0}.wrap .sb-pack .sbp-radio-content{display:block}.wrap .sb-pack .sbp-radio-content label{display:block!important}.wrap .sb-pack .sbp-box hr{margin-left:70px}.wrap .sb-pack .sbp-1{padding-top:10px}.wrap .sb-pack .sbp-2{padding-bottom:15px}.wrap .sb-pack .sbp-3{padding-top:5px}.wrap .sb-pack .sbp-title-div .sbp-title{font-size:23px;font-weight:300;line-height:26px;padding-top:16px;padding-right:15px;display:block;float:left}.wrap .sb-pack .sbp-box{background:#fff;border:1px solid #E5E5E5;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:15px;margin-bottom:15px}.wrap .sb-pack .ui-widget-content,.wrap .sb-pack label:before{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.wrap .sb-pack .sbp-box p{margin:5px 0 5px 70px;color:#777}.wrap .sb-pack .sbp-infos{display:block;margin:0 auto;padding-left:70px;font-weight:700;color:#777}.wrap .sb-pack .sbp-infos span{color:#777;font-weight:400}.wrap .sb-pack .sbp-infos-title{font-weight:700;color:#777}.wrap .sb-pack .sbp-box-legend,.wrap .sb-pack .sbp-box-version{position:absolute;left:0;top:0;height:100%}.wrap .sb-pack .sbp-box-version{background:#80828F;padding:20px 15px}.wrap .sb-pack .sbp-box-legend{background:#FCC500;padding:15px}.wrap .sb-pack .sbp-box-legend:hover{background-color:#F39C12}.wrap .sb-pack .sbp-box-version:hover{background-color:#6C6E79}.wrap .sb-pack .sbp-icon-help,.wrap .sb-pack .sbp-icon-version{color:#FFF;font-size:25px}.wrap .sb-pack .sbp-icon:before{content:"\f185";display:inline-block;-webkit-font-smoothing:antialiased;font:400 36px/.6 dashicons;vertical-align:top;color:#FA5148;padding-right:5px}.wrap .sb-pack .sbp-icon-information:before{content:"\f348";display:inline-block;-webkit-font-smoothing:antialiased;font:400 28px/1 dashicons;vertical-align:middle;color:#C9D6E2;padding-right:5px}.wrap .sb-pack label{display:inline-block;cursor:pointer;position:relative;padding-left:35px;font-size:16px}.wrap .sb-pack label:before{content:"\2717";font-size:16px;-webkit-font-smoothing:antialiased;text-align:center;color:#fff;display:inline-block;width:26px;height:26px;margin-right:10px;position:absolute;left:0;background:#C9D6E2;box-shadow:inset 0 1px 2px rgba(0,0,0,.1);border:1px solid #B2BFCA}.wrap .sb-pack input[type=checkbox],.wrap .sb-pack input[type=radio]{display:none}.wrap .sb-pack input[type=checkbox]:checked+label:before{content:"\2714";background:#2DCB73;text-shadow:1px 1px 1px #148D44;border:1px solid #1A9E51;font-size:16px;-webkit-font-smoothing:antialiased;color:#fff;text-align:center}.wrap .sb-pack .sbp-icon-version:before{content:"\f348";display:inline-block;-webkit-font-smoothing:antialiased;font:400 30px/1 dashicons;vertical-align:top}.wrap .sb-pack .sbp-icon-help:before{content:"\f123";display:inline-block;-webkit-font-smoothing:antialiased;font:400 30px/1 dashicons;vertical-align:top}.wrap .sb-pack .sbp-stats{font-size:16px;line-height:1.5}.wrap .sb-pack .ui-widget-content .ui-state-default,.wrap .sb-pack .ui-widget-header .ui-state-default,.wrap .sb-pack.ui-state-default{border:1px solid #1A9E51;background-color:#2DCB73;font-weight:400;color:#555;outline:0;cursor:pointer}.wrap .sb-pack .ui-corner-all,.wrap .sb-pack .ui-corner-bl,.wrap .sb-pack .ui-corner-bottom,.wrap .sb-pack .ui-corner-left{border-bottom-left-radius:0}.wrap .sb-pack .ui-state-default:before,.wrap .sb-pack .ui-widget-content .ui-state-default:before,.wrap .sb-pack .ui-widget-header .ui-state-default:before{content:"\2630";display:inline-block;-webkit-font-smoothing:antialiased;color:#fff;font-weight:700;text-shadow:0 1px #1A9E51;line-height:1.8em}.wrap .sb-pack .ui-state-default a,.wrap .sb-pack .ui-state-default a:link,.wrap .sb-pack .ui-state-default a:visited{color:#fff;text-decoration:none}.wrap .sb-pack .ui-state-focus,.wrap .sb-pack .ui-state-hover,.wrap .sb-pack .ui-widget-content .ui-state-focus,.wrap .sb-pack .ui-widget-content .ui-state-hover,.wrap .sb-pack .ui-widget-header .ui-state-focus,.wrap .sb-pack .ui-widget-header .ui-state-hover{background:#3CE281}.wrap .sb-pack .ui-corner-all,.wrap .sb-pack .ui-corner-left,.wrap .sb-pack .ui-corner-tl,.wrap .sb-pack .ui-corner-top{border-top-left-radius:0}.wrap .sb-pack .ui-corner-all,.wrap .sb-pack .ui-corner-right,.wrap .sb-pack .ui-corner-top,.wrap .sb-pack .ui-corner-tr{border-top-right-radius:0}.wrap .sb-pack .ui-corner-all,.wrap .sb-pack .ui-corner-bottom,.wrap .sb-pack .ui-corner-br,.wrap .sb-pack .ui-corner-right{border-bottom-right-radius:0}.wrap .sb-pack .ui-slider-horizontal{height:1.3em}.wrap .sb-pack .ui-slider .ui-slider-handle{width:1.8em;height:1.8em;cursor:pointer;text-align:center}.wrap .sb-pack .ui-widget-content{box-shadow:inset 0 1px 2px rgba(0,0,0,.1);border:1px solid #B2BFCA;background:#F1F2F7;color:#222}.wrap .sb-pack .sbp-progress.queries,.wrap .sb-pack .sbp-progress.time{height:30px;width:77%;display:inline-block;position:relative;background-color:#F1F2F7;overflow:hidden;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.wrap .sbp-progress.queries>span,.wrap .sbp-progress.time>span{background-color:#7EDBA5;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#7EDBA5),color-stop(1,#2DCB73));background-image:-webkit-linear-gradient(top,#7EDBA5,#2DCB73);background-image:-moz-linear-gradient(top,#7EDBA5,#2DCB73);background-image:-ms-linear-gradient(top,#7EDBA5,#2DCB73);background-image:-o-linear-gradient(top,#7EDBA5,#f36d0a);color:#fff;width:0;max-width:98%;float:left;display:block;height:100%;position:relative;overflow:hidden}.wrap .sb-pack .sbp-progress.time>span{-webkit-animation:progress-bar-time 2s 1 forwards;-moz-animation:progress-bar-time 2s 1 forwards;-ms-animation:progress-bar-time 2s 1 forwards;-o-animation:progress-bar-time 2s 1 forwards;animation:progress-bar-time 2s 1 forwards}.wrap .sb-pack .sbp-progress.queries>span{-webkit-animation:progress-bar-queries 2s 1 forwards;-moz-animation:progress-bar-queries 2s 1 forwards;-ms-animation:progress-bar-queries 2s 1 forwards;-o-animation:progress-bar-queries 2s 1 forwards;animation:progress-bar-queries 2s 1 forwards}.wrap .sb-pack .sbp-values{float:right;padding:0 5px;background-color:#1AB4EF;color:#fff;width:18%;height:30px;line-height:30px;text-align:center;text-shadow:0 -2px #1AB4EF}.wrap .sb-pack .sbp-numbers{-webkit-animation:opacity 2s;-moz-animation:opacity 2s;-ms-animation:opacity 2s;-o-animation:opacity 2s;animation:opacity 2s;transition-delay:2s;-moz-transition-delay:2s;-webkit-transition-delay:2s;-o-transition-delay:2s;font-size:16px}@keyframes opacity{from{opacity:0}to{opacity:1}}@-moz-keyframes opacity{from{opacity:0}to{opacity:1}}@-webkit-keyframes opacity{from{opacity:0}to{opacity:1}}@-ms-keyframes opacity{from{opacity:0}to{opacity:1}}​ @-o-keyframes opacity{from{opacity:0}to{opacity:1}}​ @media screen and (max-width:783px){.wrap .sb-pack input.regular-text{width:14em}}@media screen and (min-width:784px){.wrap .sb-pack input.regular-text{width:45em}}
css/style.dev.css CHANGED
@@ -68,6 +68,8 @@ p.description-link {
68
 
69
  .wrap .sb-pack .handlediv {
70
  color: #80828F;
 
 
71
  }
72
 
73
  .wrap .sb-pack .meta-box-sortables .postbox .handlediv:before {
68
 
69
  .wrap .sb-pack .handlediv {
70
  color: #80828F;
71
+ padding: 10px 0 0;
72
+ cursor: pointer;
73
  }
74
 
75
  .wrap .sb-pack .meta-box-sortables .postbox .handlediv:before {
inc/core.php CHANGED
@@ -33,10 +33,10 @@ if( !class_exists( 'Speed_Booster_Pack_Core' ) ) {
33
  $this->sbp_use_google_libraries();
34
  }
35
 
36
- // Use Google Libraries
37
- //if ( !is_admin() and isset( $sbp_options['lazy_load'] ) ) {
38
- // $this->sbp_lazy_load_for_images();
39
- //}
40
 
41
  // Defer parsing of JavaScript
42
  if ( !is_admin() and isset( $sbp_options['defer_parsing'] ) ) {
@@ -364,15 +364,15 @@ function sbp_use_google_libraries() {
364
 
365
 
366
  /*--------------------------------------------------------------------------------------------------------
367
- Lazy Load for images - deleted as of 3.1 (present in 2.9
368
- ---------------------------------------------------------------------------------------------------------
369
 
370
  function sbp_lazy_load_for_images() {
371
 
372
- require_once( SPEED_BOOSTER_PACK_PATH . 'inc/lazy-load.php' );
373
 
374
  } // End function sbp_lazy_load_for_images()
375
- */
376
 
377
  /*--------------------------------------------------------------------------------------------------------
378
  CSS Optimizer
33
  $this->sbp_use_google_libraries();
34
  }
35
 
36
+ // Lazy Load
37
+ if ( !is_admin() and isset( $sbp_options['lazy_load'] ) ) {
38
+ $this->sbp_lazy_load_for_images();
39
+ }
40
 
41
  // Defer parsing of JavaScript
42
  if ( !is_admin() and isset( $sbp_options['defer_parsing'] ) ) {
364
 
365
 
366
  /*--------------------------------------------------------------------------------------------------------
367
+ Lazy Load for images
368
+ ---------------------------------------------------------------------------------------------------------*/
369
 
370
  function sbp_lazy_load_for_images() {
371
 
372
+ require_once( SPEED_BOOSTER_PACK_PATH . 'inc/crazy-lazy.php' );
373
 
374
  } // End function sbp_lazy_load_for_images()
375
+
376
 
377
  /*--------------------------------------------------------------------------------------------------------
378
  CSS Optimizer
inc/crazy-lazy.class.php ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CrazyLazy plugin class
4
+ *
5
+ * @package CrazyLazy
6
+ */
7
+
8
+ /* Quit */
9
+ defined( 'ABSPATH' ) or exit;
10
+
11
+
12
+ /**
13
+ * Class CrazyLazy
14
+ */
15
+ final class CrazyLazy {
16
+
17
+
18
+ /**
19
+ * Class instance
20
+ *
21
+ * @since 0.0.1
22
+ * @change 0.0.1
23
+ */
24
+ public static function instance() {
25
+ new self();
26
+ }
27
+
28
+
29
+ /**
30
+ * Class constructor
31
+ *
32
+ * @since 0.0.1
33
+ * @change 0.0.9
34
+ */
35
+ public function __construct() {
36
+ /* Go home */
37
+ if ( is_feed() || ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_CRON' ) && DOING_CRON ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) ) {
38
+ return;
39
+ }
40
+
41
+ /* Hooks */
42
+ add_filter(
43
+ 'the_content',
44
+ array(
45
+ __CLASS__,
46
+ 'prepare_images',
47
+ ),
48
+ 12 /* Important for galleries */
49
+ );
50
+ add_filter(
51
+ 'post_thumbnail_html',
52
+ array(
53
+ __CLASS__,
54
+ 'prepare_images',
55
+ )
56
+ );
57
+ add_action(
58
+ 'wp_enqueue_scripts',
59
+ array(
60
+ __CLASS__,
61
+ 'print_scripts',
62
+ )
63
+ );
64
+ }
65
+
66
+
67
+ /**
68
+ * Prepare content images for Crazy Lazy usage
69
+ *
70
+ * @since 0.0.1
71
+ * @change 1.0.0
72
+ *
73
+ * @param string $content The original post content.
74
+ *
75
+ * @return string The modified post content.
76
+ */
77
+ public static function prepare_images( $content ) {
78
+ /* No lazy images? */
79
+ if ( strpos( $content, '-image' ) === false ) {
80
+ return $content;
81
+ }
82
+
83
+ /* Replace images */
84
+ return preg_replace_callback(
85
+ '/(?P<all> (?# match the whole img tag )
86
+ <img(?P<before>[^>]*) (?# the opening of the img and some optional attributes )
87
+ ( (?# match a class attribute followed by some optional ones and the src attribute )
88
+ class=["\'](?P<class1>.*?(?:wp-image-|wp-post-image)[^>"\']*)["\']
89
+ (?P<between1>[^>]*)
90
+ src=["\'](?P<src1>[^>"\']*)["\']
91
+ | (?# match same as before, but with the src attribute before the class attribute )
92
+ src=["\'](?P<src2>[^>"\']*)["\']
93
+ (?P<between2>[^>]*)
94
+ class=["\'](?P<class2>.*?(?:wp-image-|wp-post-image)[^>"\']*)["\']
95
+ )
96
+ (?P<after>[^>]*) (?# match any additional optional attributes )
97
+ (?P<closing>\/?)> (?# match the closing of the img tag with or without a self closing slash )
98
+ )/x',
99
+ array( 'CrazyLazy', 'replace_images' ),
100
+ $content
101
+ );
102
+ }
103
+
104
+ /**
105
+ * The callback function for the preg_match_callback to modify the img tags.
106
+ *
107
+ * @since 1.0.0
108
+ *
109
+ * @param array $matches The regex matches.
110
+ *
111
+ * @return string The modified content string.
112
+ */
113
+ public static function replace_images( $matches ) {
114
+ /* Empty gif */
115
+ $null = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
116
+ // Return unmodified image if the "data skip" attribute was found or the image has already been processed.
117
+ if ( false !== strpos( $matches['all'], 'data-crazy-lazy="exclude"' ) || false !== strpos( $matches['class1'] . $matches['class2'], 'crazy_lazy' ) ) {
118
+ return $matches['all'];
119
+ } else {
120
+ return '<img ' . $matches['before']
121
+ . ' style="display:none" '
122
+ . ' class="crazy_lazy ' . $matches['class1'] . $matches['class2'] . '" src="' . $null . '" '
123
+ . $matches['between1'] . $matches['between2']
124
+ . ' data-src="' . $matches['src1'] . $matches['src2'] . '" '
125
+ . $matches['after']
126
+ . $matches['closing'] . '><noscript>' . $matches['all'] . '</noscript>';
127
+ }
128
+ }
129
+
130
+
131
+ /**
132
+ * Print lazy load scripts in footer
133
+ *
134
+ * @since 0.0.1
135
+ * @change 0.0.6
136
+ */
137
+ public static function print_scripts() {
138
+ /* Globals */
139
+ global $wp_scripts;
140
+
141
+ /* Check for jQuery */
142
+ if ( ! empty( $wp_scripts ) && (bool) $wp_scripts->query( 'jquery' ) ) { /* hot fix for buggy wp_script_is() */
143
+ self::_print_jquery_lazyload();
144
+ } else {
145
+ self::_print_javascript_lazyload();
146
+ }
147
+ }
148
+
149
+
150
+ /**
151
+ * Call unveil lazy load jQuery plugin
152
+ *
153
+ * @since 0.0.5
154
+ * @change 0.0.9
155
+ */
156
+ private static function _print_jquery_lazyload() {
157
+ // wp_enqueue_script( 'unveil.js', plugins_url( '/js/jquery.unveil.min.js', CRAZY_LAZY_BASE ), array( 'jquery' ), '', true );
158
+ wp_enqueue_script( 'unveil.js', plugin_dir_url( __FILE__ ) . 'js/jquery.unveil.min.js', array( 'jquery' ), SPEED_BOOSTER_PACK_VERSION, true );
159
+ }
160
+
161
+
162
+ /**
163
+ * Call pure javascript lazyload.js
164
+ *
165
+ * @since 0.0.5
166
+ * @change 0.0.9
167
+ */
168
+ private static function _print_javascript_lazyload() {
169
+ // wp_enqueue_script( 'lazyload.js', plugins_url( '/js/lazyload.min.js', CRAZY_LAZY_BASE ), array(), '', true );
170
+ wp_enqueue_script( 'lazyload.js', plugin_dir_url( __FILE__ ) . 'js/lazyload.min.js', array( 'jquery' ), SPEED_BOOSTER_PACK_VERSION, true );
171
+ }
172
+ }
inc/crazy-lazy.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Copyright (C) 2013-2015 Sergej Müller & https://github.com/pluginkollektiv/crazy-lazy
5
+
6
+ This program is free software; you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation; either version 2 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License along
17
+ with this program; if not, write to the Free Software Foundation, Inc.,
18
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
+ */
20
+
21
+
22
+ /* Quit */
23
+ defined( 'ABSPATH' ) || exit;
24
+
25
+
26
+ /* FE only */
27
+ if ( is_admin() ) {
28
+ return;
29
+ }
30
+
31
+
32
+ /* Fire! */
33
+ define( 'CRAZY_LAZY_BASE', plugin_basename( __FILE__ ) );
34
+
35
+ require_once( SPEED_BOOSTER_PACK_PATH . 'inc/crazy-lazy.class.php' );
36
+
37
+ add_action( 'wp', array( 'CrazyLazy', 'instance' ) );
{img → inc/images}/sp.png RENAMED
File without changes
inc/js/jquery.unveil.js ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jQuery Unveil
3
+ * A very lightweight jQuery plugin to lazy load images
4
+ * http://luis-almeida.github.com/unveil
5
+ *
6
+ * Modified by Sergej Müller
7
+ * http://wpcoder.de
8
+ *
9
+ * Licensed under the MIT license.
10
+ */
11
+
12
+ ;(function($) {
13
+ $.fn.unveil = function() {
14
+
15
+ var $w = $(window),
16
+ images = this,
17
+ loaded,
18
+ inview,
19
+ source;
20
+
21
+ this.one(
22
+ 'unveil',
23
+ function() {
24
+ var $$ = $(this),
25
+ source = $$.data('src') || $$.attr('data-src');
26
+
27
+ if ( source) {
28
+ $$
29
+ .css('opacity', 0)
30
+ .attr('src', source)
31
+ .animate(
32
+ {
33
+ 'opacity': 1
34
+ },
35
+ 200
36
+ );
37
+ }
38
+ }
39
+ );
40
+
41
+ function unveil() {
42
+ inview = images.filter(
43
+ function() {
44
+ var $e = $(this),
45
+ wt = $w.scrollTop(),
46
+ wb = wt + $w.height(),
47
+ et = $e.offset().top,
48
+ eb = et + $e.height();
49
+
50
+ return eb >= wt && et <= wb;
51
+ }
52
+ );
53
+
54
+ loaded = inview.trigger('unveil');
55
+ images = images.not(loaded);
56
+ }
57
+
58
+ $w.scroll(unveil);
59
+ $w.resize(unveil);
60
+
61
+ unveil();
62
+
63
+ return this;
64
+ };
65
+ })(window.jQuery);
66
+
67
+
68
+ jQuery(document).ready(
69
+ function(){
70
+ jQuery("img.crazy_lazy").css('display', '').unveil();
71
+ }
72
+ );
inc/js/jquery.unveil.min.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jQuery Unveil
3
+ * A very lightweight jQuery plugin to lazy load images
4
+ * http://luis-almeida.github.com/unveil
5
+ *
6
+ * Modified by Sergej Müller
7
+ * http://wpcoder.de
8
+ *
9
+ * Licensed under the MIT license.
10
+ */
11
+
12
+ (function(c){c.fn.unveil=function(){function b(){e=a.filter(function(){var f=c(this),g=d.scrollTop(),b=g+d.height(),a=f.offset().top;return a+f.height()>=g&&a<=b});h=e.trigger("unveil");a=a.not(h)}var d=c(window),a=this,h,e;this.one("unveil",function(){var a=c(this),b=a.data("src")||a.attr("data-src");b&&a.css("opacity",0).attr("src",b).animate({opacity:1},200)});d.scroll(b);d.resize(b);b();return this}})(window.jQuery);jQuery(document).ready(function(){jQuery("img.crazy_lazy").css("display","").unveil()});
inc/js/lazyload.js ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* lazyload.js (c) Lorenzo Giuliani
2
+ * MIT License (http://www.opensource.org/licenses/mit-license.html)
3
+ *
4
+ * Modified by Sergej Müller | http://wpcoder.de
5
+ */
6
+
7
+
8
+ window.onload = function() {
9
+ var $q = function(q, res){
10
+ if (document.querySelectorAll) {
11
+ res = document.querySelectorAll(q);
12
+ } else {
13
+ var d=document,
14
+ a=d.styleSheets[0] || d.createStyleSheet();
15
+
16
+ a.addRule(q,'f:b');
17
+ for(var l=d.all,b=0,c=[],f=l.length;b<f;b++)
18
+ l[b].currentStyle.f && c.push(l[b]);
19
+
20
+ a.removeRule(0);
21
+ res = c;
22
+ }
23
+
24
+ return res;
25
+ },
26
+
27
+ addEventListener = function(evt, fn) {
28
+ window.addEventListener
29
+ ? this.addEventListener(evt, fn, false)
30
+ : (window.attachEvent)
31
+ ? this.attachEvent('on' + evt, fn)
32
+ : this['on' + evt] = fn;
33
+ },
34
+
35
+ _has = function(obj, key) {
36
+ return Object.prototype.hasOwnProperty.call(obj, key);
37
+ };
38
+
39
+ function loadImage (el, fn) {
40
+ var img = new Image(),
41
+ src = el.getAttribute('data-src');
42
+
43
+ img.onload = function() {
44
+ if ( !! el.parent )
45
+ el.parent.replaceChild(img, el)
46
+ else
47
+ el.src = src;
48
+
49
+ if ( fn ) fn();
50
+ }
51
+
52
+ img.src = src;
53
+ }
54
+
55
+ function elementInViewport(el) {
56
+ var rect = el.getBoundingClientRect();
57
+
58
+ return (
59
+ rect.top >= 0
60
+ && rect.left >= 0
61
+ && rect.top <= (window.innerHeight || document.documentElement.clientHeight)
62
+ );
63
+ }
64
+
65
+ var images = new Array(),
66
+ query = $q('img.crazy_lazy'),
67
+ processScroll = function() {
68
+ for (var i = 0; i < images.length; i++) {
69
+ if (elementInViewport(images[i])) {
70
+ loadImage(
71
+ images[i],
72
+ function () {
73
+ images.splice(i, i);
74
+ }
75
+ );
76
+ }
77
+ }
78
+ };
79
+
80
+ for (var i = 0; i < query.length; i++) {
81
+ query[i].removeAttribute('style');
82
+ images.push(query[i]);
83
+ };
84
+
85
+ processScroll();
86
+
87
+ addEventListener(
88
+ 'scroll',
89
+ processScroll
90
+ );
91
+ };
inc/js/lazyload.min.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /* lazyload.js (c) Lorenzo Giuliani
2
+ * MIT License (http://www.opensource.org/licenses/mit-license.html)
3
+ *
4
+ * Modified by Sergej Müller | http://wpcoder.de
5
+ */
6
+
7
+ window.onload=function(){function h(a,e){var c=new Image,b=a.getAttribute("data-src");c.onload=function(){a.parent?a.parent.replaceChild(c,a):a.src=b;e&&e()};c.src=b}function k(a){a=a.getBoundingClientRect();return 0<=a.top&&0<=a.left&&a.top<=(window.innerHeight||document.documentElement.clientHeight)}for(var b=[],f=function(a,e){if(document.querySelectorAll)e=document.querySelectorAll(a);else{var c=document,b=c.styleSheets[0]||c.createStyleSheet();b.addRule(a,"f:b");for(var c=c.all,d=0,f=[],g=c.length;d<
8
+ g;d++)c[d].currentStyle.f&&f.push(c[d]);b.removeRule(0);e=f}return e}("img.crazy_lazy"),g=function(){for(var a=0;a<b.length;a++)k(b[a])&&h(b[a],function(){b.splice(a,a)})},d=0;d<f.length;d++)f[d].removeAttribute("style"),b.push(f[d]);g();(function(a,b){window.addEventListener?this.addEventListener(a,b,!1):window.attachEvent?this.attachEvent("on"+a,b):this["on"+a]=b})("scroll",g)};
{js → inc/js}/post-tabs-edit.js RENAMED
File without changes
{js → inc/js}/sbp-hide.js RENAMED
File without changes
{js → inc/js}/sbp-slide.js RENAMED
File without changes
inc/template/options.php CHANGED
@@ -50,16 +50,11 @@
50
  <label for="sbp_settings[query_strings]"><?php _e( 'Remove query strings', 'sb-pack' ); ?></label>
51
  </p>
52
 
53
- <!-- <p>
54
  <input id="sbp_settings[lazy_load]" name="sbp_settings[lazy_load]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['lazy_load'] ) ); ?> />
55
  <label for="sbp_settings[lazy_load]"><?php _e( 'Lazy load images to improve speed', 'sb-pack' ); ?></label>
56
  </p>
57
- -->
58
 
59
- <p>
60
- <input id="sbp_settings[wml_link]" name="sbp_settings[wml_link]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['wml_link'] ) ); ?> />
61
- <label for="sbp_settings[wml_link]"><?php _e( 'Remove Windows Manifest', 'sb-pack' ); ?></label>
62
- </p>
63
 
64
  <p>
65
  <input id="sbp_settings[font_awesome]" name="sbp_settings[font_awesome]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['font_awesome'] ) ); ?> />
@@ -87,6 +82,11 @@
87
  <label for="sbp_settings[remove_adjacent]"><?php _e( 'Remove Adjacent Posts Links', 'sb-pack' ); ?></label>
88
  </p>
89
 
 
 
 
 
 
90
  <p>
91
  <input id="sbp_settings[wp_generator]" name="sbp_settings[wp_generator]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['wp_generator'] ) ); ?> />
92
  <label for="sbp_settings[wp_generator]"><?php _e( 'Remove the WordPress Version', 'sb-pack' ); ?></label>
@@ -293,7 +293,7 @@ var jpegCompression = '<?php echo $this->image_compression; ?>';
293
  <p class="description"><strong>
294
  <?php _e( 'We recommend using ShortPixel Plugin to optimize your images.', 'sb-pack' ); ?>
295
  </strong></p>
296
- <a href="https://shortpixel.com/booster/af/KQD2XAB28044" target="_blank"><img src="<?php echo $this->plugin_url . "img/sp.png"; ?>" class="sbp-sp"/></a>
297
  <p class="description">
298
  <?php _e( 'ShortPixel is an easy to use, comprehensive, stable and frequently updated image optimization plugin supported by the friendly team that created it. Using a powerful set of specially tuned algorithms, it squeezes the most of each image striking the best balance between image size and quality. Current images can be all optimized with a single click. Newly added images are automatically resized/rescaled and optimized on the fly, in the background.', 'sb-pack' ); ?>
299
  </p>
50
  <label for="sbp_settings[query_strings]"><?php _e( 'Remove query strings', 'sb-pack' ); ?></label>
51
  </p>
52
 
53
+ <p>
54
  <input id="sbp_settings[lazy_load]" name="sbp_settings[lazy_load]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['lazy_load'] ) ); ?> />
55
  <label for="sbp_settings[lazy_load]"><?php _e( 'Lazy load images to improve speed', 'sb-pack' ); ?></label>
56
  </p>
 
57
 
 
 
 
 
58
 
59
  <p>
60
  <input id="sbp_settings[font_awesome]" name="sbp_settings[font_awesome]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['font_awesome'] ) ); ?> />
82
  <label for="sbp_settings[remove_adjacent]"><?php _e( 'Remove Adjacent Posts Links', 'sb-pack' ); ?></label>
83
  </p>
84
 
85
+ <p>
86
+ <input id="sbp_settings[wml_link]" name="sbp_settings[wml_link]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['wml_link'] ) ); ?> />
87
+ <label for="sbp_settings[wml_link]"><?php _e( 'Remove Windows Manifest', 'sb-pack' ); ?></label>
88
+ </p>
89
+
90
  <p>
91
  <input id="sbp_settings[wp_generator]" name="sbp_settings[wp_generator]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['wp_generator'] ) ); ?> />
92
  <label for="sbp_settings[wp_generator]"><?php _e( 'Remove the WordPress Version', 'sb-pack' ); ?></label>
293
  <p class="description"><strong>
294
  <?php _e( 'We recommend using ShortPixel Plugin to optimize your images.', 'sb-pack' ); ?>
295
  </strong></p>
296
+ <a href="https://shortpixel.com/booster/af/KQD2XAB28044" target="_blank"><img src="<?php echo $this->plugin_url . "inc/images/sp.png"; ?>" class="sbp-sp"/></a>
297
  <p class="description">
298
  <?php _e( 'ShortPixel is an easy to use, comprehensive, stable and frequently updated image optimization plugin supported by the friendly team that created it. Using a powerful set of specially tuned algorithms, it squeezes the most of each image striking the best balance between image size and quality. Current images can be all optimized with a single click. Newly added images are automatically resized/rescaled and optimized on the fly, in the background.', 'sb-pack' ); ?>
299
  </p>
js/jquery.sonar.js DELETED
@@ -1,421 +0,0 @@
1
- /*
2
- An elem for determining if an elem is within a certain
3
- distance from the edge above or below the screen, and attaching
4
- a function to execute once the elem is in view.
5
-
6
- General Usage:
7
-
8
- * Place the library anywhere in your JavaScript code before you
9
- intend to call the function.
10
-
11
- * To initialize Sonar with a different default distance, modify
12
- the sonar = Sonar() line immediately following the Sonar
13
- library definition. Example:
14
-
15
- sonar=Sonar(100); // Initializes Sonar with a 100px default distance.
16
-
17
- Note:
18
-
19
- * The default distance is 0 pixels.
20
-
21
-
22
- sonar.detect() Usage
23
-
24
- * Use sonar.detect(elem, distance) to check if the
25
- elem is within screen boundaries.
26
-
27
- @elem - The elem you want to detect visibility.
28
- @distance - The distance from the screen edge that should
29
- count in the check. Uses default distance if not specified.
30
-
31
- * Note: sonar.detect() adds a property to
32
- ojbects called sonarElemTop. Test to ensure there
33
- aren't any conflicts with your code. If there
34
- are, rename sonarElemTop to something else in the code.
35
-
36
- * sonar.detect() returns:
37
- true if the elem is within the screen boundaries
38
- false if th elem is out of the screen boundaries
39
-
40
- Example:
41
-
42
- Here's how to check if an advertisment is visible on a
43
- page that has the id, "ad".
44
-
45
- if (sonar.detect(document.getElementById("ad")))
46
- {
47
- alert('The ad is visible on screen!');
48
- }
49
- else
50
- {
51
- alert ('The ad is not on screen!);
52
- }
53
-
54
- sonar.add() Usage
55
-
56
- * This method stores elems that are then polled
57
- on user scroll by the Sonar.detect() method.
58
-
59
- * Polling initializes once the sonar.add() method is passed
60
- an elem with the following properties:
61
-
62
- obj : A reference to the elem to observe until it is within
63
- the specified distance (px).
64
-
65
- id : An alternative to the obj parameter, an "id" can be used
66
- to grab the elem to observe.
67
-
68
- call: The function to call when the elem is within the
69
- specified distance (px). The @elem argument will
70
- include the elem that triggered the callback.
71
-
72
- px : The specified distance to include as being visible on
73
- screen. This property is optional (default is 0).
74
-
75
- Example:
76
-
77
- sonar.add(
78
- {
79
- obj: document.getElementById("0026-get-out-the-way"),
80
- call: function(elem) // elem will include the elem that triggered the function.
81
- {
82
- swfelem.embedSWF("../player.swf", "0026-get-out-the-way", "640", "500", "9.0.0",
83
- {}, {file: "0026-get-out-the-way.flv", fullscreen: true},
84
- {allowfullscreen: true, allowscriptaccess: "always"});
85
- },
86
- px: 400
87
- });
88
-
89
- You can also specify an id tag to be grabbed instead of the elem:
90
-
91
- sonar.add(
92
- {
93
- id: "0026-get-out-the-way",
94
- call: function(elem) // elem will include the elem that triggered the function.
95
- {
96
- swfelem.embedSWF("../player.swf", "0026-get-out-the-way", "640", "500", "9.0.0",
97
- {}, {file: "0026-get-out-the-way.flv", fullscreen: true},
98
- {allowfullscreen: true, allowscriptaccess: "always"});
99
- },
100
- px: 400
101
- });
102
-
103
- Notes:
104
-
105
- * Setting the body or html of your page to 100% will cause sonar to have
106
- an invalid height calculation in Firefox. It is recommended that you
107
- do not set this CSS property.
108
-
109
- Example:
110
-
111
- html, body {
112
- height:100%; // Do not do this.
113
- }
114
-
115
- * If you want to set the default distance to something other
116
- than 0, either update the property directly in the code or
117
- you can do this:
118
-
119
- sonar.blip.d = 100; // Where 100 = 100 pixels above and below the screen edge.
120
-
121
- * Sleep well at night knowing Sonar automatically cleans up the
122
- event listeners on the scroll event once all calls have executed.
123
-
124
- Code History:
125
-
126
- v3 :: 8/14/2009 - David Artz (david.artz@corp.aol.com)
127
- * Fixed a bug in the polling code where splicing caused our
128
- for loop to skip over the next iteration in the loop. This
129
- caused some images in the poll to be detected when they
130
- should have been.
131
- * Re-factored Sonar to use the "Module" JavaScript library
132
- pattern, making our private variables and functions more
133
- private and inaccessible from the public interface.
134
- * Updated the sonar.add() function to return true or false,
135
- useful for determining if Sonar added the elem to the
136
- poll or executed its callback immediately.
137
-
138
- v2 :: 3/24/2009 - David Artz (david.artz@corp.aol.com)
139
- * Added support for IE 8.
140
- * Updated the way scroll top and screen height are detected, now
141
- works in IE/FF/Safari quirks mode.
142
- * Added null check for IE, it was polling for an elem that had recently
143
- been spliced out of the array. Nasty.
144
- * Modified for loop to use standard syntax. for (i in x) is known to be
145
- buggy with JS frameworks that override arrays.
146
- * Added sonar.b property to cache the body element (improving lookup time).
147
-
148
- v1 :: 11/18/2008 - David Artz (david.artz@corp.aol.com)
149
- * Officially released code for general use.
150
-
151
- */
152
-
153
- (function( $, win, doc, undefined ){
154
-
155
- $.fn.sonar = function( distance, full ){
156
- // No callbacks, return the results from Sonar for
157
- // the first element in the stack.
158
- if ( typeof distance === "boolean" ) {
159
- full = distance;
160
- distance = undefined;
161
- }
162
-
163
- return $.sonar( this[0], distance, full );
164
- };
165
-
166
- var body = doc.body,
167
- $win = $(win),
168
-
169
- onScreenEvent = "scrollin",
170
- offScreenEvent = "scrollout",
171
-
172
- detect = function( elem, distance, full ){
173
-
174
- if ( elem ) {
175
-
176
- // Cache the body elem in our private global.
177
- body || ( body = doc.body );
178
-
179
- var parentElem = elem, // Clone the elem for use in our loop.
180
-
181
- elemTop = 0, // The resets the calculated elem top to 0.
182
-
183
- // Used to recalculate elem.sonarElemTop if body height changes.
184
- bodyHeight = body.offsetHeight,
185
-
186
- // NCZ: I don't think you need innerHeight, I believe all major browsers support clientHeight.
187
- screenHeight = win.innerHeight || doc.documentElement.clientHeight || body.clientHeight || 0, // Height of the screen.
188
-
189
- // NCZ: I don't think you need pageYOffset, I believe all major browsers support scrollTop.
190
- scrollTop = doc.documentElement.scrollTop || win.pageYOffset || body.scrollTop || 0, // How far the user scrolled down.
191
- elemHeight = elem.offsetHeight || 0; // Height of the element.
192
-
193
- // If our custom "sonarTop" variable is undefined, or the document body
194
- // height has changed since the last time we ran sonar.detect()...
195
- if ( !elem.sonarElemTop || elem.sonarBodyHeight !== bodyHeight ) {
196
-
197
- // Loop through the offsetParents to calculate it.
198
- if ( parentElem.offsetParent ) {
199
- do {
200
- elemTop += parentElem.offsetTop;
201
- }
202
- while ( parentElem = parentElem.offsetParent );
203
- }
204
-
205
- // Set the custom property (sonarTop) to avoid future attempts to calculate
206
- // the distance on this elem from the top of the page.
207
- elem.sonarElemTop = elemTop;
208
-
209
- // Along the same lines, store the body height when we calculated
210
- // the elem's top.
211
- elem.sonarBodyHeight = bodyHeight;
212
- }
213
-
214
- // If no distance was given, assume 0.
215
- distance = distance === undefined ? 0 : distance;
216
-
217
- // Dump all calculated variables.
218
- /*
219
- console.dir({
220
- elem: elem,
221
- sonarElemTop: elem.sonarElemTop,
222
- elemHeight: elemHeight,
223
- scrollTop: scrollTop,
224
- screenHeight: screenHeight,
225
- distance: distance,
226
- full: full
227
- });
228
- */
229
-
230
- // If elem bottom is above the screen top and
231
- // the elem top is below the screen bottom, it's false.
232
- // If full is specified, it si subtracted or added
233
- // as needed from the element's height.
234
- return (!(elem.sonarElemTop + (full ? 0 : elemHeight) < scrollTop - distance) &&
235
- !(elem.sonarElemTop + (full ? elemHeight : 0) > scrollTop + screenHeight + distance));
236
- }
237
- },
238
-
239
- // Container for elems needing to be polled.
240
- pollQueue = {},
241
-
242
- // Indicates if scroll events are bound to the poll.
243
- pollActive = 0,
244
-
245
- // Used for debouncing.
246
- pollId,
247
-
248
- // Function that handles polling when the user scrolls.
249
- poll = function(){
250
-
251
- // Debouncing speed optimization. Essentially prevents
252
- // poll requests from queue'ing up and overloading
253
- // the scroll event listener.
254
- pollId && clearTimeout( pollId );
255
- pollId = setTimeout(function(){
256
-
257
- var elem,
258
- elems,
259
- screenEvent,
260
- options,
261
- detected,
262
- i, l;
263
-
264
- for ( screenEvent in pollQueue ) {
265
-
266
- elems = pollQueue[ screenEvent ];
267
-
268
- for (i = 0, l = elems.length; i < l; i++) {
269
-
270
- options = elems[i];
271
- elem = options.elem;
272
-
273
- // console.log("Polling " + elem.id);
274
-
275
- detected = detect( elem, options.px, options.full );
276
-
277
- // If the elem is not detected (offscreen) or detected (onscreen)
278
- // remove the elem from the queue and fire the callback.
279
- if ( screenEvent === offScreenEvent ? !detected : detected ) {
280
- // // console.log(screenEvent);
281
- if (!options.tr) {
282
-
283
- if ( elem[ screenEvent ] ) {
284
- // console.log("triggered:" + elem.id);
285
- // Trigger the onscreen or offscreen event depending
286
- // on the desired event.
287
- $(elem).trigger( screenEvent );
288
-
289
- options.tr = 1;
290
-
291
- // removeSonar was called on this element, clean it up
292
- // instead of triggering the event.
293
- } else {
294
- // console.log("Deleting " + elem.id);
295
-
296
- // Remove this object from the elem poll container.
297
- elems.splice(i, 1);
298
-
299
- // Decrement the counter and length because we just removed
300
- // one from it.
301
- i--;
302
- l--;
303
- }
304
- }
305
- } else {
306
- options.tr = 0;
307
- }
308
- }
309
- }
310
-
311
- }, 0 ); // End setTimeout performance tweak.
312
- },
313
-
314
- removeSonar = function( elem, screenEvent ){
315
- // console.log("Removing " + elem.id);
316
- elem[ screenEvent ] = 0;
317
- },
318
-
319
- addSonar = function( elem, options ) {
320
- // console.log("Really adding " + elem.id);
321
- // Prepare arguments.
322
- var distance = options.px,
323
- full = options.full,
324
- screenEvent = options.evt,
325
- parent = win, // Getting ready to accept parents: options.parent || win,
326
- detected = detect( elem, distance, full /*, parent */ ),
327
- triggered = 0;
328
-
329
- elem[ screenEvent ] = 1;
330
-
331
- // If the elem is not detected (offscreen) or detected (onscreen)
332
- // trigger the event and fire the callback immediately.
333
- if ( screenEvent === offScreenEvent ? !detected : detected ) {
334
- // console.log("Triggering " + elem.id + " " + screenEvent );
335
- // Trigger the onscreen event at the next possible cycle.
336
- // Artz: Ask the jQuery team why I needed to do this.
337
- setTimeout(function(){
338
- $(elem).trigger( screenEvent === offScreenEvent ? offScreenEvent : onScreenEvent );
339
- }, 0);
340
- triggered = 1;
341
- // Otherwise, add it to the polling queue.
342
- }
343
-
344
- // console.log("Adding " + elem.id + " to queue.");
345
- // Push the element and its callback into the poll queue.
346
- pollQueue[ screenEvent ].push({
347
- elem: elem,
348
- px: distance,
349
- full: full,
350
- tr: triggered/* ,
351
- parent: parent */
352
- });
353
-
354
- // Activate the poll if not currently activated.
355
- if ( !pollActive ) {
356
- $win.bind( "scroll", poll );
357
- pollActive = 1;
358
- }
359
-
360
-
361
- // Call the prepare function if there, used to
362
- // prepare the element if we detected it.
363
- // Artz: Not implemented yet...used to preprocess elements in same loop.
364
- /*
365
- if ( prepCallback ) {
366
- prepCallback.call( elem, elem, detected );
367
- }
368
- */
369
- };
370
-
371
- // Open sonar function up to the public.
372
- $.sonar = detect;
373
-
374
- pollQueue[ onScreenEvent ] = [];
375
- $.event.special[ onScreenEvent ] = {
376
-
377
- add: function( handleObj ) {
378
- var data = handleObj.data || {},
379
- elem = this;
380
-
381
- if (!elem[onScreenEvent]){
382
- addSonar(this, {
383
- px: data.distance,
384
- full: data.full,
385
- evt: onScreenEvent /*,
386
- parent: data.parent */
387
- });
388
- }
389
- },
390
-
391
- remove: function( handleObj ) {
392
- removeSonar( this, onScreenEvent );
393
- }
394
-
395
- };
396
-
397
- pollQueue[ offScreenEvent ] = [];
398
- $.event.special[ offScreenEvent ] = {
399
-
400
- add: function( handleObj ) {
401
-
402
- var data = handleObj.data || {},
403
- elem = this;
404
-
405
- if (!elem[offScreenEvent]){
406
- addSonar(elem, {
407
- px: data.distance,
408
- full: data.full,
409
- evt: offScreenEvent /*,
410
- parent: data.parent */
411
- });
412
- }
413
- },
414
-
415
- remove: function( handleObj ) {
416
- removeSonar( this, offScreenEvent );
417
- }
418
- };
419
-
420
- // console.log(pollQueue);
421
- })( jQuery, window, document );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
nbproject/private/private.properties DELETED
@@ -1,6 +0,0 @@
1
- copy.src.files=false
2
- copy.src.on.open=false
3
- copy.src.target=/var/www/PhpProject1
4
- index.file=index.php
5
- run.as=LOCAL
6
- url=http://localhost/SpeedBooster/
 
 
 
 
 
 
nbproject/project.properties DELETED
@@ -1,7 +0,0 @@
1
- include.path=${php.global.include.path}
2
- php.version=PHP_56
3
- source.encoding=UTF-8
4
- src.dir=.
5
- tags.asp=false
6
- tags.short=false
7
- web.root=.
 
 
 
 
 
 
 
nbproject/project.xml DELETED
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project xmlns="http://www.netbeans.org/ns/project/1">
3
- <type>org.netbeans.modules.php.project</type>
4
- <configuration>
5
- <data xmlns="http://www.netbeans.org/ns/php-project/1">
6
- <name>PhpProject1</name>
7
- </data>
8
- </configuration>
9
- </project>
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Speed Booster Pack ===
2
  Contributors: SpeedWorks
3
- Donate link:
4
  Tags: speed, optimization, performance, scripts to the footer, google libraries, font awesome cdn, defer parsing of javascript, remove query strings, lazy load images, gtmetrix, google pageSpeed, yslow, eliminate external render-blocking javascript and css, compression, async, render-blocking css
5
  Requires at least: 3.6
6
  Tested up to: 4.7.2
7
- Stable tag: 3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -27,6 +27,7 @@ Speed Booster Pack is a plugin that can help you speed up your website by tweaki
27
  * **Move scripts to the footer** to improve page loading speed.
28
  * **Load CSS asynchronously** to render your page more quickly and get a higher score on the major speed testing services.
29
  * **Minify and inline all CSS styles and move them to the footer** to eliminate external render-blocking CSS and optimize CSS delivery.
 
30
  * **Change image compression level** to keep file sizes smaller; Change JPG quality.
31
  * **Load javascript files from Google Libraries** rather than serving them from your WordPress install directly, to reduce latency, increase parallelism and improve browser caching.
32
  * **Defer parsing of javascript files** to reduce the initial load time of your page.
@@ -38,20 +39,19 @@ Speed Booster Pack is a plugin that can help you speed up your website by tweaki
38
  * **Display the Peak Memory Used** in the plugin options page.
39
  * **Exclude scripts** from being moved to the footer or defered.
40
  * **Remove RSD Link** if you are not using a Weblog Client or some 3rd party sites/programs that use the XML-RPC request formats.
41
- * **Remove WordPress Shortlink**
42
  * **Remove the WordPress Version** this option is added for security reasons and cleaning the header.
43
- * **Remove all rss feed links** to cleanup your WordPress header.
44
 
45
  * For complete usage instructions visit [Plugin Documentation](http://tiguandesign.com/docs/speed-booster/)
46
 
47
- A short video about how Speed Booster pack can help actually increase a website's score in Google PageSpeed Insights:
48
 
49
  https://www.youtube.com/watch?v=u0G6pk2mX4M
50
 
51
  Future Development:
52
 
53
  * Image optimization options.
54
- * Lazy load images to improve page load times and save bandwidth.
55
  * Enable compression option.
56
  * Leverage browser caching.
57
  * Option to disable specific plugin actions on specific pages and posts directly via the post/page edit screen metabox.
@@ -80,6 +80,9 @@ Future Development:
80
 
81
  == Changelog ==
82
 
 
 
 
83
  = 3.1 =
84
  * Following requests from users, added back the option of excluding javascript elements.
85
 
@@ -188,3 +191,4 @@ Page Load Stats is a brief statistic displayed in the plugin options page. It di
188
 
189
  * Thanks to [Jason Penney](http://jasonpenney.net/) for Google Libraries feature.
190
  * CSS option was implemented from Async JS and CSS plugin and updated to our plugin.
 
1
  === Speed Booster Pack ===
2
  Contributors: SpeedWorks
3
+ Donate link:
4
  Tags: speed, optimization, performance, scripts to the footer, google libraries, font awesome cdn, defer parsing of javascript, remove query strings, lazy load images, gtmetrix, google pageSpeed, yslow, eliminate external render-blocking javascript and css, compression, async, render-blocking css
5
  Requires at least: 3.6
6
  Tested up to: 4.7.2
7
+ Stable tag: 3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
27
  * **Move scripts to the footer** to improve page loading speed.
28
  * **Load CSS asynchronously** to render your page more quickly and get a higher score on the major speed testing services.
29
  * **Minify and inline all CSS styles and move them to the footer** to eliminate external render-blocking CSS and optimize CSS delivery.
30
+ * **Lazy loads images** to improve page load times and save bandwidth.
31
  * **Change image compression level** to keep file sizes smaller; Change JPG quality.
32
  * **Load javascript files from Google Libraries** rather than serving them from your WordPress install directly, to reduce latency, increase parallelism and improve browser caching.
33
  * **Defer parsing of javascript files** to reduce the initial load time of your page.
39
  * **Display the Peak Memory Used** in the plugin options page.
40
  * **Exclude scripts** from being moved to the footer or defered.
41
  * **Remove RSD Link** if you are not using a Weblog Client or some 3rd party sites/programs that use the XML-RPC request formats.
42
+ * **Remove WordPress Shortlink**
43
  * **Remove the WordPress Version** this option is added for security reasons and cleaning the header.
44
+ * **Remove all rss feed links** to cleanup your WordPress header.
45
 
46
  * For complete usage instructions visit [Plugin Documentation](http://tiguandesign.com/docs/speed-booster/)
47
 
48
+ A short video about how Speed Booster pack can help actually increase a website's score in Google PageSpeed Insights:
49
 
50
  https://www.youtube.com/watch?v=u0G6pk2mX4M
51
 
52
  Future Development:
53
 
54
  * Image optimization options.
 
55
  * Enable compression option.
56
  * Leverage browser caching.
57
  * Option to disable specific plugin actions on specific pages and posts directly via the post/page edit screen metabox.
80
 
81
  == Changelog ==
82
 
83
+ = 3.2 =
84
+ * * Added Lazy Load feature to improve the web page loading times of your images.
85
+
86
  = 3.1 =
87
  * Following requests from users, added back the option of excluding javascript elements.
88
 
191
 
192
  * Thanks to [Jason Penney](http://jasonpenney.net/) for Google Libraries feature.
193
  * CSS option was implemented from Async JS and CSS plugin and updated to our plugin.
194
+ * Credits for Lazy Load feature belongs to [pluginkollektiv](https://github.com/pluginkollektiv/crazy-lazy)
speed-booster-pack.php CHANGED
@@ -3,13 +3,13 @@
3
  * Plugin Name: Speed Booster Pack
4
  * Plugin URI: http://wordpress.org/plugins/speed-booster-pack/
5
  * Description: Speed Booster Pack allows you to improve your page loading speed and get a higher score on the major speed testing services such as <a href="http://gtmetrix.com/">GTmetrix</a>, <a href="http://developers.google.com/speed/pagespeed/insights/">Google PageSpeed</a> or other speed testing tools.
6
- * Version: 3.1
7
  * Author: SpeedWorks
8
  * Author URI: http://tiguandesign.com/docs/speed-booster/
9
  * License: GPLv2
10
  */
11
 
12
- /* Copyright 2014 Tiguan (email : themesupport [at] tiguandesign [dot] com)
13
 
14
  THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
15
  IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
@@ -38,7 +38,7 @@ $sbp_options = get_option( 'sbp_settings' ); // retrieve the plugin settings fro
38
 
39
  define( 'SPEED_BOOSTER_PACK_RELEASE_DATE', date_i18n( 'F j, Y', strtotime('2017-05-06')) ); // Defining plugin release date
40
  define( 'SPEED_BOOSTER_PACK_PATH', plugin_dir_path( __FILE__ ) ); // Defining plugin dir path
41
- define( 'SPEED_BOOSTER_PACK_VERSION', 'v3.1'); // Defining plugin version
42
  define( 'SPEED_BOOSTER_PACK_NAME', 'Speed Booster Pack Plugin'); // Defining plugin name
43
  define( 'SBP_FOOTER', 10 ); // Defining css position
44
  define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
@@ -66,8 +66,8 @@ define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
66
  // load plugin textdomain
67
  add_action('plugins_loaded', array( $this, 'sbp_load_translation' ) );
68
 
69
- add_action('admin_notices', array( &$this, 'sbp_display_notices'));
70
- add_action('wp_ajax_sbp_dismiss_notices', array(&$this, 'sbp_dismiss_notices'));
71
 
72
  // Load plugin settings page
73
  require_once( SPEED_BOOSTER_PACK_PATH . 'inc/settings.php' );
@@ -80,8 +80,9 @@ define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
80
  // Enqueue admin style
81
  add_action( 'admin_enqueue_scripts', array( $this, 'sbp_enqueue_styles' ) );
82
 
83
- // Enqueue frontend scripts
84
- //add_action( 'wp_enqueue_scripts', array( $this, 'sbp_enqueue_scripts' ) );
 
85
 
86
  // Render debugging information
87
  add_action( 'wp_footer', array( $this, 'sbp_debugg' ), SBP_FOOTER_LAST );
@@ -177,6 +178,15 @@ define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
177
  }
178
 
179
 
 
 
 
 
 
 
 
 
 
180
  /*----------------------------------------------------------------------------------------------------------
181
  CSS style of the plugin options page
182
  -----------------------------------------------------------------------------------------------------------*/
@@ -203,8 +213,8 @@ define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
203
  if ( $hook_sbp != $sbp_settings_page )
204
  return;
205
  wp_enqueue_script( 'jquery-ui-slider' );
206
- wp_enqueue_script( 'sbp-slide', plugins_url('js/sbp-slide.js', __FILE__ ), array( 'jquery', 'jquery-ui-slider' ), SPEED_BOOSTER_PACK_VERSION, true );
207
- wp_enqueue_script( 'sbp-hide', plugins_url('js/sbp-hide.js', __FILE__ ), array( 'jquery' ), SPEED_BOOSTER_PACK_VERSION, true );
208
 
209
  }
210
 
@@ -218,29 +228,10 @@ define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
218
  if ( $sbp_suffix != $sbp_settings_page )
219
  return;
220
  wp_enqueue_script( 'postbox' );
221
- wp_enqueue_script( 'postbox-edit', plugins_url('js/post-tabs-edit.js', __FILE__ ), array( 'jquery', 'postbox' ) );
222
  }
223
 
224
 
225
- /*----------------------------------------------------------------------------------------------------------
226
- Enqueue front end scripts
227
- -----------------------------------------------------------------------------------------------------------*/
228
-
229
- static function sbp_enqueue_scripts() {
230
-
231
- global $sbp_options;
232
-
233
- // if ( !is_admin() and isset( $sbp_options['lazy_load'] ) ) {
234
-
235
- // We combined 'jquery.sonar.js' and 'lazy-load.js' (commented out below) in a single minified file to reduce the number of js files.
236
- // wp_enqueue_script( 'sbp-lazy-load-images', plugin_dir_url( __FILE__ ) . 'js/sbp-lazy-load.min.js', array( 'jquery' ), SPEED_BOOSTER_PACK_VERSION, true );
237
-
238
- // wp_enqueue_script( 'sbp-lazy-load-images', plugin_dir_url( __FILE__ ) . 'js/lazy-load.js', array( 'jquery', 'sbp-jquery-sonar' ), SPEED_BOOSTER_PACK_VERSION, true );
239
- // wp_enqueue_script( 'sbp-jquery-sonar', plugin_dir_url( __FILE__ ) . 'js/jquery.sonar.js', array( 'jquery' ), SPEED_BOOSTER_PACK_VERSION, true );
240
- // }
241
-
242
- }
243
-
244
  /*----------------------------------------------------------------------------------------------------------
245
  Add settings link on plugins page
246
  -----------------------------------------------------------------------------------------------------------*/
3
  * Plugin Name: Speed Booster Pack
4
  * Plugin URI: http://wordpress.org/plugins/speed-booster-pack/
5
  * Description: Speed Booster Pack allows you to improve your page loading speed and get a higher score on the major speed testing services such as <a href="http://gtmetrix.com/">GTmetrix</a>, <a href="http://developers.google.com/speed/pagespeed/insights/">Google PageSpeed</a> or other speed testing tools.
6
+ * Version: 3.2
7
  * Author: SpeedWorks
8
  * Author URI: http://tiguandesign.com/docs/speed-booster/
9
  * License: GPLv2
10
  */
11
 
12
+ /* Copyright 2017 SpeedWorks (email : speedworks [at] shortpixel [dot] com)
13
 
14
  THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
15
  IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
38
 
39
  define( 'SPEED_BOOSTER_PACK_RELEASE_DATE', date_i18n( 'F j, Y', strtotime('2017-05-06')) ); // Defining plugin release date
40
  define( 'SPEED_BOOSTER_PACK_PATH', plugin_dir_path( __FILE__ ) ); // Defining plugin dir path
41
+ define( 'SPEED_BOOSTER_PACK_VERSION', 'v3.2'); // Defining plugin version
42
  define( 'SPEED_BOOSTER_PACK_NAME', 'Speed Booster Pack Plugin'); // Defining plugin name
43
  define( 'SBP_FOOTER', 10 ); // Defining css position
44
  define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
66
  // load plugin textdomain
67
  add_action('plugins_loaded', array( $this, 'sbp_load_translation' ) );
68
 
69
+ add_action('admin_notices', array( &$this, 'sbp_display_notices'));
70
+ add_action('wp_ajax_sbp_dismiss_notices', array(&$this, 'sbp_dismiss_notices'));
71
 
72
  // Load plugin settings page
73
  require_once( SPEED_BOOSTER_PACK_PATH . 'inc/settings.php' );
80
  // Enqueue admin style
81
  add_action( 'admin_enqueue_scripts', array( $this, 'sbp_enqueue_styles' ) );
82
 
83
+ // if ( isset( $sbp_options['lazy_load'] ) ) {
84
+ add_action( 'wp_enqueue_scripts', array( $this, 'sbp_fade_in_style' ) );
85
+ // }
86
 
87
  // Render debugging information
88
  add_action( 'wp_footer', array( $this, 'sbp_debugg' ), SBP_FOOTER_LAST );
178
  }
179
 
180
 
181
+ /*-----------------------------------------------------------------------------------------------------------------------------------------
182
+ Add a small css to activate a fade-in effect on lazy load images & wll be also used to output some frontend css in future development
183
+ --------------------------------------------------------------------------------------------------------------------------------------------*/
184
+
185
+ public function sbp_fade_in_style() {
186
+ wp_enqueue_style( 'sbp-fade-in-effect', plugin_dir_url( __FILE__ ) . 'css/sbp-fade-in.css' );
187
+ }
188
+
189
+
190
  /*----------------------------------------------------------------------------------------------------------
191
  CSS style of the plugin options page
192
  -----------------------------------------------------------------------------------------------------------*/
213
  if ( $hook_sbp != $sbp_settings_page )
214
  return;
215
  wp_enqueue_script( 'jquery-ui-slider' );
216
+ wp_enqueue_script( 'sbp-slide', plugins_url('inc/js/sbp-slide.js', __FILE__ ), array( 'jquery', 'jquery-ui-slider' ), SPEED_BOOSTER_PACK_VERSION, true );
217
+ wp_enqueue_script( 'sbp-hide', plugins_url('inc/js/sbp-hide.js', __FILE__ ), array( 'jquery' ), SPEED_BOOSTER_PACK_VERSION, true );
218
 
219
  }
220
 
228
  if ( $sbp_suffix != $sbp_settings_page )
229
  return;
230
  wp_enqueue_script( 'postbox' );
231
+ wp_enqueue_script( 'postbox-edit', plugins_url('inc/js/post-tabs-edit.js', __FILE__ ), array( 'jquery', 'postbox' ) );
232
  }
233
 
234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  /*----------------------------------------------------------------------------------------------------------
236
  Add settings link on plugins page
237
  -----------------------------------------------------------------------------------------------------------*/