Asset CleanUp: Page Speed Booster - Version 1.2.7.2

Version Description

  • Bug Fix: Sometimes, specific scripts were showing up on Dashboard view, but not showing on Front-end view
  • Extra confirmation required when unloading site-wide "jQuery Migrate" and "Comment Reply" from the plugin's settings (to avoid accidental unload)
Download this release

Release Info

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

Code changes from version 1.2.7.1 to 1.2.7.2

assets/script.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){var b={load:function(){b.getExternalFileSize();var c;a(".input-unload-on-this-page").on("click change",function(){a(this).prop("checked")?a(this).closest("tr").addClass("wpacu_not_load"):a(this).closest("tr").removeClass("wpacu_not_load")}),a(".wpacu_global_unload").click(function(){c=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).prop("checked",!1).trigger("change")}else a(this).parent("label").removeClass("wpacu_global_unload_exception")})},getExternalFileSize:function(){a(".wpacu-external-file-size").each(function(){var b=a(this);a.post(wpacu_object.ajax_url,{action:"get_external_file_size",wpacu_remote_file:a(this).attr("data-src")},function(a){b.html(a)})})}};if(a("#wpacu_post_type_select").change(function(){a("#wpacu_post_type_form").submit()}),a("#wpacu_taxonomy_select").change(function(){a("#wpacu_taxonomy_form").submit()}),a("#wpacu_dashboard").click(function(){a(this).prop("checked")?a("#wpacu-settings-assets-retrieval-mode").fadeIn():a("#wpacu-settings-assets-retrieval-mode").fadeOut()}),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){if(!c)return!1;a("#wpacu_meta_box_content").html(c),a("#wpacu_home_page_form").length>0&&a("#submit").show(),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){if(!c)return!1;a("#wpacu_meta_box_content").html(c),a("#wpacu_home_page_form").length>0&&a("#submit").show(),b.load()}))});
1
+ jQuery(document).ready(function(a){var b={load:function(){b.getExternalFileSize();var c;a(".input-unload-on-this-page").on("click change",function(){a(this).prop("checked")?a(this).closest("tr").addClass("wpacu_not_load"):a(this).closest("tr").removeClass("wpacu_not_load")}),a(".wpacu_global_unload").click(function(){c=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).prop("checked",!1).trigger("change")}else a(this).parent("label").removeClass("wpacu_global_unload_exception")})},getExternalFileSize:function(){a(".wpacu-external-file-size").each(function(){var b=a(this);a.post(wpacu_object.ajax_url,{action:"get_external_file_size",wpacu_remote_file:a(this).attr("data-src")},function(a){b.html(a)})})}};if(a("#wpacu_post_type_select").change(function(){a("#wpacu_post_type_form").submit()}),a("#wpacu_taxonomy_select").change(function(){a("#wpacu_taxonomy_form").submit()}),a("#wpacu_dashboard").click(function(){a(this).prop("checked")?a("#wpacu-settings-assets-retrieval-mode").fadeIn():a("#wpacu-settings-assets-retrieval-mode").fadeOut()}),a("#wpacu_disable_jquery_migrate").on("click",function(){return!a(this).is(":checked")||(!(!a(this).is(":checked")||!confirm(wpacu_object.jquery_migration_disable_confirm_msg))||(a(this).prop("checked",!1),!1))}),a("#wpacu_disable_comment_reply").on("click",function(){return!a(this).is(":checked")||(!(!a(this).is(":checked")||!confirm(wpacu_object.comment_reply_disable_confirm_msg))||(a(this).prop("checked",!1),!1))}),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){if(!c)return!1;a("#wpacu_meta_box_content").html(c),a("#wpacu_home_page_form").length>0&&a("#submit").show(),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){if(!c)return!1;a("#wpacu_meta_box_content").html(c),a("#wpacu_home_page_form").length>0&&a("#submit").show(),b.load()}))});
assets/style.min.css CHANGED
@@ -1 +1 @@
1
- .wpacu-tabs,.wpacu-tabs nav a{position:relative;overflow:hidden}.wpacu-tabs{margin:0 auto 20px;width:100%;font-weight:300;font-size:20px}.wpacu-tabs nav{text-align:center}.wpacu-tabs nav ul{position:relative;display:-ms-flexbox;display:-webkit-flex;display:-moz-flex;display:-ms-flex;display:flex;margin:0 auto;padding:0;max-width:1200px;list-style:none;-ms-box-orient:horizontal;-ms-box-pack:center;-webkit-flex-flow:row wrap;-moz-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;justify-content:center}.wpacu-tabs nav ul li{position:relative;z-index:1;display:block;margin:0;text-align:center;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}.wpacu-tabs nav a{display:block;text-overflow:ellipsis;white-space:nowrap;line-height:2.5}.wpacu-tabs nav a span{vertical-align:middle;font-size:.75em}.wpacu-tabs nav li.wpacu-tab-current a{color:#74777b}.wpacu-tabs nav a:focus{outline:0}.wpacu-tabs .dashicons{font-size:20px}.no-js .wpacu-content-wrap section{display:block;padding-bottom:2em;border-bottom:1px solid rgba(255,255,255,.6)}.no-flexbox nav ul{display:block}.no-flexbox nav ul li{min-width:15%;display:inline-block}@media screen and (max-width:58em){.wpacu-tabs nav a.icon span{display:none}.wpacu-tabs nav a:before{margin-right:0}}.wpacu-tabs-style-underline nav{background:#fff}.wpacu-tabs-style-underline nav a{color:#74777b;font-size:18px;text-transform:uppercase;text-decoration:none;padding:.25em 0 .5em;border-left:1px solid #e7ecea;-webkit-transition:color .2s;transition:color .2s}.wpacu-tabs-style-underline nav li:last-child a{border-right:1px solid #e7ecea}.wpacu-tabs-style-underline nav li a::after{position:absolute;bottom:0;left:0;width:100%;height:6px;background:#2CC185;content:'';-webkit-transition:-webkit-transform .3s;transition:transform .3s;-webkit-transform:translate3d(0,150%,0);transform:translate3d(0,150%,0)}.wpacu-tabs-style-underline nav li.wpacu-tab-current a::after{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.wpacu-tabs-style-underline nav a span{font-weight:700}.wpacu-tabs-style-topline{max-width:1200px;margin:20px auto;width:100%;font-weight:300;text-decoration:none}.wpacu-tabs-style-topline nav li{border:1px solid rgba(40,44,42,.1)}.wpacu-tabs-style-topline nav li:not(:last-child){border-right:none}.wpacu-tabs-style-topline nav li.wpacu-tab-current{border-top-color:#0085ba;border-bottom:none}.wpacu-tabs-style-topline nav a{padding:20px 15px;background:rgba(40,44,42,.05);color:#74777b;line-height:1;-webkit-transition:color .2s;transition:color .2s;text-decoration:none}.widefat .check-column.wpacu_check,body.toplevel_page_wpassetcleanup_settings .notice{padding:10px}.wpacu-tabs-style-topline nav a:focus,.wpacu-tabs-style-topline nav a:hover{color:#0085ba}.wpacu-tabs-style-topline nav li.wpacu-tab-current a{background:0 0;box-shadow:inset 0 3px 0 #0085ba;color:#0085ba}.wpacu-tabs-style-topline nav li.wpacu-tab-current a span:not(.dashicons){font-weight:600}.wpacu-tabs-style-topline nav a span{text-transform:uppercase;font-weight:400}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:#c00}#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:5px;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;font-weight:400}#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}.asset-table-extra-info td{padding:5px}body.wp-admin .wpacu_asset_row td.wpacu_check{width:25px}.wpacu_asset_row .dashicons{color:red}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,.wp-asset-clean-up div,.wp-asset-clean-up li,.wp-asset-clean-up p,.wp-list-table,.wp-list-table div,.wp-list-table li,.wp-list-table p{font-weight:400}.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%}.go-pro-button,.go-pro-link-no-style,.wordpress-core-file{display:inline-block;text-decoration:none}.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;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}.go-pro-link-no-style .tooltip,.wordpress-core-file .tooltip{font-size:14px;line-height:18px;z-index:1;text-align:center;padding:6px;border-radius:6px;bottom:100%;left:50%}.go-pro-link-no-style{position:relative;color:inherit}.go-pro-link-no-style:not(.nav-tab){font-style:italic}.go-pro-link-no-style .tooltip{position:absolute;visibility:hidden;width:130px;background-color:#27ae60;color:#fff;margin-left:-65px}.go-pro-link-no-style:hover .tooltip{visibility:visible}.wordpress-core-file{position:relative;font-style:normal;color:inherit}.wordpress-core-file .tooltip{position:absolute;visibility:hidden;width:160px;background-color:#c00;color:#fff;margin-left:-80px}.wordpress-core-file:hover .tooltip{visibility:visible}body.wp-admin .go-pro-link-no-style .tooltip{font-size:12px;line-height:16px;padding:5px}.pro-page-unlock-notice{border-radius:10px;padding:10px;background:#f2faf2;border:1px solid #c0e8c0;width:auto;display:block}.toplevel_page_wpassetcleanup_settings .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px}.toplevel_page_wpassetcleanup_settings .wpacu_switch input{display:none}.toplevel_page_wpassetcleanup_settings .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.toplevel_page_wpassetcleanup_settings .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.toplevel_page_wpassetcleanup_settings input:checked+.wpacu_slider{background-color:#52af00}.toplevel_page_wpassetcleanup_settings input:focus+.wpacu_slider{box-shadow:0 0 1px #52af00}.toplevel_page_wpassetcleanup_settings input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.toplevel_page_wpassetcleanup_settings .wpacu_slider.wpacu_round{border-radius:29px}.toplevel_page_wpassetcleanup_settings .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu_asset_row li.wpacu_unload_this_page{display:block!important;position:relative}.wpacu_asset_row .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px;margin-right:5px!important}.wpacu_asset_row .wpacu_switch input{display:none}.wpacu_asset_row .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.wpacu_asset_row .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.wpacu_asset_row .wpacu_slider_text{position:absolute;left:62px;top:3px}.wpacu_asset_row input:checked+.wpacu_slider{background-color:#C00}.wpacu_asset_row input:focus+.wpacu_slider{box-shadow:0 0 1px #C00}.wpacu_asset_row input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu_asset_row .wpacu_slider.wpacu_round{border-radius:29px}.wpacu_asset_row .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu_table_wrap{margin:20px 0 0}.wpacu_table_wrap>table{border:1px solid #cdcdcd}.wpacu_table_wrap .table{width:100%;max-width:100%;margin-bottom:1rem;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu_table_wrap .table td,.wpacu_table_wrap .table th{padding:.75rem;vertical-align:top;border-top:1px solid #eceeef}.wpacu_table_wrap .table thead th{vertical-align:bottom;border-bottom:2px solid #eceeef}.wpacu_table_wrap .table tbody+tbody{border-top:2px solid #eceeef}.wpacu_table_wrap .table .table{background-color:#fff}.wpacu_table_wrap .table-sm td,.wpacu_table_wrap .table-sm th{padding:.3rem}.wpacu_table_wrap .table-bordered,.wpacu_table_wrap .table-bordered td,.wpacu_table_wrap .table-bordered th{border:1px solid #eceeef}.wpacu_table_wrap .table-bordered thead td,.wpacu_table_wrap .table-bordered thead th{border-bottom-width:2px}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(even){background-color:#f9f9f9}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(odd){background-color:#fff}.wpacu_table_wrap .table-active,.wpacu_table_wrap .table-active>td,.wpacu_table_wrap .table-active>th,.wpacu_table_wrap .table-hover .table-active:hover,.wpacu_table_wrap .table-hover .table-active:hover>td,.wpacu_table_wrap .table-hover .table-active:hover>th,.wpacu_table_wrap .table-hover tbody tr:hover{background-color:rgba(0,0,0,.075)}.wpacu_table_wrap .table-success,.wpacu_table_wrap .table-success>td,.wpacu_table_wrap .table-success>th{background-color:#dff0d8}.wpacu_table_wrap .table-hover .table-success:hover,.wpacu_table_wrap .table-hover .table-success:hover>td,.wpacu_table_wrap .table-hover .table-success:hover>th{background-color:#d0e9c6}.wpacu_table_wrap .table-info,.wpacu_table_wrap .table-info>td,.wpacu_table_wrap .table-info>th{background-color:#d9edf7}.wpacu_table_wrap .table-hover .table-info:hover,.wpacu_table_wrap .table-hover .table-info:hover>td,.wpacu_table_wrap .table-hover .table-info:hover>th{background-color:#c4e3f3}.wpacu_table_wrap .table-warning,.wpacu_table_wrap .table-warning>td,.wpacu_table_wrap .table-warning>th{background-color:#fcf8e3}.wpacu_table_wrap .table-hover .table-warning:hover,.wpacu_table_wrap .table-hover .table-warning:hover>td,.wpacu_table_wrap .table-hover .table-warning:hover>th{background-color:#faf2cc}.wpacu_table_wrap .table-danger,.wpacu_table_wrap .table-danger>td,.wpacu_table_wrap .table-danger>th{background-color:#f2dede}.wpacu_table_wrap .table-hover .table-danger:hover,.wpacu_table_wrap .table-hover .table-danger:hover>td,.wpacu_table_wrap .table-hover .table-danger:hover>th{background-color:#ebcccc}.wpacu_table_wrap .thead-inverse th{color:#fff;background-color:#292b2c}.wpacu_table_wrap .thead-default th{color:#464a4c;background-color:#eceeef}.wpacu_table_wrap .table-inverse{color:#fff;background-color:#292b2c}.wpacu_table_wrap .table-inverse td,.wpacu_table_wrap .table-inverse th,.wpacu_table_wrap .table-inverse thead th{border-color:#fff}.wpacu_table_wrap .table-inverse.table-bordered,.wpacu_table_wrap .table-responsive.table-bordered{border:0}.wpacu_table_wrap .table-responsive{display:block;width:100%;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar}
1
+ .wpacu-tabs,.wpacu-tabs nav a{position:relative;overflow:hidden}.wpacu-tabs{margin:0 auto 20px;width:100%;font-weight:300;font-size:20px}.wpacu-tabs nav{text-align:center}.wpacu-tabs nav ul{position:relative;display:-ms-flexbox;display:-webkit-flex;display:-moz-flex;display:-ms-flex;display:flex;margin:0 auto;padding:0;max-width:1200px;list-style:none;-ms-box-orient:horizontal;-ms-box-pack:center;-webkit-flex-flow:row wrap;-moz-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;justify-content:center}.wpacu-tabs nav ul li{position:relative;z-index:1;display:block;margin:0;text-align:center;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}.wpacu-tabs nav a{display:block;text-overflow:ellipsis;white-space:nowrap;line-height:2.5}.wpacu-tabs nav a span{vertical-align:middle;font-size:.75em}.wpacu-tabs nav li.wpacu-tab-current a{color:#74777b}.wpacu-tabs nav a:focus{outline:0}.wpacu-tabs .dashicons{font-size:20px}.no-js .wpacu-content-wrap section{display:block;padding-bottom:2em;border-bottom:1px solid rgba(255,255,255,.6)}.no-flexbox nav ul{display:block}.no-flexbox nav ul li{min-width:15%;display:inline-block}@media screen and (max-width:58em){.wpacu-tabs nav a.icon span{display:none}.wpacu-tabs nav a:before{margin-right:0}}.wpacu-tabs-style-underline nav{background:#fff}.wpacu-tabs-style-underline nav a{color:#74777b;font-size:18px;text-transform:uppercase;text-decoration:none;padding:.25em 0 .5em;border-left:1px solid #e7ecea;-webkit-transition:color .2s;transition:color .2s}.wpacu-tabs-style-underline nav li:last-child a{border-right:1px solid #e7ecea}.wpacu-tabs-style-underline nav li a::after{position:absolute;bottom:0;left:0;width:100%;height:6px;background:#2CC185;content:'';-webkit-transition:-webkit-transform .3s;transition:transform .3s;-webkit-transform:translate3d(0,150%,0);transform:translate3d(0,150%,0)}.wpacu-tabs-style-underline nav li.wpacu-tab-current a::after{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.wpacu-tabs-style-underline nav a span{font-weight:700}.wpacu-tabs-style-topline{max-width:1200px;margin:20px auto;width:100%;font-weight:300;text-decoration:none}.wpacu-tabs-style-topline nav li{border:1px solid rgba(40,44,42,.1)}.wpacu-tabs-style-topline nav li:not(:last-child){border-right:none}.wpacu-tabs-style-topline nav li.wpacu-tab-current{border-top-color:#0085ba;border-bottom:none}.wpacu-tabs-style-topline nav a{padding:20px 15px;background:rgba(40,44,42,.05);color:#74777b;line-height:1;-webkit-transition:color .2s;transition:color .2s;text-decoration:none}.wpacu-tabs-style-topline nav a:focus,.wpacu-tabs-style-topline nav a:hover{color:#0085ba}.wpacu-tabs-style-topline nav li.wpacu-tab-current a{background:0 0;box-shadow:inset 0 3px 0 #0085ba;color:#0085ba}.wpacu-tabs-style-topline nav li.wpacu-tab-current a span:not(.dashicons){font-weight:600}.wpacu-tabs-style-topline nav a span{text-transform:uppercase;font-weight:400}.wpacu-script-attributes-area{margin:20px 0 0}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings{padding:5px 7px}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings.wpacu-first{margin:0 28px 0 0}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings li{margin:0 16px 0 0}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings li:last-child{margin:0 2px 0 0}.wpacu-script-attributes-area .wpacu-script-attributes-settings{background:#fff;border:1px solid #eee;border-radius:5px;padding:5px 10px;list-style:none;display:inline-block;margin:0}.widefat .check-column.wpacu_check,body.toplevel_page_wpassetcleanup_settings .notice{padding:10px}.wpacu-script-attributes-area .wpacu-script-attributes-settings.wpacu-first{margin:0 34px 0 0}.wpacu-script-attributes-area .wpacu-script-attributes-settings li{float:left;margin:0 17px 0 0}.wpacu-script-attributes-area .wpacu-script-attributes-settings li:first-child{margin:0 7px 0 0}.wpacu-script-attributes-area .wpacu-script-attributes-settings li:last-child{margin:0}.wpacu-script-attributes-area .wpacu-script-attributes-settings:hover{background:#f2faf2}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:#c00}#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:5px;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;font-weight:400}#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}.asset-table-extra-info td{padding:5px}body.wp-admin .wpacu_asset_row td.wpacu_check{width:25px}.wpacu_asset_row .dashicons{color:red}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,.wp-asset-clean-up div,.wp-asset-clean-up li,.wp-asset-clean-up p,.wp-list-table,.wp-list-table div,.wp-list-table li,.wp-list-table p{font-weight:400}.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%}.go-pro-button,.go-pro-link-no-style,.wordpress-core-file{display:inline-block;text-decoration:none}.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;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}.go-pro-link-no-style .tooltip,.wordpress-core-file .tooltip{font-size:14px;line-height:18px;z-index:1;text-align:center;padding:6px;border-radius:6px;bottom:100%;left:50%}.go-pro-link-no-style{position:relative;color:inherit}.go-pro-link-no-style:not(.nav-tab){font-style:italic}.go-pro-link-no-style .tooltip{position:absolute;visibility:hidden;width:130px;background-color:#27ae60;color:#fff;margin-left:-65px}.go-pro-link-no-style .tooltip.wpacu-larger{width:240px}.go-pro-link-no-style:hover .tooltip{visibility:visible}.wordpress-core-file{position:relative;font-style:normal;color:inherit}.wordpress-core-file .tooltip{position:absolute;visibility:hidden;width:160px;background-color:#c00;color:#fff;margin-left:-80px}.wordpress-core-file:hover .tooltip{visibility:visible}body.wp-admin .go-pro-link-no-style .tooltip{font-size:12px;line-height:16px;padding:5px}.pro-page-unlock-notice{border-radius:10px;padding:10px;background:#f2faf2;border:1px solid #c0e8c0;width:auto;display:block}.toplevel_page_wpassetcleanup_settings .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px}.toplevel_page_wpassetcleanup_settings .wpacu_switch input{display:none}.toplevel_page_wpassetcleanup_settings .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.toplevel_page_wpassetcleanup_settings .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.toplevel_page_wpassetcleanup_settings input:checked+.wpacu_slider{background-color:#52af00}.toplevel_page_wpassetcleanup_settings input:focus+.wpacu_slider{box-shadow:0 0 1px #52af00}.toplevel_page_wpassetcleanup_settings input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.toplevel_page_wpassetcleanup_settings .wpacu_slider.wpacu_round{border-radius:29px}.toplevel_page_wpassetcleanup_settings .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu_asset_row li.wpacu_unload_this_page{display:block!important;position:relative}.wpacu_asset_row .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px;margin-right:5px!important}.wpacu_asset_row .wpacu_switch input{display:none}.wpacu_asset_row .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.wpacu_asset_row .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.wpacu_asset_row .wpacu_slider_text{position:absolute;left:62px;top:3px}.wpacu_asset_row input:checked+.wpacu_slider{background-color:#C00}.wpacu_asset_row input:focus+.wpacu_slider{box-shadow:0 0 1px #C00}.wpacu_asset_row input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu_asset_row .wpacu_slider.wpacu_round{border-radius:29px}.wpacu_asset_row .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu_table_wrap{margin:20px 0 0}.wpacu_table_wrap>table{border:1px solid #cdcdcd}.wpacu_table_wrap .table{width:100%;max-width:100%;margin-bottom:1rem;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu_table_wrap .table td,.wpacu_table_wrap .table th{padding:.75rem;vertical-align:top;border-top:1px solid #eceeef}.wpacu_table_wrap .table thead th{vertical-align:bottom;border-bottom:2px solid #eceeef}.wpacu_table_wrap .table tbody+tbody{border-top:2px solid #eceeef}.wpacu_table_wrap .table .table{background-color:#fff}.wpacu_table_wrap .table-sm td,.wpacu_table_wrap .table-sm th{padding:.3rem}.wpacu_table_wrap .table-bordered,.wpacu_table_wrap .table-bordered td,.wpacu_table_wrap .table-bordered th{border:1px solid #eceeef}.wpacu_table_wrap .table-bordered thead td,.wpacu_table_wrap .table-bordered thead th{border-bottom-width:2px}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(even){background-color:#f9f9f9}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(odd){background-color:#fff}.wpacu_table_wrap .table-active,.wpacu_table_wrap .table-active>td,.wpacu_table_wrap .table-active>th,.wpacu_table_wrap .table-hover .table-active:hover,.wpacu_table_wrap .table-hover .table-active:hover>td,.wpacu_table_wrap .table-hover .table-active:hover>th,.wpacu_table_wrap .table-hover tbody tr:hover{background-color:rgba(0,0,0,.075)}.wpacu_table_wrap .table-success,.wpacu_table_wrap .table-success>td,.wpacu_table_wrap .table-success>th{background-color:#dff0d8}.wpacu_table_wrap .table-hover .table-success:hover,.wpacu_table_wrap .table-hover .table-success:hover>td,.wpacu_table_wrap .table-hover .table-success:hover>th{background-color:#d0e9c6}.wpacu_table_wrap .table-info,.wpacu_table_wrap .table-info>td,.wpacu_table_wrap .table-info>th{background-color:#d9edf7}.wpacu_table_wrap .table-hover .table-info:hover,.wpacu_table_wrap .table-hover .table-info:hover>td,.wpacu_table_wrap .table-hover .table-info:hover>th{background-color:#c4e3f3}.wpacu_table_wrap .table-warning,.wpacu_table_wrap .table-warning>td,.wpacu_table_wrap .table-warning>th{background-color:#fcf8e3}.wpacu_table_wrap .table-hover .table-warning:hover,.wpacu_table_wrap .table-hover .table-warning:hover>td,.wpacu_table_wrap .table-hover .table-warning:hover>th{background-color:#faf2cc}.wpacu_table_wrap .table-danger,.wpacu_table_wrap .table-danger>td,.wpacu_table_wrap .table-danger>th{background-color:#f2dede}.wpacu_table_wrap .table-hover .table-danger:hover,.wpacu_table_wrap .table-hover .table-danger:hover>td,.wpacu_table_wrap .table-hover .table-danger:hover>th{background-color:#ebcccc}.wpacu_table_wrap .thead-inverse th{color:#fff;background-color:#292b2c}.wpacu_table_wrap .thead-default th{color:#464a4c;background-color:#eceeef}.wpacu_table_wrap .table-inverse{color:#fff;background-color:#292b2c}.wpacu_table_wrap .table-inverse td,.wpacu_table_wrap .table-inverse th,.wpacu_table_wrap .table-inverse thead th{border-color:#fff}.wpacu_table_wrap .table-inverse.table-bordered,.wpacu_table_wrap .table-responsive.table-bordered{border:0}.wpacu_table_wrap .table-responsive{display:block;width:100%;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar}
classes/BulkUnloads.php CHANGED
@@ -89,7 +89,7 @@ class BulkUnloads
89
{
90
foreach ($postTypes as $postTypeKey => $postTypeValue) {
91
if ($postTypeKey === 'product' && Misc::isWooCommerceActive()) {
92
- $postTypes[$postTypeKey] = 'product &#8594; WooCommerce';
93
}
94
}
95
89
{
90
foreach ($postTypes as $postTypeKey => $postTypeValue) {
91
if ($postTypeKey === 'product' && Misc::isWooCommerceActive()) {
92
+ $postTypes[$postTypeKey] = 'product &#10230; WooCommerce';
93
}
94
}
95
classes/Info.php CHANGED
@@ -7,22 +7,12 @@ namespace WpAssetCleanUp;
7
*/
8
class Info
9
{
10
- /**
11
- * @var array
12
- */
13
- public $data = array();
14
-
15
- /**
16
- * @var
17
- */
18
- public $page;
19
-
20
/**
21
*
22
*/
23
public function help()
24
{
25
- Main::instance()->parseTemplate('admin-page-get-help', $this->data, true);
26
}
27
28
/**
@@ -30,7 +20,7 @@ class Info
30
*/
31
public function pagesInfo()
32
{
33
- Main::instance()->parseTemplate('admin-page-pages-info', $this->data, true);
34
}
35
36
/**
@@ -38,6 +28,6 @@ class Info
38
*/
39
public function license()
40
{
41
- Main::instance()->parseTemplate('admin-page-license', $this->data, true);
42
}
43
}
7
*/
8
class Info
9
{
10
/**
11
*
12
*/
13
public function help()
14
{
15
+ Main::instance()->parseTemplate('admin-page-get-help', array(), true);
16
}
17
18
/**
20
*/
21
public function pagesInfo()
22
{
23
+ Main::instance()->parseTemplate('admin-page-pages-info', array(), true);
24
}
25
26
/**
28
*/
29
public function license()
30
{
31
+ Main::instance()->parseTemplate('admin-page-license', array(), true);
32
}
33
}
classes/Main.php CHANGED
@@ -44,10 +44,12 @@ class Main
44
*/
45
public $fetchUrl;
46
47
/**
48
* @var
49
*/
50
public $isUpdateable = true;
51
52
/**
53
* @var bool
@@ -97,12 +99,22 @@ class Main
97
/**
98
* @var array
99
*/
100
- public $wpScripts = array();
101
102
/**
103
* @var array
104
*/
105
- public $wpStyles = array();
106
107
/**
108
* @var array
@@ -232,9 +244,11 @@ class Main
232
if (! isset($_REQUEST[WPACU_PLUGIN_NAME.'_load'])) {
233
$this->globalUnloaded = $this->getGlobalUnload();
234
235
if (! $this->isUpdateable && ! Misc::isHomePage()) {
236
return;
237
}
238
239
$getCurrentPost = $this->getCurrentPost();
240
@@ -319,16 +333,19 @@ class Main
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
325
// We'll see if there are assets unloaded globally and unload them
326
$globalUnload = $this->globalUnloaded;
327
328
- if (! empty($globalUnload['scripts']) && $nonAssetConfigPage) {
329
$list = $globalUnload['scripts'];
330
- } else {
331
- // Post, Page or Front-page?
332
$toRemove = $this->getAssetsUnloaded();
333
334
$jsonList = @json_decode($toRemove);
@@ -361,7 +378,9 @@ class Main
361
}
362
363
$list = array_unique($list);
364
- }
365
366
$list = apply_filters('wpacu_filter_scripts', $list);
367
@@ -374,22 +393,25 @@ class Main
374
}
375
}
376
377
if (empty($list)) {
378
return;
379
}
380
381
global $wp_scripts;
382
383
- // Only fill it once
384
- if (empty($this->wpScripts)) {
385
- $this->wpScripts = (array)$wp_scripts;
386
387
- if (! empty($this->wpScripts) && isset($this->wpScripts['registered'])) {
388
- $i = 1;
389
390
- foreach ($this->wpScripts['registered'] as $handle => $value) {
391
- $this->wpScripts['registered'][$handle]->wpacu_pos = $i;
392
- $i++;
393
}
394
}
395
}
@@ -398,8 +420,8 @@ class Main
398
$handle = trim($handle);
399
400
// Special Action for 'jquery-migrate' handler as its tied to 'jquery'
401
- if ($handle === 'jquery-migrate' && isset($this->wpScripts['registered']['jquery'])) {
402
- $jQueryRegScript = $this->wpScripts['registered']['jquery'];
403
404
if (isset($jQueryRegScript->deps)) {
405
$jQueryRegScript->deps = array_diff($jQueryRegScript->deps, array('jquery-migrate'));
@@ -423,15 +445,18 @@ class Main
423
return;
424
}
425
426
$nonAssetConfigPage = (! $this->isUpdateable && ! Misc::getShowOnFront());
427
428
// It looks like the page loaded is neither a post, page or the front-page
429
// We'll see if there are assets unloaded globally and unload them
430
$globalUnload = $this->globalUnloaded;
431
432
if (! empty($globalUnload['styles']) && $nonAssetConfigPage) {
433
$list = $globalUnload['styles'];
434
- } else {
435
// Post, Page, Front-page and more (if the Premium Extension is activated)
436
$toRemove = $this->getAssetsUnloaded();
437
@@ -465,7 +490,9 @@ class Main
465
}
466
467
$list = array_unique($list);
468
}
469
470
// Any bulk unloaded styles for 'category', 'post_tag' and more?
471
// If the premium extension is enabled, any of the unloaded CSS will be added to the list
@@ -484,21 +511,24 @@ class Main
484
return;
485
}
486
487
- global $wp_styles;
488
489
- // Only fill it once
490
- if (empty($this->wpStyles)) {
491
- $this->wpStyles = (array)$wp_styles;
492
493
- if (! empty($this->wpStyles) && isset($this->wpStyles['registered'])) {
494
- $i = 1;
495
496
- foreach ($this->wpStyles['registered'] as $handle => $value) {
497
- $this->wpStyles['registered'][$handle]->wpacu_pos = $i;
498
- $i++;
499
- }
500
- }
501
- }
502
503
foreach ($list as $handle) {
504
$handle = trim($handle);
@@ -546,12 +576,12 @@ class Main
546
WPACU_PLUGIN_NAME . '_front_page_load_exceptions'
547
);
548
} elseif (Main::wpacuProEnabled() && $type == 'for_pro') {
549
- // [@pro]
550
if (class_exists( '\\WpAssetCleanUpPro\\LoadExceptions' )) {
551
$ExceptionsPro = new \WpAssetCleanUpPro\LoadExceptions();
552
$exceptionsListJson = $ExceptionsPro->getLoadExceptions();
553
}
554
- // [/@pro]
555
}
556
557
if ($exceptionsListJson) {
@@ -579,20 +609,11 @@ class Main
579
public function getGlobalUnload()
580
{
581
$existingListEmpty = array('styles' => array(), 'scripts' => array());
582
583
- $existingListJson = get_option(WPACU_PLUGIN_NAME.'_global_unload');
584
585
- if (! $existingListJson) {
586
- return $existingListEmpty;
587
- }
588
-
589
- $existingList = json_decode($existingListJson, true);
590
-
591
- if (json_last_error() != JSON_ERROR_NONE) {
592
- $existingList = $existingListEmpty;
593
- }
594
-
595
- return $existingList;
596
}
597
598
/**
@@ -671,8 +692,8 @@ class Main
671
// located in $this->wpScripts and $this->wpStyles
672
// We will add it to the list as they will be marked
673
674
- $stylesBeforeUnload = $this->wpStyles;
675
- $scriptsBeforeUnload = $this->wpScripts;
676
677
global $wp_scripts, $wp_styles;
678
@@ -710,9 +731,9 @@ class Main
710
}
711
}
712
713
- // [@pro]
714
$currentUnloadedAll = apply_filters('wpacu_pro_filter_all_bulk_unloads', $currentUnloadedAll);
715
- // [/@pro]
716
717
/*
718
* Style List
@@ -822,7 +843,9 @@ class Main
822
'bulk_unloaded' => array('post_type' => array())
823
);
824
825
if ($this->isUpdateable) {
826
$data['current'] = $currentUnloaded;
827
828
$data['all']['scripts'] = $list['scripts'];
@@ -839,21 +862,23 @@ class Main
839
840
$data['global_unload'] = $this->globalUnloaded;
841
842
- if (Misc::getShowOnFront()) {
843
$type = 'front_page';
844
} elseif ($this->getCurrentPostId() > 0) {
845
$type = 'post';
846
} else {
847
- // [@pro]
848
// $this->getCurrentPostId() would be 0
849
$type = 'for_pro';
850
- // [/@pro]
851
}
852
853
$data['load_exceptions'] = $this->getLoadExceptions($type, $this->getCurrentPostId());
854
} else {
855
$data['is_updateable'] = false;
856
}
857
858
$data['is_woocommerce_shop_page'] = $this->isWooCommerceShopPage;
859
@@ -878,11 +903,11 @@ class Main
878
$data = $this->setPageTemplate($data);
879
}
880
881
- // [@pro]
882
// If the premium extension is enabled, it will also pull the other bulk unloads
883
// such as 'taxonomy', 'author' etc.
884
$data = apply_filters('wpacu_pro_get_bulk_unloads', $data);
885
- // [/@pro]
886
887
$data['total_styles'] = (! empty($data['all']['styles'])) ? count($data['all']['styles']) : false;
888
$data['total_scripts'] = (! empty($data['all']['scripts'])) ? count($data['all']['scripts']) : false;
@@ -902,7 +927,7 @@ class Main
902
903
/**
904
* @param $name
905
- * @param array $data
906
* @param bool|false $echo
907
* @return bool|string
908
*/
@@ -1009,10 +1034,10 @@ class Main
1009
}
1010
}
1011
1012
- // [@pro]
1013
// If the pro version is used, it will also pull the other bulk unloads such as 'taxonomy', 'author' etc.
1014
$data = apply_filters('wpacu_pro_get_bulk_unloads', $data);
1015
- // [/@pro]
1016
1017
// For debug purposes
1018
//unset($data['contents']); echo '<pre>'; print_r($data); exit;
@@ -1021,9 +1046,9 @@ class Main
1021
if ($postId > 0) {
1022
$type = 'post';
1023
} elseif (isset($_POST['tag_id']) && $_POST['tag_id']) {
1024
- // [@pro]
1025
$type = 'for_pro';
1026
- // [/@pro]
1027
} elseif($postId == 0) {
1028
$type = 'front_page';
1029
}
@@ -1196,11 +1221,11 @@ class Main
1196
$this->assetsRemoved = get_post_meta($postId, '_' . WPACU_PLUGIN_NAME . '_no_load', true);
1197
}
1198
1199
- // [@pro]
1200
// Premium Extension: Filter assets for pages such as category, tag, author, dates etc.
1201
// Retrieves "per page" list of unloaded CSS and JavaScript
1202
$this->assetsRemoved = apply_filters('wpacu_pro_get_assets_unloaded', $this->assetsRemoved);
1203
- // [/@pro]
1204
1205
@json_decode($this->assetsRemoved);
1206
@@ -1272,6 +1297,8 @@ class Main
1272
$this->currentPostId = isset($post->ID) ? $post->ID : 0;
1273
}
1274
1275
// Undetectable? The page is not a singular one nor the home page
1276
// It's likely an archive, category page (WooCommerce), 404 page etc.
1277
if (! $this->currentPostId && ! Misc::isHomePage()) {
@@ -1286,6 +1313,8 @@ class Main
1286
}
1287
}
1288
1289
return $this->currentPostId;
1290
}
1291
@@ -1406,13 +1435,42 @@ class Main
1406
return (is_search() && (! (function_exists('is_shop') && is_shop())));
1407
}
1408
1409
/**
1410
* @return bool
1411
*/
1412
public function wpacuProEnabled()
1413
{
1414
- // [@pro]
1415
return (defined('WPACU_PRO_PLUGIN_FILE'));
1416
- // [/@pro]
1417
}
1418
}
44
*/
45
public $fetchUrl;
46
47
+ // [wpacu_lite]
48
/**
49
* @var
50
*/
51
public $isUpdateable = true;
52
+ // [/wpacu_lite]
53
54
/**
55
* @var bool
99
/**
100
* @var array
101
*/
102
+ public $wpAllScripts = array();
103
104
/**
105
* @var array
106
*/
107
+ public $wpAllStyles = array();
108
+
109
+ /**
110
+ * @var int
111
+ */
112
+ public $lastScriptPos = 1;
113
+
114
+ /**
115
+ * @var int
116
+ */
117
+ public $lastStylePos = 1;
118
119
/**
120
* @var array
244
if (! isset($_REQUEST[WPACU_PLUGIN_NAME.'_load'])) {
245
$this->globalUnloaded = $this->getGlobalUnload();
246
247
+ // [wpacu_lite]
248
if (! $this->isUpdateable && ! Misc::isHomePage()) {
249
return;
250
}
251
+ // [/wpacu_lite]
252
253
$getCurrentPost = $this->getCurrentPost();
254
333
return;
334
}
335
336
+ // [wpacu_lite]
337
$nonAssetConfigPage = (! $this->isUpdateable && ! Misc::getShowOnFront());
338
+ // [/wpacu_lite]
339
340
// It looks like the page loaded is neither a post, page or the front-page
341
// We'll see if there are assets unloaded globally and unload them
342
$globalUnload = $this->globalUnloaded;
343
344
+ // [wpacu_lite]
345
+ if (! empty($globalUnload['scripts']) && $nonAssetConfigPage) {
346
$list = $globalUnload['scripts'];
347
+ } else { // [/wpacu_lite]
348
+ // Post, Page or Front-page?
349
$toRemove = $this->getAssetsUnloaded();
350
351
$jsonList = @json_decode($toRemove);
378
}
379
380
$list = array_unique($list);
381
+ // [wpacu_lite]
382
+ }
383
+ // [/wpacu_lite]
384
385
$list = apply_filters('wpacu_filter_scripts', $list);
386
393
}
394
}
395
396
+ // Nothing to unload
397
if (empty($list)) {
398
return;
399
}
400
401
global $wp_scripts;
402
403
+ $allScripts = $wp_scripts;
404
405
+ if (! empty($allScripts) && isset($allScripts->registered)) {
406
+ $i = $this->lastScriptPos;
407
408
+ foreach ($allScripts->registered as $handle => $value) {
409
+ // This could be triggered several times, check if the script already exists
410
+ if (! isset($this->wpAllScripts['registered'][$handle])) {
411
+ $this->wpAllScripts['registered'][$handle] = $value;
412
+ $this->wpAllScripts['registered'][$handle]->wpacu_pos = $i;
413
+ $this->lastScriptPos = $i;
414
+ $i++;
415
}
416
}
417
}
420
$handle = trim($handle);
421
422
// Special Action for 'jquery-migrate' handler as its tied to 'jquery'
423
+ if ($handle === 'jquery-migrate' && isset($this->wpAllScripts['registered']['jquery'])) {
424
+ $jQueryRegScript = $this->wpAllScripts['registered']['jquery'];
425
426
if (isset($jQueryRegScript->deps)) {
427
$jQueryRegScript->deps = array_diff($jQueryRegScript->deps, array('jquery-migrate'));
445
return;
446
}
447
448
+ // [wpacu_lite]
449
$nonAssetConfigPage = (! $this->isUpdateable && ! Misc::getShowOnFront());
450
+ // [/wpacu_lite]
451
452
// It looks like the page loaded is neither a post, page or the front-page
453
// We'll see if there are assets unloaded globally and unload them
454
$globalUnload = $this->globalUnloaded;
455
456
+ // [wpacu_lite]
457
if (! empty($globalUnload['styles']) && $nonAssetConfigPage) {
458
$list = $globalUnload['styles'];
459
+ } else { // [/wpacu_lite]
460
// Post, Page, Front-page and more (if the Premium Extension is activated)
461
$toRemove = $this->getAssetsUnloaded();
462
490
}
491
492
$list = array_unique($list);
493
+ // [wpacu_lite]
494
}
495
+ // [/wpacu_lite]
496
497
// Any bulk unloaded styles for 'category', 'post_tag' and more?
498
// If the premium extension is enabled, any of the unloaded CSS will be added to the list
511
return;
512
}
513
514
+ global $wp_styles;
515
516
+ $allStyles = $wp_styles;
517
518
+ if (! empty($allStyles) && isset($allStyles->registered)) {
519
+ $i = $this->lastStylePos;
520
521
+ foreach ($allStyles->registered as $handle => $value) {
522
+ // This could be triggered several times, check if the style already exists
523
+ if (! isset($this->wpAllStyles['registered'][$handle])) {
524
+ $this->wpAllStyles['registered'][$handle] = $value;
525
+ $this->wpAllStyles['registered'][$handle]->wpacu_pos = $i;
526
+
527
+ $this->lastStylePos = $i;
528
+ $i++;
529
+ }
530
+ }
531
+ }
532
533
foreach ($list as $handle) {
534
$handle = trim($handle);
576
WPACU_PLUGIN_NAME . '_front_page_load_exceptions'
577
);
578
} elseif (Main::wpacuProEnabled() && $type == 'for_pro') {
579
+ // [wpacu_pro]
580
if (class_exists( '\\WpAssetCleanUpPro\\LoadExceptions' )) {
581
$ExceptionsPro = new \WpAssetCleanUpPro\LoadExceptions();
582
$exceptionsListJson = $ExceptionsPro->getLoadExceptions();
583
}
584
+ // [/wpacu_pro]
585
}
586
587
if ($exceptionsListJson) {
609
public function getGlobalUnload()
610
{
611
$existingListEmpty = array('styles' => array(), 'scripts' => array());
612
+ $existingListJson = get_option(WPACU_PLUGIN_NAME.'_global_unload');
613
614
+ $existingListData = $this->existingList($existingListJson, $existingListEmpty);
615
616
+ return $existingListData['list'];
617
}
618
619
/**
692
// located in $this->wpScripts and $this->wpStyles
693
// We will add it to the list as they will be marked
694
695
+ $stylesBeforeUnload = $this->wpAllStyles;
696
+ $scriptsBeforeUnload = $this->wpAllScripts;
697
698
global $wp_scripts, $wp_styles;
699
731
}
732
}
733
734
+ // [wpacu_pro]
735
$currentUnloadedAll = apply_filters('wpacu_pro_filter_all_bulk_unloads', $currentUnloadedAll);
736
+ // [/wpacu_pro]
737
738
/*
739
* Style List
843
'bulk_unloaded' => array('post_type' => array())
844
);
845
846
+ // [wpacu_lite]
847
if ($this->isUpdateable) {
848
+ // [/wpacu_lite]
849
$data['current'] = $currentUnloaded;
850
851
$data['all']['scripts'] = $list['scripts'];
862
863
$data['global_unload'] = $this->globalUnloaded;
864
865
+ if (Misc::isHomePage()) {
866
$type = 'front_page';
867
} elseif ($this->getCurrentPostId() > 0) {
868
$type = 'post';
869
} else {
870
+ // [wpacu_pro]
871
// $this->getCurrentPostId() would be 0
872
$type = 'for_pro';
873
+ // [/wpacu_pro]
874
}
875
876
$data['load_exceptions'] = $this->getLoadExceptions($type, $this->getCurrentPostId());
877
+ // [wpacu_lite]
878
} else {
879
$data['is_updateable'] = false;
880
}
881
+ // [/wpacu_lite]
882
883
$data['is_woocommerce_shop_page'] = $this->isWooCommerceShopPage;
884
903
$data = $this->setPageTemplate($data);
904
}
905
906
+ // [wpacu_pro]
907
// If the premium extension is enabled, it will also pull the other bulk unloads
908
// such as 'taxonomy', 'author' etc.
909
$data = apply_filters('wpacu_pro_get_bulk_unloads', $data);
910
+ // [/wpacu_pro]
911
912
$data['total_styles'] = (! empty($data['all']['styles'])) ? count($data['all']['styles']) : false;
913
$data['total_scripts'] = (! empty($data['all']['scripts'])) ? count($data['all']['scripts']) : false;
927
928
/**
929
* @param $name
930
+ * @param array $data (if present $data values are used within the included template)
931
* @param bool|false $echo
932
* @return bool|string
933
*/
1034
}
1035
}
1036
1037
+ // [wpacu_pro]
1038
// If the pro version is used, it will also pull the other bulk unloads such as 'taxonomy', 'author' etc.
1039
$data = apply_filters('wpacu_pro_get_bulk_unloads', $data);
1040
+ // [/wpacu_pro]
1041
1042
// For debug purposes
1043
//unset($data['contents']); echo '<pre>'; print_r($data); exit;
1046
if ($postId > 0) {
1047
$type = 'post';
1048
} elseif (isset($_POST['tag_id']) && $_POST['tag_id']) {
1049
+ // [wpacu_pro]
1050
$type = 'for_pro';
1051
+ // [/wpacu_pro]
1052
} elseif($postId == 0) {
1053
$type = 'front_page';
1054
}
1221
$this->assetsRemoved = get_post_meta($postId, '_' . WPACU_PLUGIN_NAME . '_no_load', true);
1222
}
1223
1224
+ // [wpacu_pro]
1225
// Premium Extension: Filter assets for pages such as category, tag, author, dates etc.
1226
// Retrieves "per page" list of unloaded CSS and JavaScript
1227
$this->assetsRemoved = apply_filters('wpacu_pro_get_assets_unloaded', $this->assetsRemoved);
1228
+ // [/wpacu_pro]
1229
1230
@json_decode($this->assetsRemoved);
1231
1297
$this->currentPostId = isset($post->ID) ? $post->ID : 0;
1298
}
1299
1300
+ // [wpacu_lite]
1301
+
1302
// Undetectable? The page is not a singular one nor the home page
1303
// It's likely an archive, category page (WooCommerce), 404 page etc.
1304
if (! $this->currentPostId && ! Misc::isHomePage()) {
1313
}
1314
}
1315
1316
+ // [/wpacu_lite]
1317
+
1318
return $this->currentPostId;
1319
}
1320
1435
return (is_search() && (! (function_exists('is_shop') && is_shop())));
1436
}
1437
1438
+ /**
1439
+ * @param $existingListJson
1440
+ * @param $existingListEmpty
1441
+ *
1442
+ * @return array
1443
+ */
1444
+ public function existingList($existingListJson, $existingListEmpty)
1445
+ {
1446
+ $validJson = $notEmpty = true;
1447
+
1448
+ if (! $existingListJson) {
1449
+ $existingList = $existingListEmpty;
1450
+ $notEmpty = false;
1451
+ } else {
1452
+ $existingList = json_decode($existingListJson, true);
1453
+
1454
+ if (json_last_error() != JSON_ERROR_NONE) {
1455
+ $validJson = false;
1456
+ $existingList = $existingListEmpty;
1457
+ }
1458
+ }
1459
+
1460
+ return array(
1461
+ 'list' => $existingList,
1462
+ 'valid_json' => $validJson,
1463
+ 'not_empty' => $notEmpty
1464
+ );
1465
+ }
1466
+
1467
+ // [wpacu_pro]
1468
/**
1469
* @return bool
1470
*/
1471
public function wpacuProEnabled()
1472
{
1473
return (defined('WPACU_PRO_PLUGIN_FILE'));
1474
}
1475
+ // [/wpacu_pro]
1476
}
classes/OwnAssets.php CHANGED
@@ -147,18 +147,31 @@ class OwnAssets
147
// It can also be the front page URL
148
$pageUrl = Misc::getPageUrl($postId);
149
150
wp_localize_script(
151
WPACU_PLUGIN_NAME . '-script',
152
'wpacu_object',
153
- apply_filters('wpacu_object_data', array(
154
- 'plugin_name' => WPACU_PLUGIN_NAME,
155
- 'dom_get_type' => Main::$domGetType,
156
- 'start_del' => Main::START_DEL,
157
- 'end_del' => Main::END_DEL,
158
- 'ajax_url' => admin_url('admin-ajax.php'),
159
- 'post_id' => $postId, // if any
160
- 'page_url' => $pageUrl // post, page, custom post type, homepage etc.
161
- ))
162
);
163
164
wp_enqueue_script(WPACU_PLUGIN_NAME . '-script');
@@ -219,8 +232,8 @@ class OwnAssets
219
{
220
if ((!$this->isTaxonomyEditPage)
221
&& Main::instance()->wpacuProEnabled()
222
- && class_exists('\\WpAssetCleanUpPro\\Main')) {
223
- $mainPro = new \WpAssetCleanUpPro\Main();
224
$this->isTaxonomyEditPage = $mainPro->isTaxonomyEditPage();
225
}
226
147
// It can also be the front page URL
148
$pageUrl = Misc::getPageUrl($postId);
149
150
+ $wpacuObjectData = array(
151
+ 'plugin_name' => WPACU_PLUGIN_NAME,
152
+ 'dom_get_type' => Main::$domGetType,
153
+ 'start_del' => Main::START_DEL,
154
+ 'end_del' => Main::END_DEL,
155
+ 'ajax_url' => admin_url('admin-ajax.php'),
156
+ 'post_id' => $postId, // if any
157
+ 'page_url' => $pageUrl // post, page, custom post type, homepage etc.
158
+ );
159
+
160
+ $wpacuObjectData['jquery_migration_disable_confirm_msg'] = __(
161
+ 'Make sure to properly test your website if you unload the jQuery migration library.'."\n\n".
162
+ 'In some cases, due to old jQuery code triggered from plugins or the theme, unloading this migration library could cause those scripts not to function anymore and break some of the front-end functionality.'."\n\n".
163
+ 'If you are not sure about whether activating this option is right or not, it is better to leave it as it is (to be loaded by default) and consult with a developer.'."\n\n".
164
+ 'Confirm this action to enable the unloading or cancel to leave it loaded by default.', WPACU_PLUGIN_NAME);
165
+
166
+ $wpacuObjectData['comment_reply_disable_confirm_msg'] = __(
167
+ 'This is worth disabling if you are NOT using the default WordPress comment system (e.g. you are using the website for business purposes, to showcase your products and you are not using it as a blog where people leave comments to your posts).'."\n\n".
168
+ 'If you are not sure about whether activating this option is right or not, it is better to leave it as it is (to be loaded by default).'."\n\n".
169
+ 'Confirm this action to enable the unloading or cancel to leave it loaded by default.', WPACU_PLUGIN_NAME);
170
+
171
wp_localize_script(
172
WPACU_PLUGIN_NAME . '-script',
173
'wpacu_object',
174
+ apply_filters('wpacu_object_data', $wpacuObjectData)
175
);
176
177
wp_enqueue_script(WPACU_PLUGIN_NAME . '-script');
232
{
233
if ((!$this->isTaxonomyEditPage)
234
&& Main::instance()->wpacuProEnabled()
235
+ && class_exists( '\\WpAssetCleanUpPro\\MainPro' )) {
236
+ $mainPro = new \WpAssetCleanUpPro\MainPro();
237
$this->isTaxonomyEditPage = $mainPro->isTaxonomyEditPage();
238
}
239
classes/Settings.php CHANGED
@@ -57,7 +57,7 @@ class Settings
57
if ($settings['dashboard_show'] != 1 && $settings['frontend_show'] != 1) {
58
?>
59
<div class="notice notice-warning">
60
- <p><span style="color: #ffb900;" class="dashicons dashicons-info"></span>&nbsp;<?php _e('It looks like you have both "Manage in the Dashboard?" and "Manage in the Front-end?" inactive. The plugin works fine with any settings that were applied. However, if you want to manage the assets in any page, you need to have at least one of them active.', WPACU_PLUGIN_NAME); ?></p>
61
</div>
62
<?php
63
}
57
if ($settings['dashboard_show'] != 1 && $settings['frontend_show'] != 1) {
58
?>
59
<div class="notice notice-warning">
60
+ <p><span style="color: #ffb900;" class="dashicons dashicons-info"></span>&nbsp;<?php _e('It looks like you have both "Manage in the Dashboard?" and "Manage in the Front-end?" inactive. The plugin still works fine and any assets you have selected for unload are not loaded. However, if you want to manage the assets in any page, you need to have at least one of the view options enabled.', WPACU_PLUGIN_NAME); ?></p>
61
</div>
62
<?php
63
}
classes/Update.php CHANGED
@@ -38,6 +38,7 @@ class Update
38
}
39
40
/**
41
* Priority: 9 (AFTER current post ID is correctly retrieved and BEFORE the data from the database is fetched)
42
* Form was submitted in the frontend view (not Dashboard) from a singular page, front-page etc.
43
*/
@@ -80,6 +81,7 @@ class Update
80
$this->frontEndUpdateTriggered = true;
81
82
// Form submitted from the homepage
83
if (Misc::isHomePage() && ! ($postId > 0)) {
84
$wpacuNoLoadAssets = isset($_POST[WPACU_PLUGIN_NAME])
85
? $_POST[WPACU_PLUGIN_NAME] : array();
@@ -89,17 +91,17 @@ class Update
89
}
90
91
// Form submitted from a Singular Page
92
- // e.g. post, page, custom post type such as 'product' page from WooCommerce
93
if ($postId > 0) {
94
$post = get_post($postId);
95
$this->savePost($post->ID, $post);
96
return;
97
}
98
99
- // [@pro]
100
// Form Submitted from a page such as taxonomy (e.g. 'category'), author page, 404 page, search page etc.
101
do_action('wpacu_pro_frontend_update');
102
- // [/@pro]
103
}
104
105
/**
@@ -139,7 +141,7 @@ class Update
139
global $post;
140
}
141
142
- if (! isset($post->ID)) {
143
return;
144
}
145
@@ -244,12 +246,10 @@ class Update
244
delete_post_meta($postId, '_' . WPACU_PLUGIN_NAME . '_load_exceptions');
245
} elseif ($type == 'front_page') {
246
delete_option(WPACU_PLUGIN_NAME . '_front_page_load_exceptions');
247
- } elseif ($type == 'for_pro') {
248
- // [@pro]
249
- // Premium Extensions: Clear existing list for pages like: taxonomy, 404, search, date etc.
250
do_action( 'wpacu_pro_clear_load_exceptions' );
251
- // [/@pro]
252
- }
253
254
if (! $isPostOptionStyles && ! $isPostOptionScripts) {
255
return;
@@ -311,12 +311,10 @@ class Update
311
}
312
} elseif ($type == 'front_page') {
313
update_option(WPACU_PLUGIN_NAME . '_front_page_load_exceptions', $jsonLoadExceptions);
314
- } elseif ($type == 'for_pro') {
315
- // [@pro]
316
- // Premium Extensions: Update any load extensions for pages like: taxonomy, 404, search, date etc.
317
do_action( 'wpacu_pro_update_load_exceptions', $jsonLoadExceptions );
318
- // [/@pro]
319
- }
320
}
321
}
322
@@ -359,15 +357,8 @@ class Update
359
// Default list as array
360
$existingListEmpty = array('styles' => array(), 'scripts' => array());
361
362
- if (! $existingListJson) {
363
- $existingList = $existingListEmpty;
364
- } else {
365
- $existingList = json_decode($existingListJson, true);
366
-
367
- if (json_last_error() != JSON_ERROR_NONE) {
368
- $existingList = $existingListEmpty;
369
- }
370
- }
371
372
// Append to the list anything from the POST (if any)
373
if (! empty($reqStyles)) {
@@ -386,10 +377,7 @@ class Update
386
$existingList['styles'] = array_unique($existingList['styles']);
387
$existingList['scripts'] = array_unique($existingList['scripts']);
388
389
- update_option(
390
- WPACU_PLUGIN_NAME.'_global_unload',
391
- json_encode($existingList)
392
- );
393
}
394
395
/**
@@ -451,10 +439,7 @@ class Update
451
}
452
453
if ($isUpdated) {
454
- update_option(
455
- WPACU_PLUGIN_NAME . '_global_unload',
456
- json_encode($existingList)
457
- );
458
}
459
}
460
@@ -490,15 +475,8 @@ class Update
490
'scripts' => array('post_type' => array($postType => array()))
491
);
492
493
- if (! $existingListJson) {
494
- $existingList = $existingListEmpty;
495
- } else {
496
- $existingList = json_decode($existingListJson, true);
497
-
498
- if (json_last_error() != JSON_ERROR_NONE) {
499
- $existingList = $existingListEmpty;
500
- }
501
- }
502
503
// Append to the list anything from the POST (if any)
504
// Make sure all entries are unique (no handle duplicates)
@@ -532,13 +510,11 @@ class Update
532
}
533
}
534
535
- update_option(
536
- WPACU_PLUGIN_NAME.'_bulk_unload',
537
- json_encode($existingList)
538
- );
539
}
540
541
/**
542
* @param string $postType
543
* @return bool
544
*/
@@ -555,27 +531,33 @@ class Update
555
}
556
}
557
558
- $stylesList = isset($_POST['wpacu_options_post_type_styles'])
559
- ? $_POST['wpacu_options_post_type_styles'] : array();
560
561
- $scriptsList = isset($_POST['wpacu_options_post_type_scripts'])
562
- ? $_POST['wpacu_options_post_type_scripts'] : array();
563
564
$removeStylesList = $removeScriptsList = array();
565
566
$isUpdated = false;
567
568
if (! empty($stylesList)) {
569
- foreach ($stylesList as $handle => $value) {
570
- if ($value == 'remove') {
571
$removeStylesList[] = $handle;
572
}
573
}
574
}
575
576
if (! empty($scriptsList)) {
577
- foreach ($scriptsList as $handle => $value) {
578
- if ($value == 'remove') {
579
$removeScriptsList[] = $handle;
580
}
581
}
@@ -611,10 +593,7 @@ class Update
611
}
612
}
613
614
- update_option(
615
- WPACU_PLUGIN_NAME.'_bulk_unload',
616
- json_encode($existingList)
617
- );
618
}
619
620
return $isUpdated;
38
}
39
40
/**
41
+ * TODO: Remove priority later on as it's not needed anymore because there is a redirect after form submit
42
* Priority: 9 (AFTER current post ID is correctly retrieved and BEFORE the data from the database is fetched)
43
* Form was submitted in the frontend view (not Dashboard) from a singular page, front-page etc.
44
*/
81
$this->frontEndUpdateTriggered = true;
82
83
// Form submitted from the homepage
84
+ // e.g. from a page such as latest blog posts, not a static page that was selected as home page)
85
if (Misc::isHomePage() && ! ($postId > 0)) {
86
$wpacuNoLoadAssets = isset($_POST[WPACU_PLUGIN_NAME])
87
? $_POST[WPACU_PLUGIN_NAME] : array();
91
}
92
93
// Form submitted from a Singular Page
94
+ // e.g. post, page, custom post type such as 'product' page from WooCommerce, home page (static page selected as front page)
95
if ($postId > 0) {
96
$post = get_post($postId);
97
$this->savePost($post->ID, $post);
98
return;
99
}
100
101
+ // [wpacu_pro]
102
// Form Submitted from a page such as taxonomy (e.g. 'category'), author page, 404 page, search page etc.
103
do_action('wpacu_pro_frontend_update');
104
+ // [/wpacu_pro]
105
}
106
107
/**
141
global $post;
142
}
143
144
+ if (! isset($post->ID) || ! isset($post->post_type)) {
145
return;
146
}
147
246
delete_post_meta($postId, '_' . WPACU_PLUGIN_NAME . '_load_exceptions');
247
} elseif ($type == 'front_page') {
248
delete_option(WPACU_PLUGIN_NAME . '_front_page_load_exceptions');
249
+ } /* [wpacu_pro] */ elseif ($type == 'for_pro') {
250
+ // Clear existing list for pages like: taxonomy, 404, search, date etc.
251
do_action( 'wpacu_pro_clear_load_exceptions' );
252
+ } /* [/wpacu_pro] */
253
254
if (! $isPostOptionStyles && ! $isPostOptionScripts) {
255
return;
311
}
312
} elseif ($type == 'front_page') {
313
update_option(WPACU_PLUGIN_NAME . '_front_page_load_exceptions', $jsonLoadExceptions);
314
+ } /* [wpacu_pro] */ elseif ($type == 'for_pro') {
315
+ // Update any load extensions for pages like: taxonomy, 404, search, date etc.
316
do_action( 'wpacu_pro_update_load_exceptions', $jsonLoadExceptions );
317
+ } /* [/wpacu_pro] */
318
}
319
}
320
357
// Default list as array
358
$existingListEmpty = array('styles' => array(), 'scripts' => array());
359
360
+ $existingListData = Main::instance()->existingList($existingListJson, $existingListEmpty);
361
+ $existingList = $existingListData['list'];
362
363
// Append to the list anything from the POST (if any)
364
if (! empty($reqStyles)) {
377
$existingList['styles'] = array_unique($existingList['styles']);
378
$existingList['scripts'] = array_unique($existingList['scripts']);
379
380
+ update_option(WPACU_PLUGIN_NAME.'_global_unload', json_encode($existingList));
381
}
382
383
/**
439
}
440
441
if ($isUpdated) {
442
+ update_option(WPACU_PLUGIN_NAME . '_global_unload', json_encode($existingList));
443
}
444
}
445
475
'scripts' => array('post_type' => array($postType => array()))
476
);
477
478
+ $existingListData = Main::instance()->existingList($existingListJson, $existingListEmpty);
479
+ $existingList = $existingListData['list'];
480
481
// Append to the list anything from the POST (if any)
482
// Make sure all entries are unique (no handle duplicates)
510
}
511
}
512
513
+ update_option(WPACU_PLUGIN_NAME.'_bulk_unload', json_encode($existingList));
514
}
515
516
/**
517
+ * Lite Version: For post, pages, custom post types
518
* @param string $postType
519
* @return bool
520
*/
531
}
532
}
533
534
+ $bulkType = 'post_type';
535
+
536
+ $stylesList = isset($_POST['wpacu_options_'.$bulkType.'_styles'])
537
+ ? $_POST['wpacu_options_'.$bulkType.'_styles'] : array();
538
539
+ $scriptsList = isset($_POST['wpacu_options_'.$bulkType.'_scripts'])
540
+ ? $_POST['wpacu_options_'.$bulkType.'_scripts'] : array();
541
+
542
+ if (empty($stylesList) && empty($scriptsList)) {
543
+ return false;
544
+ }
545
546
$removeStylesList = $removeScriptsList = array();
547
548
$isUpdated = false;
549
550
if (! empty($stylesList)) {
551
+ foreach ($stylesList as $handle => $action) {
552
+ if ($action == 'remove') {
553
$removeStylesList[] = $handle;
554
}
555
}
556
}
557
558
if (! empty($scriptsList)) {
559
+ foreach ($scriptsList as $handle => $action) {
560
+ if ($action == 'remove') {
561
$removeScriptsList[] = $handle;
562
}
563
}
593
}
594
}
595
596
+ update_option(WPACU_PLUGIN_NAME.'_bulk_unload', json_encode($existingList));
597
}
598
599
return $isUpdated;
readme.txt CHANGED
@@ -1,17 +1,17 @@
1
- === Asset CleanUp: Page Speed Optimization ===
2
Contributors: gabelivan
3
Tags: speed, pagespeed, page speed, cleanup, remove style, remove script, 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.7.1
8
License: GPLv3
9
License URI: http://www.gnu.org/licenses/gpl.html
10
11
Make your website load FASTER by preventing specific scripts (.JS) & styles (.CSS) from loading on pages/posts and home page. Works best in addition to a cache plugin!
12
13
== Description ==
14
- * Make your web pages load FASTER with **Asset CleanUp: Page Speed Optimization**
15
* Faster page load = Happier Visitors = More Conversions
16
17
There are often times when you are using a theme and a number of plugins which are enabled and run on the same page. However, you don't need to use all of them and to improve the speed of your website and make the HTML source code cleaner (convenient for debugging purposes), it's better to prevent those styles and scripts from loading.
@@ -112,6 +112,10 @@ If that's the case, then it's advisable to consult with a developer (ideally the
112
4. Scripts (.JS) are selected for site-wide unload
113
114
== Changelog ==
115
= 1.2.7.1 =
116
* Removed "@" from printing in the output when using AJAX call to fetch the assets, to avoid conflict with Cloudflare's email protection
117
* Replaced deprecated jQuery's live() with on() to avoid JavaScript error on the front-end in case jQuery Migrate is disabled
1
+ === Asset CleanUp: Page Speed Booster ===
2
Contributors: gabelivan
3
Tags: speed, pagespeed, page speed, cleanup, remove style, remove script, 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.7.2
8
License: GPLv3
9
License URI: http://www.gnu.org/licenses/gpl.html
10
11
Make your website load FASTER by preventing specific scripts (.JS) & styles (.CSS) from loading on pages/posts and home page. Works best in addition to a cache plugin!
12
13
== Description ==
14
+ * Make your web pages load FASTER with **Asset CleanUp: Page Speed Booster**
15
* Faster page load = Happier Visitors = More Conversions
16
17
There are often times when you are using a theme and a number of plugins which are enabled and run on the same page. However, you don't need to use all of them and to improve the speed of your website and make the HTML source code cleaner (convenient for debugging purposes), it's better to prevent those styles and scripts from loading.
112
4. Scripts (.JS) are selected for site-wide unload
113
114
== Changelog ==
115
+ = 1.2.7.2 =
116
+ * Bug Fix: Sometimes, specific scripts were showing up on Dashboard view, but not showing on Front-end view
117
+ * Extra confirmation required when unloading site-wide "jQuery Migrate" and "Comment Reply" from the plugin's settings (to avoid accidental unload)
118
+
119
= 1.2.7.1 =
120
* Removed "@" from printing in the output when using AJAX call to fetch the assets, to avoid conflict with Cloudflare's email protection
121
* Replaced deprecated jQuery's live() with on() to avoid JavaScript error on the front-end in case jQuery Migrate is disabled
templates/_top-area.php CHANGED
@@ -8,9 +8,9 @@ if (! isset($data)) {
8
9
$wpacu_top_area_links = array(
10
'admin.php?page=wpassetcleanup_settings' => array(
11
- 'icon' => '<span class="dashicons dashicons-admin-generic"></span>',
12
- 'title' => 'Settings',
13
- 'page' => 'wpassetcleanup_settings'
14
),
15
'admin.php?page=wpassetcleanup_home_page' => array(
16
'icon' => '<span class="dashicons dashicons-admin-home"></span>',
@@ -28,14 +28,14 @@ $wpacu_top_area_links = array(
28
'page' => 'wpassetcleanup_bulk_unloads'
29
),
30
'admin.php?page=wpassetcleanup_license' => array(
31
- 'icon' => '<span class="dashicons dashicons-awards"></span>',
32
- 'title' => 'License',
33
- 'page' => 'wpassetcleanup_license'
34
),
35
'admin.php?page=wpassetcleanup_get_help' => array(
36
- 'icon' => '<span class="dashicons dashicons-sos"></span>',
37
- 'title' => 'Get Help',
38
- 'page' => 'wpassetcleanup_get_help'
39
),
40
// [wpacu_lite]
41
'admin.php?page=wpassetcleanup_go_pro' => array(
@@ -50,10 +50,6 @@ $wpacu_top_area_links = array(
50
global $current_screen;
51
52
$wpacu_current_page = str_replace(array('asset-cleanup_page_', 'toplevel_page_'), '', $current_screen->base);
53
-
54
- //echo '<pre>'; print_r($current_screen);
55
-
56
- // class="wpacu-tab-current"
57
?>
58
<div class="wpacu-tabs wpacu-tabs-style-topline">
59
<nav>
8
9
$wpacu_top_area_links = array(
10
'admin.php?page=wpassetcleanup_settings' => array(
11
+ 'icon' => '<span class="dashicons dashicons-admin-generic"></span>',
12
+ 'title' => 'Settings',
13
+ 'page' => 'wpassetcleanup_settings'
14
),
15
'admin.php?page=wpassetcleanup_home_page' => array(
16
'icon' => '<span class="dashicons dashicons-admin-home"></span>',
28
'page' => 'wpassetcleanup_bulk_unloads'
29
),
30
'admin.php?page=wpassetcleanup_license' => array(
31
+ 'icon' => '<span class="dashicons dashicons-awards"></span>',
32
+ 'title' => 'License',
33
+ 'page' => 'wpassetcleanup_license'
34
),
35
'admin.php?page=wpassetcleanup_get_help' => array(
36
+ 'icon' => '<span class="dashicons dashicons-sos"></span>',
37
+ 'title' => 'Get Help',
38
+ 'page' => 'wpassetcleanup_get_help'
39
),
40
// [wpacu_lite]
41
'admin.php?page=wpassetcleanup_go_pro' => array(
50
global $current_screen;
51
52
$wpacu_current_page = str_replace(array('asset-cleanup_page_', 'toplevel_page_'), '', $current_screen->base);
53
?>
54
<div class="wpacu-tabs wpacu-tabs-style-topline">
55
<nav>
templates/admin-page-pages-info.php CHANGED
@@ -29,52 +29,52 @@ $availableForPro = '<a href="'.WPACU_PLUGIN_GO_PRO_URL.'" class="go-pro-link-no-
29
</thead>
30
<tbody>
31
<tr>
32
- <td width="17%">Homepage</td>
33
- <td>This could be: your latest posts or a static page ("Pages" type), depending on your configuration from <a target="_blank" href="https://codex.wordpress.org/Settings_Reading_Screen">Dashboard's "Settings" -&gt; "Reading"</a> page. If the home page is not a static page, but it's showing the latest posts (default view), then you can manage its assets from Asset CleanUp's "Homepage" tab above. -&gt; <a href="https://codex.wordpress.org/Settings_Reading_Screen#Reading_Settings">Read more about "Reading Settings" for "Front page displays"</a></td>
34
</tr>
35
<tr>
36
- <td>Posts</td>
37
- <td>Post Type: 'post' (e.g. blog entries) -&gt; <a href="https://codex.wordpress.org/Posts_Screen">read more</a></td>
38
</tr>
39
<tr>
40
- <td>Pages</td>
41
- <td>Post Type: 'page' (e.g. about us, contact) -&gt; <a href="https://codex.wordpress.org/Pages_Screen">read more</a></td>
42
</tr>
43
<tr>
44
- <td>Attachment</td>
45
- <td>Post Type: 'attachment' (e.g. files from <a target="_blank" href="https://codex.wordpress.org/Media_Library_Screen">"Media" -&gt; "Library"</a>, the page loaded usually prints the image or other media type) -&gt; <a href="https://codex.wordpress.org/Edit_Media">read more</a></td>
46
</tr>
47
<tr>
48
- <td>Custom Post Type</td>
49
- <td>Popular examples: 'product' created by WooCommerce, 'download' created by Easy Digital Downloads etc. -&gt; <a href="https://codex.wordpress.org/Post_Types#Custom_Post_Types">read more</a></td>
50
</tr>
51
<tr>
52
- <td>Categories<?php echo $availableForPro; ?></td>
53
- <td>Default Taxonomy (they are found in "Posts" -&gt; "Categories", accessing a category link reveals all the posts from that category) -&gt; <a href="https://codex.wordpress.org/Posts_Categories_Screen">read more</a></td>
54
</tr>
55
<tr>
56
- <td>Tags<?php echo $availableForPro; ?></td>
57
- <td>Default Taxonomy (they are found in "Posts" -&gt; "Tags", accessing a tag link reveals all the posts associated with the tag) -&gt; <a href="https://codex.wordpress.org/Posts_Tags_Screen">read more</a></td>
58
</tr>
59
<tr>
60
- <td>Custom Taxonomy<?php echo $availableForPro; ?></td>
61
- <td>Popular examples: 'product_cat' created by WooCommerce, 'download_category' created by Easy Digital Downloads etc. -&gt; <a href="https://codex.wordpress.org/Taxonomies#Custom_Taxonomies">read more</a></td>
62
</tr>
63
<tr>
64
- <td>Search<?php echo $availableForPro; ?></td>
65
- <td>Default Search Template (search.php -&gt; this is the template that displays the search results; the query parameter "s" is within the URL). If you create a <a href="https://codex.wordpress.org/Creating_a_Search_Page">Search Page</a>, it will belong to the "Pages" page type. <em>The assets can be unloaded in the front-end view ("Manage in the Front-end?" from "Settings" tab has to be enabled).</em></td>
66
</tr>
67
<tr>
68
- <td>Author<?php echo $availableForPro; ?></td>
69
- <td>Shows all posts belonging to a specific author (e.g. https://yourwebsite.com/author/yourname/). <em>The assets can be unloaded only in the front-end view ("Manage in the Front-end?" from "Settings" tab has to be enabled).</em></td>
70
</tr>
71
<tr>
72
- <td>Date<?php echo $availableForPro; ?></td>
73
- <td>Shows all posts based on the chosen date (e.g. https://yourwebsite.com/2018/08/). <em>The assets can be unloaded only in the front-end view ("Manage in the Front-end?" from "Settings" tab has to be enabled).</em></td>
74
</tr>
75
<tr>
76
- <td>404 Not Found<?php echo $availableForPro; ?></td>
77
- <td>This page (404.php within the theme) is reached when a request is not valid. It could be an old link that is not used anymore, the visitor typed the wrong URL to an article etc. (e.g. https://yourwebsite.com/this-is-a-non-existent-page/). <em>The assets can be unloaded only in the front-end view ("Manage in the Front-end?" from "Settings" tab has to be enabled).</em> -&gt; <a href="https://codex.wordpress.org/Creating_an_Error_404_Page">read more</a></td>
78
</tr>
79
</tbody>
80
</table>
29
</thead>
30
<tbody>
31
<tr>
32
+ <td width="17%"><strong>Homepage</strong></td>
33
+ <td>This could be: your latest posts or a static page ("Pages" type), depending on your configuration from <a target="_blank" href="https://codex.wordpress.org/Settings_Reading_Screen">Dashboard's "Settings" &#187; "Reading"</a> page. If the home page is not a static page, but it's showing the latest posts (default view), then you can manage its assets from Asset CleanUp's "Homepage" tab above. &#10230; <a href="https://codex.wordpress.org/Settings_Reading_Screen#Reading_Settings">Read more about "Reading Settings" for "Front page displays"</a></td>
34
</tr>
35
<tr>
36
+ <td><strong>Posts</strong></td>
37
+ <td>Post Type: 'post' (e.g. blog entries) &#10230; <a href="https://codex.wordpress.org/Posts_Screen">read more</a></td>
38
</tr>
39
<tr>
40
+ <td><strong>Pages</strong></td>
41
+ <td>Post Type: 'page' (e.g. about us, contact) &#10230; <a href="https://codex.wordpress.org/Pages_Screen">read more</a></td>
42
</tr>
43
<tr>
44
+ <td><strong>Attachment</strong></td>
45
+ <td>Post Type: 'attachment' (e.g. files from <a target="_blank" href="https://codex.wordpress.org/Media_Library_Screen">"Media" &#187; "Library"</a>, the page loaded usually prints the image or other media type) &#10230; <a href="https://codex.wordpress.org/Edit_Media">read more</a></td>
46
</tr>
47
<tr>
48
+ <td><strong>Custom Post Type</strong></td>
49
+ <td>Popular examples: 'product' created by WooCommerce, 'download' created by Easy Digital Downloads etc. &#10230; <a href="https://codex.wordpress.org/Post_Types#Custom_Post_Types">read more</a></td>
50
</tr>
51
<tr>
52
+ <td><strong>Categories</strong><?php echo $availableForPro; ?></td>
53
+ <td>Default Taxonomy (they are found in "Posts" &#187; "Categories", accessing a category link reveals all the posts from that category) &#10230; <a href="https://codex.wordpress.org/Posts_Categories_Screen">read more</a></td>
54
</tr>
55
<tr>
56
+ <td><strong>Tags</strong><?php echo $availableForPro; ?></td>
57
+ <td>Default Taxonomy (they are found in "Posts" &#187; "Tags", accessing a tag link reveals all the posts associated with the tag) &#10230; <a href="https://codex.wordpress.org/Posts_Tags_Screen">read more</a></td>
58
</tr>
59
<tr>
60
+ <td><strong>Custom Taxonomy</strong><?php echo $availableForPro; ?></td>
61
+ <td>Popular examples: 'product_cat' created by WooCommerce, 'download_category' created by Easy Digital Downloads etc. &#10230; <a href="https://codex.wordpress.org/Taxonomies#Custom_Taxonomies">read more</a></td>
62
</tr>
63
<tr>
64
+ <td><strong>Search</strong><?php echo $availableForPro; ?></td>
65
+ <td>Default Search Template (search.php &#187; this is the template that displays the search results; the query parameter "s" is within the URL). If you create a <a href="https://codex.wordpress.org/Creating_a_Search_Page">Search Page</a>, it will belong to the "Pages" page type. The assets can be unloaded <strong>only in the front-end view</strong> (<em>"Manage in the Front-end?" from "Settings" tab has to be enabled</em>).</td>
66
</tr>
67
<tr>
68
+ <td><strong>Author</strong><?php echo $availableForPro; ?></td>
69
+ <td>Shows all posts belonging to a specific author (e.g. https://yourwebsite.com/author/yourname/). The assets can be unloaded <strong>only in the front-end view</strong> (<em>"Manage in the Front-end?" from "Settings" tab has to be enabled</em>).</td>
70
</tr>
71
<tr>
72
+ <td><strong>Date</strong><?php echo $availableForPro; ?></td>
73
+ <td>Shows all posts based on the chosen date (e.g. https://yourwebsite.com/2018/08/). The assets can be unloaded <strong>only in the front-end view</strong> (<em>"Manage in the Front-end?" from "Settings" tab has to be enabled</em>).</td>
74
</tr>
75
<tr>
76
+ <td><strong>404 Not Found</strong><?php echo $availableForPro; ?></td>
77
+ <td>This page (404.php within the theme) is reached when a request is not valid. It could be an old link that is not used anymore or the visitor typed the wrong URL to an article etc. (e.g. https://yourwebsite.com/this-is-a-non-existent-page.html). The assets can be unloaded <strong>only in the front-end view</strong> (<em>"Manage in the Front-end?" from "Settings" tab has to be enabled</em>). &#10230; <a href="https://codex.wordpress.org/Creating_an_Error_404_Page">read more</a></td>
78
</tr>
79
</tbody>
80
</table>
templates/admin-page-settings-homepage.php CHANGED
@@ -22,7 +22,7 @@ if ($data['wpacu_settings']['dashboard_show'] != 1) {
22
23
if ($data['show_on_front'] === 'page') {
24
?>
25
- <p><?php _e('In "Settings" -&gt; "Reading" you have selected a static page for "Front page displays" setting. To manage the assets (.CSS &amp; .JS) that will NOT LOAD, use the link(s) below:', WPACU_PLUGIN_NAME); ?></p>
26
<div>
27
<ul>
28
<?php
@@ -53,20 +53,21 @@ if ($data['show_on_front'] === 'page') {
53
<form id="wpacu_home_page_form" method="post" action="">
54
<p><?php echo sprintf(__('Your front (home) page URL is <strong>%s</strong>'), $data['site_url']); ?></p>
55
56
- <p><?php _e('Here you can unload assets that are loading on the home page. "Front page displays" (from "Settings" - "Reading") is set to either "Your latest posts" (in "Settings" -&gt; "Reading") OR a special layout (from a theme or plugin) was enabled. When you edit a page/post (e.g. "Posts" -&gt; "All Posts", "Pages" -&gt; "All Pages" etc.), you will see the list inside a meta box.', WPACU_PLUGIN_NAME); ?></p>
57
58
<p>The plugin uses <a target="_blank" href="https://codex.wordpress.org/Function_Reference/is_front_page">is_front_page()</a> and <a href="https://codex.wordpress.org/Conditional_Tags#The_Main_Page">is_home()</a> WordPress functions to check if the visitor is on the home page. Note that the setting will also apply to pages such as <code>/page/2</code> <code>page/3</code> etc. in case the latest blog posts are paginated.</p>
59
60
<div id="wpacu_meta_box_content">
61
<img src="<?php echo admin_url(); ?>/images/spinner.gif" align="top" width="20" height="20" alt="" />&nbsp;
62
<?php _e('We\'re getting the loaded scripts and styles for the home page. Please wait...', WPACU_PLUGIN_NAME); ?>
63
- </div>
64
65
- <p><?php echo sprintf(
66
- __('If you believe fetching the page takes too long and the assets should have loaded by now, I suggest you go to "Settings", make sure "Manage in front-end" is checked and then %smanage the assets in the front-end%s.', WPACU_PLUGIN_NAME),
67
- '<a href="'.$data['site_url'].'#wpacu_wrap_assets">',
68
- '</a>'
69
- ); ?></p>
70
71
<input type="hidden" name="<?php echo $data['nonce_name']; ?>" value="<?php echo $data['nonce_value']; ?>" />
72
<p class="submit"><input type="submit" name="submit" id="submit" class="hidden button button-primary" value="<?php esc_attr_e('Update', WPACU_PLUGIN_NAME); ?>"></p>
22
23
if ($data['show_on_front'] === 'page') {
24
?>
25
+ <p><?php _e('In "Settings" &#187; "Reading" you have selected a static page for "Front page displays" setting. To manage the assets (.CSS &amp; .JS) that will NOT LOAD, use the link(s) below:', WPACU_PLUGIN_NAME); ?></p>
26
<div>
27
<ul>
28
<?php
53
<form id="wpacu_home_page_form" method="post" action="">
54
<p><?php echo sprintf(__('Your front (home) page URL is <strong>%s</strong>'), $data['site_url']); ?></p>
55
56
+ <p><?php _e('Here you can unload assets that are loading on the home page. "Front page displays" (from "Settings" &#187; "Reading") is set to either "Your latest posts" (in "Settings" &#187; "Reading") OR a special layout (from a theme or plugin) was enabled. When you edit a page/post (e.g. "Posts" -&gt; "All Posts", "Pages" -&gt; "All Pages" etc.), you will see the list inside a meta box.', WPACU_PLUGIN_NAME); ?></p>
57
58
<p>The plugin uses <a target="_blank" href="https://codex.wordpress.org/Function_Reference/is_front_page">is_front_page()</a> and <a href="https://codex.wordpress.org/Conditional_Tags#The_Main_Page">is_home()</a> WordPress functions to check if the visitor is on the home page. Note that the setting will also apply to pages such as <code>/page/2</code> <code>page/3</code> etc. in case the latest blog posts are paginated.</p>
59
60
<div id="wpacu_meta_box_content">
61
<img src="<?php echo admin_url(); ?>/images/spinner.gif" align="top" width="20" height="20" alt="" />&nbsp;
62
+
63
<?php _e('We\'re getting the loaded scripts and styles for the home page. Please wait...', WPACU_PLUGIN_NAME); ?>
64
65
+ <p><?php echo sprintf(
66
+ __('If you believe fetching the page takes too long and the assets should have loaded by now, I suggest you go to "Settings", make sure "Manage in front-end" is checked and then %smanage the assets in the front-end%s.', WPACU_PLUGIN_NAME),
67
+ '<a href="'.$data['site_url'].'#wpacu_wrap_assets">',
68
+ '</a>'
69
+ ); ?></p>
70
+ </div>
71
72
<input type="hidden" name="<?php echo $data['nonce_name']; ?>" value="<?php echo $data['nonce_value']; ?>" />
73
<p class="submit"><input type="submit" name="submit" id="submit" class="hidden button button-primary" value="<?php esc_attr_e('Update', WPACU_PLUGIN_NAME); ?>"></p>
templates/meta-box-loaded-assets/_asset-script-rows.php CHANGED
@@ -231,6 +231,29 @@ foreach ($data['all']['scripts'] as $obj) {
231
echo '<p>'.implode(' &nbsp;/&nbsp; ', $extraInfo).'</p>';
232
}
233
?>
234
</td>
235
</tr>
236
<?php
231
echo '<p>'.implode(' &nbsp;/&nbsp; ', $extraInfo).'</p>';
232
}
233
?>
234
+
235
+ <!-- [wpacu_lite] -->
236
+ <?php if (isset($obj->src) && $obj->src != '') { ?>
237
+ <div class="wpacu-script-attributes-area wpacu-lite">
238
+ <p>If loaded (not unloaded by any of the rules above), apply the following attributes: <em><a class="go-pro-link-no-style" href="<?php echo WPACU_PLUGIN_GO_PRO_URL; ?>">* this option is available in Pro version</a></em></p>
239
+
240
+ <ul class="wpacu-script-attributes-settings wpacu-first">
241
+ <li><a class="go-pro-link-no-style" href="<?php echo WPACU_PLUGIN_GO_PRO_URL; ?>"><span class="tooltip wpacu-larger">This feature is available in the premium version of the plugin.<br /> Click here to upgrade to Pro!</span><img width="20" height="20" src="<?php echo WPACU_PLUGIN_URL; ?>/assets/icons/icon-lock.svg" valign="top" alt="" /></a>&nbsp; <strong>async</strong> &#10230;</li>
242
+ <li><label for="async_none_<?php echo $obj->handle; ?>"><input disabled="disabled" id="async_none_<?php echo $obj->handle; ?>" type="radio" name="wpacu_async[<?php echo $obj->handle; ?>]" value="none" />none (default)</label></li>
243
+ <li><label for="async_on_this_page_<?php echo $obj->handle; ?>"><input disabled="disabled" id="async_on_this_page_<?php echo $obj->handle; ?>" type="radio" name="wpacu_async[<?php echo $obj->handle; ?>]" value="on_this_page" />on this page</label></li>
244
+ <li><label for="async_everywhere_<?php echo $obj->handle; ?>"><input disabled="disabled" id="async_everywhere_<?php echo $obj->handle; ?>" type="radio" name="wpacu_async[<?php echo $obj->handle; ?>]" value="everywhere" />everywhere</label></li>
245
+ </ul>
246
+
247
+
248
+ <ul class="wpacu-script-attributes-settings">
249
+ <li><a class="go-pro-link-no-style" href="<?php echo WPACU_PLUGIN_GO_PRO_URL; ?>"><span class="tooltip wpacu-larger">This feature is available in the premium version of the plugin.<br /> Click here to upgrade to Pro!</span><img width="20" height="20" src="<?php echo WPACU_PLUGIN_URL; ?>/assets/icons/icon-lock.svg" valign="top" alt="" /></a>&nbsp; <strong>defer</strong> &#10230;</li>
250
+ <li><label for="defer_none_<?php echo $obj->handle; ?>"><input disabled="disabled" id="defer_none_<?php echo $obj->handle; ?>" type="radio" name="wpacu_defer[<?php echo $obj->handle; ?>]" value="none" />none (default)</label></li>
251
+ <li><label for="defer_on_this_page_<?php echo $obj->handle; ?>"><input disabled="disabled" id="defer_on_this_page_<?php echo $obj->handle; ?>" type="radio" name="wpacu_defer[<?php echo $obj->handle; ?>]" value="on_this_page" />on this page</label></li>
252
+ <li><label for="defer_everywhere_<?php echo $obj->handle; ?>"><input disabled="disabled" id="defer_everywhere_<?php echo $obj->handle; ?>" type="radio" name="wpacu_defer[<?php echo $obj->handle; ?>]" value="everywhere" />everywhere</label></li>
253
+ </ul>
254
+ </div>
255
+ <?php } ?>
256
+ <!-- [/wpacu_lite] -->
257
</td>
258
</tr>
259
<?php
templates/meta-box-loaded-assets/_asset-style-rows.php CHANGED
@@ -185,9 +185,9 @@ foreach ($data['all']['styles'] as $obj) {
185
<?php } ?>
186
187
<?php
188
- // [@pro]
189
do_action('wpacu_pro_bulk_unload_output', $data, $obj, 'css');
190
- // [/@pro]
191
?>
192
193
<ul class="wpacu_asset_options">
185
<?php } ?>
186
187
<?php
188
+ // [wpacu_pro]
189
do_action('wpacu_pro_bulk_unload_output', $data, $obj, 'css');
190
+ // [/wpacu_pro]
191
?>
192
193
<ul class="wpacu_asset_options">
templates/meta-box-loaded-assets/default.php CHANGED
@@ -27,7 +27,7 @@ if (! empty($data['all']['styles'])) {
27
?>
28
<div class="wpacu_note wpacu_warning"><em><?php
29
echo sprintf(
30
- __('Assets that are marked with %s are part of WordPress core files. Be careful if you decide to unload them!', WPACU_PLUGIN_NAME),
31
'<span class="dashicons dashicons-warning"></span>'
32
);
33
?>
@@ -77,7 +77,7 @@ if (! empty($data['all']['scripts'])) {
77
?>
78
<div class="wpacu_note wpacu_warning"><em><?php
79
echo sprintf(
80
- __('Assets that are marked with %s are part of WordPress core files. Be careful if you decide to unload them!', WPACU_PLUGIN_NAME),
81
'<span class="dashicons dashicons-warning"></span>'
82
);
83
?>
27
?>
28
<div class="wpacu_note wpacu_warning"><em><?php
29
echo sprintf(
30
+ __('CSS files that are marked with %s are part of WordPress core files. Be careful if you decide to unload them! If you are not sure what to do, just leave them loaded by default and consult with a developer.', WPACU_PLUGIN_NAME),
31
'<span class="dashicons dashicons-warning"></span>'
32
);
33
?>
77
?>
78
<div class="wpacu_note wpacu_warning"><em><?php
79
echo sprintf(
80
+ __('JavaScript files that are marked with %s are part of WordPress core files. Be careful if you decide to unload them! If you are not sure what to do, just leave them loaded by default and consult with a developer.', WPACU_PLUGIN_NAME),
81
'<span class="dashicons dashicons-warning"></span>'
82
);
83
?>
templates/meta-box-loaded.php CHANGED
@@ -65,12 +65,19 @@ if (! is_404()) {
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
}
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'; } ?>
69
+ Template:</strong>
70
+ <?php
71
+ if (isset($data['all_page_templates'][$data['page_template']])) { ?>
72
+ <u><?php echo $data['all_page_templates'][$data['page_template']]; ?></u>
73
+ <?php } ?>
74
75
+ (<?php echo $data['page_template'];
76
+
77
+ if (isset($data['page_template_path'])) {
78
+ echo '&nbsp; &#10230; &nbsp;<em>'.$data['page_template_path'].'</em>';
79
+ }
80
+ ?>)
81
</div>
82
<?php
83
}
templates/settings-frontend.php CHANGED
@@ -25,14 +25,14 @@ if (! isset($data)) {
25
if (isset($data['vars']['woo_url_not_match'])) {
26
?>
27
<div class="wpacu_note wpacu_warning">
28
- <p>Although this page is detected as the home page, its URL is not the same as the one from "General Settings" -&gt; "Site Address (URL)" and the WooCommerce plugin is not active anymore. This could be the "Shop" page that is no longer active.</p>
29
</div>
30
<?php
31
}
32
33
- // [@pro]
34
do_action('wpacu_pro_frontend_before_asset_list');
35
- // [/@pro]
36
37
require_once 'meta-box-loaded.php';
38
} else {
@@ -69,7 +69,7 @@ if (! isset($data)) {
69
name="submit"><span class="dashicons dashicons-update"></span> <?php esc_attr_e('UPDATE', WPACU_PLUGIN_NAME); ?></button>
70
</div>
71
72
- <p align="right"><small>Powered by Asset CleanUp, version <?php echo WPACU_PLUGIN_VERSION; ?></small></p>
73
<?php } ?>
74
</div>
75
25
if (isset($data['vars']['woo_url_not_match'])) {
26
?>
27
<div class="wpacu_note wpacu_warning">
28
+ <p>Although this page is detected as the home page, its URL is not the same as the one from "General Settings" &#187; "Site Address (URL)" and the WooCommerce plugin is not active anymore. This could be the "Shop" page that is no longer active.</p>
29
</div>
30
<?php
31
}
32
33
+ // [wpacu_pro]
34
do_action('wpacu_pro_frontend_before_asset_list');
35
+ // [/wpacu_pro]
36
37
require_once 'meta-box-loaded.php';
38
} else {
69
name="submit"><span class="dashicons dashicons-update"></span> <?php esc_attr_e('UPDATE', WPACU_PLUGIN_NAME); ?></button>
70
</div>
71
72
+ <p align="right"><small>Powered by Asset CleanUp (lite version), version <?php echo WPACU_PLUGIN_VERSION; ?></small></p>
73
<?php } ?>
74
</div>
75
wpacu.php CHANGED
@@ -1,14 +1,14 @@
1
<?php
2
/*
3
- * Plugin Name: Asset CleanUp: Page Speed Optimization
4
* Plugin URI: https://wordpress.org/plugins/wp-asset-clean-up/
5
- * Version: 1.2.7.1
6
* Description: Prevent Chosen Scripts & Styles from loading in Posts/Pages to reduce HTTP Requests and have the website load faster
7
* Author: Gabriel Livan
8
* Author URI: http://www.gabelivan.com/
9
*/
10
11
- define('WPACU_PLUGIN_VERSION', '1.2.7.1');
12
13
// Exit if accessed directly
14
if (! defined('ABSPATH')) {
@@ -26,20 +26,15 @@ if (defined('WPACU_PRO_NO_LITE_NEEDED') && WPACU_PRO_PLUGIN_VERSION === true) {
26
return;
27
}
28
29
- include_once(ABSPATH . 'wp-admin/includes/plugin.php');
30
-
31
- if (file_exists(dirname(dirname(__FILE__)).'/wp-asset-clean-up-pro/wpacu.php') && is_plugin_active('wp-asset-clean-up-pro/wpacu.php')) {
32
- return;
33
- }
34
-
35
- define('WPACU_PLUGIN_NAME', 'wpassetcleanup');
36
- define('WPACU_PLUGIN_CLASSES_PATH', dirname(__FILE__).'/classes/');
37
- define('WPACU_PLUGIN_FILE', __FILE__);
38
- define('WPACU_PLUGIN_BASE', plugin_basename(WPACU_PLUGIN_FILE));
39
- define('WPACU_PLUGIN_URL', plugins_url('', WPACU_PLUGIN_FILE));
40
41
// Upgrade to Pro Sales Page
42
- define('WPACU_PLUGIN_GO_PRO_URL', 'https://www.gabelivan.com/items/wp-asset-cleanup-pro/');
43
44
// Do not load the plugin if the PHP version is below 5.3
45
$wpacuWrongPhp = version_compare(PHP_VERSION, '5.3.0', '<');
@@ -77,4 +72,4 @@ if (is_admin() && $wpacuWrongPhp) { // Dashboard
77
return;
78
}
79
80
- require_once dirname(WPACU_PLUGIN_FILE).'/wpacu-load.php';
1
<?php
2
/*
3
+ * Plugin Name: Asset CleanUp: Page Speed Booster
4
* Plugin URI: https://wordpress.org/plugins/wp-asset-clean-up/
5
+ * Version: 1.2.7.2
6
* Description: Prevent Chosen Scripts & Styles from loading in Posts/Pages to reduce HTTP Requests and have the website load faster
7
* Author: Gabriel Livan
8
* Author URI: http://www.gabelivan.com/
9
*/
10
11
+ define('WPACU_PLUGIN_VERSION', '1.2.7.2');
12
13
// Exit if accessed directly
14
if (! defined('ABSPATH')) {
26
return;
27
}
28
29
+ define('WPACU_PLUGIN_NAME', 'wpassetcleanup');
30
+ define('WPACU_PLUGIN_FILE', __FILE__);
31
+ define('WPACU_PLUGIN_DIR', dirname(WPACU_PLUGIN_FILE));
32
+ define('WPACU_PLUGIN_CLASSES_PATH', WPACU_PLUGIN_DIR.'/classes/');
33
+ define('WPACU_PLUGIN_BASE', plugin_basename(WPACU_PLUGIN_FILE));
34
+ define('WPACU_PLUGIN_URL', plugins_url('', WPACU_PLUGIN_FILE));
35
36
// Upgrade to Pro Sales Page
37
+ define('WPACU_PLUGIN_GO_PRO_URL', 'https://www.gabelivan.com/items/wp-asset-cleanup-pro/');
38
39
// Do not load the plugin if the PHP version is below 5.3
40
$wpacuWrongPhp = version_compare(PHP_VERSION, '5.3.0', '<');
72
return;
73
}
74
75
+ require_once WPACU_PLUGIN_DIR.'/wpacu-load.php';