Speed Booster Pack - Version 3.6.1

Version Description

  • Added a section for feedback in the plugin's dashboard
Download this release

Release Info

Developer machothemes
Plugin Icon 128x128 Speed Booster Pack
Version 3.6.1
Comparing to
See all releases

Code changes from version 3.6 to 3.6.1

css/dynamic-css.php CHANGED
@@ -1,111 +1,111 @@
1
- <style type="text/css">
2
-
3
- /*progress-bar-time*/
4
-
5
- @-webkit-keyframes progress-bar-time {
6
- from { }
7
- to { width: 5<?php echo $page_time; ?>% }
8
- }
9
-
10
- @-moz-keyframes progress-bar-time {
11
- from { }
12
- to { width: 5<?php echo $page_time; ?>% }
13
- }
14
-
15
- @-ms-keyframes progress-bar-time {
16
- from { }
17
- to { width: 5<?php echo $page_time; ?>% }
18
- }
19
-
20
- @-o-keyframes progress-bar-time {
21
- from { }
22
- to { width: 5<?php echo $page_time; ?>% }
23
- }
24
-
25
- @keyframes progress-bar-time {
26
- from { }
27
- to { width: 5<?php echo $page_time; ?>% }
28
- }
29
-
30
- /*progress-bar-queries*/
31
-
32
- @-webkit-keyframes progress-bar-queries {
33
- from { }
34
- to { width: <?php echo $page_queries; ?>% }
35
- }
36
-
37
- @-moz-keyframes progress-bar-queries {
38
- from { }
39
- to { width: <?php echo $page_queries; ?>% }
40
- }
41
-
42
- @-ms-keyframes progress-bar-queries {
43
- from { }
44
- to { width: <?php echo $page_queries; ?>% }
45
- }
46
-
47
- @-o-keyframes progress-bar-queries {
48
- from { }
49
- to { width: <?php echo $page_queries; ?>% }
50
- }
51
-
52
- @keyframes progress-bar-queries {
53
- from { }
54
- to { width: <?php echo $page_queries; ?>% }
55
- }
56
-
57
- <?php
58
-
59
- if ( $page_time >=1.00 and $page_time <=2.00 ) { ?>
60
-
61
- .wrap .sbp-progress.time > span {
62
- background-color: #f1a165;
63
- background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #f1a165),color-stop(1, #f36d0a));
64
- background-image: -webkit-linear-gradient(top, #f1a165, #f36d0a);
65
- background-image: -moz-linear-gradient(top, #f1a165, #f36d0a);
66
- background-image: -ms-linear-gradient(top, #f1a165, #f36d0a);
67
- background-image: -o-linear-gradient(top, #f1a165, #f36d0a);
68
- }
69
-
70
- <?php }
71
-
72
- if ( $page_time >=2.00 ) { ?>
73
- .wrap .sbp-progress.time > span {
74
- background-color: #FB8A88;
75
- background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #FB8A88),color-stop(1, #FF4136));
76
- background-image: -webkit-linear-gradient(top, #FB8A88, #FF4136);
77
- background-image: -moz-linear-gradient(top, #FB8A88, #FF4136);
78
- background-image: -ms-linear-gradient(top, #FB8A88, #FF4136);
79
- background-image: -o-linear-gradient(top, #f1a165, #f36d0a);
80
- }
81
-
82
- <?php }
83
-
84
- if ( $page_queries >=100 and $page_queries <=200 ) { ?>
85
-
86
- .wrap .sbp-progress.queries > span {
87
- background-color: #f1a165;
88
- background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #f1a165),color-stop(1, #f36d0a));
89
- background-image: -webkit-linear-gradient(top, #f1a165, #f36d0a);
90
- background-image: -moz-linear-gradient(top, #f1a165, #f36d0a);
91
- background-image: -ms-linear-gradient(top, #f1a165, #f36d0a);
92
- background-image: -o-linear-gradient(top, #f1a165, #f36d0a);
93
- }
94
-
95
- <?php }
96
-
97
- if ( $page_queries >=200 ) { ?>
98
- .wrap .sbp-progress.queries > span {
99
- background-color: #FB8A88;
100
- background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #FB8A88),color-stop(1, #FF4136));
101
- background-image: -webkit-linear-gradient(top, #FB8A88, #FF4136);
102
- background-image: -moz-linear-gradient(top, #FB8A88, #FF4136);
103
- background-image: -ms-linear-gradient(top, #FB8A88, #FF4136);
104
- background-image: -o-linear-gradient(top, #f1a165, #f36d0a);
105
- }
106
-
107
- <?php }
108
-
109
- ?>
110
-
111
  </style>
1
+ <style type="text/css">
2
+
3
+ /*progress-bar-time*/
4
+
5
+ @-webkit-keyframes progress-bar-time {
6
+ from { }
7
+ to { width: 5<?php echo $page_time; ?>% }
8
+ }
9
+
10
+ @-moz-keyframes progress-bar-time {
11
+ from { }
12
+ to { width: 5<?php echo $page_time; ?>% }
13
+ }
14
+
15
+ @-ms-keyframes progress-bar-time {
16
+ from { }
17
+ to { width: 5<?php echo $page_time; ?>% }
18
+ }
19
+
20
+ @-o-keyframes progress-bar-time {
21
+ from { }
22
+ to { width: 5<?php echo $page_time; ?>% }
23
+ }
24
+
25
+ @keyframes progress-bar-time {
26
+ from { }
27
+ to { width: 5<?php echo $page_time; ?>% }
28
+ }
29
+
30
+ /*progress-bar-queries*/
31
+
32
+ @-webkit-keyframes progress-bar-queries {
33
+ from { }
34
+ to { width: <?php echo $page_queries; ?>% }
35
+ }
36
+
37
+ @-moz-keyframes progress-bar-queries {
38
+ from { }
39
+ to { width: <?php echo $page_queries; ?>% }
40
+ }
41
+
42
+ @-ms-keyframes progress-bar-queries {
43
+ from { }
44
+ to { width: <?php echo $page_queries; ?>% }
45
+ }
46
+
47
+ @-o-keyframes progress-bar-queries {
48
+ from { }
49
+ to { width: <?php echo $page_queries; ?>% }
50
+ }
51
+
52
+ @keyframes progress-bar-queries {
53
+ from { }
54
+ to { width: <?php echo $page_queries; ?>% }
55
+ }
56
+
57
+ <?php
58
+
59
+ if ( $page_time >=1.00 and $page_time <=2.00 ) { ?>
60
+
61
+ .wrap .sbp-progress.time > span {
62
+ background-color: #f1a165;
63
+ background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #f1a165),color-stop(1, #f36d0a));
64
+ background-image: -webkit-linear-gradient(top, #f1a165, #f36d0a);
65
+ background-image: -moz-linear-gradient(top, #f1a165, #f36d0a);
66
+ background-image: -ms-linear-gradient(top, #f1a165, #f36d0a);
67
+ background-image: -o-linear-gradient(top, #f1a165, #f36d0a);
68
+ }
69
+
70
+ <?php }
71
+
72
+ if ( $page_time >=2.00 ) { ?>
73
+ .wrap .sbp-progress.time > span {
74
+ background-color: #FB8A88;
75
+ background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #FB8A88),color-stop(1, #FF4136));
76
+ background-image: -webkit-linear-gradient(top, #FB8A88, #FF4136);
77
+ background-image: -moz-linear-gradient(top, #FB8A88, #FF4136);
78
+ background-image: -ms-linear-gradient(top, #FB8A88, #FF4136);
79
+ background-image: -o-linear-gradient(top, #f1a165, #f36d0a);
80
+ }
81
+
82
+ <?php }
83
+
84
+ if ( $page_queries >=100 and $page_queries <=200 ) { ?>
85
+
86
+ .wrap .sbp-progress.queries > span {
87
+ background-color: #f1a165;
88
+ background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #f1a165),color-stop(1, #f36d0a));
89
+ background-image: -webkit-linear-gradient(top, #f1a165, #f36d0a);
90
+ background-image: -moz-linear-gradient(top, #f1a165, #f36d0a);
91
+ background-image: -ms-linear-gradient(top, #f1a165, #f36d0a);
92
+ background-image: -o-linear-gradient(top, #f1a165, #f36d0a);
93
+ }
94
+
95
+ <?php }
96
+
97
+ if ( $page_queries >=200 ) { ?>
98
+ .wrap .sbp-progress.queries > span {
99
+ background-color: #FB8A88;
100
+ background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #FB8A88),color-stop(1, #FF4136));
101
+ background-image: -webkit-linear-gradient(top, #FB8A88, #FF4136);
102
+ background-image: -moz-linear-gradient(top, #FB8A88, #FF4136);
103
+ background-image: -ms-linear-gradient(top, #FB8A88, #FF4136);
104
+ background-image: -o-linear-gradient(top, #f1a165, #f36d0a);
105
+ }
106
+
107
+ <?php }
108
+
109
+ ?>
110
+
111
  </style>
css/jquery-ui.min.css CHANGED
@@ -1,7 +1,7 @@
1
- /*! jQuery UI - v1.11.0 - 2014-06-26
2
- * http://jqueryui.com
3
- * Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
4
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
5
- * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
6
-
7
  .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_228ef1_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffd27a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px}
1
+ /*! jQuery UI - v1.11.0 - 2014-06-26
2
+ * http://jqueryui.com
3
+ * Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
5
+ * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
6
+
7
  .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_228ef1_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffd27a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px}
css/style.dev.css CHANGED
@@ -1,592 +1,622 @@
1
- h3.sbp-emphasize {
2
- color: #FA5148;
3
- }
4
- img.sbp-sp {
5
- float: left;
6
- margin-right: 20px;
7
- }
8
- p.description-link {
9
- margin-top: -5px;
10
- }
11
-
12
- .wrap .sb-pack .welcome-panel .welcome-panel-column:first-child {
13
- display: block !important;
14
- }
15
-
16
- .wrap .sb-pack .welcome-panel h4 {
17
- margin: 1.33em 0 20px;
18
- }
19
-
20
- .wrap .sb-pack .sbp-inline-wrap {
21
- display: inline-block;
22
- margin-right: 10px;
23
- vertical-align: top;
24
- }
25
-
26
- .wrap .sb-pack .sbp-more-width {
27
- width: 300px;
28
- }
29
-
30
- .wrap .sb-pack input[type="text"] {
31
- line-height: 1.3;
32
- }
33
-
34
- .wrap .sb-pack .sbp-all-enqueued {
35
- background-color: #FCFCFC;
36
- padding: 5px 0px 10px;
37
- border: 1px solid #ddd;
38
- width: auto;
39
- }
40
-
41
- .wrap .sb-pack .sbp-width {
42
- min-width: 200px;
43
- width: auto;
44
- padding: 0 20px;
45
- }
46
-
47
- .wrap .sb-pack .sbp-title-scripts {
48
- min-width: 200px;
49
- width: auto;
50
- display: inline-block;
51
- font-weight: 700;
52
- padding: 0 20px;
53
- }
54
-
55
- .wrap .sb-pack #poststuff h2 {
56
- font-size: 32px;
57
- padding: 9px 15px 20px 0px;
58
- font-weight: 700;
59
- line-height: 1.3;
60
- }
61
-
62
- .wrap .sb-pack #poststuff .main-sbp-title h3 {
63
- font-size: 24px;
64
- padding: 8px 0 20px;
65
- font-weight: 700;
66
- color: #FA5148;
67
- }
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 {
76
- right: 20px;
77
- font: 400 30px/1.2 'dashicons';
78
- padding: 8px 0;
79
- }
80
-
81
- .wrap .sb-pack .meta-box-sortables .postbox .handlediv:before {
82
- content: "\f343";
83
- }
84
-
85
- .wrap .sb-pack .meta-box-sortables .postbox.closed .handlediv:before {
86
- content: "\f347";
87
- }
88
-
89
- .wrap .sb-pack .postbox .inside {
90
- padding: 0 20px 20px;
91
- }
92
-
93
- .postbox {
94
- position: relative;
95
- overflow: hidden;
96
- }
97
- .wrap .sb-pack #poststuff .inside {
98
- margin: 26px 0 0;
99
- }
100
-
101
- .wrap .sb-pack #poststuff h3{
102
- font-size: 24px;
103
- padding: 8px 20px;
104
- font-weight: 700;
105
- display: inline-block;
106
- }
107
-
108
- .wrap .sb-pack .sbp-columns1 {
109
- display: inline-block;
110
- }
111
-
112
- .wrap .sb-pack .sbp-columns2 {
113
- display: inline-block;
114
- max-width: 73%;
115
- }
116
-
117
- .wrap .sb-pack .sbp-title-div {
118
- height: 50px;
119
- clear: both;
120
- }
121
-
122
- .wrap .sb-pack .sbp-amount {
123
- background-color: transparent;
124
- border: medium none;
125
- box-shadow: none;
126
- font-size: 16px;
127
- }
128
-
129
- .wrap .sb-pack .sbp-slider {
130
- width: 40%;
131
- }
132
-
133
- .wrap .sb-pack p {
134
- color: #464646;
135
- line-height: 1.6;
136
- }
137
- .wrap .sb-pack p.sp-link {
138
- text-align: center;
139
- font-size: 1.2em;
140
- margin-bottom: 20px;
141
- }
142
-
143
- .wrap .sb-pack .debug-info {
144
- margin-top: 19px;
145
- border: 1px solid #1A9E51;
146
- padding: 17px 10px;
147
- background-color: #2DCB73;
148
- color: #FFF;
149
- font-size: 16px;
150
- line-height: 1.6;
151
- text-shadow: 1px 1px #1A9E51;
152
- }
153
-
154
- .wrap .sb-pack .td-margin {
155
- margin: 1.5em 0 1.5em;
156
- }
157
-
158
- .wrap .sb-pack .sbp-div-head {
159
- border-bottom: 1px solid #E1E1E1;
160
- margin:0 0 5px;
161
- padding: 0 0 5px;
162
- }
163
-
164
- .wrap .sb-pack .td-border {
165
- border-bottom: 1px solid #E1E1E1;
166
- margin: 10px 0;
167
- }
168
-
169
- .wrap .sb-pack .td-border-last {
170
- border-bottom: 1px solid #E1E1E1;
171
- margin: 1.5em 0;
172
- }
173
-
174
- .wrap .sb-pack .sbp-radio-content {
175
- display: block;
176
- }
177
-
178
- .wrap .sb-pack .sbp-radio-content label {
179
- display: block !important;
180
- }
181
-
182
- .wrap .sb-pack .sbp-box hr {
183
- margin-left: 70px;
184
- }
185
-
186
- .wrap .sb-pack .sbp-1 {
187
- padding-top: 10px;
188
- }
189
-
190
- .wrap .sb-pack .sbp-2 {
191
- padding-bottom: 15px;
192
- }
193
-
194
- .wrap .sb-pack .sbp-3 {
195
- padding-top: 5px;
196
- }
197
-
198
- .wrap .sb-pack .sbp-title-div .sbp-title {
199
- font-size: 23px;
200
- font-weight: 300;
201
- line-height: 26px;
202
- padding-top: 16px;
203
- padding-right: 15px;
204
- display: block;
205
- float: left;
206
- }
207
-
208
- .wrap .sb-pack .sbp-box {
209
- background:#fff;
210
- border: 1px solid #E5E5E5;
211
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
212
- padding: 15px;
213
- margin-bottom: 15px;
214
- position: relative;
215
- overflow: hidden;
216
- }
217
-
218
- .wrap .sb-pack .sbp-box p {
219
- margin: 5px 0 5px 70px;
220
- color: #777;
221
- }
222
-
223
- .wrap .sb-pack .sbp-infos {
224
- display: block;
225
- margin: 0 auto;
226
- padding-left: 70px;
227
- font-weight: 700;
228
- color:#777;
229
- }
230
-
231
- .wrap .sb-pack .sbp-infos span {
232
- color: #777;
233
- font-weight: 400;
234
- }
235
-
236
- .wrap .sb-pack .sbp-infos-title {
237
- font-weight: 700;
238
- color: #777;
239
- }
240
-
241
- .wrap .sb-pack .sbp-box-legend, .wrap .sb-pack .sbp-box-version {
242
- position: absolute;
243
- left: 0;
244
- top: 0;
245
- height: 100%;
246
- }
247
-
248
- .wrap .sb-pack .sbp-box-version {
249
- background: none repeat scroll 0% 0% #80828F;
250
- padding: 20px 15px;
251
- }
252
-
253
- .wrap .sb-pack .sbp-box-legend {
254
- background: none repeat scroll 0% 0% #FCC500;
255
- padding: 15px 15px;
256
- }
257
-
258
- .wrap .sb-pack .sbp-box-legend:hover {
259
- background-color: #F39C12;
260
- }
261
-
262
- .wrap .sb-pack .sbp-box-version:hover {
263
- background-color: #6C6E79;
264
- }
265
-
266
- .wrap .sb-pack .sbp-icon-help, .wrap .sb-pack .sbp-icon-version {
267
- color:#FFF;
268
- font-size:25px;
269
- }
270
-
271
- .wrap .sb-pack .sbp-icon:before {
272
- content: "\f185";
273
- display: inline-block;
274
- -webkit-font-smoothing: antialiased;
275
- font: normal 36px/0.6 'dashicons';
276
- vertical-align: sub;
277
- color: #FA5148;
278
- padding-right: 5px;
279
- }
280
-
281
- .wrap .sb-pack .sbp-icon-information:before {
282
- content: "\f348";
283
- display: inline-block;
284
- -webkit-font-smoothing: antialiased;
285
- font: normal 28px/1 'dashicons';
286
- vertical-align: middle;
287
- color: #C9D6E2;
288
- padding-right: 5px;
289
- }
290
-
291
- .wrap .sb-pack label {
292
- display: inline-block;
293
- cursor: pointer;
294
- position: relative;
295
- padding-left: 35px;
296
- font-size: 16px;
297
-
298
- }
299
-
300
- /*.wrap .sb-pack #sbp-css-content {
301
- display: none;
302
- }*/
303
-
304
- .wrap .sb-pack label:before {
305
- content: "\2717";
306
- font-size: 16px;
307
- -webkit-font-smoothing: antialiased;
308
- text-align: center;
309
- color: #fff;
310
- display: inline-block;
311
- width: 26px;
312
- height: 26px;
313
- margin-right: 10px;
314
- position: absolute;
315
- left: 0;
316
- background: #C9D6E2;
317
- -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
318
- -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
319
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
320
- border: 1px solid #B2BFCA;
321
- }
322
-
323
- .wrap .sb-pack input[type=checkbox],
324
- .wrap .sb-pack input[type=radio] {
325
- display: none;
326
- }
327
-
328
- /*.wrap .sb-pack .sbp-radio-content label:before {
329
- content: "\2630";
330
- font-size: 16px;
331
- -webkit-font-smoothing: antialiased;
332
- text-align: center;
333
- color: #fff;
334
- font-weight: 700;
335
- display: inline-block;
336
- width: 24px;
337
- height: 24px;
338
- line-height: 1.4;
339
- margin-right: 10px;
340
- position: absolute;
341
- left: 0;
342
- background: #C9D6E2;
343
- border: 1px solid #9CA8B3;
344
- }
345
-
346
- .wrap .sb-pack input[type=radio]:checked + label:before {
347
- content: "\2630";
348
- background: none repeat scroll 0% 0% #2DCB73;
349
- text-align: center;
350
- font-weight: 700;
351
- color: #fff;
352
- border: 1px solid #1A9E51;
353
- } */
354
-
355
- .wrap .sb-pack input[type=checkbox]:checked + label:before {
356
- content: "\2714";
357
- background: #2DCB73;
358
- text-shadow: 1px 1px 1px #148D44;
359
- border: 1px solid #1A9E51;
360
- font-size: 16px;
361
- -webkit-font-smoothing: antialiased;
362
- color: #fff;
363
- text-align: center;
364
- }
365
-
366
- .wrap .sb-pack .sbp-icon-version:before {
367
- content: "\f348";
368
- display: inline-block;
369
- -webkit-font-smoothing: antialiased;
370
- font: normal 30px/1 'dashicons';
371
- vertical-align: top;
372
- }
373
-
374
- .wrap .sb-pack .sbp-icon-help:before {
375
- content: "\f123";
376
- display: inline-block;
377
- -webkit-font-smoothing: antialiased;
378
- font: normal 30px/1 'dashicons';
379
- vertical-align: top;
380
- }
381
-
382
- .wrap .sb-pack .sbp-stats {
383
- font-size: 16px;
384
- line-height: 1.5;
385
- }
386
-
387
- /* Jquery UI slider
388
- -------------------------------------------------------------- */
389
-
390
- .wrap .sb-pack.ui-state-default,
391
- .wrap .sb-pack .ui-widget-content .ui-state-default,
392
- .wrap .sb-pack .ui-widget-header .ui-state-default {
393
- border:1px solid #1A9E51;
394
- background-color:#2DCB73;
395
- font-weight:400;
396
- color:#555;
397
- outline:0 none;
398
- cursor:pointer;
399
- }
400
- .wrap .sb-pack .ui-state-default:before,
401
- .wrap .sb-pack .ui-widget-content .ui-state-default:before,
402
- .wrap .sb-pack .ui-widget-header .ui-state-default:before {
403
- content:"\2630";
404
- display:inline-block;
405
- -webkit-font-smoothing:antialiased;
406
- color:#fff;
407
- font-weight:700;
408
- text-shadow:0 1px #1A9E51;
409
- line-height: 1.8em;
410
- }
411
-
412
- .wrap .sb-pack .ui-state-default a,
413
- .wrap .sb-pack .ui-state-default a:link,
414
- .wrap .sb-pack .ui-state-default a:visited {
415
- color:#fff;
416
- text-decoration:none;
417
- }
418
-
419
- .wrap .sb-pack .ui-state-focus,
420
- .wrap .sb-pack .ui-state-hover,
421
- .wrap .sb-pack .ui-widget-content .ui-state-focus,
422
- .wrap .sb-pack .ui-widget-content .ui-state-hover,
423
- .wrap .sb-pack .ui-widget-header .ui-state-focus,
424
- .wrap .sb-pack .ui-widget-header .ui-state-hover {
425
- background:#3CE281;
426
- }
427
-
428
- .wrap .sb-pack .ui-corner-all,
429
- .wrap .sb-pack .ui-corner-top,
430
- .wrap .sb-pack .ui-corner-left,
431
- .wrap .sb-pack .ui-corner-tl {
432
- border-top-left-radius: 0;
433
- }
434
- .wrap .sb-pack .ui-corner-all,
435
- .wrap .sb-pack .ui-corner-top,
436
- .wrap .sb-pack .ui-corner-right,
437
- .wrap .sb-pack .ui-corner-tr {
438
- border-top-right-radius: 0;
439
- }
440
- .wrap .sb-pack .ui-corner-bottom,
441
- .wrap .sb-pack .ui-corner-left,
442
- .wrap .sb-pack .ui-corner-bl {
443
- border-bottom-left-radius: 0;
444
- }
445
- .wrap .sb-pack .ui-corner-all,
446
- .wrap .sb-pack .ui-corner-bottom,
447
- .wrap .sb-pack .ui-corner-right,
448
- .wrap .sb-pack .ui-corner-br {
449
- border-bottom-right-radius: 0;
450
- }
451
-
452
- .wrap .sb-pack .ui-corner-all,
453
- .wrap .sb-pack .ui-corner-bottom,
454
- .wrap .sb-pack .ui-corner-left,
455
- .wrap .sb-pack .ui-corner-bl {
456
- border-bottom-left-radius: 0;
457
- }
458
-
459
- .wrap .sb-pack .ui-slider-horizontal {
460
- height:1.3em;
461
- }
462
-
463
- .wrap .sb-pack .ui-slider .ui-slider-handle {
464
- width:1.8em;
465
- height:1.8em;
466
- cursor:pointer;
467
- text-align:center;
468
- }
469
-
470
- .wrap .sb-pack .ui-widget-content {
471
- -webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);
472
- -moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);
473
- box-shadow:inset 0 1px 2px rgba(0,0,0,.1);
474
- border:1px solid #B2BFCA;
475
- background:#F1F2F7;
476
- color:#222
477
- }
478
- /* Progress Bars
479
- -------------------------------------------------------------- */
480
- .wrap .sb-pack .sbp-progress.time,
481
- .wrap .sb-pack .sbp-progress.queries {
482
- height: 30px;
483
- width: 77%;
484
- display: inline-block;
485
- position: relative;
486
- background-color: #F1F2F7;
487
- overflow: hidden;
488
- -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
489
- -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
490
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
491
- }
492
- .wrap .sbp-progress.time > span,
493
- .wrap .sbp-progress.queries > span {
494
- background-color: #7EDBA5;
495
- background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #7EDBA5),color-stop(1, #2DCB73));
496
- background-image: -webkit-linear-gradient(top, #7EDBA5, #2DCB73);
497
- background-image: -moz-linear-gradient(top, #7EDBA5, #2DCB73);
498
- background-image: -ms-linear-gradient(top, #7EDBA5, #2DCB73);
499
- background-image: -o-linear-gradient(top, #7EDBA5, #f36d0a);
500
- color:#fff;
501
- width: 0%;
502
- max-width: 98%;
503
- float: left;
504
- display: block;
505
- height: 100%;
506
- position: relative;
507
- overflow: hidden;
508
- }
509
-
510
- .wrap .sb-pack .sbp-progress.time > span {
511
- -webkit-animation: progress-bar-time 2s 1 forwards;
512
- -moz-animation: progress-bar-time 2s 1 forwards;
513
- -ms-animation: progress-bar-time 2s 1 forwards;
514
- -o-animation: progress-bar-time 2s 1 forwards;
515
- animation: progress-bar-time 2s 1 forwards;
516
-
517
- }
518
-
519
- .wrap .sb-pack .sbp-progress.queries > span {
520
- -webkit-animation: progress-bar-queries 2s 1 forwards;
521
- -moz-animation: progress-bar-queries 2s 1 forwards;
522
- -ms-animation: progress-bar-queries 2s 1 forwards;
523
- -o-animation: progress-bar-queries 2s 1 forwards;
524
- animation: progress-bar-queries 2s 1 forwards;
525
-
526
- }
527
-
528
- .wrap .sb-pack .sbp-values {
529
- float: right;
530
- padding: 0 5px;
531
- background-color: #1AB4EF;
532
- color: #fff;
533
- width: 18%;
534
- height: 30px;
535
- line-height: 30px;
536
- text-align: center;
537
- text-shadow: 0px -2px #1AB4EF;
538
- }
539
-
540
- .wrap .sb-pack .sbp-numbers {
541
- -webkit-animation: opacity 2s; /* Safari and Chrome */
542
- -moz-animation: opacity 2s; /* Firefox */
543
- -ms-animation: opacity 2s; /* Internet Explorer */
544
- -o-animation: opacity 2s; /* Opera */
545
- animation: opacity 2s;
546
- transition-delay: 2s;
547
- -moz-transition-delay: 2s; /* Firefox 4 */
548
- -webkit-transition-delay: 2s; /* Safari and Chrome */
549
- -o-transition-delay: 2s; /* Opera */
550
- font-size: 16px;
551
- }
552
-
553
- @keyframes opacity {
554
- from { opacity:0; }
555
- to { opacity: 1; }
556
- }
557
-
558
- /* Firefox */
559
- @-moz-keyframes opacity {
560
- from { opacity:0; }
561
- to { opacity: 1; }
562
- }
563
-
564
- /* Safari and Chrome */
565
- @-webkit-keyframes opacity {
566
- from { opacity:0; }
567
- to { opacity: 1; }
568
- }
569
-
570
- /* Internet Explorer */
571
- @-ms-keyframes opacity {
572
- from { opacity:0; }
573
- to { opacity: 1; }
574
- }​
575
-
576
- /* Opera */
577
- @-o-keyframes opacity {
578
- from { opacity:0; }
579
- to { opacity: 1; }
580
- }​
581
-
582
- @media screen and (max-width: 783px) {
583
- .wrap .sb-pack input.regular-text {
584
- width: 14em;
585
- }
586
- }
587
-
588
- @media screen and (min-width: 784px) {
589
- .wrap .sb-pack input.regular-text {
590
- width: 45em;
591
- }
592
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ h3.sbp-emphasize {
2
+ color: #FA5148;
3
+ }
4
+ img.sbp-sp {
5
+ float: left;
6
+ margin-right: 20px;
7
+ }
8
+ p.description-link {
9
+ margin-top: -5px;
10
+ }
11
+
12
+ .wrap .sb-pack .welcome-panel .welcome-panel-column:first-child {
13
+ display: block !important;
14
+ }
15
+
16
+ .wrap .sb-pack .welcome-panel h4 {
17
+ margin: 1.33em 0 20px;
18
+ }
19
+
20
+ .wrap .sb-pack .sbp-inline-wrap {
21
+ display: inline-block;
22
+ margin-right: 10px;
23
+ vertical-align: top;
24
+ }
25
+
26
+ .wrap .sb-pack .sbp-more-width {
27
+ width: 300px;
28
+ }
29
+
30
+ .wrap .sb-pack input[type="text"] {
31
+ line-height: 1.3;
32
+ }
33
+
34
+ .wrap .sb-pack .sbp-all-enqueued {
35
+ background-color: #FCFCFC;
36
+ padding: 5px 0px 10px;
37
+ border: 1px solid #ddd;
38
+ width: auto;
39
+ }
40
+
41
+ .wrap .sb-pack .sbp-width {
42
+ min-width: 200px;
43
+ width: auto;
44
+ padding: 0 20px;
45
+ }
46
+
47
+ .wrap .sb-pack .sbp-title-scripts {
48
+ min-width: 200px;
49
+ width: auto;
50
+ display: inline-block;
51
+ font-weight: 700;
52
+ padding: 0 20px;
53
+ }
54
+
55
+ .wrap .sb-pack #poststuff h2 {
56
+ font-size: 32px;
57
+ padding: 9px 15px 20px 0px;
58
+ font-weight: 700;
59
+ line-height: 1.3;
60
+ }
61
+
62
+ .wrap .sb-pack #poststuff .main-sbp-title h3 {
63
+ font-size: 24px;
64
+ padding: 8px 0 20px;
65
+ font-weight: 700;
66
+ color: #FA5148;
67
+ }
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 {
76
+ right: 20px;
77
+ font: 400 30px/1.2 'dashicons';
78
+ padding: 8px 0;
79
+ }
80
+
81
+ .wrap .sb-pack .meta-box-sortables .postbox .handlediv:before {
82
+ content: "\f343";
83
+ }
84
+
85
+ .wrap .sb-pack .meta-box-sortables .postbox.closed .handlediv:before {
86
+ content: "\f347";
87
+ }
88
+
89
+ .wrap .sb-pack .postbox .inside {
90
+ padding: 0 20px 20px;
91
+ }
92
+
93
+ .postbox {
94
+ position: relative;
95
+ overflow: hidden;
96
+ }
97
+ .wrap .sb-pack #poststuff .inside {
98
+ margin: 26px 0 0;
99
+ }
100
+
101
+ .wrap .sb-pack #poststuff h3{
102
+ font-size: 24px;
103
+ padding: 8px 20px;
104
+ font-weight: 700;
105
+ display: inline-block;
106
+ }
107
+
108
+ .wrap .sb-pack .sbp-columns1 {
109
+ display: inline-block;
110
+ }
111
+
112
+ .wrap .sb-pack .sbp-columns2 {
113
+ display: inline-block;
114
+ max-width: 73%;
115
+ }
116
+
117
+ .wrap .sb-pack .sbp-title-div {
118
+ height: 50px;
119
+ clear: both;
120
+ }
121
+
122
+ .wrap .sb-pack .sbp-amount {
123
+ background-color: transparent;
124
+ border: medium none;
125
+ box-shadow: none;
126
+ font-size: 16px;
127
+ }
128
+
129
+ .wrap .sb-pack .sbp-slider {
130
+ width: 40%;
131
+ }
132
+
133
+ .wrap .sb-pack p {
134
+ color: #464646;
135
+ line-height: 1.6;
136
+ }
137
+ .wrap .sb-pack p.sp-link {
138
+ text-align: center;
139
+ font-size: 1.2em;
140
+ margin-bottom: 20px;
141
+ }
142
+
143
+ .wrap .sb-pack .debug-info {
144
+ margin-top: 19px;
145
+ border: 1px solid #1A9E51;
146
+ padding: 17px 10px;
147
+ background-color: #2DCB73;
148
+ color: #FFF;
149
+ font-size: 16px;
150
+ line-height: 1.6;
151
+ text-shadow: 1px 1px #1A9E51;
152
+ }
153
+
154
+ .wrap .sb-pack .td-margin {
155
+ margin: 1.5em 0 1.5em;
156
+ }
157
+
158
+ .wrap .sb-pack .sbp-div-head {
159
+ border-bottom: 1px solid #E1E1E1;
160
+ margin:0 0 5px;
161
+ padding: 0 0 5px;
162
+ }
163
+
164
+ .wrap .sb-pack .td-border {
165
+ border-bottom: 1px solid #E1E1E1;
166
+ margin: 10px 0;
167
+ }
168
+
169
+ .wrap .sb-pack .td-border-last {
170
+ border-bottom: 1px solid #E1E1E1;
171
+ margin: 1.5em 0;
172
+ }
173
+
174
+ .wrap .sb-pack .sbp-radio-content {
175
+ display: block;
176
+ }
177
+
178
+ .wrap .sb-pack .sbp-radio-content label {
179
+ display: block !important;
180
+ }
181
+
182
+ .wrap .sb-pack .sbp-box hr {
183
+ margin-left: 70px;
184
+ }
185
+
186
+ .wrap .sb-pack .sbp-1 {
187
+ padding-top: 10px;
188
+ }
189
+
190
+ .wrap .sb-pack .sbp-2 {
191
+ padding-bottom: 15px;
192
+ }
193
+
194
+ .wrap .sb-pack .sbp-3 {
195
+ padding-top: 5px;
196
+ }
197
+
198
+ .wrap .sb-pack .sbp-title-div .sbp-title {
199
+ font-size: 23px;
200
+ font-weight: 300;
201
+ line-height: 26px;
202
+ padding-top: 16px;
203
+ padding-right: 15px;
204
+ display: block;
205
+ float: left;
206
+ }
207
+
208
+ .wrap .sb-pack .sbp-box {
209
+ background:#fff;
210
+ border: 1px solid #E5E5E5;
211
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
212
+ padding: 15px;
213
+ margin-bottom: 15px;
214
+ position: relative;
215
+ overflow: hidden;
216
+ }
217
+
218
+ .wrap .sb-pack .sbp-box p {
219
+ margin: 5px 0 5px 70px;
220
+ color: #777;
221
+ }
222
+
223
+ .wrap .sb-pack .sbp-infos {
224
+ display: block;
225
+ margin: 0 auto;
226
+ padding-left: 70px;
227
+ font-weight: 700;
228
+ color:#777;
229
+ }
230
+
231
+ .wrap .sb-pack .sbp-infos span {
232
+ color: #777;
233
+ font-weight: 400;
234
+ }
235
+
236
+ .wrap .sb-pack .sbp-infos-title {
237
+ font-weight: 700;
238
+ color: #777;
239
+ }
240
+
241
+ .wrap .sb-pack .sbp-box-legend, .wrap .sb-pack .sbp-box-version {
242
+ position: absolute;
243
+ left: 0;
244
+ top: 0;
245
+ height: 100%;
246
+ }
247
+
248
+ .wrap .sb-pack .sbp-box-version {
249
+ background: none repeat scroll 0% 0% #80828F;
250
+ padding: 20px 15px;
251
+ }
252
+
253
+ .wrap .sb-pack .sbp-box-legend {
254
+ background: none repeat scroll 0% 0% #FCC500;
255
+ padding: 15px 15px;
256
+ }
257
+
258
+ .wrap .sb-pack .sbp-box-legend:hover {
259
+ background-color: #F39C12;
260
+ }
261
+
262
+ .wrap .sb-pack .sbp-box-version:hover {
263
+ background-color: #6C6E79;
264
+ }
265
+
266
+ .wrap .sb-pack .sbp-icon-help, .wrap .sb-pack .sbp-icon-version {
267
+ color:#FFF;
268
+ font-size:25px;
269
+ }
270
+
271
+ .wrap .sb-pack .sbp-icon:before {
272
+ content: "\f185";
273
+ display: inline-block;
274
+ -webkit-font-smoothing: antialiased;
275
+ font: normal 36px/0.6 'dashicons';
276
+ vertical-align: sub;
277
+ color: #FA5148;
278
+ padding-right: 5px;
279
+ }
280
+
281
+ .wrap .sb-pack .sbp-icon-information:before {
282
+ content: "\f348";
283
+ display: inline-block;
284
+ -webkit-font-smoothing: antialiased;
285
+ font: normal 28px/1 'dashicons';
286
+ vertical-align: middle;
287
+ color: #C9D6E2;
288
+ padding-right: 5px;
289
+ }
290
+
291
+ .wrap .sb-pack label {
292
+ display: inline-block;
293
+ cursor: pointer;
294
+ position: relative;
295
+ padding-left: 35px;
296
+ font-size: 16px;
297
+
298
+ }
299
+
300
+ /*.wrap .sb-pack #sbp-css-content {
301
+ display: none;
302
+ }*/
303
+
304
+ .wrap .sb-pack label:before {
305
+ content: "\2717";
306
+ font-size: 16px;
307
+ -webkit-font-smoothing: antialiased;
308
+ text-align: center;
309
+ color: #fff;
310
+ display: inline-block;
311
+ width: 26px;
312
+ height: 26px;
313
+ margin-right: 10px;
314
+ position: absolute;
315
+ left: 0;
316
+ background: #C9D6E2;
317
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
318
+ -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
319
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
320
+ border: 1px solid #B2BFCA;
321
+ }
322
+
323
+ .wrap .sb-pack input[type=checkbox],
324
+ .wrap .sb-pack input[type=radio] {
325
+ display: none;
326
+ }
327
+
328
+ /*.wrap .sb-pack .sbp-radio-content label:before {
329
+ content: "\2630";
330
+ font-size: 16px;
331
+ -webkit-font-smoothing: antialiased;
332
+ text-align: center;
333
+ color: #fff;
334
+ font-weight: 700;
335
+ display: inline-block;
336
+ width: 24px;
337
+ height: 24px;
338
+ line-height: 1.4;
339
+ margin-right: 10px;
340
+ position: absolute;
341
+ left: 0;
342
+ background: #C9D6E2;
343
+ border: 1px solid #9CA8B3;
344
+ }
345
+
346
+ .wrap .sb-pack input[type=radio]:checked + label:before {
347
+ content: "\2630";
348
+ background: none repeat scroll 0% 0% #2DCB73;
349
+ text-align: center;
350
+ font-weight: 700;
351
+ color: #fff;
352
+ border: 1px solid #1A9E51;
353
+ } */
354
+
355
+ .wrap .sb-pack input[type=checkbox]:checked + label:before {
356
+ content: "\2714";
357
+ background: #2DCB73;
358
+ text-shadow: 1px 1px 1px #148D44;
359
+ border: 1px solid #1A9E51;
360
+ font-size: 16px;
361
+ -webkit-font-smoothing: antialiased;
362
+ color: #fff;
363
+ text-align: center;
364
+ }
365
+
366
+ .wrap .sb-pack .sbp-icon-version:before {
367
+ content: "\f348";
368
+ display: inline-block;
369
+ -webkit-font-smoothing: antialiased;
370
+ font: normal 30px/1 'dashicons';
371
+ vertical-align: top;
372
+ }
373
+
374
+ .wrap .sb-pack .sbp-icon-help:before {
375
+ content: "\f123";
376
+ display: inline-block;
377
+ -webkit-font-smoothing: antialiased;
378
+ font: normal 30px/1 'dashicons';
379
+ vertical-align: top;
380
+ }
381
+
382
+ .wrap .sb-pack .sbp-stats {
383
+ font-size: 16px;
384
+ line-height: 1.5;
385
+ }
386
+
387
+ /* Jquery UI slider
388
+ -------------------------------------------------------------- */
389
+
390
+ .wrap .sb-pack.ui-state-default,
391
+ .wrap .sb-pack .ui-widget-content .ui-state-default,
392
+ .wrap .sb-pack .ui-widget-header .ui-state-default {
393
+ border:1px solid #1A9E51;
394
+ background-color:#2DCB73;
395
+ font-weight:400;
396
+ color:#555;
397
+ outline:0 none;
398
+ cursor:pointer;
399
+ }
400
+ .wrap .sb-pack .ui-state-default:before,
401
+ .wrap .sb-pack .ui-widget-content .ui-state-default:before,
402
+ .wrap .sb-pack .ui-widget-header .ui-state-default:before {
403
+ content:"\2630";
404
+ display:inline-block;
405
+ -webkit-font-smoothing:antialiased;
406
+ color:#fff;
407
+ font-weight:700;
408
+ text-shadow:0 1px #1A9E51;
409
+ line-height: 1.8em;
410
+ }
411
+
412
+ .wrap .sb-pack .ui-state-default a,
413
+ .wrap .sb-pack .ui-state-default a:link,
414
+ .wrap .sb-pack .ui-state-default a:visited {
415
+ color:#fff;
416
+ text-decoration:none;
417
+ }
418
+
419
+ .wrap .sb-pack .ui-state-focus,
420
+ .wrap .sb-pack .ui-state-hover,
421
+ .wrap .sb-pack .ui-widget-content .ui-state-focus,
422
+ .wrap .sb-pack .ui-widget-content .ui-state-hover,
423
+ .wrap .sb-pack .ui-widget-header .ui-state-focus,
424
+ .wrap .sb-pack .ui-widget-header .ui-state-hover {
425
+ background:#3CE281;
426
+ }
427
+
428
+ .wrap .sb-pack .ui-corner-all,
429
+ .wrap .sb-pack .ui-corner-top,
430
+ .wrap .sb-pack .ui-corner-left,
431
+ .wrap .sb-pack .ui-corner-tl {
432
+ border-top-left-radius: 0;
433
+ }
434
+ .wrap .sb-pack .ui-corner-all,
435
+ .wrap .sb-pack .ui-corner-top,
436
+ .wrap .sb-pack .ui-corner-right,
437
+ .wrap .sb-pack .ui-corner-tr {
438
+ border-top-right-radius: 0;
439
+ }
440
+ .wrap .sb-pack .ui-corner-bottom,
441
+ .wrap .sb-pack .ui-corner-left,
442
+ .wrap .sb-pack .ui-corner-bl {
443
+ border-bottom-left-radius: 0;
444
+ }
445
+ .wrap .sb-pack .ui-corner-all,
446
+ .wrap .sb-pack .ui-corner-bottom,
447
+ .wrap .sb-pack .ui-corner-right,
448
+ .wrap .sb-pack .ui-corner-br {
449
+ border-bottom-right-radius: 0;
450
+ }
451
+
452
+ .wrap .sb-pack .ui-corner-all,
453
+ .wrap .sb-pack .ui-corner-bottom,
454
+ .wrap .sb-pack .ui-corner-left,
455
+ .wrap .sb-pack .ui-corner-bl {
456
+ border-bottom-left-radius: 0;
457
+ }
458
+
459
+ .wrap .sb-pack .ui-slider-horizontal {
460
+ height:1.3em;
461
+ }
462
+
463
+ .wrap .sb-pack .ui-slider .ui-slider-handle {
464
+ width:1.8em;
465
+ height:1.8em;
466
+ cursor:pointer;
467
+ text-align:center;
468
+ }
469
+
470
+ .wrap .sb-pack .ui-widget-content {
471
+ -webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);
472
+ -moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);
473
+ box-shadow:inset 0 1px 2px rgba(0,0,0,.1);
474
+ border:1px solid #B2BFCA;
475
+ background:#F1F2F7;
476
+ color:#222
477
+ }
478
+ /* Progress Bars
479
+ -------------------------------------------------------------- */
480
+ .wrap .sb-pack .sbp-progress.time,
481
+ .wrap .sb-pack .sbp-progress.queries {
482
+ height: 30px;
483
+ width: 77%;
484
+ display: inline-block;
485
+ position: relative;
486
+ background-color: #F1F2F7;
487
+ overflow: hidden;
488
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
489
+ -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
490
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
491
+ }
492
+ .wrap .sbp-progress.time > span,
493
+ .wrap .sbp-progress.queries > span {
494
+ background-color: #7EDBA5;
495
+ background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #7EDBA5),color-stop(1, #2DCB73));
496
+ background-image: -webkit-linear-gradient(top, #7EDBA5, #2DCB73);
497
+ background-image: -moz-linear-gradient(top, #7EDBA5, #2DCB73);
498
+ background-image: -ms-linear-gradient(top, #7EDBA5, #2DCB73);
499
+ background-image: -o-linear-gradient(top, #7EDBA5, #f36d0a);
500
+ color:#fff;
501
+ width: 0%;
502
+ max-width: 98%;
503
+ float: left;
504
+ display: block;
505
+ height: 100%;
506
+ position: relative;
507
+ overflow: hidden;
508
+ }
509
+
510
+ .wrap .sb-pack .sbp-progress.time > span {
511
+ -webkit-animation: progress-bar-time 2s 1 forwards;
512
+ -moz-animation: progress-bar-time 2s 1 forwards;
513
+ -ms-animation: progress-bar-time 2s 1 forwards;
514
+ -o-animation: progress-bar-time 2s 1 forwards;
515
+ animation: progress-bar-time 2s 1 forwards;
516
+
517
+ }
518
+
519
+ .wrap .sb-pack .sbp-progress.queries > span {
520
+ -webkit-animation: progress-bar-queries 2s 1 forwards;
521
+ -moz-animation: progress-bar-queries 2s 1 forwards;
522
+ -ms-animation: progress-bar-queries 2s 1 forwards;
523
+ -o-animation: progress-bar-queries 2s 1 forwards;
524
+ animation: progress-bar-queries 2s 1 forwards;
525
+
526
+ }
527
+
528
+ .wrap .sb-pack .sbp-values {
529
+ float: right;
530
+ padding: 0 5px;
531
+ background-color: #1AB4EF;
532
+ color: #fff;
533
+ width: 18%;
534
+ height: 30px;
535
+ line-height: 30px;
536
+ text-align: center;
537
+ text-shadow: 0px -2px #1AB4EF;
538
+ }
539
+
540
+ .wrap .sb-pack .sbp-numbers {
541
+ -webkit-animation: opacity 2s; /* Safari and Chrome */
542
+ -moz-animation: opacity 2s; /* Firefox */
543
+ -ms-animation: opacity 2s; /* Internet Explorer */
544
+ -o-animation: opacity 2s; /* Opera */
545
+ animation: opacity 2s;
546
+ transition-delay: 2s;
547
+ -moz-transition-delay: 2s; /* Firefox 4 */
548
+ -webkit-transition-delay: 2s; /* Safari and Chrome */
549
+ -o-transition-delay: 2s; /* Opera */
550
+ font-size: 16px;
551
+ }
552
+
553
+ @keyframes opacity {
554
+ from { opacity:0; }
555
+ to { opacity: 1; }
556
+ }
557
+
558
+ /* Firefox */
559
+ @-moz-keyframes opacity {
560
+ from { opacity:0; }
561
+ to { opacity: 1; }
562
+ }
563
+
564
+ /* Safari and Chrome */
565
+ @-webkit-keyframes opacity {
566
+ from { opacity:0; }
567
+ to { opacity: 1; }
568
+ }
569
+
570
+ /* Internet Explorer */
571
+ @-ms-keyframes opacity {
572
+ from { opacity:0; }
573
+ to { opacity: 1; }
574
+ }​
575
+
576
+ /* Opera */
577
+ @-o-keyframes opacity {
578
+ from { opacity:0; }
579
+ to { opacity: 1; }
580
+ }​
581
+
582
+ @media screen and (max-width: 783px) {
583
+ .wrap .sb-pack input.regular-text {
584
+ width: 14em;
585
+ }
586
+ }
587
+
588
+ @media screen and (min-width: 784px) {
589
+ .wrap .sb-pack input.regular-text {
590
+ width: 45em;
591
+ }
592
+ }
593
+
594
+ /* Feedback Box */
595
+ .feedback-box {
596
+ border: 1px dashed #555;
597
+ background: #fff;
598
+ width: 100%;
599
+ padding: 40px;
600
+ text-align: center;
601
+ margin-top: 15px;
602
+ box-sizing: border-box;
603
+ }
604
+ .feedback-box .button.button-feedback {
605
+ padding: 10px 40px;
606
+ height: initial;
607
+ }
608
+
609
+ #sab-current-image img {
610
+ max-width: 130px;
611
+ height: auto;
612
+ }
613
+ .feedback-box h3 {
614
+ font-weight: 700;
615
+ }
616
+ .feedback-box h3 > img {
617
+ width: 30px;
618
+ }
619
+ .feedback-box > p {
620
+ max-width: 720px;
621
+ margin: 0 auto;
622
+ }
inc/core.php CHANGED
@@ -1,538 +1,538 @@
1
- <?php
2
-
3
- /*--------------------------------------------------------------------------------------------------------
4
- Plugin Core Functions
5
- ---------------------------------------------------------------------------------------------------------*/
6
-
7
- if( !class_exists( 'Speed_Booster_Pack_Core' ) ) {
8
-
9
- class Speed_Booster_Pack_Core {
10
-
11
- public function __construct() {
12
-
13
- global $sbp_options;
14
- add_action( 'wp_enqueue_scripts', array( $this, 'sbp_no_more_fontawesome'), 9999 );
15
- add_action( 'wp_enqueue_scripts', array( $this, 'sbp_move_scripts_to_footer' ) );
16
- if ( !is_admin() and isset( $sbp_options['jquery_to_footer'] ) ) {
17
- add_action( 'wp_head', array( $this, 'sbp_scripts_to_head' ) );
18
- add_action( 'wp_print_scripts', array( $this, 'sbp_exclude_scripts' ), 100 );
19
- add_action( 'wp_enqueue_scripts', array( $this, 'sbp_exclude_scripts' ), 100 );
20
- }
21
- add_action( 'wp_footer', array( $this, 'sbp_show_page_load_stats' ), 999 );
22
- add_action( 'after_setup_theme', array( $this, 'sbp_junk_header_tags' ) );
23
- add_action( 'init', array( $this, 'sbp_init') );
24
-
25
- $this->sbp_css_optimizer(); // CSS Optimizer functions
26
-
27
- if ( isset( $sbp_options['sbp_css_async'] ) ) {
28
- add_action( 'wp_head', array( $this, 'sbp_except_admin_bar_css' ) );
29
- }
30
-
31
- // Use Google Libraries
32
- if ( !is_admin() and isset( $sbp_options['use_google_libs'] ) ) {
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
- // Minifier
42
- if ( !is_admin() and isset( $sbp_options['minify_html_js'] ) ) {
43
- $this->sbp_minifier();
44
- }
45
-
46
-
47
- // Defer parsing of JavaScript
48
- if ( !is_admin() and isset( $sbp_options['defer_parsing'] ) ) {
49
- add_filter( 'clean_url', array( $this, 'sbp_defer_parsing_of_js' ), 11, 1 );
50
- }
51
-
52
- // Remove query strings from static resources
53
- if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
54
- add_filter( 'script_loader_src', array( $this, 'sbp_remove_query_strings_1' ), 15, 1 );
55
- }
56
-
57
- if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
58
- add_filter( 'style_loader_src', array( $this, 'sbp_remove_query_strings_1' ), 15, 1 );
59
- }
60
-
61
- if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
62
- add_filter( 'script_loader_src', array( $this, 'sbp_remove_query_strings_2' ), 15, 1 );
63
- }
64
-
65
- if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
66
- add_filter( 'style_loader_src', array( $this, 'sbp_remove_query_strings_2' ), 15, 1 );
67
- }
68
-
69
- if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
70
- add_filter( 'script_loader_src', array( $this, 'sbp_remove_query_strings_3' ), 15, 1 );
71
- }
72
-
73
- if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
74
- add_filter( 'style_loader_src', array( $this, 'sbp_remove_query_strings_3' ), 15, 1 );
75
- }
76
-
77
- // JPEG Compression filter
78
- add_filter( 'jpeg_quality', array( $this, 'filter_image_quality' ) );
79
- add_filter( 'wp_editor_set_quality', array( $this, 'filter_image_quality' ) );
80
-
81
-
82
- } // END public public function __construct
83
-
84
-
85
- /*--------------------------------------------------------------------------------------------------------
86
- Init the CSS Optimizer actions
87
- ---------------------------------------------------------------------------------------------------------*/
88
-
89
- function sbp_init() {
90
-
91
- global $sbp_options;
92
-
93
- if ( wp_is_mobile() and isset ( $sbp_options['sbp_is_mobile'] ) ) { // disable all CSS options on mobile devices
94
- return;
95
- }
96
-
97
- if ( !is_admin() and isset( $sbp_options['sbp_css_async'] ) ) {
98
- add_action( 'wp_print_styles', array( $this, 'sbp_print_styles' ), SBP_FOOTER );
99
- add_action( 'wp_footer', array( $this, 'sbp_print_delayed_styles' ), SBP_FOOTER+1 );
100
- }
101
-
102
- }
103
-
104
-
105
- /*--------------------------------------------------------------------------------------------------------
106
- Add except for the admin toolbar css since the Async CSS removes the dashicons from the toolbar.
107
- ---------------------------------------------------------------------------------------------------------*/
108
-
109
- function sbp_except_admin_bar_css() {
110
-
111
- if ( is_admin_bar_showing() ) { // enqueue the admin tolbar styles only if active
112
- wp_enqueue_style( 'open-sans' );
113
- wp_enqueue_style( 'dashicons' );
114
- wp_enqueue_style( 'admin-bar' );
115
- }
116
-
117
- }
118
-
119
-
120
- /*--------------------------------------------------------------------------------------------------------
121
- Get image quality value if it's set. Otherwise it's set to 90
122
- ---------------------------------------------------------------------------------------------------------*/
123
-
124
- function filter_image_quality() {
125
-
126
- if ( get_option( 'sbp_integer' ) ) {
127
- $sbp_compression = get_option( 'sbp_integer' );
128
- } else {
129
- $sbp_compression = 90;
130
- }
131
-
132
- return $sbp_compression;
133
- }
134
-
135
-
136
- /*--------------------------------------------------------------------------------------------------------
137
- ACTION wp_print_styles
138
- ---------------------------------------------------------------------------------------------------------*/
139
-
140
- function sbp_print_styles() {
141
- global $sbp_styles_are_async;
142
- global $sbp_styles;
143
- global $sbp_options;
144
-
145
- if ( is_admin() || !empty( $sbp_styles_are_async ) ) {
146
- return;
147
- }
148
-
149
- if ( isset( $sbp_options['sbp_css_minify'] ) ) {
150
- $minify = true;
151
- }else{
152
- $minify = false;
153
- }
154
-
155
- $sbp_styles_are_async = true;
156
-
157
- $sbp_styles = sbp_generate_styles_list();
158
-
159
- if ( !isset( $sbp_options['sbp_footer_css'] ) ) {
160
-
161
- $not_inlined = array();
162
-
163
- foreach ( $sbp_styles as $style ) {
164
- echo "<style type=\"text/css\" ".($style['media'] ? "media=\"{$style['media']}\"" : '' ).">";
165
- if (!sbp_inline_css($style['src'],$minify)){
166
- $not_inlined[] = $style;
167
- }
168
- echo "</style>";
169
- }
170
- if ( !empty( $not_inlined) ) {
171
- foreach ( $not_inlined as $style ){
172
- ?><link rel="stylesheet" href="<?php echo $style['src']?>" type="text/css" <?php echo $style['media'] ? "media=\"{$style['media']}\"" : ''?> /><?php
173
- }
174
- }
175
- }
176
-
177
- sbp_unregister_styles();
178
- }
179
-
180
-
181
- /*--------------------------------------------------------------------------------------------------------
182
- ACTION wp_footer
183
- ---------------------------------------------------------------------------------------------------------*/
184
-
185
- function sbp_print_delayed_styles() {
186
-
187
- global $sbp_styles;
188
- global $sbp_options;
189
-
190
- if ( isset( $sbp_options['sbp_css_minify'] ) ) {
191
- $minify = true;
192
- }else{
193
- $minify = false;
194
- }
195
-
196
- if ( isset( $sbp_options['sbp_footer_css'] ) ) {
197
-
198
- $not_inlined = array();
199
- foreach ( $sbp_styles as $style ) {
200
- echo "<style type=\"text/css\" ".($style['media'] ? "media=\"{$style['media']}\"" : '' ).">";
201
- if ( !sbp_inline_css($style['src'],$minify) ) {
202
- $not_inlined[] = $style;
203
- }
204
- echo "</style>";
205
- }
206
- if ( !empty( $not_inlined ) ) {
207
- foreach ( $not_inlined as $style ) {
208
- ?><link rel="stylesheet" href="<?php echo $style['src']?>" type="text/css" <?php echo $style['media'] ? "media=\"{$style['media']}\"" : ''?> /><?php
209
- }
210
- }
211
- }
212
- }
213
-
214
-
215
- /*--------------------------------------------------------------------------------------------------------
216
- Moves scripts to the footer to decrease page load times, while keeping stylesheets in the header
217
- ---------------------------------------------------------------------------------------------------------*/
218
-
219
- function sbp_move_scripts_to_footer() {
220
-
221
- global $sbp_options;
222
-
223
- if ( !is_admin() and isset( $sbp_options['jquery_to_footer'] ) ) {
224
-
225
- remove_action( 'wp_head', 'wp_print_scripts' );
226
- remove_action( 'wp_head', 'wp_print_head_scripts', 9 );
227
- remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );
228
-
229
- }
230
-
231
- } // END function sbp_move_scripts_to_footer
232
-
233
-
234
- /*--------------------------------------------------------------------------------------------------------
235
- Exclude scripts from "Move scripts to footer" option
236
- ---------------------------------------------------------------------------------------------------------*/
237
-
238
- public function sbp_exclude_scripts() {
239
-
240
-
241
- if ( get_option( 'sbp_js_footer_exceptions1' ) ) {
242
- $sbp_handle1 = esc_html( get_option( 'sbp_js_footer_exceptions1' ) );
243
- }
244
-
245
- if ( get_option( 'sbp_js_footer_exceptions2' ) ) {
246
- $sbp_handle2 = esc_html( get_option( 'sbp_js_footer_exceptions2' ) );
247
- }
248
-
249
- if ( get_option( 'sbp_js_footer_exceptions3' ) ) {
250
- $sbp_handle3 = esc_html( get_option( 'sbp_js_footer_exceptions3' ) );
251
- }
252
-
253
- if ( get_option( 'sbp_js_footer_exceptions4' ) ) {
254
- $sbp_handle4 = esc_html( get_option( 'sbp_js_footer_exceptions4' ) );
255
- }
256
-
257
- $sbp_enq = 'enqueued';
258
- $sbp_reg = 'registered';
259
- $sbp_done = 'done';
260
-
261
- /*--------------------------------------------------------------------------------------------------------*/
262
-
263
- if ( get_option( 'sbp_js_footer_exceptions1' ) and wp_script_is( $sbp_handle1 , $sbp_enq ) ) {
264
- wp_dequeue_script( $sbp_handle1 );
265
- }
266
-
267
- if ( get_option( 'sbp_js_footer_exceptions2' ) and wp_script_is( $sbp_handle2 , $sbp_enq ) ) {
268
- wp_dequeue_script( $sbp_handle2 );
269
- }
270
-
271
- if ( get_option( 'sbp_js_footer_exceptions3' ) and wp_script_is( $sbp_handle3 , $sbp_enq ) ) {
272
- wp_dequeue_script( $sbp_handle3 );
273
- }
274
-
275
- if ( get_option( 'sbp_js_footer_exceptions4' ) and wp_script_is( $sbp_handle4 , $sbp_enq ) ) {
276
- wp_dequeue_script( $sbp_handle4 );
277
- }
278
-
279
- /*--------------------------------------------------------------------------------------------------------*/
280
-
281
- if ( get_option( 'sbp_js_footer_exceptions1' ) and wp_script_is( $sbp_handle1 , $sbp_reg ) ) {
282
- wp_deregister_script( $sbp_handle1 );
283
- }
284
-
285
- if ( get_option( 'sbp_js_footer_exceptions2' ) and wp_script_is( $sbp_handle2 , $sbp_reg ) ) {
286
- wp_deregister_script( $sbp_handle2 );
287
- }
288
-
289
- if ( get_option( 'sbp_js_footer_exceptions3' ) and wp_script_is( $sbp_handle3 , $sbp_reg ) ) {
290
- wp_deregister_script( $sbp_handle3 );
291
- }
292
-
293
- if ( get_option( 'sbp_js_footer_exceptions4' ) and wp_script_is( $sbp_handle4 , $sbp_reg ) ) {
294
- wp_deregister_script( $sbp_handle4 );
295
- }
296
-
297
- /*--------------------------------------------------------------------------------------------------------*/
298
-
299
- if ( get_option( 'sbp_js_footer_exceptions1' ) and wp_script_is( $sbp_handle1 , $sbp_done ) ) {
300
- wp_deregister_script( $sbp_handle1 );
301
- }
302
-
303
- if ( get_option( 'sbp_js_footer_exceptions2' ) and wp_script_is( $sbp_handle2 , $sbp_done ) ) {
304
- wp_deregister_script( $sbp_handle2 );
305
- }
306
-
307
- if ( get_option( 'sbp_js_footer_exceptions3' ) and wp_script_is( $sbp_handle3 , $sbp_done ) ) {
308
- wp_deregister_script( $sbp_handle3 );
309
- }
310
-
311
- if ( get_option( 'sbp_js_footer_exceptions4' ) and wp_script_is( $sbp_handle4 , $sbp_done ) ) {
312
- wp_deregister_script( $sbp_handle4 );
313
- }
314
-
315
- }
316
-
317
-
318
- /*--------------------------------------------------------------------------------------------------------
319
- Put scripts back to the head
320
- ---------------------------------------------------------------------------------------------------------*/
321
-
322
- public function sbp_scripts_to_head() {
323
-
324
- if ( get_option( 'sbp_head_html_script1' ) ) {
325
- echo get_option( 'sbp_head_html_script1' ) . "\n";
326
-
327
- }
328
-
329
- if ( get_option( 'sbp_head_html_script2' ) ) {
330
- echo get_option( 'sbp_head_html_script2' ) . "\n";
331
- }
332
-
333
- if ( get_option( 'sbp_head_html_script3' ) ) {
334
- echo get_option( 'sbp_head_html_script3' ) . "\n";
335
- }
336
-
337
- if ( get_option( 'sbp_head_html_script4' ) ) {
338
- echo get_option( 'sbp_head_html_script4' ) . "\n";
339
- }
340
-
341
- }
342
-
343
-
344
- /*--------------------------------------------------------------------------------------------------------
345
- Show Number of Queries and Page Load Time
346
- ---------------------------------------------------------------------------------------------------------*/
347
-
348
- function sbp_show_page_load_stats() {
349
- $timer_stop = timer_stop( 0, 2 ); // to display milliseconds instead of seconds usethe following: $timer_stop = 1000 * ( float ) timer_stop( 0, 4 );
350
- $get_num_queries = get_num_queries();
351
- update_option( 'sbp_page_time', $timer_stop );
352
- update_option( 'sbp_page_queries', $get_num_queries );
353
- }
354
-
355
-
356
- /*--------------------------------------------------------------------------------------------------------
357
- Use Google Libraries
358
- ---------------------------------------------------------------------------------------------------------*/
359
-
360
- function sbp_use_google_libraries() {
361
-
362
- require_once( SPEED_BOOSTER_PACK_PATH . 'inc/use-google-libraries.php' );
363
-
364
- if ( class_exists( 'SBP_GoogleLibraries' ) ) {
365
- SBP_GoogleLibraries::configure_plugin();
366
-
367
- }
368
-
369
- } // End function sbp_use_google_libraries()
370
-
371
-
372
- /*--------------------------------------------------------------------------------------------------------
373
- Lazy Load for images
374
- ---------------------------------------------------------------------------------------------------------*/
375
-
376
- function sbp_lazy_load_for_images() {
377
-
378
- if ( !class_exists( 'CrazyLazy' ) ) {
379
- require_once(SPEED_BOOSTER_PACK_PATH . 'inc/crazy-lazy.php');
380
- }
381
- } // End function sbp_lazy_load_for_images()
382
-
383
-
384
-
385
- /*--------------------------------------------------------------------------------------------------------
386
- Minify HTML and Javascripts
387
- ---------------------------------------------------------------------------------------------------------*/
388
-
389
- function sbp_minifier() {
390
-
391
- require_once( SPEED_BOOSTER_PACK_PATH . 'inc/sbp-minifier.php' );
392
- } // End function sbp_minifier()
393
-
394
-
395
- /*--------------------------------------------------------------------------------------------------------
396
- CSS Optimizer
397
- ---------------------------------------------------------------------------------------------------------*/
398
-
399
- function sbp_css_optimizer() {
400
-
401
- require_once( SPEED_BOOSTER_PACK_PATH . 'inc/css-optimizer.php' );
402
-
403
- } // End function sbp_css_optimizer()
404
-
405
-
406
- /*--------------------------------------------------------------------------------------------------------
407
- Defer parsing of JavaScript and exclusion files
408
- ---------------------------------------------------------------------------------------------------------*/
409
-
410
- function sbp_defer_parsing_of_js ( $url ) {
411
-
412
- if ( get_option( 'sbp_defer_exceptions1' ) ) {
413
- $defer_exclude1 = get_option( 'sbp_defer_exceptions1' );
414
- }
415
-
416
- if ( get_option( 'sbp_defer_exceptions2' ) ) {
417
- $defer_exclude2 = get_option( 'sbp_defer_exceptions2' );
418
- }
419
-
420
- if ( get_option( 'sbp_defer_exceptions3' ) ) {
421
- $defer_exclude3 = get_option( 'sbp_defer_exceptions3' );
422
- }
423
-
424
- if ( get_option( 'sbp_defer_exceptions4' ) ) {
425
- $defer_exclude4 = get_option( 'sbp_defer_exceptions4' );
426
- }
427
-
428
-
429
- if ( FALSE === strpos( $url, '.js' ) ) {
430
- return $url;
431
- }
432
-
433
-
434
- if ( get_option( 'sbp_defer_exceptions1' ) and strpos( $url, $defer_exclude1 ) ) {
435
- return $url;
436
- }
437
-
438
- if ( get_option( 'sbp_defer_exceptions2' ) and strpos( $url, $defer_exclude2 ) ) {
439
- return $url;
440
- }
441
-
442
- if ( get_option( 'sbp_defer_exceptions3' ) and strpos( $url, $defer_exclude3 ) ) {
443
- return $url;
444
- }
445
-
446
- if ( get_option( 'sbp_defer_exceptions4' ) and strpos( $url, $defer_exclude4 ) ) {
447
- return $url;
448
- }
449
-
450
- return "$url' defer='defer";
451
-
452
- } // END function sbp_defer_parsing_of_js
453
-
454
-
455
- /*--------------------------------------------------------------------------------------------------------
456
- Remove query strings from static resources
457
- ---------------------------------------------------------------------------------------------------------*/
458
-
459
- function sbp_remove_query_strings_1( $src ) { // remove "?ver" string
460
- $rqsfsr = explode( '?ver', $src );
461
- return $rqsfsr[0];
462
- }
463
-
464
- function sbp_remove_query_strings_2( $src ) { // remove "&ver" string
465
- $rqsfsr = explode( '&ver', $src );
466
- return $rqsfsr[0];
467
- }
468
-
469
- function sbp_remove_query_strings_3( $src ) { // remove "?rev" string from Revolution Slider plugin
470
- $rqsfsr = explode( '?rev', $src );
471
- return $rqsfsr[0];
472
- }
473
-
474
-
475
- /*--------------------------------------------------------------------------------------------------------
476
- Dequeue extra Font Awesome stylesheet
477
- ---------------------------------------------------------------------------------------------------------*/
478
-
479
- function sbp_no_more_fontawesome() {
480
- global $wp_styles;
481
- global $sbp_options;
482
-
483
- // we'll use preg_match to find only the following patterns as exact matches, to prevent other plugin stylesheets that contain font-awesome expression to be also dequeued
484
- $patterns = array(
485
- 'font-awesome.css',
486
- 'font-awesome.min.css'
487
- );
488
- // multiple patterns hook
489
- $regex = '/(' .implode('|', $patterns) .')/i';
490
- foreach( $wp_styles -> registered as $registered ) {
491
- if( !is_admin() and preg_match( $regex, $registered->src) and isset( $sbp_options['font_awesome'] ) ) {
492
- wp_dequeue_style( $registered->handle );
493
- // FA was dequeued, so here we need to enqueue it again from CDN
494
- wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' );
495
- } // END if( preg_match...
496
- } // END foreach
497
- } // End function dfa_no_more_fontawesome
498
-
499
-
500
- /*--------------------------------------------------------------------------------------------------------
501
- Remove junk header tags
502
- ---------------------------------------------------------------------------------------------------------*/
503
-
504
- public function sbp_junk_header_tags() {
505
-
506
- global $sbp_options;
507
-
508
- // Remove Adjacent Posts links PREV/NEXT
509
- if ( isset( $sbp_options['remove_adjacent'] ) ) {
510
- remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
511
- }
512
-
513
- // Remove Windows Live Writer Manifest Link
514
- if ( isset( $sbp_options['wml_link'] ) ) {
515
- remove_action( 'wp_head', 'wlwmanifest_link' );
516
- }
517
-
518
- // Remove WordPress Shortlinks from WP Head
519
- if ( isset( $sbp_options['remove_wsl'] ) ) {
520
- remove_action( 'wp_head', 'wp_shortlink_wp_head' );
521
- }
522
-
523
- // Remove WP Generator/Version - for security reasons and cleaning the header
524
- if ( isset( $sbp_options['wp_generator'] ) ) {
525
- remove_action('wp_head', 'wp_generator');
526
- }
527
-
528
- // Remove all feeds
529
- if ( isset( $sbp_options['remove_all_feeds'] ) ) {
530
- remove_action( 'wp_head', 'feed_links_extra', 3 ); // remove the feed links from the extra feeds such as category feeds
531
- remove_action( 'wp_head', 'feed_links', 2 ); // remove the feed links from the general feeds: Post and Comment Feed
532
- }
533
-
534
- } // END public function sbp_junk_header_tags
535
-
536
- } // END class Speed_Booster_Pack_Core
537
-
538
  } // END if(!class_exists('Speed_Booster_Pack_Core'))
1
+ <?php
2
+
3
+ /*--------------------------------------------------------------------------------------------------------
4
+ Plugin Core Functions
5
+ ---------------------------------------------------------------------------------------------------------*/
6
+
7
+ if( !class_exists( 'Speed_Booster_Pack_Core' ) ) {
8
+
9
+ class Speed_Booster_Pack_Core {
10
+
11
+ public function __construct() {
12
+
13
+ global $sbp_options;
14
+ add_action( 'wp_enqueue_scripts', array( $this, 'sbp_no_more_fontawesome'), 9999 );
15
+ add_action( 'wp_enqueue_scripts', array( $this, 'sbp_move_scripts_to_footer' ) );
16
+ if ( !is_admin() and isset( $sbp_options['jquery_to_footer'] ) ) {
17
+ add_action( 'wp_head', array( $this, 'sbp_scripts_to_head' ) );
18
+ add_action( 'wp_print_scripts', array( $this, 'sbp_exclude_scripts' ), 100 );
19
+ add_action( 'wp_enqueue_scripts', array( $this, 'sbp_exclude_scripts' ), 100 );
20
+ }
21
+ add_action( 'wp_footer', array( $this, 'sbp_show_page_load_stats' ), 999 );
22
+ add_action( 'after_setup_theme', array( $this, 'sbp_junk_header_tags' ) );
23
+ add_action( 'init', array( $this, 'sbp_init') );
24
+
25
+ $this->sbp_css_optimizer(); // CSS Optimizer functions
26
+
27
+ if ( isset( $sbp_options['sbp_css_async'] ) ) {
28
+ add_action( 'wp_head', array( $this, 'sbp_except_admin_bar_css' ) );
29
+ }
30
+
31
+ // Use Google Libraries
32
+ if ( !is_admin() and isset( $sbp_options['use_google_libs'] ) ) {
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
+ // Minifier
42
+ if ( !is_admin() and isset( $sbp_options['minify_html_js'] ) ) {
43
+ $this->sbp_minifier();
44
+ }
45
+
46
+
47
+ // Defer parsing of JavaScript
48
+ if ( !is_admin() and isset( $sbp_options['defer_parsing'] ) ) {
49
+ add_filter( 'clean_url', array( $this, 'sbp_defer_parsing_of_js' ), 11, 1 );
50
+ }
51
+
52
+ // Remove query strings from static resources
53
+ if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
54
+ add_filter( 'script_loader_src', array( $this, 'sbp_remove_query_strings_1' ), 15, 1 );
55
+ }
56
+
57
+ if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
58
+ add_filter( 'style_loader_src', array( $this, 'sbp_remove_query_strings_1' ), 15, 1 );
59
+ }
60
+
61
+ if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
62
+ add_filter( 'script_loader_src', array( $this, 'sbp_remove_query_strings_2' ), 15, 1 );
63
+ }
64
+
65
+ if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
66
+ add_filter( 'style_loader_src', array( $this, 'sbp_remove_query_strings_2' ), 15, 1 );
67
+ }
68
+
69
+ if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
70
+ add_filter( 'script_loader_src', array( $this, 'sbp_remove_query_strings_3' ), 15, 1 );
71
+ }
72
+
73
+ if ( !is_admin() and isset( $sbp_options['query_strings'] ) ) {
74
+ add_filter( 'style_loader_src', array( $this, 'sbp_remove_query_strings_3' ), 15, 1 );
75
+ }
76
+
77
+ // JPEG Compression filter
78
+ add_filter( 'jpeg_quality', array( $this, 'filter_image_quality' ) );
79
+ add_filter( 'wp_editor_set_quality', array( $this, 'filter_image_quality' ) );
80
+
81
+
82
+ } // END public public function __construct
83
+
84
+
85
+ /*--------------------------------------------------------------------------------------------------------
86
+ Init the CSS Optimizer actions
87
+ ---------------------------------------------------------------------------------------------------------*/
88
+
89
+ function sbp_init() {
90
+
91
+ global $sbp_options;
92
+
93
+ if ( wp_is_mobile() and isset ( $sbp_options['sbp_is_mobile'] ) ) { // disable all CSS options on mobile devices
94
+ return;
95
+ }
96
+
97
+ if ( !is_admin() and isset( $sbp_options['sbp_css_async'] ) ) {
98
+ add_action( 'wp_print_styles', array( $this, 'sbp_print_styles' ), SBP_FOOTER );
99
+ add_action( 'wp_footer', array( $this, 'sbp_print_delayed_styles' ), SBP_FOOTER+1 );
100
+ }
101
+
102
+ }
103
+
104
+
105
+ /*--------------------------------------------------------------------------------------------------------
106
+ Add except for the admin toolbar css since the Async CSS removes the dashicons from the toolbar.
107
+ ---------------------------------------------------------------------------------------------------------*/
108
+
109
+ function sbp_except_admin_bar_css() {
110
+
111
+ if ( is_admin_bar_showing() ) { // enqueue the admin tolbar styles only if active
112
+ wp_enqueue_style( 'open-sans' );
113
+ wp_enqueue_style( 'dashicons' );
114
+ wp_enqueue_style( 'admin-bar' );
115
+ }
116
+
117
+ }
118
+
119
+
120
+ /*--------------------------------------------------------------------------------------------------------
121
+ Get image quality value if it's set. Otherwise it's set to 90
122
+ ---------------------------------------------------------------------------------------------------------*/
123
+
124
+ function filter_image_quality() {
125
+
126
+ if ( get_option( 'sbp_integer' ) ) {
127
+ $sbp_compression = get_option( 'sbp_integer' );
128
+ } else {
129
+ $sbp_compression = 90;
130
+ }
131
+
132
+ return $sbp_compression;
133
+ }
134
+
135
+
136
+ /*--------------------------------------------------------------------------------------------------------
137
+ ACTION wp_print_styles
138
+ ---------------------------------------------------------------------------------------------------------*/
139
+
140
+ function sbp_print_styles() {
141
+ global $sbp_styles_are_async;
142
+ global $sbp_styles;
143
+ global $sbp_options;
144
+
145
+ if ( is_admin() || !empty( $sbp_styles_are_async ) ) {
146
+ return;
147
+ }
148
+
149
+ if ( isset( $sbp_options['sbp_css_minify'] ) ) {
150
+ $minify = true;
151
+ }else{
152
+ $minify = false;
153
+ }
154
+
155
+ $sbp_styles_are_async = true;
156
+
157
+ $sbp_styles = sbp_generate_styles_list();
158
+
159
+ if ( !isset( $sbp_options['sbp_footer_css'] ) ) {
160
+
161
+ $not_inlined = array();
162
+
163
+ foreach ( $sbp_styles as $style ) {
164
+ echo "<style type=\"text/css\" ".($style['media'] ? "media=\"{$style['media']}\"" : '' ).">";
165
+ if (!sbp_inline_css($style['src'],$minify)){
166
+ $not_inlined[] = $style;
167
+ }
168
+ echo "</style>";
169
+ }
170
+ if ( !empty( $not_inlined) ) {
171
+ foreach ( $not_inlined as $style ){
172
+ ?><link rel="stylesheet" href="<?php echo $style['src']?>" type="text/css" <?php echo $style['media'] ? "media=\"{$style['media']}\"" : ''?> /><?php
173
+ }
174
+ }
175
+ }
176
+
177
+ sbp_unregister_styles();
178
+ }
179
+
180
+
181
+ /*--------------------------------------------------------------------------------------------------------
182
+ ACTION wp_footer
183
+ ---------------------------------------------------------------------------------------------------------*/
184
+
185
+ function sbp_print_delayed_styles() {
186
+
187
+ global $sbp_styles;
188
+ global $sbp_options;
189
+
190
+ if ( isset( $sbp_options['sbp_css_minify'] ) ) {
191
+ $minify = true;
192
+ }else{
193
+ $minify = false;
194
+ }
195
+
196
+ if ( isset( $sbp_options['sbp_footer_css'] ) ) {
197
+
198
+ $not_inlined = array();
199
+ foreach ( $sbp_styles as $style ) {
200
+ echo "<style type=\"text/css\" ".($style['media'] ? "media=\"{$style['media']}\"" : '' ).">";
201
+ if ( !sbp_inline_css($style['src'],$minify) ) {
202
+ $not_inlined[] = $style;
203
+ }
204
+ echo "</style>";
205
+ }
206
+ if ( !empty( $not_inlined ) ) {
207
+ foreach ( $not_inlined as $style ) {
208
+ ?><link rel="stylesheet" href="<?php echo $style['src']?>" type="text/css" <?php echo $style['media'] ? "media=\"{$style['media']}\"" : ''?> /><?php
209
+ }
210
+ }
211
+ }
212
+ }
213
+
214
+
215
+ /*--------------------------------------------------------------------------------------------------------
216
+ Moves scripts to the footer to decrease page load times, while keeping stylesheets in the header
217
+ ---------------------------------------------------------------------------------------------------------*/
218
+
219
+ function sbp_move_scripts_to_footer() {
220
+
221
+ global $sbp_options;
222
+
223
+ if ( !is_admin() and isset( $sbp_options['jquery_to_footer'] ) ) {
224
+
225
+ remove_action( 'wp_head', 'wp_print_scripts' );
226
+ remove_action( 'wp_head', 'wp_print_head_scripts', 9 );
227
+ remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );
228
+
229
+ }
230
+
231
+ } // END function sbp_move_scripts_to_footer
232
+
233
+
234
+ /*--------------------------------------------------------------------------------------------------------
235
+ Exclude scripts from "Move scripts to footer" option
236
+ ---------------------------------------------------------------------------------------------------------*/
237
+
238
+ public function sbp_exclude_scripts() {
239
+
240
+
241
+ if ( get_option( 'sbp_js_footer_exceptions1' ) ) {
242
+ $sbp_handle1 = esc_html( get_option( 'sbp_js_footer_exceptions1' ) );
243
+ }
244
+
245
+ if ( get_option( 'sbp_js_footer_exceptions2' ) ) {
246
+ $sbp_handle2 = esc_html( get_option( 'sbp_js_footer_exceptions2' ) );
247
+ }
248
+
249
+ if ( get_option( 'sbp_js_footer_exceptions3' ) ) {
250
+ $sbp_handle3 = esc_html( get_option( 'sbp_js_footer_exceptions3' ) );
251
+ }
252
+
253
+ if ( get_option( 'sbp_js_footer_exceptions4' ) ) {
254
+ $sbp_handle4 = esc_html( get_option( 'sbp_js_footer_exceptions4' ) );
255
+ }
256
+
257
+ $sbp_enq = 'enqueued';
258
+ $sbp_reg = 'registered';
259
+ $sbp_done = 'done';
260
+
261
+ /*--------------------------------------------------------------------------------------------------------*/
262
+
263
+ if ( get_option( 'sbp_js_footer_exceptions1' ) and wp_script_is( $sbp_handle1 , $sbp_enq ) ) {
264
+ wp_dequeue_script( $sbp_handle1 );
265
+ }
266
+
267
+ if ( get_option( 'sbp_js_footer_exceptions2' ) and wp_script_is( $sbp_handle2 , $sbp_enq ) ) {
268
+ wp_dequeue_script( $sbp_handle2 );
269
+ }
270
+
271
+ if ( get_option( 'sbp_js_footer_exceptions3' ) and wp_script_is( $sbp_handle3 , $sbp_enq ) ) {
272
+ wp_dequeue_script( $sbp_handle3 );
273
+ }
274
+
275
+ if ( get_option( 'sbp_js_footer_exceptions4' ) and wp_script_is( $sbp_handle4 , $sbp_enq ) ) {
276
+ wp_dequeue_script( $sbp_handle4 );
277
+ }
278
+
279
+ /*--------------------------------------------------------------------------------------------------------*/
280
+
281
+ if ( get_option( 'sbp_js_footer_exceptions1' ) and wp_script_is( $sbp_handle1 , $sbp_reg ) ) {
282
+ wp_deregister_script( $sbp_handle1 );
283
+ }
284
+
285
+ if ( get_option( 'sbp_js_footer_exceptions2' ) and wp_script_is( $sbp_handle2 , $sbp_reg ) ) {
286
+ wp_deregister_script( $sbp_handle2 );
287
+ }
288
+
289
+ if ( get_option( 'sbp_js_footer_exceptions3' ) and wp_script_is( $sbp_handle3 , $sbp_reg ) ) {
290
+ wp_deregister_script( $sbp_handle3 );
291
+ }
292
+
293
+ if ( get_option( 'sbp_js_footer_exceptions4' ) and wp_script_is( $sbp_handle4 , $sbp_reg ) ) {
294
+ wp_deregister_script( $sbp_handle4 );
295
+ }
296
+
297
+ /*--------------------------------------------------------------------------------------------------------*/
298
+
299
+ if ( get_option( 'sbp_js_footer_exceptions1' ) and wp_script_is( $sbp_handle1 , $sbp_done ) ) {
300
+ wp_deregister_script( $sbp_handle1 );
301
+ }
302
+
303
+ if ( get_option( 'sbp_js_footer_exceptions2' ) and wp_script_is( $sbp_handle2 , $sbp_done ) ) {
304
+ wp_deregister_script( $sbp_handle2 );
305
+ }
306
+
307
+ if ( get_option( 'sbp_js_footer_exceptions3' ) and wp_script_is( $sbp_handle3 , $sbp_done ) ) {
308
+ wp_deregister_script( $sbp_handle3 );
309
+ }
310
+
311
+ if ( get_option( 'sbp_js_footer_exceptions4' ) and wp_script_is( $sbp_handle4 , $sbp_done ) ) {
312
+ wp_deregister_script( $sbp_handle4 );
313
+ }
314
+
315
+ }
316
+
317
+
318
+ /*--------------------------------------------------------------------------------------------------------
319
+ Put scripts back to the head
320
+ ---------------------------------------------------------------------------------------------------------*/
321
+
322
+ public function sbp_scripts_to_head() {
323
+
324
+ if ( get_option( 'sbp_head_html_script1' ) ) {
325
+ echo get_option( 'sbp_head_html_script1' ) . "\n";
326
+
327
+ }
328
+
329
+ if ( get_option( 'sbp_head_html_script2' ) ) {
330
+ echo get_option( 'sbp_head_html_script2' ) . "\n";
331
+ }
332
+
333
+ if ( get_option( 'sbp_head_html_script3' ) ) {
334
+ echo get_option( 'sbp_head_html_script3' ) . "\n";
335
+ }
336
+
337
+ if ( get_option( 'sbp_head_html_script4' ) ) {
338
+ echo get_option( 'sbp_head_html_script4' ) . "\n";
339
+ }
340
+
341
+ }
342
+
343
+
344
+ /*--------------------------------------------------------------------------------------------------------
345
+ Show Number of Queries and Page Load Time
346
+ ---------------------------------------------------------------------------------------------------------*/
347
+
348
+ function sbp_show_page_load_stats() {
349
+ $timer_stop = timer_stop( 0, 2 ); // to display milliseconds instead of seconds usethe following: $timer_stop = 1000 * ( float ) timer_stop( 0, 4 );
350
+ $get_num_queries = get_num_queries();
351
+ update_option( 'sbp_page_time', $timer_stop );
352
+ update_option( 'sbp_page_queries', $get_num_queries );
353
+ }
354
+
355
+
356
+ /*--------------------------------------------------------------------------------------------------------
357
+ Use Google Libraries
358
+ ---------------------------------------------------------------------------------------------------------*/
359
+
360
+ function sbp_use_google_libraries() {
361
+
362
+ require_once( SPEED_BOOSTER_PACK_PATH . 'inc/use-google-libraries.php' );
363
+
364
+ if ( class_exists( 'SBP_GoogleLibraries' ) ) {
365
+ SBP_GoogleLibraries::configure_plugin();
366
+
367
+ }
368
+
369
+ } // End function sbp_use_google_libraries()
370
+
371
+
372
+ /*--------------------------------------------------------------------------------------------------------
373
+ Lazy Load for images
374
+ ---------------------------------------------------------------------------------------------------------*/
375
+
376
+ function sbp_lazy_load_for_images() {
377
+
378
+ if ( !class_exists( 'CrazyLazy' ) ) {
379
+ require_once(SPEED_BOOSTER_PACK_PATH . 'inc/crazy-lazy.php');
380
+ }
381
+ } // End function sbp_lazy_load_for_images()
382
+
383
+
384
+
385
+ /*--------------------------------------------------------------------------------------------------------
386
+ Minify HTML and Javascripts
387
+ ---------------------------------------------------------------------------------------------------------*/
388
+
389
+ function sbp_minifier() {
390
+
391
+ require_once( SPEED_BOOSTER_PACK_PATH . 'inc/sbp-minifier.php' );
392
+ } // End function sbp_minifier()
393
+
394
+
395
+ /*--------------------------------------------------------------------------------------------------------
396
+ CSS Optimizer
397
+ ---------------------------------------------------------------------------------------------------------*/
398
+
399
+ function sbp_css_optimizer() {
400
+
401
+ require_once( SPEED_BOOSTER_PACK_PATH . 'inc/css-optimizer.php' );
402
+
403
+ } // End function sbp_css_optimizer()
404
+
405
+
406
+ /*--------------------------------------------------------------------------------------------------------
407
+ Defer parsing of JavaScript and exclusion files
408
+ ---------------------------------------------------------------------------------------------------------*/
409
+
410
+ function sbp_defer_parsing_of_js ( $url ) {
411
+
412
+ if ( get_option( 'sbp_defer_exceptions1' ) ) {
413
+ $defer_exclude1 = get_option( 'sbp_defer_exceptions1' );
414
+ }
415
+
416
+ if ( get_option( 'sbp_defer_exceptions2' ) ) {
417
+ $defer_exclude2 = get_option( 'sbp_defer_exceptions2' );
418
+ }
419
+
420
+ if ( get_option( 'sbp_defer_exceptions3' ) ) {
421
+ $defer_exclude3 = get_option( 'sbp_defer_exceptions3' );
422
+ }
423
+
424
+ if ( get_option( 'sbp_defer_exceptions4' ) ) {
425
+ $defer_exclude4 = get_option( 'sbp_defer_exceptions4' );
426
+ }
427
+
428
+
429
+ if ( FALSE === strpos( $url, '.js' ) ) {
430
+ return $url;
431
+ }
432
+
433
+
434
+ if ( get_option( 'sbp_defer_exceptions1' ) and strpos( $url, $defer_exclude1 ) ) {
435
+ return $url;
436
+ }
437
+
438
+ if ( get_option( 'sbp_defer_exceptions2' ) and strpos( $url, $defer_exclude2 ) ) {
439
+ return $url;
440
+ }
441
+
442
+ if ( get_option( 'sbp_defer_exceptions3' ) and strpos( $url, $defer_exclude3 ) ) {
443
+ return $url;
444
+ }
445
+
446
+ if ( get_option( 'sbp_defer_exceptions4' ) and strpos( $url, $defer_exclude4 ) ) {
447
+ return $url;
448
+ }
449
+
450
+ return "$url' defer='defer";
451
+
452
+ } // END function sbp_defer_parsing_of_js
453
+
454
+
455
+ /*--------------------------------------------------------------------------------------------------------
456
+ Remove query strings from static resources
457
+ ---------------------------------------------------------------------------------------------------------*/
458
+
459
+ function sbp_remove_query_strings_1( $src ) { // remove "?ver" string
460
+ $rqsfsr = explode( '?ver', $src );
461
+ return $rqsfsr[0];
462
+ }
463
+
464
+ function sbp_remove_query_strings_2( $src ) { // remove "&ver" string
465
+ $rqsfsr = explode( '&ver', $src );
466
+ return $rqsfsr[0];
467
+ }
468
+
469
+ function sbp_remove_query_strings_3( $src ) { // remove "?rev" string from Revolution Slider plugin
470
+ $rqsfsr = explode( '?rev', $src );
471
+ return $rqsfsr[0];
472
+ }
473
+
474
+
475
+ /*--------------------------------------------------------------------------------------------------------
476
+ Dequeue extra Font Awesome stylesheet
477
+ ---------------------------------------------------------------------------------------------------------*/
478
+
479
+ function sbp_no_more_fontawesome() {
480
+ global $wp_styles;
481
+ global $sbp_options;
482
+
483
+ // we'll use preg_match to find only the following patterns as exact matches, to prevent other plugin stylesheets that contain font-awesome expression to be also dequeued
484
+ $patterns = array(
485
+ 'font-awesome.css',
486
+ 'font-awesome.min.css'
487
+ );
488
+ // multiple patterns hook
489
+ $regex = '/(' .implode('|', $patterns) .')/i';
490
+ foreach( $wp_styles -> registered as $registered ) {
491
+ if( !is_admin() and preg_match( $regex, $registered->src) and isset( $sbp_options['font_awesome'] ) ) {
492
+ wp_dequeue_style( $registered->handle );
493
+ // FA was dequeued, so here we need to enqueue it again from CDN
494
+ wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' );
495
+ } // END if( preg_match...
496
+ } // END foreach
497
+ } // End function dfa_no_more_fontawesome
498
+
499
+
500
+ /*--------------------------------------------------------------------------------------------------------
501
+ Remove junk header tags
502
+ ---------------------------------------------------------------------------------------------------------*/
503
+
504
+ public function sbp_junk_header_tags() {
505
+
506
+ global $sbp_options;
507
+
508
+ // Remove Adjacent Posts links PREV/NEXT
509
+ if ( isset( $sbp_options['remove_adjacent'] ) ) {
510
+ remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
511
+ }
512
+
513
+ // Remove Windows Live Writer Manifest Link
514
+ if ( isset( $sbp_options['wml_link'] ) ) {
515
+ remove_action( 'wp_head', 'wlwmanifest_link' );
516
+ }
517
+
518
+ // Remove WordPress Shortlinks from WP Head
519
+ if ( isset( $sbp_options['remove_wsl'] ) ) {
520
+ remove_action( 'wp_head', 'wp_shortlink_wp_head' );
521
+ }
522
+
523
+ // Remove WP Generator/Version - for security reasons and cleaning the header
524
+ if ( isset( $sbp_options['wp_generator'] ) ) {
525
+ remove_action('wp_head', 'wp_generator');
526
+ }
527
+
528
+ // Remove all feeds
529
+ if ( isset( $sbp_options['remove_all_feeds'] ) ) {
530
+ remove_action( 'wp_head', 'feed_links_extra', 3 ); // remove the feed links from the extra feeds such as category feeds
531
+ remove_action( 'wp_head', 'feed_links', 2 ); // remove the feed links from the general feeds: Post and Comment Feed
532
+ }
533
+
534
+ } // END public function sbp_junk_header_tags
535
+
536
+ } // END class Speed_Booster_Pack_Core
537
+
538
  } // END if(!class_exists('Speed_Booster_Pack_Core'))
inc/css-optimizer.php CHANGED
@@ -1,204 +1,204 @@
1
- <?php
2
-
3
- /*--------------------------------------------------------------------------------------------------------
4
- CSS OPTIMIZER - Generate Styles List
5
- ---------------------------------------------------------------------------------------------------------*/
6
-
7
- function sbp_generate_styles_list() {
8
-
9
- global $wp_styles;
10
-
11
- $list = array();
12
- if ( isset( $wp_styles->queue ) && is_array( $wp_styles->queue ) ) {
13
- foreach ( $wp_styles->queue as $style ) {
14
- if ( is_css_excluded( $style ) ) {
15
- // load excluded stylesheet in render-blocking manner
16
- } else {
17
- $list[] = array(
18
- 'src' => $wp_styles->registered[$style]->src,
19
- 'media' => $wp_styles->registered[$style]->args
20
- );
21
- }
22
- }
23
- }
24
- return $list;
25
-
26
- } // END function sbp_generate_styles_list
27
-
28
-
29
- /*--------------------------------------------------------------------------------------------------------
30
- CSS OPTIMIZER - Deregister all styles
31
- ---------------------------------------------------------------------------------------------------------*/
32
-
33
- function sbp_unregister_styles() {
34
-
35
- global $wp_styles;
36
-
37
- if ( isset( $wp_styles->queue ) && is_array( $wp_styles->queue ) ) {
38
-
39
- foreach ( $wp_styles->queue as $style ){
40
- if ( is_css_excluded( $style )) {
41
- continue;
42
- }
43
-
44
- wp_dequeue_style( $style );
45
- wp_deregister_style( $style );
46
- }
47
- }
48
-
49
- } // END function sbp_unregister_styles
50
-
51
-
52
- /*--------------------------------------------------------------------------------------------------------
53
- CSS OPTIMIZER - Generate inline styles
54
- ---------------------------------------------------------------------------------------------------------*/
55
-
56
- function sbp_inline_css( $url, $minify = true ) {
57
-
58
- $base_url = get_bloginfo( 'wpurl' );
59
- $path = false;
60
-
61
- if ( strpos( $url, $base_url ) !== FALSE ) {
62
-
63
- $path = str_replace( $base_url,rtrim(ABSPATH,'/'),$url );
64
-
65
- } elseif ( $url[0]=='/' && $url[1]!='/' ) {
66
-
67
- $path = rtrim( ABSPATH,'/' ).$url;
68
- $url = $base_url.$url;
69
- }
70
-
71
- if ( $path && file_exists( $path ) ){
72
-
73
- $css = file_get_contents( $path );
74
-
75
- if ( $minify ){
76
- $css = sbp_minify_css( $css );
77
- }
78
-
79
- $css = sbp_rebuilding_css_urls( $css, $url );
80
-
81
- echo $css;
82
- return true;
83
-
84
- } else {
85
-
86
- return false;
87
- }
88
-
89
- } // END function sbp_inline_css
90
-
91
-
92
- /*--------------------------------------------------------------------------------------------------------
93
- CSS OPTIMIZER - Rebuilding CSS URLs
94
- ---------------------------------------------------------------------------------------------------------*/
95
-
96
- function sbp_rebuilding_css_urls($css,$url){
97
- $css_dir = substr($url,0,strrpos($url,'/'));
98
- $css = preg_replace("/url\((?!data:)['\"]?([^\/][^'\"\)]*)['\"]?\)/i","url({$css_dir}/$1)",$css);
99
-
100
- return $css;
101
- }
102
-
103
-
104
- /*--------------------------------------------------------------------------------------------------------
105
- CSS OPTIMIZER - Minify All CSS
106
- ---------------------------------------------------------------------------------------------------------*/
107
-
108
-
109
- function sbp_minify_css( $css ) {
110
-
111
- $css = sbp_remove_multiline_comments( $css );
112
- $css = str_replace(array("\t","\n","\r"),' ',$css);
113
- $cnt = 1;
114
-
115
- while ($cnt>0) {
116
- $css = str_replace(' ',' ',$css,$cnt);
117
- }
118
-
119
- $css = str_replace(array(' {','{ '),'{',$css);
120
- $css = str_replace(array(' }','} ',';}'),'}',$css);
121
- $css = str_replace(': ',':',$css);
122
- $css = str_replace('; ',';',$css);
123
- $css = str_replace(', ',',',$css);
124
-
125
- return $css;
126
- }
127
-
128
-
129
- /*--------------------------------------------------------------------------------------------------------
130
- CSS OPTIMIZER - Remove multi-line comments from CSS
131
- ---------------------------------------------------------------------------------------------------------*/
132
-
133
- function sbp_remove_multiline_comments( $code,$method=0 ) {
134
-
135
- switch ( $method ) {
136
- case 1:{
137
-
138
- $code = preg_replace( '/\s*(?!<\")\/\*[^\*]+\*\/(?!\")\s*/' , '' , $code );
139
- break;
140
- }
141
-
142
- case 0:
143
-
144
- default :{
145
-
146
- $open_pos = strpos($code,'/*');
147
- while ( $open_pos !== FALSE ){
148
- $close_pos = strpos($code,'*/',$open_pos)+2;
149
- if ($close_pos){
150
- $code = substr($code,0,$open_pos) . substr($code,$close_pos);
151
- } else {
152
- $code = substr($code,0,$open_pos);
153
- }
154
-
155
- $open_pos = strpos($code,'/*',$open_pos);
156
- }
157
-
158
- break;
159
- }
160
- }
161
-
162
- return $code;
163
- }
164
-
165
-
166
- /*--------------------------------------------------------------------------------------------------------
167
- CSS OPTIMIZER - get stylesheets exception list
168
- ---------------------------------------------------------------------------------------------------------*/
169
-
170
- function sbp_style_exceptions() {
171
-
172
- $array = explode("\n",get_option( 'sbp_css_exceptions' ));
173
- $css_exceptions = array();
174
- foreach ($array as $key=>$ex) {
175
- if (trim($ex)!=''){
176
- $css_exceptions[$key] = trim($ex);
177
- }
178
- }
179
-
180
- return $css_exceptions;
181
- }
182
-
183
-
184
- /*--------------------------------------------------------------------------------------------------------
185
- CSS OPTIMIZER - get stylesheets exception names
186
- ---------------------------------------------------------------------------------------------------------*/
187
-
188
- function is_css_excluded( $file ) {
189
- global $wp_styles;
190
- $css_exceptions = sbp_style_exceptions();
191
-
192
- if( is_string( $file ) && isset( $wp_styles->registered[$file] ) ) {
193
- $filename = $file;
194
- $file = $wp_styles->registered[$file];
195
- }
196
-
197
- foreach ( $css_exceptions as $ex ){
198
- if ( $file->handle==$ex || (strpos($ex,'.')!==FALSE && strpos($file->src,$ex)!==FALSE) ){
199
- return true;
200
- }
201
- }
202
-
203
- return false;
204
  }
1
+ <?php
2
+
3
+ /*--------------------------------------------------------------------------------------------------------
4
+ CSS OPTIMIZER - Generate Styles List
5
+ ---------------------------------------------------------------------------------------------------------*/
6
+
7
+ function sbp_generate_styles_list() {
8
+
9
+ global $wp_styles;
10
+
11
+ $list = array();
12
+ if ( isset( $wp_styles->queue ) && is_array( $wp_styles->queue ) ) {
13
+ foreach ( $wp_styles->queue as $style ) {
14
+ if ( is_css_excluded( $style ) ) {
15
+ // load excluded stylesheet in render-blocking manner
16
+ } else {
17
+ $list[] = array(
18
+ 'src' => $wp_styles->registered[$style]->src,
19
+ 'media' => $wp_styles->registered[$style]->args
20
+ );
21
+ }
22
+ }
23
+ }
24
+ return $list;
25
+
26
+ } // END function sbp_generate_styles_list
27
+
28
+
29
+ /*--------------------------------------------------------------------------------------------------------
30
+ CSS OPTIMIZER - Deregister all styles
31
+ ---------------------------------------------------------------------------------------------------------*/
32
+
33
+ function sbp_unregister_styles() {
34
+
35
+ global $wp_styles;
36
+
37
+ if ( isset( $wp_styles->queue ) && is_array( $wp_styles->queue ) ) {
38
+
39
+ foreach ( $wp_styles->queue as $style ){
40
+ if ( is_css_excluded( $style )) {
41
+ continue;
42
+ }
43
+
44
+ wp_dequeue_style( $style );
45
+ wp_deregister_style( $style );
46
+ }
47
+ }
48
+
49
+ } // END function sbp_unregister_styles
50
+
51
+
52
+ /*--------------------------------------------------------------------------------------------------------
53
+ CSS OPTIMIZER - Generate inline styles
54
+ ---------------------------------------------------------------------------------------------------------*/
55
+
56
+ function sbp_inline_css( $url, $minify = true ) {
57
+
58
+ $base_url = get_bloginfo( 'wpurl' );
59
+ $path = false;
60
+
61
+ if ( strpos( $url, $base_url ) !== FALSE ) {
62
+
63
+ $path = str_replace( $base_url,rtrim(ABSPATH,'/'),$url );
64
+
65
+ } elseif ( $url[0]=='/' && $url[1]!='/' ) {
66
+
67
+ $path = rtrim( ABSPATH,'/' ).$url;
68
+ $url = $base_url.$url;
69
+ }
70
+
71
+ if ( $path && file_exists( $path ) ){
72
+
73
+ $css = file_get_contents( $path );
74
+
75
+ if ( $minify ){
76
+ $css = sbp_minify_css( $css );
77
+ }
78
+
79
+ $css = sbp_rebuilding_css_urls( $css, $url );
80
+
81
+ echo $css;
82
+ return true;
83
+
84
+ } else {
85
+
86
+ return false;
87
+ }
88
+
89
+ } // END function sbp_inline_css
90
+
91
+
92
+ /*--------------------------------------------------------------------------------------------------------
93
+ CSS OPTIMIZER - Rebuilding CSS URLs
94
+ ---------------------------------------------------------------------------------------------------------*/
95
+
96
+ function sbp_rebuilding_css_urls($css,$url){
97
+ $css_dir = substr($url,0,strrpos($url,'/'));
98
+ $css = preg_replace("/url\((?!data:)['\"]?([^\/][^'\"\)]*)['\"]?\)/i","url({$css_dir}/$1)",$css);
99
+
100
+ return $css;
101
+ }
102
+
103
+
104
+ /*--------------------------------------------------------------------------------------------------------
105
+ CSS OPTIMIZER - Minify All CSS
106
+ ---------------------------------------------------------------------------------------------------------*/
107
+
108
+
109
+ function sbp_minify_css( $css ) {
110
+
111
+ $css = sbp_remove_multiline_comments( $css );
112
+ $css = str_replace(array("\t","\n","\r"),' ',$css);
113
+ $cnt = 1;
114
+
115
+ while ($cnt>0) {
116
+ $css = str_replace(' ',' ',$css,$cnt);
117
+ }
118
+
119
+ $css = str_replace(array(' {','{ '),'{',$css);
120
+ $css = str_replace(array(' }','} ',';}'),'}',$css);
121
+ $css = str_replace(': ',':',$css);
122
+ $css = str_replace('; ',';',$css);
123
+ $css = str_replace(', ',',',$css);
124
+
125
+ return $css;
126
+ }
127
+
128
+
129
+ /*--------------------------------------------------------------------------------------------------------
130
+ CSS OPTIMIZER - Remove multi-line comments from CSS
131
+ ---------------------------------------------------------------------------------------------------------*/
132
+
133
+ function sbp_remove_multiline_comments( $code,$method=0 ) {
134
+
135
+ switch ( $method ) {
136
+ case 1:{
137
+
138
+ $code = preg_replace( '/\s*(?!<\")\/\*[^\*]+\*\/(?!\")\s*/' , '' , $code );
139
+ break;
140
+ }
141
+
142
+ case 0:
143
+
144
+ default :{
145
+
146
+ $open_pos = strpos($code,'/*');
147
+ while ( $open_pos !== FALSE ){
148
+ $close_pos = strpos($code,'*/',$open_pos)+2;
149
+ if ($close_pos){
150
+ $code = substr($code,0,$open_pos) . substr($code,$close_pos);
151
+ } else {
152
+ $code = substr($code,0,$open_pos);
153
+ }
154
+
155
+ $open_pos = strpos($code,'/*',$open_pos);
156
+ }
157
+
158
+ break;
159
+ }
160
+ }
161
+
162
+ return $code;
163
+ }
164
+
165
+
166
+ /*--------------------------------------------------------------------------------------------------------
167
+ CSS OPTIMIZER - get stylesheets exception list
168
+ ---------------------------------------------------------------------------------------------------------*/
169
+
170
+ function sbp_style_exceptions() {
171
+
172
+ $array = explode("\n",get_option( 'sbp_css_exceptions' ));
173
+ $css_exceptions = array();
174
+ foreach ($array as $key=>$ex) {
175
+ if (trim($ex)!=''){
176
+ $css_exceptions[$key] = trim($ex);
177
+ }
178
+ }
179
+
180
+ return $css_exceptions;
181
+ }
182
+
183
+
184
+ /*--------------------------------------------------------------------------------------------------------
185
+ CSS OPTIMIZER - get stylesheets exception names
186
+ ---------------------------------------------------------------------------------------------------------*/
187
+
188
+ function is_css_excluded( $file ) {
189
+ global $wp_styles;
190
+ $css_exceptions = sbp_style_exceptions();
191
+
192
+ if( is_string( $file ) && isset( $wp_styles->registered[$file] ) ) {
193
+ $filename = $file;
194
+ $file = $wp_styles->registered[$file];
195
+ }
196
+
197
+ foreach ( $css_exceptions as $ex ){
198
+ if ( $file->handle==$ex || (strpos($ex,'.')!==FALSE && strpos($file->src,$ex)!==FALSE) ){
199
+ return true;
200
+ }
201
+ }
202
+
203
+ return false;
204
  }
inc/images/handshake.png ADDED
Binary file
inc/js/jquery.unveil.js CHANGED
@@ -1,72 +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
  );
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 CHANGED
@@ -1,12 +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()});
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 CHANGED
@@ -1,91 +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
  };
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 CHANGED
@@ -1,8 +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)};
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)};
inc/js/post-tabs-edit.js CHANGED
@@ -1,9 +1,9 @@
1
- jQuery(document).on('ready', function($){
2
- postboxes.save_state = function(){
3
- return;
4
- };
5
- postboxes.save_order = function(){
6
- return;
7
- };
8
- postboxes.add_postbox_toggles();
9
  });
1
+ jQuery(document).on('ready', function($){
2
+ postboxes.save_state = function(){
3
+ return;
4
+ };
5
+ postboxes.save_order = function(){
6
+ return;
7
+ };
8
+ postboxes.add_postbox_toggles();
9
  });
inc/js/sbp-hide.js CHANGED
@@ -1,16 +1,16 @@
1
- if (typeof (jQuery) != 'undefined') {
2
- jQuery(document).ready(function () {
3
- validate();
4
- jQuery('input').change(function () {
5
- validate();
6
- })
7
- });
8
-
9
- function validate() {
10
- if (jQuery('input[id=sbp_css_async]').is(':checked')) {
11
- jQuery('#sbp-css-content').show();
12
- } else {
13
- jQuery('#sbp-css-content').hide();
14
- }
15
- }
16
  }
1
+ if (typeof (jQuery) != 'undefined') {
2
+ jQuery(document).ready(function () {
3
+ validate();
4
+ jQuery('input').change(function () {
5
+ validate();
6
+ })
7
+ });
8
+
9
+ function validate() {
10
+ if (jQuery('input[id=sbp_css_async]').is(':checked')) {
11
+ jQuery('#sbp-css-content').show();
12
+ } else {
13
+ jQuery('#sbp-css-content').hide();
14
+ }
15
+ }
16
  }
inc/js/sbp-slide.js CHANGED
@@ -1,13 +1,13 @@
1
- jQuery(document).ready(function () {
2
- jQuery(".sbp-slider").slider({
3
- value: jpegCompression,
4
- min: 0,
5
- max: 100,
6
- step: 1,
7
- slide: function (event, ui) {
8
- jQuery(".sbp-amount").val(ui.value);
9
- jQuery("#sbp_integer").val(ui.value);
10
- }
11
- });
12
- jQuery(".sbp-amount").val(jQuery(".sbp-slider").slider("value"));
13
  });
1
+ jQuery(document).ready(function () {
2
+ jQuery(".sbp-slider").slider({
3
+ value: jpegCompression,
4
+ min: 0,
5
+ max: 100,
6
+ step: 1,
7
+ slide: function (event, ui) {
8
+ jQuery(".sbp-amount").val(ui.value);
9
+ jQuery("#sbp_integer").val(ui.value);
10
+ }
11
+ });
12
+ jQuery(".sbp-amount").val(jQuery(".sbp-slider").slider("value"));
13
  });
inc/sbp-minifier.php CHANGED
@@ -1,120 +1,120 @@
1
- <?php
2
-
3
- /*--------------------------------------------------------------------------------------------------------
4
- MINIFIER - increase your page load speed by minifying JavaScript and HTML
5
- ---------------------------------------------------------------------------------------------------------*/
6
-
7
- class SBP_HTML_Minifier {
8
- // Minify settings
9
- protected $minify_css = true;
10
- protected $minify_js = true;
11
- protected $info_comment = true;
12
- protected $remove_comments = true;
13
-
14
- // Minify variables
15
- protected $html;
16
- public function __construct($html) {
17
- if (!empty($html)) {
18
- $this->parseHTML($html);
19
- }
20
- }
21
-
22
- public function __toString() {
23
- return $this->html;
24
- }
25
-
26
- protected function bottomComment($raw, $minified) {
27
- $raw = strlen($raw);
28
- $minified = strlen($minified);
29
- $savings = ($raw-$minified) / $raw * 100;
30
- $savings = round($savings, 2);
31
- return '<!--HTML minified, size saved '.$savings.'%. From '.$raw.' bytes, now '.$minified.' bytes-->';
32
- }
33
-
34
- protected function minifyHTML($html) {
35
- $pattern = '/<(?<script>script).*?<\/script\s*>|<(?<style>style).*?<\/style\s*>|<!(?<comment>--).*?-->|<(?<tag>[\/\w.:-]*)(?:".*?"|\'.*?\'|[^\'">]+)*>|(?<text>((<[^!\/\w.:-])?[^<]*)+)|/si';
36
- preg_match_all($pattern, $html, $matches, PREG_SET_ORDER);
37
- $overriding = false;
38
- $raw_tag = false;
39
- // Variable reused for output
40
- $html = '';
41
- foreach ($matches as $token) {
42
- $tag = (isset($token['tag'])) ? strtolower($token['tag']) : null;
43
-
44
- $content = $token[0];
45
-
46
- if (is_null($tag)) {
47
- if ( !empty($token['script']) ) {
48
- $strip = $this->minify_js;
49
- } else if ( !empty($token['style']) ) {
50
- $strip = $this->minify_css;
51
- } else if ($content == '<!--sbp-html-minifier no minifier-->'){
52
- $overriding = !$overriding;
53
-
54
- // Don't print the comments
55
- continue;
56
- } else if ($this->remove_comments){
57
- if (!$overriding && $raw_tag != 'textarea'){
58
- // Remove any HTML comments, except MSIE conditional comments
59
- $content = preg_replace('/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->).)*-->/s', '', $content);
60
- }
61
- }
62
- }else{
63
- if ($tag == 'pre' || $tag == 'textarea'){
64
- $raw_tag = $tag;
65
- }else if ($tag == '/pre' || $tag == '/textarea'){
66
- $raw_tag = false;
67
- }else{
68
- if ($raw_tag || $overriding){
69
- $strip = false;
70
- }else{
71
- $strip = true;
72
- // Remove all empty attributes, except action, alt, content, src
73
- $content = preg_replace('/(\s+)(\w++(?<!\baction|\balt|\bcontent|\bsrc)="")/', '$1', $content);
74
- // Remove all space before the end of self-closing XHTML tags
75
- // JavaScript excluded
76
- $content = str_replace(' />', '/>', $content);
77
- }
78
- }
79
- }
80
-
81
- if ($strip){
82
- $content = $this->removeWhiteSpace($content);
83
- }
84
-
85
- $html .= $content;
86
- }
87
-
88
- return $html;
89
- }
90
-
91
- public function parseHTML($html){
92
- $this->html = $this->minifyHTML($html);
93
-
94
- if ($this->info_comment){
95
- $this->html .= "\n" . $this->bottomComment($html, $this->html);
96
- }
97
- }
98
-
99
- protected function removeWhiteSpace($str){
100
- $str = str_replace("\t", ' ', $str);
101
- $str = str_replace("\n", '', $str);
102
- $str = str_replace("\r", '', $str);
103
-
104
- while (stristr($str, ' ')){
105
- $str = str_replace(' ', ' ', $str);
106
- }
107
-
108
- return $str;
109
- }
110
- }
111
-
112
- function sbp_html_minifier_finish($html){
113
- return new SBP_HTML_Minifier($html);
114
- }
115
-
116
- function sbp_html_minifier_start(){
117
- ob_start('sbp_html_minifier_finish');
118
- }
119
-
120
  add_action('get_header', 'sbp_html_minifier_start');
1
+ <?php
2
+
3
+ /*--------------------------------------------------------------------------------------------------------
4
+ MINIFIER - increase your page load speed by minifying JavaScript and HTML
5
+ ---------------------------------------------------------------------------------------------------------*/
6
+
7
+ class SBP_HTML_Minifier {
8
+ // Minify settings
9
+ protected $minify_css = true;
10
+ protected $minify_js = true;
11
+ protected $info_comment = true;
12
+ protected $remove_comments = true;
13
+
14
+ // Minify variables
15
+ protected $html;
16
+ public function __construct($html) {
17
+ if (!empty($html)) {
18
+ $this->parseHTML($html);
19
+ }
20
+ }
21
+
22
+ public function __toString() {
23
+ return $this->html;
24
+ }
25
+
26
+ protected function bottomComment($raw, $minified) {
27
+ $raw = strlen($raw);
28
+ $minified = strlen($minified);
29
+ $savings = ($raw-$minified) / $raw * 100;
30
+ $savings = round($savings, 2);
31
+ return '<!--HTML minified, size saved '.$savings.'%. From '.$raw.' bytes, now '.$minified.' bytes-->';
32
+ }
33
+
34
+ protected function minifyHTML($html) {
35
+ $pattern = '/<(?<script>script).*?<\/script\s*>|<(?<style>style).*?<\/style\s*>|<!(?<comment>--).*?-->|<(?<tag>[\/\w.:-]*)(?:".*?"|\'.*?\'|[^\'">]+)*>|(?<text>((<[^!\/\w.:-])?[^<]*)+)|/si';
36
+ preg_match_all($pattern, $html, $matches, PREG_SET_ORDER);
37
+ $overriding = false;
38
+ $raw_tag = false;
39
+ // Variable reused for output
40
+ $html = '';
41
+ foreach ($matches as $token) {
42
+ $tag = (isset($token['tag'])) ? strtolower($token['tag']) : null;
43
+
44
+ $content = $token[0];
45
+
46
+ if (is_null($tag)) {
47
+ if ( !empty($token['script']) ) {
48
+ $strip = $this->minify_js;
49
+ } else if ( !empty($token['style']) ) {
50
+ $strip = $this->minify_css;
51
+ } else if ($content == '<!--sbp-html-minifier no minifier-->'){
52
+ $overriding = !$overriding;
53
+
54
+ // Don't print the comments
55
+ continue;
56
+ } else if ($this->remove_comments){
57
+ if (!$overriding && $raw_tag != 'textarea'){
58
+ // Remove any HTML comments, except MSIE conditional comments
59
+ $content = preg_replace('/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->).)*-->/s', '', $content);
60
+ }
61
+ }
62
+ }else{
63
+ if ($tag == 'pre' || $tag == 'textarea'){
64
+ $raw_tag = $tag;
65
+ }else if ($tag == '/pre' || $tag == '/textarea'){
66
+ $raw_tag = false;
67
+ }else{
68
+ if ($raw_tag || $overriding){
69
+ $strip = false;
70
+ }else{
71
+ $strip = true;
72
+ // Remove all empty attributes, except action, alt, content, src
73
+ $content = preg_replace('/(\s+)(\w++(?<!\baction|\balt|\bcontent|\bsrc)="")/', '$1', $content);
74
+ // Remove all space before the end of self-closing XHTML tags
75
+ // JavaScript excluded
76
+ $content = str_replace(' />', '/>', $content);
77
+ }
78
+ }
79
+ }
80
+
81
+ if ($strip){
82
+ $content = $this->removeWhiteSpace($content);
83
+ }
84
+
85
+ $html .= $content;
86
+ }
87
+
88
+ return $html;
89
+ }
90
+
91
+ public function parseHTML($html){
92
+ $this->html = $this->minifyHTML($html);
93
+
94
+ if ($this->info_comment){
95
+ $this->html .= "\n" . $this->bottomComment($html, $this->html);
96
+ }
97
+ }
98
+
99
+ protected function removeWhiteSpace($str){
100
+ $str = str_replace("\t", ' ', $str);
101
+ $str = str_replace("\n", '', $str);
102
+ $str = str_replace("\r", '', $str);
103
+
104
+ while (stristr($str, ' ')){
105
+ $str = str_replace(' ', ' ', $str);
106
+ }
107
+
108
+ return $str;
109
+ }
110
+ }
111
+
112
+ function sbp_html_minifier_finish($html){
113
+ return new SBP_HTML_Minifier($html);
114
+ }
115
+
116
+ function sbp_html_minifier_start(){
117
+ ob_start('sbp_html_minifier_finish');
118
+ }
119
+
120
  add_action('get_header', 'sbp_html_minifier_start');
inc/settings.php CHANGED
@@ -1,324 +1,324 @@
1
- <?php
2
-
3
- if( !class_exists( 'Speed_Booster_Pack_Options' ) ) {
4
-
5
- class Speed_Booster_Pack_Options {
6
-
7
- private $sbp_options;
8
- /*--------------------------------------------------------------------------------------------------------
9
- Construct the plugin object
10
- ---------------------------------------------------------------------------------------------------------*/
11
-
12
- public function __construct() {
13
-
14
- add_action( 'admin_init', array( $this, 'sbp_admin_init' ) );
15
- add_action( 'admin_menu', array( $this, 'sbp_add_menu' ) );
16
- add_action('wp_footer', array( $this, 'sbp_detected_scripts_handle'), 999 );
17
- add_action('wp_footer', array( $this, 'sbp_detected_scripts_src'), 999 );
18
- add_action('wp_footer', array( $this, 'sbp_detected_styles_handle'), 999 );
19
-
20
- } // END public function __construct
21
-
22
-
23
- public function sbp_admin_init() {
24
-
25
- register_setting( 'speed_booster_settings_group', 'sbp_settings' );
26
- register_setting( 'speed_booster_settings_group', 'sbp_integer' );
27
- register_setting( 'speed_booster_settings_group', 'sbp_css_exceptions' );
28
- register_setting( 'speed_booster_settings_group', 'sbp_sanitize');
29
-
30
- register_setting( 'speed_booster_settings_group', 'sbp_js_footer_exceptions1' );
31
- register_setting( 'speed_booster_settings_group', 'sbp_js_footer_exceptions2' );
32
- register_setting( 'speed_booster_settings_group', 'sbp_js_footer_exceptions3' );
33
- register_setting( 'speed_booster_settings_group', 'sbp_js_footer_exceptions4' );
34
-
35
- register_setting( 'speed_booster_settings_group', 'sbp_head_html_script1' );
36
- register_setting( 'speed_booster_settings_group', 'sbp_head_html_script2' );
37
- register_setting( 'speed_booster_settings_group', 'sbp_head_html_script3' );
38
- register_setting( 'speed_booster_settings_group', 'sbp_head_html_script4' );
39
-
40
- register_setting( 'speed_booster_settings_group', 'sbp_defer_exceptions1' );
41
- register_setting( 'speed_booster_settings_group', 'sbp_defer_exceptions2' );
42
- register_setting( 'speed_booster_settings_group', 'sbp_defer_exceptions3' );
43
- register_setting( 'speed_booster_settings_group', 'sbp_defer_exceptions4' );
44
-
45
- } // END public function admin_init
46
-
47
-
48
- /*--------------------------------------------------------------------------------------------------------
49
- Get enqueued scripts handles
50
- ---------------------------------------------------------------------------------------------------------*/
51
-
52
- public function sbp_detected_scripts_handle( $handles = array() ) {
53
-
54
- global $wp_scripts;
55
-
56
-
57
- // scripts
58
- foreach ( $wp_scripts -> registered as $registered )
59
- $script_urls[ $registered -> handle ] = $registered -> src;
60
-
61
- // if empty
62
- if ( empty( $handles ) ) {
63
- $handles = array_merge( $wp_scripts -> queue );
64
- array_values( $handles );
65
- }
66
- // output of values
67
- $get_enqueued_scripts_handle = '';
68
- foreach ( $handles as $handle ) {
69
- if ( ! empty( $script_urls[ $handle ] ) )
70
- $get_enqueued_scripts_handle .= $handle . '<br />';
71
-
72
- }
73
-
74
- update_option( 'all_theme_scripts_handle', $get_enqueued_scripts_handle );
75
-
76
- }
77
-
78
- /*--------------------------------------------------------------------------------------------------------
79
- Get enqueued scripts src path
80
- ---------------------------------------------------------------------------------------------------------*/
81
-
82
- public function sbp_detected_scripts_src( $handles = array() ) {
83
-
84
- global $wp_scripts;
85
-
86
- // scripts
87
- foreach ( $wp_scripts -> registered as $registered )
88
- $script_urls[ $registered -> handle ] = $registered -> src;
89
-
90
- // if empty
91
- if ( empty( $handles ) ) {
92
- $handles = array_merge( $wp_scripts -> queue );
93
- array_values( $handles );
94
- }
95
- // output of values
96
- $get_enqueued_scripts_src = '';
97
- foreach ( $handles as $handle ) {
98
- if ( ! empty( $script_urls[ $handle ] ) )
99
- $get_enqueued_scripts_src .= $script_urls[ $handle ] . '<br />';
100
-
101
- }
102
-
103
- update_option( 'all_theme_scripts_src', $get_enqueued_scripts_src );
104
-
105
- }
106
-
107
-
108
- /*--------------------------------------------------------------------------------------------------------
109
- Get enqueued style handles
110
- ---------------------------------------------------------------------------------------------------------*/
111
-
112
- public function sbp_detected_styles_handle( $handles = array() ) {
113
-
114
- global $wp_styles;
115
-
116
-
117
- // scripts
118
- foreach ( $wp_styles -> registered as $registered )
119
- $style_urls[ $registered -> handle ] = $registered -> src;
120
-
121
- // if empty
122
- if ( empty( $handles ) ) {
123
- $handles = array_merge( $wp_styles -> queue );
124
- array_values( $handles );
125
- }
126
- // output of values
127
- $get_enqueued_styles_handle = '';
128
- foreach ( $handles as $handle ) {
129
- if ( ! empty( $style_urls[ $handle ] ) )
130
- $get_enqueued_styles_handle .= $handle . '<br />';
131
-
132
- }
133
-
134
- update_option( 'all_theme_styles_handle', $get_enqueued_styles_handle );
135
-
136
- }
137
-
138
-
139
- /*--------------------------------------------------------------------------------------------------------
140
- Sanitize Options
141
- ---------------------------------------------------------------------------------------------------------*/
142
-
143
- public function sbp_sanitize( $input ) {
144
-
145
- $output = array();
146
-
147
- foreach( $input as $key => $tigu ) {
148
-
149
- switch( $key ) {
150
- case 'sbp_js_footer_exceptions1':
151
- $output[$key] = wp_filter_post_kses( $tigu );
152
- break;
153
- case 'sbp_js_footer_exceptions2':
154
- $output[$key] = wp_filter_post_kses( $tigu );
155
- break;
156
- case 'sbp_js_footer_exceptions3':
157
- $output[$key] = wp_filter_post_kses( $tigu );
158
- break;
159
- case 'sbp_js_footer_exceptions4':
160
- $output[$key] = wp_filter_post_kses( $tigu );
161
- break;
162
- case 'sbp_head_html_script1':
163
- $output[$key] = wp_filter_post_kses( $tigu );
164
- break;
165
- case 'sbp_head_html_script2':
166
- $output[$key] = wp_kses_stripslashes( $tigu );
167
- break;
168
- case 'sbp_head_html_script3':
169
- $output[$key] = wp_kses_stripslashes( $tigu );
170
- break;
171
- case 'sbp_head_html_script4':
172
- $output[$key] = wp_kses_stripslashes( $tigu );
173
- break;
174
-
175
- }
176
-
177
- }
178
-
179
- return $output;
180
- }
181
-
182
-
183
- /*--------------------------------------------------------------------------------------------------------
184
- // Add a page to manage the plugin's settings
185
- ---------------------------------------------------------------------------------------------------------*/
186
-
187
- public function sbp_add_menu() {
188
-
189
- global $sbp_settings_page;
190
- $sbp_settings_page = add_options_page( 'Speed Booster Options', 'Speed Booster Pack', 'manage_options', 'sbp-options', array( $this, 'sbp_plugin_settings_page' ) );
191
-
192
- } // END public function add_menu()
193
-
194
-
195
- public function sbp_plugin_settings_page() {
196
-
197
- if( !current_user_can( 'manage_options' ) ) {
198
- wp_die(__( 'You do not have sufficient permissions to access this page.' ));
199
- }
200
-
201
-
202
- /*--------------------------------------------------------------------------------------------------------
203
- Global Variables used on options HTML page
204
- ---------------------------------------------------------------------------------------------------------*/
205
-
206
- global $sbp_options;
207
-
208
- // Global variables used in plugin options page
209
- $url = get_site_url();
210
- $response = wp_remote_get( $url, array() );
211
- $page_time = get_option( 'sbp_page_time' );
212
- $page_queries = get_option( 'sbp_page_queries' );
213
- $get_enqueued_scripts_handle = get_option( 'all_theme_scripts_handle' );
214
- $get_enqueued_scripts_src = get_option( 'all_theme_scripts_src' );
215
- $get_enqueued_styles_handle = get_option( 'all_theme_styles_handle' );
216
-
217
- // fallback for image compression integer
218
- if ( get_option( 'sbp_integer' ) ) {
219
- $this->image_compression = get_option( 'sbp_integer' );
220
- } else {
221
- $this->image_compression = 90;
222
- }
223
- $this->plugin_url = plugin_dir_url(dirname(__FILE__));
224
-
225
- // fallback for stylesheets exception handle
226
- if ( get_option( 'sbp_css_exceptions' ) ) {
227
- $css_exceptions = get_option( 'sbp_css_exceptions' );
228
- } else {
229
- $css_exceptions = '' ;
230
- }
231
-
232
- /*--------------------------------------------------------------------------------------------------------*/
233
-
234
- if ( get_option( 'sbp_js_footer_exceptions1' ) ) {
235
- $js_footer_exceptions1 = get_option( 'sbp_js_footer_exceptions1' );
236
- } else {
237
- $js_footer_exceptions1 = '' ;
238
- }
239
-
240
- if ( get_option( 'sbp_js_footer_exceptions2' ) ) {
241
- $js_footer_exceptions2 = get_option( 'sbp_js_footer_exceptions2' );
242
- } else {
243
- $js_footer_exceptions2 = '' ;
244
- }
245
-
246
- if ( get_option( 'sbp_js_footer_exceptions3' ) ) {
247
- $js_footer_exceptions3 = get_option( 'sbp_js_footer_exceptions3' );
248
- } else {
249
- $js_footer_exceptions3 = '' ;
250
- }
251
-
252
- if ( get_option( 'sbp_js_footer_exceptions4' ) ) {
253
- $js_footer_exceptions4 = get_option( 'sbp_js_footer_exceptions4' );
254
- } else {
255
- $js_footer_exceptions4 = '' ;
256
- }
257
-
258
- /*--------------------------------------------------------------------------------------------------------*/
259
-
260
- if ( get_option( 'sbp_head_html_script1' ) ) {
261
- $sbp_html_script1 = get_option( 'sbp_head_html_script1' );
262
- } else {
263
- $sbp_html_script1 = '' ;
264
- }
265
-
266
- if ( get_option( 'sbp_head_html_script2' ) ) {
267
- $sbp_html_script2 = get_option( 'sbp_head_html_script2' );
268
- } else {
269
- $sbp_html_script2 = '' ;
270
- }
271
-
272
- if ( get_option( 'sbp_head_html_script3' ) ) {
273
- $sbp_html_script3 = get_option( 'sbp_head_html_script3' );
274
- } else {
275
- $sbp_html_script3 = '' ;
276
- }
277
-
278
- if ( get_option( 'sbp_head_html_script4' ) ) {
279
- $sbp_html_script4 = get_option( 'sbp_head_html_script4' );
280
- } else {
281
- $sbp_html_script4 = '' ;
282
- }
283
-
284
- /*--------------------------------------------------------------------------------------------------------*/
285
-
286
- if ( get_option( 'sbp_defer_exceptions1' ) ) {
287
- $defer_exceptions1 = get_option( 'sbp_defer_exceptions1' );
288
- } else {
289
- $defer_exceptions1 = '' ;
290
- }
291
-
292
- if ( get_option( 'sbp_defer_exceptions2' ) ) {
293
- $defer_exceptions2 = get_option( 'sbp_defer_exceptions2' );
294
- } else {
295
- $defer_exceptions2 = '' ;
296
- }
297
-
298
- if ( get_option( 'sbp_defer_exceptions3' ) ) {
299
- $defer_exceptions3 = get_option( 'sbp_defer_exceptions3' );
300
- } else {
301
- $defer_exceptions3 = '' ;
302
- }
303
-
304
- if ( get_option( 'sbp_defer_exceptions4' ) ) {
305
- $defer_exceptions4 = get_option( 'sbp_defer_exceptions4' );
306
- } else {
307
- $defer_exceptions4 = '' ;
308
- }
309
-
310
- /*--------------------------------------------------------------------------------------------------------*/
311
-
312
- // Render the plugin options page HTML
313
- include( SPEED_BOOSTER_PACK_PATH . 'css/dynamic-css.php' );
314
-
315
- // Render the plugin options page HTML
316
- include( SPEED_BOOSTER_PACK_PATH . 'inc/template/options.php' );
317
-
318
- } // END public function sbp_plugin_settings_page()
319
-
320
-
321
-
322
- } // END class Speed_Booster_Pack_Options
323
-
324
- } // END if(!class_exists('Speed_Booster_Pack_Options'))
1
+ <?php
2
+
3
+ if( !class_exists( 'Speed_Booster_Pack_Options' ) ) {
4
+
5
+ class Speed_Booster_Pack_Options {
6
+
7
+ private $sbp_options;
8
+ /*--------------------------------------------------------------------------------------------------------
9
+ Construct the plugin object
10
+ ---------------------------------------------------------------------------------------------------------*/
11
+
12
+ public function __construct() {
13
+
14
+ add_action( 'admin_init', array( $this, 'sbp_admin_init' ) );
15
+ add_action( 'admin_menu', array( $this, 'sbp_add_menu' ) );
16
+ add_action('wp_footer', array( $this, 'sbp_detected_scripts_handle'), 999 );
17
+ add_action('wp_footer', array( $this, 'sbp_detected_scripts_src'), 999 );
18
+ add_action('wp_footer', array( $this, 'sbp_detected_styles_handle'), 999 );
19
+
20
+ } // END public function __construct
21
+
22
+
23
+ public function sbp_admin_init() {
24
+
25
+ register_setting( 'speed_booster_settings_group', 'sbp_settings' );
26
+ register_setting( 'speed_booster_settings_group', 'sbp_integer' );
27
+ register_setting( 'speed_booster_settings_group', 'sbp_css_exceptions' );
28
+ register_setting( 'speed_booster_settings_group', 'sbp_sanitize');
29
+
30
+ register_setting( 'speed_booster_settings_group', 'sbp_js_footer_exceptions1' );
31
+ register_setting( 'speed_booster_settings_group', 'sbp_js_footer_exceptions2' );
32
+ register_setting( 'speed_booster_settings_group', 'sbp_js_footer_exceptions3' );
33
+ register_setting( 'speed_booster_settings_group', 'sbp_js_footer_exceptions4' );
34
+
35
+ register_setting( 'speed_booster_settings_group', 'sbp_head_html_script1' );
36
+ register_setting( 'speed_booster_settings_group', 'sbp_head_html_script2' );
37
+ register_setting( 'speed_booster_settings_group', 'sbp_head_html_script3' );
38
+ register_setting( 'speed_booster_settings_group', 'sbp_head_html_script4' );
39
+
40
+ register_setting( 'speed_booster_settings_group', 'sbp_defer_exceptions1' );
41
+ register_setting( 'speed_booster_settings_group', 'sbp_defer_exceptions2' );
42
+ register_setting( 'speed_booster_settings_group', 'sbp_defer_exceptions3' );
43
+ register_setting( 'speed_booster_settings_group', 'sbp_defer_exceptions4' );
44
+
45
+ } // END public function admin_init
46
+
47
+
48
+ /*--------------------------------------------------------------------------------------------------------
49
+ Get enqueued scripts handles
50
+ ---------------------------------------------------------------------------------------------------------*/
51
+
52
+ public function sbp_detected_scripts_handle( $handles = array() ) {
53
+
54
+ global $wp_scripts;
55
+
56
+
57
+ // scripts
58
+ foreach ( $wp_scripts -> registered as $registered )
59
+ $script_urls[ $registered -> handle ] = $registered -> src;
60
+
61
+ // if empty
62
+ if ( empty( $handles ) ) {
63
+ $handles = array_merge( $wp_scripts -> queue );
64
+ array_values( $handles );
65
+ }
66
+ // output of values
67
+ $get_enqueued_scripts_handle = '';
68
+ foreach ( $handles as $handle ) {
69
+ if ( ! empty( $script_urls[ $handle ] ) )
70
+ $get_enqueued_scripts_handle .= $handle . '<br />';
71
+
72
+ }
73
+
74
+ update_option( 'all_theme_scripts_handle', $get_enqueued_scripts_handle );
75
+
76
+ }
77
+
78
+ /*--------------------------------------------------------------------------------------------------------
79
+ Get enqueued scripts src path
80
+ ---------------------------------------------------------------------------------------------------------*/
81
+
82
+ public function sbp_detected_scripts_src( $handles = array() ) {
83
+
84
+ global $wp_scripts;
85
+
86
+ // scripts
87
+ foreach ( $wp_scripts -> registered as $registered )
88
+ $script_urls[ $registered -> handle ] = $registered -> src;
89
+
90
+ // if empty
91
+ if ( empty( $handles ) ) {
92
+ $handles = array_merge( $wp_scripts -> queue );
93
+ array_values( $handles );
94
+ }
95
+ // output of values
96
+ $get_enqueued_scripts_src = '';
97
+ foreach ( $handles as $handle ) {
98
+ if ( ! empty( $script_urls[ $handle ] ) )
99
+ $get_enqueued_scripts_src .= $script_urls[ $handle ] . '<br />';
100
+
101
+ }
102
+
103
+ update_option( 'all_theme_scripts_src', $get_enqueued_scripts_src );
104
+
105
+ }
106
+
107
+
108
+ /*--------------------------------------------------------------------------------------------------------
109
+ Get enqueued style handles
110
+ ---------------------------------------------------------------------------------------------------------*/
111
+
112
+ public function sbp_detected_styles_handle( $handles = array() ) {
113
+
114
+ global $wp_styles;
115
+
116
+
117
+ // scripts
118
+ foreach ( $wp_styles -> registered as $registered )
119
+ $style_urls[ $registered -> handle ] = $registered -> src;
120
+
121
+ // if empty
122
+ if ( empty( $handles ) ) {
123
+ $handles = array_merge( $wp_styles -> queue );
124
+ array_values( $handles );
125
+ }
126
+ // output of values
127
+ $get_enqueued_styles_handle = '';
128
+ foreach ( $handles as $handle ) {
129
+ if ( ! empty( $style_urls[ $handle ] ) )
130
+ $get_enqueued_styles_handle .= $handle . '<br />';
131
+
132
+ }
133
+
134
+ update_option( 'all_theme_styles_handle', $get_enqueued_styles_handle );
135
+
136
+ }
137
+
138
+
139
+ /*--------------------------------------------------------------------------------------------------------
140
+ Sanitize Options
141
+ ---------------------------------------------------------------------------------------------------------*/
142
+
143
+ public function sbp_sanitize( $input ) {
144
+
145
+ $output = array();
146
+
147
+ foreach( $input as $key => $tigu ) {
148
+
149
+ switch( $key ) {
150
+ case 'sbp_js_footer_exceptions1':
151
+ $output[$key] = wp_filter_post_kses( $tigu );
152
+ break;
153
+ case 'sbp_js_footer_exceptions2':
154
+ $output[$key] = wp_filter_post_kses( $tigu );
155
+ break;
156
+ case 'sbp_js_footer_exceptions3':
157
+ $output[$key] = wp_filter_post_kses( $tigu );
158
+ break;
159
+ case 'sbp_js_footer_exceptions4':
160
+ $output[$key] = wp_filter_post_kses( $tigu );
161
+ break;
162
+ case 'sbp_head_html_script1':
163
+ $output[$key] = wp_filter_post_kses( $tigu );
164
+ break;
165
+ case 'sbp_head_html_script2':
166
+ $output[$key] = wp_kses_stripslashes( $tigu );
167
+ break;
168
+ case 'sbp_head_html_script3':
169
+ $output[$key] = wp_kses_stripslashes( $tigu );
170
+ break;
171
+ case 'sbp_head_html_script4':
172
+ $output[$key] = wp_kses_stripslashes( $tigu );
173
+ break;
174
+
175
+ }
176
+
177
+ }
178
+
179
+ return $output;
180
+ }
181
+
182
+
183
+ /*--------------------------------------------------------------------------------------------------------
184
+ // Add a page to manage the plugin's settings
185
+ ---------------------------------------------------------------------------------------------------------*/
186
+
187
+ public function sbp_add_menu() {
188
+
189
+ global $sbp_settings_page;
190
+ $sbp_settings_page = add_options_page( 'Speed Booster Options', 'Speed Booster Pack', 'manage_options', 'sbp-options', array( $this, 'sbp_plugin_settings_page' ) );
191
+
192
+ } // END public function add_menu()
193
+
194
+
195
+ public function sbp_plugin_settings_page() {
196
+
197
+ if( !current_user_can( 'manage_options' ) ) {
198
+ wp_die(__( 'You do not have sufficient permissions to access this page.' ));
199
+ }
200
+
201
+
202
+ /*--------------------------------------------------------------------------------------------------------
203
+ Global Variables used on options HTML page
204
+ ---------------------------------------------------------------------------------------------------------*/
205
+
206
+ global $sbp_options;
207
+
208
+ // Global variables used in plugin options page
209
+ $url = get_site_url();
210
+ $response = wp_remote_get( $url, array() );
211
+ $page_time = get_option( 'sbp_page_time' );
212
+ $page_queries = get_option( 'sbp_page_queries' );
213
+ $get_enqueued_scripts_handle = get_option( 'all_theme_scripts_handle' );
214
+ $get_enqueued_scripts_src = get_option( 'all_theme_scripts_src' );
215
+ $get_enqueued_styles_handle = get_option( 'all_theme_styles_handle' );
216
+
217
+ // fallback for image compression integer
218
+ if ( get_option( 'sbp_integer' ) ) {
219
+ $this->image_compression = get_option( 'sbp_integer' );
220
+ } else {
221
+ $this->image_compression = 90;
222
+ }
223
+ $this->plugin_url = plugin_dir_url(dirname(__FILE__));
224
+
225
+ // fallback for stylesheets exception handle
226
+ if ( get_option( 'sbp_css_exceptions' ) ) {
227
+ $css_exceptions = get_option( 'sbp_css_exceptions' );
228
+ } else {
229
+ $css_exceptions = '' ;
230
+ }
231
+
232
+ /*--------------------------------------------------------------------------------------------------------*/
233
+
234
+ if ( get_option( 'sbp_js_footer_exceptions1' ) ) {
235
+ $js_footer_exceptions1 = get_option( 'sbp_js_footer_exceptions1' );
236
+ } else {
237
+ $js_footer_exceptions1 = '' ;
238
+ }
239
+
240
+ if ( get_option( 'sbp_js_footer_exceptions2' ) ) {
241
+ $js_footer_exceptions2 = get_option( 'sbp_js_footer_exceptions2' );
242
+ } else {
243
+ $js_footer_exceptions2 = '' ;
244
+ }
245
+
246
+ if ( get_option( 'sbp_js_footer_exceptions3' ) ) {
247
+ $js_footer_exceptions3 = get_option( 'sbp_js_footer_exceptions3' );
248
+ } else {
249
+ $js_footer_exceptions3 = '' ;
250
+ }
251
+
252
+ if ( get_option( 'sbp_js_footer_exceptions4' ) ) {
253
+ $js_footer_exceptions4 = get_option( 'sbp_js_footer_exceptions4' );
254
+ } else {
255
+ $js_footer_exceptions4 = '' ;
256
+ }
257
+
258
+ /*--------------------------------------------------------------------------------------------------------*/
259
+
260
+ if ( get_option( 'sbp_head_html_script1' ) ) {
261
+ $sbp_html_script1 = get_option( 'sbp_head_html_script1' );
262
+ } else {
263
+ $sbp_html_script1 = '' ;
264
+ }
265
+
266
+ if ( get_option( 'sbp_head_html_script2' ) ) {
267
+ $sbp_html_script2 = get_option( 'sbp_head_html_script2' );
268
+ } else {
269
+ $sbp_html_script2 = '' ;
270
+ }
271
+
272
+ if ( get_option( 'sbp_head_html_script3' ) ) {
273
+ $sbp_html_script3 = get_option( 'sbp_head_html_script3' );
274
+ } else {
275
+ $sbp_html_script3 = '' ;
276
+ }
277
+
278
+ if ( get_option( 'sbp_head_html_script4' ) ) {
279
+ $sbp_html_script4 = get_option( 'sbp_head_html_script4' );
280
+ } else {
281
+ $sbp_html_script4 = '' ;
282
+ }
283
+
284
+ /*--------------------------------------------------------------------------------------------------------*/
285
+
286
+ if ( get_option( 'sbp_defer_exceptions1' ) ) {
287
+ $defer_exceptions1 = get_option( 'sbp_defer_exceptions1' );
288
+ } else {
289
+ $defer_exceptions1 = '' ;
290
+ }
291
+
292
+ if ( get_option( 'sbp_defer_exceptions2' ) ) {
293
+ $defer_exceptions2 = get_option( 'sbp_defer_exceptions2' );
294
+ } else {
295
+ $defer_exceptions2 = '' ;
296
+ }
297
+
298
+ if ( get_option( 'sbp_defer_exceptions3' ) ) {
299
+ $defer_exceptions3 = get_option( 'sbp_defer_exceptions3' );
300
+ } else {
301
+ $defer_exceptions3 = '' ;
302
+ }
303
+
304
+ if ( get_option( 'sbp_defer_exceptions4' ) ) {
305
+ $defer_exceptions4 = get_option( 'sbp_defer_exceptions4' );
306
+ } else {
307
+ $defer_exceptions4 = '' ;
308
+ }
309
+
310
+ /*--------------------------------------------------------------------------------------------------------*/
311
+
312
+ // Render the plugin options page HTML
313
+ include( SPEED_BOOSTER_PACK_PATH . 'css/dynamic-css.php' );
314
+
315
+ // Render the plugin options page HTML
316
+ include( SPEED_BOOSTER_PACK_PATH . 'inc/template/options.php' );
317
+
318
+ } // END public function sbp_plugin_settings_page()
319
+
320
+
321
+
322
+ } // END class Speed_Booster_Pack_Options
323
+
324
+ } // END if(!class_exists('Speed_Booster_Pack_Options'))
inc/template/options.php CHANGED
@@ -1,452 +1,444 @@
1
- <div class="wrap">
2
-
3
- <div class="sb-pack">
4
-
5
- <div id="poststuff">
6
- <div id="postbox-container" class="postbox-container">
7
- <div class="meta-box-sortables ui-sortable" id="normal-sortables">
8
-
9
-
10
- <h2 class="sbp-icon"><?php echo esc_html( get_admin_page_title() ); ?></h2>
11
-
12
- <div class="welcome-panel">
13
-
14
- <div class="welcome-panel-content">
15
-
16
- <form method="post" action="options.php">
17
-
18
- <?php settings_fields( 'speed_booster_settings_group' ); ?>
19
- <div class="main-sbp-title"><h3 ><?php _e( 'Boost Your Website Speed!', 'sb-pack' ); ?></h3></div>
20
- <div class="postbox" id="tiguan1">
21
-
22
- <div title="Click to toggle" class="handlediv"><br></div>
23
- <h3 class="hndle"><span><?php _e( 'General options', 'sb-pack' ); ?></span></h3>
24
-
25
- <div class="inside">
26
-
27
- <div class="welcome-panel-column-container">
28
-
29
- <div class="welcome-panel-column">
30
-
31
- <h4><?php _e( 'Main plugin options', 'sb-pack' ); ?></h4>
32
-
33
- <p>
34
- <input id="sbp_settings[jquery_to_footer]" name="sbp_settings[jquery_to_footer]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['jquery_to_footer'] ) ); ?> />
35
- <label for="sbp_settings[jquery_to_footer]"><?php _e( 'Move scripts to the footer', 'sb-pack' ); ?></label>
36
- </p>
37
-
38
- <p>
39
- <input id="sbp_settings[use_google_libs]" name="sbp_settings[use_google_libs]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['use_google_libs'] ) ); ?> />
40
- <label for="sbp_settings[use_google_libs]"><?php _e( 'Load JS from Google Libraries', 'sb-pack' ); ?></label>
41
- </p>
42
-
43
- <p>
44
- <input id="sbp_settings[defer_parsing]" name="sbp_settings[defer_parsing]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['defer_parsing'] ) ); ?> />
45
- <label for="sbp_settings[defer_parsing]"><?php _e( 'Defer parsing of javascript files', 'sb-pack' ); ?></label>
46
- </p>
47
-
48
- <p>
49
- <input id="sbp_settings[query_strings]" name="sbp_settings[query_strings]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['query_strings'] ) ); ?> />
50
- <label for="sbp_settings[query_strings]"><?php _e( 'Remove query strings', 'sb-pack' ); ?></label>
51
- </p>
52
-
53
- <p>
54
- <?php if ( is_plugin_active('crazy-lazy/crazy-lazy.php') ) { ?>
55
- <input id="sbp_settings[lazy_load]" name="sbp_settings[lazy_load]" type="hidden" value="<?php echo(isset( $sbp_options['lazy_load'] )? '1' : '0' ); ?>" />
56
- <label for="sbp_settings[lazy_load]"><?php _e( 'Lazy loading already handled by CrazyLazy plugin', 'sb-pack' ); ?></label>
57
- <?php } else {?>
58
- <input id="sbp_settings[lazy_load]" name="sbp_settings[lazy_load]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['lazy_load'] ) ); ?> />
59
- <label for="sbp_settings[lazy_load]"><?php _e( 'Lazy load images to improve speed', 'sb-pack' ); ?></label>
60
- <?php } ?>
61
- </p>
62
-
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'] ) ); ?> />
66
- <label for="sbp_settings[font_awesome]"><?php _e( 'Removes extra Font Awesome styles', 'sb-pack' ); ?></label>
67
- </p>
68
-
69
- </div> <!-- END welcome-panel-column -->
70
-
71
-
72
- <div class="welcome-panel-column">
73
- <h4> <?php _e( 'Other plugin settings', 'sb-pack' ); ?></h4>
74
-
75
- <p>
76
- <input id="sbp_settings[minify_html_js]" name="sbp_settings[minify_html_js]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['minify_html_js'] ) ); ?> />
77
- <label for="sbp_settings[minify_html_js]"><?php _e( 'Minify HTML and JS', 'sb-pack' ); ?></label>
78
- </p>
79
-
80
- <p>
81
- <input id="sbp_settings[remove_wsl]" name="sbp_settings[remove_wsl]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['remove_wsl'] ) ); ?> />
82
- <label for="sbp_settings[remove_wsl]"><?php _e( 'Remove WordPress Shortlink', 'sb-pack' ); ?></label>
83
- </p>
84
-
85
- <p>
86
- <input id="sbp_settings[remove_adjacent]" name="sbp_settings[remove_adjacent]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['remove_adjacent'] ) ); ?> />
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[wml_link]" name="sbp_settings[wml_link]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['wml_link'] ) ); ?> />
92
- <label for="sbp_settings[wml_link]"><?php _e( 'Remove Windows Manifest', 'sb-pack' ); ?></label>
93
- </p>
94
-
95
- <p>
96
- <input id="sbp_settings[wp_generator]" name="sbp_settings[wp_generator]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['wp_generator'] ) ); ?> />
97
- <label for="sbp_settings[wp_generator]"><?php _e( 'Remove the WordPress Version', 'sb-pack' ); ?></label>
98
- </p>
99
-
100
- <p>
101
- <input id="sbp_settings[remove_all_feeds]" name="sbp_settings[remove_all_feeds]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['remove_all_feeds'] ) ); ?> />
102
- <label for="sbp_settings[remove_all_feeds]"><?php _e( 'Remove all rss feed links', 'sb-pack' ); ?></label>
103
- </p>
104
-
105
- </div> <!-- END welcome-panel-column -->
106
-
107
-
108
- <div class="welcome-panel-column welcome-panel-last">
109
-
110
- <h4> <?php _e( 'Home Page Load Stats', 'sb-pack' ); ?></h4>
111
-
112
- <span class="sbp-stats"><?php _e( 'Page loading time in seconds:', 'sb-pack' ); ?></span>
113
-
114
- <div class="sbp-progress time">
115
- <span></span>
116
- </div>
117
-
118
- <div class="sbp-values">
119
- <div class="sbp-numbers">
120
- <?php echo $page_time; ?> <?php _e( 's', 'sb-pack' ); ?>
121
- </div>
122
- </div>
123
-
124
- <span class="sbp-stats"><?php _e( 'Number of executed queries:', 'sb-pack' ); ?></span>
125
-
126
- <div class="sbp-progress queries">
127
- <span></span>
128
- </div>
129
-
130
- <div class="sbp-values">
131
- <div class="sbp-numbers">
132
- <?php echo $page_queries; ?> <?php _e( 'q', 'sb-pack' ); ?>
133
- </div>
134
- </div>
135
-
136
- <div class="debug-info">
137
- <strong><?php _e( 'Peak Memory Used:', 'sb-pack' ); ?></strong> <span><?php echo number_format( ( memory_get_peak_usage()/1024/1024 ), 2, ',', '' ) . ' / ' . ini_get( 'memory_limit' ), '<br />'; ?></span>
138
- <strong><?php _e( 'Active Plugins:', 'sb-pack' ); ?></strong> <span><?php echo count( get_option( 'active_plugins' ) ) ; ?></span>
139
- </div>
140
-
141
- </div> <!-- END welcome-panel-column welcome-panel-last -->
142
-
143
- </div> <!-- END welcome-panel-column-container -->
144
-
145
- </div>
146
- </div>
147
-
148
- <div style="display: block;" class="postbox closed" id="tiguan2">
149
- <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><?php _e( 'Exclude scripts from being moved to the footer', 'sb-pack' ); ?></h3>
150
- <div class="inside">
151
-
152
- <div class="sbp-inline-wrap">
153
- <div class="sbp-columns1">
154
-
155
- <h4><?php _e( 'Script Handle', 'sb-pack' ); ?></h4>
156
-
157
- <p>
158
- <input type="text" name="sbp_js_footer_exceptions1" id="sbp_js_footer_exceptions1" value="<?php echo $js_footer_exceptions1; ?>" />
159
- </p>
160
-
161
- <p>
162
- <input type="text" name="sbp_js_footer_exceptions2" id="sbp_js_footer_exceptions2" value="<?php echo $js_footer_exceptions2; ?>" />
163
- </p>
164
-
165
- <p>
166
- <input type="text" name="sbp_js_footer_exceptions3" id="sbp_js_footer_exceptions3" value="<?php echo $js_footer_exceptions3; ?>" />
167
- </p>
168
-
169
- <p>
170
- <input type="text" name="sbp_js_footer_exceptions4" id="sbp_js_footer_exceptions4" value="<?php echo $js_footer_exceptions4; ?>" />
171
- </p>
172
-
173
-
174
- </div>
175
-
176
- <div class="sbp-columns2">
177
-
178
- <h4><?php _e( 'Copy the HTML code of the script from your page source and add it below', 'sb-pack' ); ?></h4>
179
-
180
-
181
- <p>
182
- <input type="text" name="sbp_head_html_script1" id="sbp_head_html_script1" class="regular-text" value="<?php echo $sbp_html_script1; ?>" />
183
- </p>
184
-
185
- <p>
186
- <input type="text" name="sbp_head_html_script2" id="sbp_head_html_script2" class="regular-text" value="<?php echo $sbp_html_script2; ?>" />
187
- </p>
188
-
189
- <p>
190
- <input type="text" name="sbp_head_html_script3" id="sbp_head_html_script3" class="regular-text" value="<?php echo $sbp_html_script3; ?>" />
191
- </p>
192
-
193
- <p>
194
- <input type="text" name="sbp_head_html_script4" id="sbp_head_html_script4" class="regular-text" value="<?php echo $sbp_html_script4; ?>" />
195
- </p>
196
-
197
- </div>
198
- </div>
199
-
200
- <p class="description">
201
- <?php _e('Enter one js handle per text field, in the left area and the correspondent html script in the right text fields.', 'sb-pack' ); ?> <?php _e( 'Read more', 'sb-pack' ); ?> <a href="http://tiguandesign.com/docs/speed-booster/#exclude-scripts-from-being-moved-to-the-footer-50" target="_blank" title="Documentation"><?php _e( 'detailed instructions', 'sb-pack' ); ?></a> <?php _e( 'on this option on plugin documentation.', 'sb-pack' ); ?> <br /> <?php _e( 'If you want to exclude more than 4 scripts, your page score will be hit and therefore the use of "Move scripts to footer" option will become useless so you can disable it.', 'sb-pack' ); ?>
202
- </p>
203
- <div class="td-border-last"></div>
204
-
205
- <p>
206
- <h4 class="hndle"><?php _e( 'As a guidance, here is a list of script handles and script paths of each enqueued script detected by our plugin:', 'sb-pack' ); ?></h4>
207
- </p>
208
-
209
- <div class="sbp-all-enqueued">
210
-
211
- <div class="sbp-div-head">
212
- <div class="sbp-title-scripts"><?php _e('Script Handle', 'sb-pack' ); ?></div>
213
- <div class="sbp-title-scripts"><?php _e('Script Path', 'sb-pack' ); ?></div>
214
- </div>
215
-
216
- <div class="sbp-inline-wrap">
217
-
218
- <div class="sbp-columns1 sbp-width">
219
- <?php echo get_option( 'all_theme_scripts_handle' ) ; ?>
220
- </div>
221
-
222
- <div class="sbp-columns2 sbp-width">
223
- <?php echo get_option( 'all_theme_scripts_src' ) ; ?>
224
- </div>
225
-
226
-
227
- </div>
228
-
229
- </div>
230
- <p class="description">
231
- <?php _e('*The list may be incomplete in some circumstances.', 'sb-pack' ); ?>
232
- </p>
233
- </div>
234
- </div>
235
-
236
-
237
-
238
- <div style="display: block;" class="postbox closed" id="tiguan3">
239
- <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><?php _e( 'Exclude scripts from being deferred', 'sb-pack' ); ?></h3>
240
- <div class="inside">
241
-
242
- <div class="sbp-inline-wrap">
243
-
244
- <p>
245
- <input type="text" class="sbp-more-width" name="sbp_defer_exceptions1" id="sbp_defer_exceptions1" value="<?php echo $defer_exceptions1; ?>" />
246
- </p>
247
-
248
- <p>
249
- <input type="text" class="sbp-more-width" name="sbp_defer_exceptions2" id="sbp_defer_exceptions2" value="<?php echo $defer_exceptions2; ?>" />
250
- </p>
251
-
252
- <p>
253
- <input type="text" class="sbp-more-width" name="sbp_defer_exceptions3" id="sbp_defer_exceptions3" value="<?php echo $defer_exceptions3; ?>" />
254
- </p>
255
-
256
- <p>
257
- <input type="text" class="sbp-more-width" name="sbp_defer_exceptions4" id="sbp_defer_exceptions4" value="<?php echo $defer_exceptions4; ?>" />
258
- </p>
259
-
260
-
261
- </div>
262
- <p class="description">
263
- <?php _e('Enter one by text field, the final part of the js files that you want to be excluded from defer parsing option. For example: <code>jquery.min.js</code> If you want to exclude more than 4 scripts, your page score will be hit and therefore the use of "Defer parsing of javascript files" option will become useless so you can disable it', 'sb-pack' ); ?>
264
- </p>
265
-
266
- </div>
267
- </div>
268
-
269
-
270
- <div style="display: block;" class="postbox closed" id="tiguan4">
271
- <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle sbp-emphasize"><?php _e( 'Change the default image compression level', 'sb-pack' ); ?></h3>
272
- <div class="inside">
273
-
274
-
275
-
276
- <script type='text/javascript'>
277
- var jpegCompression = '<?php echo $this->image_compression; ?>';
278
- </script>
279
-
280
- <div>
281
-
282
- <p class="sbp-amount">
283
- <?php _e( 'Compression level:', 'sb-pack' ); ?><input type="text" class="sbp-amount" id="sbp-amount" />
284
- </p>
285
-
286
- <p>
287
- <div class="sbp-slider" id="sbp-slider"></div>
288
- <input type="hidden" name="sbp_integer" id="sbp_integer" value="<?php echo $this->image_compression; ?>" />
289
- </p>
290
-
291
- <p class="description">
292
- <?php _e( 'The default image compression setting in WordPress is 90%. Compressing your images further than the default will make your file sizes even smaller and will boost your site performance. As a reference, a lower level of compression means more performance but might induce quality loss. We recommend you choose a compression level between 50 and 75.', 'sb-pack' ); ?><br />
293
- </p>
294
- <p class="description"><strong>
295
- <?php _e( 'Note that any changes you make will only affect new images uploaded to your site. A specialized plugin can optimize all your present images and will also optimize new ones as they are added. ', 'sb-pack' ); ?>
296
- </strong></p>
297
- <br>
298
- <p class="description sp-link"><strong>
299
- <a href="https://shortpixel.com/h/af/U3NQVWK31472" target="_blank">
300
- <?php _e( 'Test your website with ShortPixel for free to see how much you could gain by optimizing your images.', 'sb-pack' ); ?>
301
- </a>
302
- </strong></p>
303
- <a href="https://shortpixel.com/h/af/U3NQVWK31472" target="_blank"><img src="<?php echo $this->plugin_url . "inc/images/sp.png"; ?>" class="sbp-sp"/></a>
304
- <p class="description">
305
- <?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' ); ?>
306
- </p>
307
- <p class="description-link">
308
- <a href="https://shortpixel.com/h/af/U3NQVWK31472" target="_blank">&gt;&gt; <?php _e( 'More info', 'sb-pack' ); ?></a>
309
- </p>
310
- </div>
311
-
312
- </div>
313
- </div>
314
-
315
-
316
- <div style="display: block;" class="postbox closed" id="tiguan5">
317
- <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><?php _e( 'Still need more speed?', 'sb-pack' ); ?></h3>
318
- <div class="inside">
319
-
320
-
321
- <p>
322
- <input id="sbp_css_async" name="sbp_settings[sbp_css_async]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['sbp_css_async'] ) ); ?> />
323
- <label for="sbp_css_async"><?php _e( 'Load CSS asynchronously', 'sb-pack' ); ?></label>
324
- </p>
325
-
326
-
327
- <div id="sbp-css-content">
328
-
329
- <p>
330
- <input id="sbp_settings[sbp_css_minify]" name="sbp_settings[sbp_css_minify]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['sbp_css_minify'] ) ); ?> />
331
- <label for="sbp_settings[sbp_css_minify]"><?php _e( 'Minify all CSS styles', 'sb-pack' ); ?></label>
332
- </p>
333
-
334
- <div class="sbp-radio-content">
335
-
336
- <p>
337
- <input id="sbp_settings[sbp_footer_css]" name="sbp_settings[sbp_footer_css]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['sbp_footer_css'] ) ); ?> />
338
- <label for="sbp_settings[sbp_footer_css]"><?php _e( 'Insert all CSS styles inline to the footer', 'sb-pack' ); ?></label>
339
- </p>
340
-
341
- <p>
342
- <input id="sbp_settings[sbp_is_mobile]" name="sbp_settings[sbp_is_mobile]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['sbp_is_mobile'] ) ); ?> />
343
- <label for="sbp_settings[sbp_is_mobile]"><?php _e( 'Disable all above CSS options on mobile devices', 'sb-pack' ); ?></label>
344
- </p>
345
-
346
- <div class="td-border-last"></div>
347
-
348
- <h4><?php _e( 'Exclude styles from asynchronously option: ', 'sb-pack' ); ?></h4>
349
- <p><textarea cols="50" rows="3" name="sbp_css_exceptions" id="sbp_css_exceptions" value="<?php echo $css_exceptions; ?>" /><?php echo $css_exceptions; ?></textarea></p>
350
- <p class="description">
351
- <?php _e('Enter one by line, the handles of css files or the final part of the style URL. For example: <code>font-awesome</code> or <code>font-awesome.min.css</code>', 'sb-pack' ); ?>
352
- </p>
353
-
354
-
355
- <div class="td-border-last"></div>
356
-
357
- <p>
358
- <h4 class="hndle"><?php _e( 'As a guidance, here is a list of css handles of each enqueued style detected by our plugin:', 'sb-pack' ); ?></h4>
359
- </p>
360
-
361
- <div class="sbp-all-enqueued">
362
-
363
- <div class="sbp-div-head">
364
- <div class="sbp-title-scripts"><?php _e('CSS Handle', 'sb-pack' ); ?></div>
365
- </div>
366
-
367
- <div class="sbp-inline-wrap">
368
- <div class="sbp-columns1 sbp-width">
369
- <?php echo get_option( 'all_theme_styles_handle' ) ; ?>
370
- </div>
371
- </div>
372
-
373
- </div>
374
-
375
- <p class="description">
376
- <?php _e('*The list may be incomplete in some circumstances.', 'sb-pack' ); ?>
377
- </p>
378
-
379
-
380
-
381
- <div class="td-border-last"></div>
382
- <h4 class="sbp-icon-information"><?php _e( 'Additional information:', 'sb-pack' ); ?></h4>
383
- <p class ="description"><strong><?php _e( 'Insert all CSS styles inline to the footer: ', 'sb-pack' ); ?></strong><?php _e( 'this option will eliminate render-blocking CSS warning in Google Page Speed test. If there is something broken after activation, you need to disable this option. Please note that before enabling this sensitive option, it is strongly recommended that you also enable the "Move scripts to the footer" option.', 'sb-pack' ); ?></p>
384
-
385
- </div>
386
- </div>
387
- </div><!-- END sbp-radio-content -->
388
- </div><!-- END sbp-css-content -->
389
-
390
-
391
-
392
- <?php submit_button() ?>
393
-
394
- </form>
395
-
396
- </div> <!-- END welcome-panel-content -->
397
-
398
- </div> <!-- END welcome-panel -->
399
-
400
- <!-- START docs and version areas -->
401
-
402
- <div class="sbp-title-div">
403
- <div class="sbp-title">
404
- <?php _e( 'What do these settings mean?', 'sb-pack' ); ?>
405
- </div>
406
- </div>
407
-
408
- <div class="sbp-box"><!-- start sbp-box div 1 -->
409
-
410
- <div class="sbp-box-legend">
411
- <i class="sbp-icon-help"></i>
412
- </div>
413
-
414
- <p><a href="http://tiguandesign.com/docs/speed-booster/" target="_blank" title="Documentation"><?php _e( 'Read online plugin documentation', 'sb-pack' ); ?></a><?php _e( ' with guidelines to enhance your website performance.', 'sb-pack' ); ?></p>
415
-
416
- </div> <!-- end sbp-box div 1-->
417
-
418
- <div class="sbp-title-div">
419
- <div class="sbp-title">
420
- <?php _e( 'Version Information', 'sb-pack' ); ?>
421
- </div>
422
- </div>
423
-
424
- <div class="sbp-box"><!-- start sbp-box div 2 -->
425
-
426
- <div class="sbp-box-version">
427
- <i class="sbp-icon-version"></i>
428
- </div>
429
-
430
- <div class="sbp-infos">
431
- <?php _e( 'Installed Version:', 'sb-pack' ); ?>
432
- <span>
433
- <?php echo SPEED_BOOSTER_PACK_VERSION; ?>
434
- </span>
435
- </div>
436
-
437
- <div class="sbp-infos">
438
- <?php _e( 'Released date:', 'sb-pack' ); ?>
439
- <span>
440
- <?php echo SPEED_BOOSTER_PACK_RELEASE_DATE; ?>
441
- </span>
442
- </div>
443
-
444
- </div> <!-- end sbp-box div 2 -->
445
-
446
- <!-- END docs and version areas -->
447
- </div>
448
- </div>
449
- </div>
450
- </div> <!-- END sb-pack-->
451
-
452
- </div> <!-- end wrap div -->
1
+ <div class="wrap">
2
+
3
+ <div class="sb-pack">
4
+
5
+ <div id="poststuff">
6
+ <div id="postbox-container" class="postbox-container">
7
+ <div class="meta-box-sortables ui-sortable" id="normal-sortables">
8
+
9
+
10
+ <h2 class="sbp-icon"><?php echo esc_html( get_admin_page_title() ); ?></h2>
11
+
12
+ <div class="welcome-panel">
13
+
14
+ <div class="welcome-panel-content">
15
+
16
+ <form method="post" action="options.php">
17
+
18
+ <?php settings_fields( 'speed_booster_settings_group' ); ?>
19
+ <div class="main-sbp-title"><h3 ><?php _e( 'Boost Your Website Speed!', 'sb-pack' ); ?></h3></div>
20
+ <div class="postbox" id="tiguan1">
21
+
22
+ <div title="Click to toggle" class="handlediv"><br></div>
23
+ <h3 class="hndle"><span><?php _e( 'General options', 'sb-pack' ); ?></span></h3>
24
+
25
+ <div class="inside">
26
+
27
+ <div class="welcome-panel-column-container">
28
+
29
+ <div class="welcome-panel-column">
30
+
31
+ <h4><?php _e( 'Main plugin options', 'sb-pack' ); ?></h4>
32
+
33
+ <p>
34
+ <input id="sbp_settings[jquery_to_footer]" name="sbp_settings[jquery_to_footer]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['jquery_to_footer'] ) ); ?> />
35
+ <label for="sbp_settings[jquery_to_footer]"><?php _e( 'Move scripts to the footer', 'sb-pack' ); ?></label>
36
+ </p>
37
+
38
+ <p>
39
+ <input id="sbp_settings[use_google_libs]" name="sbp_settings[use_google_libs]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['use_google_libs'] ) ); ?> />
40
+ <label for="sbp_settings[use_google_libs]"><?php _e( 'Load JS from Google Libraries', 'sb-pack' ); ?></label>
41
+ </p>
42
+
43
+ <p>
44
+ <input id="sbp_settings[defer_parsing]" name="sbp_settings[defer_parsing]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['defer_parsing'] ) ); ?> />
45
+ <label for="sbp_settings[defer_parsing]"><?php _e( 'Defer parsing of javascript files', 'sb-pack' ); ?></label>
46
+ </p>
47
+
48
+ <p>
49
+ <input id="sbp_settings[query_strings]" name="sbp_settings[query_strings]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['query_strings'] ) ); ?> />
50
+ <label for="sbp_settings[query_strings]"><?php _e( 'Remove query strings', 'sb-pack' ); ?></label>
51
+ </p>
52
+
53
+ <p>
54
+ <?php if ( is_plugin_active('crazy-lazy/crazy-lazy.php') ) { ?>
55
+ <input id="sbp_settings[lazy_load]" name="sbp_settings[lazy_load]" type="hidden" value="<?php echo(isset( $sbp_options['lazy_load'] )? '1' : '0' ); ?>" />
56
+ <label for="sbp_settings[lazy_load]"><?php _e( 'Lazy loading already handled by CrazyLazy plugin', 'sb-pack' ); ?></label>
57
+ <?php } else {?>
58
+ <input id="sbp_settings[lazy_load]" name="sbp_settings[lazy_load]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['lazy_load'] ) ); ?> />
59
+ <label for="sbp_settings[lazy_load]"><?php _e( 'Lazy load images to improve speed', 'sb-pack' ); ?></label>
60
+ <?php } ?>
61
+ </p>
62
+
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'] ) ); ?> />
66
+ <label for="sbp_settings[font_awesome]"><?php _e( 'Removes extra Font Awesome styles', 'sb-pack' ); ?></label>
67
+ </p>
68
+
69
+ </div> <!-- END welcome-panel-column -->
70
+
71
+
72
+ <div class="welcome-panel-column">
73
+ <h4> <?php _e( 'Other plugin settings', 'sb-pack' ); ?></h4>
74
+
75
+ <p>
76
+ <input id="sbp_settings[minify_html_js]" name="sbp_settings[minify_html_js]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['minify_html_js'] ) ); ?> />
77
+ <label for="sbp_settings[minify_html_js]"><?php _e( 'Minify HTML and JS', 'sb-pack' ); ?></label>
78
+ </p>
79
+
80
+ <p>
81
+ <input id="sbp_settings[remove_wsl]" name="sbp_settings[remove_wsl]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['remove_wsl'] ) ); ?> />
82
+ <label for="sbp_settings[remove_wsl]"><?php _e( 'Remove WordPress Shortlink', 'sb-pack' ); ?></label>
83
+ </p>
84
+
85
+ <p>
86
+ <input id="sbp_settings[remove_adjacent]" name="sbp_settings[remove_adjacent]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['remove_adjacent'] ) ); ?> />
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[wml_link]" name="sbp_settings[wml_link]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['wml_link'] ) ); ?> />
92
+ <label for="sbp_settings[wml_link]"><?php _e( 'Remove Windows Manifest', 'sb-pack' ); ?></label>
93
+ </p>
94
+
95
+ <p>
96
+ <input id="sbp_settings[wp_generator]" name="sbp_settings[wp_generator]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['wp_generator'] ) ); ?> />
97
+ <label for="sbp_settings[wp_generator]"><?php _e( 'Remove the WordPress Version', 'sb-pack' ); ?></label>
98
+ </p>
99
+
100
+ <p>
101
+ <input id="sbp_settings[remove_all_feeds]" name="sbp_settings[remove_all_feeds]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['remove_all_feeds'] ) ); ?> />
102
+ <label for="sbp_settings[remove_all_feeds]"><?php _e( 'Remove all rss feed links', 'sb-pack' ); ?></label>
103
+ </p>
104
+
105
+ </div> <!-- END welcome-panel-column -->
106
+
107
+
108
+ <div class="welcome-panel-column welcome-panel-last">
109
+
110
+ <h4> <?php _e( 'Home Page Load Stats', 'sb-pack' ); ?></h4>
111
+
112
+ <span class="sbp-stats"><?php _e( 'Page loading time in seconds:', 'sb-pack' ); ?></span>
113
+
114
+ <div class="sbp-progress time">
115
+ <span></span>
116
+ </div>
117
+
118
+ <div class="sbp-values">
119
+ <div class="sbp-numbers">
120
+ <?php echo $page_time; ?> <?php _e( 's', 'sb-pack' ); ?>
121
+ </div>
122
+ </div>
123
+
124
+ <span class="sbp-stats"><?php _e( 'Number of executed queries:', 'sb-pack' ); ?></span>
125
+
126
+ <div class="sbp-progress queries">
127
+ <span></span>
128
+ </div>
129
+
130
+ <div class="sbp-values">
131
+ <div class="sbp-numbers">
132
+ <?php echo $page_queries; ?> <?php _e( 'q', 'sb-pack' ); ?>
133
+ </div>
134
+ </div>
135
+
136
+ <div class="debug-info">
137
+ <strong><?php _e( 'Peak Memory Used:', 'sb-pack' ); ?></strong> <span><?php echo number_format( ( memory_get_peak_usage()/1024/1024 ), 2, ',', '' ) . ' / ' . ini_get( 'memory_limit' ), '<br />'; ?></span>
138
+ <strong><?php _e( 'Active Plugins:', 'sb-pack' ); ?></strong> <span><?php echo count( get_option( 'active_plugins' ) ) ; ?></span>
139
+ </div>
140
+
141
+ </div> <!-- END welcome-panel-column welcome-panel-last -->
142
+
143
+ </div> <!-- END welcome-panel-column-container -->
144
+
145
+ </div>
146
+ </div>
147
+
148
+ <div style="display: block;" class="postbox closed" id="tiguan2">
149
+ <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><?php _e( 'Exclude scripts from being moved to the footer', 'sb-pack' ); ?></h3>
150
+ <div class="inside">
151
+
152
+ <div class="sbp-inline-wrap">
153
+ <div class="sbp-columns1">
154
+
155
+ <h4><?php _e( 'Script Handle', 'sb-pack' ); ?></h4>
156
+
157
+ <p>
158
+ <input type="text" name="sbp_js_footer_exceptions1" id="sbp_js_footer_exceptions1" value="<?php echo $js_footer_exceptions1; ?>" />
159
+ </p>
160
+
161
+ <p>
162
+ <input type="text" name="sbp_js_footer_exceptions2" id="sbp_js_footer_exceptions2" value="<?php echo $js_footer_exceptions2; ?>" />
163
+ </p>
164
+
165
+ <p>
166
+ <input type="text" name="sbp_js_footer_exceptions3" id="sbp_js_footer_exceptions3" value="<?php echo $js_footer_exceptions3; ?>" />
167
+ </p>
168
+
169
+ <p>
170
+ <input type="text" name="sbp_js_footer_exceptions4" id="sbp_js_footer_exceptions4" value="<?php echo $js_footer_exceptions4; ?>" />
171
+ </p>
172
+
173
+
174
+ </div>
175
+
176
+ <div class="sbp-columns2">
177
+
178
+ <h4><?php _e( 'Copy the HTML code of the script from your page source and add it below', 'sb-pack' ); ?></h4>
179
+
180
+
181
+ <p>
182
+ <input type="text" name="sbp_head_html_script1" id="sbp_head_html_script1" class="regular-text" value="<?php echo $sbp_html_script1; ?>" />
183
+ </p>
184
+
185
+ <p>
186
+ <input type="text" name="sbp_head_html_script2" id="sbp_head_html_script2" class="regular-text" value="<?php echo $sbp_html_script2; ?>" />
187
+ </p>
188
+
189
+ <p>
190
+ <input type="text" name="sbp_head_html_script3" id="sbp_head_html_script3" class="regular-text" value="<?php echo $sbp_html_script3; ?>" />
191
+ </p>
192
+
193
+ <p>
194
+ <input type="text" name="sbp_head_html_script4" id="sbp_head_html_script4" class="regular-text" value="<?php echo $sbp_html_script4; ?>" />
195
+ </p>
196
+
197
+ </div>
198
+ </div>
199
+
200
+ <p class="description">
201
+ <?php _e('Enter one js handle per text field, in the left area and the correspondent html script in the right text fields.', 'sb-pack' ); ?> <?php _e( 'Read more', 'sb-pack' ); ?> <a href="http://tiguandesign.com/docs/speed-booster/#exclude-scripts-from-being-moved-to-the-footer-50" target="_blank" title="Documentation"><?php _e( 'detailed instructions', 'sb-pack' ); ?></a> <?php _e( 'on this option on plugin documentation.', 'sb-pack' ); ?> <br /> <?php _e( 'If you want to exclude more than 4 scripts, your page score will be hit and therefore the use of "Move scripts to footer" option will become useless so you can disable it.', 'sb-pack' ); ?>
202
+ </p>
203
+ <div class="td-border-last"></div>
204
+
205
+ <p>
206
+ <h4 class="hndle"><?php _e( 'As a guidance, here is a list of script handles and script paths of each enqueued script detected by our plugin:', 'sb-pack' ); ?></h4>
207
+ </p>
208
+
209
+ <div class="sbp-all-enqueued">
210
+
211
+ <div class="sbp-div-head">
212
+ <div class="sbp-title-scripts"><?php _e('Script Handle', 'sb-pack' ); ?></div>
213
+ <div class="sbp-title-scripts"><?php _e('Script Path', 'sb-pack' ); ?></div>
214
+ </div>
215
+
216
+ <div class="sbp-inline-wrap">
217
+
218
+ <div class="sbp-columns1 sbp-width">
219
+ <?php echo get_option( 'all_theme_scripts_handle' ) ; ?>
220
+ </div>
221
+
222
+ <div class="sbp-columns2 sbp-width">
223
+ <?php echo get_option( 'all_theme_scripts_src' ) ; ?>
224
+ </div>
225
+
226
+
227
+ </div>
228
+
229
+ </div>
230
+ <p class="description">
231
+ <?php _e('*The list may be incomplete in some circumstances.', 'sb-pack' ); ?>
232
+ </p>
233
+ </div>
234
+ </div>
235
+
236
+
237
+
238
+ <div style="display: block;" class="postbox closed" id="tiguan3">
239
+ <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><?php _e( 'Exclude scripts from being deferred', 'sb-pack' ); ?></h3>
240
+ <div class="inside">
241
+
242
+ <div class="sbp-inline-wrap">
243
+
244
+ <p>
245
+ <input type="text" class="sbp-more-width" name="sbp_defer_exceptions1" id="sbp_defer_exceptions1" value="<?php echo $defer_exceptions1; ?>" />
246
+ </p>
247
+
248
+ <p>
249
+ <input type="text" class="sbp-more-width" name="sbp_defer_exceptions2" id="sbp_defer_exceptions2" value="<?php echo $defer_exceptions2; ?>" />
250
+ </p>
251
+
252
+ <p>
253
+ <input type="text" class="sbp-more-width" name="sbp_defer_exceptions3" id="sbp_defer_exceptions3" value="<?php echo $defer_exceptions3; ?>" />
254
+ </p>
255
+
256
+ <p>
257
+ <input type="text" class="sbp-more-width" name="sbp_defer_exceptions4" id="sbp_defer_exceptions4" value="<?php echo $defer_exceptions4; ?>" />
258
+ </p>
259
+
260
+
261
+ </div>
262
+ <p class="description">
263
+ <?php _e('Enter one by text field, the final part of the js files that you want to be excluded from defer parsing option. For example: <code>jquery.min.js</code> If you want to exclude more than 4 scripts, your page score will be hit and therefore the use of "Defer parsing of javascript files" option will become useless so you can disable it', 'sb-pack' ); ?>
264
+ </p>
265
+
266
+ </div>
267
+ </div>
268
+
269
+
270
+ <div style="display: block;" class="postbox closed" id="tiguan4">
271
+ <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle sbp-emphasize"><?php _e( 'Change the default image compression level', 'sb-pack' ); ?></h3>
272
+ <div class="inside">
273
+
274
+
275
+
276
+ <script type='text/javascript'>
277
+ var jpegCompression = '<?php echo $this->image_compression; ?>';
278
+ </script>
279
+
280
+ <div>
281
+
282
+ <p class="sbp-amount">
283
+ <?php _e( 'Compression level:', 'sb-pack' ); ?><input type="text" class="sbp-amount" id="sbp-amount" />
284
+ </p>
285
+
286
+ <p>
287
+ <div class="sbp-slider" id="sbp-slider"></div>
288
+ <input type="hidden" name="sbp_integer" id="sbp_integer" value="<?php echo $this->image_compression; ?>" />
289
+ </p>
290
+
291
+ <p class="description">
292
+ <?php _e( 'The default image compression setting in WordPress is 90%. Compressing your images further than the default will make your file sizes even smaller and will boost your site performance. As a reference, a lower level of compression means more performance but might induce quality loss. We recommend you choose a compression level between 50 and 75.', 'sb-pack' ); ?><br />
293
+ </p>
294
+ <p class="description"><strong>
295
+ <?php _e( 'Note that any changes you make will only affect new images uploaded to your site. A specialized plugin can optimize all your present images and will also optimize new ones as they are added. ', 'sb-pack' ); ?>
296
+ </strong></p>
297
+ <br>
298
+ <p class="description sp-link"><strong>
299
+ <a href="https://shortpixel.com/h/af/U3NQVWK31472" target="_blank">
300
+ <?php _e( 'Test your website with ShortPixel for free to see how much you could gain by optimizing your images.', 'sb-pack' ); ?>
301
+ </a>
302
+ </strong></p>
303
+ <a href="https://shortpixel.com/h/af/U3NQVWK31472" target="_blank"><img src="<?php echo $this->plugin_url . "inc/images/sp.png"; ?>" class="sbp-sp"/></a>
304
+ <p class="description">
305
+ <?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' ); ?>
306
+ </p>
307
+ <p class="description-link">
308
+ <a href="https://shortpixel.com/h/af/U3NQVWK31472" target="_blank">&gt;&gt; <?php _e( 'More info', 'sb-pack' ); ?></a>
309
+ </p>
310
+ </div>
311
+
312
+ </div>
313
+ </div>
314
+
315
+
316
+ <div style="display: block;" class="postbox closed" id="tiguan5">
317
+ <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><?php _e( 'Still need more speed?', 'sb-pack' ); ?></h3>
318
+ <div class="inside">
319
+
320
+
321
+ <p>
322
+ <input id="sbp_css_async" name="sbp_settings[sbp_css_async]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['sbp_css_async'] ) ); ?> />
323
+ <label for="sbp_css_async"><?php _e( 'Load CSS asynchronously', 'sb-pack' ); ?></label>
324
+ </p>
325
+
326
+
327
+ <div id="sbp-css-content">
328
+
329
+ <p>
330
+ <input id="sbp_settings[sbp_css_minify]" name="sbp_settings[sbp_css_minify]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['sbp_css_minify'] ) ); ?> />
331
+ <label for="sbp_settings[sbp_css_minify]"><?php _e( 'Minify all CSS styles', 'sb-pack' ); ?></label>
332
+ </p>
333
+
334
+ <div class="sbp-radio-content">
335
+
336
+ <p>
337
+ <input id="sbp_settings[sbp_footer_css]" name="sbp_settings[sbp_footer_css]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['sbp_footer_css'] ) ); ?> />
338
+ <label for="sbp_settings[sbp_footer_css]"><?php _e( 'Insert all CSS styles inline to the footer', 'sb-pack' ); ?></label>
339
+ </p>
340
+
341
+ <p>
342
+ <input id="sbp_settings[sbp_is_mobile]" name="sbp_settings[sbp_is_mobile]" type="checkbox" value="1" <?php checked( 1, isset( $sbp_options['sbp_is_mobile'] ) ); ?> />
343
+ <label for="sbp_settings[sbp_is_mobile]"><?php _e( 'Disable all above CSS options on mobile devices', 'sb-pack' ); ?></label>
344
+ </p>
345
+
346
+ <div class="td-border-last"></div>
347
+
348
+ <h4><?php _e( 'Exclude styles from asynchronously option: ', 'sb-pack' ); ?></h4>
349
+ <p><textarea cols="50" rows="3" name="sbp_css_exceptions" id="sbp_css_exceptions" value="<?php echo $css_exceptions; ?>" /><?php echo $css_exceptions; ?></textarea></p>
350
+ <p class="description">
351
+ <?php _e('Enter one by line, the handles of css files or the final part of the style URL. For example: <code>font-awesome</code> or <code>font-awesome.min.css</code>', 'sb-pack' ); ?>
352
+ </p>
353
+
354
+
355
+ <div class="td-border-last"></div>
356
+
357
+ <p>
358
+ <h4 class="hndle"><?php _e( 'As a guidance, here is a list of css handles of each enqueued style detected by our plugin:', 'sb-pack' ); ?></h4>
359
+ </p>
360
+
361
+ <div class="sbp-all-enqueued">
362
+
363
+ <div class="sbp-div-head">
364
+ <div class="sbp-title-scripts"><?php _e('CSS Handle', 'sb-pack' ); ?></div>
365
+ </div>
366
+
367
+ <div class="sbp-inline-wrap">
368
+ <div class="sbp-columns1 sbp-width">
369
+ <?php echo get_option( 'all_theme_styles_handle' ) ; ?>
370
+ </div>
371
+ </div>
372
+
373
+ </div>
374
+
375
+ <p class="description">
376
+ <?php _e('*The list may be incomplete in some circumstances.', 'sb-pack' ); ?>
377
+ </p>
378
+
379
+
380
+
381
+ <div class="td-border-last"></div>
382
+ <h4 class="sbp-icon-information"><?php _e( 'Additional information:', 'sb-pack' ); ?></h4>
383
+ <p class ="description"><strong><?php _e( 'Insert all CSS styles inline to the footer: ', 'sb-pack' ); ?></strong><?php _e( 'this option will eliminate render-blocking CSS warning in Google Page Speed test. If there is something broken after activation, you need to disable this option. Please note that before enabling this sensitive option, it is strongly recommended that you also enable the "Move scripts to the footer" option.', 'sb-pack' ); ?></p>
384
+
385
+ </div>
386
+ </div>
387
+ </div><!-- END sbp-radio-content -->
388
+ </div><!-- END sbp-css-content -->
389
+
390
+
391
+
392
+ <?php submit_button() ?>
393
+
394
+ </form>
395
+
396
+ </div> <!-- END welcome-panel-content -->
397
+
398
+ </div> <!-- END welcome-panel -->
399
+
400
+ <div class="col-fulwidth feedback-box">
401
+ <h3>
402
+ <?php esc_html_e( 'Lend a hand & share your thoughts', 'saboxplugin' ); ?>
403
+ <img src="<?php echo $this->plugin_url . "inc/images/handshake.png"; ?>">
404
+ </h3>
405
+ <p>
406
+ <?php
407
+ echo vsprintf(
408
+ // Translators: 1 is Theme Name, 2 is opening Anchor, 3 is closing.
409
+ __( 'We\'ve been working hard on making %1$s the best one out there. We\'re interested in hearing your thoughts about %1$s and what we could do to <u>make it even better</u>.<br/> <br/> %2$sHave your say%3$s', 'sb-pack' ),
410
+ array(
411
+ 'Speed Booster Pack',
412
+ '<a class="button button-feedback" target="_blank" href="http://bit.ly/feedback-speed-booster-pack">',
413
+ '</a>',
414
+ )
415
+ );
416
+ ?>
417
+ </p>
418
+ </div>
419
+
420
+ <!-- START docs and version areas -->
421
+
422
+ <div class="sbp-title-div">
423
+ <div class="sbp-title">
424
+ <?php _e( 'What do these settings mean?', 'sb-pack' ); ?>
425
+ </div>
426
+ </div>
427
+
428
+ <div class="sbp-box"><!-- start sbp-box div 1 -->
429
+
430
+ <div class="sbp-box-legend">
431
+ <i class="sbp-icon-help"></i>
432
+ </div>
433
+
434
+ <p><a href="http://tiguandesign.com/docs/speed-booster/" target="_blank" title="Documentation"><?php _e( 'Read online plugin documentation', 'sb-pack' ); ?></a><?php _e( ' with guidelines to enhance your website performance.', 'sb-pack' ); ?></p>
435
+
436
+ </div> <!-- end sbp-box div 1-->
437
+
438
+ <!-- END docs and version areas -->
439
+ </div>
440
+ </div>
441
+ </div>
442
+ </div> <!-- END sb-pack-->
443
+
444
+ </div> <!-- end wrap div -->
 
 
 
 
 
 
 
 
inc/use-google-libraries.php CHANGED
@@ -1,492 +1,492 @@
1
- <?php
2
- /* Use Google Libraries 1.5.2 => Allows your site to use common javascript libraries from Google's AJAX Libraries CDN, rather than from WordPress's own copies. */
3
- /* http://jasonpenney.net/wordpress-plugins/use-google-libraries/ */
4
- /* Author & copyright (c) 2008-2013 : Jason Penney (email : jpenney@jczorkmid.net ). General Public License v.2.0 */
5
-
6
-
7
- if ( ! class_exists( 'SBP_GoogleLibraries' ) ) {
8
-
9
- class SBP_GoogleLibraries {
10
-
11
- protected static $instance;
12
- protected static $plugin_file = __FILE__;
13
- protected static $version = '1.6dev';
14
- protected static $noconflict_inject = "<script type='text/javascript'>try{jQuery.noConflict();}catch(e){};</script>\n";
15
-
16
- public static function get_instance() {
17
- if ( ! isset( self::$instance ) ) {
18
- self::$instance = new SBP_GoogleLibraries();
19
- }
20
- return self::$instance;
21
- }
22
-
23
- /**
24
- * Registry of script replacement rules
25
- *
26
- * Entries are formatted as follows:
27
- * <code>
28
- * 'script-handle' => array(
29
- * 'google-lib-path',
30
- * 'google-file-name',
31
- * 'google-combined-into')
32
- * </code>
33
- *
34
- * - 'script-handle' -- the handle used by WordPress script
35
- * registration
36
- * - 'google-lib-path' -- path to location on Google CDN( empty
37
- * string if script has been combined).
38
- * - 'google-file-name' -- file name (minus .js) on Google CDN (empty
39
- * string if script has been combined).
40
- * - 'google-combined-into' -- If not empty string, then the given
41
- * handle has been combined into a file loaded by this handle.
42
- *
43
- * @var array
44
- */
45
- protected $google_scripts;
46
-
47
- /**
48
- * Used internally to ensure jQuery.noconflict is executed as close to
49
- * how core WordPress would.
50
- *
51
- * @var bool
52
- */
53
- protected $noconflict_next;
54
-
55
- /**
56
- * script id used for actual jquery script
57
- *
58
- * @var string
59
- *
60
- * @since 5.2
61
- */
62
- protected $jquery_tag;
63
-
64
- /**
65
- * True if using a version of WordPress that allows
66
- * `wp_register_script` to take protocol-relative URLs,
67
- * otherwise False
68
- *
69
- * @since 1.5.2
70
- *
71
- * @var bool
72
- */
73
- protected $protocol_relative_supported;
74
-
75
- /**
76
- * transient name used when caching
77
- *
78
- * @var string
79
- */
80
- protected static $cache_id = 'SBP_GoogleLibraries_cache';
81
-
82
- /**
83
- * transient expiration
84
- *
85
- * @var int
86
- */
87
- protected static $cache_len = 90000; // 25 hours
88
-
89
- /**
90
- * Message displayed and logged when a WP_Scripts has been created
91
- * before it's time
92
- *
93
- * @var str
94
- */
95
- protected static $script_before_init_notice =
96
- 'Another plugin has registered or enqued a script before the "init" action. Attempting to work around it.';
97
-
98
- /**
99
- * Registry of scripts available from Google Libraries. Any extra
100
- * scripts listed here not provided by WordPress or another plugin
101
- * will not be registered. This list is just used to chancge where
102
- * things load from.
103
- *
104
- * Entries are in the format:
105
- * <code>
106
- * 'script-handle' => array(
107
- * 'google-lib-path',
108
- * 'google-file-name',
109
- * 'google-combined-into'
110
- * )
111
- * </code>
112
- *
113
- * @var array
114
- */
115
- protected static $default_google_scripts = array(
116
- /* jQuery */
117
- 'jquery' => array( 'jquery', 'jquery.min', '' ),
118
-
119
- /* jQuery UI */
120
- 'jquery-ui-core' => array( 'jqueryui', 'jquery-ui.min', '' ),
121
- 'jquery-ui-accordion' => array( '', '', 'jquery-ui-core' ),
122
- 'jquery-ui-autocomplete' => array( '', '', 'jquery-ui-core' ), /* jQueri UI 1.8 */
123
- 'jquery-ui-button' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */
124
- 'jquery-ui-datepicker' => array( '', '', 'jquery-ui-core' ),
125
- 'jquery-ui-dialog' => array( '', '', 'jquery-ui-core' ),
126
- 'jquery-ui-draggable' => array( '', '', 'jquery-ui-core' ),
127
- 'jquery-ui-droppable' => array( '', '', 'jquery-ui-core' ),
128
- 'jquery-ui-menu' => array( '', '', 'jquery-ui-core' ),
129
- 'jquery-ui-mouse' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */
130
- 'jquery-ui-position' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */
131
- 'jquery-ui-progressbar' => array( '', '', 'jquery-ui-core' ),
132
- 'jquery-ui-resizable' => array( '', '', 'jquery-ui-core' ),
133
- 'jquery-ui-selectable' => array( '', '', 'jquery-ui-core' ),
134
- 'jquery-ui-slider' => array( '', '', 'jquery-ui-core' ),
135
- 'jquery-ui-sortable' => array( '', '', 'jquery-ui-core' ),
136
- 'jquery-ui-tabs' => array( '', '', 'jquery-ui-core' ),
137
- 'jquery-ui-widget' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */
138
-
139
- /* jQuery Effects */
140
- 'jquery-effects-core' => array( '', '', 'jquery-ui-core' ),
141
- 'jquery-effects-blind' => array( '', '', 'jquery-ui-core' ),
142
- 'jquery-effects-bounce' => array( '', '', 'jquery-ui-core' ),
143
- 'jquery-effects-clip' => array( '', '', 'jquery-ui-core' ),
144
- 'jquery-effects-drop' => array( '', '', 'jquery-ui-core' ),
145
- 'jquery-effects-explode' => array( '', '', 'jquery-ui-core' ),
146
- 'jquery-effects-fade' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */
147
- 'jquery-effects-fold' => array( '', '', 'jquery-ui-core' ),
148
- 'jquery-effects-highlight' => array( '', '', 'jquery-ui-core' ),
149
- 'jquery-effects-pulsate' => array( '', '', 'jquery-ui-core' ),
150
- 'jquery-effects-scale' => array( '', '', 'jquery-ui-core' ),
151
- 'jquery-effects-shake' => array( '', '', 'jquery-ui-core' ),
152
- 'jquery-effects-slide' => array( '', '', 'jquery-ui-core' ),
153
- 'jquery-effects-transfer' => array( '', '', 'jquery-ui-core' ),
154
-
155
- /* prototype */
156
- 'prototype' => array( 'prototype', 'prototype', '' ),
157
-
158
- /* scriptaculous */
159
- 'scriptaculous-root' => array( 'scriptaculous', 'scriptaculous', '' ),
160
- 'scriptaculous-builder' => array( '', '', 'scriptaculous-root' ),
161
- 'scriptaculous-effects' => array( '', '', 'scriptaculous-root' ),
162
- 'scriptaculous-dragdrop' => array( '', '', 'scriptaculous-root' ),
163
- 'scriptaculous-controls' => array( '', '', 'scriptaculous-root' ),
164
- 'scriptaculous-slider' => array( '', '', 'scriptaculous-root' ),
165
- 'scriptaculous-sound' => array( '', '', 'scriptaculous-root' ),
166
-
167
- /* moo tools */
168
- 'mootools' => array( 'mootools', 'mootools-yui-compressed', '' ),
169
-
170
- /* Dojo */
171
- 'dojo' => array( 'dojo', 'dojo.xd', '' ),
172
-
173
- /* swfobject */
174
- 'swfobject' => array( 'swfobject', 'swfobject', '' ),
175
-
176
- /* YUI */
177
- 'yui' => array( 'yui', 'build/yuiloader/yuiloader-min', '' ),
178
-
179
- /* Ext Core */
180
- 'ext-core' => array( 'ext-core', 'ext-core', '' )
181
-
182
- );
183
-
184
- /**
185
- * PHP 5 Constructor
186
- */
187
- function __construct() {
188
- $this->jquery_tag = 'jquery';
189
- $this->google_scripts = self::$default_google_scripts;
190
-
191
- $this->noconflict_next = FALSE;
192
- // protocol-relative URLS accepted by `wp_register_scripts`
193
- // starting with version 3.5
194
- $this->protocol_relative_supported = version_compare(
195
- get_bloginfo( 'version' ), '3.5', '>='
196
- );
197
- }
198
-
199
- static function configure_plugin() {
200
- add_action(
201
- 'wp_default_scripts',
202
- array(
203
- 'SBP_GoogleLibraries',
204
- 'replace_default_scripts_action',
205
- ),
206
- 1000
207
- );
208
- add_filter(
209
- 'script_loader_src',
210
- array( 'SBP_GoogleLibraries', 'remove_ver_query_filter' ),
211
- 1000
212
- );
213
- add_filter(
214
- 'init',
215
- array( 'SBP_GoogleLibraries', 'setup_filter' )
216
- );
217
-
218
- // There's a chance some plugin has called wp_enqueue_script
219
- // outside of any hooks, which means that this plugin's
220
- // 'wp_default_scripts' hook will never get a chance to fire.
221
- // This tries to work around that.
222
- global $wp_scripts;
223
- if ( is_a( $wp_scripts, 'WP_Scripts' ) ) {
224
- self::debug( self::$script_before_init_notice );
225
- $ugl = self::get_instance();
226
- $ugl->replace_default_scripts( $wp_scripts );
227
- }
228
- }
229
-
230
- /**
231
- * Get markup to show error message in admin when $WP_Script
232
- * created before it's time
233
- *
234
- * @returns string markup for notice display
235
- */
236
- static function script_before_init_admin_notice() {
237
- echo '<div class="error fade"><p>Use Google Libraries: ' .
238
- self::$script_before_init_notice . '</p></div>';
239
- }
240
-
241
- static function setup_filter() {
242
- $ugl = self::get_instance();
243
- $ugl->setup();
244
- }
245
-
246
- /**
247
- * Log message if `WP_DEBUG` enabled.
248
- *
249
- * @since 1.5
250
- *
251
- * @param mixed $message string to log, or object to log via `print_r`
252
- */
253
- static function debug( $message ) {
254
- if ( WP_DEBUG !== false ) {
255
- if ( is_array( $message ) || is_object( $message ) ) {
256
- $message = var_export( $message, true );
257
- }
258
- error_log( 'Use Google Libraries: ' . $message );
259
- }
260
- }
261
-
262
- /**
263
- * Disables script concatination, which breaks when dependencies are not
264
- * all loaded locally.
265
- */
266
- function setup() {
267
- global $concatenate_scripts;
268
- $concatenate_scripts = false;
269
-
270
- }
271
-
272
- static function replace_default_scripts_action( &$scripts ) {
273
- $ugl = self::get_instance();
274
- $ugl->replace_default_scripts( $scripts );
275
- }
276
-
277
- /**
278
- * Sometimes WordPress registes `jquery.js` as `'jquery-core'`, while
279
- * '`jquery`' is some other script with a dependency on
280
- * `'jquery-core'`. If '`jquery-core`' in present in `$scripts`
281
- * this is assumed to be the case and update the registration for
282
- * '`jquery-core`' instead.
283
- *
284
- * @since 1.6
285
- *
286
- * @param object $scripts
287
- */
288
- protected function newscripts_fix_jquery_core( &$scripts ) {
289
- // jquery may really be loaded under jquery-core
290
- // if so, we'll adjust google_scripts here
291
- if ( $scripts->query( 'jquery-core' ) && array_key_exists( 'jquery', $this->google_scripts ) ) {
292
- $this->google_scripts['jquery-core'] = $this->google_scripts['jquery'];
293
- unset( $this->google_scripts['jquery'] );
294
- $this->jquery_tag = 'jquery-core';
295
- }
296
- }
297
-
298
- protected function newscripts_build_url( $name, $lib, $ver, $js, $orig_url ) {
299
-
300
- // if $lib is empty, then this script does not need to be
301
- // exlicitly loaded when using googleapis.com, but we need to keep
302
- // it around for dependencies
303
- if ( $lib != '' ) {
304
- // build new URL
305
- $url = "//ajax.googleapis.com/ajax/libs/$lib/$ver/$js.js";
306
- $head = wp_remote_head( "http:$url" );
307
- if ( wp_remote_retrieve_response_code( $head ) !== 200 ) {
308
- self::debug( "Google servers do not seem to be hosting requested version of $name (version $ver). Using version provided by WordPress." );
309
- return $orig_url;
310
- }
311
- if ( ! $this->protocol_relative_supported ) {
312
- return "http:$url";
313
- }
314
- return $url;
315
- } else {
316
- return '';
317
- }
318
- }
319
-
320
- /**
321
- * Collects replacement script registration data.
322
- *
323
- * Processes standard WordPress script registrations against list of
324
- * scripts hosted on Google's CDN. Will exclude any scripts that
325
- * contain '-' in the version number (used by WordPress devs to signify
326
- * a non-standard version). Also, the new url will be queried to ensure
327
- * it's valid (via `wp_remote_head`).
328
- *
329
- * @since 1.5
330
- *
331
- * @param object $scripts WP_Scripts object
332
- * @return array updated script registration data
333
- */
334
- function build_newscripts( &$scripts ) {
335
- $newscripts = array();
336
- $combine_ok = array();
337
-
338
- $this->newscripts_fix_jquery_core( $scripts );
339
-
340
- foreach ( $this->google_scripts as $name => $values ) {
341
- if ( $script = $scripts->query( $name ) ) {
342
- $lib = $values[0];
343
- $js = $values[1];
344
- $combined = $values[2];
345
- // default to requested ver
346
- $ver = $script->ver;
347
-
348
- if ( strpos( $ver, '-' ) !== false ) {
349
- self::debug( "WordPress appears to be requesting a non-standard version of $name (version $ver). Using version provided by WordPress to ensure compatability." );
350
- continue;
351
- }
352
-
353
- // TODO: replace with more flexible option
354
- // quick and dirty work around for scriptaculous 1.8.0
355
- if ( $name == 'scriptaculous-root' && $ver == '1.8.0' ) {
356
- $ver = '1.8';
357
- }
358
-
359
- if ( $combined !== '' ) {
360
- if ( ! in_array( $combined, $combine_ok ) ) {
361
- self::debug( "Google servers not hosting combined library for $name (version $ver). Using version provided by WordPress to ensure compatability." );
362
- continue;
363
- }
364
- if ( ! in_array( $combined, $script->deps ) ) {
365
- // if this script has been combined into another script
366
- // ensure this handle depends on the combined handle
367
- $script->deps[] = $combined;
368
- }
369
- }
370
-
371
- $script->src = $this->newscripts_build_url(
372
- $name, $lib, $ver, $js, $script->src
373
- );
374
-
375
- $newscripts[] = $script;
376
- $combine_ok[] = $name;
377
- }
378
- }
379
- return $newscripts;
380
-
381
- }
382
-
383
-
384
- /**
385
- * Get new script registration data.
386
- *
387
- * Attempts to load script registration data from the transient cache.
388
- * If not in cache, or if cached data is from a different version of
389
- * either WordPress or this plug-in, then it will be rebuilt. Also
390
- * handles forcing URLS to use SSL if site is currently loaded over
391
- * SSL.
392
- *
393
- * @since 1.5
394
- *
395
- * @param object $scripts WP_Scripts object
396
- * @return array updated script registration data
397
- */
398
- function get_newscripts( &$scripts ) {
399
- $wp_ver = get_bloginfo( 'version' );
400
- if ( false === ( $cache = get_transient( self::$cache_id ) ) ) {
401
- $cache = array();
402
- }
403
- if ( ( ! isset( $cache['ugl_ver'] ) ) || ( $cache['ugl_ver'] !== self::$version ) ||
404
- ( ! isset( $cache['wp_ver'] ) ) || ( $cache['wp_ver'] !== $wp_ver ) ||
405
- ( ! isset( $cache['newscripts'] ) ) ) {
406
- $newscripts = $this->build_newscripts( $scripts );
407
- $cache = array(
408
- 'ugl_ver' => self::$version,
409
- 'wp_ver' => $wp_ver,
410
- 'newscripts' => $newscripts,
411
- );
412
- set_transient( self::$cache_id, $cache, self::$cache_len );
413
- } else {
414
- $newscripts = $cache['newscripts'];
415
- }
416
- // need to handle ssl after cache load, because it may swap
417
- // back and forth depending on the site config/usage
418
- if ( ( ! $this->protocol_relative_supported ) && ( is_ssl() ) ) {
419
- foreach ( $newscripts as $script ) {
420
- $script->src = preg_replace( '/^http:/', 'https:', $script->src );
421
- }
422
- }
423
- return $newscripts;
424
- }
425
-
426
- /**
427
- * Replace as many of the WordPress default script registrations as
428
- * possible with ones from Google
429
- *
430
- * @param object $scripts WP_Scripts object.
431
- */
432
- function replace_default_scripts( &$scripts ) {
433
- $newscripts = $this->get_newscripts( $scripts );
434
- foreach ( $newscripts as $script ) {
435
- $olddata = $this->wp_dependency_get_data( $scripts, $script->handle );
436
- $scripts->remove( $script->handle );
437
- // re-register with original ver
438
- $scripts->add( $script->handle, $script->src, $script->deps, $script->ver );
439
- if ( $olddata ) {
440
- foreach ( $olddata as $data_name => $data ) {
441
- $scripts->add_data( $script->handle, $data_name, $data );
442
- }
443
- }
444
- }
445
- }
446
-
447
-
448
- function wp_dependency_get_data( $dep_obj, $handle, $data_name = false ) {
449
-
450
- if ( ! method_exists( $dep_obj, 'add_data' ) )
451
- return false;
452
-
453
- if ( ! isset( $dep_obj->registered[$handle] ) )
454
- return false;
455
-
456
- if ( ! $data_name )
457
- return $dep_obj->registered[$handle]->extra;
458
-
459
- if ( ! method_exists( $dep_obj, 'get_data' ) )
460
- return $dep_obj->registered[$handle]->extra[$data_name];
461
-
462
- return $dep_obj->get_data( $handle, $data_name );
463
- }
464
-
465
-
466
- /**
467
- * Remove 'ver' from query string for scripts loaded from Google's
468
- * CDN
469
- *
470
- * @param string $src src attribute of script tag
471
- * @return string Updated src attribute
472
- */
473
- function remove_ver_query( $src ) {
474
- if ( $this->noconflict_next ) {
475
- $this->noconflict_next = FALSE;
476
- echo self::$noconflict_inject; // xss ok
477
- }
478
- if ( preg_match( '/ajax\.googleapis\.com\//', $src ) ) {
479
- $src = remove_query_arg( 'ver', $src );
480
- if ( strpos( $src, $this->google_scripts[$this->jquery_tag][1] . '.js' ) ) {
481
- $this->noconflict_next = TRUE;
482
- }
483
- }
484
- return $src;
485
- }
486
-
487
- static function remove_ver_query_filter( $src ) {
488
- $ugl = self::get_instance();
489
- return $ugl->remove_ver_query( $src );
490
- }
491
- }
492
  }
1
+ <?php
2
+ /* Use Google Libraries 1.5.2 => Allows your site to use common javascript libraries from Google's AJAX Libraries CDN, rather than from WordPress's own copies. */
3
+ /* http://jasonpenney.net/wordpress-plugins/use-google-libraries/ */
4
+ /* Author & copyright (c) 2008-2013 : Jason Penney (email : jpenney@jczorkmid.net ). General Public License v.2.0 */
5
+
6
+
7
+ if ( ! class_exists( 'SBP_GoogleLibraries' ) ) {
8
+
9
+ class SBP_GoogleLibraries {
10
+
11
+ protected static $instance;
12
+ protected static $plugin_file = __FILE__;
13
+ protected static $version = '1.6dev';
14
+ protected static $noconflict_inject = "<script type='text/javascript'>try{jQuery.noConflict();}catch(e){};</script>\n";
15
+
16
+ public static function get_instance() {
17
+ if ( ! isset( self::$instance ) ) {
18
+ self::$instance = new SBP_GoogleLibraries();
19
+ }
20
+ return self::$instance;
21
+ }
22
+
23
+ /**
24
+ * Registry of script replacement rules
25
+ *
26
+ * Entries are formatted as follows:
27
+ * <code>
28
+ * 'script-handle' => array(
29
+ * 'google-lib-path',
30
+ * 'google-file-name',
31
+ * 'google-combined-into')
32
+ * </code>
33
+ *
34
+ * - 'script-handle' -- the handle used by WordPress script
35
+ * registration
36
+ * - 'google-lib-path' -- path to location on Google CDN( empty
37
+ * string if script has been combined).
38
+ * - 'google-file-name' -- file name (minus .js) on Google CDN (empty
39
+ * string if script has been combined).
40
+ * - 'google-combined-into' -- If not empty string, then the given
41
+ * handle has been combined into a file loaded by this handle.
42
+ *
43
+ * @var array
44
+ */
45
+ protected $google_scripts;
46
+
47
+ /**
48
+ * Used internally to ensure jQuery.noconflict is executed as close to
49
+ * how core WordPress would.
50
+ *
51
+ * @var bool
52
+ */
53
+ protected $noconflict_next;
54
+
55
+ /**
56
+ * script id used for actual jquery script
57
+ *
58
+ * @var string
59
+ *
60
+ * @since 5.2
61
+ */
62
+ protected $jquery_tag;
63
+
64
+ /**
65
+ * True if using a version of WordPress that allows
66
+ * `wp_register_script` to take protocol-relative URLs,
67
+ * otherwise False
68
+ *
69
+ * @since 1.5.2
70
+ *
71
+ * @var bool
72
+ */
73
+ protected $protocol_relative_supported;
74
+
75
+ /**
76
+ * transient name used when caching
77
+ *
78
+ * @var string
79
+ */
80
+ protected static $cache_id = 'SBP_GoogleLibraries_cache';
81
+
82
+ /**
83
+ * transient expiration
84
+ *
85
+ * @var int
86
+ */
87
+ protected static $cache_len = 90000; // 25 hours
88
+
89
+ /**
90
+ * Message displayed and logged when a WP_Scripts has been created
91
+ * before it's time
92
+ *
93
+ * @var str
94
+ */
95
+ protected static $script_before_init_notice =
96
+ 'Another plugin has registered or enqued a script before the "init" action. Attempting to work around it.';
97
+
98
+ /**
99
+ * Registry of scripts available from Google Libraries. Any extra
100
+ * scripts listed here not provided by WordPress or another plugin
101
+ * will not be registered. This list is just used to chancge where
102
+ * things load from.
103
+ *
104
+ * Entries are in the format:
105
+ * <code>
106
+ * 'script-handle' => array(
107
+ * 'google-lib-path',
108
+ * 'google-file-name',
109
+ * 'google-combined-into'
110
+ * )
111
+ * </code>
112
+ *
113
+ * @var array
114
+ */
115
+ protected static $default_google_scripts = array(
116
+ /* jQuery */
117
+ 'jquery' => array( 'jquery', 'jquery.min', '' ),
118
+
119
+ /* jQuery UI */
120
+ 'jquery-ui-core' => array( 'jqueryui', 'jquery-ui.min', '' ),
121
+ 'jquery-ui-accordion' => array( '', '', 'jquery-ui-core' ),
122
+ 'jquery-ui-autocomplete' => array( '', '', 'jquery-ui-core' ), /* jQueri UI 1.8 */
123
+ 'jquery-ui-button' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */
124
+ 'jquery-ui-datepicker' => array( '', '', 'jquery-ui-core' ),
125
+ 'jquery-ui-dialog' => array( '', '', 'jquery-ui-core' ),
126
+ 'jquery-ui-draggable' => array( '', '', 'jquery-ui-core' ),
127
+ 'jquery-ui-droppable' => array( '', '', 'jquery-ui-core' ),
128
+ 'jquery-ui-menu' => array( '', '', 'jquery-ui-core' ),
129
+ 'jquery-ui-mouse' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */
130
+ 'jquery-ui-position' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */
131
+ 'jquery-ui-progressbar' => array( '', '', 'jquery-ui-core' ),
132
+ 'jquery-ui-resizable' => array( '', '', 'jquery-ui-core' ),
133
+ 'jquery-ui-selectable' => array( '', '', 'jquery-ui-core' ),
134
+ 'jquery-ui-slider' => array( '', '', 'jquery-ui-core' ),
135
+ 'jquery-ui-sortable' => array( '', '', 'jquery-ui-core' ),
136
+ 'jquery-ui-tabs' => array( '', '', 'jquery-ui-core' ),
137
+ 'jquery-ui-widget' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */
138
+
139
+ /* jQuery Effects */
140
+ 'jquery-effects-core' => array( '', '', 'jquery-ui-core' ),
141
+ 'jquery-effects-blind' => array( '', '', 'jquery-ui-core' ),
142
+ 'jquery-effects-bounce' => array( '', '', 'jquery-ui-core' ),
143
+ 'jquery-effects-clip' => array( '', '', 'jquery-ui-core' ),
144
+ 'jquery-effects-drop' => array( '', '', 'jquery-ui-core' ),
145
+ 'jquery-effects-explode' => array( '', '', 'jquery-ui-core' ),
146
+ 'jquery-effects-fade' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */
147
+ 'jquery-effects-fold' => array( '', '', 'jquery-ui-core' ),
148
+ 'jquery-effects-highlight' => array( '', '', 'jquery-ui-core' ),
149
+ 'jquery-effects-pulsate' => array( '', '', 'jquery-ui-core' ),
150
+ 'jquery-effects-scale' => array( '', '', 'jquery-ui-core' ),
151
+ 'jquery-effects-shake' => array( '', '', 'jquery-ui-core' ),
152
+ 'jquery-effects-slide' => array( '', '', 'jquery-ui-core' ),
153
+ 'jquery-effects-transfer' => array( '', '', 'jquery-ui-core' ),
154
+
155
+ /* prototype */
156
+ 'prototype' => array( 'prototype', 'prototype', '' ),
157
+
158
+ /* scriptaculous */
159
+ 'scriptaculous-root' => array( 'scriptaculous', 'scriptaculous', '' ),
160
+ 'scriptaculous-builder' => array( '', '', 'scriptaculous-root' ),
161
+ 'scriptaculous-effects' => array( '', '', 'scriptaculous-root' ),
162
+ 'scriptaculous-dragdrop' => array( '', '', 'scriptaculous-root' ),
163
+ 'scriptaculous-controls' => array( '', '', 'scriptaculous-root' ),
164
+ 'scriptaculous-slider' => array( '', '', 'scriptaculous-root' ),
165
+ 'scriptaculous-sound' => array( '', '', 'scriptaculous-root' ),
166
+
167
+ /* moo tools */
168
+ 'mootools' => array( 'mootools', 'mootools-yui-compressed', '' ),
169
+
170
+ /* Dojo */
171
+ 'dojo' => array( 'dojo', 'dojo.xd', '' ),
172
+
173
+ /* swfobject */
174
+ 'swfobject' => array( 'swfobject', 'swfobject', '' ),
175
+
176
+ /* YUI */
177
+ 'yui' => array( 'yui', 'build/yuiloader/yuiloader-min', '' ),
178
+
179
+ /* Ext Core */
180
+ 'ext-core' => array( 'ext-core', 'ext-core', '' )
181
+
182
+ );
183
+
184
+ /**
185
+ * PHP 5 Constructor
186
+ */
187
+ function __construct() {
188
+ $this->jquery_tag = 'jquery';
189
+ $this->google_scripts = self::$default_google_scripts;
190
+
191
+ $this->noconflict_next = FALSE;
192
+ // protocol-relative URLS accepted by `wp_register_scripts`
193
+ // starting with version 3.5
194
+ $this->protocol_relative_supported = version_compare(
195
+ get_bloginfo( 'version' ), '3.5', '>='
196
+ );
197
+ }
198
+
199
+ static function configure_plugin() {
200
+ add_action(
201
+ 'wp_default_scripts',
202
+ array(
203
+ 'SBP_GoogleLibraries',
204
+ 'replace_default_scripts_action',
205
+ ),
206
+ 1000
207
+ );
208
+ add_filter(
209
+ 'script_loader_src',
210
+ array( 'SBP_GoogleLibraries', 'remove_ver_query_filter' ),
211
+ 1000
212
+ );
213
+ add_filter(
214
+ 'init',
215
+ array( 'SBP_GoogleLibraries', 'setup_filter' )
216
+ );
217
+
218
+ // There's a chance some plugin has called wp_enqueue_script
219
+ // outside of any hooks, which means that this plugin's
220
+ // 'wp_default_scripts' hook will never get a chance to fire.
221
+ // This tries to work around that.
222
+ global $wp_scripts;
223
+ if ( is_a( $wp_scripts, 'WP_Scripts' ) ) {
224
+ self::debug( self::$script_before_init_notice );
225
+ $ugl = self::get_instance();
226
+ $ugl->replace_default_scripts( $wp_scripts );
227
+ }
228
+ }
229
+
230
+ /**
231
+ * Get markup to show error message in admin when $WP_Script
232
+ * created before it's time
233
+ *
234
+ * @returns string markup for notice display
235
+ */
236
+ static function script_before_init_admin_notice() {
237
+ echo '<div class="error fade"><p>Use Google Libraries: ' .
238
+ self::$script_before_init_notice . '</p></div>';
239
+ }
240
+
241
+ static function setup_filter() {
242
+ $ugl = self::get_instance();
243
+ $ugl->setup();
244
+ }
245
+
246
+ /**
247
+ * Log message if `WP_DEBUG` enabled.
248
+ *
249
+ * @since 1.5
250
+ *
251
+ * @param mixed $message string to log, or object to log via `print_r`
252
+ */
253
+ static function debug( $message ) {
254
+ if ( WP_DEBUG !== false ) {
255
+ if ( is_array( $message ) || is_object( $message ) ) {
256
+ $message = var_export( $message, true );
257
+ }
258
+ error_log( 'Use Google Libraries: ' . $message );
259
+ }
260
+ }
261
+
262
+ /**
263
+ * Disables script concatination, which breaks when dependencies are not
264
+ * all loaded locally.
265
+ */
266
+ function setup() {
267
+ global $concatenate_scripts;
268
+ $concatenate_scripts = false;
269
+
270
+ }
271
+
272
+ static function replace_default_scripts_action( &$scripts ) {
273
+ $ugl = self::get_instance();
274
+ $ugl->replace_default_scripts( $scripts );
275
+ }
276
+
277
+ /**
278
+ * Sometimes WordPress registes `jquery.js` as `'jquery-core'`, while
279
+ * '`jquery`' is some other script with a dependency on
280
+ * `'jquery-core'`. If '`jquery-core`' in present in `$scripts`
281
+ * this is assumed to be the case and update the registration for
282
+ * '`jquery-core`' instead.
283
+ *
284
+ * @since 1.6
285
+ *
286
+ * @param object $scripts
287
+ */
288
+ protected function newscripts_fix_jquery_core( &$scripts ) {
289
+ // jquery may really be loaded under jquery-core
290
+ // if so, we'll adjust google_scripts here
291
+ if ( $scripts->query( 'jquery-core' ) && array_key_exists( 'jquery', $this->google_scripts ) ) {
292
+ $this->google_scripts['jquery-core'] = $this->google_scripts['jquery'];
293
+ unset( $this->google_scripts['jquery'] );
294
+ $this->jquery_tag = 'jquery-core';
295
+ }
296
+ }
297
+
298
+ protected function newscripts_build_url( $name, $lib, $ver, $js, $orig_url ) {
299
+
300
+ // if $lib is empty, then this script does not need to be
301
+ // exlicitly loaded when using googleapis.com, but we need to keep
302
+ // it around for dependencies
303
+ if ( $lib != '' ) {
304
+ // build new URL
305
+ $url = "//ajax.googleapis.com/ajax/libs/$lib/$ver/$js.js";
306
+ $head = wp_remote_head( "http:$url" );
307
+ if ( wp_remote_retrieve_response_code( $head ) !== 200 ) {
308
+ self::debug( "Google servers do not seem to be hosting requested version of $name (version $ver). Using version provided by WordPress." );
309
+ return $orig_url;
310
+ }
311
+ if ( ! $this->protocol_relative_supported ) {
312
+ return "http:$url";
313
+ }
314
+ return $url;
315
+ } else {
316
+ return '';
317
+ }
318
+ }
319
+
320
+ /**
321
+ * Collects replacement script registration data.
322
+ *
323
+ * Processes standard WordPress script registrations against list of
324
+ * scripts hosted on Google's CDN. Will exclude any scripts that
325
+ * contain '-' in the version number (used by WordPress devs to signify
326
+ * a non-standard version). Also, the new url will be queried to ensure
327
+ * it's valid (via `wp_remote_head`).
328
+ *
329
+ * @since 1.5
330
+ *
331
+ * @param object $scripts WP_Scripts object
332
+ * @return array updated script registration data
333
+ */
334
+ function build_newscripts( &$scripts ) {
335
+ $newscripts = array();
336
+ $combine_ok = array();
337
+
338
+ $this->newscripts_fix_jquery_core( $scripts );
339
+
340
+ foreach ( $this->google_scripts as $name => $values ) {
341
+ if ( $script = $scripts->query( $name ) ) {
342
+ $lib = $values[0];
343
+ $js = $values[1];
344
+ $combined = $values[2];
345
+ // default to requested ver
346
+ $ver = $script->ver;
347
+
348
+ if ( strpos( $ver, '-' ) !== false ) {
349
+ self::debug( "WordPress appears to be requesting a non-standard version of $name (version $ver). Using version provided by WordPress to ensure compatability." );
350
+ continue;
351
+ }
352
+
353
+ // TODO: replace with more flexible option
354
+ // quick and dirty work around for scriptaculous 1.8.0
355
+ if ( $name == 'scriptaculous-root' && $ver == '1.8.0' ) {
356
+ $ver = '1.8';
357
+ }
358
+
359
+ if ( $combined !== '' ) {
360
+ if ( ! in_array( $combined, $combine_ok ) ) {
361
+ self::debug( "Google servers not hosting combined library for $name (version $ver). Using version provided by WordPress to ensure compatability." );
362
+ continue;
363
+ }
364
+ if ( ! in_array( $combined, $script->deps ) ) {
365
+ // if this script has been combined into another script
366
+ // ensure this handle depends on the combined handle
367
+ $script->deps[] = $combined;
368
+ }
369
+ }
370
+
371
+ $script->src = $this->newscripts_build_url(
372
+ $name, $lib, $ver, $js, $script->src
373
+ );
374
+
375
+ $newscripts[] = $script;
376
+ $combine_ok[] = $name;
377
+ }
378
+ }
379
+ return $newscripts;
380
+
381
+ }
382
+
383
+
384
+ /**
385
+ * Get new script registration data.
386
+ *
387
+ * Attempts to load script registration data from the transient cache.
388
+ * If not in cache, or if cached data is from a different version of
389
+ * either WordPress or this plug-in, then it will be rebuilt. Also
390
+ * handles forcing URLS to use SSL if site is currently loaded over
391
+ * SSL.
392
+ *
393
+ * @since 1.5
394
+ *
395
+ * @param object $scripts WP_Scripts object
396
+ * @return array updated script registration data
397
+ */
398
+ function get_newscripts( &$scripts ) {
399
+ $wp_ver = get_bloginfo( 'version' );
400
+ if ( false === ( $cache = get_transient( self::$cache_id ) ) ) {
401
+ $cache = array();
402
+ }
403
+ if ( ( ! isset( $cache['ugl_ver'] ) ) || ( $cache['ugl_ver'] !== self::$version ) ||
404
+ ( ! isset( $cache['wp_ver'] ) ) || ( $cache['wp_ver'] !== $wp_ver ) ||
405
+ ( ! isset( $cache['newscripts'] ) ) ) {
406
+ $newscripts = $this->build_newscripts( $scripts );
407
+ $cache = array(
408
+ 'ugl_ver' => self::$version,
409
+ 'wp_ver' => $wp_ver,
410
+ 'newscripts' => $newscripts,
411
+ );
412
+ set_transient( self::$cache_id, $cache, self::$cache_len );
413
+ } else {
414
+ $newscripts = $cache['newscripts'];
415
+ }
416
+ // need to handle ssl after cache load, because it may swap
417
+ // back and forth depending on the site config/usage
418
+ if ( ( ! $this->protocol_relative_supported ) && ( is_ssl() ) ) {
419
+ foreach ( $newscripts as $script ) {
420
+ $script->src = preg_replace( '/^http:/', 'https:', $script->src );
421
+ }
422
+ }
423
+ return $newscripts;
424
+ }
425
+
426
+ /**
427
+ * Replace as many of the WordPress default script registrations as
428
+ * possible with ones from Google
429
+ *
430
+ * @param object $scripts WP_Scripts object.
431
+ */
432
+ function replace_default_scripts( &$scripts ) {
433
+ $newscripts = $this->get_newscripts( $scripts );
434
+ foreach ( $newscripts as $script ) {
435
+ $olddata = $this->wp_dependency_get_data( $scripts, $script->handle );
436
+ $scripts->remove( $script->handle );
437
+ // re-register with original ver
438
+ $scripts->add( $script->handle, $script->src, $script->deps, $script->ver );
439
+ if ( $olddata ) {
440
+ foreach ( $olddata as $data_name => $data ) {
441
+ $scripts->add_data( $script->handle, $data_name, $data );
442
+ }
443
+ }
444
+ }
445
+ }
446
+
447
+
448
+ function wp_dependency_get_data( $dep_obj, $handle, $data_name = false ) {
449
+
450
+ if ( ! method_exists( $dep_obj, 'add_data' ) )
451
+ return false;
452
+
453
+ if ( ! isset( $dep_obj->registered[$handle] ) )
454
+ return false;
455
+
456
+ if ( ! $data_name )
457
+ return $dep_obj->registered[$handle]->extra;
458
+
459
+ if ( ! method_exists( $dep_obj, 'get_data' ) )
460
+ return $dep_obj->registered[$handle]->extra[$data_name];
461
+
462
+ return $dep_obj->get_data( $handle, $data_name );
463
+ }
464
+
465
+
466
+ /**
467
+ * Remove 'ver' from query string for scripts loaded from Google's
468
+ * CDN
469
+ *
470
+ * @param string $src src attribute of script tag
471
+ * @return string Updated src attribute
472
+ */
473
+ function remove_ver_query( $src ) {
474
+ if ( $this->noconflict_next ) {
475
+ $this->noconflict_next = FALSE;
476
+ echo self::$noconflict_inject; // xss ok
477
+ }
478
+ if ( preg_match( '/ajax\.googleapis\.com\//', $src ) ) {
479
+ $src = remove_query_arg( 'ver', $src );
480
+ if ( strpos( $src, $this->google_scripts[$this->jquery_tag][1] . '.js' ) ) {
481
+ $this->noconflict_next = TRUE;
482
+ }
483
+ }
484
+ return $src;
485
+ }
486
+
487
+ static function remove_ver_query_filter( $src ) {
488
+ $ugl = self::get_instance();
489
+ return $ugl->remove_ver_query( $src );
490
+ }
491
+ }
492
  }
readme.txt CHANGED
@@ -1,204 +1,206 @@
1
- === Speed Booster Pack ===
2
- Contributors: machothemes
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.8
7
- Stable tag: 3.6
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
-
11
- A light, frequently updated and easy to use plugin to make your site load faster and score higher on Google PSI.
12
-
13
- == Description ==
14
-
15
- **Speed Booster Pack is a lightweight, frequently updated, easy to use and well supported plugin which allows you to improve your website's loading speed.**
16
-
17
- Improving your site's speed will get you a better score on major speed testing services such as [Google PageSpeed](http://developers.google.com/speed/pagespeed/insights/), [GTmetrix](http://gtmetrix.com/), [YSlow](https://developer.yahoo.com/yslow/), [Pingdom](http://tools.pingdom.com/fpt/), [Webpagetest](http://www.webpagetest.org/) and will also improve your overall site's usability. This will persuade Google and other search engines to rank your site higher in search results thus sending more traffic.
18
-
19
- = Why Site Speed Is Important? =
20
-
21
- Visitors usually close a website if it doesn't load in a few seconds and the slower a site loads the greater the chances are that the visitors will leave. And you don't want that to happen, do you? :-)
22
- Speed Booster Pack is a plugin that can help you speed up your website by tweaking different options.
23
-
24
- = Main Plugin Features =
25
-
26
- * **Eliminate external render-blocking javascript and css** in above-the-fold content.
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
- * ** Minify HTML and JavaScript to increase your page load speed.
31
- * **Lazy loads images** to improve page load times and save bandwidth.
32
- * **Change image compression level** to keep file sizes smaller; Change JPG quality.
33
- * **Load javascript files from Google Libraries** rather than serving them from your WordPress install directly, to reduce latency, increase parallelism and improve browser caching.
34
- * **Defer parsing of javascript files** to reduce the initial load time of your page.
35
- * **Remove query strings from static resources** to improve your speed scores.
36
- * **Remove extra Font Awesome stylesheets** added to your theme by certain plugins, if *Font Awesome* is already used in your theme.
37
- * **Remove junk header tags** to clean up your WordPress Header.
38
- * **Display page loading time** in the plugin options page.
39
- * **Display the number of executed SQL queries** in the plugin options page.
40
- * **Display the Peak Memory Used** in the plugin options page.
41
- * **Exclude scripts** from being moved to the footer or defered.
42
- * **Remove RSD Link** if you are not using a Weblog Client or some 3rd party sites/programs that use the XML-RPC request formats.
43
- * **Remove WordPress Shortlink**
44
- * **Remove the WordPress Version** this option is added for security reasons and cleaning the header.
45
- * **Remove all rss feed links** to cleanup your WordPress header.
46
-
47
- * For complete usage instructions visit [Plugin Documentation](http://docs.machothemes.com/category/118-speed-booster)
48
-
49
- A short video about how Speed Booster pack can help actually increase a website's score in Google PageSpeed Insights:
50
-
51
- https://www.youtube.com/watch?v=u0G6pk2mX4M
52
-
53
- Future Development:
54
-
55
- * Enable compression option.
56
- * Leverage browser caching.
57
- * Option to disable specific plugin actions on specific pages directly via the page edit screen metabox.
58
- * Option to keep specific scripts in the header, since there are many javascript-based plugins scripts, that rely on jQuery to be loaded prior to the HTML elements.
59
-
60
- = Recommended Plugins =
61
-
62
- * [Simple Author Box](http://wordpress.org/plugins/simple-author-box/) - A simple but cool author box with social icons.
63
-
64
- **About us:**
65
- We are a young team of WordPress aficionados who love building WordPress plugins & <a href="https://www.machothemes.com/" target="_blank" title="Premium WordPress themes">Premium WordPress themes</a> over on our theme shop. We’re also blogging and wish to help our users find the <a href="https://www.machothemes.com/blog/best-cheap-wordpress-hosting/" target="_blank" title="Best Cheap WordPress Hosting">Best Cheap WordPress Hosting</a> available on the market. Check out our blog.
66
-
67
-
68
- == Installation ==
69
-
70
- 1. Download the plugin (.zip file) on your hard drive.
71
- 2. Unzip the zip file contents.
72
- 3. Upload the `speed-booster-pack` folder to the `/wp-content/plugins/` directory.
73
- 4. Activate the plugin through the 'Plugins' menu in WordPress.
74
- 5. A new sub menu item `Speed Booster Pack` will appear in your main Settings menu.
75
-
76
- == Screenshots ==
77
- 1. Plugin options page, simple view (v2.5)
78
-
79
- == Changelog ==
80
-
81
- = 3.6 =
82
- * Changed contributors and fixed a few bugs. Plugin is now under new ownership.
83
-
84
- = 3.5 =
85
- * Fix compatibility with the CrazyLazy plugin.
86
-
87
- = 3.4 =
88
- * Added an option to increase your page load speed by minifying JavaScript and HTML. Removed option to remove RSD Link, since its impact on improving speed was insignificant.
89
-
90
- = 3.3 =
91
- * Fix Lazy Load CSS problem.
92
-
93
- = 3.2 =
94
- * Added Lazy Load feature to improve the web page loading times of your images.
95
-
96
- = 3.1 =
97
- * Following requests from users, added back the option of excluding javascript elements.
98
-
99
- = 3.0 =
100
- * We removed the option of excluding javascript elements as this option falls page speed score, making this plugin almost useless. Also, these options were only for advanced users, for regular users, incorrect use these options could destabilize the entire site functionality.
101
- * We also removed the lazy load images option because it was outdated and broken. We'll come up with a new and updated solution soon.
102
-
103
- = 2.9 =
104
- * Added a new recommended features that can make your site load faster
105
-
106
- = 2.8 =
107
- * Fixed plugin options visibility issue
108
-
109
- = 2.7 =
110
- * All important options switched to off by default (on first plugin activation).
111
-
112
- = 2.6 =
113
- * Added Spanish translation by [Andrew Kurtis](http://www.webhostinghub.com/)
114
-
115
- = 2.5 =
116
- * Added option to exclude certain JS files from being moved to the footer.
117
- * Added option to exclude certain JS files from being defered.
118
- * Added a list of handles of all scripts and styles enqueued by your theme, useful for excluding options.
119
- * Removed FOUC option since is useless with W3 Total Cache.
120
- * Some visual changes on plugin options page.
121
- * Translation updated with the new strings.
122
- * Moved some admin inline scripts to js files.
123
-
124
- = 2.4 =
125
- * Fixed TypeError: $ is not a function when Prevent Flash of Unstyled Content (FOUC) option is active. Thanks to [@Marcio Duarte](http://profiles.wordpress.org/pagelab) for the [bug report](http://wordpress.org/support/topic/javascript-error-53).
126
-
127
- = 2.3 =
128
- * Added option to exclude certain CSS files from being loaded asynchronously.
129
- * Changed the position of the styles when they are inlined to the footer (before js files).
130
- * Added an experimental option to eliminate flash of unstyled content (FOUC) when all CSS styles are inlined to the footer.
131
- * Translations updated.
132
-
133
- = 2.2 =
134
- * Fixed option to disable all CSS Async features on mobile devices.
135
- * Fixed incompatibility with WPtouch plugin. Thanks to [@DevilIce](http://profiles.wordpress.org/devilice) for the [bug report](http://wordpress.org/support/topic/css-asynchronously-and-wptouch-issue).
136
- * Updated function wp_is_mobile() on lazy load images to really disabled this feature on mobile devices.
137
-
138
- = 2.1 =
139
- *Added an option to disable all CSS Async features on mobile devices, to avoid some appearance issues until finding a clean solution to fix it.
140
-
141
- = 2.0 =
142
- *Modified: amended previous except for the admin toolbar css to enqueue its stylesheets only if admin bar is showing, to not break the render blocking plugin option.
143
-
144
- = 1.9 =
145
- * Fix: breaking the SEO by Yoast plugin interface (perhaps as well as to others too). Thanks to [@JahLive](http://profiles.wordpress.org/jahlive) for the [bug report](http://wordpress.org/support/topic/yoast-wordpress-seo-broken-after-update).
146
- * Added an except for the admin toolbar css since the Load CSS asynchronously option removes its dashicons and stylesheets.
147
-
148
-
149
- = 1.8 =
150
- * Added option to load CSS asynchronously to render your page more quickly and get a higher score on the major speed testing services
151
- * Added option to inline and minify all CSS styles and move them to the header or to the footer, to eliminate external render-blocking CSS and optimize CSS delivery.
152
- * Added option to change the default image compression level, to help your pages load faster and keep file sizes smaller.
153
- * Added memory usage information and active plugins number in the plugin options page.
154
- * Replaced PHP version info with memory usage information (more useful).
155
- * Added Romanian translation and POT file. Translators are welcome!
156
-
157
- = 1.7 =
158
- * Fixed Lazy Load missed js.
159
-
160
- = 1.6 =
161
- * Fixed some errors and missed codes from plugin functions.
162
-
163
- = 1.5 =
164
- * Added Lazy Load feature to improve the web page loading times of your images.
165
- * Added an option to remove all rss feed links from WP Head.
166
- * Added plugin options informations to the footer, visible in page source(hidden in front end), useful for debugging.
167
-
168
- = 1.4 =
169
- * Added a new option to remove extra Font Awesome stylesheets added to your theme by certain plugins, if Font Awesome is already used in your theme.
170
- * Added a new option to remove WordPress Version Number.
171
-
172
- = 1.3 =
173
- * Fixed strict standards error: redefining already defined constructor for class.
174
-
175
- = 1.2 =
176
- * Modified the plugin version number variable in plugin options page.
177
-
178
- = 1.1 =
179
- * Modified Readme file
180
-
181
- = 1.0 =
182
- * Initial release
183
-
184
- == Page Load Stats ==
185
-
186
- Page Load Stats is a brief statistic displayed in the plugin options page. It displays your homepage loading speed (in seconds) and number of processed queries.
187
-
188
- **Page loading time** – the progress bar color will be:
189
-
190
- * *green* if the page load takes less than a second
191
- * *orange* when loading the page takes between 1 and 2 seconds
192
- * *red* if the page loading takes longer than 2 seconds
193
-
194
- **Number of executed queries** – the progress bar color will be:
195
-
196
- * *green* if there were less than 100 queries
197
- * *orange* if there were between 100 and 200 queries
198
- * *red* if the page required more than 200 queries
199
-
200
- == Credits ==
201
-
202
- * Thanks to [Jason Penney](http://jasonpenney.net/) for Google Libraries feature.
203
- * CSS option was implemented from Async JS and CSS plugin and updated to our plugin.
204
- * Credits for Lazy Load feature belongs to [pluginkollektiv](https://github.com/pluginkollektiv/crazy-lazy)
 
 
1
+ === Speed Booster Pack ===
2
+ Contributors: machothemes
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.9
7
+ Stable tag: 3.6.1
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ A light, frequently updated and easy to use plugin to make your site load faster and score higher on Google PSI.
12
+
13
+ == Description ==
14
+
15
+ **Speed Booster Pack is a lightweight, frequently updated, easy to use and well supported plugin which allows you to improve your website's loading speed.**
16
+
17
+ Improving your site's speed will get you a better score on major speed testing services such as [Google PageSpeed](http://developers.google.com/speed/pagespeed/insights/), [GTmetrix](http://gtmetrix.com/), [YSlow](https://developer.yahoo.com/yslow/), [Pingdom](http://tools.pingdom.com/fpt/), [Webpagetest](http://www.webpagetest.org/) and will also improve your overall site's usability. This will persuade Google and other search engines to rank your site higher in search results thus sending more traffic.
18
+
19
+ = Why Site Speed Is Important? =
20
+
21
+ Visitors usually close a website if it doesn't load in a few seconds and the slower a site loads the greater the chances are that the visitors will leave. And you don't want that to happen, do you? :-)
22
+ Speed Booster Pack is a plugin that can help you speed up your website by tweaking different options.
23
+
24
+ = Main Plugin Features =
25
+
26
+ * **Eliminate external render-blocking javascript and css** in above-the-fold content.
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
+ * ** Minify HTML and JavaScript to increase your page load speed.
31
+ * **Lazy loads images** to improve page load times and save bandwidth.
32
+ * **Change image compression level** to keep file sizes smaller; Change JPG quality.
33
+ * **Load javascript files from Google Libraries** rather than serving them from your WordPress install directly, to reduce latency, increase parallelism and improve browser caching.
34
+ * **Defer parsing of javascript files** to reduce the initial load time of your page.
35
+ * **Remove query strings from static resources** to improve your speed scores.
36
+ * **Remove extra Font Awesome stylesheets** added to your theme by certain plugins, if *Font Awesome* is already used in your theme.
37
+ * **Remove junk header tags** to clean up your WordPress Header.
38
+ * **Display page loading time** in the plugin options page.
39
+ * **Display the number of executed SQL queries** in the plugin options page.
40
+ * **Display the Peak Memory Used** in the plugin options page.
41
+ * **Exclude scripts** from being moved to the footer or defered.
42
+ * **Remove RSD Link** if you are not using a Weblog Client or some 3rd party sites/programs that use the XML-RPC request formats.
43
+ * **Remove WordPress Shortlink**
44
+ * **Remove the WordPress Version** this option is added for security reasons and cleaning the header.
45
+ * **Remove all rss feed links** to cleanup your WordPress header.
46
+
47
+ * For complete usage instructions visit [Plugin Documentation](http://docs.machothemes.com/category/118-speed-booster)
48
+
49
+ A short video about how Speed Booster pack can help actually increase a website's score in Google PageSpeed Insights:
50
+
51
+ https://www.youtube.com/watch?v=u0G6pk2mX4M
52
+
53
+ Future Development:
54
+
55
+ * Enable compression option.
56
+ * Leverage browser caching.
57
+ * Option to disable specific plugin actions on specific pages directly via the page edit screen metabox.
58
+ * Option to keep specific scripts in the header, since there are many javascript-based plugins scripts, that rely on jQuery to be loaded prior to the HTML elements.
59
+
60
+ = Recommended Plugins =
61
+
62
+ * [Simple Author Box](http://wordpress.org/plugins/simple-author-box/) - A simple but cool author box with social icons.
63
+
64
+ **About us:**
65
+ We are a young team of WordPress aficionados who love building WordPress plugins & <a href="https://www.machothemes.com/" target="_blank" title="Premium WordPress themes">Premium WordPress themes</a> over on our theme shop. We’re also blogging and wish to help our users find the <a href="https://www.machothemes.com/blog/best-cheap-wordpress-hosting/" target="_blank" title="Best Cheap WordPress Hosting">Best Cheap WordPress Hosting</a> available on the market. Check out our blog.
66
+
67
+
68
+ == Installation ==
69
+
70
+ 1. Download the plugin (.zip file) on your hard drive.
71
+ 2. Unzip the zip file contents.
72
+ 3. Upload the `speed-booster-pack` folder to the `/wp-content/plugins/` directory.
73
+ 4. Activate the plugin through the 'Plugins' menu in WordPress.
74
+ 5. A new sub menu item `Speed Booster Pack` will appear in your main Settings menu.
75
+
76
+ == Screenshots ==
77
+ 1. Plugin options page, simple view (v2.5)
78
+
79
+ == Changelog ==
80
+ = 3.6.1 =
81
+ * Added a section for feedback in the plugin's dashboard
82
+
83
+ = 3.6 =
84
+ * Changed contributors and fixed a few bugs. Plugin is now under new ownership.
85
+
86
+ = 3.5 =
87
+ * Fix compatibility with the CrazyLazy plugin.
88
+
89
+ = 3.4 =
90
+ * Added an option to increase your page load speed by minifying JavaScript and HTML. Removed option to remove RSD Link, since its impact on improving speed was insignificant.
91
+
92
+ = 3.3 =
93
+ * Fix Lazy Load CSS problem.
94
+
95
+ = 3.2 =
96
+ * Added Lazy Load feature to improve the web page loading times of your images.
97
+
98
+ = 3.1 =
99
+ * Following requests from users, added back the option of excluding javascript elements.
100
+
101
+ = 3.0 =
102
+ * We removed the option of excluding javascript elements as this option falls page speed score, making this plugin almost useless. Also, these options were only for advanced users, for regular users, incorrect use these options could destabilize the entire site functionality.
103
+ * We also removed the lazy load images option because it was outdated and broken. We'll come up with a new and updated solution soon.
104
+
105
+ = 2.9 =
106
+ * Added a new recommended features that can make your site load faster
107
+
108
+ = 2.8 =
109
+ * Fixed plugin options visibility issue
110
+
111
+ = 2.7 =
112
+ * All important options switched to off by default (on first plugin activation).
113
+
114
+ = 2.6 =
115
+ * Added Spanish translation by [Andrew Kurtis](http://www.webhostinghub.com/)
116
+
117
+ = 2.5 =
118
+ * Added option to exclude certain JS files from being moved to the footer.
119
+ * Added option to exclude certain JS files from being defered.
120
+ * Added a list of handles of all scripts and styles enqueued by your theme, useful for excluding options.
121
+ * Removed FOUC option since is useless with W3 Total Cache.
122
+ * Some visual changes on plugin options page.
123
+ * Translation updated with the new strings.
124
+ * Moved some admin inline scripts to js files.
125
+
126
+ = 2.4 =
127
+ * Fixed TypeError: $ is not a function when Prevent Flash of Unstyled Content (FOUC) option is active. Thanks to [@Marcio Duarte](http://profiles.wordpress.org/pagelab) for the [bug report](http://wordpress.org/support/topic/javascript-error-53).
128
+
129
+ = 2.3 =
130
+ * Added option to exclude certain CSS files from being loaded asynchronously.
131
+ * Changed the position of the styles when they are inlined to the footer (before js files).
132
+ * Added an experimental option to eliminate flash of unstyled content (FOUC) when all CSS styles are inlined to the footer.
133
+ * Translations updated.
134
+
135
+ = 2.2 =
136
+ * Fixed option to disable all CSS Async features on mobile devices.
137
+ * Fixed incompatibility with WPtouch plugin. Thanks to [@DevilIce](http://profiles.wordpress.org/devilice) for the [bug report](http://wordpress.org/support/topic/css-asynchronously-and-wptouch-issue).
138
+ * Updated function wp_is_mobile() on lazy load images to really disabled this feature on mobile devices.
139
+
140
+ = 2.1 =
141
+ *Added an option to disable all CSS Async features on mobile devices, to avoid some appearance issues until finding a clean solution to fix it.
142
+
143
+ = 2.0 =
144
+ *Modified: amended previous except for the admin toolbar css to enqueue its stylesheets only if admin bar is showing, to not break the render blocking plugin option.
145
+
146
+ = 1.9 =
147
+ * Fix: breaking the SEO by Yoast plugin interface (perhaps as well as to others too). Thanks to [@JahLive](http://profiles.wordpress.org/jahlive) for the [bug report](http://wordpress.org/support/topic/yoast-wordpress-seo-broken-after-update).
148
+ * Added an except for the admin toolbar css since the Load CSS asynchronously option removes its dashicons and stylesheets.
149
+
150
+
151
+ = 1.8 =
152
+ * Added option to load CSS asynchronously to render your page more quickly and get a higher score on the major speed testing services
153
+ * Added option to inline and minify all CSS styles and move them to the header or to the footer, to eliminate external render-blocking CSS and optimize CSS delivery.
154
+ * Added option to change the default image compression level, to help your pages load faster and keep file sizes smaller.
155
+ * Added memory usage information and active plugins number in the plugin options page.
156
+ * Replaced PHP version info with memory usage information (more useful).
157
+ * Added Romanian translation and POT file. Translators are welcome!
158
+
159
+ = 1.7 =
160
+ * Fixed Lazy Load missed js.
161
+
162
+ = 1.6 =
163
+ * Fixed some errors and missed codes from plugin functions.
164
+
165
+ = 1.5 =
166
+ * Added Lazy Load feature to improve the web page loading times of your images.
167
+ * Added an option to remove all rss feed links from WP Head.
168
+ * Added plugin options informations to the footer, visible in page source(hidden in front end), useful for debugging.
169
+
170
+ = 1.4 =
171
+ * Added a new option to remove extra Font Awesome stylesheets added to your theme by certain plugins, if Font Awesome is already used in your theme.
172
+ * Added a new option to remove WordPress Version Number.
173
+
174
+ = 1.3 =
175
+ * Fixed strict standards error: redefining already defined constructor for class.
176
+
177
+ = 1.2 =
178
+ * Modified the plugin version number variable in plugin options page.
179
+
180
+ = 1.1 =
181
+ * Modified Readme file
182
+
183
+ = 1.0 =
184
+ * Initial release
185
+
186
+ == Page Load Stats ==
187
+
188
+ Page Load Stats is a brief statistic displayed in the plugin options page. It displays your homepage loading speed (in seconds) and number of processed queries.
189
+
190
+ **Page loading time** – the progress bar color will be:
191
+
192
+ * *green* if the page load takes less than a second
193
+ * *orange* when loading the page takes between 1 and 2 seconds
194
+ * *red* if the page loading takes longer than 2 seconds
195
+
196
+ **Number of executed queries** – the progress bar color will be:
197
+
198
+ * *green* if there were less than 100 queries
199
+ * *orange* if there were between 100 and 200 queries
200
+ * *red* if the page required more than 200 queries
201
+
202
+ == Credits ==
203
+
204
+ * Thanks to [Jason Penney](http://jasonpenney.net/) for Google Libraries feature.
205
+ * CSS option was implemented from Async JS and CSS plugin and updated to our plugin.
206
+ * Credits for Lazy Load feature belongs to [pluginkollektiv](https://github.com/pluginkollektiv/crazy-lazy)
speed-booster-pack.php CHANGED
@@ -1,291 +1,291 @@
1
- <?php
2
- /**
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.6
7
- * Author: Macho Themes
8
- * Author URI: https://www.machothemes.com/
9
- * License: GPLv2
10
- */
11
-
12
- /* Copyright 2017 Macho Themes (email : support [at] machothemes [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
16
- THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
17
- (AT YOUR OPTION) ANY LATER VERSION.
18
-
19
- THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
20
- BUT WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
21
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE
22
- GNU GENERAL PUBLIC LICENSE FOR MORE DETAILS.
23
-
24
- YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
25
- ALONG WITH THIS PROGRAM; IF NOT, WRITE TO THE FREE SOFTWARE
26
- FOUNDATION, INC., 51 FRANKLIN ST, FIFTH FLOOR, BOSTON, MA 02110-1301 USA
27
- */
28
-
29
- /*----------------------------------------------------------------------------------------------------------
30
- Global Variables
31
- -----------------------------------------------------------------------------------------------------------*/
32
-
33
- $sbp_options = get_option( 'sbp_settings' ); // retrieve the plugin settings from the options table
34
-
35
- /*----------------------------------------------------------------------------------------------------------
36
- Define some useful plugin constants
37
- -----------------------------------------------------------------------------------------------------------*/
38
-
39
- define( 'SPEED_BOOSTER_PACK_RELEASE_DATE', date_i18n( 'F j, Y', strtotime('2017-08-21')) ); // 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.5'); // 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
45
-
46
-
47
- /*----------------------------------------------------------------------------------------------------------
48
- Main Plugin Class
49
- -----------------------------------------------------------------------------------------------------------*/
50
-
51
- if ( !class_exists( 'Speed_Booster_Pack' ) ) {
52
-
53
- class Speed_Booster_Pack {
54
-
55
- /*----------------------------------------------------------------------------------------------------------
56
- Function Construct
57
- -----------------------------------------------------------------------------------------------------------*/
58
-
59
- public function __construct() {
60
- global $sbp_options;
61
-
62
- // Enqueue admin scripts
63
- add_action( 'admin_enqueue_scripts', array( $this, 'sbp_admin_enqueue_scripts' ) );
64
- add_action( 'admin_enqueue_scripts', array( $this, 'sbp_collapsible' ) );
65
-
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' );
74
- $Speed_Booster_Pack_Options = new Speed_Booster_Pack_Options();
75
-
76
- // Load main plugin functions
77
- require_once( SPEED_BOOSTER_PACK_PATH . 'inc/core.php' );
78
- $Speed_Booster_Pack_Core = new Speed_Booster_Pack_Core();
79
-
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_head', array( $this, 'sbp_fade_in_style' ), 100);
85
- }
86
-
87
- // Render debugging information
88
- add_action( 'wp_footer', array( $this, 'sbp_debugg' ), SBP_FOOTER_LAST );
89
-
90
- // Filters
91
- $this->path = plugin_basename( __FILE__ );
92
- add_filter( "plugin_action_links_$this->path", array( $this, 'sbp_settings_link' ) );
93
-
94
- } // END public function __construct
95
-
96
-
97
- /*----------------------------------------------------------------------------------------------------------
98
- Load plugin textdomain
99
- -----------------------------------------------------------------------------------------------------------*/
100
-
101
- function sbp_load_translation() {
102
- load_plugin_textdomain( 'sb-pack', false, SPEED_BOOSTER_PACK_PATH . '/lang/' );
103
- }
104
-
105
-
106
- /*----------------------------------------------------------------------------------------------------------
107
- Display/dismiss admin notices if needed
108
- -----------------------------------------------------------------------------------------------------------*/
109
-
110
- function sbp_display_notices() {
111
- if(!get_option( 'sbp_news')) {
112
- global $sbp_settings_page;
113
- $screen = get_current_screen();
114
- if ( $screen->id != $sbp_settings_page ) {
115
- require_once( SPEED_BOOSTER_PACK_PATH . 'inc/template/notice.php' );
116
- }
117
- }
118
- }
119
-
120
- function sbp_dismiss_notices() {
121
- update_option( 'sbp_news', true);
122
- return json_encode(array("Status" => 0));
123
- }
124
-
125
- /*----------------------------------------------------------------------------------------------------------
126
- Activate the plugin
127
- -----------------------------------------------------------------------------------------------------------*/
128
-
129
- public static function sbp_activate() {
130
-
131
- $sbp_options = get_option( 'sbp_settings', '' );
132
- $timer_stop = timer_stop( 0, 2 );
133
- $get_num_queries = get_num_queries();
134
-
135
- $url = get_site_url();
136
- $response = wp_remote_get( $url, array() );
137
-
138
- $get_enqueued_scripts_handle = get_option( 'all_theme_scripts_handle' );
139
- $get_enqueued_scripts_src = get_option( 'all_theme_scripts_src' );
140
- $get_enqueued_styles_handle = get_option( 'all_theme_styles_handle' );
141
-
142
- if ( get_option('sbp_page_time') == '' ) {
143
- update_option( 'sbp_page_time', $timer_stop );
144
- }
145
-
146
- if ( get_option( 'sbp_page_queries') == '' ) {
147
- update_option( 'sbp_page_queries', $get_num_queries );
148
- }
149
-
150
- if ( get_option( 'all_theme_scripts_handle') == '' ) {
151
- update_option( 'all_theme_scripts_handle', $get_enqueued_scripts_handle );
152
- }
153
-
154
- if ( get_option( 'all_theme_scripts_src') == '' ) {
155
- update_option( 'all_theme_scripts_src', $get_enqueued_scripts_src );
156
- }
157
-
158
- if ( get_option( 'all_theme_styles_handle') == '' ) {
159
- update_option( 'all_theme_styles_handle', $get_enqueued_styles_handle );
160
- }
161
-
162
-
163
- if ( get_option('sbp_css_async' ) === FALSE ) {
164
- update_option( 'sbp_css_async', 1 );
165
- update_option( 'sbp_css_minify', 1 );
166
- update_option( 'sbp_footer_css', 0 );
167
- update_option( 'sbp_is_mobile', 0 );
168
- }
169
-
170
- } // END public static function sb_activate
171
-
172
-
173
- /*----------------------------------------------------------------------------------------------------------
174
- Deactivate the plugin
175
- -----------------------------------------------------------------------------------------------------------*/
176
-
177
- public static function sbp_deactivate() {
178
- delete_option( 'sbp_integer' );
179
- }
180
-
181
-
182
- /*-----------------------------------------------------------------------------------------------------------------------------------------
183
- 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
184
- --------------------------------------------------------------------------------------------------------------------------------------------*/
185
-
186
- public function sbp_fade_in_style() {
187
- echo "<style>img.crazy_lazy {opacity:0}</style>";
188
- }
189
-
190
-
191
- /*----------------------------------------------------------------------------------------------------------
192
- CSS style of the plugin options page
193
- -----------------------------------------------------------------------------------------------------------*/
194
-
195
- function sbp_enqueue_styles( $hook ) {
196
-
197
- // load stylesheet only on plugin options page
198
- global $sbp_settings_page;
199
- if ( $hook != $sbp_settings_page )
200
- return;
201
- wp_enqueue_style( 'sbp-styles', plugin_dir_url( __FILE__ ) . 'css/style.dev.css' ); // change to style.dev.css to debug the plugin style sbp_style.min
202
- wp_enqueue_style( 'jquery-ui', plugin_dir_url( __FILE__ ) . 'css/jquery-ui.min.css' );
203
-
204
- } // End function sbp_enqueue_styles
205
-
206
-
207
- /*----------------------------------------------------------------------------------------------------------
208
- Enqueue admin scripts to plugin options page
209
- -----------------------------------------------------------------------------------------------------------*/
210
-
211
- public function sbp_admin_enqueue_scripts( $hook_sbp ) {
212
- // load scripts only on plugin options page
213
- global $sbp_settings_page;
214
- if ( $hook_sbp != $sbp_settings_page )
215
- return;
216
- wp_enqueue_script( 'jquery-ui-slider' );
217
- wp_enqueue_script( 'sbp-slide', plugins_url('inc/js/sbp-slide.js', __FILE__ ), array( 'jquery', 'jquery-ui-slider' ), SPEED_BOOSTER_PACK_VERSION, true );
218
- wp_enqueue_script( 'sbp-hide', plugins_url('inc/js/sbp-hide.js', __FILE__ ), array( 'jquery' ), SPEED_BOOSTER_PACK_VERSION, true );
219
-
220
- }
221
-
222
-
223
- /*----------------------------------------------------------------------------------------------------------
224
- Enqueue script to plugin options page for collapsible options
225
- -----------------------------------------------------------------------------------------------------------*/
226
-
227
- function sbp_collapsible( $sbp_suffix ) {
228
- global $sbp_settings_page;
229
- if ( $sbp_suffix != $sbp_settings_page )
230
- return;
231
- wp_enqueue_script( 'postbox' );
232
- wp_enqueue_script( 'postbox-edit', plugins_url('inc/js/post-tabs-edit.js', __FILE__ ), array( 'jquery', 'postbox' ) );
233
- }
234
-
235
-
236
- /*----------------------------------------------------------------------------------------------------------
237
- Add settings link on plugins page
238
- -----------------------------------------------------------------------------------------------------------*/
239
-
240
- function sbp_settings_link( $links ) {
241
-
242
- $settings_link = '<a href="options-general.php?page=sbp-options">Settings</a>';
243
- array_unshift( $links, $settings_link );
244
- return $links;
245
-
246
- } // End function sbp_settings_link
247
-
248
-
249
- /*----------------------------------------------------------------------------------------------------------
250
- Render the plugin name, its version and active options in page source, useful for debugging
251
- -----------------------------------------------------------------------------------------------------------*/
252
-
253
- function sbp_debugg() {
254
-
255
- global $sbp_options;
256
-
257
- echo '<!-- We need this for debugging themes using ' . SPEED_BOOSTER_PACK_NAME . ' ' . SPEED_BOOSTER_PACK_VERSION . ' -->' . "\n";
258
-
259
- if ( isset( $sbp_options['jquery_to_footer'] ) ) {
260
- echo '<!-- Scripts to footer: enabled -->' . "\n";
261
- }
262
-
263
- if ( isset( $sbp_options['sbp_footer_css'] ) ) {
264
- echo '<!-- CSS to footer: enabled -->' . "\n";
265
- }
266
-
267
- if ( isset( $sbp_options['defer_parsing'] ) ) {
268
- echo '<!-- Defer parsing of js: enabled -->' . "\n";
269
- }
270
-
271
- if ( isset( $sbp_options['sbp_css_async'] ) ) {
272
- echo '<!-- CSS Async: enabled -->' . "\n";
273
- }
274
-
275
-
276
- } // End function sbp_debugg
277
-
278
- } // End class Speed_Booster_Pack
279
-
280
- } // End if (!class_exists("Speed_Booster_Pack")) (1)
281
-
282
- if( class_exists( 'Speed_Booster_Pack' ) ) {
283
-
284
- // Installation and uninstallation hooks
285
- register_activation_hook( __FILE__, array( 'Speed_Booster_Pack', 'sbp_activate' ) );
286
- register_deactivation_hook( __FILE__, array( 'Speed_Booster_Pack', 'sbp_deactivate' ) );
287
-
288
- // instantiate the plugin class
289
- $speed_booster_pack = new Speed_Booster_Pack();
290
-
291
- } // End if (!class_exists("Speed_Booster_Pack")) (2)
1
+ <?php
2
+ /**
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.6.1
7
+ * Author: Macho Themes
8
+ * Author URI: https://www.machothemes.com/
9
+ * License: GPLv2
10
+ */
11
+
12
+ /* Copyright 2017 Macho Themes (email : support [at] machothemes [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
16
+ THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
17
+ (AT YOUR OPTION) ANY LATER VERSION.
18
+
19
+ THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
20
+ BUT WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
21
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE
22
+ GNU GENERAL PUBLIC LICENSE FOR MORE DETAILS.
23
+
24
+ YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
25
+ ALONG WITH THIS PROGRAM; IF NOT, WRITE TO THE FREE SOFTWARE
26
+ FOUNDATION, INC., 51 FRANKLIN ST, FIFTH FLOOR, BOSTON, MA 02110-1301 USA
27
+ */
28
+
29
+ /*----------------------------------------------------------------------------------------------------------
30
+ Global Variables
31
+ -----------------------------------------------------------------------------------------------------------*/
32
+
33
+ $sbp_options = get_option( 'sbp_settings' ); // retrieve the plugin settings from the options table
34
+
35
+ /*----------------------------------------------------------------------------------------------------------
36
+ Define some useful plugin constants
37
+ -----------------------------------------------------------------------------------------------------------*/
38
+
39
+ define( 'SPEED_BOOSTER_PACK_RELEASE_DATE', date_i18n( 'F j, Y', strtotime('2017-08-21')) ); // 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.6.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
45
+
46
+
47
+ /*----------------------------------------------------------------------------------------------------------
48
+ Main Plugin Class
49
+ -----------------------------------------------------------------------------------------------------------*/
50
+
51
+ if ( !class_exists( 'Speed_Booster_Pack' ) ) {
52
+
53
+ class Speed_Booster_Pack {
54
+
55
+ /*----------------------------------------------------------------------------------------------------------
56
+ Function Construct
57
+ -----------------------------------------------------------------------------------------------------------*/
58
+
59
+ public function __construct() {
60
+ global $sbp_options;
61
+
62
+ // Enqueue admin scripts
63
+ add_action( 'admin_enqueue_scripts', array( $this, 'sbp_admin_enqueue_scripts' ) );
64
+ add_action( 'admin_enqueue_scripts', array( $this, 'sbp_collapsible' ) );
65
+
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' );
74
+ $Speed_Booster_Pack_Options = new Speed_Booster_Pack_Options();
75
+
76
+ // Load main plugin functions
77
+ require_once( SPEED_BOOSTER_PACK_PATH . 'inc/core.php' );
78
+ $Speed_Booster_Pack_Core = new Speed_Booster_Pack_Core();
79
+
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_head', array( $this, 'sbp_fade_in_style' ), 100);
85
+ }
86
+
87
+ // Render debugging information
88
+ add_action( 'wp_footer', array( $this, 'sbp_debugg' ), SBP_FOOTER_LAST );
89
+
90
+ // Filters
91
+ $this->path = plugin_basename( __FILE__ );
92
+ add_filter( "plugin_action_links_$this->path", array( $this, 'sbp_settings_link' ) );
93
+
94
+ } // END public function __construct
95
+
96
+
97
+ /*----------------------------------------------------------------------------------------------------------
98
+ Load plugin textdomain
99
+ -----------------------------------------------------------------------------------------------------------*/
100
+
101
+ function sbp_load_translation() {
102
+ load_plugin_textdomain( 'sb-pack', false, SPEED_BOOSTER_PACK_PATH . '/lang/' );
103
+ }
104
+
105
+
106
+ /*----------------------------------------------------------------------------------------------------------
107
+ Display/dismiss admin notices if needed
108
+ -----------------------------------------------------------------------------------------------------------*/
109
+
110
+ function sbp_display_notices() {
111
+ if(!get_option( 'sbp_news')) {
112
+ global $sbp_settings_page;
113
+ $screen = get_current_screen();
114
+ if ( $screen->id != $sbp_settings_page ) {
115
+ require_once( SPEED_BOOSTER_PACK_PATH . 'inc/template/notice.php' );
116
+ }
117
+ }
118
+ }
119
+
120
+ function sbp_dismiss_notices() {
121
+ update_option( 'sbp_news', true);
122
+ return json_encode(array("Status" => 0));
123
+ }
124
+
125
+ /*----------------------------------------------------------------------------------------------------------
126
+ Activate the plugin
127
+ -----------------------------------------------------------------------------------------------------------*/
128
+
129
+ public static function sbp_activate() {
130
+
131
+ $sbp_options = get_option( 'sbp_settings', '' );
132
+ $timer_stop = timer_stop( 0, 2 );
133
+ $get_num_queries = get_num_queries();
134
+
135
+ $url = get_site_url();
136
+ $response = wp_remote_get( $url, array() );
137
+
138
+ $get_enqueued_scripts_handle = get_option( 'all_theme_scripts_handle' );
139
+ $get_enqueued_scripts_src = get_option( 'all_theme_scripts_src' );
140
+ $get_enqueued_styles_handle = get_option( 'all_theme_styles_handle' );
141
+
142
+ if ( get_option('sbp_page_time') == '' ) {
143
+ update_option( 'sbp_page_time', $timer_stop );
144
+ }
145
+
146
+ if ( get_option( 'sbp_page_queries') == '' ) {
147
+ update_option( 'sbp_page_queries', $get_num_queries );
148
+ }
149
+
150
+ if ( get_option( 'all_theme_scripts_handle') == '' ) {
151
+ update_option( 'all_theme_scripts_handle', $get_enqueued_scripts_handle );
152
+ }
153
+
154
+ if ( get_option( 'all_theme_scripts_src') == '' ) {
155
+ update_option( 'all_theme_scripts_src', $get_enqueued_scripts_src );
156
+ }
157
+
158
+ if ( get_option( 'all_theme_styles_handle') == '' ) {
159
+ update_option( 'all_theme_styles_handle', $get_enqueued_styles_handle );
160
+ }
161
+
162
+
163
+ if ( get_option('sbp_css_async' ) === FALSE ) {
164
+ update_option( 'sbp_css_async', 1 );
165
+ update_option( 'sbp_css_minify', 1 );
166
+ update_option( 'sbp_footer_css', 0 );
167
+ update_option( 'sbp_is_mobile', 0 );
168
+ }
169
+
170
+ } // END public static function sb_activate
171
+
172
+
173
+ /*----------------------------------------------------------------------------------------------------------
174
+ Deactivate the plugin
175
+ -----------------------------------------------------------------------------------------------------------*/
176
+
177
+ public static function sbp_deactivate() {
178
+ delete_option( 'sbp_integer' );
179
+ }
180
+
181
+
182
+ /*-----------------------------------------------------------------------------------------------------------------------------------------
183
+ 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
184
+ --------------------------------------------------------------------------------------------------------------------------------------------*/
185
+
186
+ public function sbp_fade_in_style() {
187
+ echo "<style>img.crazy_lazy {opacity:0}</style>";
188
+ }
189
+
190
+
191
+ /*----------------------------------------------------------------------------------------------------------
192
+ CSS style of the plugin options page
193
+ -----------------------------------------------------------------------------------------------------------*/
194
+
195
+ function sbp_enqueue_styles( $hook ) {
196
+
197
+ // load stylesheet only on plugin options page
198
+ global $sbp_settings_page;
199
+ if ( $hook != $sbp_settings_page )
200
+ return;
201
+ wp_enqueue_style( 'sbp-styles', plugin_dir_url( __FILE__ ) . 'css/style.dev.css' ); // change to style.dev.css to debug the plugin style sbp_style.min
202
+ wp_enqueue_style( 'jquery-ui', plugin_dir_url( __FILE__ ) . 'css/jquery-ui.min.css' );
203
+
204
+ } // End function sbp_enqueue_styles
205
+
206
+
207
+ /*----------------------------------------------------------------------------------------------------------
208
+ Enqueue admin scripts to plugin options page
209
+ -----------------------------------------------------------------------------------------------------------*/
210
+
211
+ public function sbp_admin_enqueue_scripts( $hook_sbp ) {
212
+ // load scripts only on plugin options page
213
+ global $sbp_settings_page;
214
+ if ( $hook_sbp != $sbp_settings_page )
215
+ return;
216
+ wp_enqueue_script( 'jquery-ui-slider' );
217
+ wp_enqueue_script( 'sbp-slide', plugins_url('inc/js/sbp-slide.js', __FILE__ ), array( 'jquery', 'jquery-ui-slider' ), SPEED_BOOSTER_PACK_VERSION, true );
218
+ wp_enqueue_script( 'sbp-hide', plugins_url('inc/js/sbp-hide.js', __FILE__ ), array( 'jquery' ), SPEED_BOOSTER_PACK_VERSION, true );
219
+
220
+ }
221
+
222
+
223
+ /*----------------------------------------------------------------------------------------------------------
224
+ Enqueue script to plugin options page for collapsible options
225
+ -----------------------------------------------------------------------------------------------------------*/
226
+
227
+ function sbp_collapsible( $sbp_suffix ) {
228
+ global $sbp_settings_page;
229
+ if ( $sbp_suffix != $sbp_settings_page )
230
+ return;
231
+ wp_enqueue_script( 'postbox' );
232
+ wp_enqueue_script( 'postbox-edit', plugins_url('inc/js/post-tabs-edit.js', __FILE__ ), array( 'jquery', 'postbox' ) );
233
+ }
234
+
235
+
236
+ /*----------------------------------------------------------------------------------------------------------
237
+ Add settings link on plugins page
238
+ -----------------------------------------------------------------------------------------------------------*/
239
+
240
+ function sbp_settings_link( $links ) {
241
+
242
+ $settings_link = '<a href="options-general.php?page=sbp-options">Settings</a>';
243
+ array_unshift( $links, $settings_link );
244
+ return $links;
245
+
246
+ } // End function sbp_settings_link
247
+
248
+
249
+ /*----------------------------------------------------------------------------------------------------------
250
+ Render the plugin name, its version and active options in page source, useful for debugging
251
+ -----------------------------------------------------------------------------------------------------------*/
252
+
253
+ function sbp_debugg() {
254
+
255
+ global $sbp_options;
256
+
257
+ echo '<!-- We need this for debugging themes using ' . SPEED_BOOSTER_PACK_NAME . ' ' . SPEED_BOOSTER_PACK_VERSION . ' -->' . "\n";
258
+
259
+ if ( isset( $sbp_options['jquery_to_footer'] ) ) {
260
+ echo '<!-- Scripts to footer: enabled -->' . "\n";
261
+ }
262
+
263
+ if ( isset( $sbp_options['sbp_footer_css'] ) ) {
264
+ echo '<!-- CSS to footer: enabled -->' . "\n";
265
+ }
266
+
267
+ if ( isset( $sbp_options['defer_parsing'] ) ) {
268
+ echo '<!-- Defer parsing of js: enabled -->' . "\n";
269
+ }
270
+
271
+ if ( isset( $sbp_options['sbp_css_async'] ) ) {
272
+ echo '<!-- CSS Async: enabled -->' . "\n";
273
+ }
274
+
275
+
276
+ } // End function sbp_debugg
277
+
278
+ } // End class Speed_Booster_Pack
279
+
280
+ } // End if (!class_exists("Speed_Booster_Pack")) (1)
281
+
282
+ if( class_exists( 'Speed_Booster_Pack' ) ) {
283
+
284
+ // Installation and uninstallation hooks
285
+ register_activation_hook( __FILE__, array( 'Speed_Booster_Pack', 'sbp_activate' ) );
286
+ register_deactivation_hook( __FILE__, array( 'Speed_Booster_Pack', 'sbp_deactivate' ) );
287
+
288
+ // instantiate the plugin class
289
+ $speed_booster_pack = new Speed_Booster_Pack();
290
+
291
+ } // End if (!class_exists("Speed_Booster_Pack")) (2)