Asset CleanUp: Page Speed Booster - Version 1.3.4.3

Version Description

  • New Assets Management Feature: Until now, the list was loaded automatically on edit post, page, custom post type, and taxonomy. You can choose to fetch the list when clicking on a button. This is good when you rarely manage loaded CSS/JS and want to declutter the edit page on load and also save resources as AJAX calls to the front-end won't be made to retrieve the assets' list.
  • New Feature: Cache Dynamic Loaded CSS & JavaScript to avoid loading the whole WP environment and save resources on each request (e.g. /?custom-css=value_here or /wp-content/plugins/plugin-name-here/js/generate-script-output.php?ver=1)
  • Reduced the number of database queries to fetch cached information making the pages preload faster (when the caching is rebuilt) thus reducing the loading time especially if PHP 5.6 is still used (which is slower than PHP 7+ when it deals with database connections).
  • Combine JS files improvement: If there are multiple files that have "defer" or "async" attribute set (or both) and they are not preloaded, then they will be grouped into fewer files; Before, only SCRIPT tags without these attributes were combined
  • Improvement to reduce disk space: Make sure already minified (100%) static .js files aren't cached
  • Google Fonts Optimization: Requests that are for icons (e.g. https://fonts.googleapis.com/icon?family=Material+Icons) are also combined to reduce HTTP requests
  • "Optimize CSS Delivery" from WP Rocket works together with "Inline Chosen CSS Files" from Asset CleanUp Pro
  • Prevent plugin from loading when Themify Builder (iFrame) is used
  • Bug Fix: Sometimes, the position of an asset (HEAD or BODY) is reported incorrectly if it was enqueued in specific action hooks; Extra checks are made to fix that as sometimes developers do not use wp_enqueue_scripts() which is the proper hook to use when enqueuing items that are meant to appear on the front end
  • Bug Fix: If CSS files get inlined, make sure @import without "url" is updated correctly in all situations
  • Bug Fix: In rare cases, managing assets for the Homepage is not working properly. Reason: $post is overwritten by external plugins or the theme because the developers have forgotten to use wp_reset_postdata() and reset it to its initial value (which should be 0 in this case).
Download this release

Release Info

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

Code changes from version 1.3.4.2 to 1.3.4.3

Files changed (40) hide show
  1. assets/script.min.js +1 -1
  2. assets/style.min.css +1 -1
  3. classes/AssetsPagesManager.php +1 -2
  4. classes/CleanUp.php +12 -5
  5. classes/Lite.php +1 -1
  6. classes/Main.php +219 -178
  7. classes/MetaBoxes.php +12 -7
  8. classes/Misc.php +0 -13
  9. classes/OptimiseAssets/CombineCss.php +1 -1
  10. classes/OptimiseAssets/CombineJs.php +44 -19
  11. classes/OptimiseAssets/DynamicLoadedAssets.php +69 -0
  12. classes/OptimiseAssets/FontsGoogle.php +8 -10
  13. classes/OptimiseAssets/FontsGoogleRemove.php +1 -1
  14. classes/OptimiseAssets/MinifyCss.php +3 -50
  15. classes/OptimiseAssets/MinifyJs.php +20 -173
  16. classes/OptimiseAssets/OptimizeCommon.php +186 -70
  17. classes/OptimiseAssets/OptimizeCss.php +123 -83
  18. classes/OptimiseAssets/OptimizeJs.php +94 -34
  19. classes/OwnAssets.php +18 -10
  20. classes/Plugin.php +9 -4
  21. classes/Settings.php +10 -1
  22. classes/Tools.php +21 -6
  23. early-triggers.php +5 -0
  24. readme.txt +15 -2
  25. templates/_admin-page-getting-started-areas/_benefits-fast-pages.php +4 -4
  26. templates/_admin-page-getting-started-areas/_how-it-works.php +3 -3
  27. templates/_admin-page-getting-started-areas/_lite-vs-pro.php +29 -1
  28. templates/_admin-page-getting-started-areas/_start-optimization.php +5 -6
  29. templates/_admin-page-settings-plugin-areas/_optimize-css.php +39 -22
  30. templates/_admin-page-settings-plugin-areas/_optimize-js.php +36 -11
  31. templates/_admin-page-settings-plugin-areas/_plugin-usage-settings.php +75 -50
  32. templates/_admin-pages-assets-manager/_custom-post-types.php +21 -0
  33. templates/_admin-pages-assets-manager/_homepage.php +43 -22
  34. templates/_admin-pages-assets-manager/_pages.php +20 -0
  35. templates/_admin-pages-assets-manager/_posts.php +20 -0
  36. templates/admin-page-settings-plugin.php +1 -1
  37. templates/meta-box-loaded-assets/view-by-location.php +1 -1
  38. templates/meta-box-loaded-assets/view-default.php +2 -2
  39. templates/meta-box.php +19 -14
  40. wpacu.php +2 -2
assets/script.min.js CHANGED
@@ -1 +1 @@
1
- function wpacuTabOpenSettingsArea(a,b){a.preventDefault();var c,d,e;for(d=document.getElementsByClassName("wpacu-settings-tab-content"),c=0;c<d.length;c++)d[c].style.display="none";for(e=document.getElementsByClassName("wpacu-settings-tab-link"),c=0;c<e.length;c++)e[c].className=e[c].className.replace(" active","");document.getElementById(b).style.display="table-cell",jQuery('a[href="#'+b+'"]').addClass("active"),jQuery("#wpacu-selected-tab-area").val(b)}jQuery(document).ready(function(a){function b(){if(!a("#wpacu_ajax_fetch_assets_list_dashboard_view").length)return!1;var b={};"direct"===wpacu_object.dom_get_type?(b[wpacu_object.plugin_name+"_load"]=1,b[wpacu_object.plugin_name+"_time_r"]=(new Date).getTime(),a.ajax({method:"GET",url:wpacu_object.page_url,data:b,cache:!1,complete:function(b,c){if("error"===b.statusText){var d=wpacu_object.ajax_direct_fetch_error;d=d.replace(/\{wpacu_output\}/,b.responseText),d=d.replace(/\{wpacu_status_code_error\}/,b.status),a("#wpacu_meta_box_content").html(d)}}}).done(function(b){var c=b.substring(b.lastIndexOf(wpacu_object.start_del)+wpacu_object.start_del.length,b.lastIndexOf(wpacu_object.end_del)),d={action:wpacu_object.plugin_name+"_get_loaded_assets",wpacu_list:c,post_id:wpacu_object.post_id,page_url:wpacu_object.page_url,tag_id:wpacu_object.tag_id,time_r:(new Date).getTime()};a.post(wpacu_object.ajax_url,d,function(b){if(!b)return!1;a("#wpacu_meta_box_content").html(b),a("#wpacu_home_page_form").length>0&&a("#submit").show(),setTimeout(function(){e.load(),a(".wpacu_asset_row").removeClass("wpacu-loading"),a("#wpacu-assets-reloading").remove()},200)})})):"wp_remote_post"===wpacu_object.dom_get_type&&(b={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,time_r:(new Date).getTime()},a.post(wpacu_object.ajax_url,b,function(b){if(!b)return!1;a("#wpacu_meta_box_content").html(b),a("#wpacu_home_page_form").length>0&&a("#submit").show(),setTimeout(function(){e.load()},200)}))}a('input[name="wpacu_sub_tab_area"]').click(function(){a(this).prop("checked")&&a("#wpacu-selected-sub-tab-area").val(a(this).val())}),a("#wpacu_minify_css_enable, #wpacu_combine_loaded_css_enable, #wpacu_minify_js_enable, #wpacu_combine_loaded_js_enable").click(function(){a(this).prop("checked")?a('[data-linked-to="'+a(this).attr("id")+'"]').find(".wpacu-circle-status").addClass("wpacu-on").removeClass("wpacu-off"):a('[data-linked-to="'+a(this).attr("id")+'"]').find(".wpacu-circle-status").addClass("wpacu-off").removeClass("wpacu-on")}),a("#wpacu-mark-license-valid-button").click(function(){return confirm(wpacu_object.mark_license_valid_confirm)}),a("#wpacu-license-form").submit(function(){a("#edd_license_activate_btn").attr("disabled","disabled"),a("#edd_license_deactivate_btn").attr("disabled","disabled"),a(".wpacu-license-spinner").show()});var c,d;a("#wpacu-reset-drop-down").on("change keyup keydown mouseup mousedown click",function(){""===a(this).val()?(a("#wpacu-warning-read").removeClass("wpacu-visible"),a("#wpacu-reset-submit-btn").attr("disabled","disabled").removeClass("button-primary").addClass("button-secondary")):("reset_everything"===a(this).val()?a("#wpacu-license-data-remove-area").addClass("wpacu-visible"):a("#wpacu-license-data-remove-area").removeClass("wpacu-visible"),a("#wpacu-warning-read").addClass("wpacu-visible"),a("#wpacu-reset-submit-btn").removeAttr("disabled").removeClass("button-secondary").addClass("button-primary")),a(".wpacu-tools-area .wpacu-warning").hide(),c=a(this).find("option:selected"),a("#"+c.attr("data-id")).show()}),a("#wpacu-reset-submit-btn").on("click",function(){if("reset_settings"===a("#wpacu-reset-drop-down").val()?d=wpacu_object.reset_settings_confirm_msg:"reset_everything_except_settings"===a("#wpacu-reset-drop-down").val()?d=wpacu_object.reset_everything_except_settings_confirm_msg:"reset_everything"===a("#wpacu-reset-drop-down").val()&&(d=wpacu_object.reset_everything_confirm_msg),!confirm(d))return!1;a("#wpacu-action-confirmed").val("yes"),setTimeout(function(){"yes"===a("#wpacu-action-confirmed").val()&&a("#wpacu-tools-form").submit()},1e3)}),a("#wpacu-import-form").submit(function(){if(!confirm(wpacu_object.import_confirm_msg))return!1;a(this).find("button").addClass("wpacu-importing").prop("disabled",!0)});var e={load:function(){var b;a(".input-unload-on-this-page").on("click change",function(){a(this).prop("checked")?(e.uncheckAllOtherUnloadRules(a(this)),a(this).closest("tr").addClass("wpacu_not_load")):a(this).closest("tr").removeClass("wpacu_not_load")}),a(".wpacu-plugin-check-all").on("click",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin");a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]').find(".input-unload-on-this-page.wpacu-not-locked").prop("checked",!0).closest("tr").addClass("wpacu_not_load")}),a(".wpacu-plugin-uncheck-all").on("click",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin");a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]').find(".input-unload-on-this-page.wpacu-not-locked").prop("checked",!1).closest("tr").removeClass("wpacu_not_load")}),a(".wpacu_global_unload").click(function(){b=a(this).attr("data-handle"),a(this).prop("checked")?(a(this).parent("label").addClass("wpacu_input_load_checked"),a(this).closest("tr").addClass("wpacu_not_load"),e.uncheckAllOtherUnloadRules(a(this))):(a(this).parent("label").removeClass("wpacu_input_load_checked"),a(this).closest("tr").removeClass("wpacu_not_load"))}),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(){b=a(this).attr("data-handle"),a(this).prop("checked")?(a(this).parent("label").addClass("wpacu_input_load_checked"),a(this).closest("tr").addClass("wpacu_not_load"),e.uncheckAllOtherUnloadRules(a(this))):(a(this).parent("label").removeClass("wpacu_input_load_checked"),a(this).closest("tr").removeClass("wpacu_not_load"))}),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")}),a(".wpacu-add-handle-note").on("click",function(b){b.preventDefault();var c,d=a(this).attr("data-handle");a(this).hasClass("wpacu-for-script")?c=a('.wpacu-handle-notes-field[data-script-handle="'+d+'"]'):a(this).hasClass("wpacu-for-style")&&(c=a('.wpacu-handle-notes-field[data-style-handle="'+d+'"]')),c.is(":hidden")?c.show():c.hide()}),a(".wpacu-external-file-size").on("click",function(b){b.preventDefault();var c,d=a(this);d.hide(),c=d.next(),c.show(),a.post(wpacu_object.ajax_url,{action:"get_external_file_size",wpacu_remote_file:d.attr("data-src")},function(a){c.html(a)})})},uncheckAllOtherUnloadRules:function(a){a.closest("tr").find(".wpacu_unload_rule_input").not(a).prop("checked",!1).parent("label").removeClass("wpacu_input_load_checked")}};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").show(),a("#wpacu_hide_meta_boxes_for_post_types_chosen .chosen-choices, #wpacu-hide-meta-boxes-for-post-types-info").css({opacity:1})):(a("#wpacu-settings-assets-retrieval-mode").hide(),a("#wpacu_hide_meta_boxes_for_post_types_chosen .chosen-choices, #wpacu-hide-meta-boxes-for-post-types-info").css({opacity:.4}))}),a(".wpacu-dom-get-type-selection").change(function(){a(this).is(":checked")&&(a(".wpacu-dom-get-type-info").hide(),a("#"+a(this).attr("data-target")).fadeIn("fast"))}),a("#wpacu_frontend").click(function(){a(this).prop("checked")?a("#wpacu-settings-frontend-exceptions").show():a("#wpacu-settings-frontend-exceptions").hide()}),a(".google_fonts_combine_type").change(function(){a(".wpacu_google_fonts_combine_type_area").hide(),"async"===a(this).val()?a("#wpacu_google_fonts_combine_type_async_info_area").fadeIn():"async_preload"===a(this).val()?a("#wpacu_google_fonts_combine_type_async_preload_info_area").fadeIn():a("#wpacu_google_fonts_combine_type_rb_info_area").fadeIn()}),a("#wpacu_assets_list_layout").on("click change",function(){"by-location"===a(this).val()?a("#wpacu-assets-list-by-location-selected").fadeIn("fast"):a("#wpacu-assets-list-by-location-selected").fadeOut("fast")}),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("[data-target-opacity]").click(function(){a(this).prop("checked")?a("#"+a(this).attr("data-target-opacity")).css({opacity:1}):a("#"+a(this).attr("data-target-opacity")).css({opacity:.4})}),a(".wpacu-combine-loaded-js-level").change(function(){a(this).is(":checked")&&(a(".wpacu_combine_loaded_js_level_area").removeClass("wpacu_active"),a("#"+a(this).attr("data-target")).addClass("wpacu_active"))});var f=a('#wpacu-update-button-area input[type="submit"]');f.click(function(){a("#wpacu-updating-settings").show()});var g=a("#wpacu-update-front-settings-area .wpacu_update_btn");if(g.parents("form").submit(function(){return g.attr("disabled",!0).addClass("wpacu_submitting"),a("#wpacu-updating-front-settings").show(),!0}),a("form#wpacu-settings-form, form#wpacu_home_page_form").submit(function(){return f.attr("disabled",!0),!0}),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_restore_position").click(function(){var b=a(this).parents(".wpacu_restore_position_row");a(this).prop("checked")?b.addClass("wpacu_selected"):b.removeClass("wpacu_selected")}),a(".wpacu_remove_global_attr").click(function(){var b=a(this).parents(".wpacu_remove_global_attr_row");a(this).prop("checked")?b.addClass("wpacu_selected"):b.removeClass("wpacu_selected")}),a("#wpacu_wrap_assets").length>0&&setTimeout(function(){e.load()},200),"undefined"==typeof wpacu_object||a("#wpacu_meta_box_content").length<1)return!1;b(),a(document).on("click",".wp-admin.post-php .edit-post-header__settings button.is-primary",function(){var c=function(){if(0===a(".edit-post-header__settings .is-saving").length){if(a("#wpacu_unload_assets_area_loaded").length>0&&a("#wpacu_unload_assets_area_loaded").val()){a("#wpacu-assets-reloading").remove();var c='<span id="wpacu-assets-reloading" class="editor-post-saved-state is-wpacu-reloading">'+wpacu_object.reload_icon+wpacu_object.reload_msg+"</span>";a(".wp-admin.post-php .edit-post-header__settings").prepend(c)}a(".wpacu_asset_row").addClass("wpacu-loading"),b(),clearInterval(d)}},d=setInterval(c,900)})});
1
+ function wpacuTabOpenSettingsArea(a,b){a.preventDefault();var c,d,e;for(d=document.getElementsByClassName("wpacu-settings-tab-content"),c=0;c<d.length;c++)d[c].style.display="none";for(e=document.getElementsByClassName("wpacu-settings-tab-link"),c=0;c<e.length;c++)e[c].className=e[c].className.replace(" active","");document.getElementById(b).style.display="table-cell",jQuery('a[href="#'+b+'"]').addClass("active"),jQuery("#wpacu-selected-tab-area").val(b)}jQuery(document).ready(function(a){function b(){if(!a("#wpacu_ajax_fetch_assets_list_dashboard_view").length)return!1;var b={};"direct"===wpacu_object.dom_get_type?(b[wpacu_object.plugin_name+"_load"]=1,b[wpacu_object.plugin_name+"_time_r"]=(new Date).getTime(),a.ajax({method:"GET",url:wpacu_object.page_url,data:b,cache:!1,complete:function(b,c){if("error"===b.statusText){var d=wpacu_object.ajax_direct_fetch_error;d=d.replace(/\{wpacu_output\}/,b.responseText),d=d.replace(/\{wpacu_status_code_error\}/,b.status),a("#wpacu_meta_box_content").html(d)}}}).done(function(b){var c=b.substring(b.lastIndexOf(wpacu_object.start_del)+wpacu_object.start_del.length,b.lastIndexOf(wpacu_object.end_del)),d={action:wpacu_object.plugin_name+"_get_loaded_assets",wpacu_list:c,post_id:wpacu_object.post_id,page_url:wpacu_object.page_url,tag_id:wpacu_object.tag_id,time_r:(new Date).getTime()};a.post(wpacu_object.ajax_url,d,function(b){if(!b)return!1;a("#wpacu_meta_box_content").html(b),a("#wpacu_home_page_form").length>0&&a("#submit").show(),setTimeout(function(){e.load(),a(".wpacu_asset_row").removeClass("wpacu-loading"),a("#wpacu-assets-reloading").remove()},200)})})):"wp_remote_post"===wpacu_object.dom_get_type&&(b={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,time_r:(new Date).getTime()},a.post(wpacu_object.ajax_url,b,function(b){if(!b)return!1;a("#wpacu_meta_box_content").html(b),a("#wpacu_home_page_form").length>0&&a("#submit").show(),setTimeout(function(){e.load()},200)}))}a('input[name="wpacu_sub_tab_area"]').click(function(){a(this).prop("checked")&&a("#wpacu-selected-sub-tab-area").val(a(this).val())}),a("#wpacu_minify_css_enable, #wpacu_combine_loaded_css_enable, #wpacu_minify_js_enable, #wpacu_combine_loaded_js_enable").click(function(){a(this).prop("checked")?a('[data-linked-to="'+a(this).attr("id")+'"]').find(".wpacu-circle-status").addClass("wpacu-on").removeClass("wpacu-off"):a('[data-linked-to="'+a(this).attr("id")+'"]').find(".wpacu-circle-status").addClass("wpacu-off").removeClass("wpacu-on")}),a("#wpacu-mark-license-valid-button").click(function(){return confirm(wpacu_object.mark_license_valid_confirm)}),a("#wpacu-license-form").submit(function(){a("#edd_license_activate_btn").attr("disabled","disabled"),a("#edd_license_deactivate_btn").attr("disabled","disabled"),a(".wpacu-license-spinner").show()});var c,d;a("#wpacu-reset-drop-down").on("change keyup keydown mouseup mousedown click",function(){""===a(this).val()?(a("#wpacu-warning-read").removeClass("wpacu-visible"),a("#wpacu-reset-submit-btn").attr("disabled","disabled").removeClass("button-primary").addClass("button-secondary")):("reset_everything"===a(this).val()?a("#wpacu-license-data-remove-area").addClass("wpacu-visible"):a("#wpacu-license-data-remove-area").removeClass("wpacu-visible"),a("#wpacu-warning-read").addClass("wpacu-visible"),a("#wpacu-reset-submit-btn").removeAttr("disabled").removeClass("button-secondary").addClass("button-primary")),a(".wpacu-tools-area .wpacu-warning").hide(),c=a(this).find("option:selected"),a("#"+c.attr("data-id")).show()}),a("#wpacu-reset-submit-btn").on("click",function(){if("reset_settings"===a("#wpacu-reset-drop-down").val()?d=wpacu_object.reset_settings_confirm_msg:"reset_everything_except_settings"===a("#wpacu-reset-drop-down").val()?d=wpacu_object.reset_everything_except_settings_confirm_msg:"reset_everything"===a("#wpacu-reset-drop-down").val()&&(d=wpacu_object.reset_everything_confirm_msg),!confirm(d))return!1;a("#wpacu-action-confirmed").val("yes"),setTimeout(function(){"yes"===a("#wpacu-action-confirmed").val()&&a("#wpacu-tools-form").submit()},1e3)}),a("#wpacu-import-form").submit(function(){if(!confirm(wpacu_object.import_confirm_msg))return!1;a(this).find("button").addClass("wpacu-importing").prop("disabled",!0)});var e={load:function(){var b;a(".input-unload-on-this-page").on("click change",function(){a(this).prop("checked")?(e.uncheckAllOtherUnloadRules(a(this)),a(this).closest("tr").addClass("wpacu_not_load")):a(this).closest("tr").removeClass("wpacu_not_load")}),a(".wpacu-plugin-check-all").on("click",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin");a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]').find(".input-unload-on-this-page.wpacu-not-locked").prop("checked",!0).closest("tr").addClass("wpacu_not_load")}),a(".wpacu-plugin-uncheck-all").on("click",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin");a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]').find(".input-unload-on-this-page.wpacu-not-locked").prop("checked",!1).closest("tr").removeClass("wpacu_not_load")}),a(".wpacu_global_unload").click(function(){b=a(this).attr("data-handle"),a(this).prop("checked")?(a(this).parent("label").addClass("wpacu_input_load_checked"),a(this).closest("tr").addClass("wpacu_not_load"),e.uncheckAllOtherUnloadRules(a(this))):(a(this).parent("label").removeClass("wpacu_input_load_checked"),a(this).closest("tr").removeClass("wpacu_not_load"))}),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(){b=a(this).attr("data-handle"),a(this).prop("checked")?(a(this).parent("label").addClass("wpacu_input_load_checked"),a(this).closest("tr").addClass("wpacu_not_load"),e.uncheckAllOtherUnloadRules(a(this))):(a(this).parent("label").removeClass("wpacu_input_load_checked"),a(this).closest("tr").removeClass("wpacu_not_load"))}),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")}),a(".wpacu-add-handle-note").on("click",function(b){b.preventDefault();var c,d=a(this).attr("data-handle");a(this).hasClass("wpacu-for-script")?c=a('.wpacu-handle-notes-field[data-script-handle="'+d+'"]'):a(this).hasClass("wpacu-for-style")&&(c=a('.wpacu-handle-notes-field[data-style-handle="'+d+'"]')),c.is(":hidden")?c.show():c.hide()}),a(".wpacu-external-file-size").on("click",function(b){b.preventDefault();var c,d=a(this);d.hide(),c=d.next(),c.show(),a.post(wpacu_object.ajax_url,{action:"get_external_file_size",wpacu_remote_file:d.attr("data-src")},function(a){c.html(a)})})},uncheckAllOtherUnloadRules:function(a){a.closest("tr").find(".wpacu_unload_rule_input").not(a).prop("checked",!1).parent("label").removeClass("wpacu_input_load_checked")}};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").show():a("#wpacu-settings-assets-retrieval-mode").hide()}),a(".wpacu-dom-get-type-selection").change(function(){a(this).is(":checked")&&(a(".wpacu-dom-get-type-info").hide(),a("#"+a(this).attr("data-target")).fadeIn("fast"))}),a("#wpacu_frontend").click(function(){a(this).prop("checked")?a("#wpacu-settings-frontend-exceptions").show():a("#wpacu-settings-frontend-exceptions").hide()}),a(".google_fonts_combine_type").change(function(){a(".wpacu_google_fonts_combine_type_area").hide(),"async"===a(this).val()?a("#wpacu_google_fonts_combine_type_async_info_area").fadeIn():"async_preload"===a(this).val()?a("#wpacu_google_fonts_combine_type_async_preload_info_area").fadeIn():a("#wpacu_google_fonts_combine_type_rb_info_area").fadeIn()}),a("#wpacu_assets_list_layout").on("click change",function(){"by-location"===a(this).val()?a("#wpacu-assets-list-by-location-selected").fadeIn("fast"):a("#wpacu-assets-list-by-location-selected").fadeOut("fast")}),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("[data-target-opacity]").click(function(){a(this).prop("checked")?a("#"+a(this).attr("data-target-opacity")).css({opacity:1}):a("#"+a(this).attr("data-target-opacity")).css({opacity:.4})}),a(".wpacu-combine-loaded-js-level").change(function(){a(this).is(":checked")&&(a(".wpacu_combine_loaded_js_level_area").removeClass("wpacu_active"),a("#"+a(this).attr("data-target")).addClass("wpacu_active"))});var f=a('#wpacu-update-button-area input[type="submit"]');f.click(function(){a("#wpacu-updating-settings").show()});var g=a("#wpacu-update-front-settings-area .wpacu_update_btn");if(g.parents("form").submit(function(){return g.attr("disabled",!0).addClass("wpacu_submitting"),a("#wpacu-updating-front-settings").show(),!0}),a("form#wpacu-settings-form, form#wpacu_home_page_form").submit(function(){return f.attr("disabled",!0),!0}),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_restore_position").click(function(){var b=a(this).parents(".wpacu_restore_position_row");a(this).prop("checked")?b.addClass("wpacu_selected"):b.removeClass("wpacu_selected")}),a(".wpacu_remove_global_attr").click(function(){var b=a(this).parents(".wpacu_remove_global_attr_row");a(this).prop("checked")?b.addClass("wpacu_selected"):b.removeClass("wpacu_selected")}),a("#wpacu_wrap_assets").length>0&&setTimeout(function(){e.load()},200),"undefined"==typeof wpacu_object||a("#wpacu_meta_box_content").length<1)return!1;("default"===wpacu_object.list_show_status||""===wpacu_object.list_show_status||wpacu_object.override_assets_list_load)&&b(),"fetch_on_click"===wpacu_object.list_show_status&&a("#wpacu_ajax_fetch_on_click_btn").click(function(c){c.preventDefault(),a(this).hide(),a("#wpacu_fetching_assets_list_wrap").show(),b()}),a(document).on("click",".wp-admin.post-php .edit-post-header__settings button.is-primary",function(){var c=function(){if(0===a(".edit-post-header__settings .is-saving").length){if(a("#wpacu_unload_assets_area_loaded").length>0&&a("#wpacu_unload_assets_area_loaded").val()){a("#wpacu-assets-reloading").remove();var c='<span id="wpacu-assets-reloading" class="editor-post-saved-state is-wpacu-reloading">'+wpacu_object.reload_icon+wpacu_object.reload_msg+"</span>";a(".wp-admin.post-php .edit-post-header__settings").prepend(c)}a(".wpacu_asset_row").addClass("wpacu-loading"),b(),clearInterval(d)}},d=setInterval(c,900)})});
assets/style.min.css CHANGED
@@ -1 +1 @@
1
- #wpacu-logo-wrap .wpacu-pro-sign.wpacu-lite,#wpacu-quick-actions{color:#74777b;background:rgba(40,44,42,.05)}#wpacu-pages-info-area{width:98%}#wpacu-top-area{margin:15px 0;padding:0 10px}#wpacu-quick-actions{float:right;width:auto;margin-right:30px;border-radius:10px;padding:6px 12px}#wpacu-quick-actions .wpacu-actions-title{font-weight:200;letter-spacing:.5px}#wpacu-quick-actions a{color:#004567;text-decoration:none}#wpacu-quick-actions a:hover{color:#0073aa}#wpacu-logo-wrap{width:auto;display:inline-block;position:relative}#wpacu-logo-wrap a{display:block}#wpacu-logo-wrap img{width:352px;height:79px}#wpacu-logo-wrap .wpacu-pro-sign{position:absolute;height:auto;font-family:FiraSans-Medium,proxima-nova-1,Montserrat,Helvetica,sans-serif;font-size:13px;font-weight:600;letter-spacing:1px;padding:5px 11px;border-radius:15px;right:-60px;top:30px;width:auto;display:inline-block;text-align:center}#wpacu-logo-wrap .wpacu-pro-sign.wpacu-pro{color:#004567;background-color:rgba(40,44,42,.05)}.wpacu-tabs{position:relative;overflow:hidden;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 ul li span.extra-info{position:absolute;font-size:12px;left:0;right:50%;bottom:12px;-webkit-transform:translate(50%,50%);transform:translate(50%,50%)}.wpacu-tabs nav ul li span.extra-info .dashicons{font-size:16px;margin-right:-3px;margin-top:1px}.wpacu-tabs nav ul li span.extra-info.license-status.inactive{color:#c00}.wpacu-tabs nav ul li span.extra-info.license-status.active{color:green}.wpacu-tabs nav ul li span.extra-info.assets-unloaded-false{color:#004567}.wpacu-tabs nav ul li span.extra-info.assets-unloaded-true,.wpacu-tabs nav ul li span.extra-info.bulk-unloads-true{color:green}.wpacu-tabs nav a{position:relative;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5}.wpacu-tabs nav a span{vertical-align:middle;font-size:14px}.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 30px 0;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:#008f9c;border-bottom:none}.wpacu-tabs-style-topline nav a{padding:20px 18px;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{background:0 0;color:#008f9c}.wpacu-tabs-style-topline nav li.wpacu-tab-current a{background:0 0;box-shadow:inset 0 3px 0 #008f9c;color:#008f9c}.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-tab-nav-wrapper{border-bottom:none!important}.wpacu-tab-nav-wrapper .nav-tab.nav-tab-active{background:#fff;position:relative}.wpacu-tab-nav-wrapper .nav-tab.nav-tab-active:after{content:'';width:100%;bottom:-2px;left:0;position:absolute;border-bottom:2px solid #fff}.wpacu-script-attributes-area{margin:20px 0 0!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings{padding:5px 7px!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings.wpacu-first{margin:0 28px 0 0!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings label{margin:0!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings li{margin:0 16px 0 0!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings li:first-child{margin:0 10px 0 0!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings li:last-child{margin:0 2px 0 0!important}.wpacu-script-attributes-area .wpacu-script-attributes-settings{background:#fff!important;border:1px solid #eee!important;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:5px 10px!important;list-style:none;display:inline-block;margin:0}.wpacu-script-attributes-area .wpacu-script-attributes-settings input[type=radio]{width:auto;padding:0;margin:0 5px 0 0}.wpacu-script-attributes-area .wpacu-script-attributes-settings.wpacu-first{margin:0 34px 0 0!important}.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 10px 0 0!important}.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_location_changed>td{border-left:#004567 4px solid}tr.wpacu_not_load td,tr.wpacu_not_load th{background:#FFE1E1!important}tr.wpacu_not_load td .wpacu-assets-inline-code-wrap,tr.wpacu_not_load td .wpacu-script-attributes-area,tr.wpacu_not_load th .wpacu-assets-inline-code-wrap,tr.wpacu_not_load th .wpacu-script-attributes-area{filter:alpha(opacity=45);opacity:.45}.dashicons-wpacu{width:17px;height:17px;margin:2px 0 0;font-size:16px;text-decoration:none;color:inherit!important}#wpacu_meta_box_content,.wpacu_widefat{width:99%}.wpacu_widefat .check-column.wpacu_check{padding:10px}body[class*=wpassetcleanup] #footer-left{border-left:2px solid green;padding-left:10px}#wpassetcleanup_asset_list small{width:auto;float:none;display:inline}#wpacu_meta_box_content .emoji{font-size:18px}#wpacu_meta_box_content h3{margin-left:0;padding-left:0}#wpacu_meta_box_content div.wpacu_note{padding:10px;background-color:#f5f5f5}#wpacu_meta_box_content .dashicons.dashicons-warning{color:#c00}#wpacu_meta_box_content .wpacu_verified{padding:10px;background-color:#f5f5f5;border-left:1px solid #ddd}#wpacu_meta_box_content .wpacu_verified span{color:#0073aa;font-weight:700}#wpacu_meta_box_content div.wpacu_warning{border:1px solid #c00}#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_meta_box_content ul.wpacu_asset_options label{font-weight:400;margin-right:5px;margin-top:5px;margin-bottom:5px}.wpacu-updated-frontend{font-weight:400;background-color:#fff;border-left:4px solid #46b450;border-top:1px solid #46b450;border-right:1px solid #46b450;border-bottom:1px solid #46b450;padding:9px 14px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu-updated-frontend span.dashicons-yes{color:#46b450;font-size:26px}#wpacu-update-front-settings-area{margin:10px 0;display:inline-block;position:relative}#wpacu-updating-front-settings{display:none;position:absolute;top:5px;right:-35px}#wpacu_wrap_assets{color:#000!important;text-align:left!important;clear:both!important;width:90%!important;padding:20px!important;margin:30px 0 0 15px!important;border:1px solid #cdcdcd;z-index:10000!important;position:relative!important;background-color:#fff!important}#wpacu_wrap_assets div.wpacu_warning{border:1px solid #c00;padding:5px 10px}#wpacu_wrap_assets small{display:inline!important;margin:0!important;letter-spacing:normal!important}#wpacu_wrap_assets input[type=checkbox]{width:auto!important;margin-right:4px!important}#wpacu_wrap_assets img:not(.wpacu-ajax-loader){display:inline-block!important}#wpacu_wrap_assets p{line-height:22px!important;margin:10px 0!important;text-align:left!important;font-weight:400!important}#wpacu_wrap_assets p:first-child,.wpacu_verified{margin:0 0 10px!important}#wpacu_wrap_assets h1{margin:0 0 20px!important;font-size:160%!important;text-align:left!important}#wpacu_wrap_assets h3{margin:20px 0;font-size:130%}.wpacu_asset_row:first-child td{border-top:1px solid #cdcdcd}.wpacu_asset_row td{border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;border-bottom:1px solid #cdcdcd}.wpacu_asset_row.wpacu_notice_row td{position:relative;padding:5px;border-bottom:1px solid transparent}.wpacu_asset_row.wpacu_notice_row td div.wpacu-warning{width:auto;margin:5px;font-style:italic}.wpacu_asset_row:not(.wpacu_notice_row) td{padding:18px!important;position:relative}.wpacu_asset_row:not(.wpacu_notice_row) td.selected,.wpacu_asset_row:not(.wpacu_notice_row) td:hover{-moz-box-shadow:inset 0 0 12px #cdcdcd;-webkit-box-shadow:inset 0 0 12px #cdcdcd;box-shadow:inset 0 0 12px #cdcdcd}.wpacu_asset_row:not(.wpacu_notice_row) td p{padding:0!important;margin-bottom:10px!important;word-wrap:break-word!important;-ms-word-break:break-all;word-break:break-word}.wpacu_asset_row:not(.wpacu_notice_row) td label{width:auto!important;margin:0!important;cursor:pointer!important;display:inline-block!important;font-size:100%!important;font-weight:400!important}.wpacu_asset_row:not(.wpacu_notice_row) td label span:not(.dashicons){font-size:100%!important}.wpacu_asset_row:not(.wpacu_notice_row) td.wpacu_check{width:50px!important}.asset-table-extra-info td{padding:5px!important}body.wp-admin .wpacu_asset_row td.wpacu_check{width:25px!important}.wpacu_asset_row .dashicons-warning{color:red!important}label.wpacu_add_global{cursor:pointer!important}label.wpacu_input_load_checked{font-weight:700;color:#d54e21}label.wpacu_global_unload_exception{font-weight:700!important}tr.wpacu_global_rule_row.selected{background:#e7e7e7}.nav-tab-wrapper{border-bottom:1px solid #ccc;width:95%}.nav-tab-wrapper.nav-assets-manager .nav-tab{font-size:13px;font-weight:500;padding:6px 10px}.nav-tab-wrapper.nav-assets-manager .nav-tab.for-pro{padding:6px 8px 6px 3px}ul.wpacu_asset_options{margin:0 10px 0 0;padding:0}ul.wpacu_asset_options li{margin:0 10px 0 0;list-style:none;display:inline-block;line-height:normal}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}.wpacu_list_table,.wpacu_list_table div,.wpacu_list_table li,.wpacu_list_table p{font-weight:400}.wpacu_striped>tbody>:nth-child(even),ul.wpacu_striped>:nth-child(even){background-color:#fff!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.wpacu_submitting,.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.wpacu_submitting{cursor:default!important}.wpacu_update_btn:active{position:relative!important;top:1px!important}.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;-webkit-border-radius:.25rem;-moz-border-radius:.25rem;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;-webkit-border-radius:0;-moz-border-radius:0;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;-webkit-border-radius:.3rem;-moz-border-radius:.3rem;border-radius:.3rem}.wpacu-btns .btn-group-sm>.btn,.wpacu-btns .btn-sm{padding:.25rem .5rem;font-size:.875rem;-webkit-border-radius:.2rem;-moz-border-radius:.2rem;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=reset].btn-block,.wpacu-btns input[type=button].btn-block,.wpacu-btns input[type=submit].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;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;-webkit-transition-duration:.4s;transition-duration:.4s}.go-pro-button:hover{background-color:#fff;color:#000;border:2px solid #4CAF50;text-decoration:none}.wpacu-restore-pos-btn{font-size:14px!important;line-height:normal!important;height:42px!important;padding:0 18px!important;margin-top:10px!important}body.wp-admin .wpacu_asset_row .go-pro-link-no-style .wpacu-tooltip{padding:8px 2px}body.wp-admin .go-pro-link-no-style .wpacu-tooltip{text-shadow:none;font-weight:400;font-size:12px;line-height:16px;padding:8px 11px}.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.no-transition .wpacu-tooltip{-webkit-transition:0s all ease;transition:0s all ease;-webkit-transition-delay:0s;transition-delay:0s}.go-pro-link-no-style>img{max-width:20px;max-height:20px}.go-pro-link-no-style .wpacu-tooltip{font-size:14px;line-height:18px;position:absolute;z-index:1;visibility:hidden;width:160px;background-color:#00a7a7;color:#fff;text-align:center;padding:8px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;bottom:100%;bottom:calc(100% + 15px);left:50%;margin-left:-65px;-webkit-transition:.1s all ease;transition:.1s all ease;-webkit-transition-delay:0s;transition-delay:0s}.go-pro-link-no-style .wpacu-tooltip:after{content:"";position:absolute;border-width:10px;border-style:solid;top:100%;left:50%;left:calc(50% - 10px);border-color:#00a7a7 transparent transparent}.go-pro-link-no-style .wpacu-tooltip.wpacu-on-pages-btn{cursor:pointer;margin-left:-77px;width:130px}.go-pro-link-no-style .wpacu-tooltip.wpacu-larger{width:240px}.go-pro-link-no-style:hover .wpacu-tooltip{visibility:visible}.wpacu_list_table tr:first-child .wordpress-core-file .wpacu-tooltip{bottom:-40px;left:120px;margin-left:-86px}.wpacu_list_table tr:first-child .wordpress-core-file .wpacu-tooltip:after{top:41px;left:-20px;border-color:transparent #c00 transparent transparent}.wordpress-core-file{position:relative;font-style:normal;color:inherit}.wordpress-core-file .wpacu-tooltip{font-size:14px;line-height:18px;position:absolute;z-index:1;visibility:hidden;width:160px;background-color:#c00;color:#fff;text-align:center;padding:6px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;bottom:100%;bottom:calc(100% + 15px);left:50%;margin-left:-86px;-webkit-transition:.1s all ease;transition:.1s all ease;-webkit-transition-delay:0s;transition-delay:0s}.wordpress-core-file .wpacu-tooltip:after{content:"";position:absolute;border-width:10px;border-style:solid;top:100%;left:50%;left:calc(50% - 10px);border-color:#c00 transparent transparent}.wordpress-core-file:hover .wpacu-tooltip{visibility:visible}.ajax-direct-call-error-area{background:#fff;padding:10px;border:1px solid #c00;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ajax-direct-call-error-area td{padding:6px}.ajax-direct-call-error-area .note{margin-top:0;padding-top:0}.ajax-direct-call-error-area .error-code{color:#c00;font-weight:700}.ajax-wp-remote-post-call-error-area{background:#fff;padding:20px}.ajax-wp-remote-post-call-error-area .table-data{background:0 0;border:1px solid #c66;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.ajax-wp-remote-post-call-error-area .table-data td{padding:10px}.wrap-upgrade-info{background:#fff;padding:0 15px;border:1px solid #cdcdcd;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-notice{margin:20px 20px 0 0!important}.wpacu-notice p{font-weight:600!important;font-style:italic}.wpacu-notice .dashicons{font-weight:inherit!important;color:#46b450!important;margin-right:4px;vertical-align:text-bottom;font-size:27px}.wpacu-notice-info{padding:12px 12px 12px 16px;background:#fff;border-left:4px solid #008f9c}.wpacu-notice-info p{margin-top:8px}.wpacu-notice-info p:first-child{margin-top:0}.wpacu-notice-info p:last-child{margin-bottom:0}.wpacu-warning{font-size:15px;padding:10px;background:#fffcec;border:1px solid #fdd5c9;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;margin:0 0 5px;width:100%}.pro-page-unlock-notice{-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:10px;background:#f2faf2;border:1px solid #c0e8c0;width:auto;display:block}.wpacu-license-area .notice,.wpacu-settings-area .notice{margin-left:0;padding:10px!important;width:97%;box-sizing:border-box;font-weight:600;font-style:italic}.wpacu-license-area .notice .dashicons,.wpacu-settings-area .notice .dashicons{color:green}#wpacu-dom-get-type-selections,.wpacu-radio-selections{float:none;clear:both;width:auto;display:inline-block;margin-bottom:0;margin-top:0}#wpacu-dom-get-type-selections.wpacu-vertical,.wpacu-radio-selections.wpacu-vertical{display:block;margin-top:15px;margin-bottom:18px}#wpacu-dom-get-type-selections.wpacu-vertical li,.wpacu-radio-selections.wpacu-vertical li{float:none;margin-bottom:12px}#wpacu-dom-get-type-selections.wpacu-vertical li:last-child,.wpacu-radio-selections.wpacu-vertical li:last-child{margin-bottom:0}#wpacu-dom-get-type-selections li,.wpacu-radio-selections li{margin-right:30px;float:left;margin-bottom:0}#wpacu-dom-get-type-selections li:first-child,.wpacu-radio-selections li:first-child{margin-right:15px}#wpacu-dom-get-type-selections li:last-child,.wpacu-radio-selections li:last-child{margin-right:0}.wpacu_combine_loaded_js_level_area{display:none;background:0 0;border-left:2px solid #008f9c;padding-top:8px;padding-bottom:8px;padding-right:10px;padding-left:10px;margin:20px 0 15px}.wpacu_combine_loaded_js_level_area.wpacu_active{display:block}#wpacu-dom-get-type-infos{margin-bottom:0}#wpacu-dom-get-type-infos li{margin-bottom:0;line-height:20px}.wpacu-wrap li,.wpacu-wrap p,.wpacu-wrap td{font-weight:400}.wpacu-wrap small{width:auto;float:none;display:inline}.wpacu-wrap.wpacu-settings-show-all .wpacu-settings-tab-content{display:block;width:100%}.wpacu-wrap.wpacu-settings-show-all .wpacu-settings-area-title{color:#004567;padding:16px 15px;background:#f8f8f8;border-left:5px solid #004567b0;border-top:1px solid #e7e7e7;border-right:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;font-size:1.45em;font-weight:500}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider.wpacu_round,.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch .wpacu_slider.wpacu_round{border-radius:29px}.wpacu-wrap.wpacu-settings-show-all #wpacu-update-button-area{margin:0}.wpacu-wrap.wpacu-settings-show-all #wpacu-update-button-area .button{padding:11px 28px;height:auto;font-size:18px}.wpacu-wrap.wpacu-settings-show-all #wpacu-updating-settings{margin-left:224px;top:25px}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch{width:auto;height:auto}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch input,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch input{display:block}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch input[type=checkbox],.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch input[type=checkbox]{margin:0 0 3px}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch .wpacu_slider,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch .wpacu_slider{display:none}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input{display:none}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch:not(.wpacu_switch_standard) .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.2s;transition:.2s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch:not(.wpacu_switch_standard) .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.2s;transition:.2s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:checked+.wpacu_slider{background-color:#52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:focus+.wpacu_slider{box-shadow:0 0 1px #52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_disabled,.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_locked_for_pro{opacity:.3}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_disabled:before{content:"\f160";font-family:Dashicons,Arial,"Times New Roman","Bitstream Charter",Times,serif;position:absolute;font-size:23px;top:5px;right:2px;z-index:1000}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle{margin-top:4px;line-height:1.4}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle em,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle em{font-weight:200}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_read_more,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_read_more{margin-top:-10px;font-style:italic;font-size:12px}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices{list-style:none;margin:0}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices li,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices li{float:left;margin-right:30px}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li:last-child,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li:last-child,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices li:last-child{margin-right:0}#wpacu-assets-list-by-location-selected{background:0 0;border:1px solid #e7e7e7;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:8px;clear:both}.notice.notice-success+.wpacu-wrap.wpacu-settings-area{margin-top:20px}.wpacu-license-action-btn-area{margin-top:0;position:relative;display:inline-block}.wpacu-license-spinner{display:none;position:absolute;right:-30px;top:4px}.wpacu-license-spinner img{width:20px;height:20px}#wpacu-activation-issues-info{border-radius:10px;width:90%;margin-top:20px;font-size:14px;padding:6px 20px;background:#fff;border:1px solid #e7e7e7}#wpacu-activation-issues-info ol li{font-size:13px;margin-bottom:10px}#wpacu-mark-license-area-wrap{margin:15px 0}.wpacu-form-table.wpacu-license th{width:150px}.wpacu-form-table th{vertical-align:top;text-align:left;padding:5px 20px 20px 0;width:200px;line-height:1.3;font-weight:600}.wpacu-form-table th label{color:#23282d;font-weight:600;font-size:14px;text-shadow:none;vertical-align:middle;cursor:pointer}.wpacu-form-table td{padding-bottom:25px}.wpacu-form-table td:last-child p:last-child{margin:0}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox],.wpacu-form-table label input[type=checkbox]{height:20px;width:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:checked,.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:hover,.wpacu-form-table label input[type=checkbox]:checked,.wpacu-form-table label input[type=checkbox]:hover{border:1px solid green}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:checked:before,.wpacu-form-table label input[type=checkbox]:checked:before{color:#52af00;font:400 24px/1 dashicons}.wpacu-form-table .wpacu-fancy-radio input[type=radio]{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;position:relative;height:20px;width:20px;margin:2px 0 0}.wpacu-form-table .wpacu-fancy-radio input[type=radio]:checked,.wpacu-form-table .wpacu-fancy-radio input[type=radio]:hover{border:1px solid green}.wpacu-form-table .wpacu-fancy-radio input[type=radio]:checked:before{margin:0;line-height:inherit;text-indent:inherit;content:'';position:absolute;top:4px;left:4px;width:10px;height:10px;border-radius:50%;background:#52af00;color:#52af00;font:400 24px/1 dashicons}#wpacu-settings-vertical-tab-wrap{display:table;width:100%}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text{margin:4px 0 0}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small{font-weight:lighter}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap{position:relative;padding-left:14px}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status{position:absolute;left:0;top:2px;height:10px;width:10px;border-radius:50%;display:inline-block;opacity:.75}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status.wpacu-on{background:#52af00}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status.wpacu-off{background:#ccc}#wpacu-settings-vertical-tab-wrap *{box-sizing:border-box}.wpacu-settings-tab{display:table-cell;width:20%;height:100%;vertical-align:top}.wpacu-settings-tab a{text-decoration:none;border-left:3px solid transparent;display:block;background-color:#f1f1f1;color:#004567;padding:17px 16px;width:100%;outline:0;text-align:left;cursor:pointer;font-size:14px;font-weight:600;border-bottom:1px solid #ccc}.wpacu-settings-tab a:first-child{border-top:1px solid transparent!important}.wpacu-settings-tab a:last-child{border-bottom:1px solid transparent!important}.wpacu-settings-tab a:hover{background-color:#fff;border-left:3px solid #004567;position:relative}.wpacu-settings-tab a.active{color:#004567;background-color:#fff;border-left:3px solid #004567;position:relative;border-bottom:1px solid #ccc}.wpacu-settings-tab a.active:after{content:'';position:absolute;height:100%;width:1px;top:0;right:-1px;background-color:#fff}.wpacu-settings-tab-content{background-color:#fff;display:none;padding:12px 18px;width:79%;border-left:none;height:100%;border-top-right-radius:10px;border-bottom-right-radius:10px}.wpacu-settings-tab-content h2{padding:0 0 15px;border-bottom:1px solid #e7e7e7}.wpacu-settings-tab-content.active{display:table-cell}#wpacu_minify_css_exceptions_area,#wpacu_minify_js_exceptions_area{margin:16px 0 0}#wpacu-update-button-area{position:relative;margin-left:20%}#wpacu-update-button-area.no-left-margin{margin-left:0}#wpacu-update-button-area p{margin-top:10px}#wpacu-update-button-area .button{padding:5px 18px;height:38px;font-size:15px}#wpacu-updating-settings{position:absolute;margin-left:183px;top:19px;display:none}#combine_loaded_js_info_area{position:relative}#combine_loaded_js_info_area.locked-for-pro:before{position:absolute;content:'';height:100%;width:100%;background:#fff;opacity:.5;z-index:10000}.google_fonts_load_types{clear:both;margin:20px 0 15px;display:flex}.google_fonts_load_types>div{text-align:left}.google_fonts_load_types>div input{float:left;margin:0 7px 20px 0!important}.wpacu-sub-tabs-wrap{min-width:320px;margin:0 auto}.wpacu-sub-tabs-wrap input.wpacu-nav-input{display:none}.wpacu-sub-tabs-wrap label.wpacu-nav-label{display:inline-block;margin:0 0 -1px;padding:15px 25px;font-weight:600;text-align:center;color:#74777b;border-left:1px solid transparent;border-right:1px solid transparent;border-top:3px solid transparent;border-bottom:0}.wpacu-sub-tabs-wrap label.wpacu-nav-label:hover{cursor:pointer}.wpacu-sub-tabs-wrap input.wpacu-nav-input:checked+label.wpacu-nav-label{color:#004567;border-left:1px solid #ccc;border-right:1px solid #ccc;border-top:3px solid #004567;border-bottom:1px solid #fff}.wpacu-sub-tabs-wrap section{display:none;padding:20px 0 0;border-top:1px solid #ccc}#wpacu-google-fonts-optimize-tab-item:checked~#wpacu-google-fonts-optimize-tab-item-area,#wpacu-google-fonts-remove-tab-item:checked~#wpacu-google-fonts-remove-tab-item-area{display:block}body.wp-admin .wpacu-handle-notes{margin-top:10px!important}body.wp-admin .wpacu-handle-notes p{margin-top:0!important}body.wp-admin .wpacu-handle-notes p a{font-size:inherit}body.wp-admin .wpacu-handle-notes p a span.dashicons{font-size:19px;width:19px;height:19px;vertical-align:bottom;text-decoration:none}.wpacu-handle-notes{margin-top:12px!important;padding-top:5px;border-top:1px solid #e7e7e7}.wpacu-handle-notes .wpacu-handle-notes-field{display:none}.wpacu-handle-notes .wpacu-handle-notes-field>textarea{font-size:85%;padding:6px;width:320px;max-width:100%}.wpacu-handle-notes p{margin:10px 0 0!important}.wpacu-handle-notes p a.wpacu-add-handle-note{text-decoration:none;font-size:80%;display:inline-block;color:inherit}.wpacu-handle-notes p a.wpacu-add-handle-note span.dashicons{font-size:18px;width:18px;height:18px}.wrap_bulk_unload_options{width:auto;display:inline-flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.wrap_bulk_unload_options .wpacu_asset_options_wrap{flex-grow:1;margin:5px 10px 14px 0!important;padding:8px 10px 2px!important}.wrap_bulk_unload_options .wpacu_asset_options_wrap .wpacu_slider_text{position:relative!important;vertical-align:top;left:inherit!important;top:inherit!important}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch{position:relative;display:inline-block;min-width:52px;width:52px;height:29px;margin-right:5px!important}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input{display:none}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.15s;transition:.15s}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.15s;transition:.15s}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:checked+.wpacu_slider{background-color:#C00}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:focus+.wpacu_slider{box-shadow:0 0 1px #C00}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_slider_text{position:absolute;left:62px;top:3px}.editor-post-saved-state.is-wpacu-reloading{animation:edit-post__loading-fade-animation .5s infinite}body.wp-admin .wpacu_asset_row.wpacu-loading{position:relative}body.wp-admin .wpacu_asset_row.wpacu-loading .wpacu-ajax-loader{display:block!important}body.wp-admin .wpacu_asset_row .wpacu-ajax-loader{display:none;width:58px;height:58px;position:absolute;bottom:0;right:0;opacity:.75}.wpacu_asset_row input{width:auto;height:auto;min-height:16px}.wpacu_asset_row .tip{background:inherit;border-left:4px solid #e7e7e7;margin:5px 0;padding:7px;font-style:italic;font-size:small;line-height:1.4}.wpacu_asset_row td{width:100%;text-align:left}.wpacu_asset_row td p:last-child{margin-bottom:0!important}.wpacu_asset_row td .wpacu_asset_options_wrap{padding:8px 10px;margin:15px 0;background:#fff;border:1px solid #eee;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu_asset_row td .wpacu_asset_options_wrap p:first-child{margin-top:0;margin-bottom:8px!important}.wpacu_asset_row p.wpacu_handle{margin-top:0}.wpacu_asset_row li.wpacu_unload_this_page{display:block!important;position:relative}.wpacu-clearfix:after,.wpacu-clearfix:before{display:table;content:''}.wpacu-contract-expand-area{width:100%;margin:20px 0 0}.wpacu-contract-expand-area .col-left{float:left}.wpacu-contract-expand-area .col-left h4{margin-bottom:0}.wpacu-contract-expand-area .col-right{float:right}.wpacu-clearfix:after{clear:both}.wpacu-wp-button{color:#555;border-color:#ccc;background:#f7f7f7;box-shadow:0 1px 0 #ccc;vertical-align:top}body.wp-admin .wpacu-wp-button{font-size:13px;line-height:26px;height:28px}.wpacu-wp-button.wpacu-wp-button-secondary{display:inline-block;text-decoration:none;height:auto;margin:0 5px 0 0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wpacu-wp-button:hover{background:#fafafa;border-color:#999;color:#23282d}.distinguish-asset-list{list-style:none;margin-left:0;margin-bottom:5px;display:inline-block}.distinguish-asset-list li{float:left;margin-right:20px}.distinguish-asset-list li:last-child{margin-right:0}body[class*=asset-cleanup-pro] a.wpacu-plugin-contracted-wrap-link{padding:16px 6px 16px 41px!important}body[class*=asset-cleanup-pro] .wpacu-area-open .wpacu-plugin-toggle-all{font-size:12px!important;width:calc(100% - 26px)!important}body.wp-admin .wpacu-area-expanded .wpacu-plugin-toggle-all{top:5px}body.wp-admin .wpacu-area-expanded .wpacu-plugin-toggle-all ul li{font-size:12px!important}.wpacu-assets-collapsible-wrap{border:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location{margin-bottom:15px}.wpacu-assets-collapsible-wrap.wpacu-wrap-all{margin-top:20px}.wpacu-assets-collapsible-wrap.wpacu-wrap-area{margin-top:10px}.wpacu-assets-collapsible-wrap.wpacu-by-location>a.wpacu-assets-collapsible{padding:15px 15px 15px 43px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu_list_table{border-width:0;margin:0;border-spacing:inherit;width:100%;box-shadow:3px 3px 2px #ddd;border-bottom-right-radius:5px;border-top-right-radius:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location span.wpacu-child-location-name{font-weight:600}.wpacu-assets-collapsible-wrap.wpacu-by-location span.wpacu-child-location-version{font-weight:200}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area[data-wpacu-plugin=oxygen] .icon-area{border-radius:50%}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all{display:inline-block;padding:0;font-size:13px;width:100%;width:calc(100% + 46px);min-width:250px;position:absolute;left:100%;left:calc(100% + 6px);margin:0;top:4px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all ul{display:inline-block;margin:0;list-style:none;padding-left:13px;padding-top:0}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all ul li{padding:0;margin:0;line-height:normal;font-size:14px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all ul li:first-child{font-style:italic;margin-bottom:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content>table:last-child{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{display:inline;position:relative;z-index:1}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title:after{content:'';position:absolute;width:100%;left:0;bottom:0;height:1px;background-color:#fdfdfd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap{padding:0 0 10px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap.wpacu-area-open .wpacu-plugin-toggle-all{display:inline-block;padding:7px 12px 16px;font-size:14px;width:100%;text-align:left;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap.wpacu-area-open.wpacu-plugin-assets-last{margin-bottom:18px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link{color:inherit;text-decoration:none;font-weight:inherit;font-style:inherit;font-size:105%;line-height:initial;height:auto;margin:14px 0 0;padding:13px 6px 14px 39px;position:relative;display:block}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:after{position:absolute;font-size:18px;font-family:Dashicons;right:12px;top:14px;content:"\f132"}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-open:after{content:"\f460"}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-closed{border:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:hover{border:1px solid #878787;background:#f9f9f9}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:hover.wpacu-link-closed{box-shadow:3px 3px 2px #ddd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-open{border-top:1px solid #cdcdcd;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;border-bottom:none}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-closed.wpacu-last-wrap-link{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default{top:10px;left:10px;width:30px;height:30px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default .icon-area{width:30px;height:30px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default .icon-area:before{font-size:22px;line-height:22px;top:4px;left:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .wpacu-area-title{position:relative;padding:17px 10px 16px 46px;z-index:1}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .wpacu-area-title:after{content:'';position:absolute;width:100%;left:0;bottom:0;height:1px;background-color:#fdfdfd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-area-last{margin-bottom:18px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-area-open{padding:0;max-height:100%}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-area-closed{padding:0;overflow:hidden;max-height:0}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content>table:last-child{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{margin-top:0;margin-bottom:-1px;padding:14px 10px 16px 12px!important}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title.wpacu-theme-has-icon{padding:18px 10px 16px 58px!important}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area{margin-top:22px;margin-bottom:-1px;font-size:110%;line-height:initial}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area.wpacu-location-child-area-first{margin-top:2px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area.wpacu-area-expanded .wpacu-area-title{display:inline-block;z-index:1;padding:17px 10px 16px 46px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{display:inline;border-top-right-radius:8px;border-top-left-radius:8px;background-color:#f9f9f9;border-left:1px solid #cdcdcd;border-top:1px solid #cdcdcd;border-bottom:1px solid transparent;border-right:1px solid #cdcdcd;position:relative}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default{position:absolute;padding:0;top:10px;left:10px;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default:not(.has-icon){color:#b4b9be;background-color:#eee;box-shadow:inset 0 0 10px rgba(160,165,170,.15);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default:not(.has-icon) .icon-area:before{content:"\f106";font-family:Dashicons;position:absolute;font-size:28px;line-height:28px;top:5px;left:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default .icon-area{position:relative;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-theme{position:absolute;padding:0;top:10px;left:10px;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-theme .icon-area{position:relative;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-wp_core{border:1px solid #c00}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content{padding:0}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table{width:100%;margin:0}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row td,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row td{border-left:hidden;border-right:hidden;border-bottom:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child{margin-bottom:0!important}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child td:last-child,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child td:last-child{border-bottom:hidden}a.wpacu-assets-collapsible{color:#000;font-size:20px;text-decoration:none;display:block;position:relative;background-color:#f1f3f8;cursor:pointer;padding:15px 15px 15px 36px;width:auto;border:none;text-align:left;outline:0}a.wpacu-assets-collapsible>span.dashicons{font-size:25px;line-height:normal;position:absolute;top:15px;top:calc(50% - 21px);left:22px;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%)}a.wpacu-assets-collapsible:hover{background-color:#f1f3f8;text-decoration:none}a.wpacu-assets-collapsible:after{position:absolute;font-size:22px;font-family:Dashicons;right:14px;top:16px}a.wpacu-assets-collapsible:not(.wpacu-assets-collapsible-active):after{content:"\f132"}a.wpacu-assets-collapsible.wpacu-assets-collapsible-active{background-color:#f1f3f8}a.wpacu-assets-collapsible.wpacu-assets-collapsible-active:after{content:"\f460"}.wpacu-assets-collapsible-content{padding:0 16px;max-height:0;overflow:hidden;background-color:#fbfbfb8c}.wpacu-assets-collapsible-content .wpacu-assets-note{margin:0;padding:15px 15px 10px}.wpacu-assets-collapsible-content>div:not(.wpacu-assets-table-list-wrap){padding:16px 0 0}.wpacu-assets-collapsible-content>div>p:first-child{margin-top:0}.wpacu-assets-collapsible-content.wpacu-open{max-height:100%}a.wpacu-assets-inline-code-collapsible{color:inherit;font-size:14px;text-decoration:none;display:inline-block;position:relative;cursor:pointer;width:auto;outline:0;background:#f1f3f8;border:1px solid #cdcdcd;padding:4px 21px 4px 8px;margin:0 0 0 6px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}a.wpacu-assets-inline-code-collapsible:hover{border:1px solid #5c5c5c}a.wpacu-assets-inline-code-collapsible:after{position:absolute;font-size:15px;font-family:Dashicons;right:-3px;top:-1px;width:14px;height:14px;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%)}a.wpacu-assets-inline-code-collapsible:not(.wpacu-assets-inline-code-collapsible-active):after{content:"\f132"}a.wpacu-assets-inline-code-collapsible.wpacu-assets-inline-code-collapsible-active:after{content:"\f460"}.wpacu-assets-inline-code-collapsible-content{font-size:80%;padding:0 8px;max-height:0;overflow:hidden;background-color:#fbfbfb8c}.wpacu-assets-inline-code-collapsible-content>div{padding:7px 8px 0}.wpacu-assets-inline-code-collapsible-content>div>p{line-height:normal!important}.wpacu-assets-inline-code-collapsible-content>div>p:first-child{margin-top:0}.wpacu-assets-inline-code-collapsible-content.wpacu-open{max-height:100%}.wpacu_asset_row p div.select{display:inline-block}.wpacu-wrap-choose-position{display:inline}.wpacu-wrap-choose-position>div{display:inline-block}.wpacu-wrap-choose-position select{width:auto;font-size:inherit;display:inline;margin-left:6px;margin-right:4px}.wpacu-wrap-choose-position>.select>.select{display:inline}.wpacu-wrap-choose-position>.select>.select select{padding-right:30px}.wpacu-wrap-choose-position>.select>.select:after{right:15px;top:-4px}.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}.wp-list-table .wpacu_remove_global_attr_row.wpacu_selected,.wp-list-table .wpacu_restore_position_row.wpacu_selected{background:#e7e7e7}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}ol.getting-started li{font-size:14px;line-height:22px;margin-bottom:8px}.wpacu-get-help-wrap p{font-size:14px}.wpacu-get-help-wrap .help-content-wrap{margin:20px 0 25px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-moz-flex;display:-webkit-flex;display:flex;width:100%}@media only screen and (min-width:768px){.wpacu-get-help-wrap .help-content-wrap{-webkit-box-align:start;-ms-flex-align:start;-ms-grid-row-align:flex-start;align-items:flex-start}}@media only screen and (max-width:767px){.wpacu-get-help-wrap .help-content-wrap{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.wpacu-get-help-wrap .help-content-wrap .help-content{padding:15px;background:#fff;border:1px solid #E0E0E0;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;box-shadow:2px 3px 8px 0 #231f2038;flex:1 1 50%;margin-bottom:10px}.wpacu-get-help-wrap .help-content-wrap .help-content .content-title{margin:5px 0 15px}.wpacu-get-help-wrap .help-content-wrap .help-content .cols-wrap{width:100%;margin:0 auto;display:table}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area{margin:5px 0 0;position:relative}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.col-left{float:left;width:48%}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.col-right{float:right;width:48%}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.activate-plugin img{max-width:280px}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area img{width:99%;margin:8px 0;border:1px solid #cdcdcd;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-get-help-wrap .help-content-wrap .help-content.upgrade-help{order:2}@media only screen and (min-width:768px){.wpacu-get-help-wrap .help-content-wrap .help-content{margin-right:24px}.wpacu-get-help-wrap .help-content-wrap .help-content.upgrade-help{margin-right:0}}.wpacu-get-help-wrap .help-content-wrap .help-content.tech-help{order:1}@media only screen and (max-width:767px){.wpacu-get-help-wrap .help-content-wrap .help-content.tech-help{margin-bottom:30px}}.wpacu-get-help-wrap .help-content-wrap .help-content ul{list-style:none;padding-left:0}.wpacu-get-help-wrap .help-content-wrap .help-content ul li{font-size:14px;line-height:22px;margin-bottom:15px}.wpacu-get-help-wrap .help-content-wrap .help-content p:last-child,.wpacu-get-help-wrap .help-content-wrap .help-content ul li:last-child{margin-bottom:0}#wpacu-license-data-remove-area{display:none;margin:10px 0 25px}#wpacu-license-data-remove-area.wpacu-visible{display:block}span#wpacu-license-data-removed-msg{display:block;padding-left:26px}#wpacu-warning-read{display:none;margin:10px 0}#wpacu-warning-read span.dashicons-warning{color:#c00}#wpacu-warning-read.wpacu-visible{display:block}#wpacu-reset-submit-area{margin:10px 0;clear:both}#wpacu-reset-submit-btn{margin:10px 0 0}.wpacu-tools-area{margin:10px 20px 0 2px}.wpacu-tools-area .wpacu-tools-container{background:#fff;padding:15px;border:1px solid #cdcdcd;width:96%}.wpacu-tools-area .wpacu-tools-container form>div:first-child{margin:0 0 10px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning{display:none;box-sizing:border-box;margin-top:10px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning p{margin:0 0 10px;line-height:22px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning p:only-child{margin:0}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning ul{font-size:13px;list-style-type:disc;padding-left:30px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning.wpacu-visible{display:block}.wpacu-tools-area .wpacu-export-import-area{padding:10px}.wpacu-tools-area .wpacu-export-import-area form>p:first-of-type{margin-top:0}.wpacu-tools-area .wpacu-export-import-area form>p:last-of-type{margin-bottom:0}.wpacu-tools-area .wpacu-export-import-area:hover{background:rgba(40,44,42,.05);box-shadow:inset 0 0 10px rgba(160,165,170,.15)}.wpacu-tools-area .wpacu-export-import-area+hr{display:block;height:1px;border:0;border-top:1px solid #cdcdcd;margin:10px 0;padding:0}#wpacu-import-form button.wpacu-importing img.wpacu-spinner{display:inline-block}#wpacu-import-form button img.wpacu-spinner{display:none;margin:0 0 0 5px;height:16px;width:16px;vertical-align:middle}.wpacu-about-wrap .wpacu-about-text img{width:auto;height:150px;position:absolute;top:20px;right:-20px}@media only screen and (max-width:767px){.wpacu-about-wrap h1{margin:20px}.wpacu-about-wrap .wpacu-about-text img{display:none}.wpacu-about-wrap .wpacu-about-text{margin:20px}}.wpacu-about-wrap .about-wrap-content .area-title{font-size:19px;line-height:19px;margin-bottom:0}.wpacu-about-wrap hr{margin:10px 0}.wpacu-lite-vs-pro-wrap ul{display:flex;top:0;z-index:10;padding-bottom:14px}.wpacu-lite-vs-pro-wrap li{list-style:none;flex:1}.wpacu-lite-vs-pro-wrap li:last-child{border-right:1px solid #DDD}.wpacu-lite-vs-pro-wrap button{width:100%;border:1px solid #DDD;border-right:0;border-top:0;padding:10px;background:#FFF;font-size:14px;font-weight:700;height:60px;color:#999}.wpacu-lite-vs-pro-wrap li.active button{background:#F5F5F5;color:#000}.wpacu-lite-vs-pro-wrap table{border-collapse:collapse;table-layout:fixed;width:100%}.wpacu-lite-vs-pro-wrap th{background:inherit}.wpacu-lite-vs-pro-wrap tr.first{background:inherit;font-size:18px}.wpacu-lite-vs-pro-wrap tr.first .bg-lite{border-top:4px solid #6d6e70;background:#fff;color:#6d6e70}.wpacu-lite-vs-pro-wrap tr.first .bg-pro{border-top:4px solid green;background:#fff;color:green}.wpacu-lite-vs-pro-wrap tr:not(.first){background:#fff}.wpacu-lite-vs-pro-wrap tr:not(:last-child):hover{background:#f8f8f8}.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{height:53px;border:1px solid #DDD;padding:10px 16px;empty-cells:show;text-align:left}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{font-size:14px}}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{text-align:center;display:none}.wpacu-lite-vs-pro-wrap td.default{display:table-cell}.wpacu-lite-vs-pro-wrap .txt-l{font-size:28px;font-weight:700}.wpacu-lite-vs-pro-wrap .txt-top{position:relative;top:-9px;left:-2px}.wpacu-lite-vs-pro-wrap svg{width:18px;height:18px}.wpacu-lite-vs-pro-wrap svg path{fill:green}.wpacu-lite-vs-pro-wrap .tick{color:#2CA01C}.wpacu-lite-vs-pro-wrap .tick img{fill:#2CA01C}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap .txt-l{font-size:20px}.wpacu-lite-vs-pro-wrap .tick{font-size:15px}}.wpacu-lite-vs-pro-wrap .na{font-size:18px;opacity:.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"}.wpacu-lite-vs-pro-wrap .hide{border:0;background:0 0}.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{display:table-cell!important;width:auto}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{width:130px}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap .na{font-size:15px}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{width:42px}}@media only screen and (min-width:768px){.wpacu-lite-vs-pro-wrap td .button{font-size:16px!important}}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap td .button{font-size:14px!important;padding:0 20px!important}.wpacu-lite-vs-pro-wrap td .button.button-primary{margin-top:6px;margin-bottom:14px}}@media only screen and (min-width:768px){.wpacu-lite-vs-pro-wrap{margin-bottom:40px;clear:both}}.wpacu-video-areas>div{padding:20px;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-video-areas>div:nth-child(odd){background:#fff}.wpacu-video-areas>div:nth-child(even){background:inherit}@media only screen and (min-width:1200px){.wpacu-video-areas .wpacu-video-area-wrapper{margin:0 0 15px;display:flex}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right{padding:0 20px 0 25px}}@media only screen and (min-width:992px) and (max-width:1199px){.wpacu-video-areas .wpacu-video-area-wrapper{margin:0 0 40px}}.wpacu-video-areas .wpacu-video-area-wrapper ol{font-size:14px}.wpacu-video-areas .wpacu-video-area-wrapper ul{font-size:14px;list-style:disc;margin-left:22px}@media only screen and (min-width:1200px){.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right p:first-child{margin-top:0}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right p:last-child{margin-bottom:0}}@media only screen and (max-width:1199px){.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-video-wrapper{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-video-wrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}}#wpassetcleanup_asset_list.postbox h2{padding-left:52px!important;position:relative}#wpassetcleanup_asset_list.postbox h2:before{content:'';position:absolute;background-image:url(images/wpacu-logo-transparent-bg-v1.png);background-size:cover;top:6px;left:13px;width:33px;height:26px;opacity:.8;-webkit-filter:grayscale(100%);filter:grayscale(100%)}body.wp-admin .wpacu-modal{display:none;position:fixed;z-index:1000000;padding-top:15%;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,.4)}body.wp-admin .wpacu-modal-content{background-color:#fefefe;margin:auto;padding:20px;border:1px solid #888;width:80%;max-width:600px;border-radius:10px}body.wp-admin .wpacu-close{color:#aaa;float:right;font-size:28px;font-weight:700}body.wp-admin .wpacu-close:focus,body.wp-admin .wpacu-close:hover{color:#000;text-decoration:none;cursor:pointer}.wpacu-bulk-changes-tabs{display:table;position:relative;overflow:hidden;margin:0;width:100%}.wpacu-bulk-changes-tabs li{border-top:1px solid rgba(40,44,42,.1);border-left:1px solid rgba(40,44,42,.1);border-bottom:1px solid rgba(40,44,42,.1);float:left;line-height:38px;padding:0;position:relative;margin-bottom:12px}.wpacu-bulk-changes-tabs li:last-child{border-right:1px solid rgba(40,44,42,.1)}.wpacu-bulk-changes-tabs a{position:relative;background:rgba(40,44,42,.05);color:#004567;font-size:14px;font-weight:500;display:block;letter-spacing:0;outline:0;padding:6px 20px;text-decoration:none;border-top:3px solid transparent}.wpacu-bulk-changes-tabs a:hover{background:#f1f1f1;border-top:3px solid transparent}.wpacu-bulk-changes-tabs .current a{background:#fff;border-top:3px solid #004567}.wpacu-bulk-changes-tabs .current a:hover{background:#fff}.wpacu-bulk-changes-tabs .current a:after,.wpacu-bulk-changes-tabs .current a:before{top:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.wpacu-bulk-changes-tabs .current a:after{border-color:rgba(136,183,213,0);border-top-color:#fff;border-width:12px;margin-left:-12px}.wpacu-bulk-changes-tabs .current a:before{border-color:rgba(194,225,245,0);border-top-color:rgba(40,44,42,.1);border-width:13px;margin-left:-13px}
1
+ #wpacu-logo-wrap .wpacu-pro-sign.wpacu-lite,#wpacu-quick-actions{color:#74777b;background:rgba(40,44,42,.05)}#wpacu-pages-info-area{width:98%}#wpacu-top-area{margin:15px 0;padding:0 10px}#wpacu-quick-actions{float:right;width:auto;margin-right:30px;border-radius:10px;padding:6px 12px}#wpacu-quick-actions .wpacu-actions-title{font-weight:200;letter-spacing:.5px}#wpacu-quick-actions a{color:#004567;text-decoration:none}#wpacu-quick-actions a:hover{color:#0073aa}#wpacu-logo-wrap{width:auto;display:inline-block;position:relative}#wpacu-logo-wrap a{display:block}#wpacu-logo-wrap img{width:352px;height:79px}#wpacu-logo-wrap .wpacu-pro-sign{position:absolute;height:auto;font-family:FiraSans-Medium,proxima-nova-1,Montserrat,Helvetica,sans-serif;font-size:13px;font-weight:600;letter-spacing:1px;padding:5px 11px;border-radius:15px;right:-60px;top:30px;width:auto;display:inline-block;text-align:center}#wpacu-logo-wrap .wpacu-pro-sign.wpacu-pro{color:#004567;background-color:rgba(40,44,42,.05)}.wpacu-tabs{position:relative;overflow:hidden;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 ul li span.extra-info{position:absolute;font-size:12px;left:0;right:50%;bottom:12px;-webkit-transform:translate(50%,50%);transform:translate(50%,50%)}.wpacu-tabs nav ul li span.extra-info .dashicons{font-size:16px;margin-right:-3px;margin-top:1px}.wpacu-tabs nav ul li span.extra-info.license-status.inactive{color:#c00}.wpacu-tabs nav ul li span.extra-info.license-status.active{color:green}.wpacu-tabs nav ul li span.extra-info.assets-unloaded-false{color:#004567}.wpacu-license-area .notice .dashicons,.wpacu-settings-area .notice .dashicons,.wpacu-tabs nav ul li span.extra-info.assets-unloaded-true,.wpacu-tabs nav ul li span.extra-info.bulk-unloads-true{color:green}.wpacu-tabs nav a{position:relative;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5}.wpacu-tabs nav a span{vertical-align:middle;font-size:14px}.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 30px 0;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:#008f9c;border-bottom:none}.wpacu-tabs-style-topline nav a{padding:20px 18px;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{background:0 0;color:#008f9c}.wpacu-tabs-style-topline nav li.wpacu-tab-current a{background:0 0;box-shadow:inset 0 3px 0 #008f9c;color:#008f9c}.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-tab-nav-wrapper{border-bottom:none!important}.wpacu-tab-nav-wrapper .nav-tab.nav-tab-active{background:#fff;position:relative}.wpacu-tab-nav-wrapper .nav-tab.nav-tab-active:after{content:'';width:100%;bottom:-2px;left:0;position:absolute;border-bottom:2px solid #fff}.wpacu-script-attributes-area{margin:20px 0 0!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings{padding:5px 7px!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings.wpacu-first{margin:0 28px 0 0!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings label{margin:0!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings li{margin:0 16px 0 0!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings li:first-child{margin:0 10px 0 0!important}.wpacu-script-attributes-area.wpacu-lite ul.wpacu-script-attributes-settings li:last-child{margin:0 2px 0 0!important}.wpacu-script-attributes-area .wpacu-script-attributes-settings{background:#fff!important;border:1px solid #eee!important;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:5px 10px!important;list-style:none;display:inline-block;margin:0}.wpacu-script-attributes-area .wpacu-script-attributes-settings input[type=radio]{width:auto;padding:0;margin:0 5px 0 0}.wpacu-script-attributes-area .wpacu-script-attributes-settings.wpacu-first{margin:0 34px 0 0!important}.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 10px 0 0!important}.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_location_changed>td{border-left:#004567 4px solid}tr.wpacu_not_load td,tr.wpacu_not_load th{background:#FFE1E1!important}tr.wpacu_not_load td .wpacu-assets-inline-code-wrap,tr.wpacu_not_load td .wpacu-script-attributes-area,tr.wpacu_not_load th .wpacu-assets-inline-code-wrap,tr.wpacu_not_load th .wpacu-script-attributes-area{filter:alpha(opacity=45);opacity:.45}.dashicons-wpacu{width:17px;height:17px;margin:2px 0 0;font-size:16px;text-decoration:none;color:inherit!important}#wpacu_meta_box_content,.wpacu_widefat{width:99%}.wpacu_widefat .check-column.wpacu_check{padding:10px}body[class*=wpassetcleanup] #footer-left{border-left:2px solid green;padding-left:10px}#wpassetcleanup_asset_list small{width:auto;float:none;display:inline}#wpacu_meta_box_content .emoji{font-size:18px}#wpacu_meta_box_content h3{margin-left:0;padding-left:0}#wpacu_meta_box_content div.wpacu_note{padding:10px;background-color:#f5f5f5}#wpacu_meta_box_content .dashicons.dashicons-warning{color:#c00}#wpacu_meta_box_content .wpacu_verified{padding:10px;background-color:#f5f5f5;border-left:1px solid #ddd}#wpacu_meta_box_content .wpacu_verified span{color:#0073aa;font-weight:700}#wpacu_meta_box_content div.wpacu_warning{border:1px solid #c00}#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_meta_box_content ul.wpacu_asset_options label{font-weight:400;margin-right:5px;margin-top:5px;margin-bottom:5px}.wpacu-updated-frontend{font-weight:400;background-color:#fff;border-left:4px solid #46b450;border-top:1px solid #46b450;border-right:1px solid #46b450;border-bottom:1px solid #46b450;padding:9px 14px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu-updated-frontend span.dashicons-yes{color:#46b450;font-size:26px}#wpacu-update-front-settings-area{margin:10px 0;display:inline-block;position:relative}#wpacu-updating-front-settings{display:none;position:absolute;top:5px;right:-35px}#wpacu_wrap_assets{color:#000!important;text-align:left!important;clear:both!important;width:90%!important;padding:20px!important;margin:30px 0 0 15px!important;border:1px solid #cdcdcd;z-index:10000!important;position:relative!important;background-color:#fff!important}#wpacu_wrap_assets div.wpacu_warning{border:1px solid #c00;padding:5px 10px}#wpacu_wrap_assets small{display:inline!important;margin:0!important;letter-spacing:normal!important}#wpacu_wrap_assets input[type=checkbox]{width:auto!important;margin-right:4px!important}#wpacu_wrap_assets img:not(.wpacu-ajax-loader){display:inline-block!important}#wpacu_wrap_assets p{line-height:22px!important;margin:10px 0!important;text-align:left!important;font-weight:400!important}#wpacu_wrap_assets p:first-child,.wpacu_verified{margin:0 0 10px!important}#wpacu_wrap_assets h1{margin:0 0 20px!important;font-size:160%!important;text-align:left!important}#wpacu_wrap_assets h3{margin:20px 0;font-size:130%}.wpacu_asset_row:first-child td{border-top:1px solid #cdcdcd}.wpacu_asset_row td{border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;border-bottom:1px solid #cdcdcd}.wpacu_asset_row.wpacu_notice_row td{position:relative;padding:5px;border-bottom:1px solid transparent}.wpacu_asset_row.wpacu_notice_row td div.wpacu-warning{width:auto;margin:5px;font-style:italic}.wpacu_asset_row:not(.wpacu_notice_row) td{padding:18px!important;position:relative}.wpacu_asset_row:not(.wpacu_notice_row) td.selected,.wpacu_asset_row:not(.wpacu_notice_row) td:hover{-moz-box-shadow:inset 0 0 12px #cdcdcd;-webkit-box-shadow:inset 0 0 12px #cdcdcd;box-shadow:inset 0 0 12px #cdcdcd}.wpacu_asset_row:not(.wpacu_notice_row) td p{padding:0!important;margin-bottom:10px!important;word-wrap:break-word!important;-ms-word-break:break-all;word-break:break-word}.wpacu_asset_row:not(.wpacu_notice_row) td label{width:auto!important;margin:0!important;cursor:pointer!important;display:inline-block!important;font-size:100%!important;font-weight:400!important}.wpacu_asset_row:not(.wpacu_notice_row) td label span:not(.dashicons){font-size:100%!important}.wpacu_asset_row:not(.wpacu_notice_row) td.wpacu_check{width:50px!important}.asset-table-extra-info td{padding:5px!important}body.wp-admin .wpacu_asset_row td.wpacu_check{width:25px!important}.wpacu_asset_row .dashicons-warning{color:red!important}label.wpacu_add_global{cursor:pointer!important}label.wpacu_input_load_checked{font-weight:700;color:#d54e21}label.wpacu_global_unload_exception{font-weight:700!important}tr.wpacu_global_rule_row.selected{background:#e7e7e7}.nav-tab-wrapper{border-bottom:1px solid #ccc;width:95%}.nav-tab-wrapper.nav-assets-manager .nav-tab{font-size:13px;font-weight:500;padding:6px 10px}.nav-tab-wrapper.nav-assets-manager .nav-tab.for-pro{padding:6px 8px 6px 3px}ul.wpacu_asset_options{margin:0 10px 0 0;padding:0}ul.wpacu_asset_options li{margin:0 10px 0 0;list-style:none;display:inline-block;line-height:normal}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}.wpacu_list_table,.wpacu_list_table div,.wpacu_list_table li,.wpacu_list_table p{font-weight:400}.wpacu_striped>tbody>:nth-child(even),ul.wpacu_striped>:nth-child(even){background-color:#fff!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.wpacu_submitting,.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.wpacu_submitting{cursor:default!important}.wpacu_update_btn:active{position:relative!important;top:1px!important}.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;-webkit-border-radius:.25rem;-moz-border-radius:.25rem;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;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.wpacu-btns .btn-link,.wpacu-btns .btn-link.active,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:disabled{background-color:transparent}.wpacu-btns .btn-link,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{border-color:transparent}.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{color:#014c8c;text-decoration:underline;background-color:transparent}.go-pro-button,.wpacu-btns .btn-link:disabled:focus,.wpacu-btns .btn-link:disabled:hover{text-decoration:none}.wpacu-btns .btn-link:disabled{color:#636c72}.wpacu-btns .btn-group-lg>.btn,.wpacu-btns .btn-lg{padding:.75rem 1.5rem;font-size:1.25rem;-webkit-border-radius:.3rem;-moz-border-radius:.3rem;border-radius:.3rem}.wpacu-btns .btn-group-sm>.btn,.wpacu-btns .btn-sm{padding:.25rem .5rem;font-size:.875rem;-webkit-border-radius:.2rem;-moz-border-radius:.2rem;border-radius:.2rem}.wpacu-btns .btn-block{display:block;width:100%}.wpacu-btns .btn-block+.btn-block{margin-top:.5rem}.wpacu-btns input[type=reset].btn-block,.wpacu-btns input[type=button].btn-block,.wpacu-btns input[type=submit].btn-block{width:100%}.wpacu-btns .fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.go-pro-button{background-color:#4CAF50;border:2px solid #4CAF50;color:#fff;padding:12px 18px;text-align:center;display:inline-block;font-size:16px;margin:4px 2px;cursor:pointer;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;-webkit-transition-duration:.4s;transition-duration:.4s}.go-pro-button:hover{background-color:#fff;color:#000;border:2px solid #4CAF50;text-decoration:none}.go-pro-link-no-style,.wordpress-core-file{display:inline-block;color:inherit;text-decoration:none}.wpacu-restore-pos-btn{font-size:14px!important;line-height:normal!important;height:42px!important;padding:0 18px!important;margin-top:10px!important}body.wp-admin .wpacu_asset_row .go-pro-link-no-style .wpacu-tooltip{padding:8px 2px}body.wp-admin .go-pro-link-no-style .wpacu-tooltip{text-shadow:none;font-weight:400;font-size:12px;line-height:16px;padding:8px 11px}.go-pro-link-no-style .wpacu-tooltip,.wordpress-core-file .wpacu-tooltip{font-size:14px;line-height:18px;z-index:1;visibility:hidden;text-align:center}.go-pro-link-no-style{position:relative}.go-pro-link-no-style:not(.nav-tab){font-style:italic}.go-pro-link-no-style.no-transition .wpacu-tooltip{-webkit-transition:0s all ease;transition:0s all ease;-webkit-transition-delay:0s;transition-delay:0s}.go-pro-link-no-style>img{max-width:20px;max-height:20px}.go-pro-link-no-style .wpacu-tooltip{position:absolute;width:160px;background-color:#00a7a7;color:#fff;padding:8px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;bottom:100%;bottom:calc(100% + 15px);left:50%;margin-left:-65px;-webkit-transition:.1s all ease;transition:.1s all ease;-webkit-transition-delay:0s;transition-delay:0s}.go-pro-link-no-style .wpacu-tooltip:after{content:"";position:absolute;border-width:10px;border-style:solid;top:100%;left:50%;left:calc(50% - 10px);border-color:#00a7a7 transparent transparent}.go-pro-link-no-style .wpacu-tooltip.wpacu-on-pages-btn{cursor:pointer;margin-left:-77px;width:130px}.go-pro-link-no-style .wpacu-tooltip.wpacu-larger{width:240px}.go-pro-link-no-style:hover .wpacu-tooltip{visibility:visible}.wpacu_list_table tr:first-child .wordpress-core-file .wpacu-tooltip{bottom:-40px;left:120px;margin-left:-86px}.wpacu_list_table tr:first-child .wordpress-core-file .wpacu-tooltip:after{top:41px;left:-20px;border-color:transparent #c00 transparent transparent}.wordpress-core-file{position:relative;font-style:normal}.wordpress-core-file .wpacu-tooltip{position:absolute;width:160px;background-color:#c00;color:#fff;padding:6px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;bottom:100%;bottom:calc(100% + 15px);left:50%;margin-left:-86px;-webkit-transition:.1s all ease;transition:.1s all ease;-webkit-transition-delay:0s;transition-delay:0s}.wordpress-core-file .wpacu-tooltip:after{content:"";position:absolute;border-width:10px;border-style:solid;top:100%;left:50%;left:calc(50% - 10px);border-color:#c00 transparent transparent}.wordpress-core-file:hover .wpacu-tooltip{visibility:visible}.ajax-direct-call-error-area{background:#fff;padding:10px;border:1px solid #c00;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ajax-direct-call-error-area td{padding:6px}.ajax-direct-call-error-area .note{margin-top:0;padding-top:0}.ajax-direct-call-error-area .error-code{color:#c00;font-weight:700}.ajax-wp-remote-post-call-error-area{background:#fff;padding:20px}.ajax-wp-remote-post-call-error-area .table-data{background:0 0;border:1px solid #c66;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.ajax-wp-remote-post-call-error-area .table-data td{padding:10px}.wrap-upgrade-info{background:#fff;padding:0 15px;border:1px solid #cdcdcd;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-notice{margin:20px 20px 0 0!important}.wpacu-notice p{font-weight:600!important;font-style:italic}.wpacu-notice .dashicons{font-weight:inherit!important;color:#46b450!important;margin-right:4px;vertical-align:text-bottom;font-size:27px}.wpacu-notice-info{padding:12px 12px 12px 16px;background:#fff;border-left:4px solid #008f9c}.wpacu-notice-info p{margin-top:8px}.wpacu-notice-info p:first-child{margin-top:0}.wpacu-notice-info p:last-child{margin-bottom:0}.wpacu-warning{font-size:15px;padding:10px;background:#fffcec;border:1px solid #fdd5c9;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;margin:0 0 5px;width:100%}.pro-page-unlock-notice{-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:10px;background:#f2faf2;border:1px solid #c0e8c0;width:auto;display:block}.wpacu-license-area .notice,.wpacu-settings-area .notice{margin-left:0;padding:10px!important;width:97%;box-sizing:border-box;font-weight:600;font-style:italic}#wpacu-dom-get-type-selections,.wpacu-radio-selections{float:none;clear:both;width:auto;display:inline-block;margin-bottom:0;margin-top:0}#wpacu-dom-get-type-selections.wpacu-vertical,.wpacu-radio-selections.wpacu-vertical{display:block;margin-top:15px;margin-bottom:18px}#wpacu-dom-get-type-selections.wpacu-vertical li,.wpacu-radio-selections.wpacu-vertical li{float:none;margin-bottom:12px}#wpacu-dom-get-type-selections.wpacu-vertical li:last-child,.wpacu-radio-selections.wpacu-vertical li:last-child{margin-bottom:0}#wpacu-dom-get-type-selections li,.wpacu-radio-selections li{margin-right:30px;float:left;margin-bottom:0}#wpacu-dom-get-type-selections li:first-child,.wpacu-radio-selections li:first-child{margin-right:15px}#wpacu-dom-get-type-selections li:last-child,.wpacu-radio-selections li:last-child{margin-right:0}.wpacu_combine_loaded_js_level_area{display:none;background:0 0;border-left:2px solid #008f9c;padding-top:8px;padding-bottom:8px;padding-right:10px;padding-left:10px;margin:20px 0 15px}.wpacu_combine_loaded_js_level_area.wpacu_active{display:block}#wpacu-dom-get-type-infos{margin-bottom:0}#wpacu-dom-get-type-infos li{margin-bottom:0;line-height:20px}.wpacu-wrap li,.wpacu-wrap p,.wpacu-wrap td{font-weight:400}.wpacu-wrap small{width:auto;float:none;display:inline}.wpacu-wrap.wpacu-settings-show-all .wpacu-settings-tab-content{display:block;width:100%}.wpacu-wrap.wpacu-settings-show-all .wpacu-settings-area-title{color:#004567;padding:16px 15px;background:#f8f8f8;border-left:5px solid #004567b0;border-top:1px solid #e7e7e7;border-right:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;font-size:1.45em;font-weight:500}.wpacu-wrap.wpacu-settings-show-all #wpacu-update-button-area{margin:0}.wpacu-wrap.wpacu-settings-show-all #wpacu-update-button-area .button{padding:11px 28px;height:auto;font-size:18px}.wpacu-wrap.wpacu-settings-show-all #wpacu-updating-settings{margin-left:224px;top:25px}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch{width:auto;height:auto}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch input,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch input{display:block}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch input[type=checkbox],.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch input[type=checkbox]{margin:0 0 3px}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch .wpacu_slider,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch .wpacu_slider{display:none}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input{display:none}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch:not(.wpacu_switch_standard) .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.2s;transition:.2s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch:not(.wpacu_switch_standard) .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.2s;transition:.2s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:checked+.wpacu_slider{background-color:#52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:focus+.wpacu_slider{box-shadow:0 0 1px #52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch .wpacu_slider.wpacu_round{border-radius:29px}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_disabled,.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_locked_for_pro{opacity:.3}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_disabled:before{content:"\f160";font-family:Dashicons,Arial,"Times New Roman","Bitstream Charter",Times,serif;position:absolute;font-size:23px;top:5px;right:2px;z-index:1000}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle{margin-top:4px;line-height:1.4}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle em,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle em{font-weight:200}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_read_more,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_read_more{margin-top:-10px;font-style:italic;font-size:12px}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices{list-style:none;margin:0}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices li,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices li{float:left;margin-right:30px}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li:last-child,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li:last-child,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices li:last-child{margin-right:0}#wpacu-assets-list-by-location-selected{background:0 0;border:1px solid #e7e7e7;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:8px;clear:both}.notice.notice-success+.wpacu-wrap.wpacu-settings-area{margin-top:20px}.wpacu-license-action-btn-area{margin-top:0;position:relative;display:inline-block}.wpacu-license-spinner{display:none;position:absolute;right:-30px;top:4px}.wpacu-license-spinner img{width:20px;height:20px}#wpacu-activation-issues-info{border-radius:10px;width:90%;margin-top:20px;font-size:14px;padding:6px 20px;background:#fff;border:1px solid #e7e7e7}#wpacu-activation-issues-info ol li{font-size:13px;margin-bottom:10px}#wpacu-mark-license-area-wrap{margin:15px 0}.wpacu-form-table.wpacu-license th{width:150px}.wpacu-form-table th{vertical-align:top;text-align:left;padding:5px 20px 20px 0;width:200px;line-height:1.3;font-weight:600}.wpacu-form-table th label{color:#23282d;font-weight:600;font-size:14px;text-shadow:none;vertical-align:middle;cursor:pointer}.wpacu-form-table td{padding-bottom:25px}.wpacu-form-table td:last-child p:last-child{margin:0}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox],.wpacu-form-table label input[type=checkbox]{height:20px;width:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:checked,.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:hover,.wpacu-form-table label input[type=checkbox]:checked,.wpacu-form-table label input[type=checkbox]:hover{border:1px solid green}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:checked:before,.wpacu-form-table label input[type=checkbox]:checked:before{color:#52af00;font:400 24px/1 dashicons}.wpacu-form-table .wpacu-fancy-radio input[type=radio]{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;position:relative;height:20px;width:20px;margin:2px 0 0}.wpacu-form-table .wpacu-fancy-radio input[type=radio]:checked,.wpacu-form-table .wpacu-fancy-radio input[type=radio]:hover{border:1px solid green}.wpacu-form-table .wpacu-fancy-radio input[type=radio]:checked:before{margin:0;line-height:inherit;text-indent:inherit;content:'';position:absolute;top:4px;left:4px;width:10px;height:10px;border-radius:50%;background:#52af00;color:#52af00;font:400 24px/1 dashicons}#wpacu-settings-vertical-tab-wrap{display:table;width:100%}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text{margin:4px 0 0}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small{font-weight:lighter}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap{position:relative;padding-left:14px}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status{position:absolute;left:0;top:2px;height:10px;width:10px;border-radius:50%;display:inline-block;opacity:.75}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status.wpacu-on{background:#52af00}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status.wpacu-off{background:#ccc}#wpacu-settings-vertical-tab-wrap *{box-sizing:border-box}.wpacu-settings-tab{display:table-cell;width:20%;height:100%;vertical-align:top}.wpacu-settings-tab a{text-decoration:none;border-left:3px solid transparent;display:block;background-color:#f1f1f1;color:#004567;padding:17px 16px;width:100%;outline:0;text-align:left;cursor:pointer;font-size:14px;font-weight:600;border-bottom:1px solid #ccc}.wpacu-settings-tab a:first-child{border-top:1px solid transparent!important}.wpacu-settings-tab a:last-child{border-bottom:1px solid transparent!important}.wpacu-settings-tab a:hover{background-color:#fff;border-left:3px solid #004567;position:relative}.wpacu-settings-tab a.active{color:#004567;background-color:#fff;border-left:3px solid #004567;position:relative;border-bottom:1px solid #ccc}.wpacu-settings-tab a.active:after{content:'';position:absolute;height:100%;width:1px;top:0;right:-1px;background-color:#fff}.wpacu-settings-tab-content{background-color:#fff;display:none;padding:12px 18px;width:79%;border-left:none;height:100%;border-top-right-radius:10px;border-bottom-right-radius:10px}.wpacu-settings-tab-content h2{padding:0 0 15px;border-bottom:1px solid #e7e7e7}.wpacu-settings-tab-content.active{display:table-cell}#wpacu_minify_css_exceptions_area,#wpacu_minify_js_exceptions_area{margin:16px 0 0}#wpacu-update-button-area{position:relative;margin-left:20%}#wpacu-update-button-area.no-left-margin{margin-left:0}#wpacu-update-button-area p{margin-top:10px}#wpacu-update-button-area .button{padding:5px 18px;height:38px;font-size:15px}#wpacu-updating-settings{position:absolute;margin-left:183px;top:19px;display:none}#combine_loaded_js_info_area{position:relative}#combine_loaded_js_info_area.locked-for-pro:before{position:absolute;content:'';height:100%;width:100%;background:#fff;opacity:.5;z-index:10000}.google_fonts_load_types{clear:both;margin:20px 0 15px;display:flex}.google_fonts_load_types>div{text-align:left}.google_fonts_load_types>div input{float:left;margin:0 7px 20px 0!important}.wpacu-sub-tabs-wrap{min-width:320px;margin:0 auto}.wpacu-sub-tabs-wrap input.wpacu-nav-input{display:none}.wpacu-sub-tabs-wrap label.wpacu-nav-label{display:inline-block;margin:0 0 -1px;padding:15px 25px;font-weight:600;text-align:center;color:#74777b;border-left:1px solid transparent;border-right:1px solid transparent;border-top:3px solid transparent;border-bottom:0}.wpacu-sub-tabs-wrap label.wpacu-nav-label:hover{cursor:pointer}.wpacu-sub-tabs-wrap input.wpacu-nav-input:checked+label.wpacu-nav-label{color:#004567;border-left:1px solid #ccc;border-right:1px solid #ccc;border-top:3px solid #004567;border-bottom:1px solid #fff}.wpacu-sub-tabs-wrap section{display:none;padding:20px 0 0;border-top:1px solid #ccc}#wpacu-google-fonts-optimize-tab-item:checked~#wpacu-google-fonts-optimize-tab-item-area,#wpacu-google-fonts-remove-tab-item:checked~#wpacu-google-fonts-remove-tab-item-area{display:block}body.wp-admin .wpacu-handle-notes{margin-top:10px!important}body.wp-admin .wpacu-handle-notes p{margin-top:0!important}body.wp-admin .wpacu-handle-notes p a{font-size:inherit}body.wp-admin .wpacu-handle-notes p a span.dashicons{font-size:19px;width:19px;height:19px;vertical-align:bottom;text-decoration:none}.wpacu-handle-notes{margin-top:12px!important;padding-top:5px;border-top:1px solid #e7e7e7}.wpacu-handle-notes .wpacu-handle-notes-field{display:none}.wpacu-handle-notes .wpacu-handle-notes-field>textarea{font-size:85%;padding:6px;width:320px;max-width:100%}.wpacu-handle-notes p{margin:10px 0 0!important}.wpacu-handle-notes p a.wpacu-add-handle-note{text-decoration:none;font-size:80%;display:inline-block;color:inherit}.wpacu-handle-notes p a.wpacu-add-handle-note span.dashicons{font-size:18px;width:18px;height:18px}.wrap_bulk_unload_options{width:auto;display:inline-flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.wrap_bulk_unload_options .wpacu_asset_options_wrap{flex-grow:1;margin:5px 10px 14px 0!important;padding:8px 10px 2px!important}.wrap_bulk_unload_options .wpacu_asset_options_wrap .wpacu_slider_text{position:relative!important;vertical-align:top;left:inherit!important;top:inherit!important}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch{position:relative;display:inline-block;min-width:52px;width:52px;height:29px;margin-right:5px!important}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input{display:none}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.15s;transition:.15s}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.15s;transition:.15s}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:checked+.wpacu_slider{background-color:#C00}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:focus+.wpacu_slider{box-shadow:0 0 1px #C00}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider.wpacu_round{border-radius:29px}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_slider_text{position:absolute;left:62px;top:3px}.editor-post-saved-state.is-wpacu-reloading{animation:edit-post__loading-fade-animation .5s infinite}body.wp-admin .wpacu_asset_row.wpacu-loading{position:relative}body.wp-admin .wpacu_asset_row.wpacu-loading .wpacu-ajax-loader{display:block!important}body.wp-admin .wpacu_asset_row .wpacu-ajax-loader{display:none;width:58px;height:58px;position:absolute;bottom:0;right:0;opacity:.75}.wpacu_asset_row input{width:auto;height:auto;min-height:16px}.wpacu_asset_row .tip{background:inherit;border-left:4px solid #e7e7e7;margin:5px 0;padding:7px;font-style:italic;font-size:small;line-height:1.4}.wpacu_asset_row td{width:100%;text-align:left}.wpacu_asset_row td p:last-child{margin-bottom:0!important}.wpacu_asset_row td .wpacu_asset_options_wrap{padding:8px 10px;margin:15px 0;background:#fff;border:1px solid #eee;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu_asset_row td .wpacu_asset_options_wrap p:first-child{margin-top:0;margin-bottom:8px!important}.wpacu_asset_row p.wpacu_handle{margin-top:0}.wpacu_asset_row li.wpacu_unload_this_page{display:block!important;position:relative}.wpacu-clearfix:after,.wpacu-clearfix:before{display:table;content:''}.wpacu-contract-expand-area{width:100%;margin:20px 0 0}.wpacu-contract-expand-area .col-left{float:left}.wpacu-contract-expand-area .col-left h4{margin-bottom:0}.wpacu-contract-expand-area .col-right{float:right}.wpacu-clearfix:after{clear:both}.wpacu-wp-button{color:#555;border-color:#ccc;background:#f7f7f7;box-shadow:0 1px 0 #ccc;vertical-align:top}body.wp-admin .wpacu-wp-button{font-size:13px;line-height:26px;height:28px}.wpacu-wp-button.wpacu-wp-button-secondary{display:inline-block;text-decoration:none;height:auto;margin:0 5px 0 0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wpacu-wp-button:hover{background:#fafafa;border-color:#999;color:#23282d}.distinguish-asset-list{list-style:none;margin-left:0;margin-bottom:5px;display:inline-block}.distinguish-asset-list li{float:left;margin-right:20px}.distinguish-asset-list li:last-child{margin-right:0}body[class*=asset-cleanup-pro] a.wpacu-plugin-contracted-wrap-link{padding:16px 6px 16px 41px!important}body[class*=asset-cleanup-pro] .wpacu-area-open .wpacu-plugin-toggle-all{font-size:12px!important;width:calc(100% - 26px)!important}body.wp-admin .wpacu-area-expanded .wpacu-plugin-toggle-all{top:5px}body.wp-admin .wpacu-area-expanded .wpacu-plugin-toggle-all ul li{font-size:12px!important}.wpacu-assets-collapsible-wrap{border:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location{margin-bottom:15px}.wpacu-assets-collapsible-wrap.wpacu-wrap-all{margin-top:20px}.wpacu-assets-collapsible-wrap.wpacu-wrap-area{margin-top:10px}.wpacu-assets-collapsible-wrap.wpacu-by-location>a.wpacu-assets-collapsible{padding:15px 15px 15px 43px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu_list_table{border-width:0;margin:0;border-spacing:inherit;width:100%;box-shadow:3px 3px 2px #ddd;border-bottom-right-radius:5px;border-top-right-radius:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location span.wpacu-child-location-name{font-weight:600}.wpacu-assets-collapsible-wrap.wpacu-by-location span.wpacu-child-location-version{font-weight:200}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area[data-wpacu-plugin=oxygen] .icon-area{border-radius:50%}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all{display:inline-block;padding:0;font-size:13px;width:100%;width:calc(100% + 46px);min-width:250px;position:absolute;left:100%;left:calc(100% + 6px);margin:0;top:4px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all ul{display:inline-block;margin:0;list-style:none;padding-left:13px;padding-top:0}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all ul li{padding:0;margin:0;line-height:normal;font-size:14px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all ul li:first-child{font-style:italic;margin-bottom:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content>table:last-child{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{display:inline;position:relative;z-index:1}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title:after{content:'';position:absolute;width:100%;left:0;bottom:0;height:1px;background-color:#fdfdfd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap{padding:0 0 10px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap.wpacu-area-open .wpacu-plugin-toggle-all{display:inline-block;padding:7px 12px 16px;font-size:14px;width:100%;text-align:left;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap.wpacu-area-open.wpacu-plugin-assets-last{margin-bottom:18px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link{color:inherit;text-decoration:none;font-weight:inherit;font-style:inherit;font-size:105%;line-height:initial;height:auto;margin:14px 0 0;padding:13px 6px 14px 39px;position:relative;display:block}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:after{position:absolute;font-size:18px;font-family:Dashicons;right:12px;top:14px;content:"\f132"}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-open:after{content:"\f460"}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-closed{border:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:hover{border:1px solid #878787;background:#f9f9f9}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:hover.wpacu-link-closed{box-shadow:3px 3px 2px #ddd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-open{border-top:1px solid #cdcdcd;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;border-bottom:none}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-closed.wpacu-last-wrap-link{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default{top:10px;left:10px;width:30px;height:30px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default .icon-area{width:30px;height:30px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default .icon-area:before{font-size:22px;line-height:22px;top:4px;left:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .wpacu-area-title{position:relative;padding:17px 10px 16px 46px;z-index:1}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .wpacu-area-title:after{content:'';position:absolute;width:100%;left:0;bottom:0;height:1px;background-color:#fdfdfd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-area-last{margin-bottom:18px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-area-open{padding:0;max-height:100%}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-area-closed{padding:0;overflow:hidden;max-height:0}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content>table:last-child{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{margin-top:0;margin-bottom:-1px;padding:14px 10px 16px 12px!important}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title.wpacu-theme-has-icon{padding:18px 10px 16px 58px!important}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area{margin-top:22px;margin-bottom:-1px;font-size:110%;line-height:initial}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area.wpacu-location-child-area-first{margin-top:2px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area.wpacu-area-expanded .wpacu-area-title{display:inline-block;z-index:1;padding:17px 10px 16px 46px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{display:inline;border-top-right-radius:8px;border-top-left-radius:8px;background-color:#f9f9f9;border-left:1px solid #cdcdcd;border-top:1px solid #cdcdcd;border-bottom:1px solid transparent;border-right:1px solid #cdcdcd;position:relative}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default{position:absolute;padding:0;top:10px;left:10px;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default:not(.has-icon){color:#b4b9be;background-color:#eee;box-shadow:inset 0 0 10px rgba(160,165,170,.15);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default:not(.has-icon) .icon-area:before{content:"\f106";font-family:Dashicons;position:absolute;font-size:28px;line-height:28px;top:5px;left:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default .icon-area{position:relative;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-theme{position:absolute;padding:0;top:10px;left:10px;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-theme .icon-area{position:relative;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-wp_core{border:1px solid #c00}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content{padding:0}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table{width:100%;margin:0}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row td,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row td{border-left:hidden;border-right:hidden;border-bottom:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child{margin-bottom:0!important}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child td:last-child,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child td:last-child{border-bottom:hidden}a.wpacu-assets-collapsible{color:#000;font-size:20px;text-decoration:none;display:block;position:relative;background-color:#f1f3f8;cursor:pointer;padding:15px 15px 15px 36px;width:auto;border:none;text-align:left;outline:0}a.wpacu-assets-collapsible>span.dashicons{font-size:25px;line-height:normal;position:absolute;top:15px;top:calc(50% - 21px);left:22px;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%)}a.wpacu-assets-collapsible:hover{background-color:#f1f3f8;text-decoration:none}a.wpacu-assets-collapsible:after{position:absolute;font-size:22px;font-family:Dashicons;right:14px;top:16px}a.wpacu-assets-collapsible:not(.wpacu-assets-collapsible-active):after{content:"\f132"}a.wpacu-assets-collapsible.wpacu-assets-collapsible-active{background-color:#f1f3f8}a.wpacu-assets-collapsible.wpacu-assets-collapsible-active:after{content:"\f460"}.wpacu-assets-collapsible-content{padding:0 16px;max-height:0;overflow:hidden;background-color:#fbfbfb8c}.wpacu-assets-collapsible-content .wpacu-assets-note{margin:0;padding:15px 15px 10px}.wpacu-assets-collapsible-content>div:not(.wpacu-assets-table-list-wrap){padding:16px 0 0}.wpacu-assets-collapsible-content>div>p:first-child{margin-top:0}.wpacu-assets-collapsible-content.wpacu-open{max-height:100%}a.wpacu-assets-inline-code-collapsible{color:inherit;font-size:14px;text-decoration:none;display:inline-block;position:relative;cursor:pointer;width:auto;outline:0;background:#f1f3f8;border:1px solid #cdcdcd;padding:4px 21px 4px 8px;margin:0 0 0 6px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}a.wpacu-assets-inline-code-collapsible:hover{border:1px solid #5c5c5c}a.wpacu-assets-inline-code-collapsible:after{position:absolute;font-size:15px;font-family:Dashicons;right:-3px;top:-1px;width:14px;height:14px;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%)}a.wpacu-assets-inline-code-collapsible:not(.wpacu-assets-inline-code-collapsible-active):after{content:"\f132"}a.wpacu-assets-inline-code-collapsible.wpacu-assets-inline-code-collapsible-active:after{content:"\f460"}.wpacu-assets-inline-code-collapsible-content{font-size:80%;padding:0 8px;max-height:0;overflow:hidden;background-color:#fbfbfb8c}.wpacu-assets-inline-code-collapsible-content>div{padding:7px 8px 0}.wpacu-assets-inline-code-collapsible-content>div>p{line-height:normal!important}.wpacu-assets-inline-code-collapsible-content>div>p:first-child{margin-top:0}.wpacu-assets-inline-code-collapsible-content.wpacu-open{max-height:100%}.wpacu_asset_row p div.select{display:inline-block}.wpacu-wrap-choose-position{display:inline}.wpacu-wrap-choose-position>div{display:inline-block}.wpacu-wrap-choose-position select{width:auto;font-size:inherit;display:inline;margin-left:6px;margin-right:4px}.wpacu-wrap-choose-position>.select>.select{display:inline}.wpacu-wrap-choose-position>.select>.select select{padding-right:30px}.wpacu-wrap-choose-position>.select>.select:after{right:15px;top:-4px}.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}.wp-list-table .wpacu_remove_global_attr_row.wpacu_selected,.wp-list-table .wpacu_restore_position_row.wpacu_selected{background:#e7e7e7}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}ol.getting-started li{font-size:14px;line-height:22px;margin-bottom:8px}.wpacu-get-help-wrap p{font-size:14px}.wpacu-get-help-wrap .help-content-wrap{margin:20px 0 25px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-moz-flex;display:-webkit-flex;display:flex;width:100%}@media only screen and (min-width:768px){.wpacu-get-help-wrap .help-content-wrap{-webkit-box-align:start;-ms-flex-align:start;-ms-grid-row-align:flex-start;align-items:flex-start}}@media only screen and (max-width:767px){.wpacu-get-help-wrap .help-content-wrap{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.wpacu-get-help-wrap .help-content-wrap .help-content{padding:15px;background:#fff;border:1px solid #E0E0E0;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;box-shadow:2px 3px 8px 0 #231f2038;flex:1 1 50%;margin-bottom:10px}.wpacu-get-help-wrap .help-content-wrap .help-content .content-title{margin:5px 0 15px}.wpacu-get-help-wrap .help-content-wrap .help-content .cols-wrap{width:100%;margin:0 auto;display:table}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area{margin:5px 0 0;position:relative}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.col-left{float:left;width:48%}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.col-right{float:right;width:48%}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.activate-plugin img{max-width:280px}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area img{width:99%;margin:8px 0;border:1px solid #cdcdcd;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-get-help-wrap .help-content-wrap .help-content.upgrade-help{order:2}@media only screen and (min-width:768px){.wpacu-get-help-wrap .help-content-wrap .help-content{margin-right:24px}.wpacu-get-help-wrap .help-content-wrap .help-content.upgrade-help{margin-right:0}}.wpacu-get-help-wrap .help-content-wrap .help-content.tech-help{order:1}@media only screen and (max-width:767px){.wpacu-get-help-wrap .help-content-wrap .help-content.tech-help{margin-bottom:30px}}.wpacu-get-help-wrap .help-content-wrap .help-content ul{list-style:none;padding-left:0}.wpacu-get-help-wrap .help-content-wrap .help-content ul li{font-size:14px;line-height:22px;margin-bottom:15px}.wpacu-get-help-wrap .help-content-wrap .help-content p:last-child,.wpacu-get-help-wrap .help-content-wrap .help-content ul li:last-child{margin-bottom:0}#wpacu-license-data-remove-area{display:none;margin:10px 0 25px}#wpacu-license-data-remove-area.wpacu-visible{display:block}span#wpacu-license-data-removed-msg{display:block;padding-left:26px}#wpacu-warning-read{display:none;margin:10px 0}#wpacu-warning-read span.dashicons-warning{color:#c00}#wpacu-warning-read.wpacu-visible{display:block}#wpacu-reset-submit-area{margin:10px 0;clear:both}#wpacu-reset-submit-btn{margin:10px 0 0}.wpacu-tools-area{margin:10px 20px 0 2px}.wpacu-tools-area .wpacu-tools-container{background:#fff;padding:15px;border:1px solid #cdcdcd;width:96%}.wpacu-tools-area .wpacu-tools-container form>div:first-child{margin:0 0 10px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning{display:none;box-sizing:border-box;margin-top:10px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning p{margin:0 0 10px;line-height:22px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning p:only-child{margin:0}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning ul{font-size:13px;list-style-type:disc;padding-left:30px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning.wpacu-visible{display:block}.wpacu-tools-area .wpacu-export-import-area{padding:10px}.wpacu-tools-area .wpacu-export-import-area form>p:first-of-type{margin-top:0}.wpacu-tools-area .wpacu-export-import-area form>p:last-of-type{margin-bottom:0}.wpacu-tools-area .wpacu-export-import-area:hover{background:rgba(40,44,42,.05);box-shadow:inset 0 0 10px rgba(160,165,170,.15)}.wpacu-tools-area .wpacu-export-import-area+hr{display:block;height:1px;border:0;border-top:1px solid #cdcdcd;margin:10px 0;padding:0}#wpacu-import-form button.wpacu-importing img.wpacu-spinner{display:inline-block}#wpacu-import-form button img.wpacu-spinner{display:none;margin:0 0 0 5px;height:16px;width:16px;vertical-align:middle}.wpacu-about-wrap .wpacu-about-text img{width:auto;height:150px;position:absolute;top:20px;right:-20px}@media only screen and (max-width:767px){.wpacu-about-wrap h1{margin:20px}.wpacu-about-wrap .wpacu-about-text img{display:none}.wpacu-about-wrap .wpacu-about-text{margin:20px}}.wpacu-about-wrap .about-wrap-content .area-title{font-size:19px;line-height:19px;margin-bottom:0}.wpacu-about-wrap hr{margin:10px 0}.wpacu-lite-vs-pro-wrap ul{display:flex;top:0;z-index:10;padding-bottom:14px}.wpacu-lite-vs-pro-wrap li{list-style:none;flex:1}.wpacu-lite-vs-pro-wrap li:last-child{border-right:1px solid #DDD}.wpacu-lite-vs-pro-wrap button{width:100%;border:1px solid #DDD;border-right:0;border-top:0;padding:10px;background:#FFF;font-size:14px;font-weight:700;height:60px;color:#999}.wpacu-lite-vs-pro-wrap li.active button{background:#F5F5F5;color:#000}.wpacu-lite-vs-pro-wrap table{border-collapse:collapse;table-layout:fixed;width:100%}.wpacu-lite-vs-pro-wrap th{background:inherit}.wpacu-lite-vs-pro-wrap tr.first{background:inherit;font-size:18px}.wpacu-lite-vs-pro-wrap tr.first .bg-lite{border-top:4px solid #6d6e70;background:#fff;color:#6d6e70}.wpacu-lite-vs-pro-wrap tr.first .bg-pro{border-top:4px solid green;background:#fff;color:green}.wpacu-lite-vs-pro-wrap tr:not(.first){background:#fff}.wpacu-lite-vs-pro-wrap tr:not(:last-child):hover{background:#f8f8f8}.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{height:53px;border:1px solid #DDD;padding:10px 16px;empty-cells:show;text-align:left}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{font-size:14px}}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{text-align:center;display:none}.wpacu-lite-vs-pro-wrap td.default{display:table-cell}.wpacu-lite-vs-pro-wrap .txt-l{font-size:28px;font-weight:700}.wpacu-lite-vs-pro-wrap .txt-top{position:relative;top:-9px;left:-2px}.wpacu-lite-vs-pro-wrap svg{width:18px;height:18px}.wpacu-lite-vs-pro-wrap svg path{fill:green}.wpacu-lite-vs-pro-wrap .tick{color:#2CA01C}.wpacu-lite-vs-pro-wrap .tick img{fill:#2CA01C}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap .txt-l{font-size:20px}.wpacu-lite-vs-pro-wrap .tick{font-size:15px}}.wpacu-lite-vs-pro-wrap .na{font-size:18px;opacity:.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"}.wpacu-lite-vs-pro-wrap .hide{border:0;background:0 0}.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{display:table-cell!important;width:auto}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{width:130px}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap .na{font-size:15px}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{width:42px}}@media only screen and (min-width:768px){.wpacu-lite-vs-pro-wrap td .button{font-size:16px!important}}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap td .button{font-size:14px!important;padding:0 20px!important}.wpacu-lite-vs-pro-wrap td .button.button-primary{margin-top:6px;margin-bottom:14px}}@media only screen and (min-width:768px){.wpacu-lite-vs-pro-wrap{margin-bottom:40px;clear:both}}.wpacu-video-areas>div{padding:20px;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-video-areas>div:nth-child(odd){background:#fff}.wpacu-video-areas>div:nth-child(even){background:inherit}@media only screen and (min-width:1200px){.wpacu-video-areas .wpacu-video-area-wrapper{margin:0 0 15px;display:flex}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right{padding:0 20px 0 25px}}@media only screen and (min-width:992px) and (max-width:1199px){.wpacu-video-areas .wpacu-video-area-wrapper{margin:0 0 40px}}.wpacu-video-areas .wpacu-video-area-wrapper ol{font-size:14px}.wpacu-video-areas .wpacu-video-area-wrapper ul{font-size:14px;list-style:disc;margin-left:22px}@media only screen and (min-width:1200px){.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right p:first-child{margin-top:0}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right p:last-child{margin-bottom:0}}@media only screen and (max-width:1199px){.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-video-wrapper{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-video-wrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}}#wpassetcleanup_asset_list.postbox h2{padding-left:52px!important;position:relative}#wpassetcleanup_asset_list.postbox h2:before{content:'';position:absolute;background-image:url(images/wpacu-logo-transparent-bg-v1.png);background-size:cover;top:6px;left:13px;width:33px;height:26px;opacity:.8;-webkit-filter:grayscale(100%);filter:grayscale(100%)}body.wp-admin .wpacu-modal{display:none;position:fixed;z-index:1000000;padding-top:15%;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,.4)}body.wp-admin .wpacu-modal-content{background-color:#fefefe;margin:auto;padding:20px;border:1px solid #888;width:80%;max-width:600px;border-radius:10px}body.wp-admin .wpacu-close{color:#aaa;float:right;font-size:28px;font-weight:700}body.wp-admin .wpacu-close:focus,body.wp-admin .wpacu-close:hover{color:#000;text-decoration:none;cursor:pointer}.wpacu-bulk-changes-tabs{display:table;position:relative;overflow:hidden;margin:0;width:100%}.wpacu-bulk-changes-tabs li{border-top:1px solid rgba(40,44,42,.1);border-left:1px solid rgba(40,44,42,.1);border-bottom:1px solid rgba(40,44,42,.1);float:left;line-height:38px;padding:0;position:relative;margin-bottom:12px}.wpacu-bulk-changes-tabs li:last-child{border-right:1px solid rgba(40,44,42,.1)}.wpacu-bulk-changes-tabs a{position:relative;background:rgba(40,44,42,.05);color:#004567;font-size:14px;font-weight:500;display:block;letter-spacing:0;outline:0;padding:6px 20px;text-decoration:none;border-top:3px solid transparent}.wpacu-bulk-changes-tabs a:hover{background:#f1f1f1;border-top:3px solid transparent}.wpacu-bulk-changes-tabs .current a{background:#fff;border-top:3px solid #004567}.wpacu-bulk-changes-tabs .current a:hover{background:#fff}.wpacu-bulk-changes-tabs .current a:after,.wpacu-bulk-changes-tabs .current a:before{top:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.wpacu-bulk-changes-tabs .current a:after{border-color:rgba(136,183,213,0);border-top-color:#fff;border-width:12px;margin-left:-12px}.wpacu-bulk-changes-tabs .current a:before{border-color:rgba(194,225,245,0);border-top-color:rgba(40,44,42,.1);border-width:13px;margin-left:-13px}img.wpacu-emoji{display:inline!important;border:none!important;height:1em!important;width:1em!important;margin:0 .07em!important;vertical-align:-.1em!important;background:0 0!important;padding:0!important;box-shadow:none!important}
classes/AssetsPagesManager.php CHANGED
@@ -27,10 +27,9 @@ class AssetsPagesManager
27
  $this->data['page'] = $_GET['page'];
28
  }
29
 
30
- if ($this->data['for'] === 'homepage') {
31
  $wpacuSettings = new Settings;
32
  $this->data['wpacu_settings'] = $wpacuSettings->getAll();
33
-
34
  $this->homepage();
35
  }
36
  }
27
  $this->data['page'] = $_GET['page'];
28
  }
29
 
30
+ if (in_array($this->data['for'], array('homepage', 'pages', 'posts', 'custom-post-types'))) {
31
  $wpacuSettings = new Settings;
32
  $this->data['wpacu_settings'] = $wpacuSettings->getAll();
 
33
  $this->homepage();
34
  }
35
  }
classes/CleanUp.php CHANGED
@@ -166,13 +166,22 @@ class CleanUp
166
 
167
  if ($nameAttrValue === 'generator') {
168
  $outerTag = $outerTagRegExp = trim(self::getOuterHTML($tagObject));
 
 
 
169
  $last2Chars = substr($outerTag, -2);
170
 
171
  if ($last2Chars === '">' || $last2Chars === "'>") {
172
  $tagWithoutLastChar = substr($outerTag, 0, -1);
173
- $outerTagRegExp = $tagWithoutLastChar.'(.*?)>';
174
  }
175
 
 
 
 
 
 
 
176
  if (strpos($outerTagRegExp, '<meta') !== false) {
177
  preg_match_all('#' . $outerTagRegExp . '#si', $htmlSource, $matches);
178
 
@@ -195,13 +204,11 @@ class CleanUp
195
  }
196
 
197
  // DOMDocument is not enabled. Use the RegExp instead (not as smooth, but does its job)!
198
- preg_match_all('#<meta(.*?)>#si', $htmlSource, $matches);
199
 
200
  if (isset($matches[0]) && ! empty($matches[0])) {
201
  foreach ($matches[0] as $metaTag) {
202
- if (strip_tags($metaTag) === ''
203
- && (stripos($metaTag, 'name="generator"') !== false || stripos($metaTag, 'name=\'generator\'') !== false)
204
- ) {
205
  $htmlSource = str_replace($metaTag, '', $htmlSource);
206
  }
207
  }
166
 
167
  if ($nameAttrValue === 'generator') {
168
  $outerTag = $outerTagRegExp = trim(self::getOuterHTML($tagObject));
169
+
170
+ // As DOMDocument doesn't retrieve the exact string, some alterations to the RegExp have to be made
171
+ // Leave no room for errors as all sort of characters can be within the "content" attribute
172
  $last2Chars = substr($outerTag, -2);
173
 
174
  if ($last2Chars === '">' || $last2Chars === "'>") {
175
  $tagWithoutLastChar = substr($outerTag, 0, -1);
176
+ $outerTagRegExp = preg_quote($tagWithoutLastChar, '/').'(.*?)>';
177
  }
178
 
179
+ $outerTagRegExp = str_replace(
180
+ array('"', '&lt;', '&gt;'),
181
+ array('(["\'])', '(<|&lt;)', '(>|&gt;)'),
182
+ $outerTagRegExp
183
+ );
184
+
185
  if (strpos($outerTagRegExp, '<meta') !== false) {
186
  preg_match_all('#' . $outerTagRegExp . '#si', $htmlSource, $matches);
187
 
204
  }
205
 
206
  // DOMDocument is not enabled. Use the RegExp instead (not as smooth, but does its job)!
207
+ preg_match_all('#<meta[^>]*name(\s+|)=(\s+|)("|\')generator("|\').*("|\'|\/)(\s+|)>#Usmi', $htmlSource, $matches);
208
 
209
  if (isset($matches[0]) && ! empty($matches[0])) {
210
  foreach ($matches[0] as $metaTag) {
211
+ if (strip_tags($metaTag) === '') { // make sure the full tag was extracted
 
 
212
  $htmlSource = str_replace($metaTag, '', $htmlSource);
213
  }
214
  }
classes/Lite.php CHANGED
@@ -29,7 +29,7 @@ class Lite
29
  add_action ($current_screen->taxonomy . '_edit_form_fields', static function ($tag) {
30
  ?>
31
  <tr class="form-field">
32
- <th scope="row" valign="top"><label for="wpassetcleanup_list"><?php echo WPACU_PLUGIN_TITLE; ?> <?php _e('CSS &amp; JavaScript Load Manager', 'wp-asset-clean-up'); ?></label></th>
33
  <td data-wpacu-taxonomy="<?php echo $tag->taxonomy; ?>">
34
  <img width="20" height="20" src="<?php echo WPACU_PLUGIN_URL; ?>/assets/icons/icon-lock.svg" valign="top" alt="" /> &nbsp;
35
  <?php
29
  add_action ($current_screen->taxonomy . '_edit_form_fields', static function ($tag) {
30
  ?>
31
  <tr class="form-field">
32
+ <th scope="row" valign="top"><label for="wpassetcleanup_list"><?php echo WPACU_PLUGIN_TITLE; ?>: <?php _e('CSS &amp; JavaScript Load Manager', 'wp-asset-clean-up'); ?></label></th>
33
  <td data-wpacu-taxonomy="<?php echo $tag->taxonomy; ?>">
34
  <img width="20" height="20" src="<?php echo WPACU_PLUGIN_URL; ?>/assets/icons/icon-lock.svg" valign="top" alt="" /> &nbsp;
35
  <?php
classes/Main.php CHANGED
@@ -80,6 +80,11 @@ class Main
80
  */
81
  public $stylesInHead = array();
82
 
 
 
 
 
 
83
  /**
84
  * @var array
85
  */
@@ -211,16 +216,16 @@ class Main
211
  // then the prevention will trigger within filterStyles() and filterScripts()
212
 
213
  if (! $this->isGetAssetsCall && ! is_admin()) { // No AJAX call from the Dashboard? Trigger the code below
214
- // [START] Unload CSS/JS on URI Request (for debugging)
215
- add_filter('wpacu_filter_styles', array($this, 'filterCssOnTheFly'));
216
- add_filter('wpacu_filter_scripts', array($this, 'filterJsOnTheFly'));
217
- add_filter('wpacu_ignore_child_parent_list', array($this, 'filterIgnoreChildParentList'));
218
- // [END] Unload CSS/JS on URI Request (for debugging)
219
-
220
- // SG Optimizer Compatibility: Unload Styles - HEAD (Before pre_combine_header_styles() from Combinator)
221
- if (get_option('siteground_optimizer_combine_css')) {
222
- add_action('wp_print_styles', array($this, 'filterStyles'), 9); // priority should be below 10
223
- }
224
 
225
  // Unload Styles - HEAD
226
  add_action( 'wp_print_styles', array( $this, 'filterStyles' ), 100000 );
@@ -274,11 +279,14 @@ class Main
274
  Misc::noAdminBarLoad();
275
  }
276
 
277
- // Save CSS list that is printed in the <HEAD>
278
- add_action('wp_head', array($this, 'saveFooterStyles'), PHP_INT_MAX - 1);
 
 
 
279
 
280
  // Save CSS/JS list that is printed in the <BODY>
281
- add_action('wp_footer', array($this, 'saveFooterScripts'), 100000000);
282
  add_action('wp_footer', array($this, 'printScriptsStyles'), PHP_INT_MAX);
283
  }
284
 
@@ -295,14 +303,12 @@ class Main
295
  );
296
  }
297
 
298
- // If assets management within the Dashboard is not enabled, an explanation message will be shown within the box
299
- // unless the meta box is hidden completely
300
  if (! $this->settings['hide_assets_meta_box']) {
301
  $metaboxes->initManagerMetaBox();
302
  }
303
 
304
- // Side Meta Box: Asset CleanUp Options
305
- // check if it's not hidden completely
306
  if (! $this->settings['hide_options_meta_box']) {
307
  $metaboxes->initCustomOptionsMetaBox();
308
  }
@@ -315,15 +321,15 @@ class Main
315
  - The user is in the Dashboard (any changes are applied in the front-end view)
316
  */
317
  if (! ($this->preventAssetsSettings() || is_admin())) {
318
- if ($this->settings['disable_emojis'] == 1) {
319
- $wpacuCleanUp = new CleanUp();
320
- $wpacuCleanUp->doDisableEmojis();
321
- }
322
 
323
- if ($this->settings['disable_oembed'] == 1) {
324
- $wpacuCleanUp = new CleanUp();
325
- $wpacuCleanUp->doDisableOembed();
326
- }
327
  }
328
  }
329
 
@@ -497,7 +503,7 @@ class Main
497
 
498
  if (Misc::isPluginActive('jquery-updater/jquery-updater.php')) {
499
  wp_dequeue_script($handle);
500
- }
501
 
502
  continue;
503
  }
@@ -708,7 +714,7 @@ class Main
708
  public function filterStylesSpecialCases()
709
  {
710
  add_action('wp_loaded', function() {
711
- ob_start(function($htmlSource) {
712
  if (strpos($htmlSource, self::$wpStylesSpecialDelimiters['start']) === false && strpos($htmlSource, self::$wpStylesSpecialDelimiters['end']) === false) {
713
  return $htmlSource;
714
  }
@@ -864,7 +870,7 @@ class Main
864
  }
865
  }
866
 
867
- return $exceptionsList;
868
  }
869
 
870
  /**
@@ -998,52 +1004,87 @@ class Main
998
  /**
999
  *
1000
  */
1001
- public function saveFooterStyles()
1002
- {
1003
- global $wp_styles;
1004
 
1005
- if (isset($this->wpAllStyles['queue']) && ! empty($this->wpAllStyles['queue'])) {
1006
- $this->stylesInHead = $this->wpAllStyles['queue'];
1007
- }
1008
 
1009
- if (isset($wp_styles->queue) && ! empty($wp_styles->queue)) {
1010
- foreach ($wp_styles->queue as $styleHandle) {
1011
- $this->stylesInHead[] = $styleHandle;
1012
- }
1013
- }
1014
 
1015
- $this->stylesInHead = array_unique($this->stylesInHead);
1016
- }
1017
 
1018
- /**
1019
- *
1020
- */
1021
- public function saveFooterScripts()
1022
- {
1023
- global $wp_scripts, $wp_styles;
1024
- $this->assetsInFooter['scripts'] = (isset($wp_scripts->in_footer) && ! empty($wp_scripts->in_footer)) ? $wp_scripts->in_footer : array();
1025
 
1026
- $footerStyles = array();
 
 
 
 
1027
 
1028
- if (isset($this->wpAllStyles['queue']) && ! empty($this->wpAllStyles['queue'])) {
1029
- foreach ( $this->wpAllStyles['queue'] as $handle ) {
1030
- if ( ! in_array( $handle, $this->stylesInHead ) ) {
1031
- $footerStyles[] = $handle;
1032
- }
1033
- }
1034
- }
1035
 
1036
- if (isset($wp_styles->queue) && ! empty($wp_styles->queue)) {
1037
- foreach ( $wp_styles->queue as $handle ) {
1038
- if ( ! in_array( $handle, $this->stylesInHead ) ) {
1039
- $footerStyles[] = $handle;
1040
- }
1041
- }
1042
- }
1043
 
1044
- $this->assetsInFooter['styles'] = $footerStyles;
 
 
 
 
 
1045
 
1046
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1047
 
1048
  /**
1049
  * This output will be extracted and the JSON will be processed
@@ -1067,7 +1108,7 @@ class Main
1067
  }
1068
 
1069
  if ($isFrontEndEditView && array_key_exists('elementor-preview', $_GET) && $_GET['elementor-preview']) {
1070
- return;
1071
  }
1072
 
1073
  // Prevent plugins from altering the DOM
@@ -1085,7 +1126,7 @@ class Main
1085
 
1086
  $list = array();
1087
 
1088
- $currentUnloadedAll = $currentUnloaded = json_decode($this->getAssetsUnloaded($this->getCurrentPostId()), ARRAY_A);
1089
 
1090
  // Append global unloaded assets to current (one by one) unloaded ones
1091
  if (! empty($this->globalUnloaded['styles'])) {
@@ -1184,15 +1225,15 @@ class Main
1184
  }
1185
 
1186
  foreach ($manageStyles as $handle) {
1187
- if (! isset($stylesList[$handle]) || in_array($handle, $this->skipAssets['styles'])) {
1188
  continue;
1189
  }
1190
 
1191
- $list['styles'][] = $stylesList[$handle];
1192
  }
1193
 
1194
  // Append unloaded ones (if any)
1195
- if (! empty($stylesBeforeUnload) && ! empty($currentUnloadedAll['styles'])) {
1196
  foreach ($currentUnloadedAll['styles'] as $sbuHandle) {
1197
  if (! in_array($sbuHandle, $manageStyles)) {
1198
  // Could be an old style that is not loaded anymore
@@ -1347,17 +1388,17 @@ class Main
1347
 
1348
  $this->parseTemplate('settings-frontend', $data, true);
1349
  } elseif ($isDashboardEditView) {
1350
- // AJAX call (not the classic WP one) from the WP Dashboard
1351
- // Send the altered value that has the initial position too
1352
 
1353
- // Taken front the front-end view
1354
- $data = array();
1355
  $data['all']['scripts'] = $list['scripts'];
1356
  $data['all']['styles'] = $list['styles'];
1357
 
1358
  $data = $this->alterAssetObj($data);
1359
 
1360
- $list['styles'] = $data['all']['styles'];
1361
  $list['scripts'] = $data['all']['scripts'];
1362
 
1363
  echo self::START_DEL
@@ -1408,22 +1449,22 @@ class Main
1408
  $postId = (int)Misc::getVar('post', 'post_id'); // if any (could be home page for instance)
1409
  $pageUrl = Misc::getVar('post', 'page_url'); // post, page, custom post type, home page etc.
1410
 
1411
- // Not homepage, but a post/page? Check if it's published in case AJAX call
1412
- // wasn't stopped due to JS errors or other reasons
1413
  if ($postId > 0 && get_post_status($postId) !== 'publish') {
1414
- exit(__('The CSS/JS files will be available to manage once the post/page is published.', 'wp-asset-clean-up'));
1415
  }
1416
 
1417
  $wpacuList = $contents = '';
1418
 
1419
- $settings = new Settings();
1420
 
1421
  if (self::$domGetType === 'direct') {
1422
  $wpacuList = Misc::getVar('post', 'wpacu_list');
1423
  } elseif (self::$domGetType === 'wp_remote_post') {
1424
  $wpRemotePost = wp_remote_post($pageUrl, array(
1425
  'body' => array(
1426
- WPACU_LOAD_ASSETS_REQ_KEY => 1
1427
  )
1428
  ));
1429
 
@@ -1455,18 +1496,18 @@ class Main
1455
 
1456
  $json = base64_decode($wpacuList);
1457
 
1458
- $data = array(
1459
- 'post_id' => $postId,
1460
- 'plugin_settings' => $settings->getAll()
1461
- );
1462
 
1463
  $data['all'] = (array)json_decode($json);
1464
 
1465
- if ($data['plugin_settings']['assets_list_layout'] === 'by-location') {
1466
- $data['all'] = Sorting::appendLocation($data['all']);
1467
- } else {
1468
- $data['all'] = Sorting::sortListByAlpha($data['all']);
1469
- }
1470
 
1471
  // Check any existing results
1472
  $data['current'] = (array)json_decode($this->getAssetsUnloaded($postId));
@@ -1528,33 +1569,33 @@ class Main
1528
  * @return void
1529
  */
1530
  public function ajaxFetchActivePluginsIcons()
1531
- {
1532
- if (! isset($_POST['action'])) {
1533
- return;
1534
- }
1535
 
1536
- if (! Menu::userCanManageAssets()) {
1537
- return;
1538
- }
1539
 
1540
- $activePluginsIcons = Misc::fetchActiveFreePluginsIcons() ?: array();
1541
 
1542
- if ($activePluginsIcons && is_array($activePluginsIcons) && ! empty($activePluginsIcons)) {
1543
- echo print_r($activePluginsIcons, true)."\n";
1544
- exit;
1545
- }
1546
- }
1547
 
1548
  /**
1549
  *
1550
  */
1551
  public function ajaxFetchActivePluginsJsFooterCode()
1552
  {
1553
- if (! (isset($_GET['page']) && strpos($_GET['page'], WPACU_PLUGIN_ID . '_') === 0)) {
1554
- return;
1555
- }
1556
 
1557
- if (! Menu::userCanManageAssets()) {
1558
  return;
1559
  }
1560
 
@@ -1564,11 +1605,11 @@ class Main
1564
  ?>
1565
  <script type="text/javascript" >
1566
  jQuery(document).ready(function($) {
1567
- jQuery.post(ajaxurl, {
1568
  'action': '<?php echo WPACU_PLUGIN_ID.'_fetch_active_plugins_icons'; ?>',
1569
  }, function(response) {
1570
- console.log(response);
1571
- });
1572
  });
1573
  </script>
1574
  <?php
@@ -1647,10 +1688,10 @@ class Main
1647
  continue;
1648
  }
1649
 
1650
- // From WordPress directories (false by default, unless it was set to true before: in Sorting.php for instance)
1651
- if (! isset($data['all']['scripts'][$key]->wp)) {
1652
- $data['all']['scripts'][$key]->wp = false;
1653
- }
1654
 
1655
  $initialScriptPos = wp_cache_get($obj->handle, 'wpacu_scripts_initial_positions');
1656
 
@@ -1747,24 +1788,24 @@ class Main
1747
  * @return array
1748
  */
1749
  public function getAllDeps($allAssets)
1750
- {
1751
- $allDeps = array();
1752
 
1753
- foreach (array('styles', 'scripts') as $assetType) {
1754
- if ( ! (isset($allAssets[$assetType]) && ! empty($allAssets[$assetType])) ) {
1755
- continue;
1756
- }
1757
- foreach ($allAssets[$assetType] as $assetObj) {
1758
- if (isset($assetObj->deps) && ! empty($assetObj->deps)) {
1759
- foreach ($assetObj->deps as $dep) {
1760
- $allDeps[$assetType][$dep][] = $assetObj->handle;
1761
- }
1762
- }
1763
- }
1764
- }
1765
 
1766
- return $allDeps;
1767
- }
1768
 
1769
  /**
1770
  * @return bool
@@ -1898,7 +1939,7 @@ class Main
1898
  return $data;
1899
  }
1900
 
1901
- /**
1902
  * @return bool
1903
  */
1904
  public static function isWpDefaultSearchPage()
@@ -1957,12 +1998,12 @@ class Main
1957
  }
1958
 
1959
  if (defined('WPACU_CURRENT_PAGE_ID') && WPACU_CURRENT_PAGE_ID > 0) {
1960
- $pageOptions = MetaBoxes::getPageOptions(WPACU_CURRENT_PAGE_ID);
1961
 
1962
- if (isset($pageOptions['no_assets_settings']) && $pageOptions['no_assets_settings']) {
1963
- return true;
1964
- }
1965
- }
1966
 
1967
  return false;
1968
  }
@@ -1971,36 +2012,36 @@ class Main
1971
  * @return bool
1972
  */
1973
  public function frontendShow()
1974
- {
1975
- // The option is disabled
1976
- if (! $this->settings['frontend_show']) {
1977
- return false;
1978
- }
1979
 
1980
- // The asset list is hidden via query string: /?wpacu_no_frontend_show
1981
- if (array_key_exists('wpacu_no_frontend_show', $_GET)) {
1982
- return false;
1983
- }
1984
 
1985
- // The option is enabled, but there are show exceptions, check if the list should be hidden
1986
- if ($this->settings['frontend_show_exceptions']) {
1987
- $frontendShowExceptions = trim( $this->settings['frontend_show_exceptions'] );
1988
 
1989
- if ( strpos( $frontendShowExceptions, "\n" ) !== false ) {
1990
- foreach ( explode( "\n", $frontendShowExceptions ) as $frontendShowException ) {
1991
- $frontendShowException = trim($frontendShowException);
1992
 
1993
- if ( strpos( $_SERVER['REQUEST_URI'], $frontendShowException ) !== false ) {
1994
- return false;
1995
- }
1996
- }
1997
- } elseif ( strpos( $_SERVER['REQUEST_URI'], $frontendShowExceptions ) !== false ) {
1998
- return false;
1999
- }
2000
- }
2001
 
2002
- return true;
2003
- }
2004
 
2005
  /**
2006
  * Make administrator more aware if "TEST MODE" is enabled or not
@@ -2008,33 +2049,33 @@ class Main
2008
  public function wpacuHtmlNoticeForAdmin()
2009
  {
2010
  add_action('wp_footer', function() {
2011
- if (! apply_filters('wpacu_show_admin_console_notice', true)) {
2012
- return;
2013
- }
2014
 
2015
- if ( ! (Menu::userCanManageAssets() && ! is_admin())) {
2016
- return;
2017
- }
2018
 
2019
- if (Main::instance()->settings['test_mode']) {
2020
- $consoleMessage = __('Asset CleanUp: "TEST MODE" ENABLED (any settings or unloads will be visible ONLY to you, the logged-in administrator)', 'wp-asset-clean-up');
2021
- $testModeNotice = __('"Test Mode" is ENABLED. Any settings or unloads will be visible ONLY to you, the logged-in administrator.', 'wp-asset-clean-up');
2022
- } else {
2023
- $consoleMessage = __('Asset CleanUp: "LIVE MODE" (test mode is not enabled, thus, all the plugin changes are visible for everyone: you, the logged-in administrator and the regular visitors)', 'wp-asset-clean-up');
2024
- $testModeNotice = __('The website is in LIVE MODE as "Test Mode" is not enabled. All the plugin changes are visible for everyone: logged-in administrators and regular visitors.', 'wp-asset-clean-up');
2025
- }
2026
 
2027
- $htmlCommentNote = __('NOTE: These "Asset CleanUp: Page Speed Booster" messages are only shown to you, the HTML comment is not visible for the regular visitor.', 'wp-asset-clean-up');
2028
- ?>
2029
  <!--
2030
  <?php echo $htmlCommentNote; ?>
2031
 
2032
  <?php echo $testModeNotice; ?>
2033
  -->
2034
  <script type="text/javascript">
2035
- console.log('<?php echo $consoleMessage; ?>');
2036
  </script>
2037
- <?php
2038
- });
2039
  }
2040
  }
80
  */
81
  public $stylesInHead = array();
82
 
83
+ /**
84
+ * @var array
85
+ */
86
+ public $scriptsInHead = array();
87
+
88
  /**
89
  * @var array
90
  */
216
  // then the prevention will trigger within filterStyles() and filterScripts()
217
 
218
  if (! $this->isGetAssetsCall && ! is_admin()) { // No AJAX call from the Dashboard? Trigger the code below
219
+ // [START] Unload CSS/JS on URI Request (for debugging)
220
+ add_filter('wpacu_filter_styles', array($this, 'filterCssOnTheFly'));
221
+ add_filter('wpacu_filter_scripts', array($this, 'filterJsOnTheFly'));
222
+ add_filter('wpacu_ignore_child_parent_list', array($this, 'filterIgnoreChildParentList'));
223
+ // [END] Unload CSS/JS on URI Request (for debugging)
224
+
225
+ // SG Optimizer Compatibility: Unload Styles - HEAD (Before pre_combine_header_styles() from Combinator)
226
+ if (get_option('siteground_optimizer_combine_css')) {
227
+ add_action('wp_print_styles', array($this, 'filterStyles'), 9); // priority should be below 10
228
+ }
229
 
230
  // Unload Styles - HEAD
231
  add_action( 'wp_print_styles', array( $this, 'filterStyles' ), 100000 );
279
  Misc::noAdminBarLoad();
280
  }
281
 
282
+ // Save CSS handles list that is printed in the <HEAD>
283
+ // No room for errors, some developers might enqueue (although not ideal) assets via "wp_head" or "wp_print_styles"/"wp_print_scripts"
284
+ add_action('wp_print_styles', array($this, 'saveHeadAssets'), PHP_INT_MAX - 1);
285
+ add_action('wp_print_scripts', array($this, 'saveHeadAssets'), PHP_INT_MAX - 1);
286
+ add_action('get_footer', array($this, 'saveHeadAssets'), PHP_INT_MAX - 1);
287
 
288
  // Save CSS/JS list that is printed in the <BODY>
289
+ add_action('wp_print_footer_scripts', array($this, 'saveFooterAssets'), 100000000);
290
  add_action('wp_footer', array($this, 'printScriptsStyles'), PHP_INT_MAX);
291
  }
292
 
303
  );
304
  }
305
 
306
+ // If assets management within the Dashboard is not enabled, an explanation message will be shown within the box unless the meta box is hidden completely
 
307
  if (! $this->settings['hide_assets_meta_box']) {
308
  $metaboxes->initManagerMetaBox();
309
  }
310
 
311
+ // Side Meta Box: Asset CleanUp Options check if it's not hidden completely
 
312
  if (! $this->settings['hide_options_meta_box']) {
313
  $metaboxes->initCustomOptionsMetaBox();
314
  }
321
  - The user is in the Dashboard (any changes are applied in the front-end view)
322
  */
323
  if (! ($this->preventAssetsSettings() || is_admin())) {
324
+ if ($this->settings['disable_emojis'] == 1) {
325
+ $wpacuCleanUp = new CleanUp();
326
+ $wpacuCleanUp->doDisableEmojis();
327
+ }
328
 
329
+ if ($this->settings['disable_oembed'] == 1) {
330
+ $wpacuCleanUp = new CleanUp();
331
+ $wpacuCleanUp->doDisableOembed();
332
+ }
333
  }
334
  }
335
 
503
 
504
  if (Misc::isPluginActive('jquery-updater/jquery-updater.php')) {
505
  wp_dequeue_script($handle);
506
+ }
507
 
508
  continue;
509
  }
714
  public function filterStylesSpecialCases()
715
  {
716
  add_action('wp_loaded', function() {
717
+ ob_start(static function($htmlSource) {
718
  if (strpos($htmlSource, self::$wpStylesSpecialDelimiters['start']) === false && strpos($htmlSource, self::$wpStylesSpecialDelimiters['end']) === false) {
719
  return $htmlSource;
720
  }
870
  }
871
  }
872
 
873
+ return $exceptionsList;
874
  }
875
 
876
  /**
1004
  /**
1005
  *
1006
  */
1007
+ public function saveHeadAssets()
1008
+ {
1009
+ global $wp_styles, $wp_scripts;
1010
 
1011
+ if (isset($this->wpAllStyles['queue']) && ! empty($this->wpAllStyles['queue'])) {
1012
+ $this->stylesInHead = $this->wpAllStyles['queue'];
1013
+ }
1014
 
1015
+ if (isset($wp_styles->queue) && ! empty($wp_styles->queue)) {
1016
+ foreach ($wp_styles->queue as $styleHandle) {
1017
+ $this->stylesInHead[] = $styleHandle;
1018
+ }
1019
+ }
1020
 
1021
+ $this->stylesInHead = array_unique($this->stylesInHead);
 
1022
 
1023
+ if (isset($this->wpAllScripts['queue']) && ! empty($this->wpAllScripts['queue'])) {
1024
+ $this->scriptsInHead = $this->wpAllScripts['queue'];
1025
+ }
 
 
 
 
1026
 
1027
+ if (isset($wp_scripts->queue) && ! empty($wp_scripts->queue)) {
1028
+ foreach ($wp_scripts->queue as $scriptHandle) {
1029
+ $this->scriptsInHead[] = $scriptHandle;
1030
+ }
1031
+ }
1032
 
1033
+ $this->scriptsInHead = array_unique($this->scriptsInHead);
 
 
 
 
 
 
1034
 
1035
+ }
 
 
 
 
 
 
1036
 
1037
+ /**
1038
+ *
1039
+ */
1040
+ public function saveFooterAssets()
1041
+ {
1042
+ global $wp_scripts, $wp_styles;
1043
 
1044
+ // [Styles Collection]
1045
+ $footerStyles = array();
1046
+
1047
+ if (isset($this->wpAllStyles['queue']) && ! empty($this->wpAllStyles['queue'])) {
1048
+ foreach ( $this->wpAllStyles['queue'] as $handle ) {
1049
+ if ( ! in_array( $handle, $this->stylesInHead ) ) {
1050
+ $footerStyles[] = $handle;
1051
+ }
1052
+ }
1053
+ }
1054
+
1055
+ if (isset($wp_styles->queue) && ! empty($wp_styles->queue)) {
1056
+ foreach ( $wp_styles->queue as $handle ) {
1057
+ if ( ! in_array( $handle, $this->stylesInHead ) ) {
1058
+ $footerStyles[] = $handle;
1059
+ }
1060
+ }
1061
+ }
1062
+
1063
+ $this->assetsInFooter['styles'] = $footerStyles;
1064
+ // [/Styles Collection]
1065
+
1066
+
1067
+ // [Scripts Collection]
1068
+ $this->assetsInFooter['scripts'] = (isset($wp_scripts->in_footer) && ! empty($wp_scripts->in_footer)) ? $wp_scripts->in_footer : array();
1069
+
1070
+ if (isset($this->wpAllScripts['queue']) && ! empty($this->wpAllScripts['queue'])) {
1071
+ foreach ( $this->wpAllScripts['queue'] as $handle ) {
1072
+ if ( ! in_array( $handle, $this->scriptsInHead ) ) {
1073
+ $this->assetsInFooter['scripts'][] = $handle;
1074
+ }
1075
+ }
1076
+ }
1077
+
1078
+ if (isset($wp_scripts->queue) && ! empty($wp_scripts->queue)) {
1079
+ foreach ( $wp_scripts->queue as $handle ) {
1080
+ if ( ! in_array( $handle, $this->scriptsInHead ) ) {
1081
+ $this->assetsInFooter['scripts'][] = $handle;
1082
+ }
1083
+ }
1084
+ }
1085
+ // [/Scripts Collection]
1086
+
1087
+ }
1088
 
1089
  /**
1090
  * This output will be extracted and the JSON will be processed
1108
  }
1109
 
1110
  if ($isFrontEndEditView && array_key_exists('elementor-preview', $_GET) && $_GET['elementor-preview']) {
1111
+ return;
1112
  }
1113
 
1114
  // Prevent plugins from altering the DOM
1126
 
1127
  $list = array();
1128
 
1129
+ $currentUnloadedAll = $currentUnloaded = json_decode($this->getAssetsUnloaded($this->getCurrentPostId()), ARRAY_A);
1130
 
1131
  // Append global unloaded assets to current (one by one) unloaded ones
1132
  if (! empty($this->globalUnloaded['styles'])) {
1225
  }
1226
 
1227
  foreach ($manageStyles as $handle) {
1228
+ if (! isset($stylesList[$handle]) || in_array($handle, $this->skipAssets['styles'])) {
1229
  continue;
1230
  }
1231
 
1232
+ $list['styles'][] = $stylesList[$handle];
1233
  }
1234
 
1235
  // Append unloaded ones (if any)
1236
+ if (! empty($stylesBeforeUnload) && ! empty($currentUnloadedAll['styles'])) {
1237
  foreach ($currentUnloadedAll['styles'] as $sbuHandle) {
1238
  if (! in_array($sbuHandle, $manageStyles)) {
1239
  // Could be an old style that is not loaded anymore
1388
 
1389
  $this->parseTemplate('settings-frontend', $data, true);
1390
  } elseif ($isDashboardEditView) {
1391
+ // AJAX call (not the classic WP one) from the WP Dashboard
1392
+ // Send the altered value that has the initial position too
1393
 
1394
+ // Taken front the front-end view
1395
+ $data = array();
1396
  $data['all']['scripts'] = $list['scripts'];
1397
  $data['all']['styles'] = $list['styles'];
1398
 
1399
  $data = $this->alterAssetObj($data);
1400
 
1401
+ $list['styles'] = $data['all']['styles'];
1402
  $list['scripts'] = $data['all']['scripts'];
1403
 
1404
  echo self::START_DEL
1449
  $postId = (int)Misc::getVar('post', 'post_id'); // if any (could be home page for instance)
1450
  $pageUrl = Misc::getVar('post', 'page_url'); // post, page, custom post type, home page etc.
1451
 
1452
+ // Not homepage, but a post/page? Check if it's published in case AJAX call
1453
+ // wasn't stopped due to JS errors or other reasons
1454
  if ($postId > 0 && get_post_status($postId) !== 'publish') {
1455
+ exit(__('The CSS/JS files will be available to manage once the post/page is published.', 'wp-asset-clean-up'));
1456
  }
1457
 
1458
  $wpacuList = $contents = '';
1459
 
1460
+ $settings = new Settings();
1461
 
1462
  if (self::$domGetType === 'direct') {
1463
  $wpacuList = Misc::getVar('post', 'wpacu_list');
1464
  } elseif (self::$domGetType === 'wp_remote_post') {
1465
  $wpRemotePost = wp_remote_post($pageUrl, array(
1466
  'body' => array(
1467
+ WPACU_LOAD_ASSETS_REQ_KEY => 1
1468
  )
1469
  ));
1470
 
1496
 
1497
  $json = base64_decode($wpacuList);
1498
 
1499
+ $data = array(
1500
+ 'post_id' => $postId,
1501
+ 'plugin_settings' => $settings->getAll()
1502
+ );
1503
 
1504
  $data['all'] = (array)json_decode($json);
1505
 
1506
+ if ($data['plugin_settings']['assets_list_layout'] === 'by-location') {
1507
+ $data['all'] = Sorting::appendLocation($data['all']);
1508
+ } else {
1509
+ $data['all'] = Sorting::sortListByAlpha($data['all']);
1510
+ }
1511
 
1512
  // Check any existing results
1513
  $data['current'] = (array)json_decode($this->getAssetsUnloaded($postId));
1569
  * @return void
1570
  */
1571
  public function ajaxFetchActivePluginsIcons()
1572
+ {
1573
+ if (! isset($_POST['action'])) {
1574
+ return;
1575
+ }
1576
 
1577
+ if (! Menu::userCanManageAssets()) {
1578
+ return;
1579
+ }
1580
 
1581
+ $activePluginsIcons = Misc::fetchActiveFreePluginsIcons() ?: array();
1582
 
1583
+ if ($activePluginsIcons && is_array($activePluginsIcons) && ! empty($activePluginsIcons)) {
1584
+ echo print_r($activePluginsIcons, true)."\n";
1585
+ exit;
1586
+ }
1587
+ }
1588
 
1589
  /**
1590
  *
1591
  */
1592
  public function ajaxFetchActivePluginsJsFooterCode()
1593
  {
1594
+ if (! (isset($_GET['page']) && strpos($_GET['page'], WPACU_PLUGIN_ID . '_') === 0)) {
1595
+ return;
1596
+ }
1597
 
1598
+ if (! Menu::userCanManageAssets()) {
1599
  return;
1600
  }
1601
 
1605
  ?>
1606
  <script type="text/javascript" >
1607
  jQuery(document).ready(function($) {
1608
+ jQuery.post(ajaxurl, {
1609
  'action': '<?php echo WPACU_PLUGIN_ID.'_fetch_active_plugins_icons'; ?>',
1610
  }, function(response) {
1611
+ console.log(response);
1612
+ });
1613
  });
1614
  </script>
1615
  <?php
1688
  continue;
1689
  }
1690
 
1691
+ // From WordPress directories (false by default, unless it was set to true before: in Sorting.php for instance)
1692
+ if (! isset($data['all']['scripts'][$key]->wp)) {
1693
+ $data['all']['scripts'][$key]->wp = false;
1694
+ }
1695
 
1696
  $initialScriptPos = wp_cache_get($obj->handle, 'wpacu_scripts_initial_positions');
1697
 
1788
  * @return array
1789
  */
1790
  public function getAllDeps($allAssets)
1791
+ {
1792
+ $allDeps = array();
1793
 
1794
+ foreach (array('styles', 'scripts') as $assetType) {
1795
+ if ( ! (isset($allAssets[$assetType]) && ! empty($allAssets[$assetType])) ) {
1796
+ continue;
1797
+ }
1798
+ foreach ($allAssets[$assetType] as $assetObj) {
1799
+ if (isset($assetObj->deps) && ! empty($assetObj->deps)) {
1800
+ foreach ($assetObj->deps as $dep) {
1801
+ $allDeps[$assetType][$dep][] = $assetObj->handle;
1802
+ }
1803
+ }
1804
+ }
1805
+ }
1806
 
1807
+ return $allDeps;
1808
+ }
1809
 
1810
  /**
1811
  * @return bool
1939
  return $data;
1940
  }
1941
 
1942
+ /**
1943
  * @return bool
1944
  */
1945
  public static function isWpDefaultSearchPage()
1998
  }
1999
 
2000
  if (defined('WPACU_CURRENT_PAGE_ID') && WPACU_CURRENT_PAGE_ID > 0) {
2001
+ $pageOptions = MetaBoxes::getPageOptions(WPACU_CURRENT_PAGE_ID);
2002
 
2003
+ if (isset($pageOptions['no_assets_settings']) && $pageOptions['no_assets_settings']) {
2004
+ return true;
2005
+ }
2006
+ }
2007
 
2008
  return false;
2009
  }
2012
  * @return bool
2013
  */
2014
  public function frontendShow()
2015
+ {
2016
+ // The option is disabled
2017
+ if (! $this->settings['frontend_show']) {
2018
+ return false;
2019
+ }
2020
 
2021
+ // The asset list is hidden via query string: /?wpacu_no_frontend_show
2022
+ if (array_key_exists('wpacu_no_frontend_show', $_GET)) {
2023
+ return false;
2024
+ }
2025
 
2026
+ // The option is enabled, but there are show exceptions, check if the list should be hidden
2027
+ if ($this->settings['frontend_show_exceptions']) {
2028
+ $frontendShowExceptions = trim( $this->settings['frontend_show_exceptions'] );
2029
 
2030
+ if ( strpos( $frontendShowExceptions, "\n" ) !== false ) {
2031
+ foreach ( explode( "\n", $frontendShowExceptions ) as $frontendShowException ) {
2032
+ $frontendShowException = trim($frontendShowException);
2033
 
2034
+ if ( strpos( $_SERVER['REQUEST_URI'], $frontendShowException ) !== false ) {
2035
+ return false;
2036
+ }
2037
+ }
2038
+ } elseif ( strpos( $_SERVER['REQUEST_URI'], $frontendShowExceptions ) !== false ) {
2039
+ return false;
2040
+ }
2041
+ }
2042
 
2043
+ return true;
2044
+ }
2045
 
2046
  /**
2047
  * Make administrator more aware if "TEST MODE" is enabled or not
2049
  public function wpacuHtmlNoticeForAdmin()
2050
  {
2051
  add_action('wp_footer', function() {
2052
+ if (! apply_filters('wpacu_show_admin_console_notice', true)) {
2053
+ return;
2054
+ }
2055
 
2056
+ if ( ! (Menu::userCanManageAssets() && ! is_admin())) {
2057
+ return;
2058
+ }
2059
 
2060
+ if (Main::instance()->settings['test_mode']) {
2061
+ $consoleMessage = __('Asset CleanUp: "TEST MODE" ENABLED (any settings or unloads will be visible ONLY to you, the logged-in administrator)', 'wp-asset-clean-up');
2062
+ $testModeNotice = __('"Test Mode" is ENABLED. Any settings or unloads will be visible ONLY to you, the logged-in administrator.', 'wp-asset-clean-up');
2063
+ } else {
2064
+ $consoleMessage = __('Asset CleanUp: "LIVE MODE" (test mode is not enabled, thus, all the plugin changes are visible for everyone: you, the logged-in administrator and the regular visitors)', 'wp-asset-clean-up');
2065
+ $testModeNotice = __('The website is in LIVE MODE as "Test Mode" is not enabled. All the plugin changes are visible for everyone: logged-in administrators and regular visitors.', 'wp-asset-clean-up');
2066
+ }
2067
 
2068
+ $htmlCommentNote = __('NOTE: These "Asset CleanUp: Page Speed Booster" messages are only shown to you, the HTML comment is not visible for the regular visitor.', 'wp-asset-clean-up');
2069
+ ?>
2070
  <!--
2071
  <?php echo $htmlCommentNote; ?>
2072
 
2073
  <?php echo $testModeNotice; ?>
2074
  -->
2075
  <script type="text/javascript">
2076
+ console.log('<?php echo $consoleMessage; ?>');
2077
  </script>
2078
+ <?php
2079
+ });
2080
  }
2081
  }
classes/MetaBoxes.php CHANGED
@@ -82,29 +82,34 @@ class MetaBoxes
82
 
83
  $postId = (isset($post->ID) && $post->ID > 0) ? $post->ID : 0;
84
 
85
- $getAssets = true;
86
 
87
  if (! Main::instance()->settings['dashboard_show']) {
88
- $getAssets = false;
89
  $data['status'] = 2; // "Manage within Dashboard" is disabled in plugin's settings
90
  } elseif ($postId < 1 || get_post_status($postId) !== 'publish') {
91
  $data['status'] = 3; // "draft", "auto-draft" post (it has to be published)
92
- $getAssets = false;
93
  }
94
 
95
  if (class_exists('WPSEO_Options') && 'attachment' === get_post_type($post->ID)) {
96
  try {
97
  if (\WPSEO_Options::get( 'disable-attachment' ) === true) {
98
- $getAssets = false;
99
  $data['status'] = 4; // "Redirect attachment URLs to the attachment itself?" is enabled in "Yoast SEO" -> "Media"
100
  }
101
  } catch (\Exception $e) {}
102
  }
103
 
104
- $data['get_assets'] = $getAssets;
 
105
 
106
- if ($getAssets) {
107
- $data['fetch_url'] = Misc::getPageUrl( $postId );
 
 
 
 
108
  }
109
 
110
  Main::instance()->parseTemplate('meta-box', $data, true);
82
 
83
  $postId = (isset($post->ID) && $post->ID > 0) ? $post->ID : 0;
84
 
85
+ $isListFetchable = true;
86
 
87
  if (! Main::instance()->settings['dashboard_show']) {
88
+ $isListFetchable = false;
89
  $data['status'] = 2; // "Manage within Dashboard" is disabled in plugin's settings
90
  } elseif ($postId < 1 || get_post_status($postId) !== 'publish') {
91
  $data['status'] = 3; // "draft", "auto-draft" post (it has to be published)
92
+ $isListFetchable = false;
93
  }
94
 
95
  if (class_exists('WPSEO_Options') && 'attachment' === get_post_type($post->ID)) {
96
  try {
97
  if (\WPSEO_Options::get( 'disable-attachment' ) === true) {
98
+ $isListFetchable = false;
99
  $data['status'] = 4; // "Redirect attachment URLs to the attachment itself?" is enabled in "Yoast SEO" -> "Media"
100
  }
101
  } catch (\Exception $e) {}
102
  }
103
 
104
+ $data['is_list_fetchable'] = $isListFetchable;
105
+ $data['fetch_assets_on_click'] = false;
106
 
107
+ if ($isListFetchable) {
108
+ if (Main::instance()->settings['assets_list_show_status'] === 'fetch_on_click') {
109
+ $data['fetch_assets_on_click'] = true;
110
+ }
111
+
112
+ $data['fetch_url'] = Misc::getPageUrl($postId);
113
  }
114
 
115
  Main::instance()->parseTemplate('meta-box', $data, true);
classes/Misc.php CHANGED
@@ -836,19 +836,6 @@ SQL;
836
  return '';
837
  }
838
 
839
- /**
840
- * @return mixed|string
841
- */
842
- public static function getSimpleCustomCss()
843
- {
844
- $sccssOptions = get_option('sccss_settings');
845
- $sccssRawContent = isset($sccssOptions['sccss-content']) ? $sccssOptions['sccss-content'] : '';
846
- $cssContent = wp_kses($sccssRawContent, array('\'', '\"'));
847
- $cssContent = str_replace('&gt;', '>', $cssContent);
848
-
849
- return trim($cssContent);
850
- }
851
-
852
  /**
853
  * Triggers only in the front-end view (e.g. Homepage URL, /contact/, /about/ etc.)
854
  * Except the situations below: no page builders edit mode etc.
836
  return '';
837
  }
838
 
 
 
 
 
 
 
 
 
 
 
 
 
 
839
  /**
840
  * Triggers only in the front-end view (e.g. Homepage URL, /contact/, /about/ etc.)
841
  * Except the situations below: no page builders edit mode etc.
classes/OptimiseAssets/CombineCss.php CHANGED
@@ -321,7 +321,7 @@ HTML;
321
  $skipIfFileExists = true;
322
 
323
  if ($skipIfFileExists || ! file_exists($localFinalCssFile)) {
324
- // Change $finalCombinedCssContent as paths to fonts and images that are relative (e.g. ../, ../../) have to be updated
325
  $finalCombinedCssContent = '';
326
 
327
  foreach ($localAssetsPaths as $assetHref => $localAssetsPath) {
321
  $skipIfFileExists = true;
322
 
323
  if ($skipIfFileExists || ! file_exists($localFinalCssFile)) {
324
+ // Change $finalCombinedCssContent as paths to fonts and images that are relative (e.g. ../, ../../) have to be updated + other optimization changes
325
  $finalCombinedCssContent = '';
326
 
327
  foreach ($localAssetsPaths as $assetHref => $localAssetsPath) {
classes/OptimiseAssets/CombineJs.php CHANGED
@@ -86,7 +86,7 @@ class CombineJs
86
 
87
  $scriptNotCombinable = false;
88
 
89
- $hasSrc = isset($scriptAttributes['src']) && trim($scriptAttributes['src']);// No valid SRC attribute? It's not combinable (e.g. an inline tag)
90
  $isPluginScript = isset($scriptAttributes['data-wpacu-plugin-script']); // Only of the user is logged-in (skip it as it belongs to the Asset CleanUp (Pro) plugin)
91
 
92
  if (! $hasSrc || $isPluginScript) {
@@ -102,6 +102,8 @@ class CombineJs
102
  }
103
  }
104
 
 
 
105
  if (! $scriptNotCombinable) { // Has SRC and $isPluginScript is set to false? Check the script
106
  $src = (string)$scriptAttributes['src'];
107
 
@@ -109,11 +111,6 @@ class CombineJs
109
  $scriptNotCombinable = true;
110
  }
111
 
112
- // Do not add it to the combination list if it has "async" attribute
113
- if (isset($scriptAttributes['async'])) {
114
- $scriptNotCombinable = true;
115
- }
116
-
117
  if (isset($scriptAttributes['data-wpacu-to-be-preloaded-basic']) && $scriptAttributes['data-wpacu-to-be-preloaded-basic']) {
118
  $scriptNotCombinable = true;
119
  }
@@ -123,12 +120,17 @@ class CombineJs
123
  $scriptNotCombinable = true;
124
  }
125
 
126
- // Does it have "defer" attribute, it's combinable (all checks were already done), loads in the BODY tag and "combine_loaded_js_defer_body" is ON? Keep it to the combination list
127
- if (isset($scriptAttributes['defer'])) {
128
- $isCombinableWithDefer = (! $scriptNotCombinable && $docLocationScript === 'body' && Main::instance()->settings['combine_loaded_js_defer_body']);
129
-
130
- if (! $isCombinableWithDefer) { // Does it have "defer" and it's in the HEAD or before the first combinable script? Do not combine it
131
- $scriptNotCombinable = true;
 
 
 
 
 
132
  }
133
  }
134
  }
@@ -136,7 +138,10 @@ class CombineJs
136
  if ( ! $scriptNotCombinable ) {
137
  // It also checks the domain name to make sure no external scripts would be added to the list
138
  if ( $localAssetPath = OptimizeCommon::getLocalAssetPath( $src, 'js' ) ) {
139
- $combinableList[$docLocationScript][ $groupIndex ][] = array(
 
 
 
140
  'src' => $src,
141
  'local' => $localAssetPath
142
  );
@@ -153,13 +158,13 @@ class CombineJs
153
 
154
  if ($jQueryLibInBodyCount === 2) {
155
  $jQueryLibInBodyCount = 0; // reset it
156
- $groupIndex ++;
157
  continue;
158
  }
159
  }
160
  }
161
  } else {
162
- $groupIndex ++;
163
  }
164
  }
165
  }
@@ -171,10 +176,10 @@ class CombineJs
171
 
172
  $finalCacheList = array();
173
 
174
- foreach ($combinableList as $docLocationScript => $combinableListIndexes) {
175
  $groupNo = 1;
176
 
177
- foreach ($combinableListIndexes as $groupIndex => $groupFiles) {
178
  // Any groups having one file? Then it's not really a group and the file should load on its own
179
  // Could be one extra file besides the jQuery & jQuery Migrate group or the only JS file called within the HEAD
180
  if (count($groupFiles) < 2) {
@@ -226,12 +231,22 @@ class CombineJs
226
  'script_srcs' => $groupScriptSrcsFilter
227
  );
228
 
 
 
 
 
 
 
 
 
 
229
  // Apply defer="defer" to combined JS files from the BODY tag (if enabled), except the combined jQuery & jQuery Migrate Group
230
  if ($docLocationScript === 'body' && ! $jQueryIsIncludedInGroup && Main::instance()->settings['combine_loaded_js_defer_body']) {
231
  if ($isDeferAppliedOnBodyCombineGroupNo === 0) {
232
  // Only record the first one
233
  $isDeferAppliedOnBodyCombineGroupNo = $groupNo;
234
  }
 
235
  $finalCacheList[$docLocationScript][$groupNo]['extra_attributes'][] = 'defer';
236
  }
237
 
@@ -255,7 +270,17 @@ class CombineJs
255
 
256
  $finalTagUrl = OptimizeCommon::filterWpContentUrl() . OptimizeJs::getRelPathJsCacheDir() . $uriToFinalJsFile;
257
 
258
- $deferAttr = (isset($cachedValues['extra_attributes']) && in_array('defer', $cachedValues['extra_attributes'])) ? 'defer="defer"' : '';
 
 
 
 
 
 
 
 
 
 
259
 
260
  $finalJsTag = <<<HTML
261
  <script {$deferAttr} id='wpacu-combined-js-{$docLocationScript}-group-{$groupNo}' type='text/javascript' src='{$finalTagUrl}'></script>
@@ -438,7 +463,7 @@ HTML;
438
  }
439
  }
440
 
441
- @file_put_contents( $localFinalJsFile, $finalJsContents );
442
  }
443
  }
444
 
86
 
87
  $scriptNotCombinable = false;
88
 
89
+ $hasSrc = isset($scriptAttributes['src']) && trim($scriptAttributes['src']); // No valid SRC attribute? It's not combinable (e.g. an inline tag)
90
  $isPluginScript = isset($scriptAttributes['data-wpacu-plugin-script']); // Only of the user is logged-in (skip it as it belongs to the Asset CleanUp (Pro) plugin)
91
 
92
  if (! $hasSrc || $isPluginScript) {
102
  }
103
  }
104
 
105
+ $isInGroupType = 'standard';
106
+
107
  if (! $scriptNotCombinable) { // Has SRC and $isPluginScript is set to false? Check the script
108
  $src = (string)$scriptAttributes['src'];
109
 
111
  $scriptNotCombinable = true;
112
  }
113
 
 
 
 
 
 
114
  if (isset($scriptAttributes['data-wpacu-to-be-preloaded-basic']) && $scriptAttributes['data-wpacu-to-be-preloaded-basic']) {
115
  $scriptNotCombinable = true;
116
  }
120
  $scriptNotCombinable = true;
121
  }
122
 
123
+ if (isset($scriptAttributes['async'], $scriptAttributes['defer'])) { // Has both "async" and "defer"
124
+ $isInGroupType = 'async_defer';
125
+ } elseif (isset($scriptAttributes['async'])) { // Has only "async"
126
+ $isInGroupType = 'async';
127
+ } elseif (isset($scriptAttributes['defer'])) { // Has only "defer"
128
+ // Does it have "defer" attribute, it's combinable (all checks were already done), loads in the BODY tag and "combine_loaded_js_defer_body" is ON? Keep it to the combination list
129
+ $isCombinableWithBodyDefer = (! $scriptNotCombinable && $docLocationScript === 'body' && Main::instance()->settings['combine_loaded_js_defer_body']);
130
+
131
+ if (! $isCombinableWithBodyDefer) {
132
+ // Otherwise, add it to the "defer" group type
133
+ $isInGroupType = 'defer';
134
  }
135
  }
136
  }
138
  if ( ! $scriptNotCombinable ) {
139
  // It also checks the domain name to make sure no external scripts would be added to the list
140
  if ( $localAssetPath = OptimizeCommon::getLocalAssetPath( $src, 'js' ) ) {
141
+ // Standard (could be multiple groups per $docLocationScript), Async & Defer, Async, Defer
142
+ $groupByType = ($isInGroupType === 'standard') ? $groupIndex : $isInGroupType;
143
+
144
+ $combinableList[$docLocationScript][ $groupByType ][] = array(
145
  'src' => $src,
146
  'local' => $localAssetPath
147
  );
158
 
159
  if ($jQueryLibInBodyCount === 2) {
160
  $jQueryLibInBodyCount = 0; // reset it
161
+ $groupIndex ++; // a new JS group will be created if jQuery & jQuery Migrate are combined in the BODY
162
  continue;
163
  }
164
  }
165
  }
166
  } else {
167
+ $groupIndex ++; // a new JS group will be created (applies to "standard" ones only)
168
  }
169
  }
170
  }
176
 
177
  $finalCacheList = array();
178
 
179
+ foreach ($combinableList as $docLocationScript => $combinableListGroups) {
180
  $groupNo = 1;
181
 
182
+ foreach ($combinableListGroups as $groupType => $groupFiles) {
183
  // Any groups having one file? Then it's not really a group and the file should load on its own
184
  // Could be one extra file besides the jQuery & jQuery Migrate group or the only JS file called within the HEAD
185
  if (count($groupFiles) < 2) {
231
  'script_srcs' => $groupScriptSrcsFilter
232
  );
233
 
234
+ if (in_array($groupType, array('async_defer', 'async', 'defer'))) {
235
+ if ($groupType === 'async_defer') {
236
+ $finalCacheList[$docLocationScript][$groupNo]['extra_attributes'][] = 'async';
237
+ $finalCacheList[$docLocationScript][$groupNo]['extra_attributes'][] = 'defer';
238
+ } else {
239
+ $finalCacheList[$docLocationScript][$groupNo]['extra_attributes'][] = $groupType;
240
+ }
241
+ }
242
+
243
  // Apply defer="defer" to combined JS files from the BODY tag (if enabled), except the combined jQuery & jQuery Migrate Group
244
  if ($docLocationScript === 'body' && ! $jQueryIsIncludedInGroup && Main::instance()->settings['combine_loaded_js_defer_body']) {
245
  if ($isDeferAppliedOnBodyCombineGroupNo === 0) {
246
  // Only record the first one
247
  $isDeferAppliedOnBodyCombineGroupNo = $groupNo;
248
  }
249
+
250
  $finalCacheList[$docLocationScript][$groupNo]['extra_attributes'][] = 'defer';
251
  }
252
 
270
 
271
  $finalTagUrl = OptimizeCommon::filterWpContentUrl() . OptimizeJs::getRelPathJsCacheDir() . $uriToFinalJsFile;
272
 
273
+ $deferAttr = '';
274
+
275
+ if (isset($cachedValues['extra_attributes']) && ! empty($cachedValues['extra_attributes'])) {
276
+ if (in_array('async', $cachedValues['extra_attributes']) && in_array('defer', $cachedValues['extra_attributes'])) {
277
+ $deferAttr = 'async=\'async\' defer=\'defer\'';
278
+ } elseif (in_array('async', $cachedValues['extra_attributes'])) {
279
+ $deferAttr = 'async=\'async\'';
280
+ } elseif (in_array('defer', $cachedValues['extra_attributes'])) {
281
+ $deferAttr = 'defer=\'defer\'';
282
+ }
283
+ }
284
 
285
  $finalJsTag = <<<HTML
286
  <script {$deferAttr} id='wpacu-combined-js-{$docLocationScript}-group-{$groupNo}' type='text/javascript' src='{$finalTagUrl}'></script>
463
  }
464
  }
465
 
466
+ FileSystem::file_put_contents($localFinalJsFile, $finalJsContents);
467
  }
468
  }
469
 
classes/OptimiseAssets/DynamicLoadedAssets.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace WpAssetCleanUp\OptimiseAssets;
3
+
4
+ /**
5
+ * Class DynamicLoadedAssets
6
+ * @package WpAssetCleanUp
7
+ */
8
+ class DynamicLoadedAssets
9
+ {
10
+ /**
11
+ * @param $from
12
+ * @param $value
13
+ *
14
+ * @return bool|mixed|string
15
+ */
16
+ public static function getAssetContentFrom($from, $value)
17
+ {
18
+ $assetContent = '';
19
+
20
+ if ($from === 'simple-custom-css') {
21
+ /*
22
+ * Special Case: "Simple Custom CSS" Plugin
23
+ *
24
+ * /?sccss=1
25
+ *
26
+ * As it is (no minification or optimization), it adds extra load time to the page
27
+ * as the CSS is read via PHP and all the WP environment is loading
28
+ */
29
+ if (! $assetContent = self::getSimpleCustomCss()) {
30
+ return false;
31
+ }
32
+ }
33
+
34
+ if ($from === 'dynamic') { // /? .php? etc.
35
+ if (! OptimizeCommon::isSourceFromSameHost($value->src)) {
36
+ return array();
37
+ }
38
+
39
+ $response = wp_remote_get(
40
+ $value->src
41
+ );
42
+
43
+ if (wp_remote_retrieve_response_code($response) !== 200) {
44
+ return false;
45
+ }
46
+
47
+ if (! $assetContent = wp_remote_retrieve_body($response)) {
48
+ return false;
49
+ }
50
+ }
51
+
52
+ return $assetContent;
53
+ }
54
+
55
+ /**
56
+ * "Simple Custom CSS" (better retrieval, especially for localhost and password protected sites)
57
+ *
58
+ * @return mixed|string
59
+ */
60
+ public static function getSimpleCustomCss()
61
+ {
62
+ $sccssOptions = get_option('sccss_settings');
63
+ $sccssRawContent = isset($sccssOptions['sccss-content']) ? $sccssOptions['sccss-content'] : '';
64
+ $cssContent = wp_kses($sccssRawContent, array('\'', '\"'));
65
+ $cssContent = str_replace('&gt;', '>', $cssContent);
66
+
67
+ return trim($cssContent);
68
+ }
69
+ }
classes/OptimiseAssets/FontsGoogle.php CHANGED
@@ -13,7 +13,12 @@ class FontsGoogle
13
  /**
14
  * @var string
15
  */
16
- public static $containsStr = 'fonts.googleapis.com/css?';
 
 
 
 
 
17
 
18
  /**
19
  *
@@ -146,15 +151,8 @@ class FontsGoogle
146
  $altHtmlSource = preg_replace('@<(script|style|noscript)[^>]*?>.*?</\\1>@si', '', $htmlSource);
147
  $altHtmlSource = preg_replace('/<!--(.|\s)*?-->/', '', $altHtmlSource);
148
 
149
- // Do not continue if there is no single reference to the string we look for in the clean HTML source
150
- if (stripos($altHtmlSource, self::$containsStr) === false) {
151
- return $htmlSource;
152
- }
153
-
154
  // Get all valid LINKs that have the $string within them
155
- $strContainsFormat = preg_quote(self::$containsStr, '/');
156
-
157
- preg_match_all('#<link[^>]*' . $strContainsFormat . '.*(>)#Usmi', $altHtmlSource, $matchesFromLinkTags, PREG_SET_ORDER);
158
 
159
  // Needs to match at least one to carry on with the replacements
160
  if (isset($matchesFromLinkTags[0]) && ! empty($matchesFromLinkTags[0])) {
@@ -235,7 +233,7 @@ class FontsGoogle
235
  public static function alterGoogleFontLink($linkHrefOriginal, $escHtml = true)
236
  {
237
  // Do not continue if it doesn't contain the right string or it contains 'display=' or there is no value set for "font-display"
238
- if (stripos($linkHrefOriginal, self::$containsStr) === false || strpos($linkHrefOriginal, 'display=') !== false || ! Main::instance()->settings['google_fonts_display']) {
239
  // Return original source
240
  return $linkHrefOriginal;
241
  }
13
  /**
14
  * @var string
15
  */
16
+ public static $containsStr = '//fonts.googleapis.com/';
17
+
18
+ /**
19
+ * @var string
20
+ */
21
+ public static $matchesStr = '//fonts.googleapis.com/(css|icon)\?';
22
 
23
  /**
24
  *
151
  $altHtmlSource = preg_replace('@<(script|style|noscript)[^>]*?>.*?</\\1>@si', '', $htmlSource);
152
  $altHtmlSource = preg_replace('/<!--(.|\s)*?-->/', '', $altHtmlSource);
153
 
 
 
 
 
 
154
  // Get all valid LINKs that have the $string within them
155
+ preg_match_all('#<link[^>]*' . self::$matchesStr . '.*(>)#Usmi', $altHtmlSource, $matchesFromLinkTags, PREG_SET_ORDER);
 
 
156
 
157
  // Needs to match at least one to carry on with the replacements
158
  if (isset($matchesFromLinkTags[0]) && ! empty($matchesFromLinkTags[0])) {
233
  public static function alterGoogleFontLink($linkHrefOriginal, $escHtml = true)
234
  {
235
  // Do not continue if it doesn't contain the right string or it contains 'display=' or there is no value set for "font-display"
236
+ if (stripos($linkHrefOriginal, self::$containsStr) === false || stripos($linkHrefOriginal, 'display=') !== false || ! Main::instance()->settings['google_fonts_display']) {
237
  // Return original source
238
  return $linkHrefOriginal;
239
  }
classes/OptimiseAssets/FontsGoogleRemove.php CHANGED
@@ -128,7 +128,7 @@ class FontsGoogleRemove
128
  {
129
  // Remove any Google Fonts imports
130
  foreach ($importsAddToTop as $importKey => $importToPrepend) {
131
- if (stripos($importToPrepend, '//fonts.googleapis.com/') !== false) {
132
  unset($importsAddToTop[$importKey]);
133
  }
134
  }
128
  {
129
  // Remove any Google Fonts imports
130
  foreach ($importsAddToTop as $importKey => $importToPrepend) {
131
+ if (stripos($importToPrepend, FontsGoogle::$containsStr) !== false) {
132
  unset($importsAddToTop[$importKey]);
133
  }
134
  }
classes/OptimiseAssets/MinifyCss.php CHANGED
@@ -13,14 +13,6 @@ use MatthiasMullie\Minify;
13
  */
14
  class MinifyCss
15
  {
16
- /**
17
- * 1: Basic
18
- * 2: Minify via https://github.com/matthiasmullie/minify
19
- *
20
- * @var int
21
- */
22
- public static $minType = 2;
23
-
24
  /**
25
  * @param $cssContent
26
  *
@@ -28,49 +20,10 @@ class MinifyCss
28
  */
29
  public static function applyMinification($cssContent)
30
  {
31
- if (self::$minType === 2) {
32
- $minifier = new Minify\CSS($cssContent);
33
  return trim($minifier->minify());
34
  }
35
 
36
- // Replace multiple whitespace with only one
37
- $cssContent = preg_replace( '/\s+/', ' ', $cssContent );
38
-
39
- // Remove comment blocks, everything between /* and */, except the ones preserved with /*! ... */ or /** ... */
40
- $cssContent = preg_replace( '~/\*(?![!|*])(.*?)\*/~', '', $cssContent );
41
-
42
- // Remove ; before }
43
- $cssContent = preg_replace( '/;(?=\s*})/', '', $cssContent );
44
-
45
- // Remove space after , : ; { } */ >
46
- $cssContent = preg_replace( '/(,|:|;|{|}|\*\/|>) /', '$1', $cssContent );
47
-
48
- // Remove space before , ; { } >
49
- $cssContent = preg_replace( '/ ([,;{}>])/', '$1', $cssContent );
50
-
51
- // Strip units such as px,em,pt etc. if value is 0 (converts 0px to 0)
52
- $cssContent = preg_replace( '/([: ])(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $cssContent );
53
-
54
- // Strip leading 0 on decimal values (converts 0.5px into .5px)
55
- $cssContent = preg_replace( '/([: ])0\.(\d+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $cssContent );
56
-
57
- // Converts #ff000 to #f00
58
- $cssContent = preg_replace("/#([0-9a-fA-F])\\1([0-9a-fA-F])\\2([0-9a-fA-F])\\3/", '#$1$2$3', $cssContent);
59
-
60
- // No empty @font-face
61
- $cssContent = preg_replace('/@font-face(|\s+){(|\s+)}/i', '', $cssContent);
62
-
63
- $strReps = array(
64
- // Converts things such as "margin:0 0 0 0;" to "margin:0;"
65
- ':0 0 0 0;' => ':0;'
66
- );
67
-
68
- $cssContent = str_replace(array_keys($strReps), array_values($strReps), $cssContent);
69
-
70
- // Remove whitespaces before and after the content
71
- return trim($cssContent);
72
- }
73
-
74
  /**
75
  * @param $src
76
  * @param string $handle
@@ -234,8 +187,8 @@ class MinifyCss
234
  */
235
  public static function isMinifyCssEnabledChecked($value)
236
  {
237
- if (! defined('WPACU_IS_MINIFY_ENABLED')) {
238
- define('WPACU_IS_MINIFY_ENABLED', $value);
239
  }
240
  }
241
  }
13
  */
14
  class MinifyCss
15
  {
 
 
 
 
 
 
 
 
16
  /**
17
  * @param $cssContent
18
  *
20
  */
21
  public static function applyMinification($cssContent)
22
  {
23
+ $minifier = new Minify\CSS($cssContent);
 
24
  return trim($minifier->minify());
25
  }
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  /**
28
  * @param $src
29
  * @param string $handle
187
  */
188
  public static function isMinifyCssEnabledChecked($value)
189
  {
190
+ if (! defined('WPACU_IS_MINIFY_CSS_ENABLED')) {
191
+ define('WPACU_IS_MINIFY_CSS_ENABLED', $value);
192
  }
193
  }
194
  }
classes/OptimiseAssets/MinifyJs.php CHANGED
@@ -13,14 +13,6 @@ use MatthiasMullie\Minify;
13
  */
14
  class MinifyJs
15
  {
16
- /**
17
- * 1: Basic
18
- * 2: Minify via https://github.com/matthiasmullie/minify
19
- *
20
- * @var int
21
- */
22
- public static $minType = 2;
23
-
24
  /**
25
  * @param $jsContent
26
  *
@@ -28,172 +20,10 @@ class MinifyJs
28
  */
29
  public static function applyMinification($jsContent)
30
  {
31
- if (self::$minType === 2) {
32
- $minifier = new Minify\JS($jsContent);
33
  return trim($minifier->minify());
34
  }
35
 
36
- $jsContent = preg_replace(array("/\s+\n/", "/\n\s+/", '/ +/'), array("\n", "\n ", ' '), $jsContent);
37
-
38
- // Going line by line
39
- $jsContentsLines = explode( "\n", $jsContent );
40
-
41
- $jsContent = '';
42
-
43
- foreach ( $jsContentsLines as $jsLineIndex => $jsContentLine ) {
44
- $jsContentLine = trim( $jsContentLine );
45
-
46
- if (strpos(trim($jsContentLine), '//') === 0) {
47
- continue;
48
- }
49
-
50
- $appendNewLine = true;
51
- $mergeDelimiter = '';
52
-
53
- if (strpos($jsContentLine, '//') !== false) {
54
- $appendNewLine = true;
55
- }
56
-
57
- // When to keep the new line
58
- elseif ( strpos( $jsContentLine, '/*' ) !== false
59
- || strpos( $jsContentLine, '*/' ) !== false
60
- || strpos( $jsContentLine, '*' ) === 0
61
- || in_array(substr( trim( $jsContentLine ),
62
- - 1 ), array('}', ')')) // Later, consider a solution to skip this from having a new line added
63
- ) {
64
- $appendNewLine = true;
65
- } else {
66
- $mergeDelimiter = in_array(
67
- substr( trim( $jsContentLine ), - 1 ),
68
- array( '{', '}', ';', ',' )
69
- ) ? '' : ' ';
70
- }
71
-
72
- $jsContent .= self::basicReplacementOnLine($jsContentLine) . ($appendNewLine ? "\n" : $mergeDelimiter);
73
- }
74
-
75
- /*
76
- * Step 1: Make sure content between quotes (could be message alerts, plain text) is not replaced
77
- * It will be replaced later on
78
- */
79
- preg_match_all("/(\"(.*?)\")|('(.*?)')/", $jsContent,$matchesBetweenQuotes);
80
-
81
- $wpacuSpaceDel = '@[wpacu-plugin-space-del]@';
82
-
83
- if (isset($matchesBetweenQuotes[0]) && ! empty($matchesBetweenQuotes[0])) {
84
- foreach ($matchesBetweenQuotes[0] as $matchBetweenQuotes) {
85
- if (strpos($matchBetweenQuotes, ' ') !== false) {
86
- $newMatch = str_replace( ' ', $wpacuSpaceDel, $matchBetweenQuotes );
87
- $jsContent = str_replace( $matchBetweenQuotes, $newMatch, $jsContent );
88
- }
89
- }
90
- }
91
-
92
- // Source: https://github.com/Letractively/samstyle-php-framework/blob/master/sp.php
93
- $regex = array(
94
- "`^([\t\s]+)`sm" => '',
95
- "`^\/\*(.*?)\*\/`sm" => '',
96
- "`([\n;]+)\/\*(.+?)\*\/`ism" => '$1',
97
- "`([\n;\s]+)//(.+?)[\n\r]`ism" => "$1\n",
98
- "`(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+`ism" => "\n",
99
-
100
- "/}\);\n}\)/" => '});})',
101
-
102
- "/([{|;|,]+)(\n+)('|\"|var|if|else|for|this|return|ready|jQuery|\\$|})/i" => '$1 $3',
103
-
104
- '/} else {/i' => '}else{',
105
- '/if \(/i' => 'if('
106
-
107
- );
108
-
109
- $jsContent = preg_replace(array_keys($regex), array_values($regex), $jsContent);
110
-
111
- $newReps = array(
112
- ";\n" => ';',
113
- //",\n" => ',',
114
- "}\n}" => '}}'
115
- );
116
-
117
- $jsContent = str_replace(array_keys($newReps), array_values($newReps), $jsContent);
118
-
119
- /*
120
- * Step: Make sure content between quotes (could be message alerts, plain text) is not replaced
121
- * Restore the spacing between quotes
122
- */
123
- $jsContent = str_replace($wpacuSpaceDel, ' ', $jsContent);
124
-
125
- // Remove whitespaces before and after the content
126
- return trim($jsContent);
127
- }
128
-
129
- /**
130
- * @param $jsContentLine
131
- *
132
- * @return mixed
133
- */
134
- public static function basicReplacementOnLine($jsContentLine)
135
- {
136
- // Regular Expression in the line? Don't make any changes
137
- if ( strpos($jsContentLine, 'RegExp') !== false
138
- || preg_match('/\=\s\//', $jsContentLine)) {
139
- return $jsContentLine;
140
- }
141
-
142
- $repsOne = array(
143
- // Remove space before & after colons
144
- ' :' => ':',
145
- ': ' => ':',
146
-
147
- // Remove space before & after equal signs
148
- ' =' => '=',
149
- '= ' => '=',
150
-
151
- "' ? '" => "'?'",
152
- ') {' => '){',
153
- ') !' => ')!'
154
- );
155
- $jsContentLine = str_replace(array_keys($repsOne), array_values($repsOne), $jsContentLine);
156
-
157
- $repsTwo = array(
158
- "{ '" => "{'",
159
- "' }" => "'}",
160
- ", '" => ",'",
161
- ' || ' => '||',
162
-
163
- '=true;' => '=!0;',
164
- ':true;' => ':!0;',
165
- '(true)' => '(!0)',
166
- '(true,' => '(!0,',
167
- 'return true;' => 'return !0;',
168
- 'return true}' => 'return !0}',
169
-
170
- '=false;' => '=!1;',
171
- ':false;' => ':!1;',
172
- '(false)' => '(!1)',
173
- '(false,' => '(!1,',
174
- 'return false;' => 'return !1;',
175
- 'return false}' => 'return !1}',
176
-
177
- );
178
-
179
- $jsContentLine = str_ireplace(array_keys($repsTwo), array_values($repsTwo), $jsContentLine);
180
-
181
- $repsThree = array(
182
- '; ' => ';',
183
- '{ ' => '{',
184
- '} ' => '}',
185
- '( ' => '(',
186
-
187
- ', ' => ',',
188
- //' + ' => '+'
189
-
190
- );
191
-
192
- $jsContentLine = str_ireplace(array_keys($repsThree), array_values($repsThree), $jsContentLine);
193
-
194
- return $jsContentLine;
195
- }
196
-
197
  /**
198
  * @param $src
199
  * @param string $handle
@@ -305,8 +135,7 @@ class MinifyJs
305
  $originalTagContents = (isset($scriptTagObj->nodeValue) && trim($scriptTagObj->nodeValue) !== '') ? $scriptTagObj->nodeValue : false;
306
 
307
  if ($originalTagContents) {
308
- $minifier = new Minify\JS($originalTagContents);
309
- $newTagContents = trim($minifier->minify());
310
 
311
  $htmlSource = str_ireplace('>'.$originalTagContents.'</script', '>'.$newTagContents.'</script', $htmlSource);
312
 
@@ -322,10 +151,15 @@ class MinifyJs
322
  */
323
  public static function isMinifyJsEnabled()
324
  {
 
 
 
 
325
  // Request Minify On The Fly
326
  // It will preview the page with JS minified
327
  // Only if the admin is logged-in as it uses more resources (CPU / Memory)
328
  if (array_key_exists('wpacu_js_minify', $_GET) && Menu::userCanManageAssets()) {
 
329
  return true;
330
  }
331
 
@@ -333,6 +167,7 @@ class MinifyJs
333
  is_admin() || // not for Dashboard view
334
  (! Main::instance()->settings['minify_loaded_js']) || // Minify JS has to be Enabled
335
  (Main::instance()->settings['test_mode'] && ! Menu::userCanManageAssets()) ) { // Does not trigger if "Test Mode" is Enabled
 
336
  return false;
337
  }
338
 
@@ -341,14 +176,26 @@ class MinifyJs
341
  $pageOptions = MetaBoxes::getPageOptions( WPACU_CURRENT_PAGE_ID );
342
 
343
  if ( isset( $pageOptions['no_js_minify'] ) && $pageOptions['no_js_minify'] ) {
 
344
  return false;
345
  }
346
  }
347
 
348
  if (OptimizeJs::isOptimizeJsEnabledByOtherParty('if_enabled')) {
 
349
  return false;
350
  }
351
 
352
  return true;
353
  }
 
 
 
 
 
 
 
 
 
 
354
  }
13
  */
14
  class MinifyJs
15
  {
 
 
 
 
 
 
 
 
16
  /**
17
  * @param $jsContent
18
  *
20
  */
21
  public static function applyMinification($jsContent)
22
  {
23
+ $minifier = new Minify\JS($jsContent);
 
24
  return trim($minifier->minify());
25
  }
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  /**
28
  * @param $src
29
  * @param string $handle
135
  $originalTagContents = (isset($scriptTagObj->nodeValue) && trim($scriptTagObj->nodeValue) !== '') ? $scriptTagObj->nodeValue : false;
136
 
137
  if ($originalTagContents) {
138
+ $newTagContents = self::applyMinification($originalTagContents);
 
139
 
140
  $htmlSource = str_ireplace('>'.$originalTagContents.'</script', '>'.$newTagContents.'</script', $htmlSource);
141
 
151
  */
152
  public static function isMinifyJsEnabled()
153
  {
154
+ if (defined('WPACU_IS_MINIFY_JS_ENABLED')) {
155
+ return WPACU_IS_MINIFY_JS_ENABLED;
156
+ }
157
+
158
  // Request Minify On The Fly
159
  // It will preview the page with JS minified
160
  // Only if the admin is logged-in as it uses more resources (CPU / Memory)
161
  if (array_key_exists('wpacu_js_minify', $_GET) && Menu::userCanManageAssets()) {
162
+ self::isMinifyJsEnabledChecked(true);
163
  return true;
164
  }
165
 
167
  is_admin() || // not for Dashboard view
168
  (! Main::instance()->settings['minify_loaded_js']) || // Minify JS has to be Enabled
169
  (Main::instance()->settings['test_mode'] && ! Menu::userCanManageAssets()) ) { // Does not trigger if "Test Mode" is Enabled
170
+ self::isMinifyJsEnabledChecked(false);
171
  return false;
172
  }
173
 
176
  $pageOptions = MetaBoxes::getPageOptions( WPACU_CURRENT_PAGE_ID );
177
 
178
  if ( isset( $pageOptions['no_js_minify'] ) && $pageOptions['no_js_minify'] ) {
179
+ self::isMinifyJsEnabledChecked(false);
180
  return false;
181
  }
182
  }
183
 
184
  if (OptimizeJs::isOptimizeJsEnabledByOtherParty('if_enabled')) {
185
+ self::isMinifyJsEnabledChecked(false);
186
  return false;
187
  }
188
 
189
  return true;
190
  }
191
+
192
+ /**
193
+ * @param $value
194
+ */
195
+ public static function isMinifyJsEnabledChecked($value)
196
+ {
197
+ if (! defined('WPACU_IS_MINIFY_JS_ENABLED')) {
198
+ define('WPACU_IS_MINIFY_JS_ENABLED', $value);
199
+ }
200
+ }
201
  }
classes/OptimiseAssets/OptimizeCommon.php CHANGED
@@ -25,6 +25,16 @@ class OptimizeCommon
25
  */
26
  public static $optimizedSingleFilesDir = 'item';
27
 
 
 
 
 
 
 
 
 
 
 
28
  /**
29
  *
30
  */
@@ -220,13 +230,19 @@ class OptimizeCommon
220
 
221
  if ($sourceFromTag && stripos($sourceFromTag, site_url()) !== false) {
222
  $cleanLinkHrefFromTag = trim($sourceFromTag, '?&');
223
-
224
  $afterQuestionMark = WPACU_PLUGIN_VERSION;
225
 
226
- if (strpos($sourceFromTag, '?') !== false) {
 
 
 
227
  list($cleanLinkHrefFromTag, $afterQuestionMark) = explode('?', $sourceFromTag);
228
  }
229
 
 
 
 
 
230
  return array('source' => $cleanLinkHrefFromTag, 'after_question_mark' => $afterQuestionMark);
231
  }
232
 
@@ -249,16 +265,12 @@ class OptimizeCommon
249
  $href = $urlPrefix . $href;
250
  }
251
 
252
- $externalHostsList = array(
253
- 'fonts.googleapis.com'
254
- );
255
-
256
  /*
257
  * Validate it first
258
  */
259
  $assetHost = strtolower(parse_url($href, PHP_URL_HOST));
260
 
261
- if (in_array($assetHost, $externalHostsList)) {
262
  return false;
263
  }
264
 
@@ -302,31 +314,37 @@ class OptimizeCommon
302
  * @param $jsonStorageFile
303
  * @param $relPathAssetCacheDir
304
  * @param $assetType
 
305
  *
306
  * @return array|mixed|object
307
  */
308
- public static function getAssetCachedData($jsonStorageFile, $relPathAssetCacheDir, $assetType)
309
  {
310
- // Only clean request URIs allowed
311
- if (strpos($_SERVER['REQUEST_URI'], '?') !== false) {
312
- list($requestUri) = explode('?', $_SERVER['REQUEST_URI']);
313
- } else {
314
- $requestUri = $_SERVER['REQUEST_URI'];
315
- }
 
316
 
317
- $requestUriPart = $requestUri;
318
 
319
- if ($requestUri === '/' || is_404()) {
320
- $requestUriPart = '';
321
- }
322
 
323
- $dirToFilename = WP_CONTENT_DIR . dirname($relPathAssetCacheDir) . '/_storage/'
324
- . parse_url(site_url(), PHP_URL_HOST) .
325
- $requestUriPart . '/';
326
 
327
- $dirToFilename = str_replace('//', '/', $dirToFilename);
328
 
329
- $assetsFile = $dirToFilename . self::filterStorageFileName($jsonStorageFile);
 
 
 
 
330
 
331
  if (! file_exists($assetsFile)) {
332
  return array();
@@ -343,7 +361,6 @@ class OptimizeCommon
343
  // Delete cached file after it expired as it will be regenerated
344
  if (filemtime($assetsFile) < (time() - 1 * $cachedAssetsFileExpiresIn)) {
345
  self::clearAssetCachedData($jsonStorageFile);
346
-
347
  return array();
348
  }
349
 
@@ -352,11 +369,15 @@ class OptimizeCommon
352
  if ($optionValue) {
353
  $optionValueArray = @json_decode($optionValue, ARRAY_A);
354
 
355
- if ($assetType === 'css' && (! empty($optionValueArray) && (isset($optionValueArray['head']['link_hrefs']) || isset($optionValueArray['body']['link_hrefs'])))) {
356
- return $optionValueArray;
357
- }
 
358
 
359
- if ($assetType === 'js' && ! empty($optionValueArray)) {
 
 
 
360
  return $optionValueArray;
361
  }
362
  }
@@ -371,42 +392,64 @@ class OptimizeCommon
371
  * @param $jsonStorageFile
372
  * @param $relPathAssetCacheDir
373
  * @param $list
 
374
  */
375
- public static function setAssetCachedData($jsonStorageFile, $relPathAssetCacheDir, $list)
376
  {
377
- // Only clean request URIs allowed
378
- if (strpos($_SERVER['REQUEST_URI'], '?') !== false) {
379
- list($requestUri) = explode('?', $_SERVER['REQUEST_URI']);
380
- } else {
381
- $requestUri = $_SERVER['REQUEST_URI'];
382
- }
 
 
383
 
384
- $requestUriPart = $requestUri;
385
 
386
- if ($requestUri === '/' || is_404()) {
387
- $requestUriPart = '';
388
- }
389
 
390
- $dirToFilename = WP_CONTENT_DIR . dirname($relPathAssetCacheDir) . '/_storage/'
391
- . parse_url(site_url(), PHP_URL_HOST) .
392
- $requestUriPart . '/';
393
 
394
- $dirToFilename = str_replace('//', '/', $dirToFilename);
395
 
396
- if (! is_dir($dirToFilename)) {
397
- $makeFileDir = @mkdir($dirToFilename, 0755, true);
398
 
399
- if (! $makeFileDir) {
400
- return;
 
401
  }
 
 
 
 
 
402
  }
403
 
404
- $assetsFile = $dirToFilename . self::filterStorageFileName($jsonStorageFile);
 
 
 
 
 
 
 
 
 
 
 
 
405
 
406
- // CSS/JS JSON FILE DATA
407
- $assetsValue = $list;
 
408
 
409
- @file_put_contents($assetsFile, $assetsValue);
410
  }
411
 
412
  /**
@@ -414,29 +457,40 @@ class OptimizeCommon
414
  */
415
  public static function clearAssetCachedData($jsonStorageFile)
416
  {
417
- // Only clean request URIs allowed
418
- if (strpos($_SERVER['REQUEST_URI'], '?') !== false) {
419
- list($requestUri) = explode('?', $_SERVER['REQUEST_URI']);
420
- } else {
421
- $requestUri = $_SERVER['REQUEST_URI'];
422
- }
 
 
 
 
423
 
424
- $requestUriPart = $requestUri;
425
 
426
- if ($requestUri === '/' || is_404()) {
427
- $requestUriPart = '';
428
- }
429
 
430
- $dirToFilename = WP_CONTENT_DIR . self::getRelPathPluginCacheDir() . '_storage/'
431
- . parse_url(site_url(), PHP_URL_HOST) .
432
- $requestUriPart;
433
 
434
- // If it doesn't have "/" at the end, append it (it will prevent double forward slashes)
435
- if (substr($dirToFilename, -1) !== '/') {
436
- $dirToFilename .= '/';
437
- }
438
 
439
- $assetsFile = $dirToFilename . self::filterStorageFileName($jsonStorageFile);
 
 
 
 
 
 
 
440
 
441
  if (file_exists($assetsFile)) { // avoid E_WARNING errors | check if it exists first
442
  @unlink($assetsFile);
@@ -567,7 +621,7 @@ SQL;
567
  }
568
 
569
  //removeIf(develoment)
570
- // Remove "min" and "one" directories (created with Pro Version < 1.1.3.8 | Lite Version < 1.3.3.7) if they are empty
571
  //endRemoveIf(develoment)
572
  @rmdir(WP_CONTENT_DIR . OptimizeCss::getRelPathCssCacheDir().'min');
573
  @rmdir(WP_CONTENT_DIR . OptimizeJs::getRelPathJsCacheDir().'min');
@@ -704,4 +758,66 @@ SQL;
704
 
705
  return ($isPreview || $isQueryStringDebug);
706
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
707
  }
25
  */
26
  public static $optimizedSingleFilesDir = 'item';
27
 
28
+ /**
29
+ * @var array
30
+ */
31
+ public static $wellKnownExternalHosts = array(
32
+ 'googleapis.com',
33
+ 'bootstrapcdn.com',
34
+ 'cloudflare.com',
35
+ 'jsdelivr.net'
36
+ );
37
+
38
  /**
39
  *
40
  */
230
 
231
  if ($sourceFromTag && stripos($sourceFromTag, site_url()) !== false) {
232
  $cleanLinkHrefFromTag = trim($sourceFromTag, '?&');
 
233
  $afterQuestionMark = WPACU_PLUGIN_VERSION;
234
 
235
+ // Is it a dynamic URL? Keep the full path
236
+ if (strpos($cleanLinkHrefFromTag, '/?') !== false || strpos($cleanLinkHrefFromTag, '.php') !== false) {
237
+ list(,$afterQuestionMark) = explode('?', $sourceFromTag);
238
+ } elseif (strpos($sourceFromTag, '?') !== false) {
239
  list($cleanLinkHrefFromTag, $afterQuestionMark) = explode('?', $sourceFromTag);
240
  }
241
 
242
+ if (! $afterQuestionMark) {
243
+ return false;
244
+ }
245
+
246
  return array('source' => $cleanLinkHrefFromTag, 'after_question_mark' => $afterQuestionMark);
247
  }
248
 
265
  $href = $urlPrefix . $href;
266
  }
267
 
 
 
 
 
268
  /*
269
  * Validate it first
270
  */
271
  $assetHost = strtolower(parse_url($href, PHP_URL_HOST));
272
 
273
+ if (preg_match('#'.$assetHost.'#si', implode('', self::$wellKnownExternalHosts))) {
274
  return false;
275
  }
276
 
314
  * @param $jsonStorageFile
315
  * @param $relPathAssetCacheDir
316
  * @param $assetType
317
+ * @param $forType
318
  *
319
  * @return array|mixed|object
320
  */
321
+ public static function getAssetCachedData($jsonStorageFile, $relPathAssetCacheDir, $assetType, $forType = 'combine')
322
  {
323
+ if ($forType === 'combine') {
324
+ // Only clean request URIs allowed
325
+ if (strpos($_SERVER['REQUEST_URI'], '?') !== false) {
326
+ list($requestUri) = explode('?', $_SERVER['REQUEST_URI']);
327
+ } else {
328
+ $requestUri = $_SERVER['REQUEST_URI'];
329
+ }
330
 
331
+ $requestUriPart = $requestUri;
332
 
333
+ if ($requestUri === '/' || is_404()) {
334
+ $requestUriPart = '';
335
+ }
336
 
337
+ $dirToFilename = WP_CONTENT_DIR . dirname($relPathAssetCacheDir) . '/_storage/'
338
+ . parse_url(site_url(), PHP_URL_HOST) .
339
+ $requestUriPart . '/';
340
 
341
+ $dirToFilename = str_replace('//', '/', $dirToFilename);
342
 
343
+ $assetsFile = $dirToFilename . self::filterStorageFileName($jsonStorageFile);
344
+ } elseif ($forType === 'item') {
345
+ $dirToFilename = WP_CONTENT_DIR . dirname($relPathAssetCacheDir) . '/_storage/'.self::$optimizedSingleFilesDir.'/';
346
+ $assetsFile = $dirToFilename . $jsonStorageFile;
347
+ }
348
 
349
  if (! file_exists($assetsFile)) {
350
  return array();
361
  // Delete cached file after it expired as it will be regenerated
362
  if (filemtime($assetsFile) < (time() - 1 * $cachedAssetsFileExpiresIn)) {
363
  self::clearAssetCachedData($jsonStorageFile);
 
364
  return array();
365
  }
366
 
369
  if ($optionValue) {
370
  $optionValueArray = @json_decode($optionValue, ARRAY_A);
371
 
372
+ if ($forType === 'combine') {
373
+ if ($assetType === 'css' && (! empty($optionValueArray) && (isset($optionValueArray['head']['link_hrefs']) || isset($optionValueArray['body']['link_hrefs'])))) {
374
+ return $optionValueArray;
375
+ }
376
 
377
+ if ($assetType === 'js' && ! empty($optionValueArray)) {
378
+ return $optionValueArray;
379
+ }
380
+ } elseif ($forType === 'item') {
381
  return $optionValueArray;
382
  }
383
  }
392
  * @param $jsonStorageFile
393
  * @param $relPathAssetCacheDir
394
  * @param $list
395
+ * @param $forType
396
  */
397
+ public static function setAssetCachedData($jsonStorageFile, $relPathAssetCacheDir, $list, $forType = 'combine')
398
  {
399
+ // Combine CSS/JS JSON Storage
400
+ if ($forType === 'combine') {
401
+ // Only clean request URIs allowed
402
+ if (strpos($_SERVER['REQUEST_URI'], '?') !== false) {
403
+ list($requestUri) = explode('?', $_SERVER['REQUEST_URI']);
404
+ } else {
405
+ $requestUri = $_SERVER['REQUEST_URI'];
406
+ }
407
 
408
+ $requestUriPart = $requestUri;
409
 
410
+ if ($requestUri === '/' || is_404()) {
411
+ $requestUriPart = '';
412
+ }
413
 
414
+ $dirToFilename = WP_CONTENT_DIR . dirname($relPathAssetCacheDir) . '/_storage/'
415
+ . parse_url(site_url(), PHP_URL_HOST) .
416
+ $requestUriPart . '/';
417
 
418
+ $dirToFilename = str_replace('//', '/', $dirToFilename);
419
 
420
+ if (! is_dir($dirToFilename)) {
421
+ $makeFileDir = @mkdir($dirToFilename, 0755, true);
422
 
423
+ if (! $makeFileDir) {
424
+ return;
425
+ }
426
  }
427
+
428
+ $assetsFile = $dirToFilename . self::filterStorageFileName($jsonStorageFile);
429
+
430
+ // CSS/JS JSON FILE DATA
431
+ $assetsValue = $list;
432
  }
433
 
434
+ // Optimize single CSS/JS item JSON Storage
435
+ if ($forType === 'item') {
436
+ $dirToFilename = WP_CONTENT_DIR . dirname($relPathAssetCacheDir) . '/_storage/'.self::$optimizedSingleFilesDir.'/';
437
+
438
+ $dirToFilename = str_replace('//', '/', $dirToFilename);
439
+
440
+ if (! is_dir($dirToFilename)) {
441
+ $makeFileDir = @mkdir($dirToFilename, 0755, true);
442
+
443
+ if (! $makeFileDir) {
444
+ return;
445
+ }
446
+ }
447
 
448
+ $assetsFile = $dirToFilename . $jsonStorageFile;
449
+ $assetsValue = $list;
450
+ }
451
 
452
+ FileSystem::file_put_contents($assetsFile, $assetsValue);
453
  }
454
 
455
  /**
457
  */
458
  public static function clearAssetCachedData($jsonStorageFile)
459
  {
460
+ if (strpos($jsonStorageFile, '-combined') !== false) {
461
+ /*
462
+ * #1: Combined CSS/JS JSON
463
+ */
464
+ // Only clean request URIs allowed
465
+ if (strpos($_SERVER['REQUEST_URI'], '?') !== false) {
466
+ list($requestUri) = explode('?', $_SERVER['REQUEST_URI']);
467
+ } else {
468
+ $requestUri = $_SERVER['REQUEST_URI'];
469
+ }
470
 
471
+ $requestUriPart = $requestUri;
472
 
473
+ if ($requestUri === '/' || is_404()) {
474
+ $requestUriPart = '';
475
+ }
476
 
477
+ $dirToFilename = WP_CONTENT_DIR . self::getRelPathPluginCacheDir() . '_storage/'
478
+ . parse_url(site_url(), PHP_URL_HOST) .
479
+ $requestUriPart;
480
 
481
+ // If it doesn't have "/" at the end, append it (it will prevent double forward slashes)
482
+ if (substr($dirToFilename, - 1) !== '/') {
483
+ $dirToFilename .= '/';
484
+ }
485
 
486
+ $assetsFile = $dirToFilename . self::filterStorageFileName($jsonStorageFile);
487
+ } elseif (strpos($jsonStorageFile, '_optimize_') !== false) {
488
+ /*
489
+ * #2: Optimized CSS/JS JSON
490
+ */
491
+ $dirToFilename = WP_CONTENT_DIR . self::getRelPathPluginCacheDir() . '_storage/'.self::$optimizedSingleFilesDir.'/';
492
+ $assetsFile = $dirToFilename . $jsonStorageFile;
493
+ }
494
 
495
  if (file_exists($assetsFile)) { // avoid E_WARNING errors | check if it exists first
496
  @unlink($assetsFile);
621
  }
622
 
623
  //removeIf(develoment)
624
+ // Remove "min" and "one" directories (created with Pro Version < 1.1.3.8 | Lite Version < 1.3.3.7) if they are empty
625
  //endRemoveIf(develoment)
626
  @rmdir(WP_CONTENT_DIR . OptimizeCss::getRelPathCssCacheDir().'min');
627
  @rmdir(WP_CONTENT_DIR . OptimizeJs::getRelPathJsCacheDir().'min');
758
 
759
  return ($isPreview || $isQueryStringDebug);
760
  }
761
+
762
+ /**
763
+ * @param $transient
764
+ * @param $fromLocation
765
+ *
766
+ * @return bool|mixed
767
+ */
768
+ public static function getTransient($transient, $fromLocation = 'db')
769
+ {
770
+ $contents = '';
771
+
772
+ // Local record
773
+ if ($fromLocation === 'local') {
774
+ $dirToFilename = WP_CONTENT_DIR . self::getRelPathPluginCacheDir() . '_storage/'.self::$optimizedSingleFilesDir.'/';
775
+ $assetsFile = $dirToFilename . $transient.'.json';
776
+
777
+ if (file_exists($assetsFile)) {
778
+ $contents = trim(FileSystem::file_get_contents($assetsFile));
779
+
780
+ if (! $contents) {
781
+ // Empty file? Something weird, use the MySQL record as a fallback
782
+ return get_transient($transient);
783
+ }
784
+ }
785
+
786
+ return $contents;
787
+ }
788
+
789
+ // MySQL record: $fromLocation default 'db'
790
+ return get_transient($transient);
791
+ }
792
+
793
+ /**
794
+ * @param $transientName
795
+ */
796
+ public static function deleteTransient($transientName)
797
+ {
798
+ // MySQL record
799
+ delete_transient($transientName);
800
+
801
+ // File record
802
+ self::clearAssetCachedData($transientName.'.json');
803
+ }
804
+
805
+ /**
806
+ * @param $transient
807
+ * @param $value
808
+ * @param int $expiration
809
+ */
810
+ public static function setTransient($transient, $value, $expiration = 0)
811
+ {
812
+ // MySQL record
813
+ set_transient($transient, $value, $expiration);
814
+
815
+ // File record
816
+ self::setAssetCachedData(
817
+ $transient.'.json',
818
+ OptimizeCss::getRelPathCssCacheDir(),
819
+ $value,
820
+ 'item'
821
+ );
822
+ }
823
  }
classes/OptimiseAssets/OptimizeCss.php CHANGED
@@ -5,7 +5,6 @@ use WpAssetCleanUp\Preloads;
5
  use WpAssetCleanUp\FileSystem;
6
  use WpAssetCleanUp\CleanUp;
7
  use WpAssetCleanUp\Main;
8
- use WpAssetCleanUp\Menu;
9
  use WpAssetCleanUp\MetaBoxes;
10
  use WpAssetCleanUp\Misc;
11
 
@@ -25,18 +24,75 @@ class OptimizeCss
25
  */
26
  public function init()
27
  {
 
28
  add_action('wp_footer', array($this, 'prepareOptimizeList'), PHP_INT_MAX);
29
  }
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  /**
32
  *
33
  */
34
  public function prepareOptimizeList()
35
  {
 
 
 
 
36
  global $wp_styles;
37
 
38
  $allStylesHandles = wp_cache_get('wpacu_all_styles_handles');
39
-
40
  if (empty($allStylesHandles)) {
41
  return;
42
  }
@@ -74,6 +130,11 @@ class OptimizeCss
74
 
75
  $value = $wpStylesRegistered[$handle];
76
 
 
 
 
 
 
77
  $optimizeValues = self::maybeOptimizeIt($value);
78
 
79
  if (! empty($optimizeValues)) {
@@ -119,18 +180,21 @@ class OptimizeCss
119
 
120
  $transientName = 'wpacu_css_optimize_'.$handleDbStr;
121
 
122
- $savedValues = get_transient( $transientName );
 
 
123
 
124
  if ( $savedValues ) {
125
  $savedValuesArray = json_decode( $savedValues, ARRAY_A );
126
 
127
  if ( $savedValuesArray['ver'] !== $dbVer ) {
128
  // New File Version? Delete transient as it will be re-added to the database with the new version
129
- delete_transient( $transientName );
130
  } else {
131
  $localPathToCssOptimized = str_replace( '//', '/', ABSPATH . $savedValuesArray['optimize_uri'] );
132
 
133
  if ( isset( $savedValuesArray['source_uri'] ) && file_exists( $localPathToCssOptimized ) ) {
 
134
  return array(
135
  $savedValuesArray['source_uri'],
136
  $savedValuesArray['optimize_uri']
@@ -144,64 +208,24 @@ class OptimizeCss
144
 
145
  $isCssFile = false;
146
 
147
- if ($value->handle === 'sccss_style' && in_array('simple-custom-css/simple-custom-css.php', apply_filters('active_plugins', get_option('active_plugins')))) {
148
- /*
149
- * Special Case: "Simple Custom CSS" Plugin
150
- *
151
- * /?sccss=1
152
- *
153
- * As it is (no minification or optimization), it adds extra load time to the page
154
- * as the CSS is read via PHP and all the WP environment is loading
155
- */
156
  $pathToAssetDir = '';
157
  $sourceBeforeOptimization = $value->src;
158
 
159
- $cssContent = Misc::getSimpleCustomCss();
160
-
161
- $newLocalSrc = WP_CONTENT_DIR . OptimizeCss::getRelPathCssCacheDir() . 'sccss_style.css';
162
-
163
- // Append CSS content to make it cacheable (exception)
164
- $cssContent = '/*! Simple Custom CSS */' ."\n". $cssContent;
165
-
166
- if (! FileSystem::file_put_contents($newLocalSrc, $cssContent)) {
167
  return array();
168
  }
169
- } elseif (strpos($src, '/?custom-css=') !== false) {
170
- /*
171
- * JetPack Custom CSS
172
- * /?custom-css
173
- */
174
- global $wp_version;
175
-
176
- $pathToAssetDir = '';
177
  $sourceBeforeOptimization = $value->src;
178
 
179
- if (! OptimizeCommon::isSourceFromSameHost($sourceBeforeOptimization)) {
180
- return array();
181
- }
182
-
183
- $response = wp_remote_get($sourceBeforeOptimization);
184
- $responseCode = wp_remote_retrieve_response_code($response);
185
-
186
- if ($responseCode !== 200) {
187
- return array();
188
- }
189
-
190
- $cssContent = wp_remote_retrieve_body($response);
191
-
192
- $listSrcAfterSlash = str_replace('/?', '', strrchr($src, '/?'));
193
-
194
- parse_str($listSrcAfterSlash, $outputSrcParse);
195
-
196
- $customCssVersion = isset($outputSrcParse['custom-css']) ? $outputSrcParse['custom-css'] : $wp_version;
197
- $extraVersion = isset($value->ver) ? '_'.$value->ver : '';
198
-
199
- $newLocalSrc = WP_CONTENT_DIR . OptimizeCss::getRelPathCssCacheDir() . 'custom_css_' . $customCssVersion . $extraVersion . '.css';
200
-
201
- // Append CSS content to make it cacheable (exception)
202
- $cssContent = '/*! JetPack Custom CSS */' ."\n". $cssContent;
203
-
204
- if (! FileSystem::file_put_contents($newLocalSrc, $cssContent)) {
205
  return array();
206
  }
207
  } else {
@@ -248,7 +272,7 @@ class OptimizeCss
248
 
249
  // No changes were made, thus, there's no point in changing the original file location
250
  if ($isCssFile && trim($cssContentBefore) === trim($cssContent)) {
251
- // There's no point in changing the original file location
252
  return false;
253
  }
254
 
@@ -286,6 +310,7 @@ class OptimizeCss
286
  $saveFile = FileSystem::file_put_contents($newLocalPath, $cssContent);
287
 
288
  if (! $saveFile && ! $cssContent) {
 
289
  return array();
290
  }
291
 
@@ -296,7 +321,7 @@ class OptimizeCss
296
  );
297
 
298
  // Add / Re-add (with new version) transient
299
- set_transient($transientName, json_encode($saveValues));
300
 
301
  return array(
302
  OptimizeCommon::getHrefRelPath($src),
@@ -332,8 +357,10 @@ class OptimizeCss
332
  $htmlSource = self::doInline($htmlSource);
333
  }
334
 
335
- // 'wpacu_css_optimize_list' caching list is also checked; if it's empty, no minification is made
336
- $htmlSource = self::updateHtmlSourceOriginalToOptimizedCss($htmlSource);
 
 
337
 
338
  if (! Main::instance()->preventAssetsSettings()) {
339
  $htmlSource = Preloads::instance()->doChanges($htmlSource);
@@ -409,14 +436,25 @@ class OptimizeCss
409
  {
410
  // Updates (background | font etc.) URLs to the right path and others
411
  if ($fix === 'path') {
 
 
 
412
  $cssContentPathReps = array(
 
413
  'url("../' => 'url("'.$appendBefore.'../',
414
  "url('../" => "url('".$appendBefore.'../',
415
  'url(../' => 'url('.$appendBefore.'../',
416
 
417
  'url("./' => 'url("'.$appendBefore.'./',
418
  "url('./" => "url('".$appendBefore.'./',
419
- 'url(./' => 'url('.$appendBefore.'./'
 
 
 
 
 
 
 
420
  );
421
 
422
  $cssContent = str_replace(array_keys($cssContentPathReps), array_values($cssContentPathReps), $cssContent);
@@ -482,14 +520,10 @@ class OptimizeCss
482
  */
483
  public static function updateHtmlSourceOriginalToOptimizedCss($htmlSource)
484
  {
485
- $cssOptimizeList = wp_cache_get('wpacu_css_optimize_list');
486
- $allEnqueuedCleanLinkHrefs = wp_cache_get('wpacu_css_enqueued_hrefs');
487
-
488
- if (empty($cssOptimizeList)) {
489
- return $htmlSource;
490
- }
491
 
492
- preg_match_all('#<link[^>]*(stylesheet|preload)[^>]*(>)#Usmi', OptimizeCommon::cleanerHtmlSource($htmlSource), $matchesSourcesFromTags, PREG_SET_ORDER);
493
 
494
  if (empty($matchesSourcesFromTags)) {
495
  return $htmlSource;
@@ -525,6 +559,10 @@ class OptimizeCss
525
  }
526
  }
527
 
 
 
 
 
528
  foreach ($cssOptimizeList as $listValues) {
529
  // The contents of the CSS file has been changed and thus, we will replace the source path from LINK with the cached (e.g. minified) one
530
 
@@ -587,11 +625,6 @@ class OptimizeCss
587
  return false;
588
  }
589
 
590
- // It's enabled in settings with a list; Now check if "Optimize CSS Delivery" is enabled in WP Rocket
591
- if (self::isWpRocketOptimizeCssDeliveryEnabled()) {
592
- return false;
593
- }
594
-
595
  // Finally, return true
596
  return true;
597
  }
@@ -603,19 +636,12 @@ class OptimizeCss
603
  */
604
  public static function doInline($htmlSource)
605
  {
606
- $inlineCssFilesPatterns = trim(Main::instance()->settings['inline_css_files_list']);
607
  $minifyInlineTags = (! Main::instance()->preventAssetsSettings() && Main::instance()->settings['minify_loaded_css'] && Main::instance()->settings['minify_loaded_css_inline']);
 
608
 
609
- $allPatterns = array();
610
-
611
- if (strpos($inlineCssFilesPatterns, "\n")) {
612
- // Multiple values (one per line)
613
- foreach (explode("\n", $inlineCssFilesPatterns) as $inlinePattern) {
614
- $allPatterns[] = preg_quote(trim($inlinePattern), '/');
615
- }
616
- } else {
617
- // Only one value?
618
- $allPatterns[] = preg_quote(trim($inlineCssFilesPatterns), '/');
619
  }
620
 
621
  preg_match_all('#<link[^>]*stylesheet[^>]*('. implode('|', $allPatterns). ').*(>)#Usmi', $htmlSource, $matchesSourcesFromTags, PREG_SET_ORDER);
@@ -850,4 +876,18 @@ class OptimizeCss
850
  return false;
851
  }
852
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
853
  }
5
  use WpAssetCleanUp\FileSystem;
6
  use WpAssetCleanUp\CleanUp;
7
  use WpAssetCleanUp\Main;
 
8
  use WpAssetCleanUp\MetaBoxes;
9
  use WpAssetCleanUp\Misc;
10
 
24
  */
25
  public function init()
26
  {
27
+ add_action('init', array($this, 'triggersAfterInit'));
28
  add_action('wp_footer', array($this, 'prepareOptimizeList'), PHP_INT_MAX);
29
  }
30
 
31
+ /**
32
+ *
33
+ */
34
+ public function triggersAfterInit()
35
+ {
36
+ if (self::isInlineCssEnabled()) {
37
+ $allPatterns = self::getAllInlineChosenPatterns();
38
+
39
+ if (! empty($allPatterns)) {
40
+ // Make "Inline CSS Files" compatible with "Optimize CSS Delivery" from WP Rocket
41
+ add_filter('rocket_async_css_regex_pattern', static function($regex) {
42
+ return '/(?=<link(?!.*wpacu-to-be-inlined.*)[^>]*\s(rel\s*=\s*[\'"]stylesheet["\']))<link(?!.*wpacu-to-be-inlined.*)[^>]*\shref\s*=\s*[\'"]([^\'"]+)[\'"](.*)>/iU';
43
+ });
44
+
45
+ add_filter('style_loader_tag', static function($styleTag) use ($allPatterns) {
46
+ preg_match_all('#<link[^>]*stylesheet[^>]*(' . implode('|', $allPatterns) . ').*(>)#Usmi',
47
+ $styleTag, $matchesSourcesFromTags, PREG_SET_ORDER);
48
+
49
+ if (! empty($matchesSourcesFromTags)) {
50
+ return str_replace('<link ', '<link wpacu-to-be-inlined=\'1\' ', $styleTag);
51
+ }
52
+
53
+ return $styleTag;
54
+ }, 10, 1);
55
+ }
56
+ }
57
+ }
58
+
59
+ /**
60
+ * @return array
61
+ */
62
+ public static function getAllInlineChosenPatterns()
63
+ {
64
+ $inlineCssFilesPatterns = trim(Main::instance()->settings['inline_css_files_list']);
65
+
66
+ $allPatterns = array();
67
+
68
+ if (strpos($inlineCssFilesPatterns, "\n")) {
69
+ // Multiple values (one per line)
70
+ foreach (explode("\n", $inlineCssFilesPatterns) as $inlinePattern) {
71
+ $allPatterns[] = preg_quote(trim($inlinePattern), '/');
72
+ }
73
+ } else {
74
+ // Only one value?
75
+ $allPatterns[] = preg_quote(trim($inlineCssFilesPatterns), '/');
76
+ }
77
+
78
+ // Strip any empty values
79
+ $allPatterns = array_filter($allPatterns);
80
+
81
+ return $allPatterns;
82
+ }
83
+
84
  /**
85
  *
86
  */
87
  public function prepareOptimizeList()
88
  {
89
+ if (! self::isWorthCheckingForOptimization()) {
90
+ return;
91
+ }
92
+
93
  global $wp_styles;
94
 
95
  $allStylesHandles = wp_cache_get('wpacu_all_styles_handles');
 
96
  if (empty($allStylesHandles)) {
97
  return;
98
  }
130
 
131
  $value = $wpStylesRegistered[$handle];
132
 
133
+ $localAssetPath = OptimizeCommon::getLocalAssetPath($value->src, 'css');
134
+ if (! $localAssetPath || ! file_exists($localAssetPath)) {
135
+ continue; // not a local file
136
+ }
137
+
138
  $optimizeValues = self::maybeOptimizeIt($value);
139
 
140
  if (! empty($optimizeValues)) {
180
 
181
  $transientName = 'wpacu_css_optimize_'.$handleDbStr;
182
 
183
+ if (! isset($GLOBALS['from_location_inc'])) { $GLOBALS['from_location_inc'] = 1; }
184
+ $fromLocation = ($GLOBALS['from_location_inc'] % 2) ? 'db' : 'local';
185
+ $savedValues = OptimizeCommon::getTransient($transientName, $fromLocation);
186
 
187
  if ( $savedValues ) {
188
  $savedValuesArray = json_decode( $savedValues, ARRAY_A );
189
 
190
  if ( $savedValuesArray['ver'] !== $dbVer ) {
191
  // New File Version? Delete transient as it will be re-added to the database with the new version
192
+ OptimizeCommon::deleteTransient($transientName);
193
  } else {
194
  $localPathToCssOptimized = str_replace( '//', '/', ABSPATH . $savedValuesArray['optimize_uri'] );
195
 
196
  if ( isset( $savedValuesArray['source_uri'] ) && file_exists( $localPathToCssOptimized ) ) {
197
+ $GLOBALS['from_location_inc']++;
198
  return array(
199
  $savedValuesArray['source_uri'],
200
  $savedValuesArray['optimize_uri']
208
 
209
  $isCssFile = false;
210
 
211
+ if (Main::instance()->settings['cache_dynamic_loaded_css'] &&
212
+ $value->handle === 'sccss_style' &&
213
+ in_array('simple-custom-css/simple-custom-css.php', apply_filters('active_plugins', get_option('active_plugins')))
214
+ ) {
 
 
 
 
 
215
  $pathToAssetDir = '';
216
  $sourceBeforeOptimization = $value->src;
217
 
218
+ if (! ($cssContent = DynamicLoadedAssets::getAssetContentFrom('simple-custom-css', $value))) {
 
 
 
 
 
 
 
219
  return array();
220
  }
221
+ } elseif (Main::instance()->settings['cache_dynamic_loaded_css'] &&
222
+ ((strpos($src, '/?') !== false) || strpos($src, '.php?') !== false || Misc::endsWith($src, '.php')) &&
223
+ (strpos($src, site_url()) !== false)
224
+ ) {
225
+ $pathToAssetDir = '';
 
 
 
226
  $sourceBeforeOptimization = $value->src;
227
 
228
+ if (! ($cssContent = DynamicLoadedAssets::getAssetContentFrom('dynamic', $value))) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  return array();
230
  }
231
  } else {
272
 
273
  // No changes were made, thus, there's no point in changing the original file location
274
  if ($isCssFile && trim($cssContentBefore) === trim($cssContent)) {
275
+ // There's no point in changing the original CSS (static) file location
276
  return false;
277
  }
278
 
310
  $saveFile = FileSystem::file_put_contents($newLocalPath, $cssContent);
311
 
312
  if (! $saveFile && ! $cssContent) {
313
+ // Fallback to the original CSS if the optimized version can't be created or updated
314
  return array();
315
  }
316
 
321
  );
322
 
323
  // Add / Re-add (with new version) transient
324
+ OptimizeCommon::setTransient($transientName, json_encode($saveValues));
325
 
326
  return array(
327
  OptimizeCommon::getHrefRelPath($src),
357
  $htmlSource = self::doInline($htmlSource);
358
  }
359
 
360
+ if (self::isWorthCheckingForOptimization()) {
361
+ // 'wpacu_css_optimize_list' caching list is also checked; if it's empty, no optimization is made
362
+ $htmlSource = self::updateHtmlSourceOriginalToOptimizedCss($htmlSource);
363
+ }
364
 
365
  if (! Main::instance()->preventAssetsSettings()) {
366
  $htmlSource = Preloads::instance()->doChanges($htmlSource);
436
  {
437
  // Updates (background | font etc.) URLs to the right path and others
438
  if ($fix === 'path') {
439
+ // Clear any extra spaces between @import and the single/double quotes
440
+ $cssContent = preg_replace('/@import(\s+|)([\'"])/i', '@import \\2', $cssContent);
441
+
442
  $cssContentPathReps = array(
443
+ // @import with url(), background-image etc.
444
  'url("../' => 'url("'.$appendBefore.'../',
445
  "url('../" => "url('".$appendBefore.'../',
446
  'url(../' => 'url('.$appendBefore.'../',
447
 
448
  'url("./' => 'url("'.$appendBefore.'./',
449
  "url('./" => "url('".$appendBefore.'./',
450
+ 'url(./' => 'url('.$appendBefore.'./',
451
+
452
+ // @import without URL
453
+ '@import "../' => '@import "'.$appendBefore.'../',
454
+ "@import '../" => "@import '".$appendBefore.'../',
455
+
456
+ '@import "./' => '@import "'.$appendBefore.'./',
457
+ "@import './" => "@import '".$appendBefore.'./'
458
  );
459
 
460
  $cssContent = str_replace(array_keys($cssContentPathReps), array_values($cssContentPathReps), $cssContent);
520
  */
521
  public static function updateHtmlSourceOriginalToOptimizedCss($htmlSource)
522
  {
523
+ $cssOptimizeList = wp_cache_get('wpacu_css_optimize_list') ?: array();
524
+ $allEnqueuedCleanLinkHrefs = wp_cache_get('wpacu_css_enqueued_hrefs') ?: array();
 
 
 
 
525
 
526
+ preg_match_all('#<link[^>]*(stylesheet|(as(\s+|)=(\s+|)(|"|\')style(|"|\')))[^>]*(>)#Umi', OptimizeCommon::cleanerHtmlSource($htmlSource), $matchesSourcesFromTags, PREG_SET_ORDER);
527
 
528
  if (empty($matchesSourcesFromTags)) {
529
  return $htmlSource;
559
  }
560
  }
561
 
562
+ if (empty($cssOptimizeList)) {
563
+ continue;
564
+ }
565
+
566
  foreach ($cssOptimizeList as $listValues) {
567
  // The contents of the CSS file has been changed and thus, we will replace the source path from LINK with the cached (e.g. minified) one
568
 
625
  return false;
626
  }
627
 
 
 
 
 
 
628
  // Finally, return true
629
  return true;
630
  }
636
  */
637
  public static function doInline($htmlSource)
638
  {
 
639
  $minifyInlineTags = (! Main::instance()->preventAssetsSettings() && Main::instance()->settings['minify_loaded_css'] && Main::instance()->settings['minify_loaded_css_inline']);
640
+ $allPatterns = self::getAllInlineChosenPatterns();
641
 
642
+ // No patterns added? Return the same $htmlSource
643
+ if (empty($allPatterns)) {
644
+ return $htmlSource;
 
 
 
 
 
 
 
645
  }
646
 
647
  preg_match_all('#<link[^>]*stylesheet[^>]*('. implode('|', $allPatterns). ').*(>)#Usmi', $htmlSource, $matchesSourcesFromTags, PREG_SET_ORDER);
876
  return false;
877
  }
878
 
879
+ /**
880
+ * @return bool
881
+ */
882
+ public static function isWorthCheckingForOptimization()
883
+ {
884
+ // At least one of these options have to be enabled
885
+ // Otherwise, we will not perform specific useless actions and save resources
886
+ // [wpacu_lite]
887
+ return MinifyCss::isMinifyCssEnabled() ||
888
+ Main::instance()->settings['google_fonts_display'] ||
889
+ Main::instance()->settings['google_fonts_remove'];
890
+ // [/wpacu_lite]
891
+ }
892
+
893
  }
classes/OptimiseAssets/OptimizeJs.php CHANGED
@@ -32,8 +32,8 @@ class OptimizeJs
32
  */
33
  public function prepareOptimizeList()
34
  {
35
- // At this time, the only optimization for JS files is minification
36
- if (! MinifyJs::isMinifyJsEnabled()) {
37
  return;
38
  }
39
 
@@ -68,6 +68,12 @@ class OptimizeJs
68
  if (! isset($wp_scripts->registered[$handle])) { continue; }
69
 
70
  $value = $wp_scripts->registered[$handle];
 
 
 
 
 
 
71
  $optimizeValues = self::maybeOptimizeIt($value);
72
 
73
  if ( ! empty( $optimizeValues ) ) {
@@ -91,30 +97,42 @@ class OptimizeJs
91
 
92
  $src = isset($value->src) ? $value->src : false;
93
 
94
- if (! $src || MinifyJs::skipMinify($src, $value->handle)) {
95
  return array();
96
  }
97
 
 
 
 
 
 
 
 
 
98
  $fileVer = $dbVer = (isset($value->ver) && $value->ver) ? $value->ver : $wp_version;
99
 
100
  $handleDbStr = md5($value->handle);
101
 
102
  $transientName = 'wpacu_js_optimize_'.$handleDbStr;
103
 
104
- $savedValues = get_transient( $transientName );
 
 
105
 
106
  if ( $savedValues ) {
107
  $savedValuesArray = json_decode( $savedValues, ARRAY_A );
108
 
109
  if ( $savedValuesArray['ver'] !== $dbVer ) {
110
  // New File Version? Delete transient as it will be re-added to the database with the new version
111
- delete_transient( $transientName );
112
  } else {
113
  $localPathToJsOptimized = str_replace( '//', '/', ABSPATH . $savedValuesArray['optimize_uri'] );
114
 
115
  // Do not load any minified JS file (from the database transient cache) if it doesn't exist
116
  // It will fallback to the original JS file
117
  if ( isset( $savedValuesArray['source_uri'] ) && file_exists( $localPathToJsOptimized ) ) {
 
 
118
  return array(
119
  $savedValuesArray['source_uri'],
120
  $savedValuesArray['optimize_uri']
@@ -127,21 +145,39 @@ class OptimizeJs
127
  $src = site_url() . $src;
128
  }
129
 
130
- $localAssetPath = OptimizeCommon::getLocalAssetPath($src, 'js');
131
 
132
- if (! file_exists($localAssetPath)) {
133
- return array();
134
- }
 
 
 
 
 
 
 
 
 
135
 
136
- $pathToAssetDir = OptimizeCommon::getPathToAssetDir($value->src);
 
 
 
 
137
 
 
 
138
 
139
- $jsContent = $jsContentBefore = FileSystem::file_get_contents($localAssetPath);
 
140
 
141
- $jsContent = MinifyJs::applyMinification($jsContent);
 
 
142
 
143
- if (trim($jsContent, '; ') === trim($jsContentBefore, '; ')) {
144
- // The JS file is already minified / No need to copy it in to the cache (save disk space)
145
  return array();
146
  }
147
 
@@ -156,10 +192,12 @@ class OptimizeJs
156
 
157
  $newFilePathUri = self::getRelPathJsCacheDir() . OptimizeCommon::$optimizedSingleFilesDir . '/' . $value->handle . '-v' . $fileVer;
158
 
159
- $sha1File = @sha1_file($localAssetPath);
 
160
 
161
- if ($sha1File) {
162
- $newFilePathUri .= '-'.$sha1File;
 
163
  }
164
 
165
  $newFilePathUri .= '.js';
@@ -168,13 +206,13 @@ class OptimizeJs
168
  $newLocalPathUrl = WP_CONTENT_URL . $newFilePathUri; // Full URL path
169
 
170
  if ($jsContent) {
171
- $jsContent = '/*! ' . str_replace(ABSPATH, '/', $localAssetPath) . ' */' . "\n" . $jsContent;
172
  }
173
 
174
- $saveFile = @file_put_contents($newLocalPath, $jsContent);
175
 
176
  if (! $saveFile || ! $jsContent) {
177
- // Fallback to the original JS if the minified version can't be created or updated
178
  return array();
179
  }
180
 
@@ -185,7 +223,7 @@ class OptimizeJs
185
  );
186
 
187
  // Add / Re-add (with new version) transient
188
- set_transient($transientName, json_encode($saveValues));
189
 
190
  return array(
191
  OptimizeCommon::getHrefRelPath($value->src),
@@ -200,14 +238,10 @@ class OptimizeJs
200
  */
201
  public static function updateHtmlSourceOriginalToOptimizedJs($htmlSource)
202
  {
203
- $jsOptimizeList = wp_cache_get('wpacu_js_optimize_list');
204
- $allEnqueuedCleanScriptSrcs = wp_cache_get('wpacu_js_enqueued_srcs');
205
-
206
- if (empty($jsOptimizeList)) {
207
- return $htmlSource;
208
- }
209
 
210
- preg_match_all('#<script[^>]*src(|\s+)=(|\s+)[^>]*(>)#Usmi', OptimizeCommon::cleanerHtmlSource($htmlSource), $matchesSourcesFromTags, PREG_SET_ORDER);
211
 
212
  foreach ($matchesSourcesFromTags as $matches) {
213
  $scriptSourceTag = $matches[0];
@@ -217,8 +251,16 @@ class OptimizeJs
217
  continue;
218
  }
219
 
 
 
 
 
 
 
 
 
220
  // Is it a local JS? Check if it's hardcoded (not enqueued the WordPress way)
221
- if ($cleanScriptSrcFromTagArray = OptimizeCommon::getLocalCleanSourceFromTag($scriptSourceTag, 'src')) {
222
  $cleanScriptSrcFromTag = $cleanScriptSrcFromTagArray['source'];
223
  $afterQuestionMark = $cleanScriptSrcFromTagArray['after_question_mark'];
224
 
@@ -239,6 +281,9 @@ class OptimizeJs
239
  }
240
  }
241
 
 
 
 
242
 
243
  foreach ($jsOptimizeList as $listValues) {
244
  // If the minified files are deleted (e.g. /wp-content/cache/ is cleared)
@@ -305,6 +350,8 @@ class OptimizeJs
305
  return $htmlSource;
306
  }
307
 
 
 
308
  // Are there any assets unloaded where their "children" are ignored?
309
  // Since they weren't dequeued the WP way (to avoid unloading the "children"), they will be stripped here
310
  if (! Main::instance()->preventAssetsSettings()) {
@@ -318,12 +365,14 @@ class OptimizeJs
318
  }
319
 
320
  /*
321
- * The JavaScript files only get cached if they are minified
322
- * #minifying
323
- * STEP 2: Load minify-able caching list and replace the original source URLs with the new cached ones
324
  */
325
- if (MinifyJs::isMinifyJsEnabled()) {
326
- // 'wpacu_js_optimize_list' caching list is also checked; if it's empty, no minification is made
 
 
327
  $htmlSource = self::updateHtmlSourceOriginalToOptimizedJs($htmlSource);
328
  }
329
 
@@ -579,4 +628,15 @@ class OptimizeJs
579
  return $jsOptimizeEnabledIn;
580
  }
581
 
 
 
 
 
 
 
 
 
 
 
 
582
  }
32
  */
33
  public function prepareOptimizeList()
34
  {
35
+ // Are both Minify and Cache Dynamic JS disabled? No point in continuing and using extra resources as there is nothing to change
36
+ if (! self::isWorthCheckingForOptimization()) {
37
  return;
38
  }
39
 
68
  if (! isset($wp_scripts->registered[$handle])) { continue; }
69
 
70
  $value = $wp_scripts->registered[$handle];
71
+
72
+ $localAssetPath = OptimizeCommon::getLocalAssetPath($value->src, 'js');
73
+ if (! $localAssetPath || ! file_exists($localAssetPath)) {
74
+ continue; // not a local file
75
+ }
76
+
77
  $optimizeValues = self::maybeOptimizeIt($value);
78
 
79
  if ( ! empty( $optimizeValues ) ) {
97
 
98
  $src = isset($value->src) ? $value->src : false;
99
 
100
+ if (! $src) {
101
  return array();
102
  }
103
 
104
+ $doFileMinify = true;
105
+
106
+ if (! MinifyJs::isMinifyJsEnabled()) {
107
+ $doFileMinify = false;
108
+ } elseif (MinifyJs::skipMinify($src, $value->handle)) {
109
+ $doFileMinify = false;
110
+ }
111
+
112
  $fileVer = $dbVer = (isset($value->ver) && $value->ver) ? $value->ver : $wp_version;
113
 
114
  $handleDbStr = md5($value->handle);
115
 
116
  $transientName = 'wpacu_js_optimize_'.$handleDbStr;
117
 
118
+ if (! isset($GLOBALS['from_location_inc'])) { $GLOBALS['from_location_inc'] = 1; }
119
+ $fromLocation = ($GLOBALS['from_location_inc'] % 2) ? 'db' : 'local';
120
+ $savedValues = OptimizeCommon::getTransient($transientName, $fromLocation);
121
 
122
  if ( $savedValues ) {
123
  $savedValuesArray = json_decode( $savedValues, ARRAY_A );
124
 
125
  if ( $savedValuesArray['ver'] !== $dbVer ) {
126
  // New File Version? Delete transient as it will be re-added to the database with the new version
127
+ OptimizeCommon::deleteTransient($transientName);
128
  } else {
129
  $localPathToJsOptimized = str_replace( '//', '/', ABSPATH . $savedValuesArray['optimize_uri'] );
130
 
131
  // Do not load any minified JS file (from the database transient cache) if it doesn't exist
132
  // It will fallback to the original JS file
133
  if ( isset( $savedValuesArray['source_uri'] ) && file_exists( $localPathToJsOptimized ) ) {
134
+ $GLOBALS['from_location_inc']++;
135
+
136
  return array(
137
  $savedValuesArray['source_uri'],
138
  $savedValuesArray['optimize_uri']
145
  $src = site_url() . $src;
146
  }
147
 
148
+ $isJsFile = $jsContentBefore = false;
149
 
150
+ if (Main::instance()->settings['cache_dynamic_loaded_js'] &&
151
+ ((strpos($src, '/?') !== false) || strpos($src, '.php?') !== false || Misc::endsWith($src, '.php')) &&
152
+ (strpos($src, site_url()) !== false)
153
+ ) {
154
+ $pathToAssetDir = '';
155
+ $sourceBeforeOptimization = $value->src;
156
+
157
+ if (! ($jsContent = DynamicLoadedAssets::getAssetContentFrom('dynamic', $value))) {
158
+ return array();
159
+ }
160
+ } else {
161
+ $localAssetPath = OptimizeCommon::getLocalAssetPath($src, 'js');
162
 
163
+ if (! file_exists($localAssetPath)) {
164
+ return array();
165
+ }
166
+
167
+ $isJsFile = true;
168
 
169
+ $pathToAssetDir = OptimizeCommon::getPathToAssetDir($value->src);
170
+ $sourceBeforeOptimization = str_replace(ABSPATH, '/', $localAssetPath);
171
 
172
+ $jsContent = $jsContentBefore = FileSystem::file_get_contents($localAssetPath);
173
+ }
174
 
175
+ if ($doFileMinify) {
176
+ $jsContent = MinifyJs::applyMinification($jsContent);
177
+ }
178
 
179
+ if ($isJsFile && trim($jsContent, '; ') === trim($jsContentBefore, '; ')) {
180
+ // The (static) JS file is already minified / No need to copy it in to the cache (save disk space)
181
  return array();
182
  }
183
 
192
 
193
  $newFilePathUri = self::getRelPathJsCacheDir() . OptimizeCommon::$optimizedSingleFilesDir . '/' . $value->handle . '-v' . $fileVer;
194
 
195
+ if (isset($localAssetPath)) { // For static files only
196
+ $sha1File = @sha1_file($localAssetPath);
197
 
198
+ if ($sha1File) {
199
+ $newFilePathUri .= '-' . $sha1File;
200
+ }
201
  }
202
 
203
  $newFilePathUri .= '.js';
206
  $newLocalPathUrl = WP_CONTENT_URL . $newFilePathUri; // Full URL path
207
 
208
  if ($jsContent) {
209
+ $jsContent = '/*! ' . $sourceBeforeOptimization . ' */' . "\n" . $jsContent;
210
  }
211
 
212
+ $saveFile = FileSystem::file_put_contents($newLocalPath, $jsContent);
213
 
214
  if (! $saveFile || ! $jsContent) {
215
+ // Fallback to the original JS if the optimized version can't be created or updated
216
  return array();
217
  }
218
 
223
  );
224
 
225
  // Add / Re-add (with new version) transient
226
+ OptimizeCommon::setTransient($transientName, json_encode($saveValues));
227
 
228
  return array(
229
  OptimizeCommon::getHrefRelPath($value->src),
238
  */
239
  public static function updateHtmlSourceOriginalToOptimizedJs($htmlSource)
240
  {
241
+ $jsOptimizeList = wp_cache_get('wpacu_js_optimize_list') ?: array();
242
+ $allEnqueuedCleanScriptSrcs = wp_cache_get('wpacu_js_enqueued_srcs') ?: array();
 
 
 
 
243
 
244
+ preg_match_all('#(<script[^>]*src(|\s+)=(|\s+)[^>]*(>))|(<link[^>]*(as(\s+|)=(\s+|)(|"|\')script(|"|\'))[^>]*(>))#Umi', OptimizeCommon::cleanerHtmlSource($htmlSource), $matchesSourcesFromTags, PREG_SET_ORDER);
245
 
246
  foreach ($matchesSourcesFromTags as $matches) {
247
  $scriptSourceTag = $matches[0];
251
  continue;
252
  }
253
 
254
+ $forAttr = 'src';
255
+
256
+ // Any preloads for the optimized script?
257
+ // e.g. <link rel='preload' as='script' href='...' />
258
+ if (strpos($scriptSourceTag, '<link') !== false) {
259
+ $forAttr = 'href';
260
+ }
261
+
262
  // Is it a local JS? Check if it's hardcoded (not enqueued the WordPress way)
263
+ if ($cleanScriptSrcFromTagArray = OptimizeCommon::getLocalCleanSourceFromTag($scriptSourceTag, $forAttr)) {
264
  $cleanScriptSrcFromTag = $cleanScriptSrcFromTagArray['source'];
265
  $afterQuestionMark = $cleanScriptSrcFromTagArray['after_question_mark'];
266
 
281
  }
282
  }
283
 
284
+ if (empty($jsOptimizeList)) {
285
+ continue;
286
+ }
287
 
288
  foreach ($jsOptimizeList as $listValues) {
289
  // If the minified files are deleted (e.g. /wp-content/cache/ is cleared)
350
  return $htmlSource;
351
  }
352
 
353
+ /* [wpacu_pro] */$htmlSource = apply_filters('wpacu_pro_maybe_move_jquery_after_body_tag', $htmlSource);/* [/wpacu_pro] */
354
+
355
  // Are there any assets unloaded where their "children" are ignored?
356
  // Since they weren't dequeued the WP way (to avoid unloading the "children"), they will be stripped here
357
  if (! Main::instance()->preventAssetsSettings()) {
365
  }
366
 
367
  /*
368
+ * The JavaScript files only get cached if they are minified or are loaded like /?custom-js=version - /script.php?ver=1 etc.
369
+ * #optimizing
370
+ * STEP 2: Load optimize-able caching list and replace the original source URLs with the new cached ones
371
  */
372
+
373
+ // At least minify or cache dynamic loaded JS has to be enabled to proceed
374
+ if (self::isWorthCheckingForOptimization()) {
375
+ // 'wpacu_js_optimize_list' caching list is also checked; if it's empty, no optimization is made
376
  $htmlSource = self::updateHtmlSourceOriginalToOptimizedJs($htmlSource);
377
  }
378
 
628
  return $jsOptimizeEnabledIn;
629
  }
630
 
631
+ /**
632
+ * @return bool
633
+ */
634
+ public static function isWorthCheckingForOptimization()
635
+ {
636
+ // At least one of these options have to be enabled
637
+ // Otherwise, we will not perform specific useless actions and save resources
638
+ return MinifyJs::isMinifyJsEnabled() ||
639
+ Main::instance()->settings['cache_dynamic_loaded_js'];
640
+ }
641
+
642
  }
classes/OwnAssets.php CHANGED
@@ -220,18 +220,26 @@ class OwnAssets
220
  HTML;
221
 
222
  $wpacuObjectData = array(
223
- 'plugin_name' => WPACU_PLUGIN_ID,
224
- 'reload_icon' => $svgReloadIcon,
225
- 'reload_msg' => sprintf(__('Reloading %s CSS &amp; JS list', 'wp-asset-clean-up'),
226
- '<strong style="margin: 0 4px;">' . WPACU_PLUGIN_TITLE . '</strong>'),
227
- 'dom_get_type' => Main::$domGetType,
228
- 'start_del' => Main::START_DEL,
229
- 'end_del' => Main::END_DEL,
230
- 'ajax_url' => admin_url('admin-ajax.php'),
231
- 'post_id' => $postId, // if any
232
- 'page_url' => $pageUrl // post, page, custom post type, homepage etc.
233
  );
234
 
 
 
 
 
 
 
 
 
235
  // [wpacu_lite]
236
  $submitTicketLink = 'https://wordpress.org/support/plugin/wp-asset-clean-up';
237
  // [/wpacu_lite]
220
  HTML;
221
 
222
  $wpacuObjectData = array(
223
+ 'plugin_name' => WPACU_PLUGIN_ID,
224
+ 'reload_icon' => $svgReloadIcon,
225
+ 'reload_msg' => sprintf(__('Reloading %s CSS &amp; JS list', 'wp-asset-clean-up'), '<strong style="margin: 0 4px;">' . WPACU_PLUGIN_TITLE . '</strong>'),
226
+ 'dom_get_type' => Main::$domGetType,
227
+ 'list_show_status' => Main::instance()->settings['assets_list_show_status'],
228
+ 'start_del' => Main::START_DEL,
229
+ 'end_del' => Main::END_DEL,
230
+ 'ajax_url' => admin_url('admin-ajax.php'),
231
+ 'post_id' => $postId, // if any
232
+ 'page_url' => $pageUrl // post, page, custom post type, homepage etc.
233
  );
234
 
235
+ // Assets List Show Status only applies for edit post/page/custom post type/category/custom taxonomy
236
+ // Dashboard pages such as "Homepage" from plugin's "CSS/JavaScript Load Manager" will fetch the list on load
237
+ $wpacuObjectData['override_assets_list_load'] = false;
238
+
239
+ if ($page === WPACU_PLUGIN_ID.'_assets_manager' && $pageRequestFor === 'homepage') {
240
+ $wpacuObjectData['override_assets_list_load'] = true;
241
+ }
242
+
243
  // [wpacu_lite]
244
  $submitTicketLink = 'https://wordpress.org/support/plugin/wp-asset-clean-up';
245
  // [/wpacu_lite]
classes/Plugin.php CHANGED
@@ -159,7 +159,7 @@ HTACCESS;
159
 
160
  if ( ! is_file( $cacheDir . 'index.php' ) ) {
161
  // /wp-content/cache/asset-cleanup/cache/{$assetType}/index.php
162
- @file_put_contents( $cacheDir . 'index.php', $emptyPhpFileContents );
163
  }
164
 
165
  if ( ! is_dir( $cacheDir . 'logged-in' ) ) {
@@ -172,23 +172,28 @@ HTACCESS;
172
 
173
  if ( ! is_file( $cacheDir . 'logged-in/index.php' ) ) {
174
  // /wp-content/cache/asset-cleanup/cache/{$assetType}/logged-in/index.html
175
- @file_put_contents( $cacheDir . 'logged-in/index.php', $emptyPhpFileContents );
176
  }
177
 
178
  $htAccessFilePath = dirname( $cacheDir ) . '/.htaccess';
179
 
180
  if ( ! is_file( $htAccessFilePath ) ) {
181
  // /wp-content/cache/asset-cleanup/.htaccess
182
- @file_put_contents( $htAccessFilePath, $htAccessContents );
183
  }
184
 
185
  if ( ! is_file( dirname( $cacheDir ) . '/index.php' ) ) {
186
  // /wp-content/cache/asset-cleanup/index.php
187
- @file_put_contents( dirname( $cacheDir ) . '/index.php', $emptyPhpFileContents );
188
  }
189
  }
190
 
191
  $storageDir = WP_CONTENT_DIR . OptimiseAssets\OptimizeCommon::getRelPathPluginCacheDir() . '_storage/';
 
 
 
 
 
192
  $siteStorageCache = $storageDir.'/'.str_replace(array('https://', 'http://', '//'), '', site_url());
193
 
194
  if ( ! is_dir($storageDir) ) {
159
 
160
  if ( ! is_file( $cacheDir . 'index.php' ) ) {
161
  // /wp-content/cache/asset-cleanup/cache/{$assetType}/index.php
162
+ FileSystem::file_put_contents( $cacheDir . 'index.php', $emptyPhpFileContents );
163
  }
164
 
165
  if ( ! is_dir( $cacheDir . 'logged-in' ) ) {
172
 
173
  if ( ! is_file( $cacheDir . 'logged-in/index.php' ) ) {
174
  // /wp-content/cache/asset-cleanup/cache/{$assetType}/logged-in/index.html
175
+ FileSystem::file_put_contents( $cacheDir . 'logged-in/index.php', $emptyPhpFileContents );
176
  }
177
 
178
  $htAccessFilePath = dirname( $cacheDir ) . '/.htaccess';
179
 
180
  if ( ! is_file( $htAccessFilePath ) ) {
181
  // /wp-content/cache/asset-cleanup/.htaccess
182
+ FileSystem::file_put_contents( $htAccessFilePath, $htAccessContents );
183
  }
184
 
185
  if ( ! is_file( dirname( $cacheDir ) . '/index.php' ) ) {
186
  // /wp-content/cache/asset-cleanup/index.php
187
+ FileSystem::file_put_contents( dirname( $cacheDir ) . '/index.php', $emptyPhpFileContents );
188
  }
189
  }
190
 
191
  $storageDir = WP_CONTENT_DIR . OptimiseAssets\OptimizeCommon::getRelPathPluginCacheDir() . '_storage/';
192
+
193
+ if ( ! is_dir($storageDir . OptimizeCommon::$optimizedSingleFilesDir) ) {
194
+ @mkdir( $storageDir . OptimizeCommon::$optimizedSingleFilesDir, 0755, true );
195
+ }
196
+
197
  $siteStorageCache = $storageDir.'/'.str_replace(array('https://', 'http://', '//'), '', site_url());
198
 
199
  if ( ! is_dir($storageDir) ) {
classes/Settings.php CHANGED
@@ -41,6 +41,9 @@ class Settings
41
  'assets_list_layout_plugin_area_status',
42
  // [/wpacu_pro]
43
 
 
 
 
44
  'input_style',
45
 
46
  'hide_core_files',
@@ -56,6 +59,9 @@ class Settings
56
  'defer_css_loaded_body',
57
  // [/wpacu_pro]
58
 
 
 
 
59
  'inline_js_files',
60
  'inline_js_files_list',
61
 
@@ -207,6 +213,9 @@ class Settings
207
  'defer_css_loaded_body' => 'moved',
208
  // [/wpacu_pro]
209
 
 
 
 
210
  'input_style' => 'enhanced',
211
 
212
  // Starting from v1.2.8.6 (lite), WordPress core files are hidden in the assets list as a default setting
@@ -535,7 +544,7 @@ class Settings
535
  * Remove element(s) from the global unload rules
536
  */
537
  if (! $disableGutenbergCssBlockLibrary) {
538
- $wpacuUpdate->removeEverywhereUnloads(array('wp-block-library'));
539
  }
540
 
541
  if (! $disableJQueryMigrate || ! $disableCommentReply) {
41
  'assets_list_layout_plugin_area_status',
42
  // [/wpacu_pro]
43
 
44
+ // Fetch automatically, Fetch on click
45
+ 'assets_list_show_status',
46
+
47
  'input_style',
48
 
49
  'hide_core_files',
59
  'defer_css_loaded_body',
60
  // [/wpacu_pro]
61
 
62
+ 'cache_dynamic_loaded_css',
63
+ 'cache_dynamic_loaded_js',
64
+
65
  'inline_js_files',
66
  'inline_js_files_list',
67
 
213
  'defer_css_loaded_body' => 'moved',
214
  // [/wpacu_pro]
215
 
216
+ 'cache_dynamic_loaded_css' => 1,
217
+ 'cache_dynamic_loaded_js' => 1,
218
+
219
  'input_style' => 'enhanced',
220
 
221
  // Starting from v1.2.8.6 (lite), WordPress core files are hidden in the assets list as a default setting
544
  * Remove element(s) from the global unload rules
545
  */
546
  if (! $disableGutenbergCssBlockLibrary) {
547
+ $wpacuUpdate->removeEverywhereUnloads(array('wp-block-library' => 'remove'));
548
  }
549
 
550
  if (! $disableJQueryMigrate || ! $disableCommentReply) {
classes/Tools.php CHANGED
@@ -316,6 +316,20 @@ class Tools
316
  $settingsClass = new Settings();
317
  $settings = $settingsClass->getAll();
318
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  $return .= 'Has read "Stripping the fat" text: '. (($settings['wiki_read'] == 1) ? 'Yes' : 'No') . "\n\n";
320
 
321
  $return .= 'Manage in the Dashboard: '. (($settings['dashboard_show'] == 1) ? 'Yes ('.$settings['dom_get_type'].')' : 'No');
@@ -349,17 +363,18 @@ class Tools
349
  $storageCssJsDir = WP_CONTENT_DIR . OptimizeCommon::getRelPathPluginCacheDir();
350
  $return .= 'CSS/JS Storage Directory: '. $storageCssJsDir . ' ('.(is_writable($storageCssJsDir) ? 'writable' : 'NON WRITABLE').')' ."\n\n";
351
 
352
- $return .= 'Disable Emojis? '. (($settings['disable_emojis'] == 1) ? 'Yes' : 'No') . "\n";
353
- $return .= 'Disable Dashicons Site-Wide For Guests? '. (($settings['disable_dashicons_for_guests'] == 1) ? 'Yes' : 'No') . "\n";
354
- $return .= 'Disable Gutenberg CSS Block Editor (site-wide)? '. (($settings['disable_wp_block_library'] == 1) ? 'Yes' : 'No') . "\n";
355
- $return .= 'Disable jQuery Migrate (site-wide)? '. (($settings['disable_jquery_migrate'] == 1) ? 'Yes' : 'No') . "\n";
356
- $return .= 'Disable Comment Reply (site-wide)? '. (($settings['disable_comment_reply'] == 1) ? 'Yes' : 'No') . "\n\n";
 
357
 
358
  $return .= 'Remove "Really Simple Discovery (RSD)" link tag? '. (($settings['remove_rsd_link'] == 1) ? 'Yes' : 'No') . "\n";
359
  $return .= 'Remove "Windows Live Writer" link tag? '. (($settings['remove_wlw_link'] == 1) ? 'Yes' : 'No') . "\n";
360
  $return .= 'Remove "REST API" link tag? '. (($settings['remove_rest_api_link'] == 1) ? 'Yes' : 'No') . "\n";
361
  $return .= 'Remove Pages/Posts "Shortlink" tag? '. (($settings['remove_shortlink'] == 1) ? 'Yes' : 'No') . "\n";
362
- $return .= 'Remove "Post\'s Relational Links" tag? '. (($settings['remove_posts_rel_links'] == 1) ? 'Yes' : 'No') . "\n";
363
  $return .= 'Remove "WordPress version" meta tag? '. (($settings['remove_wp_version'] == 1) ? 'Yes' : 'No') . "\n";
364
  $return .= 'Remove All "generator" meta tags? '. (($settings['remove_generator_tag'] == 1) ? 'Yes' : 'No') . "\n";
365
  $return .= 'Remove Main RSS Feed Link? '. (($settings['remove_main_feed_link'] == 1) ? 'Yes' : 'No') . "\n";
316
  $settingsClass = new Settings();
317
  $settings = $settingsClass->getAll();
318
 
319
+ $globalUnloadList = Main::instance()->getGlobalUnload();
320
+
321
+ if (in_array('wp-block-library', $globalUnloadList['styles'])) {
322
+ $settings['disable_wp_block_library'] = 1;
323
+ }
324
+
325
+ if (in_array('jquery-migrate', $globalUnloadList['scripts'])) {
326
+ $settings['disable_jquery_migrate'] = 1;
327
+ }
328
+
329
+ if (in_array('comment-reply', $globalUnloadList['scripts'])) {
330
+ $settings['disable_comment_reply'] = 1;
331
+ }
332
+
333
  $return .= 'Has read "Stripping the fat" text: '. (($settings['wiki_read'] == 1) ? 'Yes' : 'No') . "\n\n";
334
 
335
  $return .= 'Manage in the Dashboard: '. (($settings['dashboard_show'] == 1) ? 'Yes ('.$settings['dom_get_type'].')' : 'No');
363
  $storageCssJsDir = WP_CONTENT_DIR . OptimizeCommon::getRelPathPluginCacheDir();
364
  $return .= 'CSS/JS Storage Directory: '. $storageCssJsDir . ' ('.(is_writable($storageCssJsDir) ? 'writable' : 'NON WRITABLE').')' ."\n\n";
365
 
366
+ $return .= 'Disable Emojis (site-wide)? '. (($settings['disable_emojis'] == 1) ? 'Yes' : 'No') . "\n";
367
+ $return .= 'Disable oEmbed (Embeds) (site-wide)? '. (($settings['disable_oembed'] == 1) ? 'Yes' : 'No') . "\n";
368
+ $return .= 'Disable Dashicons For Guests (site-wide)? '. (($settings['disable_dashicons_for_guests'] == 1) ? 'Yes' : 'No') . "\n";
369
+ $return .= 'Disable Gutenberg CSS Block Editor (site-wide)? '. (($settings['disable_wp_block_library'] == 1) ? 'Yes' : 'No') . "\n";
370
+ $return .= 'Disable jQuery Migrate (site-wide)? '. (($settings['disable_jquery_migrate'] == 1) ? 'Yes' : 'No') . "\n";
371
+ $return .= 'Disable Comment Reply (site-wide)? '. (($settings['disable_comment_reply'] == 1) ? 'Yes' : 'No') . "\n\n";
372
 
373
  $return .= 'Remove "Really Simple Discovery (RSD)" link tag? '. (($settings['remove_rsd_link'] == 1) ? 'Yes' : 'No') . "\n";
374
  $return .= 'Remove "Windows Live Writer" link tag? '. (($settings['remove_wlw_link'] == 1) ? 'Yes' : 'No') . "\n";
375
  $return .= 'Remove "REST API" link tag? '. (($settings['remove_rest_api_link'] == 1) ? 'Yes' : 'No') . "\n";
376
  $return .= 'Remove Pages/Posts "Shortlink" tag? '. (($settings['remove_shortlink'] == 1) ? 'Yes' : 'No') . "\n";
377
+ $return .= 'Remove "Post\'s Relational Links" tag? '. (($settings['remove_posts_rel_links'] == 1) ? 'Yes' : 'No') . "\n";
378
  $return .= 'Remove "WordPress version" meta tag? '. (($settings['remove_wp_version'] == 1) ? 'Yes' : 'No') . "\n";
379
  $return .= 'Remove All "generator" meta tags? '. (($settings['remove_generator_tag'] == 1) ? 'Yes' : 'No') . "\n";
380
  $return .= 'Remove Main RSS Feed Link? '. (($settings['remove_main_feed_link'] == 1) ? 'Yes' : 'No') . "\n";
early-triggers.php CHANGED
@@ -94,6 +94,11 @@ if (! function_exists('assetCleanUpNoLoad')) {
94
  return true;
95
  }
96
 
 
 
 
 
 
97
  // Perfmatters: Script Manager
98
  if (isset($_GET['perfmatters'])) {
99
  return true;
94
  return true;
95
  }
96
 
97
+ // Themify Builder (iFrame)
98
+ if (isset($_GET['tb-preview']) && $_GET['tb-preview']) {
99
+ return true;
100
+ }
101
+
102
  // Perfmatters: Script Manager
103
  if (isset($_GET['perfmatters'])) {
104
  return true;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: gabelivan
3
  Tags: pagespeed, page speed, dequeue, minify css, performance
4
  Donate link: https://gabelivan.com/items/wp-asset-cleanup-pro/?utm_source=wp_org_lite&utm_medium=donate
5
  Requires at least: 4.4
6
- Tested up to: 5.2.2
7
- Stable tag: 1.3.4.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
@@ -175,6 +175,19 @@ With the recently released "Test Mode" feature, you can safely unload assets on
175
  4. Homepage CSS & JS Management (List sorted by location)
176
 
177
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  = 1.3.4.2 =
179
  * New Feature: Remove Google Font Requests (including link/font preloads, @import/@font-face from CSS files & STYLE tags, resource hints)
180
  * Minify/Combine CSS Improvement: Any @import found including a local CSS in another CSS file is fetched (and minified/optimized if necessary) and added to the parent file (this reduces HTTP requests, saving additional round-trip times to the overall page load) - Read more: https://gtmetrix.com/avoid-css-import.html
3
  Tags: pagespeed, page speed, dequeue, minify css, performance
4
  Donate link: https://gabelivan.com/items/wp-asset-cleanup-pro/?utm_source=wp_org_lite&utm_medium=donate
5
  Requires at least: 4.4
6
+ Tested up to: 5.2.3
7
+ Stable tag: 1.3.4.3
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
175
  4. Homepage CSS & JS Management (List sorted by location)
176
 
177
  == Changelog ==
178
+ = 1.3.4.3 =
179
+ * New Assets Management Feature: Until now, the list was loaded automatically on edit post, page, custom post type, and taxonomy. You can choose to fetch the list when clicking on a button. This is good when you rarely manage loaded CSS/JS and want to declutter the edit page on load and also save resources as AJAX calls to the front-end won't be made to retrieve the assets' list.
180
+ * New Feature: Cache Dynamic Loaded CSS & JavaScript to avoid loading the whole WP environment and save resources on each request (e.g. /?custom-css=value_here or /wp-content/plugins/plugin-name-here/js/generate-script-output.php?ver=1)
181
+ * Reduced the number of database queries to fetch cached information making the pages preload faster (when the caching is rebuilt) thus reducing the loading time especially if PHP 5.6 is still used (which is slower than PHP 7+ when it deals with database connections).
182
+ * Combine JS files improvement: If there are multiple files that have "defer" or "async" attribute set (or both) and they are not preloaded, then they will be grouped into fewer files; Before, only SCRIPT tags without these attributes were combined
183
+ * Improvement to reduce disk space: Make sure already minified (100%) static .js files aren't cached
184
+ * Google Fonts Optimization: Requests that are for icons (e.g. https://fonts.googleapis.com/icon?family=Material+Icons) are also combined to reduce HTTP requests
185
+ * "Optimize CSS Delivery" from WP Rocket works together with "Inline Chosen CSS Files" from Asset CleanUp Pro
186
+ * Prevent plugin from loading when Themify Builder (iFrame) is used
187
+ * Bug Fix: Sometimes, the position of an asset (HEAD or BODY) is reported incorrectly if it was enqueued in specific action hooks; Extra checks are made to fix that as sometimes developers do not use wp_enqueue_scripts() which is the proper hook to use when enqueuing items that are meant to appear on the front end
188
+ * Bug Fix: If CSS files get inlined, make sure @import without "url" is updated correctly in all situations
189
+ * Bug Fix: In rare cases, managing assets for the Homepage is not working properly. Reason: $post is overwritten by external plugins or the theme because the developers have forgotten to use wp_reset_postdata() and reset it to its initial value (which should be 0 in this case).
190
+
191
  = 1.3.4.2 =
192
  * New Feature: Remove Google Font Requests (including link/font preloads, @import/@font-face from CSS files & STYLE tags, resource hints)
193
  * Minify/Combine CSS Improvement: Any @import found including a local CSS in another CSS file is fetched (and minified/optimized if necessary) and added to the parent file (this reduces HTTP requests, saving additional round-trip times to the overall page load) - Read more: https://gtmetrix.com/avoid-css-import.html
templates/_admin-page-getting-started-areas/_benefits-fast-pages.php CHANGED
@@ -6,21 +6,21 @@ if (! isset($data)) {
6
  exit;
7
  }
8
  ?>
9
- <p class="area-title"><?php _e('Higher search ranking', 'wp-asset-clean-up'); ?> <span style="font-size: 22px;">📈</span></p>
10
  <p><?php _e('Since 2010, there has been a signal in Google search ranking algorithms: site speed, which reflects how quickly a website responds to web requests.', 'wp-asset-clean-up'); ?></p>
11
  <p><?php _e('Speeding up websites is important — not just to site owners, but to all Internet users.', 'wp-asset-clean-up'); ?> <?php _e('Faster sites create happy users and Google has seen in their internal studies that when a site responds slowly, visitors spend less time there.', 'wp-asset-clean-up'); ?> <?php _e('But faster sites don\'t just improve user experience', 'wp-asset-clean-up'); ?>; <?php _e('recent data shows that improving site speed also reduces operating costs.', 'wp-asset-clean-up'); ?> <?php _e('Like Google, their users place a lot of value in speed — that\'s why they\'ve decided to take site speed into account in their search rankings. They use a variety of sources to determine the speed of a site relative to other sites.', 'wp-asset-clean-up'); ?>
12
  <p><span class="dashicons dashicons-video-alt3"></span> <a href="https://www.youtube.com/watch?v=SO4YuDAkplU" target="_blank"><?php _e('How does Google determine page speed?', 'wp-asset-clean-up'); ?></a></p>
13
  <hr />
14
 
15
- <p class="area-title"><?php _e('Visitor Experience', 'wp-asset-clean-up'); ?> <span style="font-size: 24px;">😊</span></p>
16
  <p><?php _e('For a customer (it\'s likely happened to you too) that wants to purchase something online, it\'s very frustrating to land on slow loading website.', 'wp-asset-clean-up'); ?> <?php _e('A blazing fast website, will keep your visitors happy, engaged, which will directly influence conversions.', 'wp-asset-clean-up'); ?> <?php _e('If a visitor doesn\'t get what he wants in a time he/she thinks it\'s reasonable, they will probably head to another website belonging to a competitor.', 'wp-asset-clean-up'); ?> <?php _e('As today\'s users expect a fast and streamlined web experience, you\'re losing business if you neglect this often overlooked aspect.', 'wp-asset-clean-up'); ?></p>
17
  <hr />
18
 
19
- <p class="area-title"><?php _e('Better Developer Experience', 'wp-asset-clean-up'); ?> <span style="font-size: 24px;">⚙️</span></p>
20
  <p><?php _e('As developers, we often go through the HTML source code of the website, access the server (e.g. Apache, NGINX) logs that has the HTTP requests, and have to sometimes solve code conflict problems (e.g. between plugins) due to poorly written code.', 'wp-asset-clean-up'); ?> <?php _e('By preventing unnecessary files to load, having less HTTP requests, and cleaner HTML code, you will be able to easily go through the code (which is smaller).', 'wp-asset-clean-up'); ?> <?php _e('Your log files will take less space on the server, will be easier to backup and analyse, and by having less JavaScript files loading, you will be reduce the changes of getting less JS errors that could interfere with the functionality of your website.', 'wp-asset-clean-up'); ?></p>
21
  <hr />
22
 
23
- <p class="area-title"><?php _e('Higher Revenue', 'wp-asset-clean-up'); ?> <span style="font-size: 24px;">💯</span></p>
24
  <p><?php _e('Just about any major retailer is taking site speed as a very important factor for increasing conversions.', 'wp-asset-clean-up'); ?> <?php _e('According to Strangeloop, 57% of online customers will leave a website after waiting 3 seconds for the page to load. Moreover, 80% of those people will not return to that page. Some of them will tell others about their negative experience. This has a direct impact on the conversion rate, revenue and brand image.', 'wp-asset-clean-up'); ?></p>
25
 
26
  <p style="margin-bottom: 0;"><em>"<?php echo sprintf(__('%s of users say they\'ve felt STRESS OR ANGER while using a slow website.', 'wp-asset-clean-up'), '78%'); ?>"</em></p>
6
  exit;
7
  }
8
  ?>
9
+ <p class="area-title"><?php _e('Higher search ranking', 'wp-asset-clean-up'); ?> <span style="font-size: 22px;"><img draggable="false" class="wpacu-emoji" alt="📈" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/1f4c8.svg" /></span></p>
10
  <p><?php _e('Since 2010, there has been a signal in Google search ranking algorithms: site speed, which reflects how quickly a website responds to web requests.', 'wp-asset-clean-up'); ?></p>
11
  <p><?php _e('Speeding up websites is important — not just to site owners, but to all Internet users.', 'wp-asset-clean-up'); ?> <?php _e('Faster sites create happy users and Google has seen in their internal studies that when a site responds slowly, visitors spend less time there.', 'wp-asset-clean-up'); ?> <?php _e('But faster sites don\'t just improve user experience', 'wp-asset-clean-up'); ?>; <?php _e('recent data shows that improving site speed also reduces operating costs.', 'wp-asset-clean-up'); ?> <?php _e('Like Google, their users place a lot of value in speed — that\'s why they\'ve decided to take site speed into account in their search rankings. They use a variety of sources to determine the speed of a site relative to other sites.', 'wp-asset-clean-up'); ?>
12
  <p><span class="dashicons dashicons-video-alt3"></span> <a href="https://www.youtube.com/watch?v=SO4YuDAkplU" target="_blank"><?php _e('How does Google determine page speed?', 'wp-asset-clean-up'); ?></a></p>
13
  <hr />
14
 
15
+ <p class="area-title"><?php _e('Visitor Experience', 'wp-asset-clean-up'); ?> <span style="font-size: 24px;"><img draggable="false" class="wpacu-emoji" alt="😊" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/1f60a.svg" /></span></p>
16
  <p><?php _e('For a customer (it\'s likely happened to you too) that wants to purchase something online, it\'s very frustrating to land on slow loading website.', 'wp-asset-clean-up'); ?> <?php _e('A blazing fast website, will keep your visitors happy, engaged, which will directly influence conversions.', 'wp-asset-clean-up'); ?> <?php _e('If a visitor doesn\'t get what he wants in a time he/she thinks it\'s reasonable, they will probably head to another website belonging to a competitor.', 'wp-asset-clean-up'); ?> <?php _e('As today\'s users expect a fast and streamlined web experience, you\'re losing business if you neglect this often overlooked aspect.', 'wp-asset-clean-up'); ?></p>
17
  <hr />
18
 
19
+ <p class="area-title"><?php _e('Better Developer Experience', 'wp-asset-clean-up'); ?> <span style="font-size: 24px;"><img draggable="false" class="wpacu-emoji" alt="⚙" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/2699.svg" /></span></p>
20
  <p><?php _e('As developers, we often go through the HTML source code of the website, access the server (e.g. Apache, NGINX) logs that has the HTTP requests, and have to sometimes solve code conflict problems (e.g. between plugins) due to poorly written code.', 'wp-asset-clean-up'); ?> <?php _e('By preventing unnecessary files to load, having less HTTP requests, and cleaner HTML code, you will be able to easily go through the code (which is smaller).', 'wp-asset-clean-up'); ?> <?php _e('Your log files will take less space on the server, will be easier to backup and analyse, and by having less JavaScript files loading, you will be reduce the changes of getting less JS errors that could interfere with the functionality of your website.', 'wp-asset-clean-up'); ?></p>
21
  <hr />
22
 
23
+ <p class="area-title"><?php _e('Higher Revenue', 'wp-asset-clean-up'); ?> <span style="font-size: 24px;"><img draggable="false" class="wpacu-emoji" alt="💯" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/1f4af.svg" /></span></p>
24
  <p><?php _e('Just about any major retailer is taking site speed as a very important factor for increasing conversions.', 'wp-asset-clean-up'); ?> <?php _e('According to Strangeloop, 57% of online customers will leave a website after waiting 3 seconds for the page to load. Moreover, 80% of those people will not return to that page. Some of them will tell others about their negative experience. This has a direct impact on the conversion rate, revenue and brand image.', 'wp-asset-clean-up'); ?></p>
25
 
26
  <p style="margin-bottom: 0;"><em>"<?php echo sprintf(__('%s of users say they\'ve felt STRESS OR ANGER while using a slow website.', 'wp-asset-clean-up'), '78%'); ?>"</em></p>
templates/_admin-page-getting-started-areas/_how-it-works.php CHANGED
@@ -9,7 +9,7 @@ if (! isset($data)) {
9
  <p><?php _e('Often, our WordPress websites are loaded with elements that are not needed to load on specific pages or even everywhere.', 'wp-asset-clean-up'); ?> <?php _e('These assets (CSS &amp; JavaScript files) as well as inline code are adding up to the total size of the page, thus taking more time for the page to load.', 'wp-asset-clean-up'); ?></p>
10
  <p><?php _e('This could end up in a slow website that leads to page abandonment, poor ranking in Google search and sometimes conflict JavaScript errors where too many scripts are loading and one of them (or more) have poorly written code that is not autonomous and badly interacts with other code.', 'wp-asset-clean-up'); ?></p>
11
  <hr />
12
- <p class="area-title"><?php _e('What Asset CleanUp really does?', 'wp-asset-clean-up'); ?> <span style="font-size: 24px;">🚀</span></p>
13
  <p>Asset CleanUp is a <strong>front-end optimisation performance plugin</strong> and let's you select the assets that are not needed to load on your website and combine the remaining loaded ones into fewer files, which will in the end reduce considerably the number of HTTP requests and optimize the front-end side of your pages. <a target="_blank" href="https://developer.yahoo.com/performance/rules.html"><?php _e('Read more', 'wp-asset-clean-up'); ?></a></p>
14
  <p>Once the setup is completed, the pages will have a better speed score since there will be less HTTP requests (.css &amp; .js files) loaded by the browser (this can be tested using tools such as GTMetrix) and combined with a backend page caching system it will improve the page speed even more.
15
  <p><?php _e('Page caching solutions include', 'wp-asset-clean-up'); ?>:</p>
@@ -26,8 +26,8 @@ if (! isset($data)) {
26
 
27
  <p style="line-height: normal;"><small><strong><?php _e('Disclaimer', 'wp-asset-clean-up'); ?>:</strong> <?php _e('The recommendations above are based from my own experience as a developer &amp; user and I\'m happy to recommend them to whoever wants superior WordPress performance.', 'wp-asset-clean-up'); ?> <?php _e('The links are affiliate related and I might get a commission if you decide to make a purchase.', 'wp-asset-clean-up'); ?></small></p>
28
  <hr />
29
- <p class="area-title">Example (Stripping ~66% of "crap") <span style="font-size: 24px;">✨</span></p>
30
  <p>Let's suppose you have a page where 30 files (CSS &amp; JS) are loaded. All have a total size of 1.5 MB. Using Asset CleanUp, you can reduce the number to 12 files by unloading the other 18 files which are useless on the page. You've reduced the total size to 0.7 MB, this resulting in less time in downloading the assets, thus the page will load faster. If you also combine and minify the remaining 12 files, the total assets size becomes smaller to 0.5 MB. In the end, <strong>the assets will load 3 times faster and improve your page speed score</strong>. Moreover, the HTML source code will be cleaner and easier to go through in case you're a developer and need to do any debugging or just check something in the code.</p>
31
  <hr />
32
- <p class="area-title"><?php _e('Not sure how to configure it?', 'wp-asset-clean-up'); ?> <span style="font-size: 24px;">🤔</span></p>
33
  <p><?php _e('No problem!', 'wp-asset-clean-up'); ?> <?php _e('You can enable "Test Mode" and any changes you make, will only be visible for you (the logged-in administrator), while the regular visitors will see the pages as if the plugin is not active.', 'wp-asset-clean-up'); ?> <?php _e('Once all is good, you can disable "Test Mode" (thus applying the settings to everyone), clear the page caching (if using a plugin or a server-side solution such as Varnish) and check out the page speed score.', 'wp-asset-clean-up'); ?> <a target="_blank" href="https://assetcleanup.com/docs/?p=84"><?php _e('Read more', 'wp-asset-clean-up'); ?></a></p>
9
  <p><?php _e('Often, our WordPress websites are loaded with elements that are not needed to load on specific pages or even everywhere.', 'wp-asset-clean-up'); ?> <?php _e('These assets (CSS &amp; JavaScript files) as well as inline code are adding up to the total size of the page, thus taking more time for the page to load.', 'wp-asset-clean-up'); ?></p>
10
  <p><?php _e('This could end up in a slow website that leads to page abandonment, poor ranking in Google search and sometimes conflict JavaScript errors where too many scripts are loading and one of them (or more) have poorly written code that is not autonomous and badly interacts with other code.', 'wp-asset-clean-up'); ?></p>
11
  <hr />
12
+ <p class="area-title"><?php _e('What Asset CleanUp really does?', 'wp-asset-clean-up'); ?> <span style="font-size: 24px;"><img draggable="false" class="wpacu-emoji" alt="🚀" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/1f680.svg" /></span></p>
13
  <p>Asset CleanUp is a <strong>front-end optimisation performance plugin</strong> and let's you select the assets that are not needed to load on your website and combine the remaining loaded ones into fewer files, which will in the end reduce considerably the number of HTTP requests and optimize the front-end side of your pages. <a target="_blank" href="https://developer.yahoo.com/performance/rules.html"><?php _e('Read more', 'wp-asset-clean-up'); ?></a></p>
14
  <p>Once the setup is completed, the pages will have a better speed score since there will be less HTTP requests (.css &amp; .js files) loaded by the browser (this can be tested using tools such as GTMetrix) and combined with a backend page caching system it will improve the page speed even more.
15
  <p><?php _e('Page caching solutions include', 'wp-asset-clean-up'); ?>:</p>
26
 
27
  <p style="line-height: normal;"><small><strong><?php _e('Disclaimer', 'wp-asset-clean-up'); ?>:</strong> <?php _e('The recommendations above are based from my own experience as a developer &amp; user and I\'m happy to recommend them to whoever wants superior WordPress performance.', 'wp-asset-clean-up'); ?> <?php _e('The links are affiliate related and I might get a commission if you decide to make a purchase.', 'wp-asset-clean-up'); ?></small></p>
28
  <hr />
29
+ <p class="area-title">Example (Stripping ~66% of "crap") <span style="font-size: 24px;"><img draggable="false" class="wpacu-emoji" alt="✨" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/2728.svg" /></span></p>
30
  <p>Let's suppose you have a page where 30 files (CSS &amp; JS) are loaded. All have a total size of 1.5 MB. Using Asset CleanUp, you can reduce the number to 12 files by unloading the other 18 files which are useless on the page. You've reduced the total size to 0.7 MB, this resulting in less time in downloading the assets, thus the page will load faster. If you also combine and minify the remaining 12 files, the total assets size becomes smaller to 0.5 MB. In the end, <strong>the assets will load 3 times faster and improve your page speed score</strong>. Moreover, the HTML source code will be cleaner and easier to go through in case you're a developer and need to do any debugging or just check something in the code.</p>
31
  <hr />
32
+ <p class="area-title"><?php _e('Not sure how to configure it?', 'wp-asset-clean-up'); ?> <span style="font-size: 24px;"><img draggable="false" class="wpacu-emoji" alt="🤔" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/1f914.svg" /></span></p>
33
  <p><?php _e('No problem!', 'wp-asset-clean-up'); ?> <?php _e('You can enable "Test Mode" and any changes you make, will only be visible for you (the logged-in administrator), while the regular visitors will see the pages as if the plugin is not active.', 'wp-asset-clean-up'); ?> <?php _e('Once all is good, you can disable "Test Mode" (thus applying the settings to everyone), clear the page caching (if using a plugin or a server-side solution such as Varnish) and check out the page speed score.', 'wp-asset-clean-up'); ?> <a target="_blank" href="https://assetcleanup.com/docs/?p=84"><?php _e('Read more', 'wp-asset-clean-up'); ?></a></p>
templates/_admin-page-getting-started-areas/_lite-vs-pro.php CHANGED
@@ -7,8 +7,13 @@ if (! isset($data)) {
7
  }
8
 
9
  $svgTick = <<<HTML
10
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M34.459 1.375c-1.391-.902-3.248-.506-4.149.884L13.5 28.17l-8.198-7.58c-1.217-1.125-3.114-1.051-4.239.166-1.125 1.216-1.051 3.115.166 4.239l10.764 9.952s.309.266.452.359c.504.328 1.07.484 1.63.484.982 0 1.945-.482 2.52-1.368L35.343 5.524c.902-1.39.506-3.248-.884-4.149z"/></svg>
11
  HTML;
 
 
 
 
 
12
  ?>
13
  <div class="wpacu-lite-vs-pro-wrap">
14
  <table>
@@ -78,6 +83,24 @@ HTML;
78
  <td><?php echo $svgTick; ?></td>
79
  </tr>
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  <tr>
82
  <td><?php _e('Manage CSS &amp; JavaScript files on Categories, Tags, Custom Taxonomy pages, Date &amp; Author Archive Pages, Search Results &amp; 404 Not Found pages', 'wp-asset-clean-up'); ?></td>
83
  <td><span class="na">❌</span></td>
@@ -98,6 +121,11 @@ HTML;
98
  <td><span class="na">❌</span></td>
99
  <td><?php echo $svgTick; ?></td>
100
  </tr>
 
 
 
 
 
101
  <tr>
102
  <td><?php _e('Priority Customer Support', 'wp-asset-clean-up'); ?></td>
103
  <td><span class="na">❌</span></td>
7
  }
8
 
9
  $svgTick = <<<HTML
10
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#008000" d="M34.459 1.375c-1.391-.902-3.248-.506-4.149.884L13.5 28.17l-8.198-7.58c-1.217-1.125-3.114-1.051-4.239.166-1.125 1.216-1.051 3.115.166 4.239l10.764 9.952s.309.266.452.359c.504.328 1.07.484 1.63.484.982 0 1.945-.482 2.52-1.368L35.343 5.524c.902-1.39.506-3.248-.884-4.149z"/></svg>
11
  HTML;
12
+
13
+ $svgNa = <<<HTML
14
+ <img draggable="false" class="wpacu-emoji" alt="❌" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/274c.svg">
15
+ HTML;
16
+
17
  ?>
18
  <div class="wpacu-lite-vs-pro-wrap">
19
  <table>
83
  <td><?php echo $svgTick; ?></td>
84
  </tr>
85
 
86
+ <tr>
87
+ <td><?php _e('Inline Chosen CSS Files', 'wp-asset-clean-up'); ?> * <a target="_blank" href="https://gtmetrix.com/inline-small-css.html"><small>Read more</small></a></td>
88
+ <td><?php echo $svgTick; ?></td>
89
+ <td><?php echo $svgTick; ?></td>
90
+ </tr>
91
+
92
+ <tr>
93
+ <td><?php _e('Inline Chosen JavaScript Files', 'wp-asset-clean-up'); ?> * <a target="_blank" href="https://gtmetrix.com/inline-small-javascript.html"><small>Read more</small></a></td>
94
+ <td><span class="na">❌</span></td>
95
+ <td><?php echo $svgTick; ?></td>
96
+ </tr>
97
+
98
+ <tr>
99
+ <td><?php _e('Defer CSS loaded in the <code>&lt;BODY&gt;</code>', 'wp-asset-clean-up'); ?> to reduce render-blocking resources</td>
100
+ <td><span class="na">❌</span></td>
101
+ <td><?php echo $svgTick; ?></td>
102
+ </tr>
103
+
104
  <tr>
105
  <td><?php _e('Manage CSS &amp; JavaScript files on Categories, Tags, Custom Taxonomy pages, Date &amp; Author Archive Pages, Search Results &amp; 404 Not Found pages', 'wp-asset-clean-up'); ?></td>
106
  <td><span class="na">❌</span></td>
121
  <td><span class="na">❌</span></td>
122
  <td><?php echo $svgTick; ?></td>
123
  </tr>
124
+ <tr>
125
+ <td><?php _e('Priority in releasing new features &amp; other improvements (updates that are meant for both Lite and Pro plugins are first released to the Pro users)', 'wp-asset-clean-up'); ?></td>
126
+ <td><span class="na">❌</span></td>
127
+ <td><?php echo $svgTick; ?></td>
128
+ </tr>
129
  <tr>
130
  <td><?php _e('Priority Customer Support', 'wp-asset-clean-up'); ?></td>
131
  <td><span class="na">❌</span></td>
templates/_admin-page-getting-started-areas/_start-optimization.php CHANGED
@@ -6,9 +6,9 @@ if (! isset($data)) {
6
  exit;
7
  }
8
  ?>
9
- <p>For the <em>homepage</em>, you can go to "Asset CleanUp" -&gt; "<a href="<?php echo admin_url('admin.php?page='.WPACU_PLUGIN_ID.'_assets_manager') ?>">Homepage</a>" from the plugin's menu and you will notice the list of all the styles &amp;scripts files that are loading there. For each file, you will see options that you can enabled/disable.</p>
10
- <p>For <em>posts, pages &amp; custom post types</em>, you can edit the page within the Dashboard or via the front-end view (if you enabled the option in "Settings") and go to "Asset CleanUp" area where you can manage all the CSS &amp; JS files loading on that post/page.</p>
11
- <p>To view all the pages where Asset CleanUp can do optimization for, go to "<a href="<?php echo admin_url('admin.php?page='.WPACU_PLUGIN_ID.'_assets_manager&wpacu_for=all_other_pages'); ?>"><?php _e('Pages Info', 'wp-asset-clean-up'); ?></a>".</p>
12
  <hr />
13
 
14
  <p style="font-size: 16px;"><strong>Common Example: "Contact Form 7" plugin</strong></p>
@@ -24,11 +24,10 @@ if (! isset($data)) {
24
  /* &lt;![CDATA[ */
25
  var wpcf7 = {&quot;apiSettings&quot;:{&quot;root&quot;:&quot;https:\/\/www.yourdomain.com\/wp-json\/contact-form-7\/v1&quot;,&quot;namespace&quot;:&quot;contact-form-7\/v1&quot;},&quot;cached&quot;:&quot;1&quot;};
26
  /* ]]&gt; */
27
- &lt;/script&gt;
28
- </code></pre>
29
 
30
  <p style="margin-top: 0;">These extra files loading, as well as the HTML code used to call them, not to mention the inline code associated with the JS file, add up to the total size of the page: the number of HTTP requests and the HTML source code size (this is a minor thing, but when dealing with tens of files, it adds up).</p>
31
 
32
  <p>Just like "Contact Form 7", there are plenty of other files that are loading from plugins and the active theme which shouldn't be loaded in many pages. Think about pages that have mostly text such as "Terms and Conditions", "Privacy Policy" or the "404 (Not Found)" page. These ones can be stripped by a lot of "crap" which will boost the speed score and offer a better visitor experience.</p>
33
 
34
- <p>Once you unload the right (the ones you know are not useful) files and test everything (via "Test Mode" to make sure your visitors will not be affected in case you break any page functionality), you can clear the cache if you're using a caching plugin and test your page speed score in GTMetrix or other similar tool that measures the page load. You will see an improvement. <span style="vertical-align: bottom; font-size: 20px; line-height: 20px;">😀️</span></p>
6
  exit;
7
  }
8
  ?>
9
+ <p>For the <em>homepage</em>, you can go to "CSS/JS Load Manager" -&gt; "<a href="<?php echo admin_url('admin.php?page='.WPACU_PLUGIN_ID.'_assets_manager') ?>">Homepage</a>" from the plugin's menu and you will notice the list of all the styles &amp;scripts files that are loading there. For each file, you will see options that you can enabled/disable.</p>
10
+ <p>For <em>posts, pages &amp; custom post types</em>, you can edit the page within the Dashboard or via the front-end view (if you enabled the option in "Settings") and scroll to "Asset CleanUp: CSS & JavaScript Manager" metabox area (if not hidden from "Settings" -&gt; "Plugin Usage Preferences") where you can manage all the CSS &amp; JS files loading on that post/page.</p>
11
+ <p>To view all the WordPress pages where <?php echo WPACU_PLUGIN_TITLE; ?> can do optimization for, go to "<a href="<?php echo admin_url('admin.php?page='.WPACU_PLUGIN_ID.'_assets_manager&wpacu_for=homepage'); ?>"><?php _e('CSS/JS Load Manager', 'wp-asset-clean-up'); ?></a>".</p>
12
  <hr />
13
 
14
  <p style="font-size: 16px;"><strong>Common Example: "Contact Form 7" plugin</strong></p>
24
  /* &lt;![CDATA[ */
25
  var wpcf7 = {&quot;apiSettings&quot;:{&quot;root&quot;:&quot;https:\/\/www.yourdomain.com\/wp-json\/contact-form-7\/v1&quot;,&quot;namespace&quot;:&quot;contact-form-7\/v1&quot;},&quot;cached&quot;:&quot;1&quot;};
26
  /* ]]&gt; */
27
+ &lt;/script&gt;</code></pre>
 
28
 
29
  <p style="margin-top: 0;">These extra files loading, as well as the HTML code used to call them, not to mention the inline code associated with the JS file, add up to the total size of the page: the number of HTTP requests and the HTML source code size (this is a minor thing, but when dealing with tens of files, it adds up).</p>
30
 
31
  <p>Just like "Contact Form 7", there are plenty of other files that are loading from plugins and the active theme which shouldn't be loaded in many pages. Think about pages that have mostly text such as "Terms and Conditions", "Privacy Policy" or the "404 (Not Found)" page. These ones can be stripped by a lot of "crap" which will boost the speed score and offer a better visitor experience.</p>
32
 
33
+ <p>Once you unload the right (the ones you know are not useful) files and test everything (via "Test Mode" to make sure your visitors will not be affected in case you break any page functionality), you can clear the cache if you're using a caching plugin and test your page speed score in GTMetrix or other similar tool that measures the page load. You will see an improvement. <span style="vertical-align: bottom; font-size: 20px; line-height: 20px;"><img draggable="false" class="wpacu-emoji" alt="😀" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/1f600.svg" /></span></p>
templates/_admin-page-settings-plugin-areas/_optimize-css.php CHANGED
@@ -10,6 +10,8 @@ if (! isset($data)) {
10
  exit;
11
  }
12
 
 
 
13
  $tabIdArea = 'wpacu-setting-optimize-css';
14
  $styleTabContent = ($selectedTabArea === $tabIdArea) ? 'style="display: table-cell;"' : '';
15
 
@@ -27,11 +29,11 @@ $availableForPro = '<a class="go-pro-link-no-style" target="_blank" href="' . WP
27
  ?>
28
  <div class="wpacu-warning" style="font-size: 13px; margin-bottom: 18px;">
29
  <span class="dashicons dashicons-warning"></span> <strong>Incompatibility Notice:</strong>
30
- <?php if ($wpRocketIssues['minify_html']) { ?>
31
  <p style="margin-bottom: 0;">At this time, "<strong>Combine loaded CSS (Stylesheets) into fewer files</strong>" &amp; "<strong>Defer CSS Loaded in the &lt;BODY&gt; (Footer)</strong>" options do not take any effect as "<em>Minify HTML</em>" is active in "WP Rocket" -&gt; "File Optimization" Settings. If you wish to keep WP Rocket's Minify HTML on, consider optimizing CSS with WP Rocket while cleaning the useless CSS with <?php echo WPACU_PLUGIN_TITLE; ?>.</p>
32
- <?php } ?>
33
  <?php if ($wpRocketIssues['optimize_css_delivery']) { ?>
34
- <p style="margin-bottom: 0;"><?php echo WPACU_PLUGIN_TITLE; ?>'s "<strong>Combine loaded CSS (Stylesheets) into fewer files</strong>", "<strong>Inline Chosen CSS Files</strong>" &amp; "<strong>Defer CSS Loaded in the &lt;BODY&gt; (Footer)</strong>" options do not take any effect as "<em>Optimize CSS Delivery</em>" is active in "WP Rocket" -&gt; "File Optimization" Settings. The feature is changing the way CSS is delivered by adding critical CSS to the HEAD section of the website as well as preloading the rest of the CSS files before applying their syntax on page loading. This doesn't affect the performance of your website as you can eliminate the bloat with <?php echo WPACU_PLUGIN_TITLE; ?> and use WP Rocket for CSS Optimization/Delivery if that's what works best for your website.</p>
35
  <?php } ?>
36
  </div>
37
  <?php
@@ -124,7 +126,7 @@ $availableForPro = '<a class="go-pro-link-no-style" target="_blank" href="' . WP
124
  data-target-opacity="wpacu_combine_loaded_css_info_area"
125
  type="checkbox"
126
  <?php
127
- echo (in_array($data['combine_loaded_css'], array('for_admin', 'for_all', 1)) ? 'checked="checked"' : '');
128
  ?>
129
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[combine_loaded_css]"
130
  value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
@@ -206,32 +208,19 @@ $availableForPro = '<a class="go-pro-link-no-style" target="_blank" href="' . WP
206
  <p class="wpacu_subtitle"><small><em><?php _e('This will work for local (same domain) files. External requests tags will not be altered (e.g. stackpath.bootstrapcdn.com, ajax.googleapis.com etc.).', 'wp-asset-clean-up'); ?></em></small></p>
207
  </th>
208
  <td>
209
- <label class="wpacu_switch <?php if (! empty($data['is_optimize_css_enabled_by_other_party'])) { echo 'wpacu_disabled'; } ?>">
210
  <input id="wpacu_inline_css_files_enable"
211
  data-target-opacity="wpacu_inline_css_files_info_area"
212
  type="checkbox"
213
- <?php
214
- echo (($data['inline_css_files'] == 1) ? 'checked="checked"' : '');
215
- ?>
216
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[inline_css_files]"
217
  value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
218
 
219
  &nbsp;<?php _e('This is usually good for small stylesheet files to save the overhead of fetching them and thus reduce the number of HTTP requests', 'wp-asset-clean-up'); ?>.
220
 
221
- <?php
222
- if (! empty($data['is_optimize_css_enabled_by_other_party'])) {
223
- ?>
224
- <div style="border-left: 4px solid green; background: #f2faf2; padding: 10px; margin-top: 10px;">
225
- <ul style="margin: 0;">
226
- <li>This option is locked as optimize/minify stylesheets (CSS) is already enabled in the following plugins: <strong><?php echo implode(', ', $data['is_optimize_css_enabled_by_other_party']); ?></strong></li>
227
- <li><?php echo WPACU_PLUGIN_TITLE; ?> works together with the mentioned plugin(s). Eliminate the bloat first via <a href="<?php echo admin_url('admin.php?page=wpassetcleanup_assets_manager'); ?>">CSS & JAVASCRIPT LOAD MANAGER</a>, then inline (if necessary) the remaining CSS with any plugin you prefer.</li>
228
- </ul>
229
- </div>
230
- <?php
231
- }
232
- ?>
233
-
234
- <div id="wpacu_inline_css_files_info_area" <?php if (empty($data['is_optimize_css_enabled_by_other_party']) && $data['inline_css_files'] == 1) { ?> style="opacity: 1;" <?php } else { ?>style="opacity: 0.4;"<?php } ?>>
235
  <div id="wpacu_inline_css_files_list_area">
236
  <div style="margin: 12px 0 6px;"><?php _e('For this feature to work, you need to place the relative path(s) or part of them to the files you wish to inline below:', 'wp-asset-clean-up'); ?> (<strong><?php _e('one per line', 'wp-asset-clean-up'); ?></strong>):</div>
237
  <label for="wpacu_inline_css_files_list">
@@ -272,6 +261,34 @@ $availableForPro = '<a class="go-pro-link-no-style" target="_blank" href="' . WP
272
  </td>
273
  </tr>
274
  <!-- [/wpacu_lite] -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  </table>
276
  </div>
277
 
10
  exit;
11
  }
12
 
13
+ global $wp_version;
14
+
15
  $tabIdArea = 'wpacu-setting-optimize-css';
16
  $styleTabContent = ($selectedTabArea === $tabIdArea) ? 'style="display: table-cell;"' : '';
17
 
29
  ?>
30
  <div class="wpacu-warning" style="font-size: 13px; margin-bottom: 18px;">
31
  <span class="dashicons dashicons-warning"></span> <strong>Incompatibility Notice:</strong>
32
+ <?php if ($wpRocketIssues['minify_html']) { ?>
33
  <p style="margin-bottom: 0;">At this time, "<strong>Combine loaded CSS (Stylesheets) into fewer files</strong>" &amp; "<strong>Defer CSS Loaded in the &lt;BODY&gt; (Footer)</strong>" options do not take any effect as "<em>Minify HTML</em>" is active in "WP Rocket" -&gt; "File Optimization" Settings. If you wish to keep WP Rocket's Minify HTML on, consider optimizing CSS with WP Rocket while cleaning the useless CSS with <?php echo WPACU_PLUGIN_TITLE; ?>.</p>
34
+ <?php } ?>
35
  <?php if ($wpRocketIssues['optimize_css_delivery']) { ?>
36
+ <p style="margin-bottom: 0;"><?php echo WPACU_PLUGIN_TITLE; ?>'s "<strong>Combine loaded CSS (Stylesheets) into fewer files</strong>" &amp; "<strong>Defer CSS Loaded in the &lt;BODY&gt; (Footer)</strong>" options do not take any effect as "<em>Optimize CSS Delivery</em>" is active in "WP Rocket" -&gt; "File Optimization" Settings. The feature is changing the way CSS is delivered by adding critical CSS to the HEAD section of the website as well as preloading the rest of the CSS files before applying their syntax on page loading. This doesn't affect the performance of your website as you can eliminate the bloat with <?php echo WPACU_PLUGIN_TITLE; ?> and use WP Rocket for CSS Optimization/Delivery if that's what works best for your website.</p>
37
  <?php } ?>
38
  </div>
39
  <?php
126
  data-target-opacity="wpacu_combine_loaded_css_info_area"
127
  type="checkbox"
128
  <?php
129
+ echo (in_array($data['combine_loaded_css'], array('for_admin', 'for_all', 1)) ? 'checked="checked"' : '');
130
  ?>
131
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[combine_loaded_css]"
132
  value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
208
  <p class="wpacu_subtitle"><small><em><?php _e('This will work for local (same domain) files. External requests tags will not be altered (e.g. stackpath.bootstrapcdn.com, ajax.googleapis.com etc.).', 'wp-asset-clean-up'); ?></em></small></p>
209
  </th>
210
  <td>
211
+ <label class="wpacu_switch">
212
  <input id="wpacu_inline_css_files_enable"
213
  data-target-opacity="wpacu_inline_css_files_info_area"
214
  type="checkbox"
215
+ <?php
216
+ echo (($data['inline_css_files'] == 1) ? 'checked="checked"' : '');
217
+ ?>
218
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[inline_css_files]"
219
  value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
220
 
221
  &nbsp;<?php _e('This is usually good for small stylesheet files to save the overhead of fetching them and thus reduce the number of HTTP requests', 'wp-asset-clean-up'); ?>.
222
 
223
+ <div id="wpacu_inline_css_files_info_area">
 
 
 
 
 
 
 
 
 
 
 
 
 
224
  <div id="wpacu_inline_css_files_list_area">
225
  <div style="margin: 12px 0 6px;"><?php _e('For this feature to work, you need to place the relative path(s) or part of them to the files you wish to inline below:', 'wp-asset-clean-up'); ?> (<strong><?php _e('one per line', 'wp-asset-clean-up'); ?></strong>):</div>
226
  <label for="wpacu_inline_css_files_list">
261
  </td>
262
  </tr>
263
  <!-- [/wpacu_lite] -->
264
+
265
+ <tr valign="top">
266
+ <th scope="row" class="setting_title">
267
+ <label for="wpacu_cache_dynamic_loaded_css_enable"><?php _e('Cache Dynamic Loaded CSS', 'wp-asset-clean-up'); ?></label>
268
+ <p class="wpacu_subtitle"><small><em><?php _e('This option is enabled by default on new installs or after a settings reset', 'wp-asset-clean-up'); ?>.</em></small></p>
269
+ </th>
270
+ <td>
271
+ <label class="wpacu_switch">
272
+ <input id="wpacu_cache_dynamic_loaded_css_enable"
273
+ data-target-opacity="wpacu_cache_dynamic_loaded_css_info_area"
274
+ type="checkbox"
275
+ <?php
276
+ echo (($data['cache_dynamic_loaded_css'] == 1) ? 'checked="checked"' : '');
277
+ ?>
278
+ name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[cache_dynamic_loaded_css]"
279
+ value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
280
+
281
+ &nbsp;<?php _e('Avoid loading the whole WP environment whenever a dynamic request is made such as <code>/?custom-css=value_here</code>, or <code>/wp-content/plugins/plugin-name-here/css/generate-style.php?ver=1</code>', 'wp-asset-clean-up'); ?>.
282
+ <hr />
283
+ <p>e.g. <code>&lt;link type="text/css" href="//yourwebsite.com/wp-content/plugins/plugin-name-here/css/generate-style.php?ver=<?php echo $wp_version; ?>" /&gt;</code></p>
284
+ <?php
285
+ $cacheDynamicLoadedCssAreaStyle = ($data['cache_dynamic_loaded_css'] == 1) ? 'opacity: 1;' : 'opacity: 0.4;';
286
+ ?>
287
+ <div id="wpacu_cache_dynamic_loaded_css_info_area" style="<?php echo $cacheDynamicLoadedCssAreaStyle; ?>">
288
+ <p>Some plugins and themes have options to create your own CSS/layout and save it within the Dashboard. Instead of creating static CSS files from the saved settings, the changes you made are retrieved from the database and the CSS content is created "on the fly", thus using more resources by loading the whole WP environment and make MySQL (or whatever database type if used) requests in order to print the CSS content. <?php echo WPACU_PLUGIN_TITLE; ?> detects such requests and caches the output for faster retrieval. This very important especially if your website has lots of visits (imagine WordPress loading several times only from one visitor) and you're on a shared environment with limited resources. This will also make the user experience better by decreasing the page rendering time.</p>
289
+ </div>
290
+ </td>
291
+ </tr>
292
  </table>
293
  </div>
294
 
templates/_admin-page-settings-plugin-areas/_optimize-js.php CHANGED
@@ -9,6 +9,8 @@ if (! isset($data)) {
9
  exit;
10
  }
11
 
 
 
12
  $tabIdArea = 'wpacu-setting-optimize-js';
13
  $styleTabContent = ($selectedTabArea === $tabIdArea) ? 'style="display: table-cell;"' : '';
14
 
@@ -42,9 +44,9 @@ $availableForProInlineJs = '<a class="go-pro-link-no-style" target="_blank
42
  <input id="wpacu_minify_js_enable"
43
  data-target-opacity="wpacu_minify_js_area"
44
  type="checkbox"
45
- <?php
46
- echo (($data['minify_loaded_js'] == 1) ? 'checked="checked"' : '');
47
- ?>
48
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[minify_loaded_js]"
49
  value="1" /> <span class="wpacu_slider wpacu_round"></span></label>
50
  &nbsp;&nbsp;<?php _e('This will take the remaining enqueued JavaScript files, minify them and load them from the cache.', 'wp-asset-clean-up'); ?>
@@ -133,11 +135,6 @@ $availableForProInlineJs = '<a class="go-pro-link-no-style" target="_blank
133
  || $data['combine_loaded_js'] === 'for_admin')
134
  ? 'checked="checked"' : ''); ?>
135
  type="checkbox"
136
- <?php
137
- if (! empty($data['is_optimize_js_enabled_by_other_party'])) {
138
- echo 'disabled="disabled"';
139
- }
140
- ?>
141
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[combine_loaded_js_for_admin_only]"
142
  value="1" />
143
  <?php _e('Apply combination only for logged-in administrator', 'wp-asset-clean-up'); ?> (<?php _e('for debugging purposes', 'wp-asset-clean-up'); ?>)
@@ -230,9 +227,9 @@ $availableForProInlineJs = '<a class="go-pro-link-no-style" target="_blank
230
  <input id="wpacu_inline_js_files_enable"
231
  data-target-opacity="wpacu_inline_js_files_info_area"
232
  type="checkbox"
233
- <?php
234
- echo (($data['inline_js_files'] == 1) ? 'checked="checked"' : '');
235
- ?>
236
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[inline_js_files]"
237
  value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
238
 
@@ -268,6 +265,34 @@ $availableForProInlineJs = '<a class="go-pro-link-no-style" target="_blank
268
  </div>
269
  </td>
270
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  </table>
272
  </div>
273
 
9
  exit;
10
  }
11
 
12
+ global $wp_version;
13
+
14
  $tabIdArea = 'wpacu-setting-optimize-js';
15
  $styleTabContent = ($selectedTabArea === $tabIdArea) ? 'style="display: table-cell;"' : '';
16
 
44
  <input id="wpacu_minify_js_enable"
45
  data-target-opacity="wpacu_minify_js_area"
46
  type="checkbox"
47
+ <?php
48
+ echo (($data['minify_loaded_js'] == 1) ? 'checked="checked"' : '');
49
+ ?>
50
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[minify_loaded_js]"
51
  value="1" /> <span class="wpacu_slider wpacu_round"></span></label>
52
  &nbsp;&nbsp;<?php _e('This will take the remaining enqueued JavaScript files, minify them and load them from the cache.', 'wp-asset-clean-up'); ?>
135
  || $data['combine_loaded_js'] === 'for_admin')
136
  ? 'checked="checked"' : ''); ?>
137
  type="checkbox"
 
 
 
 
 
138
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[combine_loaded_js_for_admin_only]"
139
  value="1" />
140
  <?php _e('Apply combination only for logged-in administrator', 'wp-asset-clean-up'); ?> (<?php _e('for debugging purposes', 'wp-asset-clean-up'); ?>)
227
  <input id="wpacu_inline_js_files_enable"
228
  data-target-opacity="wpacu_inline_js_files_info_area"
229
  type="checkbox"
230
+ <?php
231
+ echo (($data['inline_js_files'] == 1) ? 'checked="checked"' : '');
232
+ ?>
233
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[inline_js_files]"
234
  value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
235
 
265
  </div>
266
  </td>
267
  </tr>
268
+
269
+ <tr valign="top">
270
+ <th scope="row" class="setting_title">
271
+ <label for="wpacu_cache_dynamic_loaded_js_enable"><?php _e('Cache Dynamic Loaded JavaScript', 'wp-asset-clean-up'); ?></label>
272
+ <p class="wpacu_subtitle"><small><em><?php _e('This option is enabled by default on new installs or after a settings reset', 'wp-asset-clean-up'); ?>.</em></small></p>
273
+ </th>
274
+ <td>
275
+ <label class="wpacu_switch">
276
+ <input id="wpacu_cache_dynamic_loaded_js_enable"
277
+ data-target-opacity="wpacu_cache_dynamic_loaded_js_info_area"
278
+ type="checkbox"
279
+ <?php
280
+ echo (($data['cache_dynamic_loaded_js'] == 1) ? 'checked="checked"' : '');
281
+ ?>
282
+ name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[cache_dynamic_loaded_js]"
283
+ value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
284
+
285
+ &nbsp;<?php _e('Avoid loading the whole WP environment whenever a dynamic request is made such as <code>/?custom-javascript=value_here</code>, or <code>/wp-content/plugins/plugin-name-here/js/generate-script-output.php?ver=1</code>', 'wp-asset-clean-up'); ?>
286
+ <p>e.g. <code>&lt;script type="text/javascript" src="//yourwebsite.com/wp-content/plugins/plugin-name-here/js/generate-script-output.php?ver=<?php echo $wp_version; ?>"&gt;&lt;/script&gt;</code></p>
287
+ <hr />
288
+ <?php
289
+ $cacheDynamicLoadedJsAreaStyle = ($data['cache_dynamic_loaded_js'] == 1) ? 'opacity: 1;' : 'opacity: 0.4;';
290
+ ?>
291
+ <div id="wpacu_cache_dynamic_loaded_js_info_area" style="<?php echo $cacheDynamicLoadedJsAreaStyle; ?>">
292
+ <p>Some plugins and themes have options to create your own layout / customise specific functionality settings and save the changes from the Dashboard. Instead of creating static JS files from the saved settings, the changes you made are retrieved from the database and the JavaScript content is created "on the fly", thus using more resources by loading the whole WP environment and make MySQL (or whatever database type if used) requests in order to print the JavaScript content. <?php echo WPACU_PLUGIN_TITLE; ?> detects such requests and caches the output for faster retrieval. This very important especially if your website has lots of visits (imagine WordPress loading several times only from one visitor) and you're on a shared environment with limited resources. This will also make the user experience better by decreasing the page rendering time.</p>
293
+ </div>
294
+ </td>
295
+ </tr>
296
  </table>
297
  </div>
298
 
templates/_admin-page-settings-plugin-areas/_plugin-usage-settings.php CHANGED
@@ -39,61 +39,85 @@ foreach (\WpAssetCleanUp\MetaBoxes::$noMetaBoxesForPostTypes as $noMetaBoxesForP
39
  <p><?php _e('The assets would be retrieved via AJAX call(s) that will fetch the post/page URL and extract all the styles &amp; scripts that are enqueued.', 'wp-asset-clean-up'); ?></p>
40
  <p><?php _e('Note that sometimes the assets list is not loading within the Dashboard. That could be because "mod_security" Apache module is enabled or some security plugins are blocking the AJAX request. If this option doesn\'t work, consider managing the list in the front-end view.', 'wp-asset-clean-up'); ?></p>
41
 
42
- <div id="wpacu-settings-assets-retrieval-mode"
43
- <?php if (! ($data['dashboard_show'] == 1)) { echo 'style="display: none;"'; } ?>>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- <ul id="wpacu-dom-get-type-selections">
46
- <li>
47
- <label for="wpacu_dom_get_type"><?php _e('Select a retrieval way', 'wp-asset-clean-up'); ?>:</label>
48
- </li>
49
- <li>
50
- <label>
51
- <input class="wpacu-dom-get-type-selection"
52
- data-target="wpacu-dom-get-type-direct-info"
53
- <?php if ($data['dom_get_type'] === 'direct') { ?>checked="checked"<?php } ?>
54
- type="radio" name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[dom_get_type]"
55
- value="direct" /> <?php _e('Direct', 'wp-asset-clean-up'); ?>
56
- </label>
57
- </li>
58
- <li>
59
- <label>
60
- <input class="wpacu-dom-get-type-selection"
61
- data-target="wpacu-dom-get-type-wp-remote-post-info"
62
- <?php if ($data['dom_get_type'] === 'wp_remote_post') { ?>checked="checked"<?php } ?>
63
- type="radio" name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[dom_get_type]"
64
- value="wp_remote_post" /> WP Remote Post
65
- </label>
66
- </li>
67
- </ul>
68
 
69
- <div class="wpacu-clearfix" style="height: 0;"></div>
 
 
 
 
 
 
 
 
 
 
 
70
 
71
- <ul id="wpacu-dom-get-type-infos">
72
- <li <?php if ($data['dom_get_type'] !== 'direct') { ?>style="display: none;"<?php } ?>
73
- class="wpacu-dom-get-type-info"
74
- id="wpacu-dom-get-type-direct-info">
75
- <strong><?php _e('Direct', 'wp-asset-clean-up'); ?></strong> - <?php _e('This one makes an AJAX call directly on the URL for which the assets are retrieved, then an extra WordPress AJAX call to process the list. Sometimes, due to some external factors (e.g. mod_security module from Apache, security plugin or the fact that non-http is forced for the front-end view and the AJAX request will be blocked), this might not work and another choice method might work better. This used to be the only option available, prior to version 1.2.4.4 and is set as default.', 'wp-asset-clean-up'); ?>
76
- </li>
77
- <li <?php if ($data['dom_get_type'] !== 'wp_remote_post') { ?>style="display: none;"<?php } ?>
78
- class="wpacu-dom-get-type-info"
79
- id="wpacu-dom-get-type-wp-remote-post-info">
80
- <strong>WP Remote Post</strong> - <?php _e('It makes a WordPress AJAX call and gets the HTML source code through wp_remote_post(). This one is less likely to be blocked as it is made on the same protocol (no HTTP request from HTTPS). However, in some cases (e.g. a different load balancer configuration), this might not work when the call to fetch a domain\'s URL (your website) is actually made from the same domain.', 'wp-asset-clean-up'); ?>
81
- </li>
82
- </ul>
83
- </div>
84
 
85
- <div id="wpacu-settings-hide-meta-boxes">
86
- <p><?php _e('Whether you have this option enabled or not, the post/page plugin\'s meta boxes will always be generated. If you wish to hide them completely for any reason (e.g. you rarely manage the assets and you want to reduce cluttering in the edit post/page area, especially if you do lots of edits), you can do so using the options below (<em>don\'t forget to uncheck them whenever you wish to manage the CSS/JS assets again</em>)', 'wp-asset-clean-up'); ?>:</p>
87
- <ul>
88
- <li><label for="wpacu-hide-assets-meta-box-checkbox"><input <?php echo (($data['hide_assets_meta_box'] == 1) ? 'checked="checked"' : ''); ?> id="wpacu-hide-assets-meta-box-checkbox" type="checkbox" name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[hide_assets_meta_box]" value="1" /> Hide "Asset CleanUp Pro: CSS &amp; JavaScript Manager" meta box</label></li>
89
- <li><label for="wpacu-hide-options-meta-box-checkbox"><input <?php echo (($data['hide_options_meta_box'] == 1) ? 'checked="checked"' : ''); ?> id="wpacu-hide-options-meta-box-checkbox" type="checkbox" name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[hide_options_meta_box]" value="1" /> Hide "Asset CleanUp Pro: Options" meta box</label></li>
90
- </ul>
91
- <hr />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
 
93
- <label for="wpacu-hide-meta-boxes-for-post-types">Hide all meta boxes for the following public post types (multiple selection drop-down):</label><br />
94
  </div>
95
  </div>
96
 
 
 
 
 
 
 
 
 
 
 
 
97
  <select style="margin-top: 4px; min-width: 340px;" id="wpacu-hide-meta-boxes-for-post-types"
98
  data-placeholder="Choose Post Type(s)..."
99
  class="wpacu-chosen-select"
@@ -182,7 +206,7 @@ foreach (\WpAssetCleanUp\MetaBoxes::$noMetaBoxesForPostTypes as $noMetaBoxesForP
182
 
183
  <div class="wpacu-clearfix"></div>
184
 
185
- <p style="margin-top: 10px;"><?php _e('These are various ways in which the list of assets that you will manage will show up. Depending on your preference, you might want to see the list of styles &amp; scripts first, or all together sorted in alphabetical order etc.', 'wp-asset-clean-up'); ?> <?php _e('Options that are disabled are available in the Pro version.', 'wp-asset-clean-up'); ?></p>
186
  </td>
187
  </tr>
188
 
@@ -198,7 +222,7 @@ foreach (\WpAssetCleanUp\MetaBoxes::$noMetaBoxesForPostTypes as $noMetaBoxesForP
198
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[hide_from_admin_bar]"
199
  value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
200
 
201
- This is useful if you're not using too often the plugin's options from the top Admin Bar and wish to make up some space there.
202
  </td>
203
  </tr>
204
 
@@ -232,6 +256,7 @@ foreach (\WpAssetCleanUp\MetaBoxes::$noMetaBoxesForPostTypes as $noMetaBoxesForP
232
  <p><?php _e('Sometimes, when you have plenty of elements in the edit page, you might want to contract the list of assets when you\'re viewing the page as it will save space. This can be a good practice, especially when you finished optimising the pages and you don\'t want to keep seeing the long list of files every time you edit a page.', 'wp-asset-clean-up'); ?></p>
233
  </td>
234
  </tr>
 
235
  <tr valign="top">
236
  <th scope="row">
237
  <label><?php _e('On Assets List Layout Load, keep "Inline code associated with this handle" area', 'wp-asset-clean-up'); ?>:</label>
@@ -294,7 +319,7 @@ foreach (\WpAssetCleanUp\MetaBoxes::$noMetaBoxesForPostTypes as $noMetaBoxesForP
294
  </ul>
295
  <div class="wpacu-clearfix"></div>
296
 
297
- <p><?php _e('In case you prefer standard HTML checkboxes instead of the enhanced CSS3 iPhone style ones (on &amp; off) or you need a simple HTML layout in case you\'re using a screen reader software (e.g. for people with disabilities) which requires standard/clean HTML code, then you can choose "Standard" as an option.', 'wp-asset-clean-up'); ?></p>
298
  </td>
299
  </tr>
300
  <tr valign="top">
39
  <p><?php _e('The assets would be retrieved via AJAX call(s) that will fetch the post/page URL and extract all the styles &amp; scripts that are enqueued.', 'wp-asset-clean-up'); ?></p>
40
  <p><?php _e('Note that sometimes the assets list is not loading within the Dashboard. That could be because "mod_security" Apache module is enabled or some security plugins are blocking the AJAX request. If this option doesn\'t work, consider managing the list in the front-end view.', 'wp-asset-clean-up'); ?></p>
41
 
42
+ <div id="wpacu-settings-assets-retrieval-mode" <?php if (! ($data['dashboard_show'] == 1)) { echo 'style="display: none;"'; } ?>>
43
+ <ul id="wpacu-dom-get-type-selections">
44
+ <li>
45
+ <label for="wpacu_dom_get_type"><?php _e('Select a retrieval way', 'wp-asset-clean-up'); ?>:</label>
46
+ </li>
47
+ <li>
48
+ <label>
49
+ <input class="wpacu-dom-get-type-selection"
50
+ data-target="wpacu-dom-get-type-direct-info"
51
+ <?php if ($data['dom_get_type'] === 'direct') { ?>checked="checked"<?php } ?>
52
+ type="radio" name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[dom_get_type]"
53
+ value="direct" /> <?php _e('Direct', 'wp-asset-clean-up'); ?>
54
+ </label>
55
+ </li>
56
+ <li>
57
+ <label>
58
+ <input class="wpacu-dom-get-type-selection"
59
+ data-target="wpacu-dom-get-type-wp-remote-post-info"
60
+ <?php if ($data['dom_get_type'] === 'wp_remote_post') { ?>checked="checked"<?php } ?>
61
+ type="radio" name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[dom_get_type]"
62
+ value="wp_remote_post" /> WP Remote Post
63
+ </label>
64
+ </li>
65
+ </ul>
66
 
67
+ <div class="wpacu-clearfix" style="height: 0;"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
+ <ul id="wpacu-dom-get-type-infos">
70
+ <li <?php if ($data['dom_get_type'] !== 'direct') { ?>style="display: none;"<?php } ?>
71
+ class="wpacu-dom-get-type-info"
72
+ id="wpacu-dom-get-type-direct-info">
73
+ <strong><?php _e('Direct', 'wp-asset-clean-up'); ?></strong> - <?php _e('This one makes an AJAX call directly on the URL for which the assets are retrieved, then an extra WordPress AJAX call to process the list. Sometimes, due to some external factors (e.g. mod_security module from Apache, security plugin or the fact that non-http is forced for the front-end view and the AJAX request will be blocked), this might not work and another choice method might work better. This used to be the only option available, prior to version 1.2.4.4 and is set as default.', 'wp-asset-clean-up'); ?>
74
+ </li>
75
+ <li <?php if ($data['dom_get_type'] !== 'wp_remote_post') { ?>style="display: none;"<?php } ?>
76
+ class="wpacu-dom-get-type-info"
77
+ id="wpacu-dom-get-type-wp-remote-post-info">
78
+ <strong>WP Remote Post</strong> - <?php _e('It makes a WordPress AJAX call and gets the HTML source code through wp_remote_post(). This one is less likely to be blocked as it is made on the same protocol (no HTTP request from HTTPS). However, in some cases (e.g. a different load balancer configuration), this might not work when the call to fetch a domain\'s URL (your website) is actually made from the same domain.', 'wp-asset-clean-up'); ?>
79
+ </li>
80
+ </ul>
81
 
82
+ <hr /><div class="wpacu-clearfix" style="height: 0;"></div>
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
+ <p style="margin-top: 8px;"><?php _e('When you edit a post, page or custom post type and rarely manage loaded CSS/JS from the "Asset CleanUp: CSS & JavaScript Manager" meta box, you can choose to fetch the list when you click on a button. This will help declutter the edit page on load and also save resources as AJAX calls to the front-end won\'t be made to retrieve the assets\' list.', 'wp-asset-clean-up'); ?></p>
85
+ <ul style="margin-bottom: 0;">
86
+ <li>
87
+ <label for="assets_list_show_status_default">
88
+ <input id="assets_list_show_status_default"
89
+ <?php if (! $data['assets_list_show_status'] || $data['assets_list_show_status'] === 'default') { ?>checked="checked"<?php } ?>
90
+ type="radio"
91
+ name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[assets_list_show_status]"
92
+ value="default" /> <?php _e('Fetch the assets automatically and show the list', 'wp-asset-clean-up'); ?> (<?php _e('Default', 'wp-asset-clean-up'); ?>)
93
+ </label>
94
+ </li>
95
+ <li>
96
+ <label for="assets_list_show_status_fetch_on_click">
97
+ <input id="assets_list_show_status_fetch_on_click"
98
+ <?php if ($data['assets_list_show_status'] === 'fetch_on_click') { ?>checked="checked"<?php } ?>
99
+ type="radio"
100
+ name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[assets_list_show_status]"
101
+ value="fetch_on_click" /> <?php _e('Fetch the assets on button click', 'wp-asset-clean-up'); ?>
102
+ </label>
103
+ </li>
104
+ </ul><div class="wpacu-clearfix" style="height: 0; clear: both;"></div>
105
 
106
+ <hr />
107
  </div>
108
  </div>
109
 
110
+ <div id="wpacu-settings-hide-meta-boxes">
111
+ <p><?php _e('If you wish to hide the meta boxes completely for any reason (e.g. you rarely manage the assets and you want to reduce cluttering in the edit post/page area, especially if you do lots of edits), you can do so using the options below (<em>don\'t forget to uncheck them whenever you wish to manage the CSS/JS assets again</em>)', 'wp-asset-clean-up'); ?>:</p>
112
+ <ul>
113
+ <li><label for="wpacu-hide-assets-meta-box-checkbox"><input <?php echo (($data['hide_assets_meta_box'] == 1) ? 'checked="checked"' : ''); ?> id="wpacu-hide-assets-meta-box-checkbox" type="checkbox" name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[hide_assets_meta_box]" value="1" /> Hide "Asset CleanUp Pro: CSS &amp; JavaScript Manager" meta box</label></li>
114
+ <li><label for="wpacu-hide-options-meta-box-checkbox"><input <?php echo (($data['hide_options_meta_box'] == 1) ? 'checked="checked"' : ''); ?> id="wpacu-hide-options-meta-box-checkbox" type="checkbox" name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[hide_options_meta_box]" value="1" /> Hide "Asset CleanUp Pro: Options" meta box</label></li>
115
+ </ul>
116
+ <hr />
117
+
118
+ <label for="wpacu-hide-meta-boxes-for-post-types">Hide all meta boxes for the following public post types (multiple selection drop-down):</label><br />
119
+ </div>
120
+
121
  <select style="margin-top: 4px; min-width: 340px;" id="wpacu-hide-meta-boxes-for-post-types"
122
  data-placeholder="Choose Post Type(s)..."
123
  class="wpacu-chosen-select"
206
 
207
  <div class="wpacu-clearfix"></div>
208
 
209
+ <p><?php _e('These are various ways in which the list of assets that you will manage will show up. Depending on your preference, you might want to see the list of styles &amp; scripts first, or all together sorted in alphabetical order etc.', 'wp-asset-clean-up'); ?> <?php _e('Options that are disabled are available in the Pro version.', 'wp-asset-clean-up'); ?></p>
210
  </td>
211
  </tr>
212
 
222
  name="<?php echo WPACU_PLUGIN_ID . '_settings'; ?>[hide_from_admin_bar]"
223
  value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
224
 
225
+ This is useful if you're not using too often the plugin's options from the top Admin Bar and wish to make up some space there. <span style="color: #004567;" class="dashicons dashicons-info"></span> <a href="https://assetcleanup.com/docs/?p=187" target="_blank">Read more</a>
226
  </td>
227
  </tr>
228
 
256
  <p><?php _e('Sometimes, when you have plenty of elements in the edit page, you might want to contract the list of assets when you\'re viewing the page as it will save space. This can be a good practice, especially when you finished optimising the pages and you don\'t want to keep seeing the long list of files every time you edit a page.', 'wp-asset-clean-up'); ?></p>
257
  </td>
258
  </tr>
259
+
260
  <tr valign="top">
261
  <th scope="row">
262
  <label><?php _e('On Assets List Layout Load, keep "Inline code associated with this handle" area', 'wp-asset-clean-up'); ?>:</label>
319
  </ul>
320
  <div class="wpacu-clearfix"></div>
321
 
322
+ <p><?php _e('In case you prefer standard HTML checkboxes instead of the enhanced CSS3 iPhone style ones (on &amp; off) or you need a simple HTML layout in case you\'re using a screen reader software (e.g. for people with disabilities) which requires standard/clean HTML code, then you can choose "Standard" as an option.', 'wp-asset-clean-up'); ?> <span style="color: #004567;" class="dashicons dashicons-info"></span> <a href="https://assetcleanup.com/docs/?p=95" target="_blank">Read more</a></p>
323
  </td>
324
  </tr>
325
  <tr valign="top">
templates/_admin-pages-assets-manager/_custom-post-types.php CHANGED
@@ -7,6 +7,27 @@ if (! isset($data)) {
7
  }
8
  ?>
9
  <div style="margin: 25px 0 0;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  <p>Popular examples: 'product' created by WooCommerce, 'download' created by Easy Digital Downloads etc. &#10230; <a target="_blank" href="https://wordpress.org/support/article/post-types/#custom-post-types"><?php _e('read more', 'wp-asset-clean-up'); ?></a></p>
11
 
12
  <strong>How to retrieve the loaded styles &amp; scripts?</strong>
7
  }
8
  ?>
9
  <div style="margin: 25px 0 0;">
10
+ <?php
11
+ $anyMetaBoxHidden = $data['wpacu_settings']['hide_assets_meta_box'] || $data['wpacu_settings']['hide_options_meta_box'];
12
+
13
+ if ($anyMetaBoxHidden) {
14
+ ?>
15
+ <div class="wpacu-warning" style="width: 95%; margin: -10px 0 15px; padding: 10px; font-size: inherit;">
16
+ <strong><span class="dashicons dashicons-warning" style="color: orange;"></span> Important Reminder:</strong> The following meta boxes were marked to be hidden in plugin's "Settings" &#187; "Plugin Usage Preferences":
17
+ <ul style="margin-bottom: 0; list-style: circle; padding-left: 25px;">
18
+ <?php if ($data['wpacu_settings']['hide_assets_meta_box']) { ?>
19
+ <li><strong><?php echo WPACU_PLUGIN_TITLE; ?>: CSS &amp; JavaScript Manager</strong> * <em>to see the CSS/JS list for any <strong>Custom Post Type (e.g. WooCommerce product)</strong>, you need to make the meta box visible again</em></li>
20
+ <?php } ?>
21
+
22
+ <?php if ($data['wpacu_settings']['hide_options_meta_box']) { ?>
23
+ <li><strong><?php echo WPACU_PLUGIN_TITLE; ?>: Options</strong> * <em>to prevent minify/combine/unload settings per page, you need to make the meta box visible again</em></li>
24
+ <?php } ?>
25
+ </ul>
26
+ </div>
27
+ <?php
28
+ }
29
+ ?>
30
+
31
  <p>Popular examples: 'product' created by WooCommerce, 'download' created by Easy Digital Downloads etc. &#10230; <a target="_blank" href="https://wordpress.org/support/article/post-types/#custom-post-types"><?php _e('read more', 'wp-asset-clean-up'); ?></a></p>
32
 
33
  <strong>How to retrieve the loaded styles &amp; scripts?</strong>
templates/_admin-pages-assets-manager/_homepage.php CHANGED
@@ -19,30 +19,51 @@ if ($data['wpacu_settings']['dashboard_show'] != 1) {
19
  }
20
 
21
  if ($data['show_on_front'] === 'page') {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  ?>
23
- <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:', 'wp-asset-clean-up'); ?></p>
24
- <div>
25
- <ul>
26
- <?php
27
- if ($data['page_on_front']) {
28
- ?>
29
- <li>
30
- <?php _e('Front page:', 'wp-asset-clean-up'); ?>
31
- <a href="<?php echo admin_url('post.php?post='.$data['page_on_front'].'&action=edit#'.WPACU_PLUGIN_ID.'_asset_list'); ?>"><strong><?php echo $data['page_on_front_title']; ?></strong></a>
32
- </li>
33
- <?php
34
- }
35
 
36
- if ($data['page_for_posts']) {
37
- ?>
38
- <li>
39
- <?php _e('Posts page:', 'wp-asset-clean-up'); ?>
40
- <a href="<?php echo admin_url('post.php?post='.$data['page_for_posts'].'&action=edit#'.WPACU_PLUGIN_ID.'_asset_list'); ?>"><strong><?php echo $data['page_for_posts_title']; ?></strong></a>
41
- </li>
42
- <?php
43
- }
44
- ?>
45
- </ul>
 
 
 
 
 
 
 
 
 
 
 
 
46
  </div>
47
  <p><?php echo sprintf(__('To read more about creating a static front page in WordPress, %scheck the Codex%s.', 'wp-asset-clean-up'), '<a target="_blank" href="https://codex.wordpress.org/Creating_a_Static_Front_Page">', '</a>'); ?></p>
48
  <?php
19
  }
20
 
21
  if ($data['show_on_front'] === 'page') {
22
+ $anyMetaBoxHidden = $data['wpacu_settings']['hide_assets_meta_box'] || $data['wpacu_settings']['hide_options_meta_box'];
23
+
24
+ if ($anyMetaBoxHidden) {
25
+ ?>
26
+ <div class="wpacu-warning" style="width: 95%; margin: -10px 0 15px; padding: 10px; font-size: inherit;">
27
+ <strong><span class="dashicons dashicons-warning" style="color: orange;"></span> Important Reminder:</strong> The following meta boxes were marked to be hidden in plugin's "Settings" &#187; "Plugin Usage Preferences":
28
+ <ul style="margin-bottom: 0; list-style: circle; padding-left: 25px;">
29
+ <?php if ($data['wpacu_settings']['hide_assets_meta_box']) { ?>
30
+ <li><strong><?php echo WPACU_PLUGIN_TITLE; ?>: CSS &amp; JavaScript Manager</strong> * <em>to see the CSS/JS list, you need to make the meta box visible again</em></li>
31
+ <?php } ?>
32
+
33
+ <?php if ($data['wpacu_settings']['hide_options_meta_box']) { ?>
34
+ <li><strong><?php echo WPACU_PLUGIN_TITLE; ?>: Options</strong> * <em>to prevent minify/combine/unload settings per page, you need to make the meta box visible again</em></li>
35
+ <?php } ?>
36
+ </ul>
37
+ </div>
38
+ <?php
39
+ }
40
  ?>
41
+ <div class="wpacu-notice-info" style="width: 95%;">
42
+ <p><?php _e('In "Settings" &#187; "Reading" you have selected a static page for "Front page displays" setting.', 'wp-asset-clean-up'); ?></p>
43
+ <p><?php _e('To manage the assets (.CSS &amp; .JS), use the button(s) below:', 'wp-asset-clean-up'); ?></p>
 
 
 
 
 
 
 
 
 
44
 
45
+ <table class="wp-list-table widefat fixed striped pages" style="margin-bottom: 4px;">
46
+ <?php
47
+ if ($data['page_on_front']) {
48
+ ?>
49
+ <tr>
50
+ <td style="width: 80px; vertical-align: middle;"><?php _e('Front page:', 'wp-asset-clean-up'); ?></td>
51
+ <td><a class="button button-secondary button-large" href="<?php echo admin_url('post.php?post='.$data['page_on_front'].'&action=edit#'.WPACU_PLUGIN_ID.'_asset_list'); ?>"><span class="dashicons dashicons-admin-page" style="vertical-align: middle;"></span> <strong><?php echo $data['page_on_front_title']; ?></strong></a></td>
52
+ </tr>
53
+ <?php
54
+ }
55
+ ?>
56
+ <?php
57
+ if ($data['page_for_posts']) {
58
+ ?>
59
+ <tr>
60
+ <td style="width: 80px; vertical-align: middle;"><?php _e('Posts page:', 'wp-asset-clean-up'); ?></td>
61
+ <td><a class="button button-secondary button-large" href="<?php echo admin_url('post.php?post='.$data['page_for_posts'].'&action=edit#'.WPACU_PLUGIN_ID.'_asset_list'); ?>"><span class="dashicons dashicons-admin-page" style="vertical-align: middle;"></span> <strong><?php echo $data['page_for_posts_title']; ?></strong></a></td>
62
+ </tr>
63
+ <?php
64
+ }
65
+ ?>
66
+ </table>
67
  </div>
68
  <p><?php echo sprintf(__('To read more about creating a static front page in WordPress, %scheck the Codex%s.', 'wp-asset-clean-up'), '<a target="_blank" href="https://codex.wordpress.org/Creating_a_Static_Front_Page">', '</a>'); ?></p>
69
  <?php
templates/_admin-pages-assets-manager/_pages.php CHANGED
@@ -7,6 +7,26 @@ if (! isset($data)) {
7
  }
8
  ?>
9
  <div style="margin: 25px 0 0;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  <p>Post Type: 'page' (e.g. pages such as About, Contact etc.) &#10230; <a target="_blank" href="https://wordpress.org/support/article/pages-screen/"><?php _e('read more', 'wp-asset-clean-up'); ?></a></p>
11
 
12
  <strong>How to retrieve the loaded styles &amp; scripts?</strong>
7
  }
8
  ?>
9
  <div style="margin: 25px 0 0;">
10
+ <?php
11
+ $anyMetaBoxHidden = $data['wpacu_settings']['hide_assets_meta_box'] || $data['wpacu_settings']['hide_options_meta_box'];
12
+
13
+ if ($anyMetaBoxHidden) {
14
+ ?>
15
+ <div class="wpacu-warning" style="width: 95%; margin: -10px 0 15px; padding: 10px; font-size: inherit;">
16
+ <strong><span class="dashicons dashicons-warning" style="color: orange;"></span> Important Reminder:</strong> The following meta boxes were marked to be hidden in plugin's "Settings" &#187; "Plugin Usage Preferences":
17
+ <ul style="margin-bottom: 0; list-style: circle; padding-left: 25px;">
18
+ <?php if ($data['wpacu_settings']['hide_assets_meta_box']) { ?>
19
+ <li><strong><?php echo WPACU_PLUGIN_TITLE; ?>: CSS &amp; JavaScript Manager</strong> * <em>to see the CSS/JS list for any <strong>Page</strong>, you need to make the meta box visible again</em></li>
20
+ <?php } ?>
21
+
22
+ <?php if ($data['wpacu_settings']['hide_options_meta_box']) { ?>
23
+ <li><strong><?php echo WPACU_PLUGIN_TITLE; ?>: Options</strong> * <em>to prevent minify/combine/unload settings per page, you need to make the meta box visible again</em></li>
24
+ <?php } ?>
25
+ </ul>
26
+ </div>
27
+ <?php
28
+ }
29
+ ?>
30
  <p>Post Type: 'page' (e.g. pages such as About, Contact etc.) &#10230; <a target="_blank" href="https://wordpress.org/support/article/pages-screen/"><?php _e('read more', 'wp-asset-clean-up'); ?></a></p>
31
 
32
  <strong>How to retrieve the loaded styles &amp; scripts?</strong>
templates/_admin-pages-assets-manager/_posts.php CHANGED
@@ -7,6 +7,26 @@ if (! isset($data)) {
7
  }
8
  ?>
9
  <div style="margin: 25px 0 0;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  <p>Post Type: 'post' (e.g. blog entries) &#10230; <a target="_blank" href="https://wordpress.org/support/article/writing-posts/"><?php _e('read more', 'wp-asset-clean-up'); ?></a></p>
11
 
12
  <strong>How to retrieve the loaded styles &amp; scripts?</strong>
7
  }
8
  ?>
9
  <div style="margin: 25px 0 0;">
10
+ <?php
11
+ $anyMetaBoxHidden = $data['wpacu_settings']['hide_assets_meta_box'] || $data['wpacu_settings']['hide_options_meta_box'];
12
+
13
+ if ($anyMetaBoxHidden) {
14
+ ?>
15
+ <div class="wpacu-warning" style="width: 95%; margin: -10px 0 15px; padding: 10px; font-size: inherit;">
16
+ <strong><span class="dashicons dashicons-warning" style="color: orange;"></span> Important Reminder:</strong> The following meta boxes were marked to be hidden in plugin's "Settings" &#187; "Plugin Usage Preferences":
17
+ <ul style="margin-bottom: 0; list-style: circle; padding-left: 25px;">
18
+ <?php if ($data['wpacu_settings']['hide_assets_meta_box']) { ?>
19
+ <li><strong><?php echo WPACU_PLUGIN_TITLE; ?>: CSS &amp; JavaScript Manager</strong> * <em>to see the CSS/JS list for any <strong>Post</strong>, you need to make the meta box visible again</em></li>
20
+ <?php } ?>
21
+
22
+ <?php if ($data['wpacu_settings']['hide_options_meta_box']) { ?>
23
+ <li><strong><?php echo WPACU_PLUGIN_TITLE; ?>: Options</strong> * <em>to prevent minify/combine/unload settings per page, you need to make the meta box visible again</em></li>
24
+ <?php } ?>
25
+ </ul>
26
+ </div>
27
+ <?php
28
+ }
29
+ ?>
30
  <p>Post Type: 'post' (e.g. blog entries) &#10230; <a target="_blank" href="https://wordpress.org/support/article/writing-posts/"><?php _e('read more', 'wp-asset-clean-up'); ?></a></p>
31
 
32
  <strong>How to retrieve the loaded styles &amp; scripts?</strong>
templates/admin-page-settings-plugin.php CHANGED
@@ -84,7 +84,7 @@ if ($showSettingsType === 'tabs') {
84
  $wpacuNavTextSub = '<div class="wpacu-tab-extra-text"><small><span class="wpacu-status-wrap" data-linked-to="wpacu_minify_css_enable">' . $cssMinifyStatus . ' '.__('Minify', 'wp-asset-clean-up').'</span> &nbsp;&nbsp; <span class="wpacu-status-wrap" data-linked-to="wpacu_combine_loaded_css_enable">' . $cssCombineStatus . ' '.__('Combine', 'wp-asset-clean-up').'</span>&nbsp; <span style="color: gray;">+ Defer, Inline</span></small></small></div>';
85
 
86
  if (! empty($data['is_optimize_css_enabled_by_other_party'])) {
87
- $wpacuNavTextSub .= '<div style="margin-top: 3px;"><small style="font-weight: lighter; color: gray;"><strong>Status:</strong> Locked, already enabled in other plugin(s)</small></div>';
88
  }
89
  }
90
 
84
  $wpacuNavTextSub = '<div class="wpacu-tab-extra-text"><small><span class="wpacu-status-wrap" data-linked-to="wpacu_minify_css_enable">' . $cssMinifyStatus . ' '.__('Minify', 'wp-asset-clean-up').'</span> &nbsp;&nbsp; <span class="wpacu-status-wrap" data-linked-to="wpacu_combine_loaded_css_enable">' . $cssCombineStatus . ' '.__('Combine', 'wp-asset-clean-up').'</span>&nbsp; <span style="color: gray;">+ Defer, Inline</span></small></small></div>';
85
 
86
  if (! empty($data['is_optimize_css_enabled_by_other_party'])) {
87
+ $wpacuNavTextSub .= '<div style="margin-top: 3px;"><small style="font-weight: lighter; color: gray;"><strong>Status:</strong> Partially locked, already enabled in other plugin(s)</small></div>';
88
  }
89
  }
90
 
templates/meta-box-loaded-assets/view-by-location.php CHANGED
@@ -25,7 +25,7 @@ $listAreaStatus = $data['plugin_settings']['assets_list_layout_areas_status'];
25
  __('Please select the styles &amp; scripts that are %sNOT NEEDED%s from the list below. Not sure which ones to unload? %s Use "Test Mode" (to make the changes apply only to you), while you are going through the trial &amp; error process.', 'wp-asset-clean-up'),
26
  '<span style="color: #CC0000;"><strong>',
27
  '</strong></span>',
28
- '<img draggable="false" class="emoji" style="max-width: 26px; max-height: 26px;" alt="" src="https://s.w.org/images/core/emoji/11.2.0/svg/1f914.svg">'
29
  ); ?> <?php echo __('"Load in on this page (make exception)" will take effect when a bulk unload rule is used. Otherwise, the asset will load anyway unless you select it for unload.', 'wp-asset-clean-up'); ?></p>
30
  <?php
31
  if ($data['plugin_settings']['hide_core_files']) {
25
  __('Please select the styles &amp; scripts that are %sNOT NEEDED%s from the list below. Not sure which ones to unload? %s Use "Test Mode" (to make the changes apply only to you), while you are going through the trial &amp; error process.', 'wp-asset-clean-up'),
26
  '<span style="color: #CC0000;"><strong>',
27
  '</strong></span>',
28
+ '<img draggable="false" class="wpacu-emoji" alt="🤔" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/1f914.svg" />'
29
  ); ?> <?php echo __('"Load in on this page (make exception)" will take effect when a bulk unload rule is used. Otherwise, the asset will load anyway unless you select it for unload.', 'wp-asset-clean-up'); ?></p>
30
  <?php
31
  if ($data['plugin_settings']['hide_core_files']) {
templates/meta-box-loaded-assets/view-default.php CHANGED
@@ -40,7 +40,7 @@ $listAreaStatus = $data['plugin_settings']['assets_list_layout_areas_status'];
40
  <?php
41
  if (! empty($data['all']['styles'])) {
42
  ?>
43
- <p><?php echo sprintf(__('Please select the styles &amp; scripts that are %sNOT NEEDED%s from the list below. Not sure which ones to unload? 🤔 Use "Test Mode" (to make the changes apply only to you), while you are going through the trial &amp; error process.', 'wp-asset-clean-up'), '<span style="color: #CC0000;"><strong>', '</strong></span>'); ?></p>
44
  <p><?php echo __('"Load in on this page (make exception)" will take effect when a bulk unload rule is used. Otherwise, the asset will load anyway unless you select it for unload.', 'wp-asset-clean-up'); ?></p>
45
  <?php
46
  if ($data['plugin_settings']['hide_core_files']) {
@@ -102,7 +102,7 @@ $listAreaStatus = $data['plugin_settings']['assets_list_layout_areas_status'];
102
  <?php
103
  if (! empty($data['all']['scripts'])) {
104
  ?>
105
- <p><?php echo sprintf(__('Please select the styles &amp; scripts that are %sNOT NEEDED%s from the list below. Not sure which ones to unload? Use "Test Mode" (to make the changes apply only to you), while you are going through the trial &amp; error process.', 'wp-asset-clean-up'), '<span style="color: #CC0000;"><strong>', '</strong></span>'); ?></p>
106
  <p><?php echo __('"Load in on this page (make exception)" will take effect when a bulk unload rule is used. Otherwise, the asset will load anyway unless you select it for unload.', 'wp-asset-clean-up'); ?></p>
107
  <?php
108
  if ($data['plugin_settings']['hide_core_files']) {
40
  <?php
41
  if (! empty($data['all']['styles'])) {
42
  ?>
43
+ <p><?php echo sprintf(__('Please select the styles &amp; scripts that are %sNOT NEEDED%s from the list below. Not sure which ones to unload? %s Use "Test Mode" (to make the changes apply only to you), while you are going through the trial &amp; error process.', 'wp-asset-clean-up'), '<span style="color: #CC0000;"><strong>', '</strong></span>', '<img draggable="false" class="wpacu-emoji" alt="🤔" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/1f914.svg" />'); ?></p>
44
  <p><?php echo __('"Load in on this page (make exception)" will take effect when a bulk unload rule is used. Otherwise, the asset will load anyway unless you select it for unload.', 'wp-asset-clean-up'); ?></p>
45
  <?php
46
  if ($data['plugin_settings']['hide_core_files']) {
102
  <?php
103
  if (! empty($data['all']['scripts'])) {
104
  ?>
105
+ <p><?php echo sprintf(__('Please select the styles &amp; scripts that are %sNOT NEEDED%s from the list below. Not sure which ones to unload? %s Use "Test Mode" (to make the changes apply only to you), while you are going through the trial &amp; error process.', 'wp-asset-clean-up'), '<span style="color: #CC0000;"><strong>', '</strong></span>', '<img draggable="false" class="wpacu-emoji" alt="🤔" src="https://s.w.org/images/core/emoji/12.0.0-1/svg/1f914.svg" />'); ?></p>
106
  <p><?php echo __('"Load in on this page (make exception)" will take effect when a bulk unload rule is used. Otherwise, the asset will load anyway unless you select it for unload.', 'wp-asset-clean-up'); ?></p>
107
  <?php
108
  if ($data['plugin_settings']['hide_core_files']) {
templates/meta-box.php CHANGED
@@ -6,26 +6,31 @@ if (! isset($data)) {
6
  exit;
7
  }
8
 
9
- if ($data['get_assets']) {
10
  ?>
11
- <input type="hidden"
12
- id="wpacu_ajax_fetch_assets_list_dashboard_view"
13
- name="wpacu_ajax_fetch_assets_list_dashboard_view"
14
- value="1" />
15
  <?php
16
  }
17
  ?>
18
  <div id="wpacu_meta_box_content">
19
  <?php
20
- if ($data['get_assets']) {
21
- ?>
22
- <img src="<?php echo admin_url(); ?>/images/spinner.gif" align="top" width="20" height="20" alt="" />&nbsp;
23
- <?php echo sprintf(__('Fetching the loaded scripts and styles for <strong>%s</strong> <br /><br /> Please wait... <br /><br /> In case the list does not show consider checking your internet connection and the actual page that is being fetched to see if it loads completely.', 'wp-asset-clean-up'), $data['fetch_url']); ?>
24
- <p style="margin-bottom: 0;"><?php echo sprintf(
25
- __('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.', 'wp-asset-clean-up'),
26
- '<a href="'.$data['fetch_url'].'#wpacu_wrap_assets">',
27
- '</a>'
28
- ); ?></p>
 
 
 
 
 
 
 
 
29
  <?php
30
  } elseif ($data['status'] === 2) {
31
  echo '<p>'.__('In order to manage the CSS/JS files here, you need to have "Manage in the Dashboard?" enabled within the plugin\'s settings ("Plugin Usage Preferences" tab).', 'wp-asset-clean-up').'</p>';
6
  exit;
7
  }
8
 
9
+ if ($data['is_list_fetchable']) {
10
  ?>
11
+ <input type="hidden" id="wpacu_ajax_fetch_assets_list_dashboard_view" value="1" />
 
 
 
12
  <?php
13
  }
14
  ?>
15
  <div id="wpacu_meta_box_content">
16
  <?php
17
+ if ($data['is_list_fetchable']) {
18
+
19
+ if ($data['fetch_assets_on_click']) {
20
+ ?>
21
+ <a style="margin: 10px 0; padding: 0 26px;" href="#" class="button button-secondary button-hero" id="wpacu_ajax_fetch_on_click_btn"><span style="font-size: 24px; vertical-align: middle;" class="dashicons dashicons-download"></span>&nbsp; Fetch CSS &amp; JavaScript Management List</a>
22
+ <?php
23
+ }
24
+ ?>
25
+ <div id="wpacu_fetching_assets_list_wrap" <?php if ($data['fetch_assets_on_click']) { echo 'style="display: none;"'; } ?>>
26
+ <img src="<?php echo admin_url(); ?>/images/spinner.gif" align="top" width="20" height="20" alt="" />&nbsp;
27
+ <?php echo sprintf(__('Fetching the loaded scripts and styles for <strong>%s</strong> <br /><br /> Please wait... <br /><br /> In case the list does not show consider checking your internet connection and the actual page that is being fetched to see if it loads completely.', 'wp-asset-clean-up'), $data['fetch_url']); ?>
28
+ <p style="margin-bottom: 0;"><?php echo sprintf(
29
+ __('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.', 'wp-asset-clean-up'),
30
+ '<a href="'.$data['fetch_url'].'#wpacu_wrap_assets">',
31
+ '</a>'
32
+ ); ?></p>
33
+ </div>
34
  <?php
35
  } elseif ($data['status'] === 2) {
36
  echo '<p>'.__('In order to manage the CSS/JS files here, you need to have "Manage in the Dashboard?" enabled within the plugin\'s settings ("Plugin Usage Preferences" tab).', 'wp-asset-clean-up').'</p>';
wpacu.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: Asset CleanUp: Page Speed Booster
4
  * Plugin URI: https://wordpress.org/plugins/wp-asset-clean-up/
5
- * Version: 1.3.4.2
6
  * Description: Unload Chosen Scripts & Styles from Posts/Pages to reduce HTTP Requests, Combine/Minify CSS/JS files
7
  * Author: Gabriel Livan
8
  * Author URI: http://gabelivan.com/
@@ -12,7 +12,7 @@
12
 
13
  // Is the Pro version triggered before the Lite one and are both plugins active?
14
  if (! defined('WPACU_PLUGIN_VERSION')) {
15
- define('WPACU_PLUGIN_VERSION', '1.3.4.2');
16
  }
17
 
18
  // Exit if accessed directly
2
  /*
3
  * Plugin Name: Asset CleanUp: Page Speed Booster
4
  * Plugin URI: https://wordpress.org/plugins/wp-asset-clean-up/
5
+ * Version: 1.3.4.3
6
  * Description: Unload Chosen Scripts & Styles from Posts/Pages to reduce HTTP Requests, Combine/Minify CSS/JS files
7
  * Author: Gabriel Livan
8
  * Author URI: http://gabelivan.com/
12
 
13
  // Is the Pro version triggered before the Lite one and are both plugins active?
14
  if (! defined('WPACU_PLUGIN_VERSION')) {
15
+ define('WPACU_PLUGIN_VERSION', '1.3.4.3');
16
  }
17
 
18
  // Exit if accessed directly