Version Description
- Fix: improve the handling of warning undefine index of lazy load image while enable debug mode.
- Add: Enable/Disable option of Delay JS inline scripts.
Download this release
Release Info
Developer | adeelkhan |
Plugin | Breeze – WordPress Cache Plugin |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.2.1
- assets/js/breeze-backend.js +161 -152
- breeze.php +104 -46
- inc/breeze-admin.php +11 -2
- inc/breeze-configuration.php +60 -48
- inc/helpers.php +77 -0
- inc/minification/breeze-minification-scripts.php +63 -61
- inc/minification/breeze-minify-main.php +32 -3
- readme.txt +6 -1
- views/tabs/advanced.php +158 -133
- views/tabs/faq.php +89 -78
assets/js/breeze-backend.js
CHANGED
@@ -1,142 +1,142 @@
|
|
1 |
-
jQuery(document).ready(function ($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
is_network: $('body').hasClass( 'network-admin' ),
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
|
141 |
|
142 |
$( '#advanced-options-tab' ).on( 'change', '#bz-lazy-load', function () {
|
@@ -144,27 +144,26 @@ jQuery(document).ready(function ($) {
|
|
144 |
var native_lazy = $( '#native-lazy-option' );
|
145 |
if ( true === $( this ).is( ':checked' ) ) {
|
146 |
native_lazy.show();
|
147 |
-
}else{
|
148 |
native_lazy.hide();
|
149 |
-
$('#bz-lazy-load-nat').attr('checked', false);
|
150 |
}
|
151 |
} );
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
$( '#basic-panel' ).on(
|
164 |
'change',
|
165 |
'#minification-css',
|
166 |
function () {
|
167 |
-
console.log( $( this ).is( ':checked' ) );
|
168 |
if ( $( this ).is( ':checked' ) ) {
|
169 |
font_display_swap.show();
|
170 |
} else {
|
@@ -173,4 +172,14 @@ jQuery(document).ready(function ($) {
|
|
173 |
}
|
174 |
}
|
175 |
);
|
176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( document ).ready( function ( $ ) {
|
2 |
+
|
3 |
+
var $compatibility_warning = $( '#breeze-plugins-notice' );
|
4 |
+
if ( $compatibility_warning.length ) {
|
5 |
+
$( document ).on( 'click tap', '.notice-dismiss', function () {
|
6 |
+
$.ajax( {
|
7 |
+
type: "POST",
|
8 |
+
url: ajaxurl,
|
9 |
+
data: { action: "compatibility_warning_close", 'breeze_close_warning': '1' },
|
10 |
+
dataType: "json", // xml, html, script, json, jsonp, text
|
11 |
+
success: function ( data ) {
|
12 |
+
|
13 |
+
},
|
14 |
+
error: function ( jqXHR, textStatus, errorThrown ) {
|
15 |
+
|
16 |
+
},
|
17 |
+
// called when the request finishes (after success and error callbacks are executed)
|
18 |
+
complete: function ( jqXHR, textStatus ) {
|
19 |
+
|
20 |
+
}
|
21 |
+
} );
|
22 |
+
} );
|
23 |
+
}
|
24 |
+
|
25 |
+
// Topbar action
|
26 |
+
$( '#wp-admin-bar-breeze-purge-varnish-group' ).click( function () {
|
27 |
+
breeze_purgeVarnish_callAjax();
|
28 |
+
} );
|
29 |
+
$( '#wp-admin-bar-breeze-purge-file-group' ).click( function () {
|
30 |
+
breeze_purgeFile_callAjax();
|
31 |
+
} );
|
32 |
+
// Varnish clear button
|
33 |
+
$( '#purge-varnish-button' ).click( function () {
|
34 |
+
breeze_purgeVarnish_callAjax();
|
35 |
+
} );
|
36 |
+
|
37 |
+
//clear cache by button
|
38 |
+
function breeze_purgeVarnish_callAjax() {
|
39 |
+
$.ajax( {
|
40 |
+
url: ajaxurl,
|
41 |
+
dataType: 'json',
|
42 |
+
method: 'POST',
|
43 |
+
data: {
|
44 |
+
action: 'breeze_purge_varnish',
|
45 |
+
is_network: $( 'body' ).hasClass( 'network-admin' ),
|
46 |
+
security: breeze_token_name.breeze_purge_varnish
|
47 |
+
},
|
48 |
+
success: function ( res ) {
|
49 |
+
current = location.href;
|
50 |
+
if ( res.clear ) {
|
51 |
+
var div = '<div id="message" class="notice notice-success" style="margin-top:10px; margin-bottom:10px;padding: 10px;"><strong>Varnish Cache has been purged.</strong></div>';
|
52 |
+
//backend
|
53 |
+
$( "#wpbody .wrap h1" ).after( div );
|
54 |
+
setTimeout( function () {
|
55 |
+
location.reload();
|
56 |
+
}, 2000 );
|
57 |
+
} else {
|
58 |
+
window.location.href = current + "breeze-msg=purge-fail";
|
59 |
+
location.reload();
|
60 |
+
}
|
61 |
+
}
|
62 |
+
} );
|
63 |
+
}
|
64 |
+
|
65 |
+
function breeze_purgeFile_callAjax() {
|
66 |
+
$.ajax( {
|
67 |
+
url: ajaxurl,
|
68 |
+
dataType: 'json',
|
69 |
+
method: 'POST',
|
70 |
+
data: {
|
71 |
+
action: 'breeze_purge_file',
|
72 |
+
security: breeze_token_name.breeze_purge_cache
|
73 |
+
},
|
74 |
+
success: function ( res ) {
|
75 |
+
current = location.href;
|
76 |
+
res = parseFloat( res );
|
77 |
+
|
78 |
+
window.location.href = current + "#breeze-msg=success-cleancache&file=" + res;
|
79 |
+
location.reload();
|
80 |
+
}
|
81 |
+
} );
|
82 |
+
}
|
83 |
+
|
84 |
+
function getParameterByName( name, url ) {
|
85 |
+
if ( !url ) url = window.location.href;
|
86 |
+
name = name.replace( /[\[\]]/g, "\\$&" );
|
87 |
+
var regex = new RegExp( "[?&]" + name + "(=([^&#]*)|&|#|$)" ),
|
88 |
+
results = regex.exec( url );
|
89 |
+
if ( !results ) return null;
|
90 |
+
if ( !results[ 2 ] ) return '';
|
91 |
+
return decodeURIComponent( results[ 2 ].replace( /\+/g, " " ) );
|
92 |
+
}
|
93 |
+
|
94 |
+
var url = location.href;
|
95 |
+
var fileClean = parseFloat( getParameterByName( 'file', url ) );
|
96 |
+
|
97 |
+
$( window ).on( 'load', function () {
|
98 |
+
var patt = /wp-admin/i;
|
99 |
+
if ( patt.test( url ) ) {
|
100 |
+
//backend
|
101 |
+
var div = '';
|
102 |
+
if ( url.indexOf( "msg=success-cleancache" ) > 0 && !isNaN( fileClean ) ) {
|
103 |
+
if ( fileClean > 0 ) {
|
104 |
+
div = '<div id="message" class="notice notice-success" style="margin-top:10px; margin-bottom:10px;padding: 10px;"><strong>Internal cache has been purged: ' + fileClean + 'Kb cleaned</strong></div>';
|
105 |
+
} else {
|
106 |
+
div = '<div id="message" class="notice notice-success" style="margin-top:10px; margin-bottom:10px;padding: 10px;"><strong>Internal cache has been purged.</strong></div>';
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
$( "#wpbody .wrap h1" ).after( div );
|
111 |
+
|
112 |
+
var url_return = url.split( 'breeze-msg' );
|
113 |
+
setTimeout( function () {
|
114 |
+
window.location = url_return[ 0 ];
|
115 |
+
location.reload();
|
116 |
+
}, 2000 );
|
117 |
+
}
|
118 |
+
} else {
|
119 |
+
//frontend
|
120 |
+
}
|
121 |
+
|
122 |
+
} );
|
123 |
+
|
124 |
+
$( '#breeze-hide-install-msg' ).unbind( 'click' ).click( function () {
|
125 |
+
$( this ).closest( 'div.notice' ).fadeOut();
|
126 |
+
} )
|
127 |
+
|
128 |
+
|
129 |
+
function current_url_clean() {
|
130 |
+
var query_search = location.search;
|
131 |
+
if ( query_search.indexOf( 'breeze_purge=1' ) !== -1 && query_search.indexOf( '_wpnonce' ) !== -1 ) {
|
132 |
+
var params = new URLSearchParams( location.search );
|
133 |
+
params.delete( 'breeze_purge' )
|
134 |
+
params.delete( '_wpnonce' )
|
135 |
+
history.replaceState( null, '', '?' + params + location.hash )
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
current_url_clean();
|
140 |
|
141 |
|
142 |
$( '#advanced-options-tab' ).on( 'change', '#bz-lazy-load', function () {
|
144 |
var native_lazy = $( '#native-lazy-option' );
|
145 |
if ( true === $( this ).is( ':checked' ) ) {
|
146 |
native_lazy.show();
|
147 |
+
} else {
|
148 |
native_lazy.hide();
|
149 |
+
$( '#bz-lazy-load-nat' ).attr( 'checked', false );
|
150 |
}
|
151 |
} );
|
152 |
|
153 |
+
var font_display_swap = $( '#font-display-swap' );
|
154 |
+
var font_display = $( '#font-display' );
|
155 |
+
var css_minification = $( '#minification-css' );
|
156 |
|
157 |
+
if ( css_minification.is( ':checked' ) ) {
|
158 |
+
font_display_swap.show();
|
159 |
+
} else {
|
160 |
+
font_display_swap.hide();
|
161 |
+
font_display.attr( 'checked', false );
|
162 |
+
}
|
163 |
$( '#basic-panel' ).on(
|
164 |
'change',
|
165 |
'#minification-css',
|
166 |
function () {
|
|
|
167 |
if ( $( this ).is( ':checked' ) ) {
|
168 |
font_display_swap.show();
|
169 |
} else {
|
172 |
}
|
173 |
}
|
174 |
);
|
175 |
+
|
176 |
+
$( '#advanced-options-tab' ).on( 'change', '#enable-js-delay', function () {
|
177 |
+
$delay_js_div = $( '#breeze-delay-js-scripts-div' );
|
178 |
+
|
179 |
+
if ( $( this ).is( ':checked' ) ) {
|
180 |
+
$delay_js_div.show();
|
181 |
+
} else {
|
182 |
+
$delay_js_div.hide();
|
183 |
+
}
|
184 |
+
} )
|
185 |
+
} );
|
breeze.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Breeze
|
4 |
* Description: Breeze is a WordPress cache plugin with extensive options to speed up your website. All the options including Varnish Cache are compatible with Cloudways hosting.
|
5 |
-
* Version: 1.2.
|
6 |
* Text Domain: breeze
|
7 |
* Domain Path: /languages
|
8 |
* Author: Cloudways
|
@@ -37,7 +37,7 @@ if ( ! defined( 'BREEZE_PLUGIN_DIR' ) ) {
|
|
37 |
define( 'BREEZE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
38 |
}
|
39 |
if ( ! defined( 'BREEZE_VERSION' ) ) {
|
40 |
-
define( 'BREEZE_VERSION', '1.2.
|
41 |
}
|
42 |
if ( ! defined( 'BREEZE_SITEURL' ) ) {
|
43 |
define( 'BREEZE_SITEURL', get_site_url() );
|
@@ -278,6 +278,7 @@ function breeze_check_for_new_version() {
|
|
278 |
|
279 |
// This process can also be started by Wp-CLI.
|
280 |
if ( ! empty( get_option( 'breeze_new_update', '' ) ) ) {
|
|
|
281 |
// This needs to happen only once.
|
282 |
if ( class_exists( 'Breeze_Configuration' ) && method_exists( 'Breeze_Configuration', 'update_htaccess' ) ) {
|
283 |
Breeze_Configuration::update_htaccess();
|
@@ -295,67 +296,103 @@ function breeze_check_for_new_version() {
|
|
295 |
//config to cache
|
296 |
require_once( BREEZE_PLUGIN_DIR . 'inc/cache/config-cache.php' );
|
297 |
}
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
'post_id',
|
333 |
-
'data-noptimize',
|
334 |
-
'googletagmanager',
|
335 |
-
);
|
336 |
-
|
337 |
-
breeze_update_option( 'advanced_settings', $advanced, true );
|
338 |
-
breeze_update_option( 'advanced_settings_120', 'yes', true );
|
339 |
-
}
|
340 |
|
341 |
|
342 |
// If the WP install is multi-site
|
343 |
if ( is_multisite() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
// For multi-site we need to also reset the root config-file.
|
345 |
Breeze_ConfigCache::factory()->write_config_cache( true );
|
346 |
|
347 |
$blogs = get_sites();
|
348 |
if ( ! empty( $blogs ) ) {
|
349 |
foreach ( $blogs as $blog_data ) {
|
350 |
-
$blog_id = $blog_data->blog_id;
|
351 |
switch_to_blog( $blog_id );
|
352 |
|
353 |
// if the settings are inherited, then we do not need to refresh the config file.
|
354 |
-
$inherit_option =
|
355 |
$inherit_option = filter_var( $inherit_option, FILTER_VALIDATE_BOOLEAN );
|
356 |
|
357 |
// If the settings are not inherited from parent blog, then refresh the config file.
|
358 |
if ( false === $inherit_option ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
// Refresh breeze-cache.php file
|
360 |
Breeze_ConfigCache::factory()->write_config_cache();
|
361 |
}
|
@@ -368,7 +405,28 @@ function breeze_check_for_new_version() {
|
|
368 |
}
|
369 |
} else {
|
370 |
// For single site.
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
// Refresh breeze-cache.php file
|
373 |
Breeze_ConfigCache::factory()->write_config_cache();
|
374 |
|
2 |
/**
|
3 |
* Plugin Name: Breeze
|
4 |
* Description: Breeze is a WordPress cache plugin with extensive options to speed up your website. All the options including Varnish Cache are compatible with Cloudways hosting.
|
5 |
+
* Version: 1.2.1
|
6 |
* Text Domain: breeze
|
7 |
* Domain Path: /languages
|
8 |
* Author: Cloudways
|
37 |
define( 'BREEZE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
38 |
}
|
39 |
if ( ! defined( 'BREEZE_VERSION' ) ) {
|
40 |
+
define( 'BREEZE_VERSION', '1.2.1' );
|
41 |
}
|
42 |
if ( ! defined( 'BREEZE_SITEURL' ) ) {
|
43 |
define( 'BREEZE_SITEURL', get_site_url() );
|
278 |
|
279 |
// This process can also be started by Wp-CLI.
|
280 |
if ( ! empty( get_option( 'breeze_new_update', '' ) ) ) {
|
281 |
+
#if ( 1 == 1 ) {
|
282 |
// This needs to happen only once.
|
283 |
if ( class_exists( 'Breeze_Configuration' ) && method_exists( 'Breeze_Configuration', 'update_htaccess' ) ) {
|
284 |
Breeze_Configuration::update_htaccess();
|
296 |
//config to cache
|
297 |
require_once( BREEZE_PLUGIN_DIR . 'inc/cache/config-cache.php' );
|
298 |
}
|
299 |
+
$breeze_delay_js_scripts = array(
|
300 |
+
'gtag',
|
301 |
+
'document.write',
|
302 |
+
'html5.js',
|
303 |
+
'show_ads.js',
|
304 |
+
'google_ad',
|
305 |
+
'blogcatalog.com/w',
|
306 |
+
'tweetmeme.com/i',
|
307 |
+
'mybloglog.com/',
|
308 |
+
'histats.com/js',
|
309 |
+
'ads.smowtion.com/ad.js',
|
310 |
+
'statcounter.com/counter/counter.js',
|
311 |
+
'widgets.amung.us',
|
312 |
+
'ws.amazon.com/widgets',
|
313 |
+
'media.fastclick.net',
|
314 |
+
'/ads/',
|
315 |
+
'comment-form-quicktags/quicktags.php',
|
316 |
+
'edToolbar',
|
317 |
+
'intensedebate.com',
|
318 |
+
'scripts.chitika.net/',
|
319 |
+
'_gaq.push',
|
320 |
+
'jotform.com/',
|
321 |
+
'admin-bar.min.js',
|
322 |
+
'GoogleAnalyticsObject',
|
323 |
+
'plupload.full.min.js',
|
324 |
+
'syntaxhighlighter',
|
325 |
+
'adsbygoogle',
|
326 |
+
'gist.github.com',
|
327 |
+
'_stq',
|
328 |
+
'nonce',
|
329 |
+
'post_id',
|
330 |
+
'data-noptimize',
|
331 |
+
'googletagmanager',
|
332 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
|
334 |
|
335 |
// If the WP install is multi-site
|
336 |
if ( is_multisite() ) {
|
337 |
+
$advanced_network = get_site_option( 'breeze_advanced_settings' );
|
338 |
+
$is_advanced = get_site_option( 'breeze_advanced_settings_120' );
|
339 |
+
|
340 |
+
if ( empty( $is_advanced ) ) {
|
341 |
+
$advanced_network['breeze-delay-js-scripts'] = $breeze_delay_js_scripts;
|
342 |
+
|
343 |
+
update_site_option( 'breeze_advanced_settings', $advanced_network );
|
344 |
+
update_site_option( 'breeze_advanced_settings_120', 'yes' );
|
345 |
+
}
|
346 |
+
|
347 |
+
if ( '1.2.1' === BREEZE_VERSION ) {
|
348 |
+
$is_changed = breeze_is_delayjs_changed( true, null, false );
|
349 |
+
|
350 |
+
if ( false === $is_changed ) {
|
351 |
+
$advanced_network['breeze-enable-js-delay'] = '0';
|
352 |
+
} else {
|
353 |
+
$advanced_network['breeze-enable-js-delay'] = '1';
|
354 |
+
}
|
355 |
+
|
356 |
+
update_site_option( 'breeze_advanced_settings', $advanced_network );
|
357 |
+
}
|
358 |
+
|
359 |
// For multi-site we need to also reset the root config-file.
|
360 |
Breeze_ConfigCache::factory()->write_config_cache( true );
|
361 |
|
362 |
$blogs = get_sites();
|
363 |
if ( ! empty( $blogs ) ) {
|
364 |
foreach ( $blogs as $blog_data ) {
|
365 |
+
$blog_id = (int) $blog_data->blog_id;
|
366 |
switch_to_blog( $blog_id );
|
367 |
|
368 |
// if the settings are inherited, then we do not need to refresh the config file.
|
369 |
+
$inherit_option = get_blog_option( $blog_id, 'breeze_inherit_settings' );
|
370 |
$inherit_option = filter_var( $inherit_option, FILTER_VALIDATE_BOOLEAN );
|
371 |
|
372 |
// If the settings are not inherited from parent blog, then refresh the config file.
|
373 |
if ( false === $inherit_option ) {
|
374 |
+
$advanced_options = get_blog_option( $blog_id, 'breeze_advanced_settings' );
|
375 |
+
$is_advanced = get_blog_option( $blog_id, 'breeze_advanced_settings_120' );
|
376 |
+
|
377 |
+
if ( empty( $is_advanced ) && empty( $advanced_options['breeze-delay-js-scripts'] ) ) {
|
378 |
+
$advanced_options['breeze-delay-js-scripts'] = $breeze_delay_js_scripts;
|
379 |
+
|
380 |
+
update_blog_option( $blog_id, 'breeze_advanced_settings', $advanced_options );
|
381 |
+
update_blog_option( $blog_id, 'breeze_advanced_settings_120', 'yes' );
|
382 |
+
}
|
383 |
+
|
384 |
+
if ( '1.2.1' === BREEZE_VERSION ) {
|
385 |
+
$is_changed = breeze_is_delayjs_changed( false, $blog_id, true );
|
386 |
+
if ( false === $is_changed ) {
|
387 |
+
$advanced_options['breeze-enable-js-delay'] = '0';
|
388 |
+
} else {
|
389 |
+
$advanced_options['breeze-enable-js-delay'] = '1';
|
390 |
+
}
|
391 |
+
|
392 |
+
|
393 |
+
update_blog_option( $blog_id, 'breeze_advanced_settings', $advanced_options );
|
394 |
+
}
|
395 |
+
|
396 |
// Refresh breeze-cache.php file
|
397 |
Breeze_ConfigCache::factory()->write_config_cache();
|
398 |
}
|
405 |
}
|
406 |
} else {
|
407 |
// For single site.
|
408 |
+
$advanced = breeze_get_option( 'advanced_settings' );
|
409 |
+
$is_advanced = get_option( 'breeze_advanced_settings_120' );
|
410 |
+
|
411 |
+
|
412 |
+
if ( empty( $is_advanced ) ) {
|
413 |
+
$advanced['breeze-delay-js-scripts'] = $breeze_delay_js_scripts;
|
414 |
|
415 |
+
breeze_update_option( 'advanced_settings', $advanced, true );
|
416 |
+
breeze_update_option( 'advanced_settings_120', 'yes', true );
|
417 |
+
}
|
418 |
+
|
419 |
+
if ( '1.2.1' === BREEZE_VERSION ) {
|
420 |
+
$is_changed = breeze_is_delayjs_changed();
|
421 |
+
if ( false === $is_changed ) {
|
422 |
+
$advanced['breeze-enable-js-delay'] = '0';
|
423 |
+
} else {
|
424 |
+
$advanced['breeze-enable-js-delay'] = '1';
|
425 |
+
}
|
426 |
+
|
427 |
+
|
428 |
+
breeze_update_option( 'advanced_settings', $advanced, true );
|
429 |
+
}
|
430 |
// Refresh breeze-cache.php file
|
431 |
Breeze_ConfigCache::factory()->write_config_cache();
|
432 |
|
inc/breeze-admin.php
CHANGED
@@ -83,8 +83,16 @@ class Breeze_Admin {
|
|
83 |
*/
|
84 |
public function breeze_lazy_load() {
|
85 |
$advanced = breeze_get_option( 'advanced_settings' );
|
86 |
-
$is_lazy_load_enabled =
|
87 |
-
$is_lazy_load_native =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
if ( true === $is_lazy_load_enabled && false === $is_lazy_load_native ) {
|
89 |
if ( ! wp_script_is( 'jquery', 'enqueued' ) ) {
|
90 |
wp_enqueue_script( 'jquery' );
|
@@ -359,6 +367,7 @@ class Breeze_Admin {
|
|
359 |
'breeze-exclude-js' => array(),
|
360 |
'breeze-move-to-footer-js' => array(),
|
361 |
'breeze-defer-js' => array(),
|
|
|
362 |
);
|
363 |
|
364 |
$is_advanced = get_option( 'breeze_advanced_settings_120' );
|
83 |
*/
|
84 |
public function breeze_lazy_load() {
|
85 |
$advanced = breeze_get_option( 'advanced_settings' );
|
86 |
+
$is_lazy_load_enabled = false;
|
87 |
+
$is_lazy_load_native = false;
|
88 |
+
|
89 |
+
if ( isset( $advanced['breeze-lazy-load'] ) ) {
|
90 |
+
$is_lazy_load_enabled = filter_var( $advanced['breeze-lazy-load'], FILTER_VALIDATE_BOOLEAN );
|
91 |
+
}
|
92 |
+
if ( isset( $advanced['breeze-lazy-load-native'] ) ) {
|
93 |
+
$is_lazy_load_native = filter_var( $advanced['breeze-lazy-load-native'], FILTER_VALIDATE_BOOLEAN );
|
94 |
+
}
|
95 |
+
|
96 |
if ( true === $is_lazy_load_enabled && false === $is_lazy_load_native ) {
|
97 |
if ( ! wp_script_is( 'jquery', 'enqueued' ) ) {
|
98 |
wp_enqueue_script( 'jquery' );
|
367 |
'breeze-exclude-js' => array(),
|
368 |
'breeze-move-to-footer-js' => array(),
|
369 |
'breeze-defer-js' => array(),
|
370 |
+
'breeze-enable-js-delay' => '0',
|
371 |
);
|
372 |
|
373 |
$is_advanced = get_option( 'breeze_advanced_settings_120' );
|
inc/breeze-configuration.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* This plugin is inspired from WP Speed of Light by JoomUnited.
|
6 |
*
|
@@ -22,7 +22,7 @@ defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
|
|
22 |
|
23 |
class Breeze_Configuration {
|
24 |
public function __construct() {
|
25 |
-
|
26 |
$breeze_network_subsite_settings = false;
|
27 |
add_action( 'load-settings_page_breeze', array( $this, 'afterLoadConfigPage' ) );
|
28 |
}
|
@@ -100,10 +100,10 @@ class Breeze_Configuration {
|
|
100 |
// Advanced options tab
|
101 |
if ( isset( $_REQUEST['breeze_advanced_action'] ) && $_REQUEST['breeze_advanced_action'] == 'breeze_advanced_settings' ) {
|
102 |
if ( isset( $_POST['breeze_settings_advanced_nonce'] ) && wp_verify_nonce( $_POST['breeze_settings_advanced_nonce'], 'breeze_settings_advanced' ) ) {
|
103 |
-
$exclude_urls
|
104 |
-
$exclude_css
|
105 |
-
$exclude_js
|
106 |
-
$delay_js
|
107 |
$preload_fonts = $move_to_footer_js = $defer_js = array();
|
108 |
|
109 |
if ( ! empty( $exclude_js ) ) {
|
@@ -122,7 +122,7 @@ class Breeze_Configuration {
|
|
122 |
if ( trim( $font_url ) == '' ) {
|
123 |
continue;
|
124 |
}
|
125 |
-
$font_url
|
126 |
$preload_fonts[ sanitize_text_field( $font_url ) ] = sanitize_text_field( $font_url );
|
127 |
}
|
128 |
}
|
@@ -132,7 +132,7 @@ class Breeze_Configuration {
|
|
132 |
if ( trim( $url ) == '' ) {
|
133 |
continue;
|
134 |
}
|
135 |
-
$url
|
136 |
$move_to_footer_js[ sanitize_text_field( $url ) ] = sanitize_text_field( $url );
|
137 |
}
|
138 |
}
|
@@ -160,6 +160,7 @@ class Breeze_Configuration {
|
|
160 |
'breeze-defer-js' => $defer_js,
|
161 |
'breeze-delay-js-scripts' => $delay_js,
|
162 |
'breeze-preload-fonts' => $preload_fonts,
|
|
|
163 |
);
|
164 |
|
165 |
breeze_update_option( 'advanced_settings', $advanced, true );
|
@@ -272,26 +273,26 @@ class Breeze_Configuration {
|
|
272 |
$args['clean'] = true;
|
273 |
} else {
|
274 |
$args['content'] = 'SetEnv BREEZE_BROWSER_CACHE_ON 1' . PHP_EOL .
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
|
296 |
$args['conditions'] = array(
|
297 |
'mod_expires',
|
@@ -321,23 +322,23 @@ class Breeze_Configuration {
|
|
321 |
$args['clean'] = true;
|
322 |
} else {
|
323 |
$args['content'] = 'SetEnv BREEZE_GZIP_ON 1' . PHP_EOL .
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
|
342 |
$args['conditions'] = array(
|
343 |
'mod_deflate',
|
@@ -365,6 +366,7 @@ class Breeze_Configuration {
|
|
365 |
if ( $clean ) {
|
366 |
self::add_expires_header( $clean );
|
367 |
self::add_gzip_htacess( $clean );
|
|
|
368 |
return true;
|
369 |
}
|
370 |
|
@@ -462,8 +464,9 @@ class Breeze_Configuration {
|
|
462 |
// Remove host part from URLs.
|
463 |
${$enabled_sites} = array_filter(
|
464 |
array_map(
|
465 |
-
function( $url ) use ( $network_site_url ) {
|
466 |
$modified = str_replace( $network_site_url, '', $url );
|
|
|
467 |
return empty( $modified ) ? '/' : $modified;
|
468 |
},
|
469 |
${$enabled_sites}
|
@@ -482,8 +485,9 @@ class Breeze_Configuration {
|
|
482 |
// Remove host part from URLs.
|
483 |
${$disabled_sites} = array_filter(
|
484 |
array_map(
|
485 |
-
function( $url ) use ( $network_site_url ) {
|
486 |
$modified = str_replace( $network_site_url, '', $url );
|
|
|
487 |
return empty( $modified ) ? '/' : $modified;
|
488 |
},
|
489 |
${$disabled_sites}
|
@@ -511,6 +515,7 @@ class Breeze_Configuration {
|
|
511 |
// Caching not activated, clean up.
|
512 |
self::add_expires_header( true );
|
513 |
self::add_gzip_htacess( true );
|
|
|
514 |
return true;
|
515 |
}
|
516 |
}
|
@@ -555,6 +560,7 @@ class Breeze_Configuration {
|
|
555 |
}
|
556 |
|
557 |
file_put_contents( $htaccess_path, $htaccess_content );
|
|
|
558 |
return true;
|
559 |
}
|
560 |
|
@@ -643,6 +649,7 @@ class Breeze_Configuration {
|
|
643 |
$return = $wpdb->query( $element );
|
644 |
break;
|
645 |
}
|
|
|
646 |
return $return;
|
647 |
}
|
648 |
|
@@ -659,8 +666,10 @@ class Breeze_Configuration {
|
|
659 |
$output[] = trim( $v );
|
660 |
}
|
661 |
}
|
|
|
662 |
return $output;
|
663 |
}
|
|
|
664 |
//ajax clean cache
|
665 |
public static function breeze_clean_cache() {
|
666 |
// Check whether we're clearing the cache for one subsite on the network.
|
@@ -674,7 +683,7 @@ class Breeze_Configuration {
|
|
674 |
// Analyze minification directory sizes.
|
675 |
$files_path = rtrim( WP_CONTENT_DIR, '/' ) . '/cache/breeze-minification';
|
676 |
if ( $is_subsite ) {
|
677 |
-
$blog_id
|
678 |
$files_path .= DIRECTORY_SEPARATOR . $blog_id;
|
679 |
}
|
680 |
$size_cache += breeze_get_directory_size( $files_path, array( 'index.html' ) );
|
@@ -701,6 +710,7 @@ class Breeze_Configuration {
|
|
701 |
echo json_encode( $result );
|
702 |
exit;
|
703 |
}
|
|
|
704 |
/*
|
705 |
* Ajax purge varnish
|
706 |
*/
|
@@ -713,6 +723,7 @@ class Breeze_Configuration {
|
|
713 |
echo json_encode( array( 'clear' => true ) );
|
714 |
exit;
|
715 |
}
|
|
|
716 |
/*
|
717 |
* Ajax purge database
|
718 |
*/
|
@@ -726,6 +737,7 @@ class Breeze_Configuration {
|
|
726 |
echo json_encode( array( 'clear' => true ) );
|
727 |
exit;
|
728 |
}
|
|
|
729 |
public static function formatBytes( $bytes, $precision = 2 ) {
|
730 |
if ( $bytes >= 1073741824 ) {
|
731 |
$bytes = number_format( $bytes / 1073741824, 2 );
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @copyright 2017 Cloudways https://www.cloudways.com
|
4 |
*
|
5 |
* This plugin is inspired from WP Speed of Light by JoomUnited.
|
6 |
*
|
22 |
|
23 |
class Breeze_Configuration {
|
24 |
public function __construct() {
|
25 |
+
global $breeze_network_subsite_settings;
|
26 |
$breeze_network_subsite_settings = false;
|
27 |
add_action( 'load-settings_page_breeze', array( $this, 'afterLoadConfigPage' ) );
|
28 |
}
|
100 |
// Advanced options tab
|
101 |
if ( isset( $_REQUEST['breeze_advanced_action'] ) && $_REQUEST['breeze_advanced_action'] == 'breeze_advanced_settings' ) {
|
102 |
if ( isset( $_POST['breeze_settings_advanced_nonce'] ) && wp_verify_nonce( $_POST['breeze_settings_advanced_nonce'], 'breeze_settings_advanced' ) ) {
|
103 |
+
$exclude_urls = $this->string_convert_arr( sanitize_textarea_field( $_POST['exclude-urls'] ) );
|
104 |
+
$exclude_css = $this->string_convert_arr( sanitize_textarea_field( $_POST['exclude-css'] ) );
|
105 |
+
$exclude_js = $this->string_convert_arr( sanitize_textarea_field( $_POST['exclude-js'] ) );
|
106 |
+
$delay_js = $this->string_convert_arr( sanitize_textarea_field( $_POST['delay-js-scripts'] ) );
|
107 |
$preload_fonts = $move_to_footer_js = $defer_js = array();
|
108 |
|
109 |
if ( ! empty( $exclude_js ) ) {
|
122 |
if ( trim( $font_url ) == '' ) {
|
123 |
continue;
|
124 |
}
|
125 |
+
$font_url = current( explode( '?', $font_url, 2 ) );
|
126 |
$preload_fonts[ sanitize_text_field( $font_url ) ] = sanitize_text_field( $font_url );
|
127 |
}
|
128 |
}
|
132 |
if ( trim( $url ) == '' ) {
|
133 |
continue;
|
134 |
}
|
135 |
+
$url = current( explode( '?', $url, 2 ) );
|
136 |
$move_to_footer_js[ sanitize_text_field( $url ) ] = sanitize_text_field( $url );
|
137 |
}
|
138 |
}
|
160 |
'breeze-defer-js' => $defer_js,
|
161 |
'breeze-delay-js-scripts' => $delay_js,
|
162 |
'breeze-preload-fonts' => $preload_fonts,
|
163 |
+
'breeze-enable-js-delay' => ( isset( $_POST['enable-js-delay'] ) ? '1' : '0' ),
|
164 |
);
|
165 |
|
166 |
breeze_update_option( 'advanced_settings', $advanced, true );
|
273 |
$args['clean'] = true;
|
274 |
} else {
|
275 |
$args['content'] = 'SetEnv BREEZE_BROWSER_CACHE_ON 1' . PHP_EOL .
|
276 |
+
'<IfModule mod_expires.c>' . PHP_EOL .
|
277 |
+
' ExpiresActive On' . PHP_EOL .
|
278 |
+
' ExpiresByType image/gif "access 1 year"' . PHP_EOL .
|
279 |
+
' ExpiresByType image/jpg "access 1 year"' . PHP_EOL .
|
280 |
+
' ExpiresByType image/jpeg "access 1 year"' . PHP_EOL .
|
281 |
+
' ExpiresByType image/png "access 1 year"' . PHP_EOL .
|
282 |
+
' ExpiresByType image/x-icon "access 1 year"' . PHP_EOL .
|
283 |
+
' ExpiresByType text/html "access plus 0 seconds"' . PHP_EOL .
|
284 |
+
' ExpiresByType text/xml "access plus 0 seconds"' . PHP_EOL .
|
285 |
+
' ExpiresByType text/css "access 1 month"' . PHP_EOL .
|
286 |
+
' ExpiresByType text/javascript "access 1 month"' . PHP_EOL .
|
287 |
+
' ExpiresByType application/xml "access plus 0 seconds"' . PHP_EOL .
|
288 |
+
' ExpiresByType application/json "access plus 0 seconds"' . PHP_EOL .
|
289 |
+
' ExpiresByType application/javascript "access 1 month"' . PHP_EOL .
|
290 |
+
' ExpiresByType application/x-javascript "access 1 month"' . PHP_EOL .
|
291 |
+
' ExpiresByType application/xhtml-xml "access 1 month"' . PHP_EOL .
|
292 |
+
' ExpiresByType application/pdf "access 1 month"' . PHP_EOL .
|
293 |
+
' ExpiresByType application/x-shockwave-flash "access 1 month"' . PHP_EOL .
|
294 |
+
' ExpiresDefault "access 1 month"' . PHP_EOL .
|
295 |
+
'</IfModule>' . PHP_EOL;
|
296 |
|
297 |
$args['conditions'] = array(
|
298 |
'mod_expires',
|
322 |
$args['clean'] = true;
|
323 |
} else {
|
324 |
$args['content'] = 'SetEnv BREEZE_GZIP_ON 1' . PHP_EOL .
|
325 |
+
'<IfModule mod_deflate.c>' . PHP_EOL .
|
326 |
+
' AddType x-font/woff .woff' . PHP_EOL .
|
327 |
+
' AddOutputFilterByType DEFLATE image/svg+xml' . PHP_EOL .
|
328 |
+
' AddOutputFilterByType DEFLATE text/plain' . PHP_EOL .
|
329 |
+
' AddOutputFilterByType DEFLATE text/html' . PHP_EOL .
|
330 |
+
' AddOutputFilterByType DEFLATE text/xml' . PHP_EOL .
|
331 |
+
' AddOutputFilterByType DEFLATE text/css' . PHP_EOL .
|
332 |
+
' AddOutputFilterByType DEFLATE text/javascript' . PHP_EOL .
|
333 |
+
' AddOutputFilterByType DEFLATE application/xml' . PHP_EOL .
|
334 |
+
' AddOutputFilterByType DEFLATE application/xhtml+xml' . PHP_EOL .
|
335 |
+
' AddOutputFilterByType DEFLATE application/rss+xml' . PHP_EOL .
|
336 |
+
' AddOutputFilterByType DEFLATE application/javascript' . PHP_EOL .
|
337 |
+
' AddOutputFilterByType DEFLATE application/x-javascript' . PHP_EOL .
|
338 |
+
' AddOutputFilterByType DEFLATE application/x-font-ttf' . PHP_EOL .
|
339 |
+
' AddOutputFilterByType DEFLATE application/vnd.ms-fontobject' . PHP_EOL .
|
340 |
+
' AddOutputFilterByType DEFLATE font/opentype font/ttf font/eot font/otf' . PHP_EOL .
|
341 |
+
'</IfModule>' . PHP_EOL;
|
342 |
|
343 |
$args['conditions'] = array(
|
344 |
'mod_deflate',
|
366 |
if ( $clean ) {
|
367 |
self::add_expires_header( $clean );
|
368 |
self::add_gzip_htacess( $clean );
|
369 |
+
|
370 |
return true;
|
371 |
}
|
372 |
|
464 |
// Remove host part from URLs.
|
465 |
${$enabled_sites} = array_filter(
|
466 |
array_map(
|
467 |
+
function ( $url ) use ( $network_site_url ) {
|
468 |
$modified = str_replace( $network_site_url, '', $url );
|
469 |
+
|
470 |
return empty( $modified ) ? '/' : $modified;
|
471 |
},
|
472 |
${$enabled_sites}
|
485 |
// Remove host part from URLs.
|
486 |
${$disabled_sites} = array_filter(
|
487 |
array_map(
|
488 |
+
function ( $url ) use ( $network_site_url ) {
|
489 |
$modified = str_replace( $network_site_url, '', $url );
|
490 |
+
|
491 |
return empty( $modified ) ? '/' : $modified;
|
492 |
},
|
493 |
${$disabled_sites}
|
515 |
// Caching not activated, clean up.
|
516 |
self::add_expires_header( true );
|
517 |
self::add_gzip_htacess( true );
|
518 |
+
|
519 |
return true;
|
520 |
}
|
521 |
}
|
560 |
}
|
561 |
|
562 |
file_put_contents( $htaccess_path, $htaccess_content );
|
563 |
+
|
564 |
return true;
|
565 |
}
|
566 |
|
649 |
$return = $wpdb->query( $element );
|
650 |
break;
|
651 |
}
|
652 |
+
|
653 |
return $return;
|
654 |
}
|
655 |
|
666 |
$output[] = trim( $v );
|
667 |
}
|
668 |
}
|
669 |
+
|
670 |
return $output;
|
671 |
}
|
672 |
+
|
673 |
//ajax clean cache
|
674 |
public static function breeze_clean_cache() {
|
675 |
// Check whether we're clearing the cache for one subsite on the network.
|
683 |
// Analyze minification directory sizes.
|
684 |
$files_path = rtrim( WP_CONTENT_DIR, '/' ) . '/cache/breeze-minification';
|
685 |
if ( $is_subsite ) {
|
686 |
+
$blog_id = get_current_blog_id();
|
687 |
$files_path .= DIRECTORY_SEPARATOR . $blog_id;
|
688 |
}
|
689 |
$size_cache += breeze_get_directory_size( $files_path, array( 'index.html' ) );
|
710 |
echo json_encode( $result );
|
711 |
exit;
|
712 |
}
|
713 |
+
|
714 |
/*
|
715 |
* Ajax purge varnish
|
716 |
*/
|
723 |
echo json_encode( array( 'clear' => true ) );
|
724 |
exit;
|
725 |
}
|
726 |
+
|
727 |
/*
|
728 |
* Ajax purge database
|
729 |
*/
|
737 |
echo json_encode( array( 'clear' => true ) );
|
738 |
exit;
|
739 |
}
|
740 |
+
|
741 |
public static function formatBytes( $bytes, $precision = 2 ) {
|
742 |
if ( $bytes >= 1073741824 ) {
|
743 |
$bytes = number_format( $bytes / 1073741824, 2 );
|
inc/helpers.php
CHANGED
@@ -749,4 +749,81 @@ function breeze_libraries_already_minified( $script_path = '' ) {
|
|
749 |
return false;
|
750 |
|
751 |
}
|
|
|
752 |
add_filter( 'breeze_js_ignore_minify', 'breeze_libraries_already_minified' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
749 |
return false;
|
750 |
|
751 |
}
|
752 |
+
|
753 |
add_filter( 'breeze_js_ignore_minify', 'breeze_libraries_already_minified' );
|
754 |
+
|
755 |
+
/**
|
756 |
+
* Will check if there are any differences between saved option and default.
|
757 |
+
*
|
758 |
+
* if returns false, the nno changes occurred.
|
759 |
+
* If returns true, then there are differences.
|
760 |
+
*
|
761 |
+
* @param bool $is_network if it's called from multisite network.
|
762 |
+
*
|
763 |
+
* @return bool
|
764 |
+
* @since 1.2.1
|
765 |
+
*/
|
766 |
+
function breeze_is_delayjs_changed( $is_network = false, $blog_id = 0, $root = false ) {
|
767 |
+
if ( true === $is_network ) {
|
768 |
+
$saved_options = get_site_option( 'breeze_advanced_settings' );
|
769 |
+
} elseif ( true === $root ) {
|
770 |
+
$saved_options = get_blog_option( $blog_id, 'breeze_advanced_settings' );
|
771 |
+
} else {
|
772 |
+
$saved_options = get_option( 'breeze_advanced_settings' );
|
773 |
+
}
|
774 |
+
|
775 |
+
|
776 |
+
if ( ! isset( $saved_options['breeze-delay-js-scripts'] ) ) {
|
777 |
+
return true;
|
778 |
+
}
|
779 |
+
|
780 |
+
if ( empty( $saved_options['breeze-delay-js-scripts'] ) ) {
|
781 |
+
return true;
|
782 |
+
}
|
783 |
+
|
784 |
+
$saved_options['breeze-delay-js-scripts'] = array_filter( $saved_options['breeze-delay-js-scripts'] );
|
785 |
+
|
786 |
+
$default_values = array(
|
787 |
+
'gtag',
|
788 |
+
'document.write',
|
789 |
+
'html5.js',
|
790 |
+
'show_ads.js',
|
791 |
+
'google_ad',
|
792 |
+
'blogcatalog.com/w',
|
793 |
+
'tweetmeme.com/i',
|
794 |
+
'mybloglog.com/',
|
795 |
+
'histats.com/js',
|
796 |
+
'ads.smowtion.com/ad.js',
|
797 |
+
'statcounter.com/counter/counter.js',
|
798 |
+
'widgets.amung.us',
|
799 |
+
'ws.amazon.com/widgets',
|
800 |
+
'media.fastclick.net',
|
801 |
+
'/ads/',
|
802 |
+
'comment-form-quicktags/quicktags.php',
|
803 |
+
'edToolbar',
|
804 |
+
'intensedebate.com',
|
805 |
+
'scripts.chitika.net/',
|
806 |
+
'_gaq.push',
|
807 |
+
'jotform.com/',
|
808 |
+
'admin-bar.min.js',
|
809 |
+
'GoogleAnalyticsObject',
|
810 |
+
'plupload.full.min.js',
|
811 |
+
'syntaxhighlighter',
|
812 |
+
'adsbygoogle',
|
813 |
+
'gist.github.com',
|
814 |
+
'_stq',
|
815 |
+
'nonce',
|
816 |
+
'post_id',
|
817 |
+
'data-noptimize',
|
818 |
+
'googletagmanager',
|
819 |
+
);
|
820 |
+
|
821 |
+
$differences = array_diff( $saved_options['breeze-delay-js-scripts'], $default_values );
|
822 |
+
$differences_2 = array_diff( $default_values, $saved_options['breeze-delay-js-scripts'] );
|
823 |
+
|
824 |
+
if ( empty( $differences ) && empty( $differences_2 ) ) {
|
825 |
+
return false;
|
826 |
+
}
|
827 |
+
|
828 |
+
return true;
|
829 |
+
}
|
inc/minification/breeze-minification-scripts.php
CHANGED
@@ -10,9 +10,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
10 |
} // Exit if accessed directly
|
11 |
|
12 |
class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
13 |
-
private $head_scripts
|
14 |
-
private $footer_scripts
|
15 |
-
private $dontmove
|
16 |
'gtag',
|
17 |
'document.write',
|
18 |
'html5.js',
|
@@ -48,8 +48,8 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
48 |
);
|
49 |
private $donotmove_exception = array( 'jQuery' );
|
50 |
|
51 |
-
private $domove
|
52 |
-
private $domovelast
|
53 |
'addthis.com',
|
54 |
'/afsonline/show_afs_search.js',
|
55 |
'disqus.js',
|
@@ -64,40 +64,40 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
64 |
'post_id',
|
65 |
'googletagmanager',
|
66 |
);
|
67 |
-
private $trycatch
|
68 |
-
private $alreadyminified
|
69 |
-
private $forcehead
|
70 |
-
private $include_inline
|
71 |
-
private $jscode
|
72 |
-
private $url
|
73 |
-
private $move
|
74 |
'first' => array(),
|
75 |
'last' => array(),
|
76 |
);
|
77 |
-
private $restofcontent
|
78 |
-
private $md5hash
|
79 |
-
private $whitelist
|
80 |
-
private $jsremovables
|
81 |
-
private $inject_min_late
|
82 |
-
private $group_js
|
83 |
-
private $custom_js_exclude
|
84 |
-
private $js_head_group
|
85 |
-
private $js_footer_group
|
86 |
-
private $js_min_head
|
87 |
-
private $js_min_footer
|
88 |
-
private $url_group_head
|
89 |
-
private $url_group_footer
|
90 |
-
private $jscode_inline_head
|
91 |
-
private $jscode_inline_footer
|
92 |
-
private $move_to_footer_js
|
93 |
-
private $move_to_footer
|
94 |
-
private $defer_js
|
95 |
-
private $full_script
|
96 |
-
private $uncompressed_inline
|
97 |
-
private $inline_increment
|
98 |
-
private $original_content
|
99 |
private $show_original_content = 0;
|
100 |
-
private $do_process
|
101 |
/**
|
102 |
* Defer/Delay the inline scripts.
|
103 |
*
|
@@ -341,10 +341,10 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
341 |
'version' => $script_version,
|
342 |
);
|
343 |
}
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
|
349 |
}
|
350 |
}
|
@@ -388,10 +388,10 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
388 |
$this->delay_scripts['footer'][] = $code;
|
389 |
}
|
390 |
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
|
396 |
}
|
397 |
}
|
@@ -460,7 +460,7 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
460 |
if ( empty( $this->include_inline ) ) {
|
461 |
|
462 |
$index_inline = "/*!IS_UNCOMPRESSED_INLINE_{$this->inline_increment}*/";
|
463 |
-
$this->full_script
|
464 |
$this->uncompressed_inline[ $index_inline ] = $script;
|
465 |
$this->inline_increment ++;
|
466 |
|
@@ -683,14 +683,14 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
683 |
if ( ! file_exists( $cache_directory . $cache->get_file_name() ) ) {
|
684 |
$url_exists = false;
|
685 |
} else {
|
686 |
-
$url
|
687 |
if ( is_numeric( $old_url ) && $this->is_inline_delay( $js_code ) ) {
|
688 |
$this->url_group_head['defer'] = $this->url_replace_cdn( $url );
|
689 |
} else {
|
690 |
-
|
|
|
691 |
}
|
692 |
}
|
693 |
-
}
|
694 |
|
695 |
foreach ( $this->js_min_footer as $old_url => $js_min ) {
|
696 |
$namehash = substr( $js_min, 0, strpos( $js_min, '_breezejsgroup_' ) );
|
@@ -705,12 +705,12 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
705 |
if ( ! file_exists( $cache_directory . $cache->get_file_name() ) ) {
|
706 |
$url_exists = false;
|
707 |
} else {
|
708 |
-
$url
|
709 |
if ( is_numeric( $old_url ) && $this->is_inline_delay( $js_code ) ) {
|
710 |
$this->url_group_footer['defer'] = $this->url_replace_cdn( $url );
|
711 |
} else {
|
712 |
-
|
713 |
-
|
714 |
|
715 |
}
|
716 |
}
|
@@ -730,7 +730,7 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
730 |
|
731 |
// Restore the full content
|
732 |
if ( ! empty( $this->restofcontent ) ) {
|
733 |
-
$this->content
|
734 |
$this->restofcontent = '';
|
735 |
}
|
736 |
|
@@ -743,11 +743,11 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
743 |
if ( $is_delayed = $this->is_inline_delay( $js ) ) {
|
744 |
$jsHead[] = '<script type="module">' . $js . '</script>';
|
745 |
} else {
|
746 |
-
|
747 |
-
|
748 |
|
749 |
}
|
750 |
-
$jsReplacement
|
751 |
$jsReplacement .= implode( '', $jsHead );
|
752 |
$this->inject_in_html( $jsReplacement, $replaceTag );
|
753 |
}
|
@@ -758,11 +758,11 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
758 |
foreach ( $this->jscode_inline_footer as $js ) {
|
759 |
if ( $is_delayed = $this->is_inline_delay( $js ) ) {
|
760 |
$jsFooter[] = '<script type="module">' . $js . '</script>';
|
761 |
-
}else{
|
762 |
-
|
763 |
-
|
764 |
}
|
765 |
-
$jsReplacement
|
766 |
$jsReplacement .= implode( '', $jsFooter );
|
767 |
$this->inject_in_html( $jsReplacement, $replaceTag );
|
768 |
}
|
@@ -775,7 +775,7 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
775 |
$bodyreplacementpayload = '<script type="text/javascript" defer src="' . $this->url . '"></script>';
|
776 |
$bodyreplacementpayload = apply_filters( 'breeze_filter_js_bodyreplacementpayload', $bodyreplacementpayload );
|
777 |
|
778 |
-
$bodyreplacement
|
779 |
$bodyreplacement .= $bodyreplacementpayload;
|
780 |
$bodyreplacement .= implode( '', $this->move['last'] );
|
781 |
|
@@ -812,6 +812,8 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
812 |
$js_footer_defer = array();
|
813 |
$defer = 'defer ';
|
814 |
foreach ( $this->delay_scripts['footer'] as $js_url => $js_script ) {
|
|
|
|
|
815 |
if ( filter_var( $js_url, FILTER_VALIDATE_URL ) ) {
|
816 |
if ( ! empty( $js_script['version'] ) ) {
|
817 |
$js_url .= '?' . $js_script['version'];
|
@@ -851,7 +853,7 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
851 |
}
|
852 |
$jsReplacementPayload = implode( '', $headScript );
|
853 |
|
854 |
-
$jsReplacement
|
855 |
$jsReplacement .= $jsReplacementPayload;
|
856 |
|
857 |
$replaceTag = apply_filters( 'breeze_filter_js_replacetag', $replaceTag );
|
@@ -880,7 +882,7 @@ class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
|
880 |
}
|
881 |
$jsReplacementPayload = implode( '', $footerScript );
|
882 |
|
883 |
-
$jsReplacement
|
884 |
$jsReplacement .= implode( '', $this->move['last'] );
|
885 |
|
886 |
$replaceTag = apply_filters( 'breeze_filter_js_replacetag', $replaceTag );
|
10 |
} // Exit if accessed directly
|
11 |
|
12 |
class Breeze_MinificationScripts extends Breeze_MinificationBase {
|
13 |
+
private $head_scripts = array();
|
14 |
+
private $footer_scripts = array();
|
15 |
+
private $dontmove = array(
|
16 |
'gtag',
|
17 |
'document.write',
|
18 |
'html5.js',
|
48 |
);
|
49 |
private $donotmove_exception = array( 'jQuery' );
|
50 |
|
51 |
+
private $domove = array( 'gaJsHost', 'load_cmc', 'jd.gallery.transitions.js', 'swfobject.embedSWF(', 'tiny_mce.js', 'tinyMCEPreInit.go' );
|
52 |
+
private $domovelast = array(
|
53 |
'addthis.com',
|
54 |
'/afsonline/show_afs_search.js',
|
55 |
'disqus.js',
|
64 |
'post_id',
|
65 |
'googletagmanager',
|
66 |
);
|
67 |
+
private $trycatch = false;
|
68 |
+
private $alreadyminified = false;
|
69 |
+
private $forcehead = true;
|
70 |
+
private $include_inline = false;
|
71 |
+
private $jscode = '';
|
72 |
+
private $url = '';
|
73 |
+
private $move = array(
|
74 |
'first' => array(),
|
75 |
'last' => array(),
|
76 |
);
|
77 |
+
private $restofcontent = '';
|
78 |
+
private $md5hash = '';
|
79 |
+
private $whitelist = '';
|
80 |
+
private $jsremovables = array();
|
81 |
+
private $inject_min_late = '';
|
82 |
+
private $group_js = false;
|
83 |
+
private $custom_js_exclude = array();
|
84 |
+
private $js_head_group = array();
|
85 |
+
private $js_footer_group = array();
|
86 |
+
private $js_min_head = array();
|
87 |
+
private $js_min_footer = array();
|
88 |
+
private $url_group_head = array();
|
89 |
+
private $url_group_footer = array();
|
90 |
+
private $jscode_inline_head = array();
|
91 |
+
private $jscode_inline_footer = array();
|
92 |
+
private $move_to_footer_js = array();
|
93 |
+
private $move_to_footer = array();
|
94 |
+
private $defer_js = array();
|
95 |
+
private $full_script = '';
|
96 |
+
private $uncompressed_inline = array();
|
97 |
+
private $inline_increment = 1;
|
98 |
+
private $original_content = '';
|
99 |
private $show_original_content = 0;
|
100 |
+
private $do_process = false;
|
101 |
/**
|
102 |
* Defer/Delay the inline scripts.
|
103 |
*
|
341 |
'version' => $script_version,
|
342 |
);
|
343 |
}
|
344 |
+
} else {
|
345 |
+
//We shouldn't touch this
|
346 |
+
$tag = '';
|
347 |
+
}
|
348 |
|
349 |
}
|
350 |
}
|
388 |
$this->delay_scripts['footer'][] = $code;
|
389 |
}
|
390 |
|
391 |
+
} else {
|
392 |
+
//We shouldn't touch this
|
393 |
+
$tag = '';
|
394 |
+
}
|
395 |
|
396 |
}
|
397 |
}
|
460 |
if ( empty( $this->include_inline ) ) {
|
461 |
|
462 |
$index_inline = "/*!IS_UNCOMPRESSED_INLINE_{$this->inline_increment}*/";
|
463 |
+
$this->full_script .= $index_inline;
|
464 |
$this->uncompressed_inline[ $index_inline ] = $script;
|
465 |
$this->inline_increment ++;
|
466 |
|
683 |
if ( ! file_exists( $cache_directory . $cache->get_file_name() ) ) {
|
684 |
$url_exists = false;
|
685 |
} else {
|
686 |
+
$url = breeze_CACHE_URL . breeze_current_user_type() . $cache->getname();
|
687 |
if ( is_numeric( $old_url ) && $this->is_inline_delay( $js_code ) ) {
|
688 |
$this->url_group_head['defer'] = $this->url_replace_cdn( $url );
|
689 |
} else {
|
690 |
+
$this->url_group_head[ $old_url ] = $this->url_replace_cdn( $url );
|
691 |
+
}
|
692 |
}
|
693 |
}
|
|
|
694 |
|
695 |
foreach ( $this->js_min_footer as $old_url => $js_min ) {
|
696 |
$namehash = substr( $js_min, 0, strpos( $js_min, '_breezejsgroup_' ) );
|
705 |
if ( ! file_exists( $cache_directory . $cache->get_file_name() ) ) {
|
706 |
$url_exists = false;
|
707 |
} else {
|
708 |
+
$url = breeze_CACHE_URL . breeze_current_user_type() . $cache->getname();
|
709 |
if ( is_numeric( $old_url ) && $this->is_inline_delay( $js_code ) ) {
|
710 |
$this->url_group_footer['defer'] = $this->url_replace_cdn( $url );
|
711 |
} else {
|
712 |
+
$this->url_group_footer[ $old_url ] = $this->url_replace_cdn( $url );
|
713 |
+
}
|
714 |
|
715 |
}
|
716 |
}
|
730 |
|
731 |
// Restore the full content
|
732 |
if ( ! empty( $this->restofcontent ) ) {
|
733 |
+
$this->content .= $this->restofcontent;
|
734 |
$this->restofcontent = '';
|
735 |
}
|
736 |
|
743 |
if ( $is_delayed = $this->is_inline_delay( $js ) ) {
|
744 |
$jsHead[] = '<script type="module">' . $js . '</script>';
|
745 |
} else {
|
746 |
+
$jsHead[] = '<script type="text/javascript">' . $js . '</script>';
|
747 |
+
}
|
748 |
|
749 |
}
|
750 |
+
$jsReplacement = '';
|
751 |
$jsReplacement .= implode( '', $jsHead );
|
752 |
$this->inject_in_html( $jsReplacement, $replaceTag );
|
753 |
}
|
758 |
foreach ( $this->jscode_inline_footer as $js ) {
|
759 |
if ( $is_delayed = $this->is_inline_delay( $js ) ) {
|
760 |
$jsFooter[] = '<script type="module">' . $js . '</script>';
|
761 |
+
} else {
|
762 |
+
$jsFooter[] = '<script type="text/javascript">' . $js . '</script>';
|
763 |
+
}
|
764 |
}
|
765 |
+
$jsReplacement = '';
|
766 |
$jsReplacement .= implode( '', $jsFooter );
|
767 |
$this->inject_in_html( $jsReplacement, $replaceTag );
|
768 |
}
|
775 |
$bodyreplacementpayload = '<script type="text/javascript" defer src="' . $this->url . '"></script>';
|
776 |
$bodyreplacementpayload = apply_filters( 'breeze_filter_js_bodyreplacementpayload', $bodyreplacementpayload );
|
777 |
|
778 |
+
$bodyreplacement = implode( '', $this->move['first'] );
|
779 |
$bodyreplacement .= $bodyreplacementpayload;
|
780 |
$bodyreplacement .= implode( '', $this->move['last'] );
|
781 |
|
812 |
$js_footer_defer = array();
|
813 |
$defer = 'defer ';
|
814 |
foreach ( $this->delay_scripts['footer'] as $js_url => $js_script ) {
|
815 |
+
$js_url = trim( $js_url, '”' );
|
816 |
+
|
817 |
if ( filter_var( $js_url, FILTER_VALIDATE_URL ) ) {
|
818 |
if ( ! empty( $js_script['version'] ) ) {
|
819 |
$js_url .= '?' . $js_script['version'];
|
853 |
}
|
854 |
$jsReplacementPayload = implode( '', $headScript );
|
855 |
|
856 |
+
$jsReplacement = implode( '', $this->move['first'] );
|
857 |
$jsReplacement .= $jsReplacementPayload;
|
858 |
|
859 |
$replaceTag = apply_filters( 'breeze_filter_js_replacetag', $replaceTag );
|
882 |
}
|
883 |
$jsReplacementPayload = implode( '', $footerScript );
|
884 |
|
885 |
+
$jsReplacement = $jsReplacementPayload;
|
886 |
$jsReplacement .= implode( '', $this->move['last'] );
|
887 |
|
888 |
$replaceTag = apply_filters( 'breeze_filter_js_replacetag', $replaceTag );
|
inc/minification/breeze-minify-main.php
CHANGED
@@ -36,7 +36,19 @@ class Breeze_Minify {
|
|
36 |
if ( Breeze_MinificationCache::create_cache_minification_folder() ) {
|
37 |
$conf = breeze_get_option( 'basic_settings' );
|
38 |
$config_advanced = breeze_get_option( 'advanced_settings' );
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
if ( defined( 'breeze_INIT_EARLIER' ) ) {
|
42 |
add_action( 'init', array( $this, 'breeze_start_buffering' ), - 1 );
|
@@ -78,6 +90,10 @@ class Breeze_Minify {
|
|
78 |
$conf = breeze_get_option( 'basic_settings' );
|
79 |
$config_advanced = breeze_get_option( 'advanced_settings' );
|
80 |
|
|
|
|
|
|
|
|
|
81 |
// Load our base class
|
82 |
include_once( BREEZE_PLUGIN_DIR . 'inc/minification/breeze-minification-base.php' );
|
83 |
|
@@ -103,7 +119,11 @@ class Breeze_Minify {
|
|
103 |
if ( ! defined( 'COMPRESS_SCRIPTS' ) ) {
|
104 |
define( 'COMPRESS_SCRIPTS', false );
|
105 |
}
|
106 |
-
} elseif (
|
|
|
|
|
|
|
|
|
107 |
// If we have defer scripts to handle, load only the script for this action.
|
108 |
include_once( BREEZE_PLUGIN_DIR . 'inc/minification/breeze-js-deferred-loading.php' );
|
109 |
}
|
@@ -158,6 +178,11 @@ class Breeze_Minify {
|
|
158 |
$conf = breeze_get_option( 'basic_settings' );
|
159 |
$minify = breeze_get_option( 'advanced_settings' );
|
160 |
$cdn_data = breeze_get_option( 'cdn_integration' );
|
|
|
|
|
|
|
|
|
|
|
161 |
$cdn_url = '';
|
162 |
if ( $cdn_data ) {
|
163 |
if ( '1' === $cdn_data['cdn-active'] ) {
|
@@ -169,7 +194,11 @@ class Breeze_Minify {
|
|
169 |
$js_include_inline = $css_include_inline = false;
|
170 |
if ( ! empty( $conf['breeze-minify-js'] ) ) {
|
171 |
$classes[] = 'Breeze_MinificationScripts';
|
172 |
-
} elseif (
|
|
|
|
|
|
|
|
|
173 |
$classes[] = 'Breeze_Js_Deferred_Loading';
|
174 |
}
|
175 |
|
36 |
if ( Breeze_MinificationCache::create_cache_minification_folder() ) {
|
37 |
$conf = breeze_get_option( 'basic_settings' );
|
38 |
$config_advanced = breeze_get_option( 'advanced_settings' );
|
39 |
+
|
40 |
+
if ( ! isset( $config_advanced['breeze-enable-js-delay'] ) ) {
|
41 |
+
$config_advanced['breeze-enable-js-delay'] = '0';
|
42 |
+
}
|
43 |
+
|
44 |
+
if (
|
45 |
+
! empty( $conf['breeze-minify-html'] ) ||
|
46 |
+
! empty( $conf['breeze-minify-css'] ) ||
|
47 |
+
! empty( $conf['breeze-minify-js'] ) ||
|
48 |
+
! empty( $config_advanced['breeze-defer-js'] ) ||
|
49 |
+
! empty( $config_advanced['breeze-move-to-footer-js'] ) ||
|
50 |
+
( ! empty( $config_advanced['breeze-delay-js-scripts'] ) && true === filter_var( $config_advanced['breeze-enable-js-delay'], FILTER_VALIDATE_BOOLEAN ) )
|
51 |
+
) {
|
52 |
|
53 |
if ( defined( 'breeze_INIT_EARLIER' ) ) {
|
54 |
add_action( 'init', array( $this, 'breeze_start_buffering' ), - 1 );
|
90 |
$conf = breeze_get_option( 'basic_settings' );
|
91 |
$config_advanced = breeze_get_option( 'advanced_settings' );
|
92 |
|
93 |
+
if ( ! isset( $config_advanced['breeze-enable-js-delay'] ) ) {
|
94 |
+
$config_advanced['breeze-enable-js-delay'] = '0';
|
95 |
+
}
|
96 |
+
|
97 |
// Load our base class
|
98 |
include_once( BREEZE_PLUGIN_DIR . 'inc/minification/breeze-minification-base.php' );
|
99 |
|
119 |
if ( ! defined( 'COMPRESS_SCRIPTS' ) ) {
|
120 |
define( 'COMPRESS_SCRIPTS', false );
|
121 |
}
|
122 |
+
} elseif (
|
123 |
+
! empty( $config_advanced['breeze-defer-js'] ) ||
|
124 |
+
! empty( $config_advanced['breeze-move-to-footer-js'] ) ||
|
125 |
+
( ! empty( $config_advanced['breeze-delay-js-scripts'] ) && true === filter_var( $config_advanced['breeze-enable-js-delay'], FILTER_VALIDATE_BOOLEAN ) )
|
126 |
+
) {
|
127 |
// If we have defer scripts to handle, load only the script for this action.
|
128 |
include_once( BREEZE_PLUGIN_DIR . 'inc/minification/breeze-js-deferred-loading.php' );
|
129 |
}
|
178 |
$conf = breeze_get_option( 'basic_settings' );
|
179 |
$minify = breeze_get_option( 'advanced_settings' );
|
180 |
$cdn_data = breeze_get_option( 'cdn_integration' );
|
181 |
+
|
182 |
+
if ( ! isset( $minify['breeze-enable-js-delay'] ) ) {
|
183 |
+
$minify['breeze-enable-js-delay'] = '0';
|
184 |
+
}
|
185 |
+
|
186 |
$cdn_url = '';
|
187 |
if ( $cdn_data ) {
|
188 |
if ( '1' === $cdn_data['cdn-active'] ) {
|
194 |
$js_include_inline = $css_include_inline = false;
|
195 |
if ( ! empty( $conf['breeze-minify-js'] ) ) {
|
196 |
$classes[] = 'Breeze_MinificationScripts';
|
197 |
+
} elseif (
|
198 |
+
! empty( $minify['breeze-defer-js'] ) ||
|
199 |
+
! empty( $minify['breeze-move-to-footer-js'] ) ||
|
200 |
+
( ! empty( $minify['breeze-delay-js-scripts'] ) && true === filter_var( $minify['breeze-enable-js-delay'], FILTER_VALIDATE_BOOLEAN ) )
|
201 |
+
) {
|
202 |
$classes[] = 'Breeze_Js_Deferred_Loading';
|
203 |
}
|
204 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Cloudways
|
|
3 |
Tags: cache,caching, performance, wp-cache, cdn, combine, compress, speed plugin, database cache,gzip, http compression, js cache, minify, optimize, page cache, performance, speed, expire headers
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 5.7
|
6 |
-
Stable tag: 1.2.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -145,6 +145,11 @@ Using Gzip, Breeze compresses the request files, further reducing the size of th
|
|
145 |
|
146 |
== Changelog ==
|
147 |
|
|
|
|
|
|
|
|
|
|
|
148 |
= 1.2.0 =
|
149 |
|
150 |
* Add: “noreferrer noopener” attributes tag on external links when process HTML for caching.
|
3 |
Tags: cache,caching, performance, wp-cache, cdn, combine, compress, speed plugin, database cache,gzip, http compression, js cache, minify, optimize, page cache, performance, speed, expire headers
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 5.7
|
6 |
+
Stable tag: 1.2.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
145 |
|
146 |
== Changelog ==
|
147 |
|
148 |
+
= 1.2.1 =
|
149 |
+
|
150 |
+
* Fix: improve the handling of warning undefine index of lazy load image while enable debug mode.
|
151 |
+
* Add: Enable/Disable option of Delay JS inline scripts.
|
152 |
+
|
153 |
= 1.2.0 =
|
154 |
|
155 |
* Add: “noreferrer noopener” attributes tag on external links when process HTML for caching.
|
views/tabs/advanced.php
CHANGED
@@ -45,6 +45,12 @@ if ( ! isset( $advanced['breeze-group-css'] ) ) {
|
|
45 |
if ( ! isset( $advanced['breeze-group-js'] ) ) {
|
46 |
$advanced['breeze-group-js'] = '0';
|
47 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
?>
|
49 |
<table cellspacing="15" id="advanced-options-tab">
|
50 |
<tr>
|
@@ -100,11 +106,11 @@ if ( ! isset( $advanced['breeze-group-js'] ) ) {
|
|
100 |
</span>
|
101 |
</td>
|
102 |
</tr>
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
<?php
|
109 |
$css_output = '';
|
110 |
if ( ! empty( $advanced['breeze-exclude-urls'] ) ) {
|
@@ -112,46 +118,46 @@ if ( ! isset( $advanced['breeze-group-js'] ) ) {
|
|
112 |
$css_output = esc_textarea( $output );
|
113 |
}
|
114 |
?>
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
<?php if ( false === $excluded_url_list ) { ?>
|
121 |
-
|
122 |
-
|
123 |
<?php _e( 'One (or more) URL is invalid. Please check and correct the entry.', 'breeze' ); ?>
|
124 |
</span>
|
125 |
<?php } ?>
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
<span class="breeze_tool_tip">
|
146 |
<b>Note: </b><?php _e( 'Group CSS and JS files to combine them into a single file. This will reduce the number of HTTP requests to your server.', 'breeze' ); ?><br>
|
147 |
<b><?php _e( 'Important: Enable Minification to use this option.', 'breeze' ); ?></b>
|
148 |
</span>
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
<label class="breeze_tool_tip"><?php _e( 'Preload links', 'breeze' ); ?></label>
|
156 |
</td>
|
157 |
<td>
|
@@ -167,9 +173,9 @@ if ( ! isset( $advanced['breeze-group-js'] ) ) {
|
|
167 |
</tr>
|
168 |
<tr>
|
169 |
<td>
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
<?php
|
174 |
$css_output = '';
|
175 |
if ( ! empty( $advanced['breeze-exclude-css'] ) ) {
|
@@ -177,23 +183,23 @@ if ( ! isset( $advanced['breeze-group-js'] ) ) {
|
|
177 |
$css_output = esc_textarea( $output );
|
178 |
}
|
179 |
?>
|
180 |
-
|
181 |
<?php if ( false === $excluded_css_check_extension ) { ?>
|
182 |
-
|
183 |
-
|
184 |
<?php } ?>
|
185 |
<?php if ( false === $excluded_css_check ) { ?>
|
186 |
-
|
187 |
<?php } ?>
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
<?php
|
198 |
$js_output = '';
|
199 |
if ( ! empty( $advanced['breeze-exclude-js'] ) ) {
|
@@ -201,20 +207,20 @@ if ( ! isset( $advanced['breeze-group-js'] ) ) {
|
|
201 |
$js_output = esc_textarea( $output );
|
202 |
}
|
203 |
?>
|
204 |
-
|
205 |
<?php if ( false === $excluded_js_check_extension ) { ?>
|
206 |
-
|
207 |
-
|
208 |
<?php } ?>
|
209 |
<?php if ( false === $excluded_js_check ) { ?>
|
210 |
-
|
211 |
<?php } ?>
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
<label for="breeze-preload-font" class="breeze_tool_tip"><?php _e( 'Preload your webfonts', 'breeze' ); ?></label>
|
219 |
</td>
|
220 |
<td>
|
@@ -271,130 +277,149 @@ if ( ! isset( $advanced['breeze-group-js'] ) ) {
|
|
271 |
</span>
|
272 |
<br/>
|
273 |
<span class="breeze_tool_tip">
|
274 |
-
<?php $theme_url = get_template_directory_uri().'/assets/fonts/my-font.woff'
|
275 |
-
|
276 |
</span>
|
277 |
</div>
|
278 |
</td>
|
279 |
</tr>
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
<?php if ( ! empty( $advanced['breeze-move-to-footer-js'] ) ) : ?>
|
287 |
<?php foreach ( $advanced['breeze-move-to-footer-js'] as $js_url ) : ?>
|
288 |
-
|
289 |
<span class="sort-handle">
|
290 |
<span class="dashicons dashicons-arrow-up moveUp"></span>
|
291 |
<span class="dashicons dashicons-arrow-down moveDown"></span>
|
292 |
</span>
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
<?php endforeach; ?>
|
301 |
<?php else : ?>
|
302 |
-
|
303 |
<span class="sort-handle">
|
304 |
<span class="dashicons dashicons-arrow-up moveUp"></span>
|
305 |
<span class="dashicons dashicons-arrow-down moveDown"></span>
|
306 |
</span>
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
<?php endif; ?>
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
<?php _e( 'Add URL', 'breeze' ); ?>
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
<span class="breeze_tool_tip">
|
324 |
<b>Note: </b>
|
325 |
<?php _e( 'Enter the complete URLs of JS files to be moved to the footer during minification process.', 'breeze' ); ?>
|
326 |
</span>
|
327 |
-
|
328 |
<?php _e( 'You should add the URL of original files as URL of minified files are not supported.', 'breeze' ); ?>
|
329 |
</span>
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
<?php if ( ! empty( $advanced['breeze-defer-js'] ) ) : ?>
|
340 |
<?php foreach ( $advanced['breeze-defer-js'] as $js_url ) : ?>
|
341 |
-
|
342 |
<span class="sort-handle">
|
343 |
<span class="dashicons dashicons-arrow-up moveUp"></span>
|
344 |
<span class="dashicons dashicons-arrow-down moveDown"></span>
|
345 |
</span>
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
<?php endforeach; ?>
|
354 |
<?php else : ?>
|
355 |
-
|
356 |
<span class="sort-handle">
|
357 |
<span class="dashicons dashicons-arrow-up moveUp"></span>
|
358 |
<span class="dashicons dashicons-arrow-down moveDown"></span>
|
359 |
</span>
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
<?php endif; ?>
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
<?php _e( 'Add URL', 'breeze' ); ?>
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
<span class="breeze_tool_tip">
|
377 |
<b>Note: </b>
|
378 |
<?php _e( 'You should add the URL of original files as URL of minified files are not supported.', 'breeze' ); ?>
|
379 |
</span>
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
<tr>
|
384 |
<td>
|
385 |
<label for="delay-js-scripts" class="breeze_tool_tip"><?php _e( 'Delay JS inline scripts', 'breeze' ); ?></label>
|
386 |
</td>
|
387 |
<td>
|
|
|
|
|
|
|
|
|
|
|
388 |
<?php
|
389 |
$js_output = '';
|
390 |
if ( ! empty( $advanced['breeze-delay-js-scripts'] ) ) {
|
391 |
$output = implode( "\n", $advanced['breeze-delay-js-scripts'] );
|
392 |
$js_output = esc_textarea( $output );
|
393 |
}
|
|
|
|
|
|
|
|
|
|
|
394 |
?>
|
395 |
-
<
|
396 |
-
|
397 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
</td>
|
399 |
</tr>
|
400 |
</table>
|
45 |
if ( ! isset( $advanced['breeze-group-js'] ) ) {
|
46 |
$advanced['breeze-group-js'] = '0';
|
47 |
}
|
48 |
+
|
49 |
+
if ( ! isset( $advanced['breeze-enable-js-delay'] ) ) {
|
50 |
+
$advanced['breeze-enable-js-delay'] = '0';
|
51 |
+
}
|
52 |
+
|
53 |
+
$js_inline_enable = filter_var( $advanced['breeze-enable-js-delay'], FILTER_VALIDATE_BOOLEAN );
|
54 |
?>
|
55 |
<table cellspacing="15" id="advanced-options-tab">
|
56 |
<tr>
|
106 |
</span>
|
107 |
</td>
|
108 |
</tr>
|
109 |
+
<tr>
|
110 |
+
<td>
|
111 |
+
<label for="exclude-urls" class="breeze_tool_tip"><?php _e( 'Never Cache these URLs', 'breeze' ); ?></label>
|
112 |
+
</td>
|
113 |
+
<td>
|
114 |
<?php
|
115 |
$css_output = '';
|
116 |
if ( ! empty( $advanced['breeze-exclude-urls'] ) ) {
|
118 |
$css_output = esc_textarea( $output );
|
119 |
}
|
120 |
?>
|
121 |
+
<textarea cols="100" rows="7" id="exclude-urls" name="exclude-urls"><?php echo $css_output; ?></textarea>
|
122 |
+
<br/>
|
123 |
+
<span class="breeze_tool_tip"><b>Note: </b><?php _e( 'Add the URLs of the pages (one per line) you wish to exclude from the WordPress internal cache. To exclude URLs from the Varnish cache, please refer to this ', 'breeze' ); ?><a
|
124 |
+
href="https://support.cloudways.com/how-to-exclude-url-from-varnish/"
|
125 |
+
target="_blank"><?php _e( 'Knowledge Base', 'breeze' ); ?></a><?php _e( ' article.', 'breeze' ); ?> </span>
|
126 |
<?php if ( false === $excluded_url_list ) { ?>
|
127 |
+
<br/>
|
128 |
+
<span class="breeze_tool_tip" style="color: #ff0000">
|
129 |
<?php _e( 'One (or more) URL is invalid. Please check and correct the entry.', 'breeze' ); ?>
|
130 |
</span>
|
131 |
<?php } ?>
|
132 |
+
</td>
|
133 |
+
</tr>
|
134 |
+
<tr>
|
135 |
+
<td>
|
136 |
+
<label class="breeze_tool_tip"><?php _e( 'Group Files', 'breeze' ); ?></label>
|
137 |
+
</td>
|
138 |
+
<td>
|
139 |
+
<ul>
|
140 |
+
<li>
|
141 |
+
<input type="checkbox" name="group-css" id="group-css"
|
142 |
+
value="1" <?php checked( $advanced['breeze-group-css'], '1' ); ?>/>
|
143 |
+
<label class="breeze_tool_tip" for="group-css"><?php _e( 'CSS', 'breeze' ); ?></label>
|
144 |
+
</li>
|
145 |
+
<li>
|
146 |
+
<input type="checkbox" name="group-js" id="group-js"
|
147 |
+
value="1" <?php checked( $advanced['breeze-group-js'], '1' ); ?>/>
|
148 |
+
<label class="breeze_tool_tip" for="group-js"><?php _e( 'JS', 'breeze' ); ?></label>
|
149 |
+
</li>
|
150 |
+
<li>
|
151 |
<span class="breeze_tool_tip">
|
152 |
<b>Note: </b><?php _e( 'Group CSS and JS files to combine them into a single file. This will reduce the number of HTTP requests to your server.', 'breeze' ); ?><br>
|
153 |
<b><?php _e( 'Important: Enable Minification to use this option.', 'breeze' ); ?></b>
|
154 |
</span>
|
155 |
+
</li>
|
156 |
+
</ul>
|
157 |
+
</td>
|
158 |
+
</tr>
|
159 |
+
<tr>
|
160 |
+
<td>
|
161 |
<label class="breeze_tool_tip"><?php _e( 'Preload links', 'breeze' ); ?></label>
|
162 |
</td>
|
163 |
<td>
|
173 |
</tr>
|
174 |
<tr>
|
175 |
<td>
|
176 |
+
<label for="exclude-css" class="breeze_tool_tip"><?php _e( 'Exclude CSS', 'breeze' ); ?></label>
|
177 |
+
</td>
|
178 |
+
<td>
|
179 |
<?php
|
180 |
$css_output = '';
|
181 |
if ( ! empty( $advanced['breeze-exclude-css'] ) ) {
|
183 |
$css_output = esc_textarea( $output );
|
184 |
}
|
185 |
?>
|
186 |
+
<textarea cols="100" rows="7" id="exclude-css" name="exclude-css"><?php echo $css_output; ?></textarea>
|
187 |
<?php if ( false === $excluded_css_check_extension ) { ?>
|
188 |
+
<br/><span class="breeze_tool_tip"
|
189 |
+
style="color: #ff0000"><?php _e( 'One (or more) URL is incorrect. Please confirm that all URLs have the .css extension', 'breeze' ); ?></span>
|
190 |
<?php } ?>
|
191 |
<?php if ( false === $excluded_css_check ) { ?>
|
192 |
+
<br/><span class="breeze_tool_tip" style="color: #ff0000"><?php _e( 'One (or more) URL is invalid. Please check and correct the entry.', 'breeze' ); ?></span>
|
193 |
<?php } ?>
|
194 |
+
<br/>
|
195 |
+
<span class="breeze_tool_tip"><b>Note: </b><?php _e( 'Use this option to exclude CSS files from Minification and Grouping. Enter the URLs of CSS files on each line.', 'breeze' ); ?></span>
|
196 |
+
</td>
|
197 |
+
</tr>
|
198 |
+
<tr>
|
199 |
+
<td>
|
200 |
+
<label for="exclude-js" class="breeze_tool_tip"><?php _e( 'Exclude JS', 'breeze' ); ?></label>
|
201 |
+
</td>
|
202 |
+
<td>
|
203 |
<?php
|
204 |
$js_output = '';
|
205 |
if ( ! empty( $advanced['breeze-exclude-js'] ) ) {
|
207 |
$js_output = esc_textarea( $output );
|
208 |
}
|
209 |
?>
|
210 |
+
<textarea cols="100" rows="7" id="exclude-js" name="exclude-js"><?php echo $js_output; ?></textarea>
|
211 |
<?php if ( false === $excluded_js_check_extension ) { ?>
|
212 |
+
<br/><span class="breeze_tool_tip"
|
213 |
+
style="color: #ff0000"><?php _e( 'One (or more) URL is incorrect. Please confirm that all URLs have the .js extension', 'breeze' ); ?></span>
|
214 |
<?php } ?>
|
215 |
<?php if ( false === $excluded_js_check ) { ?>
|
216 |
+
<br/><span class="breeze_tool_tip" style="color: #ff0000"><?php _e( 'One (or more) URL is invalid. Please check and correct the entry.', 'breeze' ); ?></span>
|
217 |
<?php } ?>
|
218 |
+
<br/>
|
219 |
+
<span class="breeze_tool_tip"><b>Note: </b><?php _e( 'Use this option to exclude JS files from Minification and Grouping. Enter the URLs of JS files on each line.', 'breeze' ); ?></span>
|
220 |
+
</td>
|
221 |
+
</tr>
|
222 |
+
<tr>
|
223 |
+
<td>
|
224 |
<label for="breeze-preload-font" class="breeze_tool_tip"><?php _e( 'Preload your webfonts', 'breeze' ); ?></label>
|
225 |
</td>
|
226 |
<td>
|
277 |
</span>
|
278 |
<br/>
|
279 |
<span class="breeze_tool_tip">
|
280 |
+
<?php $theme_url = get_template_directory_uri() . '/assets/fonts/my-font.woff'; ?>
|
281 |
+
<?php _e( 'Example:<code>' . $theme_url . '</code>', 'breeze' ); ?>
|
282 |
</span>
|
283 |
</div>
|
284 |
</td>
|
285 |
</tr>
|
286 |
+
<tr>
|
287 |
+
<td>
|
288 |
+
<label for="move-to-footer-js" class="breeze_tool_tip"><?php _e( 'Move JS files to footer', 'breeze' ); ?></label>
|
289 |
+
</td>
|
290 |
+
<td>
|
291 |
+
<div class="breeze-list-url">
|
292 |
<?php if ( ! empty( $advanced['breeze-move-to-footer-js'] ) ) : ?>
|
293 |
<?php foreach ( $advanced['breeze-move-to-footer-js'] as $js_url ) : ?>
|
294 |
+
<div class="breeze-input-group">
|
295 |
<span class="sort-handle">
|
296 |
<span class="dashicons dashicons-arrow-up moveUp"></span>
|
297 |
<span class="dashicons dashicons-arrow-down moveDown"></span>
|
298 |
</span>
|
299 |
+
<input type="text" size="98"
|
300 |
+
class="breeze-input-url"
|
301 |
+
name="move-to-footer-js[]"
|
302 |
+
placeholder="<?php _e( 'Enter URL...', 'breeze' ); ?>"
|
303 |
+
value="<?php echo esc_html( $js_url ); ?>"/>
|
304 |
+
<span class="dashicons dashicons-no item-remove" title="<?php _e( 'Remove', 'breeze' ); ?>"></span>
|
305 |
+
</div>
|
306 |
<?php endforeach; ?>
|
307 |
<?php else : ?>
|
308 |
+
<div class="breeze-input-group">
|
309 |
<span class="sort-handle">
|
310 |
<span class="dashicons dashicons-arrow-up moveUp"></span>
|
311 |
<span class="dashicons dashicons-arrow-down moveDown"></span>
|
312 |
</span>
|
313 |
+
<input type="text" size="98"
|
314 |
+
class="breeze-input-url"
|
315 |
+
id="move-to-footer-js"
|
316 |
+
name="move-to-footer-js[]"
|
317 |
+
placeholder="<?php _e( 'Enter URL...', 'breeze' ); ?>"
|
318 |
+
value=""/>
|
319 |
+
<span class="dashicons dashicons-no" title="<?php _e( 'Remove', 'breeze' ); ?>"></span>
|
320 |
+
</div>
|
321 |
<?php endif; ?>
|
322 |
+
</div>
|
323 |
+
<div style="margin: 10px 0">
|
324 |
+
<button type="button" class="button add-url" id="add-move-to-footer-js">
|
325 |
<?php _e( 'Add URL', 'breeze' ); ?>
|
326 |
+
</button>
|
327 |
+
</div>
|
328 |
+
<div>
|
329 |
<span class="breeze_tool_tip">
|
330 |
<b>Note: </b>
|
331 |
<?php _e( 'Enter the complete URLs of JS files to be moved to the footer during minification process.', 'breeze' ); ?>
|
332 |
</span>
|
333 |
+
<span class="breeze_tool_tip">
|
334 |
<?php _e( 'You should add the URL of original files as URL of minified files are not supported.', 'breeze' ); ?>
|
335 |
</span>
|
336 |
+
</div>
|
337 |
+
</td>
|
338 |
+
</tr>
|
339 |
+
<tr>
|
340 |
+
<td>
|
341 |
+
<label for="defer-js" class="breeze_tool_tip"><?php _e( 'JS files with deferred loading', 'breeze' ); ?></label>
|
342 |
+
</td>
|
343 |
+
<td>
|
344 |
+
<div class="breeze-list-url">
|
345 |
<?php if ( ! empty( $advanced['breeze-defer-js'] ) ) : ?>
|
346 |
<?php foreach ( $advanced['breeze-defer-js'] as $js_url ) : ?>
|
347 |
+
<div class="breeze-input-group">
|
348 |
<span class="sort-handle">
|
349 |
<span class="dashicons dashicons-arrow-up moveUp"></span>
|
350 |
<span class="dashicons dashicons-arrow-down moveDown"></span>
|
351 |
</span>
|
352 |
+
<input type="text" size="98"
|
353 |
+
class="breeze-input-url"
|
354 |
+
name="defer-js[]"
|
355 |
+
placeholder="<?php _e( 'Enter URL...', 'breeze' ); ?>"
|
356 |
+
value="<?php echo esc_html( $js_url ); ?>"/>
|
357 |
+
<span class="dashicons dashicons-no item-remove" title="<?php _e( 'Remove', 'breeze' ); ?>"></span>
|
358 |
+
</div>
|
359 |
<?php endforeach; ?>
|
360 |
<?php else : ?>
|
361 |
+
<div class="breeze-input-group">
|
362 |
<span class="sort-handle">
|
363 |
<span class="dashicons dashicons-arrow-up moveUp"></span>
|
364 |
<span class="dashicons dashicons-arrow-down moveDown"></span>
|
365 |
</span>
|
366 |
+
<input type="text" size="98"
|
367 |
+
class="breeze-input-url"
|
368 |
+
name="defer-js[]"
|
369 |
+
id="defer-js"
|
370 |
+
placeholder="<?php _e( 'Enter URL...', 'breeze' ); ?>"
|
371 |
+
value=""/>
|
372 |
+
<span class="dashicons dashicons-no item-remove" title="<?php _e( 'Remove', 'breeze' ); ?>"></span>
|
373 |
+
</div>
|
374 |
<?php endif; ?>
|
375 |
+
</div>
|
376 |
+
<div style="margin: 10px 0">
|
377 |
+
<button type="button" class="button add-url" id="add-defer-js">
|
378 |
<?php _e( 'Add URL', 'breeze' ); ?>
|
379 |
+
</button>
|
380 |
+
</div>
|
381 |
+
<div>
|
382 |
<span class="breeze_tool_tip">
|
383 |
<b>Note: </b>
|
384 |
<?php _e( 'You should add the URL of original files as URL of minified files are not supported.', 'breeze' ); ?>
|
385 |
</span>
|
386 |
+
</div>
|
387 |
+
</td>
|
388 |
+
</tr>
|
389 |
<tr>
|
390 |
<td>
|
391 |
<label for="delay-js-scripts" class="breeze_tool_tip"><?php _e( 'Delay JS inline scripts', 'breeze' ); ?></label>
|
392 |
</td>
|
393 |
<td>
|
394 |
+
<input type="checkbox" name="enable-js-delay" id="enable-js-delay"
|
395 |
+
value="1" <?php checked( $advanced['breeze-enable-js-delay'], '1' ); ?>/>
|
396 |
+
<label class="breeze_tool_tip" for="enable-js-delay"><?php _e( 'Enable delay inline JavaScript', 'breeze' ); ?></label>
|
397 |
+
<br/>
|
398 |
+
<br/>
|
399 |
<?php
|
400 |
$js_output = '';
|
401 |
if ( ! empty( $advanced['breeze-delay-js-scripts'] ) ) {
|
402 |
$output = implode( "\n", $advanced['breeze-delay-js-scripts'] );
|
403 |
$js_output = esc_textarea( $output );
|
404 |
}
|
405 |
+
|
406 |
+
$display_text_area = 'style="display:none"';
|
407 |
+
if ( true === $js_inline_enable ) {
|
408 |
+
$display_text_area = 'style="display:block"';
|
409 |
+
}
|
410 |
?>
|
411 |
+
<div <?php echo $display_text_area; ?> id="breeze-delay-js-scripts-div">
|
412 |
+
<textarea cols="100" rows="7" id="delay-js-scripts" name="delay-js-scripts"><?php echo $js_output; ?></textarea>
|
413 |
+
<br/>
|
414 |
+
<span class="breeze_tool_tip">
|
415 |
+
<strong>Notes: </strong> <br/>
|
416 |
+
<?php _e( 'You can add specififc keywords to identify the inline JavaScript to be delayed. Each script identifying keyword must be added on a new line.', 'breeze' ); ?>
|
417 |
+
<a href="https://www.cloudways.com/blog/breeze-1-2-version-released/" target="_blank"><?php _e( 'More info here', 'breeze' ); ?></a><br/>
|
418 |
+
<span style="color: #ff0000">
|
419 |
+
<?php _e( 'Please clear Varnish after applying the new settings.', 'breeze' ); ?>
|
420 |
+
</span>
|
421 |
+
</span>
|
422 |
+
</div>
|
423 |
</td>
|
424 |
</tr>
|
425 |
</table>
|
views/tabs/faq.php
CHANGED
@@ -1,158 +1,169 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) or die;
|
3 |
-
?>
|
4 |
-
<div id="faq-content">
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
12 |
<div class="faq-block">
|
13 |
-
<h3 class="faq-question"><?php _e( 'Does Breeze support
|
14 |
<div class="faq-answer">
|
15 |
-
<p><?php _e( 'Breeze
|
16 |
</div>
|
17 |
</div>
|
18 |
-
|
19 |
<div class="faq-block">
|
20 |
-
<h3 class="faq-question"><?php _e( 'Does Breeze support
|
21 |
<div class="faq-answer">
|
22 |
-
<p><?php _e( 'Breeze is fully compatible with
|
23 |
</div>
|
24 |
</div>
|
25 |
-
|
26 |
<div class="faq-block">
|
27 |
-
<h3 class="faq-question"><?php _e( '
|
28 |
<div class="faq-answer">
|
29 |
-
<p><?php _e( 'Breeze
|
30 |
</div>
|
31 |
</div>
|
32 |
-
|
33 |
<div class="faq-block">
|
34 |
-
<h3 class="faq-question"><?php _e( '
|
35 |
<div class="faq-answer">
|
36 |
-
<p><?php _e( '
|
37 |
-
<p><?php _e( 'We strongly recommend that you use Breeze as the only cache plugin for your website. If there are any other cache plugins installed, please ensure that you have disabled them prior to proceeding with the Breeze installation.', 'breeze' ); ?></p>
|
38 |
</div>
|
39 |
</div>
|
40 |
-
|
41 |
<div class="faq-block">
|
42 |
-
<h3 class="faq-question"><?php _e( 'Is Breeze compatible with
|
43 |
<div class="faq-answer">
|
44 |
-
<p><?php _e( '
|
|
|
45 |
</div>
|
46 |
</div>
|
47 |
-
|
48 |
<div class="faq-block">
|
49 |
-
<h3 class="faq-question"><?php _e( '
|
50 |
<div class="faq-answer">
|
51 |
-
<p><?php _e( 'Breeze
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
</p>
|
54 |
</div>
|
55 |
</div>
|
56 |
-
|
57 |
<div class="faq-block">
|
58 |
-
<h3 class="faq-question"><?php _e( 'Does Breeze support CDN?', 'breeze' ); ?></h3>
|
59 |
<div class="faq-answer">
|
60 |
-
<p><?php _e( 'Breeze supports CDN integration. It allows all static assets (such as images, CSS and JS files) to be served via CDN.', 'breeze' ); ?></p>
|
61 |
</div>
|
62 |
</div>
|
63 |
-
|
64 |
<div class="faq-block">
|
65 |
-
<h3 class="faq-question"><?php _e( 'What does Breeze’s Database Optimization feature do?', 'breeze' ); ?></h3>
|
66 |
<div class="faq-answer">
|
67 |
-
<p><?php _e( 'WordPress databases are notorious for storing information like post revisions, spam comments and much more. Over time, databases l become bloated and it is a good practice to clear out unwanted information to reduce database size and improve optimization.', 'breeze' ); ?></p>
|
68 |
-
<p><?php _e( 'Breeze’s database optimization cleans out unwanted information in a single click.', 'breeze' ); ?></p>
|
69 |
</div>
|
70 |
</div>
|
71 |
-
|
72 |
<div class="faq-block">
|
73 |
-
<h3 class="faq-question"><?php _e( 'Will comments and other dynamic parts of my blog appear immediately?', 'breeze' ); ?></h3>
|
74 |
<div class="faq-answer">
|
75 |
-
<p><?php _e( 'Comments will appear upon moderation as per the comment system (or policy) set in place by the blog owner. Other dynamic changes such as any modifications in files will require a full cache purge.', 'breeze' ); ?></p>
|
76 |
</div>
|
77 |
</div>
|
78 |
-
|
79 |
<div class="faq-block">
|
80 |
-
<h3 class="faq-question"><?php _e( 'Can I exclude URLs of individual files and pages from cache?', 'breeze' ); ?></h3>
|
81 |
<div class="faq-answer">
|
82 |
-
<p><?php _e( 'You can exclude a file by mentioning its URL or file type (by mentioning file extension) in the exclude fields (available in the Breeze settings). Exclude will not let the cache impact that URL or file type.', 'breeze' ); ?></p>
|
83 |
-
<p><?php _e( 'If Varnish is active, you will need to exclude URLs and file type(s) in the Varnish configuration. If you are hosting WordPress websites on Cloudways servers, follow ', 'breeze' ); ?>
|
84 |
-
<a href="https://support.cloudways.com/how-to-exclude-url-from-varnish/" target="_blank"><?php _e( 'this KB to exclude URLs from the Varnish cache.', 'breeze' ); ?></a>
|
85 |
</p>
|
86 |
</div>
|
87 |
</div>
|
88 |
-
|
89 |
<div class="faq-block">
|
90 |
-
<h3 class="faq-question"><?php _e( 'Does it work with all hosting providers?', 'breeze' ); ?></h3>
|
91 |
<div class="faq-answer">
|
92 |
-
<p><?php _e( 'Breeze has been tested to work with all major hosting providers. In addition, major Breeze options such as Gzip, browser cache, minification, grouping, database optimization. CDN integration will work as expected on all hosting providers.', 'breeze' ); ?></p>
|
93 |
</div>
|
94 |
</div>
|
95 |
-
|
96 |
<div class="faq-block">
|
97 |
-
<h3 class="faq-question"><?php _e( 'Where can I get support for Breeze?', 'breeze' ); ?></h3>
|
98 |
<div class="faq-answer">
|
99 |
-
<p><?php _e( 'You can get your questions answered on the WordPress support forums. If you are a Cloudways customer, please feel free to start a discussion at', 'breeze' ); ?>
|
100 |
-
<a href="https://community.cloudways.com/" target="_blank"><?php _e( 'Cloudways Community Forum.', 'breeze' ); ?></a>
|
101 |
</p>
|
102 |
</div>
|
103 |
</div>
|
104 |
-
|
105 |
<div class="faq-block">
|
106 |
-
<h3 class="faq-question"><?php _e( 'How can I test and verify the results?', 'breeze' ); ?></h3>
|
107 |
<div class="faq-answer">
|
108 |
-
<p><?php _e( 'You will be able to see the impact of the Breeze Cache Plugin almost immediately. We also recommend using the following tools for generating metrics:', 'breeze' ); ?></p>
|
109 |
<ul style="margin-top: 10px">
|
110 |
-
<li><a href="https://developers.google.com/speed/pagespeed/" target="_blank"><?php _e( 'Google Page Speed', 'breeze' ); ?></a></li>
|
111 |
-
<li><a href="https://www.webpagetest.org/test" target="_blank"><?php _e( 'WebPagetest', 'breeze' ); ?></a></li>
|
112 |
-
<li><a href="https://tools.pingdom.com/" target="_blank"><?php _e( 'Pingdom', 'breeze' ); ?></a></li>
|
113 |
</ul>
|
114 |
</div>
|
115 |
</div>
|
116 |
-
|
117 |
<div class="faq-block">
|
118 |
-
<h3 class="faq-question"><?php _e( 'Does Breeze plugin work with Visual Builder?', 'breeze' ); ?></h3>
|
119 |
<div class="faq-answer">
|
120 |
-
<p><?php _e( 'Yes, Breeze Plugin is compatible with Visual Builder.', 'breeze' ); ?></p>
|
121 |
</div>
|
122 |
</div>
|
123 |
-
|
124 |
<div class="faq-block">
|
125 |
-
<h3 class="faq-question"><?php _e( 'What popular CDN are supported by Breeze Plugin?', 'breeze' ); ?></h3>
|
126 |
<div class="faq-answer">
|
127 |
-
<p><?php _e( 'Breeze supports the following three popular CDNs:', 'breeze' ); ?></p>
|
128 |
<ul style="margin-top: 10px">
|
129 |
-
<li><a href="https://support.cloudways.com/how-to-use-breeze-with-maxcdn/" target="_blank"><?php _e( 'MaxCDN', 'breeze' ); ?></a></li>
|
130 |
-
<li><a href="https://support.cloudways.com/how-to-use-breeze-with-keycdn/" target="_blank"><?php _e( 'KeyCDN', 'breeze' ); ?></a></li>
|
131 |
-
<li><a href="https://support.cloudways.com/how-to-use-breeze-with-amazon-cloudfront/" target="_blank"><?php _e( 'Amazon Cloudfront', 'breeze' ); ?></a></li>
|
132 |
</ul>
|
133 |
</div>
|
134 |
</div>
|
135 |
-
|
136 |
<div class="faq-block">
|
137 |
-
<h3 class="faq-question"><?php _e( 'Does Breeze support Push CDN?', 'breeze' ); ?></h3>
|
138 |
<div class="faq-answer">
|
139 |
-
<p><?php _e( 'No, Breeze does not support Push CDN. However, you could use Breeze with Push CDNs using third party plugins.', 'breeze' ); ?></p>
|
140 |
</div>
|
141 |
</div>
|
142 |
-
|
143 |
<div class="faq-block">
|
144 |
-
<h3 class="faq-question"><?php _e( 'Does Breeze Work With CloudFlare?', 'breeze' ); ?></h3>
|
145 |
<div class="faq-answer">
|
146 |
-
<p><?php _e( 'Yes. The process of setting up CloudFlare with Breeze is easy. Check out the following ', 'breeze' ); ?>
|
147 |
-
<a href="https://support.cloudways.com/can-i-use-cloudflare-cdn/" target="_blank"><?php _e( 'KnowledgeBase article for details.', 'breeze' ); ?></a>
|
148 |
</p>
|
149 |
</div>
|
150 |
</div>
|
151 |
-
|
152 |
<div class="faq-block">
|
153 |
-
<h3 class="faq-question"><?php _e( 'How Breeze cache uses Gzip?', 'breeze' ); ?></h3>
|
154 |
<div class="faq-answer">
|
155 |
-
<p><?php _e( 'Using Gzip, Breeze compresses the request files, further reducing the size of the download files and speeding up the user experience.', 'breeze' ); ?></p>
|
156 |
</div>
|
157 |
</div>
|
158 |
-
</div>
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die;
|
3 |
+
?>
|
4 |
+
<div id="faq-content">
|
5 |
+
<div class="faq-block">
|
6 |
+
<h3 class="faq-question"><?php _e( 'Delay inline JavaScript issue', 'breeze' ); ?></h3>
|
7 |
+
<div class="faq-answer">
|
8 |
+
<p>
|
9 |
+
<?php _e( 'If JavaScript errors show up in front-end you can try the following solutions.', 'breeze' ); ?><br/>
|
10 |
+
<?php _e( '- You can disable the option altogether.', 'breeze' ); ?><br/>
|
11 |
+
<?php _e( '- You can leave the option enabled and identify which line found in the textarea is causing the issue, then remove only that online that line.', 'breeze' ); ?>
|
12 |
+
</p>
|
13 |
+
</div>
|
14 |
+
</div>
|
15 |
+
|
16 |
<div class="faq-block">
|
17 |
+
<h3 class="faq-question"><?php _e( 'Does Breeze support Varnish and to what extent?', 'breeze' ); ?></h3>
|
18 |
<div class="faq-answer">
|
19 |
+
<p><?php _e( 'Breeze, by default, supports Varnish. It has been tested to be fully compatible with Cloudways Servers that come with Varnish pre-installed. If you are using hosting providers other than Cloudways, we suggest you confirm Varnish support with your hosting provider.', 'breeze' ); ?></p>
|
20 |
</div>
|
21 |
</div>
|
22 |
+
|
23 |
<div class="faq-block">
|
24 |
+
<h3 class="faq-question"><?php _e( 'Does Breeze support WooCommerce?', 'breeze' ); ?></h3>
|
25 |
<div class="faq-answer">
|
26 |
+
<p><?php _e( 'Breeze is fully compatible with WooCommerce, out of the box. It does not require any special configurations.', 'breeze' ); ?></p>
|
27 |
</div>
|
28 |
</div>
|
29 |
+
|
30 |
<div class="faq-block">
|
31 |
+
<h3 class="faq-question"><?php _e( 'Does Breeze support WordPress Multisite?', 'breeze' ); ?></h3>
|
32 |
<div class="faq-answer">
|
33 |
+
<p><?php _e( 'Breeze is fully compatible with WordPress Multisite without the need for any extra configuration.', 'breeze' ); ?></p>
|
34 |
</div>
|
35 |
</div>
|
36 |
+
|
37 |
<div class="faq-block">
|
38 |
+
<h3 class="faq-question"><?php _e( 'How does Breeze handle WordPress multisite?', 'breeze' ); ?></h3>
|
39 |
<div class="faq-answer">
|
40 |
+
<p><?php _e( 'Breeze handles all WordPress multisite instances globally. All the settings for multisite are now handled on the network level.', 'breeze' ); ?></p>
|
|
|
41 |
</div>
|
42 |
</div>
|
43 |
+
|
44 |
<div class="faq-block">
|
45 |
+
<h3 class="faq-question"><?php _e( 'Is Breeze compatible with other WordPress Cache plugins?', 'breeze' ); ?></h3>
|
46 |
<div class="faq-answer">
|
47 |
+
<p><?php _e( 'We DO NOT recommend using two WordPress cache plugins at the same time on any WordPress website.', 'breeze' ); ?></p>
|
48 |
+
<p><?php _e( 'We strongly recommend that you use Breeze as the only cache plugin for your website. If there are any other cache plugins installed, please ensure that you have disabled them prior to proceeding with the Breeze installation.', 'breeze' ); ?></p>
|
49 |
</div>
|
50 |
</div>
|
51 |
+
|
52 |
<div class="faq-block">
|
53 |
+
<h3 class="faq-question"><?php _e( 'Is Breeze compatible with HTTPS?', 'breeze' ); ?></h3>
|
54 |
<div class="faq-answer">
|
55 |
+
<p><?php _e( 'Breeze does not require any special configuration to work with HTTP or HTTPS pages.', 'breeze' ); ?></p>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
|
59 |
+
<div class="faq-block">
|
60 |
+
<h3 class="faq-question"><?php _e( 'Does Breeze have compatibility issues with other known plugins?', 'breeze' ); ?></h3>
|
61 |
+
<div class="faq-answer">
|
62 |
+
<p><?php _e( 'Breeze has been tested with popular plugins available on WordPress.org. Please feel free to report any incompatibilities on the WordPress Support Forums or on ', 'breeze' ); ?>
|
63 |
+
<a href="https://community.cloudways.com/" target="_blank"><?php _e( 'Cloudways Community Forum.', 'breeze' ); ?></a>
|
64 |
</p>
|
65 |
</div>
|
66 |
</div>
|
67 |
+
|
68 |
<div class="faq-block">
|
69 |
+
<h3 class="faq-question"><?php _e( 'Does Breeze support CDN?', 'breeze' ); ?></h3>
|
70 |
<div class="faq-answer">
|
71 |
+
<p><?php _e( 'Breeze supports CDN integration. It allows all static assets (such as images, CSS and JS files) to be served via CDN.', 'breeze' ); ?></p>
|
72 |
</div>
|
73 |
</div>
|
74 |
+
|
75 |
<div class="faq-block">
|
76 |
+
<h3 class="faq-question"><?php _e( 'What does Breeze’s Database Optimization feature do?', 'breeze' ); ?></h3>
|
77 |
<div class="faq-answer">
|
78 |
+
<p><?php _e( 'WordPress databases are notorious for storing information like post revisions, spam comments and much more. Over time, databases l become bloated and it is a good practice to clear out unwanted information to reduce database size and improve optimization.', 'breeze' ); ?></p>
|
79 |
+
<p><?php _e( 'Breeze’s database optimization cleans out unwanted information in a single click.', 'breeze' ); ?></p>
|
80 |
</div>
|
81 |
</div>
|
82 |
+
|
83 |
<div class="faq-block">
|
84 |
+
<h3 class="faq-question"><?php _e( 'Will comments and other dynamic parts of my blog appear immediately?', 'breeze' ); ?></h3>
|
85 |
<div class="faq-answer">
|
86 |
+
<p><?php _e( 'Comments will appear upon moderation as per the comment system (or policy) set in place by the blog owner. Other dynamic changes such as any modifications in files will require a full cache purge.', 'breeze' ); ?></p>
|
87 |
</div>
|
88 |
</div>
|
89 |
+
|
90 |
<div class="faq-block">
|
91 |
+
<h3 class="faq-question"><?php _e( 'Can I exclude URLs of individual files and pages from cache?', 'breeze' ); ?></h3>
|
92 |
<div class="faq-answer">
|
93 |
+
<p><?php _e( 'You can exclude a file by mentioning its URL or file type (by mentioning file extension) in the exclude fields (available in the Breeze settings). Exclude will not let the cache impact that URL or file type.', 'breeze' ); ?></p>
|
94 |
+
<p><?php _e( 'If Varnish is active, you will need to exclude URLs and file type(s) in the Varnish configuration. If you are hosting WordPress websites on Cloudways servers, follow ', 'breeze' ); ?>
|
95 |
+
<a href="https://support.cloudways.com/how-to-exclude-url-from-varnish/" target="_blank"><?php _e( 'this KB to exclude URLs from the Varnish cache.', 'breeze' ); ?></a>
|
96 |
</p>
|
97 |
</div>
|
98 |
</div>
|
99 |
+
|
100 |
<div class="faq-block">
|
101 |
+
<h3 class="faq-question"><?php _e( 'Does it work with all hosting providers?', 'breeze' ); ?></h3>
|
102 |
<div class="faq-answer">
|
103 |
+
<p><?php _e( 'Breeze has been tested to work with all major hosting providers. In addition, major Breeze options such as Gzip, browser cache, minification, grouping, database optimization. CDN integration will work as expected on all hosting providers.', 'breeze' ); ?></p>
|
104 |
</div>
|
105 |
</div>
|
106 |
+
|
107 |
<div class="faq-block">
|
108 |
+
<h3 class="faq-question"><?php _e( 'Where can I get support for Breeze?', 'breeze' ); ?></h3>
|
109 |
<div class="faq-answer">
|
110 |
+
<p><?php _e( 'You can get your questions answered on the WordPress support forums. If you are a Cloudways customer, please feel free to start a discussion at', 'breeze' ); ?>
|
111 |
+
<a href="https://community.cloudways.com/" target="_blank"><?php _e( 'Cloudways Community Forum.', 'breeze' ); ?></a>
|
112 |
</p>
|
113 |
</div>
|
114 |
</div>
|
115 |
+
|
116 |
<div class="faq-block">
|
117 |
+
<h3 class="faq-question"><?php _e( 'How can I test and verify the results?', 'breeze' ); ?></h3>
|
118 |
<div class="faq-answer">
|
119 |
+
<p><?php _e( 'You will be able to see the impact of the Breeze Cache Plugin almost immediately. We also recommend using the following tools for generating metrics:', 'breeze' ); ?></p>
|
120 |
<ul style="margin-top: 10px">
|
121 |
+
<li><a href="https://developers.google.com/speed/pagespeed/" target="_blank"><?php _e( 'Google Page Speed', 'breeze' ); ?></a></li>
|
122 |
+
<li><a href="https://www.webpagetest.org/test" target="_blank"><?php _e( 'WebPagetest', 'breeze' ); ?></a></li>
|
123 |
+
<li><a href="https://tools.pingdom.com/" target="_blank"><?php _e( 'Pingdom', 'breeze' ); ?></a></li>
|
124 |
</ul>
|
125 |
</div>
|
126 |
</div>
|
127 |
+
|
128 |
<div class="faq-block">
|
129 |
+
<h3 class="faq-question"><?php _e( 'Does Breeze plugin work with Visual Builder?', 'breeze' ); ?></h3>
|
130 |
<div class="faq-answer">
|
131 |
+
<p><?php _e( 'Yes, Breeze Plugin is compatible with Visual Builder.', 'breeze' ); ?></p>
|
132 |
</div>
|
133 |
</div>
|
134 |
+
|
135 |
<div class="faq-block">
|
136 |
+
<h3 class="faq-question"><?php _e( 'What popular CDN are supported by Breeze Plugin?', 'breeze' ); ?></h3>
|
137 |
<div class="faq-answer">
|
138 |
+
<p><?php _e( 'Breeze supports the following three popular CDNs:', 'breeze' ); ?></p>
|
139 |
<ul style="margin-top: 10px">
|
140 |
+
<li><a href="https://support.cloudways.com/how-to-use-breeze-with-maxcdn/" target="_blank"><?php _e( 'MaxCDN', 'breeze' ); ?></a></li>
|
141 |
+
<li><a href="https://support.cloudways.com/how-to-use-breeze-with-keycdn/" target="_blank"><?php _e( 'KeyCDN', 'breeze' ); ?></a></li>
|
142 |
+
<li><a href="https://support.cloudways.com/how-to-use-breeze-with-amazon-cloudfront/" target="_blank"><?php _e( 'Amazon Cloudfront', 'breeze' ); ?></a></li>
|
143 |
</ul>
|
144 |
</div>
|
145 |
</div>
|
146 |
+
|
147 |
<div class="faq-block">
|
148 |
+
<h3 class="faq-question"><?php _e( 'Does Breeze support Push CDN?', 'breeze' ); ?></h3>
|
149 |
<div class="faq-answer">
|
150 |
+
<p><?php _e( 'No, Breeze does not support Push CDN. However, you could use Breeze with Push CDNs using third party plugins.', 'breeze' ); ?></p>
|
151 |
</div>
|
152 |
</div>
|
153 |
+
|
154 |
<div class="faq-block">
|
155 |
+
<h3 class="faq-question"><?php _e( 'Does Breeze Work With CloudFlare?', 'breeze' ); ?></h3>
|
156 |
<div class="faq-answer">
|
157 |
+
<p><?php _e( 'Yes. The process of setting up CloudFlare with Breeze is easy. Check out the following ', 'breeze' ); ?>
|
158 |
+
<a href="https://support.cloudways.com/can-i-use-cloudflare-cdn/" target="_blank"><?php _e( 'KnowledgeBase article for details.', 'breeze' ); ?></a>
|
159 |
</p>
|
160 |
</div>
|
161 |
</div>
|
162 |
+
|
163 |
<div class="faq-block">
|
164 |
+
<h3 class="faq-question"><?php _e( 'How Breeze cache uses Gzip?', 'breeze' ); ?></h3>
|
165 |
<div class="faq-answer">
|
166 |
+
<p><?php _e( 'Using Gzip, Breeze compresses the request files, further reducing the size of the download files and speeding up the user experience.', 'breeze' ); ?></p>
|
167 |
</div>
|
168 |
</div>
|
169 |
+
</div>
|