Asset CleanUp: Page Speed Booster - Version 1.2.6.6

Version Description

  • Bug Fix: Assets were not retrieved within in the Dashboard for the home page
  • Compatible with WP Asset CleanUp Pro
Download this release

Release Info

Developer gabelivan
Plugin Icon 128x128 Asset CleanUp: Page Speed Booster
Version 1.2.6.6
Comparing to
See all releases

Code changes from version 1.2.6.5 to 1.2.6.6

assets/script.js CHANGED
@@ -180,17 +180,23 @@ jQuery(document).ready(function($) {
180
if (wpacu_object.dom_get_type === 'direct') {
181
data[wpacu_object.plugin_name + '_load'] = 1;
182
183
- $.post(wpacu_object.post_url, data, function (contents) {
184
var wpacuList = contents.substring(
185
(contents.lastIndexOf(wpacu_object.start_del) + wpacu_object.start_del.length),
186
contents.lastIndexOf(wpacu_object.end_del)
187
);
188
189
var data = {
190
- 'action': wpacu_object.plugin_name + '_get_loaded_assets',
191
- 'wpacu_list': wpacuList,
192
- 'post_id': wpacu_object.post_id,
193
- 'post_url': wpacu_object.post_url
194
};
195
196
if ('btoa' in window) {
@@ -206,8 +212,6 @@ jQuery(document).ready(function($) {
206
}
207
}
208
209
- //console.log(data);
210
-
211
$.post(wpacu_object.ajax_url, data, function (response) {
212
if (!response) {
213
return false;
@@ -224,9 +228,10 @@ jQuery(document).ready(function($) {
224
});
225
} else if (wpacu_object.dom_get_type === 'wp_remote_post') {
226
data = {
227
- 'action': wpacu_object.plugin_name + '_get_loaded_assets',
228
- 'post_id': wpacu_object.post_id,
229
- 'post_url': wpacu_object.post_url
230
};
231
232
$.post(wpacu_object.ajax_url, data, function (response) {
180
if (wpacu_object.dom_get_type === 'direct') {
181
data[wpacu_object.plugin_name + '_load'] = 1;
182
183
+ $.ajax({
184
+ method: 'GET',
185
+ url: wpacu_object.page_url,
186
+ data: data,
187
+ cache: false
188
+ }).done(function (contents) {
189
var wpacuList = contents.substring(
190
(contents.lastIndexOf(wpacu_object.start_del) + wpacu_object.start_del.length),
191
contents.lastIndexOf(wpacu_object.end_del)
192
);
193
194
var data = {
195
+ 'action' : wpacu_object.plugin_name + '_get_loaded_assets',
196
+ 'wpacu_list' : wpacuList,
197
+ 'post_id' : wpacu_object.post_id,
198
+ 'page_url' : wpacu_object.page_url,
199
+ 'tag_id' : wpacu_object.tag_id
200
};
201
202
if ('btoa' in window) {
212
}
213
}
214
215
$.post(wpacu_object.ajax_url, data, function (response) {
216
if (!response) {
217
return false;
228
});
229
} else if (wpacu_object.dom_get_type === 'wp_remote_post') {
230
data = {
231
+ 'action' : wpacu_object.plugin_name + '_get_loaded_assets',
232
+ 'post_id' : wpacu_object.post_id,
233
+ 'page_url' : wpacu_object.page_url,
234
+ 'tag_id' : wpacu_object.tag_id
235
};
236
237
$.post(wpacu_object.ajax_url, data, function (response) {
assets/script.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){var b={load:function(){var b,c=".icheckbox_square-red";a(c).iCheck({checkboxClass:"icheckbox_square-red"}),a(c).on("ifChecked",function(b){a(b.target).closest("tr").addClass("wpacu_not_load")}),a(c).on("ifUnchecked",function(b){a(b.target).closest("tr").removeClass("wpacu_not_load")}),a(".wpacu_global_unload").click(function(){b=a(this).attr("data-handle"),a(this).prop("checked")?a(this).parent("label").addClass("wpacu_global_checked"):a(this).parent("label").removeClass("wpacu_global_checked")}),a(".wpacu_keep_bulk_rule").click(function(){a(this).prop("checked")&&a(this).parents("li").next().removeClass("remove_rule")}),a(".wpacu_remove_bulk_rule").click(function(){a(this).prop("checked")&&a(this).parents("li").addClass("remove_rule")}),a(".wpacu_bulk_unload").click(function(){a(this).prop("checked")?a(this).parent("label").addClass("wpacu_bulk_unload_active"):a(this).parent("label").removeClass("wpacu_bulk_unload_active")}),a(".wpacu_load_it_option").click(function(){var b=a(this).attr("data-handle");if(a(this).prop("checked")){a(this).parent("label").addClass("wpacu_global_unload_exception");var c="";a(this).hasClass("wpacu_style")?c="style":a(this).hasClass("wpacu_script")&&(c="script"),a("#"+c+"_"+b).iCheck("uncheck")}else a(this).parent("label").removeClass("wpacu_global_unload_exception")})}};if(a("#wpacu_post_type_select").change(function(){a("#wpacu_post_type_form").submit()}),a(".wpacu_remove_rule").click(function(){var b=a(this).parents(".wpacu_global_rule_row");a(this).prop("checked")?b.addClass("selected"):b.removeClass("selected")}),a("#wpacu_wrap_assets").length>0&&b.load(),"undefined"==typeof wpacu_object||a("#wpacu_meta_box_content").length<1)return!1;var c={};"direct"===wpacu_object.dom_get_type?(c[wpacu_object.plugin_name+"_load"]=1,a.post(wpacu_object.post_url,c,function(c){var d=c.substring(c.lastIndexOf(wpacu_object.start_del)+wpacu_object.start_del.length,c.lastIndexOf(wpacu_object.end_del)),e={action:wpacu_object.plugin_name+"_get_loaded_assets",wpacu_list:d,post_id:wpacu_object.post_id,post_url:wpacu_object.post_url};if("btoa"in window)try{c=c.replace(/[\u0250-\ue007]/g,""),c=c.replace(/[^\x00-\x7F]/g,""),e.contents=window.btoa(c)}catch(a){e.contents=""}a.post(wpacu_object.ajax_url,e,function(c){return!!c&&(a("#wpacu_meta_box_content").html(c),a("#wpacu_home_page_form").length>0&&a("#submit").show(),void b.load())})})):"wp_remote_post"===wpacu_object.dom_get_type&&(c={action:wpacu_object.plugin_name+"_get_loaded_assets",post_id:wpacu_object.post_id,post_url:wpacu_object.post_url},a.post(wpacu_object.ajax_url,c,function(c){return!!c&&(a("#wpacu_meta_box_content").html(c),a("#wpacu_home_page_form").length>0&&a("#submit").show(),void b.load())}))});
1
+ jQuery(document).ready(function(a){var b={load:function(){var b,c=".icheckbox_square-red";a(c).iCheck({checkboxClass:"icheckbox_square-red"}),a(c).on("ifChecked",function(b){a(b.target).closest("tr").addClass("wpacu_not_load")}),a(c).on("ifUnchecked",function(b){a(b.target).closest("tr").removeClass("wpacu_not_load")}),a(".wpacu_global_unload").click(function(){b=a(this).attr("data-handle"),a(this).prop("checked")?a(this).parent("label").addClass("wpacu_global_checked"):a(this).parent("label").removeClass("wpacu_global_checked")}),a(".wpacu_keep_bulk_rule").click(function(){a(this).prop("checked")&&a(this).parents("li").next().removeClass("remove_rule")}),a(".wpacu_remove_bulk_rule").click(function(){a(this).prop("checked")&&a(this).parents("li").addClass("remove_rule")}),a(".wpacu_bulk_unload").click(function(){a(this).prop("checked")?a(this).parent("label").addClass("wpacu_bulk_unload_active"):a(this).parent("label").removeClass("wpacu_bulk_unload_active")}),a(".wpacu_load_it_option").click(function(){var b=a(this).attr("data-handle");if(a(this).prop("checked")){a(this).parent("label").addClass("wpacu_global_unload_exception");var c="";a(this).hasClass("wpacu_style")?c="style":a(this).hasClass("wpacu_script")&&(c="script"),a("#"+c+"_"+b).iCheck("uncheck")}else a(this).parent("label").removeClass("wpacu_global_unload_exception")})}};if(a("#wpacu_post_type_select").change(function(){a("#wpacu_post_type_form").submit()}),a(".wpacu_remove_rule").click(function(){var b=a(this).parents(".wpacu_global_rule_row");a(this).prop("checked")?b.addClass("selected"):b.removeClass("selected")}),a("#wpacu_wrap_assets").length>0&&b.load(),"undefined"==typeof wpacu_object||a("#wpacu_meta_box_content").length<1)return!1;var c={};"direct"===wpacu_object.dom_get_type?(c[wpacu_object.plugin_name+"_load"]=1,a.ajax({method:"GET",url:wpacu_object.page_url,data:c,cache:!1}).done(function(c){var d=c.substring(c.lastIndexOf(wpacu_object.start_del)+wpacu_object.start_del.length,c.lastIndexOf(wpacu_object.end_del)),e={action:wpacu_object.plugin_name+"_get_loaded_assets",wpacu_list:d,post_id:wpacu_object.post_id,page_url:wpacu_object.page_url,tag_id:wpacu_object.tag_id};if("btoa"in window)try{c=c.replace(/[\u0250-\ue007]/g,""),c=c.replace(/[^\x00-\x7F]/g,""),e.contents=window.btoa(c)}catch(a){e.contents=""}a.post(wpacu_object.ajax_url,e,function(c){return!!c&&(a("#wpacu_meta_box_content").html(c),a("#wpacu_home_page_form").length>0&&a("#submit").show(),void b.load())})})):"wp_remote_post"===wpacu_object.dom_get_type&&(c={action:wpacu_object.plugin_name+"_get_loaded_assets",post_id:wpacu_object.post_id,page_url:wpacu_object.page_url,tag_id:wpacu_object.tag_id},a.post(wpacu_object.ajax_url,c,function(c){return!!c&&(a("#wpacu_meta_box_content").html(c),a("#wpacu_home_page_form").length>0&&a("#submit").show(),void b.load())}))});
assets/style.min.css CHANGED
@@ -1 +1 @@
1
- .widefat .check-column.wpacu_check,body.toplevel_page_wpassetcleanup_settings .notice{padding:10px}tr.wpacu_not_load td,tr.wpacu_not_load th{background:#FFE1E1!important}.dashicons-wpacu{width:17px;height:17px;margin:2px 0 0;font-size:16px;text-decoration:none}body[class*=wpassetcleanup] #footer-left{border-left:2px solid green;padding-left:10px}#wpacu_meta_box_content{width:99%}#wpacu_meta_box_content h3{margin-left:0;padding-left:0}#wpacu_meta_box_content div.wpacu_note,#wpacu_wrap_assets div.wpacu_note{padding:10px;background-color:#f5f5f5}#wpacu_meta_box_content .dashicons.dashicons-warning{color:red}#wpacu_meta_box_content div.wpacu_warning,#wpacu_wrap_assets div.wpacu_warning{border:1px solid #c00}#wpacu_meta_box_content div.wpacu_verified{padding:10px;background-color:#f5f5f5;border-left:1px solid #ddd}#wpacu_meta_box_content div.wpacu_verified span{color:#0073aa;font-weight:700}#wpacu_meta_box_content ul.wpacu_asset_options{margin:0;padding:0}#wpacu_meta_box_content ul.wpacu_asset_options li{list-style:none;display:inline-block}#wpacu_wrap_assets img,.wpacu_asset_row td label{display:inline-block!important}#wpacu_meta_box_content ul.wpacu_asset_options label{margin-right:20px;font-weight:400}#wpacu_wrap_assets{color:#000!important;text-align:left;clear:both;width:90%;padding:20px;margin:30px 0 0 15px;border:1px solid #cdcdcd;z-index:10000!important;position:relative;background-color:#fff}#wpacu_wrap_assets p{margin:10px 0;line-height:22px;text-align:left}#wpacu_wrap_assets h1{margin:0 0 20px;font-size:160%;text-align:left}#wpacu_wrap_assets h3{margin:20px 0;font-size:130%}.wpacu_verified{margin:0 0 10px}.wpacu_asset_row td{padding:10px}.wpacu_asset_row td p{margin-bottom:10px;word-wrap:break-word}.wpacu_asset_row td label{cursor:pointer!important;font-size:100%;font-weight:400}.wpacu_asset_row td label span{font-size:100%!important}.wpacu_asset_row td.wpacu_check{width:50px}body.wp-admin .wpacu_asset_row td.wpacu_check{width:25px}label.wpacu_add_global{cursor:pointer}label.wpacu_global_checked{font-weight:700;color:#d54e21}label.wpacu_global_unload_exception{font-weight:700!important}label.wpacu_bulk_unload_active{color:#d54e21}tr.wpacu_global_rule_row.selected{background:#e7e7e7}.nav-tab-wrapper{border-bottom:1px solid #ccc;width:95%}ul.wpacu_asset_options{margin:0;padding:0}ul.wpacu_asset_options li{list-style:none;display:inline-block}ul.wpacu_asset_options li.remove_rule label{font-weight:700}ul.wpacu_asset_options label{margin-right:20px;font-weight:400}ul.wpacu_asset_options label input{margin-right:4px}.wp-asset-clean-up.widefat{width:99%}.wpacu_widefat,.wpacu_widefat td{border:1px solid #e5e5e5!important}.wpacu_striped>tbody>:nth-child(odd),ul.wpacu_striped>:nth-child(odd){background-color:#f9f9f9!important}.wpacu_update_btn{-moz-box-shadow:inset 0 1px 0 0 #54a3f7!important;-webkit-box-shadow:inset 0 1px 0 0 #54a3f7!important;box-shadow:inset 0 1px 0 0 #54a3f7!important;background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#007dc1),color-stop(1,#0061a7))!important;background:-moz-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-webkit-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-o-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-ms-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:linear-gradient(to bottom,#007dc1 5%,#0061a7 100%)!important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#007dc1', endColorstr='#0061a7', GradientType=0)!important;background-color:#007dc1!important;-moz-border-radius:3px!important;-webkit-border-radius:3px!important;border-radius:3px!important;border:1px solid #124d77!important;display:inline-block!important;cursor:pointer!important;color:#fff!important;font-size:15px!important;padding:10px 24px!important;text-decoration:none!important;text-shadow:0 1px 0 #154682!important;height:auto!important;line-height:normal!important}.wpacu-btns .btn:focus,.wpacu-btns .btn:hover,.wpacu-btns a{text-decoration:none}.wpacu_update_btn:hover{background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#0061a7),color-stop(1,#007dc1))!important;background:-moz-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-webkit-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-o-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-ms-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:linear-gradient(to bottom,#0061a7 5%,#007dc1 100%)!important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0061a7', endColorstr='#007dc1', GradientType=0)!important;background-color:#0061a7!important}.wpacu_update_btn:active{position:relative!important;top:1px!important}ul.hire-reasons{margin-bottom:20px}ul.hire-reasons li{font-size:14px;line-height:22px;margin-bottom:12px}ul.hire-reasons li .dashicons{font-size:23px;line-height:23px}ul.hire-reasons li .dashicons.dashicons-yes{color:green}.wpacu-get-help-wrap p{font-size:14px}.wpacu-btns .btn{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.5rem 1rem;font-size:1rem;border-radius:.25rem;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wpacu-btns .btn.focus,.wpacu-btns .btn:focus{outline:0;-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.25);box-shadow:0 0 0 2px rgba(2,117,216,.25)}.wpacu-btns .btn.disabled,.wpacu-btns .btn:disabled{cursor:not-allowed;opacity:.65}.wpacu-btns .btn.active,.wpacu-btns .btn:active{background-image:none}.wpacu-btns a.btn.disabled,.wpacu-btns fieldset[disabled] a.btn{pointer-events:none}.wpacu-btns .btn-primary{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-primary:hover{color:#fff;background-color:#025aa5;border-color:#01549b}.wpacu-btns .btn-primary.focus,.wpacu-btns .btn-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.wpacu-btns .btn-primary.disabled,.wpacu-btns .btn-primary:disabled{background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-primary.active,.wpacu-btns .btn-primary:active,.wpacu-btns .show>.btn-primary.dropdown-toggle{color:#fff;background-color:#025aa5;background-image:none;border-color:#01549b}.wpacu-btns .btn-secondary{color:#292b2c;background-color:#fff;border-color:#ccc}.wpacu-btns .btn-secondary:hover{color:#292b2c;background-color:#e6e6e6;border-color:#adadad}.wpacu-btns .btn-secondary.focus,.wpacu-btns .btn-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.wpacu-btns .btn-secondary.disabled,.wpacu-btns .btn-secondary:disabled{background-color:#fff;border-color:#ccc}.wpacu-btns .btn-secondary.active,.wpacu-btns .btn-secondary:active,.wpacu-btns .show>.btn-secondary.dropdown-toggle{color:#292b2c;background-color:#e6e6e6;background-image:none;border-color:#adadad}.wpacu-btns .btn-info{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#2aabd2}.wpacu-btns .btn-info.focus,.wpacu-btns .btn-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.wpacu-btns .btn-info.disabled,.wpacu-btns .btn-info:disabled{background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-info.active,.wpacu-btns .btn-info:active,.wpacu-btns .show>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;background-image:none;border-color:#2aabd2}.wpacu-btns .btn-success{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-success:hover{color:#fff;background-color:#449d44;border-color:#419641}.wpacu-btns .btn-success.focus,.wpacu-btns .btn-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.wpacu-btns .btn-success.disabled,.wpacu-btns .btn-success:disabled{background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-success.active,.wpacu-btns .btn-success:active,.wpacu-btns .show>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;background-image:none;border-color:#419641}.wpacu-btns .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#eb9316}.wpacu-btns .btn-warning.focus,.wpacu-btns .btn-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.wpacu-btns .btn-warning.disabled,.wpacu-btns .btn-warning:disabled{background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-warning.active,.wpacu-btns .btn-warning:active,.wpacu-btns .show>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;background-image:none;border-color:#eb9316}.wpacu-btns .btn-danger{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#c12e2a}.wpacu-btns .btn-danger.focus,.wpacu-btns .btn-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.wpacu-btns .btn-danger.disabled,.wpacu-btns .btn-danger:disabled{background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-danger.active,.wpacu-btns .btn-danger:active,.wpacu-btns .show>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;background-image:none;border-color:#c12e2a}.wpacu-btns .btn-outline-primary{color:#0275d8;background-image:none;background-color:transparent;border-color:#0275d8}.wpacu-btns .btn-outline-primary:hover{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-outline-primary.focus,.wpacu-btns .btn-outline-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.wpacu-btns .btn-outline-primary.disabled,.wpacu-btns .btn-outline-primary:disabled{color:#0275d8;background-color:transparent}.wpacu-btns .btn-outline-primary.active,.wpacu-btns .btn-outline-primary:active,.wpacu-btns .show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-outline-secondary{color:#ccc;background-image:none;background-color:transparent;border-color:#ccc}.wpacu-btns .btn-outline-secondary:hover{color:#fff;background-color:#ccc;border-color:#ccc}.wpacu-btns .btn-outline-secondary.focus,.wpacu-btns .btn-outline-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.wpacu-btns .btn-outline-secondary.disabled,.wpacu-btns .btn-outline-secondary:disabled{color:#ccc;background-color:transparent}.wpacu-btns .btn-outline-secondary.active,.wpacu-btns .btn-outline-secondary:active,.wpacu-btns .show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#ccc;border-color:#ccc}.wpacu-btns .btn-outline-info{color:#5bc0de;background-image:none;background-color:transparent;border-color:#5bc0de}.wpacu-btns .btn-outline-info:hover{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-outline-info.focus,.wpacu-btns .btn-outline-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.wpacu-btns .btn-outline-info.disabled,.wpacu-btns .btn-outline-info:disabled{color:#5bc0de;background-color:transparent}.wpacu-btns .btn-outline-info.active,.wpacu-btns .btn-outline-info:active,.wpacu-btns .show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-outline-success{color:#5cb85c;background-image:none;background-color:transparent;border-color:#5cb85c}.wpacu-btns .btn-outline-success:hover{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-outline-success.focus,.wpacu-btns .btn-outline-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.wpacu-btns .btn-outline-success.disabled,.wpacu-btns .btn-outline-success:disabled{color:#5cb85c;background-color:transparent}.wpacu-btns .btn-outline-success.active,.wpacu-btns .btn-outline-success:active,.wpacu-btns .show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-outline-warning{color:#f0ad4e;background-image:none;background-color:transparent;border-color:#f0ad4e}.wpacu-btns .btn-outline-warning:hover{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-outline-warning.focus,.wpacu-btns .btn-outline-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.wpacu-btns .btn-outline-warning.disabled,.wpacu-btns .btn-outline-warning:disabled{color:#f0ad4e;background-color:transparent}.wpacu-btns .btn-outline-warning.active,.wpacu-btns .btn-outline-warning:active,.wpacu-btns .show>.btn-outline-warning.dropdown-toggle{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-outline-danger{color:#d9534f;background-image:none;background-color:transparent;border-color:#d9534f}.wpacu-btns .btn-outline-danger:hover{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-outline-danger.focus,.wpacu-btns .btn-outline-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.wpacu-btns .btn-outline-danger.disabled,.wpacu-btns .btn-outline-danger:disabled{color:#d9534f;background-color:transparent}.wpacu-btns .btn-outline-danger.active,.wpacu-btns .btn-outline-danger:active,.wpacu-btns .show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-link{font-weight:400;color:#0275d8;border-radius:0}.wpacu-btns .btn-link,.wpacu-btns .btn-link.active,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:disabled{background-color:transparent}.wpacu-btns .btn-link,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{border-color:transparent}.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{color:#014c8c;text-decoration:underline;background-color:transparent}.wpacu-btns .btn-link:disabled{color:#636c72}.wpacu-btns .btn-link:disabled:focus,.wpacu-btns .btn-link:disabled:hover{text-decoration:none}.wpacu-btns .btn-group-lg>.btn,.wpacu-btns .btn-lg{padding:.75rem 1.5rem;font-size:1.25rem;border-radius:.3rem}.wpacu-btns .btn-group-sm>.btn,.wpacu-btns .btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.wpacu-btns .btn-block{display:block;width:100%}.wpacu-btns .btn-block+.btn-block{margin-top:.5rem}.wpacu-btns input[type=submit].btn-block,.wpacu-btns input[type=reset].btn-block,.wpacu-btns input[type=button].btn-block{width:100%}.wpacu-btns .fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}
1
+ .widefat .check-column.wpacu_check,body.toplevel_page_wpassetcleanup_settings .notice{padding:10px}tr.wpacu_not_load td,tr.wpacu_not_load th{background:#FFE1E1!important}.dashicons-wpacu{width:17px;height:17px;margin:2px 0 0;font-size:16px;text-decoration:none}body[class*=wpassetcleanup] #footer-left{border-left:2px solid green;padding-left:10px}#wpacu_meta_box_content{width:99%}#wpacu_meta_box_content h3{margin-left:0;padding-left:0}#wpacu_meta_box_content div.wpacu_note,#wpacu_wrap_assets div.wpacu_note{padding:10px;background-color:#f5f5f5}#wpacu_meta_box_content .dashicons.dashicons-warning{color:red}#wpacu_meta_box_content div.wpacu_warning,#wpacu_wrap_assets div.wpacu_warning{border:1px solid #c00}#wpacu_meta_box_content div.wpacu_verified{padding:10px;background-color:#f5f5f5;border-left:1px solid #ddd}#wpacu_meta_box_content div.wpacu_verified span{color:#0073aa;font-weight:700}#wpacu_meta_box_content ul.wpacu_asset_options{margin:0;padding:0}#wpacu_meta_box_content ul.wpacu_asset_options li{list-style:none;display:inline-block}#wpacu_wrap_assets img,.wpacu_asset_row td label{display:inline-block!important}#wpacu_meta_box_content ul.wpacu_asset_options label{margin-right:20px;font-weight:400}#wpacu_wrap_assets{color:#000!important;text-align:left;clear:both;width:90%;padding:20px;margin:30px 0 0 15px;border:1px solid #cdcdcd;z-index:10000!important;position:relative;background-color:#fff}#wpacu_wrap_assets p{margin:10px 0;line-height:22px;text-align:left}#wpacu_wrap_assets h1{margin:0 0 20px;font-size:160%;text-align:left}#wpacu_wrap_assets h3{margin:20px 0;font-size:130%}.wpacu_verified{margin:0 0 10px}.wpacu_asset_row td{padding:10px}.wpacu_asset_row td p{padding:0;margin-bottom:10px;word-wrap:break-word}.wpacu_asset_row td label{cursor:pointer!important;font-size:100%;font-weight:400}.wpacu_asset_row td label span{font-size:100%!important}.wpacu_asset_row td.wpacu_check{width:50px}body.wp-admin .wpacu_asset_row td.wpacu_check{width:25px}label.wpacu_add_global{cursor:pointer}label.wpacu_global_checked{font-weight:700;color:#d54e21}label.wpacu_global_unload_exception{font-weight:700!important}label.wpacu_bulk_unload_active{color:#d54e21}tr.wpacu_global_rule_row.selected{background:#e7e7e7}.nav-tab-wrapper{border-bottom:1px solid #ccc;width:95%}ul.wpacu_asset_options{margin:0;padding:0}ul.wpacu_asset_options li{list-style:none;display:inline-block}ul.wpacu_asset_options li.remove_rule label{font-weight:700}ul.wpacu_asset_options label{margin-right:20px;font-weight:400}ul.wpacu_asset_options label input{margin-right:4px}.wp-asset-clean-up.widefat{width:99%}.wpacu_widefat,.wpacu_widefat td{border:1px solid #e5e5e5!important}.wpacu_striped>tbody>:nth-child(odd),ul.wpacu_striped>:nth-child(odd){background-color:#f9f9f9!important}.wpacu_update_btn{-moz-box-shadow:inset 0 1px 0 0 #54a3f7!important;-webkit-box-shadow:inset 0 1px 0 0 #54a3f7!important;box-shadow:inset 0 1px 0 0 #54a3f7!important;background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#007dc1),color-stop(1,#0061a7))!important;background:-moz-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-webkit-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-o-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-ms-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:linear-gradient(to bottom,#007dc1 5%,#0061a7 100%)!important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#007dc1', endColorstr='#0061a7', GradientType=0)!important;background-color:#007dc1!important;-moz-border-radius:3px!important;-webkit-border-radius:3px!important;border-radius:3px!important;border:1px solid #124d77!important;display:inline-block!important;cursor:pointer!important;color:#fff!important;font-size:15px!important;padding:10px 24px!important;text-decoration:none!important;text-shadow:0 1px 0 #154682!important;height:auto!important;line-height:normal!important}.wpacu-btns .btn:focus,.wpacu-btns .btn:hover,.wpacu-btns a{text-decoration:none}.wpacu_update_btn:hover{background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#0061a7),color-stop(1,#007dc1))!important;background:-moz-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-webkit-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-o-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-ms-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:linear-gradient(to bottom,#0061a7 5%,#007dc1 100%)!important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0061a7', endColorstr='#007dc1', GradientType=0)!important;background-color:#0061a7!important}.wpacu_update_btn:active{position:relative!important;top:1px!important}ul.hire-reasons{margin-bottom:20px}ul.hire-reasons li{font-size:14px;line-height:22px;margin-bottom:12px}ul.hire-reasons li .dashicons{font-size:23px;line-height:23px}ul.hire-reasons li .dashicons.dashicons-yes{color:green}.wpacu-get-help-wrap p{font-size:14px}.wpacu-btns .btn{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.5rem 1rem;font-size:1rem;border-radius:.25rem;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wpacu-btns .btn.focus,.wpacu-btns .btn:focus{outline:0;-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.25);box-shadow:0 0 0 2px rgba(2,117,216,.25)}.wpacu-btns .btn.disabled,.wpacu-btns .btn:disabled{cursor:not-allowed;opacity:.65}.wpacu-btns .btn.active,.wpacu-btns .btn:active{background-image:none}.wpacu-btns a.btn.disabled,.wpacu-btns fieldset[disabled] a.btn{pointer-events:none}.wpacu-btns .btn-primary{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-primary:hover{color:#fff;background-color:#025aa5;border-color:#01549b}.wpacu-btns .btn-primary.focus,.wpacu-btns .btn-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.wpacu-btns .btn-primary.disabled,.wpacu-btns .btn-primary:disabled{background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-primary.active,.wpacu-btns .btn-primary:active,.wpacu-btns .show>.btn-primary.dropdown-toggle{color:#fff;background-color:#025aa5;background-image:none;border-color:#01549b}.wpacu-btns .btn-secondary{color:#292b2c;background-color:#fff;border-color:#ccc}.wpacu-btns .btn-secondary:hover{color:#292b2c;background-color:#e6e6e6;border-color:#adadad}.wpacu-btns .btn-secondary.focus,.wpacu-btns .btn-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.wpacu-btns .btn-secondary.disabled,.wpacu-btns .btn-secondary:disabled{background-color:#fff;border-color:#ccc}.wpacu-btns .btn-secondary.active,.wpacu-btns .btn-secondary:active,.wpacu-btns .show>.btn-secondary.dropdown-toggle{color:#292b2c;background-color:#e6e6e6;background-image:none;border-color:#adadad}.wpacu-btns .btn-info{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#2aabd2}.wpacu-btns .btn-info.focus,.wpacu-btns .btn-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.wpacu-btns .btn-info.disabled,.wpacu-btns .btn-info:disabled{background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-info.active,.wpacu-btns .btn-info:active,.wpacu-btns .show>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;background-image:none;border-color:#2aabd2}.wpacu-btns .btn-success{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-success:hover{color:#fff;background-color:#449d44;border-color:#419641}.wpacu-btns .btn-success.focus,.wpacu-btns .btn-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.wpacu-btns .btn-success.disabled,.wpacu-btns .btn-success:disabled{background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-success.active,.wpacu-btns .btn-success:active,.wpacu-btns .show>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;background-image:none;border-color:#419641}.wpacu-btns .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#eb9316}.wpacu-btns .btn-warning.focus,.wpacu-btns .btn-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.wpacu-btns .btn-warning.disabled,.wpacu-btns .btn-warning:disabled{background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-warning.active,.wpacu-btns .btn-warning:active,.wpacu-btns .show>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;background-image:none;border-color:#eb9316}.wpacu-btns .btn-danger{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#c12e2a}.wpacu-btns .btn-danger.focus,.wpacu-btns .btn-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.wpacu-btns .btn-danger.disabled,.wpacu-btns .btn-danger:disabled{background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-danger.active,.wpacu-btns .btn-danger:active,.wpacu-btns .show>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;background-image:none;border-color:#c12e2a}.wpacu-btns .btn-outline-primary{color:#0275d8;background-image:none;background-color:transparent;border-color:#0275d8}.wpacu-btns .btn-outline-primary:hover{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-outline-primary.focus,.wpacu-btns .btn-outline-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.wpacu-btns .btn-outline-primary.disabled,.wpacu-btns .btn-outline-primary:disabled{color:#0275d8;background-color:transparent}.wpacu-btns .btn-outline-primary.active,.wpacu-btns .btn-outline-primary:active,.wpacu-btns .show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-outline-secondary{color:#ccc;background-image:none;background-color:transparent;border-color:#ccc}.wpacu-btns .btn-outline-secondary:hover{color:#fff;background-color:#ccc;border-color:#ccc}.wpacu-btns .btn-outline-secondary.focus,.wpacu-btns .btn-outline-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.wpacu-btns .btn-outline-secondary.disabled,.wpacu-btns .btn-outline-secondary:disabled{color:#ccc;background-color:transparent}.wpacu-btns .btn-outline-secondary.active,.wpacu-btns .btn-outline-secondary:active,.wpacu-btns .show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#ccc;border-color:#ccc}.wpacu-btns .btn-outline-info{color:#5bc0de;background-image:none;background-color:transparent;border-color:#5bc0de}.wpacu-btns .btn-outline-info:hover{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-outline-info.focus,.wpacu-btns .btn-outline-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.wpacu-btns .btn-outline-info.disabled,.wpacu-btns .btn-outline-info:disabled{color:#5bc0de;background-color:transparent}.wpacu-btns .btn-outline-info.active,.wpacu-btns .btn-outline-info:active,.wpacu-btns .show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-outline-success{color:#5cb85c;background-image:none;background-color:transparent;border-color:#5cb85c}.wpacu-btns .btn-outline-success:hover{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-outline-success.focus,.wpacu-btns .btn-outline-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.wpacu-btns .btn-outline-success.disabled,.wpacu-btns .btn-outline-success:disabled{color:#5cb85c;background-color:transparent}.wpacu-btns .btn-outline-success.active,.wpacu-btns .btn-outline-success:active,.wpacu-btns .show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-outline-warning{color:#f0ad4e;background-image:none;background-color:transparent;border-color:#f0ad4e}.wpacu-btns .btn-outline-warning:hover{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-outline-warning.focus,.wpacu-btns .btn-outline-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.wpacu-btns .btn-outline-warning.disabled,.wpacu-btns .btn-outline-warning:disabled{color:#f0ad4e;background-color:transparent}.wpacu-btns .btn-outline-warning.active,.wpacu-btns .btn-outline-warning:active,.wpacu-btns .show>.btn-outline-warning.dropdown-toggle{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-outline-danger{color:#d9534f;background-image:none;background-color:transparent;border-color:#d9534f}.wpacu-btns .btn-outline-danger:hover{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-outline-danger.focus,.wpacu-btns .btn-outline-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.wpacu-btns .btn-outline-danger.disabled,.wpacu-btns .btn-outline-danger:disabled{color:#d9534f;background-color:transparent}.wpacu-btns .btn-outline-danger.active,.wpacu-btns .btn-outline-danger:active,.wpacu-btns .show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-link{font-weight:400;color:#0275d8;border-radius:0}.wpacu-btns .btn-link,.wpacu-btns .btn-link.active,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:disabled{background-color:transparent}.wpacu-btns .btn-link,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{border-color:transparent}.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{color:#014c8c;text-decoration:underline;background-color:transparent}.go-pro-button,.wpacu-btns .btn-link:disabled:focus,.wpacu-btns .btn-link:disabled:hover{text-decoration:none}.wpacu-btns .btn-link:disabled{color:#636c72}.wpacu-btns .btn-group-lg>.btn,.wpacu-btns .btn-lg{padding:.75rem 1.5rem;font-size:1.25rem;border-radius:.3rem}.wpacu-btns .btn-group-sm>.btn,.wpacu-btns .btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.wpacu-btns .btn-block{display:block;width:100%}.wpacu-btns .btn-block+.btn-block{margin-top:.5rem}.wpacu-btns input[type=submit].btn-block,.wpacu-btns input[type=reset].btn-block,.wpacu-btns input[type=button].btn-block{width:100%}.wpacu-btns .fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.go-pro-button{background-color:#4CAF50;border:2px solid #4CAF50;color:#fff;padding:12px 18px;text-align:center;display:inline-block;font-size:16px;margin:4px 2px;cursor:pointer;border-radius:10px;-webkit-transition-duration:.4s;transition-duration:.4s}.go-pro-button:hover{background-color:#fff;color:#000;border:2px solid #4CAF50}
assets/style.scss CHANGED
@@ -117,6 +117,7 @@ body[class*="wpassetcleanup"] #footer-left {
117
.wpacu_asset_row td {
118
padding: 10px;
119
p {
120
margin-bottom: 10px;
121
word-wrap: break-word;
122
}
@@ -748,4 +749,29 @@ ul.hire-reasons {
748
-o-transition: opacity 0.15s linear;
749
transition: opacity 0.15s linear;
750
}
751
}
117
.wpacu_asset_row td {
118
padding: 10px;
119
p {
120
+ padding: 0;
121
margin-bottom: 10px;
122
word-wrap: break-word;
123
}
749
-o-transition: opacity 0.15s linear;
750
transition: opacity 0.15s linear;
751
}
752
+ }
753
+
754
+ .go-pro-button {
755
+ background-color: #4CAF50;
756
+ border: 2px solid #4CAF50;
757
+ color: white;
758
+ padding: 12px 18px;
759
+ text-align: center;
760
+ text-decoration: none;
761
+ display: inline-block;
762
+ font-size: 16px;
763
+ margin: 4px 2px;
764
+ cursor: pointer;
765
+ border-radius: 10px;
766
+ }
767
+
768
+ .go-pro-button {
769
+ -webkit-transition-duration: 0.4s; /* Safari */
770
+ transition-duration: 0.4s;
771
+ }
772
+
773
+ .go-pro-button:hover {
774
+ background-color: white;
775
+ color: black;
776
+ border: 2px solid #4CAF50;
777
}
classes/Main.php CHANGED
@@ -114,6 +114,11 @@ class Main
114
*/
115
public $settings = array();
116
117
/**
118
* @var Main|null
119
*/
@@ -147,7 +152,7 @@ class Main
147
self::$domGetType = $this->settings['dom_get_type'];
148
}
149
150
- if (array_key_exists(WPACU_PLUGIN_NAME.'_load', $_POST)) {
151
add_filter('w3tc_minify_enable', '__return_false');
152
}
153
@@ -155,9 +160,17 @@ class Main
155
add_action('wp', array($this, 'setVarsBeforeUpdate'), 8);
156
add_action('wp', array($this, 'setVarsAfterAnyUpdate'), 10);
157
158
- // Fetch the page in the background to see what scripts/styles are already loading
159
- if (isset($_POST[WPACU_PLUGIN_NAME.'_load']) || $this->frontendShow) {
160
- if (isset($_POST[WPACU_PLUGIN_NAME.'_load'])) {
161
Misc::noAdminBarLoad();
162
}
163
@@ -166,7 +179,7 @@ class Main
166
}
167
168
// Front-end View - Unload the assets
169
- if (! isset($_POST[WPACU_PLUGIN_NAME.'_load'])) {
170
// Unload Styles - HEAD
171
add_action('wp_print_styles', array($this, 'filterStyles'), 100000);
172
@@ -204,7 +217,7 @@ class Main
204
public function setVarsBeforeUpdate()
205
{
206
$this->isFrontendView = ($this->frontendShow && current_user_can('manage_options')
207
- && !isset($_POST[WPACU_PLUGIN_NAME.'_load'])
208
&& !is_admin());
209
210
// it will update $this->isUpdateable;
@@ -216,7 +229,7 @@ class Main
216
*/
217
public function setVarsAfterAnyUpdate()
218
{
219
- if (! isset($_POST[WPACU_PLUGIN_NAME.'_load'])) {
220
$this->globalUnloaded = $this->getGlobalUnload();
221
222
if (! $this->isUpdateable && ! Misc::isHomePage()) {
@@ -229,7 +242,7 @@ class Main
229
$type = 'front_page';
230
} elseif ( ! empty($getCurrentPost) ) {
231
$type = 'post';
232
- $post = $this->getCurrentPost();
233
$this->postTypesUnloaded = $this->getBulkUnload('post_type', $post->post_type);
234
} elseif ($this->wpacuProEnabled()) {
235
$type = 'for_pro';
@@ -306,11 +319,6 @@ class Main
306
return;
307
}
308
309
- /*
310
- TODO: In case the premium extension is enabled, make sure that assets unloaded
311
- for pages such as category, tags, author, dates etc are filtered
312
- */
313
-
314
$nonAssetConfigPage = (! $this->isUpdateable && ! Misc::getShowOnFront());
315
316
// It looks like the page loaded is neither a post, page or the front-page
@@ -641,13 +649,13 @@ class Main
641
*/
642
public function printScriptsStyles()
643
{
644
- // Not for WordPress AJAX calls
645
- if (self::$domGetType === 'direct' && defined('DOING_AJAX') && DOING_AJAX) {
646
return;
647
}
648
649
$isFrontEndView = $this->isFrontendView;
650
- $isDashboardView = (!$isFrontEndView && array_key_exists(WPACU_PLUGIN_NAME.'_load', $_POST));
651
652
if (!$isFrontEndView && !$isDashboardView) {
653
return;
@@ -862,6 +870,8 @@ class Main
862
$data['bulk_unloaded_type'] = 'post_type';
863
864
$data['is_bulk_unloadable'] = true;
865
}
866
867
// If the premium extension is enabled, it will also pull the other bulk unloads
@@ -921,8 +931,8 @@ class Main
921
*/
922
public function ajaxGetJsonListCallback()
923
{
924
- $postId = isset($_POST['post_id']) ? (int)$_POST['post_id'] : '';
925
- $postUrl = isset($_POST['post_url']) ? $_POST['post_url'] : '';
926
927
$wpacuList = $contents = '';
928
@@ -930,7 +940,7 @@ class Main
930
$contents = isset($_POST['contents']) ? $_POST['contents'] : '';
931
$wpacuList = isset($_POST['wpacu_list']) ? $_POST['wpacu_list'] : '';
932
} elseif (self::$domGetType === 'wp_remote_post') {
933
- $remotePost = wp_remote_post($postUrl, array(
934
'body' => array(
935
WPACU_PLUGIN_NAME.'_load' => 1
936
)
@@ -972,13 +982,13 @@ class Main
972
$data['current']['scripts'] = array();
973
}
974
975
- $data['fetch_url'] = $postUrl;
976
$data['global_unload'] = $this->getGlobalUnload();
977
978
$data['is_bulk_unloadable'] = $data['bulk_unloaded_type'] = false;
979
980
// Post Information
981
- if ($postId > 0) {
982
$postData = get_post( $postId );
983
984
// Current Post Type
@@ -991,15 +1001,21 @@ class Main
991
$data['is_bulk_unloadable'] = true;
992
}
993
994
- //echo '<pre>'; print_r($data['bulk_unloaded']['post_type']);
995
996
- if($postId == 0) {
997
- $type = 'front_page';
998
- } elseif ($postId > 0) {
999
- $type = 'post';
1000
- } else {
1001
- $type = 'for_pro';
1002
- }
1003
1004
$data['load_exceptions'] = $this->getLoadExceptions($type, $postId);
1005
@@ -1280,6 +1296,52 @@ class Main
1280
return $this->currentPost;
1281
}
1282
1283
/**
1284
* @return bool
1285
*/
@@ -1321,6 +1383,16 @@ class Main
1321
return array();
1322
}
1323
1324
/**
1325
* @return bool
1326
*/
114
*/
115
public $settings = array();
116
117
+ /**
118
+ * @var bool
119
+ */
120
+ public $isAjaxCall = false;
121
+
122
/**
123
* @var Main|null
124
*/
152
self::$domGetType = $this->settings['dom_get_type'];
153
}
154
155
+ if (array_key_exists(WPACU_PLUGIN_NAME.'_load', $_REQUEST)) {
156
add_filter('w3tc_minify_enable', '__return_false');
157
}
158
160
add_action('wp', array($this, 'setVarsBeforeUpdate'), 8);
161
add_action('wp', array($this, 'setVarsAfterAnyUpdate'), 10);
162
163
+ $this->isAjaxCall = (! empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest');
164
+
165
+ // "Direct" AJAX call to the page (regular AJAX)
166
+ // Do not print the admin bar as it's not relevant
167
+ if ($this->isAjaxCall) {
168
+ Misc::noAdminBarLoad();
169
+ }
170
+
171
+ // Fetch the page in the background to see what scripts/styles are already loading
172
+ if (isset($_REQUEST[WPACU_PLUGIN_NAME.'_load']) || $this->frontendShow) {
173
+ if (isset($_REQUEST[WPACU_PLUGIN_NAME.'_load'])) {
174
Misc::noAdminBarLoad();
175
}
176
179
}
180
181
// Front-end View - Unload the assets
182
+ if (! isset($_REQUEST[WPACU_PLUGIN_NAME.'_load'])) {
183
// Unload Styles - HEAD
184
add_action('wp_print_styles', array($this, 'filterStyles'), 100000);
185
217
public function setVarsBeforeUpdate()
218
{
219
$this->isFrontendView = ($this->frontendShow && current_user_can('manage_options')
220
+ && !isset($_REQUEST[WPACU_PLUGIN_NAME.'_load'])
221
&& !is_admin());
222
223
// it will update $this->isUpdateable;
229
*/
230
public function setVarsAfterAnyUpdate()
231
{
232
+ if (! isset($_REQUEST[WPACU_PLUGIN_NAME.'_load'])) {
233
$this->globalUnloaded = $this->getGlobalUnload();
234
235
if (! $this->isUpdateable && ! Misc::isHomePage()) {
242
$type = 'front_page';
243
} elseif ( ! empty($getCurrentPost) ) {
244
$type = 'post';
245
+ $post = $getCurrentPost;
246
$this->postTypesUnloaded = $this->getBulkUnload('post_type', $post->post_type);
247
} elseif ($this->wpacuProEnabled()) {
248
$type = 'for_pro';
319
return;
320
}
321
322
$nonAssetConfigPage = (! $this->isUpdateable && ! Misc::getShowOnFront());
323
324
// It looks like the page loaded is neither a post, page or the front-page
649
*/
650
public function printScriptsStyles()
651
{
652
+ // Not for WordPress AJAX calls
653
+ if ((self::$domGetType === 'direct' && defined('DOING_AJAX') && DOING_AJAX)) {
654
return;
655
}
656
657
$isFrontEndView = $this->isFrontendView;
658
+ $isDashboardView = (!$isFrontEndView && array_key_exists(WPACU_PLUGIN_NAME.'_load', $_REQUEST));
659
660
if (!$isFrontEndView && !$isDashboardView) {
661
return;
870
$data['bulk_unloaded_type'] = 'post_type';
871
872
$data['is_bulk_unloadable'] = true;
873
+
874
+ $data = $this->setPageTemplate($data);
875
}
876
877
// If the premium extension is enabled, it will also pull the other bulk unloads
931
*/
932
public function ajaxGetJsonListCallback()
933
{
934
+ $postId = isset($_POST['post_id']) ? (int)$_POST['post_id'] : ''; // if any (could be home page for instance)
935
+ $pageUrl = isset($_POST['page_url']) ? $_POST['page_url'] : ''; // post, page, custom post type, home page etc.
936
937
$wpacuList = $contents = '';
938
940
$contents = isset($_POST['contents']) ? $_POST['contents'] : '';
941
$wpacuList = isset($_POST['wpacu_list']) ? $_POST['wpacu_list'] : '';
942
} elseif (self::$domGetType === 'wp_remote_post') {
943
+ $remotePost = wp_remote_post($pageUrl, array(
944
'body' => array(
945
WPACU_PLUGIN_NAME.'_load' => 1
946
)
982
$data['current']['scripts'] = array();
983
}
984
985
+ $data['fetch_url'] = $pageUrl;
986
$data['global_unload'] = $this->getGlobalUnload();
987
988
$data['is_bulk_unloadable'] = $data['bulk_unloaded_type'] = false;
989
990
// Post Information
991
+ if ($this->isSingularPage()) {
992
$postData = get_post( $postId );
993
994
// Current Post Type
1001
$data['is_bulk_unloadable'] = true;
1002
}
1003
1004
+ // If the premium extension is enabled, it will also pull the other bulk unloads
1005
+ // such as 'taxonomy', 'author' etc.
1006
+ $data = apply_filters('wpacu_pro_get_bulk_unloads', $data);
1007
+
1008
+ // For debug purposes
1009
+ //unset($data['contents']); echo '<pre>'; print_r($data); exit;
1010
1011
+ //echo '<pre>'; print_r($data['bulk_unloaded']['post_type']);
1012
+ if ($postId > 0) {
1013
+ $type = 'post';
1014
+ } elseif (isset($_POST['tag_id']) && $_POST['tag_id']) {
1015
+ $type = 'for_pro';
1016
+ } elseif($postId == 0) {
1017
+ $type = 'front_page';
1018
+ }
1019
1020
$data['load_exceptions'] = $this->getLoadExceptions($type, $postId);
1021
1296
return $this->currentPost;
1297
}
1298
1299
+ /**
1300
+ * @param $data
1301
+ *
1302
+ * @return mixed
1303
+ */
1304
+ public function setPageTemplate($data)
1305
+ {
1306
+ global $template;
1307
+
1308
+ $getPageTpl = get_post_meta($this->getCurrentPostId(), '_wp_page_template', true);
1309
+
1310
+ // Could be a custom post type with no template set
1311
+ if (! $getPageTpl) {
1312
+ $getPageTpl = get_page_template();
1313
+
1314
+ if (basename($getPageTpl) === 'single.php' || basename($getPageTpl) === 'page.php') {
1315
+ $getPageTpl = 'default';
1316
+ }
1317
+ }
1318
+
1319
+ if (! $getPageTpl) {
1320
+ return $data;
1321
+ }
1322
+
1323
+ $data['page_template'] = $getPageTpl;
1324
+
1325
+ $data['all_page_templates'] = wp_get_theme()->get_page_templates();
1326
+
1327
+ // Is the default template shown? Most of the time it is!
1328
+ if ($data['page_template'] === 'default') {
1329
+ $pageTpl = (isset($template) && $template) ? $template : get_page_template();
1330
+ $data['page_template'] = basename( $pageTpl );
1331
+ $data['all_page_templates'][ $data['page_template'] ] = 'Default Template';
1332
+ }
1333
+
1334
+ if (isset($template) && $template && defined('ABSPATH')) {
1335
+ $data['page_template_path'] = str_replace(
1336
+ ABSPATH,
1337
+ '',
1338
+ '/'.$template
1339
+ );
1340
+ }
1341
+
1342
+ return $data;
1343
+ }
1344
+
1345
/**
1346
* @return bool
1347
*/
1383
return array();
1384
}
1385
1386
+ /**
1387
+ * @return bool
1388
+ */
1389
+ public static function isWpDefaultSearchPage()
1390
+ {
1391
+ // It will not interfere with the WooCommerce search page
1392
+ // which is considered to be the "Shop" page that has its own unload rules
1393
+ return (is_search() && (! (function_exists('is_shop') && is_shop())));
1394
+ }
1395
+
1396
/**
1397
* @return bool
1398
*/
classes/Misc.php CHANGED
@@ -86,6 +86,20 @@ class Misc
86
return self::_filterPageUrl(get_permalink($postId));
87
}
88
89
// If it's not a singular page, nor the home page, continue...
90
// It could be: Archive page (e.g. author, category, tag, date, custom taxonomy), Search page, 404 page etc.
91
global $wp;
86
return self::_filterPageUrl(get_permalink($postId));
87
}
88
89
+ // For Pro Version (Dashboard view): category link, tag link, custom taxonomy etc.
90
+ if (is_admin() && Main::instance()->wpacuProEnabled()) {
91
+ $wpacuOwnAssets = new OwnAssets();
92
+
93
+ if ($wpacuOwnAssets->isTaxonomyEditPage()) {
94
+ $current_screen = \get_current_screen();
95
+
96
+ $term = isset($_GET['tag_ID']) ? (int)$_GET['tag_ID'] : false;
97
+ $taxonomy = $current_screen->taxonomy;
98
+
99
+ return get_term_link($term, $taxonomy);
100
+ }
101
+ }
102
+
103
// If it's not a singular page, nor the home page, continue...
104
// It could be: Archive page (e.g. author, category, tag, date, custom taxonomy), Search page, 404 page etc.
105
global $wp;
classes/OwnAssets.php CHANGED
@@ -15,10 +15,15 @@ class OwnAssets
15
*/
16
public $loadPluginAssets = false; // default
17
18
- /**
19
- * OwnAssets constructor.
20
- */
21
- public function __construct()
22
{
23
add_action('admin_enqueue_scripts', array($this, 'stylesAndScriptsForAdmin'));
24
@@ -55,6 +60,10 @@ class OwnAssets
55
$this->loadPluginAssets = true;
56
}
57
58
if (! $this->loadPluginAssets) {
59
return;
60
}
@@ -112,8 +121,9 @@ class OwnAssets
112
$postId = 0; // for home page
113
}
114
115
- // Not home page (posts list)? See if the individual post is published to continue
116
- if ($postId > 0) {
117
$postStatus = get_post_status($postId);
118
119
if (! $postStatus) {
@@ -136,20 +146,20 @@ class OwnAssets
136
);
137
138
// It can also be the front page URL
139
- $postUrl = Misc::getPageUrl($postId);
140
141
wp_localize_script(
142
WPACU_PLUGIN_NAME . '-script',
143
'wpacu_object',
144
- array(
145
'plugin_name' => WPACU_PLUGIN_NAME,
146
'dom_get_type' => Main::$domGetType,
147
'start_del' => Main::START_DEL,
148
'end_del' => Main::END_DEL,
149
'ajax_url' => admin_url('admin-ajax.php'),
150
- 'post_id' => $postId,
151
- 'post_url' => $postUrl
152
- )
153
);
154
155
wp_enqueue_script(WPACU_PLUGIN_NAME . '-icheck', plugins_url('/assets/icheck/icheck.min.js', WPACU_PLUGIN_FILE), array('jquery'));
@@ -205,4 +215,19 @@ class OwnAssets
205
</script>
206
<?php
207
}
208
}
15
*/
16
public $loadPluginAssets = false; // default
17
18
+ /**
19
+ * @var bool
20
+ */
21
+ public $isTaxonomyEditPage = false;
22
+
23
+ /**
24
+ *
25
+ */
26
+ public function init()
27
{
28
add_action('admin_enqueue_scripts', array($this, 'stylesAndScriptsForAdmin'));
29
60
$this->loadPluginAssets = true;
61
}
62
63
+ if ($this->isTaxonomyEditPage()) {
64
+ $this->loadPluginAssets = true;
65
+ }
66
+
67
if (! $this->loadPluginAssets) {
68
return;
69
}
121
$postId = 0; // for home page
122
}
123
124
+ // Not home page (posts list) nor Taxonomy Edit Page? Does it have a post ID?
125
+ // See if the individual post is published to continue
126
+ if ($postId > 0 && (! $this->isTaxonomyEditPage())) {
127
$postStatus = get_post_status($postId);
128
129
if (! $postStatus) {
146
);
147
148
// It can also be the front page URL
149
+ $pageUrl = Misc::getPageUrl($postId);
150
151
wp_localize_script(
152
WPACU_PLUGIN_NAME . '-script',
153
'wpacu_object',
154
+ apply_filters('wpacu_object_data', array(
155
'plugin_name' => WPACU_PLUGIN_NAME,
156
'dom_get_type' => Main::$domGetType,
157
'start_del' => Main::START_DEL,
158
'end_del' => Main::END_DEL,
159
'ajax_url' => admin_url('admin-ajax.php'),
160
+ 'post_id' => $postId, // if any
161
+ 'page_url' => $pageUrl // post, page, custom post type, homepage etc.
162
+ ))
163
);
164
165
wp_enqueue_script(WPACU_PLUGIN_NAME . '-icheck', plugins_url('/assets/icheck/icheck.min.js', WPACU_PLUGIN_FILE), array('jquery'));
215
</script>
216
<?php
217
}
218
+
219
+ /**
220
+ * @return bool
221
+ */
222
+ public function isTaxonomyEditPage()
223
+ {
224
+ if ((!$this->isTaxonomyEditPage)
225
+ && Main::instance()->wpacuProEnabled()
226
+ && class_exists('\\WpAssetCleanUpPro\\Main')) {
227
+ $mainPro = new \WpAssetCleanUpPro\Main();
228
+ $this->isTaxonomyEditPage = $mainPro->isTaxonomyEditPage();
229
+ }
230
+
231
+ return $this->isTaxonomyEditPage;
232
+ }
233
}
classes/Plugin.php CHANGED
@@ -15,6 +15,9 @@ class Plugin
15
16
// Admin footer text: Ask the user to review the plugin
17
add_filter('admin_footer_text', array($this, 'adminFooter'), 1, 1);
18
}
19
20
/**
@@ -33,6 +36,25 @@ class Plugin
33
}
34
}
35
36
/**
37
* @param $text
38
*
15
16
// Admin footer text: Ask the user to review the plugin
17
add_filter('admin_footer_text', array($this, 'adminFooter'), 1, 1);
18
+
19
+ // Show "Settings" and "Go Pro" as plugin action links
20
+ add_filter('plugin_action_links_'.WPACU_PLUGIN_BASE, array($this, 'actionLinks'));
21
}
22
23
/**
36
}
37
}
38
39
+ /**
40
+ * @param $links
41
+ *
42
+ * @return mixed
43
+ */
44
+ public function actionLinks($links)
45
+ {
46
+ $links['settings'] = '<a href="admin.php?page='.WPACU_PLUGIN_NAME.'_settings">Settings</a>';
47
+
48
+ $allPlugins = get_plugins();
49
+
50
+ // If premium extension is not installed (active or not), show the "Go Pro" link
51
+ if (! array_key_exists('wp-asset-clean-up-pro/wpacu-pro.php', $allPlugins)) {
52
+ $links['go_pro'] = '<a target="_blank" style="font-weight: bold; color: #46b450;" href="https://www.gabelivan.com/items/wp-asset-cleanup-pro/">Go Pro</a>';
53
+ }
54
+
55
+ return $links;
56
+ }
57
+
58
/**
59
* @param $text
60
*
classes/Update.php CHANGED
@@ -219,6 +219,8 @@ class Update
219
*
220
* This is the function that clears and updates the load exceptions for any of the requested pages
221
*
222
* @param string $type
223
* @param string $postId
224
*/
@@ -305,7 +307,7 @@ class Update
305
}
306
} elseif ($type == 'front_page') {
307
update_option(WPACU_PLUGIN_NAME . '_front_page_load_exceptions', $jsonLoadExceptions);
308
- } else {
309
// Premium Extensions: Update any load extensions for pages like: taxonomy, 404, search, date etc.
310
do_action( 'wpacu_pro_update_load_exceptions', $jsonLoadExceptions );
311
}
219
*
220
* This is the function that clears and updates the load exceptions for any of the requested pages
221
*
222
+ * This method SHOULD NOT be triggered within an AJAX call
223
+ *
224
* @param string $type
225
* @param string $postId
226
*/
307
}
308
} elseif ($type == 'front_page') {
309
update_option(WPACU_PLUGIN_NAME . '_front_page_load_exceptions', $jsonLoadExceptions);
310
+ } elseif ($type == 'for_pro') {
311
// Premium Extensions: Update any load extensions for pages like: taxonomy, 404, search, date etc.
312
do_action( 'wpacu_pro_update_load_exceptions', $jsonLoadExceptions );
313
}
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: gabelivan
3
Tags: speed, pagespeed, dequeue style, dequeue script, unload style, unload script, disable emojis
4
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7GJZCW6RD8ECS
5
Requires at least: 4.0
6
- Tested up to: 4.9.7
7
- Stable tag: 1.2.6.5
8
License: GPLv3
9
License URI: http://www.gnu.org/licenses/gpl.html
10
@@ -102,6 +102,10 @@ If that's the case, then it's advisable to consult with a developer (ideally the
102
4. Scripts (.JS) are selected for site-wide unload
103
104
== Changelog ==
105
= 1.2.6.5 =
106
* Bug Fix: Fatal error "Can't use method return value in write context" (for PHP versions < 5.5)
107
3
Tags: speed, pagespeed, dequeue style, dequeue script, unload style, unload script, disable emojis
4
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7GJZCW6RD8ECS
5
Requires at least: 4.0
6
+ Tested up to: 4.9.8
7
+ Stable tag: 1.2.6.6
8
License: GPLv3
9
License URI: http://www.gnu.org/licenses/gpl.html
10
102
4. Scripts (.JS) are selected for site-wide unload
103
104
== Changelog ==
105
+ = 1.2.6.6 =
106
+ * Bug Fix: Assets were not retrieved within in the Dashboard for the home page
107
+ * Compatible with WP Asset CleanUp Pro
108
+
109
= 1.2.6.5 =
110
* Bug Fix: Fatal error "Can't use method return value in write context" (for PHP versions < 5.5)
111
templates/get-help.php CHANGED
@@ -7,7 +7,7 @@ if (! isset($data)) {
7
}
8
?>
9
<div class="wrap wpacu-get-help-wrap">
10
- <h1><?php _e('WP Asset CleanUp', WPACU_PLUGIN_NAME); ?></h1>
11
<h2><?php _e('In case you are stuck and need assistance, I can help you!', WPACU_PLUGIN_NAME); ?></h2>
12
13
<p>If you believe the plugin has a bug (e.g. you're getting JavaScript or PHP errors generated by WP Asset CleanUp or the selected scripts are not unloading etc.) that needs to be fixed, then <a href="https://wordpress.org/support/plugin/wp-asset-clean-up">please report it by opening a support ticket</a>. Note that the support forum is only for reporting bugs and it's not for custom work request.</p>
7
}
8
?>
9
<div class="wrap wpacu-get-help-wrap">
10
+ <h1><?php echo apply_filters('wpacu_plugin_page_title', 'WP Asset CleanUp Lite'); ?></h1>
11
<h2><?php _e('In case you are stuck and need assistance, I can help you!', WPACU_PLUGIN_NAME); ?></h2>
12
13
<p>If you believe the plugin has a bug (e.g. you're getting JavaScript or PHP errors generated by WP Asset CleanUp or the selected scripts are not unloading etc.) that needs to be fixed, then <a href="https://wordpress.org/support/plugin/wp-asset-clean-up">please report it by opening a support ticket</a>. Note that the support forum is only for reporting bugs and it's not for custom work request.</p>
templates/meta-box-loaded.php CHANGED
@@ -62,6 +62,19 @@ if (! is_404()) {
62
<?php
63
}
64
65
/*
66
* --------------------
67
* [START] STYLES LIST
62
<?php
63
}
64
65
+ if (isset($data['page_template'])) {
66
+ ?>
67
+ <div>
68
+ <strong><?php if ($data['post_type'] === 'page') { echo 'Page'; } elseif ($data['post_type'] === 'post') { echo 'Post'; } ?> Template:</strong> <u><?php echo $data['all_page_templates'][$data['page_template']]; ?></u> (<?php echo $data['page_template'];
69
+
70
+ if (isset($data['page_template_path'])) {
71
+ echo '&nbsp; &#8594; &nbsp;<em>'.$data['page_template_path'].'</em>';
72
+ }
73
+ ?>)
74
+ </div>
75
+ <?php
76
+ }
77
+
78
/*
79
* --------------------
80
* [START] STYLES LIST
templates/settings-advanced-rules.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
- /*
3
- * No direct access to this file
4
- */
5
- if (! isset($data)) {
6
- exit;
7
- }
8
- ?>
9
- <h1><?php _e('WP Asset CleanUp', WPACU_PLUGIN_NAME); ?></h1>
10
- <h2><?php _e('Custom Rules', WPACU_PLUGIN_NAME); ?></h2>
11
-
12
- <p>To use this feature, you need to have "WP Asset CleanUp Pro" plugin extension enabled.</p>
13
- <p><a href="#">Learn more about the premium version</a></p>
templates/settings-bulk-unloads.php CHANGED
@@ -5,11 +5,13 @@
5
if (! isset($data)) {
6
exit;
7
}
8
?>
9
- <h1><?php _e('WP Asset CleanUp', WPACU_PLUGIN_NAME); ?></h1>
10
<h2><?php _e('Bulk Unloads', WPACU_PLUGIN_NAME); ?></h2>
11
12
- <p>If <u>any of the options below are used</u>, then the assets will be shown here. Although, you can manage them when editing a page/post, this page will make things easier by seeing all the bulk unloads:</p>
13
<ul>
14
<li>&#8594; Unload everywhere</li>
15
<li>&#8594; Unload on All Pages of <em>[post type here]</em> post type</li>
5
if (! isset($data)) {
6
exit;
7
}
8
+
9
+ // TODO: Make sure other bulk unloaded elements such as "author", "taxonomy" etc. are here if pro version is enabled
10
?>
11
+ <h1><?php echo apply_filters('wpacu_plugin_page_title', __('WP Asset CleanUp Lite', WPACU_PLUGIN_NAME)); ?></h1>
12
<h2><?php _e('Bulk Unloads', WPACU_PLUGIN_NAME); ?></h2>
13
14
+ <p>If <u>any of the options below are used</u>, then the assets will be shown here. <strong>Although, you can manage them when editing a page/post, this page will make things easier by seeing all the bulk unloads:</strong></p>
15
<ul>
16
<li>&#8594; Unload everywhere</li>
17
<li>&#8594; Unload on All Pages of <em>[post type here]</em> post type</li>
templates/settings-frontend.php CHANGED
@@ -9,7 +9,7 @@ if (! isset($data)) {
9
10
<form action="#wpacu_wrap_assets" method="post">
11
<div id="wpacu_wrap_assets">
12
- <h1>WP Asset CleanUp</h1>
13
<?php
14
if ($data['is_updateable']) {
15
?>
@@ -33,11 +33,28 @@ if (! isset($data)) {
33
do_action('wpacu_pro_frontend_before_asset_list');
34
35
require_once 'meta-box-loaded.php';
36
-
37
} else {
38
?>
39
- <p>This page format is not supported at this time (e.g. it is likely an archive having multiple posts, category or 404 page) and unloading assets for this type of page is not supported at the moment.</p>
40
- <p>If there are assets unloaded everywhere, then the rule will apply and they will not be loaded on this page.</p>
41
<?php
42
}
43
9
10
<form action="#wpacu_wrap_assets" method="post">
11
<div id="wpacu_wrap_assets">
12
+ <h1><?php echo apply_filters('wpacu_plugin_page_title', 'WP Asset CleanUp Lite'); ?></h1>
13
<?php
14
if ($data['is_updateable']) {
15
?>
33
do_action('wpacu_pro_frontend_before_asset_list');
34
35
require_once 'meta-box-loaded.php';
36
} else {
37
+ // Category, Tag, Search, 404, Author, Date pages (not supported by Lite version)
38
+
39
+ if (\WpAssetCleanUp\Main::isWpDefaultSearchPage()) {
40
+ echo '<span class="dashicons dashicons-search"></span> This is a <strong>WordPress Search Page</strong> and it is available in WP Asset CleanUp Pro.';
41
+ } elseif (is_404()) {
42
+ echo '<span class="dashicons dashicons-warning"></span> This is a <strong>404 (Not Found) Page</strong> and it is available in WP Asset CleanUp Pro.';
43
+ } elseif (is_author()) {
44
+ echo '<span class="dashicons dashicons-admin-users"></span> This is an <strong>Author Page</strong> and it is available in WP Asset CleanUp Pro.';
45
+ } elseif (is_category()) {
46
+ echo '<span class="dashicons dashicons-category"></span> This is a <strong>Category (Taxonomy) Page</strong> and it is available in WP Asset CleanUp Pro.';
47
+ } elseif (function_exists('is_product_category') && is_product_category()) {
48
+ echo '<img src="'.WPACU_PLUGIN_URL . '/assets/icons/woocommerce-icon-logo.svg'.'" alt="" style="height: 40px !important; margin-top: -6px; margin-right: 5px;" align="middle" /> This is a <strong>WooCommerce Product Category (Taxonomy) Page</strong> and it is available in WP Asset CleanUp Pro.';
49
+ } elseif (is_date()) {
50
+ echo '<span class="dashicons dashicons-calendar-alt"></span> This is a <strong>Date (Archive) Page</strong> and it is available in WP Asset CleanUp Pro.';
51
+ } elseif (is_tag()) {
52
+ echo '<span class="dashicons dashicons-tag"></span> This is a <strong>Tag (Archive) Page</strong> and it is available in WP Asset CleanUp Pro.';
53
+ } elseif (is_tax()) {
54
+ echo '<span class="dashicons dashicons-tag"></span> This is a <strong>Taxonomy Page</strong> and it is available in WP Asset CleanUp Pro.';
55
+ }
56
?>
57
+ <p><a class="go-pro-button" target="_blank" href="https://www.gabelivan.com/items/wp-asset-cleanup-pro/"><span class="dashicons dashicons-star-filled"></span>&nbsp; Get WP Asset CleanUp Pro</a> <em>* starting from $29</em></p>
58
<?php
59
}
60
templates/settings-home-page.php CHANGED
@@ -6,7 +6,7 @@ if (! isset($data)) {
6
exit;
7
}
8
?>
9
- <h1><?php _e('WP Asset CleanUp', WPACU_PLUGIN_NAME); ?></h1>
10
<h2><?php _e('Home Page Scripts &amp; Styles Management', WPACU_PLUGIN_NAME); ?></h2>
11
12
<?php
6
exit;
7
}
8
?>
9
+ <h1><?php echo apply_filters('wpacu_plugin_page_title', __('WP Asset CleanUp Lite', WPACU_PLUGIN_NAME)); ?></h1>
10
<h2><?php _e('Home Page Scripts &amp; Styles Management', WPACU_PLUGIN_NAME); ?></h2>
11
12
<?php
templates/settings-plugin.php CHANGED
@@ -7,7 +7,7 @@ if (! isset($data)) {
7
}
8
?>
9
<div class="wrap">
10
- <h1><?php _e('WP Asset CleanUp', WPACU_PLUGIN_NAME); ?></h1>
11
12
<form method="post" action="">
13
<input type="hidden" name="wpacu_settings_page" value="1" />
7
}
8
?>
9
<div class="wrap">
10
+ <h1><?php echo apply_filters('wpacu_plugin_page_title', __('WP Asset CleanUp Lite', WPACU_PLUGIN_NAME)); ?></h1>
11
12
<form method="post" action="">
13
<input type="hidden" name="wpacu_settings_page" value="1" />
wpacu-load.php CHANGED
@@ -32,7 +32,8 @@ spl_autoload_register('includeWpAssetCleanUpClassesAutoload');
32
WpAssetCleanUp\Main::instance();
33
34
// Plugin's Assets (used only when you're logged in)
35
- new \WpAssetCleanUp\OwnAssets;
36
37
// Add / Update / Remove Settings
38
$wpacuUpdate = new WpAssetCleanUp\Update;
32
WpAssetCleanUp\Main::instance();
33
34
// Plugin's Assets (used only when you're logged in)
35
+ $wpacuOwnAssets = new \WpAssetCleanUp\OwnAssets;
36
+ $wpacuOwnAssets->init();
37
38
// Add / Update / Remove Settings
39
$wpacuUpdate = new WpAssetCleanUp\Update;
wpacu.php CHANGED
@@ -1,8 +1,8 @@
1
<?php
2
/*
3
- * Plugin Name: WP Asset CleanUp (Page Speed Optimizer)
4
* Plugin URI: https://wordpress.org/plugins/wp-asset-clean-up/
5
- * Version: 1.2.6.5
6
* Description: Prevent Chosen Scripts & Styles from loading in Posts/Pages that you don't need
7
* Author: Gabriel Livan
8
* Author URI: http://www.gabelivan.com/
@@ -21,7 +21,8 @@ if (! defined('WPACU_PLUGIN_NAME')) {
21
22
define('WPACU_PLUGIN_CLASSES_PATH', dirname(__FILE__).'/classes/');
23
define('WPACU_PLUGIN_FILE', __FILE__);
24
- define('WPACU_PLUGIN_URL', plugins_url('', __FILE__));
25
26
// Whenever the premium extension is ready to be sold, this can be set to 'true'
27
define('WPACU_PLUGIN_HAS_PREMIUM_EXT', false);
@@ -38,7 +39,7 @@ if (is_admin() && $wpacuWrongPhp) { // Dashboard
38
*/
39
function wpAssetCleanUpWrongPhp()
40
{
41
- deactivate_plugins(plugin_basename(__FILE__));
42
43
// The premium extension too (if any)
44
deactivate_plugins('wp-asset-clean-up-pro/wpacu-pro.php');
@@ -61,4 +62,4 @@ if (is_admin() && $wpacuWrongPhp) { // Dashboard
61
return;
62
}
63
64
- require_once dirname(__FILE__).'/wpacu-load.php';
1
<?php
2
/*
3
+ * Plugin Name: WP Asset CleanUp Lite (Page Speed Optimizer)
4
* Plugin URI: https://wordpress.org/plugins/wp-asset-clean-up/
5
+ * Version: 1.2.6.6
6
* Description: Prevent Chosen Scripts & Styles from loading in Posts/Pages that you don't need
7
* Author: Gabriel Livan
8
* Author URI: http://www.gabelivan.com/
21
22
define('WPACU_PLUGIN_CLASSES_PATH', dirname(__FILE__).'/classes/');
23
define('WPACU_PLUGIN_FILE', __FILE__);
24
+ define('WPACU_PLUGIN_BASE', plugin_basename(WPACU_PLUGIN_FILE));
25
+ define('WPACU_PLUGIN_URL', plugins_url('', WPACU_PLUGIN_FILE));
26
27
// Whenever the premium extension is ready to be sold, this can be set to 'true'
28
define('WPACU_PLUGIN_HAS_PREMIUM_EXT', false);
39
*/
40
function wpAssetCleanUpWrongPhp()
41
{
42
+ deactivate_plugins(WPACU_PLUGIN_BASE);
43
44
// The premium extension too (if any)
45
deactivate_plugins('wp-asset-clean-up-pro/wpacu-pro.php');
62
return;
63
}
64
65
+ require_once dirname(WPACU_PLUGIN_FILE).'/wpacu-load.php';