Version Description
- Added "Test Mode" option which will unload assets only if the user is logged in as administrator and has capability of activating plugins.
- This is good for debugging in case one might worry that a CSS/JavaScript file could be unloaded by mistake and break the website for the regular (non-logged in) users.
- Once the page loads fine and all looks good, the "Test Mode" can be disabled so the visitors will load the lighter version of the page.
Download this release
Release Info
Developer | gabelivan |
Plugin | Asset CleanUp: Page Speed Booster |
Version | 1.2.8.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.8 to 1.2.8.1
- assets/style.min.css +1 -1
- classes/AdminBar.php +53 -0
- classes/BulkUnloads.php +8 -13
- classes/HomePage.php +6 -7
- classes/Main.php +116 -91
- classes/Misc.php +24 -0
- classes/OwnAssets.php +42 -33
- classes/Plugin.php +1 -1
- classes/Settings.php +8 -5
- classes/Update.php +33 -29
- readme.txt +6 -1
- templates/_top-area.php +1 -1
- templates/admin-page-get-help.php +9 -9
- templates/admin-page-license.php +4 -4
- templates/admin-page-pages-info.php +2 -2
- templates/admin-page-settings-bulk-unloads.php +4 -2
- templates/admin-page-settings-homepage.php +2 -2
- templates/admin-page-settings-plugin.php +30 -10
- templates/meta-box-loaded-assets/_asset-script-rows.php +10 -10
- templates/meta-box-loaded-assets/_asset-style-rows.php +6 -6
- templates/meta-box-loaded.php +1 -1
- templates/settings-frontend.php +3 -3
- wpacu-load.php +3 -0
- wpacu.php +9 -7
assets/style.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wpacu_update_btn,label.wpacu_add_global{cursor:pointer!important}.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.license-status{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.license-status.inactive{color:#c00}.wpacu-tabs nav ul li span.license-status.active{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;width:100%;font-weight:300;text-decoration:none}.wpacu-tabs-style-topline nav li{border:1px solid rgba(40,44,42,.1)}.wpacu-tabs-style-topline nav li:not(:last-child){border-right:none}.wpacu-tabs-style-topline nav li.wpacu-tab-current{border-top-color:#0085ba;border-bottom:none}.wpacu-tabs-style-topline nav a{padding:20px 10px;background:rgba(40,44,42,.05);color:#74777b;line-height:1;-webkit-transition:color .2s;transition:color .2s;text-decoration:none}.wpacu-tabs-style-topline nav a:focus,.wpacu-tabs-style-topline nav a:hover{color:#0085ba}.wpacu-tabs-style-topline nav li.wpacu-tab-current a{background:0 0;box-shadow:inset 0 3px 0 #0085ba;color:#0085ba}.wpacu-tabs-style-topline nav li.wpacu-tab-current a span:not(.dashicons){font-weight:600}.wpacu-tabs-style-topline nav a span{text-transform:uppercase;font-weight:400}.wpacu-script-attributes-area{margin:20px 0 0!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:5px 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.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:5px 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}body.toplevel_page_wpassetcleanup_settings .notice{padding:10px!important}tr.wpacu_not_load td,tr.wpacu_not_load th{background:#FFE1E1!important}.dashicons-wpacu{width:17px;height:17px;margin:2px 0 0;font-size:16px;text-decoration:none}.wpacu_widefat .check-column.wpacu_check{padding:10px}body[class*=wpassetcleanup] #footer-left{border-left:2px solid green;padding-left:10px}#wpacu_meta_box_content{width:99%}#wpacu_meta_box_content h3{margin-left:0;padding-left:0}#wpacu_meta_box_content div.wpacu_note,#wpacu_wrap_assets div.wpacu_note{padding:10px;background-color:#f5f5f5}#wpacu_meta_box_content .dashicons.dashicons-warning{color:#c00}#wpacu_meta_box_content div.wpacu_warning,#wpacu_wrap_assets div.wpacu_warning{border:1px solid #c00}#wpacu_meta_box_content div.wpacu_verified{padding:10px;background-color:#f5f5f5;border-left:1px solid #ddd}#wpacu_meta_box_content div.wpacu_verified span{color:#0073aa;font-weight:700}#wpacu_meta_box_content ul.wpacu_asset_options{margin:0;padding:0}#wpacu_meta_box_content ul.wpacu_asset_options.wpacu_exception_options_area{margin-bottom:14px}#wpacu_meta_box_content ul.wpacu_asset_options li{list-style:none;display:inline-block;margin:0}#wpacu_wrap_assets img,#wpacu_wrap_assets small,.wpacu_asset_row td label{display:inline-block!important}#wpacu_meta_box_content ul.wpacu_asset_options label{font-weight:400;margin-right:5px;margin-top:5px;margin-bottom:5px}#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 small{margin:0!important;letter-spacing:normal!important}#wpacu_wrap_assets input[type=checkbox]{margin-right:4px!important}#wpacu_wrap_assets p{margin:10px 0!important;line-height:22px!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 td{padding:10px!important;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;border-bottom:1px solid #cdcdcd}.wpacu_asset_row td:first-child{border-top:1px solid #cdcdcd}.wpacu_asset_row td p{padding:0!important;margin-bottom:10px!important;word-wrap:break-word!important}.wpacu_asset_row td label{margin:0!important;cursor:pointer!important;font-size:100%!important;font-weight:400!important}.wpacu_asset_row td label span{font-size:100%!important}.wpacu_asset_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{color:red!important}label.wpacu_global_checked{font-weight:700;color:#d54e21}label.wpacu_global_unload_exception{font-weight:700!important}label.wpacu_bulk_unload_active{color:#d54e21}tr.wpacu_global_rule_row.selected{background:#e7e7e7}.nav-tab-wrapper{border-bottom:1px solid #ccc;width:95%}ul.wpacu_asset_options{margin:0;padding:0}ul.wpacu_asset_options li{margin:0;list-style:none;display:inline-block}ul.wpacu_asset_options li.remove_rule label{font-weight:700}ul.wpacu_asset_options label{margin-right:20px;font-weight:400}ul.wpacu_asset_options label input{margin-right:4px}.wpacu_list_table,.wpacu_list_table div,.wpacu_list_table li,.wpacu_list_table p{font-weight:400}.wpacu_widefat{width:99%;border:1px solid #e5e5e5!important}.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;color:#fff!important;font-size:15px!important;padding:10px 24px!important;text-decoration:none!important;text-shadow:0 1px 0 #154682!important;height:auto!important;line-height:normal!important}.wpacu-btns .btn:focus,.wpacu-btns .btn:hover,.wpacu-btns a{text-decoration:none}.wpacu_update_btn:hover{background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#0061a7),color-stop(1,#007dc1))!important;background:-moz-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-webkit-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-o-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-ms-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:linear-gradient(to bottom,#0061a7 5%,#007dc1 100%)!important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0061a7', endColorstr='#007dc1', GradientType=0)!important;background-color:#0061a7!important}.wpacu_update_btn:active{position:relative!important;top:1px!important}ul.hire-reasons{margin-bottom:20px}ul.hire-reasons li{font-size:14px;line-height:22px;margin-bottom:12px}ul.hire-reasons li .dashicons{font-size:23px;line-height:23px}ul.hire-reasons li .dashicons.dashicons-yes{color:green}ol.getting-started li{font-size:14px;line-height:22px;margin-bottom:8px}.wpacu-get-help-wrap p{font-size:14px}.wpacu-btns .btn{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.5rem 1rem;font-size:1rem;-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;border-radius:0}.wpacu-btns .btn-link,.wpacu-btns .btn-link.active,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:disabled{background-color:transparent}.wpacu-btns .btn-link,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{border-color:transparent}.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{color:#014c8c;text-decoration:underline;background-color:transparent}.wpacu-btns .btn-link:disabled{color:#636c72}.wpacu-btns .btn-link:disabled:focus,.wpacu-btns .btn-link:disabled:hover{text-decoration:none}.wpacu-btns .btn-group-lg>.btn,.wpacu-btns .btn-lg{padding:.75rem 1.5rem;font-size:1.25rem;border-radius:.3rem}.wpacu-btns .btn-group-sm>.btn,.wpacu-btns .btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.wpacu-btns .btn-block{display:block;width:100%}.go-pro-button,.go-pro-link-no-style,.wordpress-core-file{display:inline-block;text-decoration:none}.wpacu-btns .btn-block+.btn-block{margin-top:.5rem}.wpacu-btns input[type=submit].btn-block,.wpacu-btns input[type=reset].btn-block,.wpacu-btns input[type=button].btn-block{width:100%}.wpacu-btns .fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.go-pro-button{background-color:#4CAF50;border:2px solid #4CAF50;color:#fff;padding:12px 18px;text-align:center;font-size:16px;margin:4px 2px;cursor:pointer;border-radius:10px;-webkit-transition-duration:.4s;transition-duration:.4s}.go-pro-button:hover{background-color:#fff;color:#000;border:2px solid #4CAF50}.go-pro-link-no-style .tooltip,.wordpress-core-file .tooltip{font-size:14px;line-height:18px;z-index:1;text-align:center;padding:6px;border-radius:6px;bottom:100%;left:50%}.go-pro-link-no-style{position:relative;color:inherit}.go-pro-link-no-style:not(.nav-tab){font-style:italic}.go-pro-link-no-style .tooltip{position:absolute;visibility:hidden;width:130px;background-color:#27ae60;color:#fff;margin-left:-65px}.go-pro-link-no-style .tooltip.wpacu-larger{width:240px}.go-pro-link-no-style:hover .tooltip{visibility:visible}.wordpress-core-file{position:relative;font-style:normal;color:inherit}.wordpress-core-file .tooltip{position:absolute;visibility:hidden;width:160px;background-color:#c00;color:#fff;margin-left:-80px}.wordpress-core-file:hover .tooltip{visibility:visible}body.wp-admin .go-pro-link-no-style .tooltip{font-size:12px;line-height:16px;padding:5px}.pro-page-unlock-notice{border-radius:10px;padding:10px;background:#f2faf2;border:1px solid #c0e8c0;width:auto;display:block}.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 .wpacu-image-area{margin:5px 0 0;position:relative}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area img{width:99%;margin:8px 0;border:1px solid #cdcdcd;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}.ajax-direct-call-error-area{background:#fff;padding:10px;border:1px solid #c00;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}.toplevel_page_wpassetcleanup_settings .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px}.toplevel_page_wpassetcleanup_settings .wpacu_switch.wpacu_locked_for_pro{opacity:.3}.toplevel_page_wpassetcleanup_settings .wpacu_switch input{display:none}.toplevel_page_wpassetcleanup_settings .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.2s;transition:.2s}.toplevel_page_wpassetcleanup_settings .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.2s;transition:.2s}.toplevel_page_wpassetcleanup_settings input:checked+.wpacu_slider{background-color:#52af00}.toplevel_page_wpassetcleanup_settings input:focus+.wpacu_slider{box-shadow:0 0 1px #52af00}.toplevel_page_wpassetcleanup_settings input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.toplevel_page_wpassetcleanup_settings .wpacu_slider.wpacu_round{border-radius:29px}.toplevel_page_wpassetcleanup_settings .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu_asset_row li.wpacu_unload_this_page{display:block!important;position:relative}.wpacu_asset_row .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px;margin-right:5px!important}.wpacu_asset_row .wpacu_switch input{display:none}.wpacu_asset_row .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.2s;transition:.2s}.wpacu_asset_row .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.2s;transition:.2s}.wpacu_asset_row .wpacu_slider_text{position:absolute;left:62px;top:3px}.wpacu_asset_row input:checked+.wpacu_slider{background-color:#C00}.wpacu_asset_row input:focus+.wpacu_slider{box-shadow:0 0 1px #C00}.wpacu_asset_row input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu_asset_row .wpacu_slider.wpacu_round{border-radius:29px}.wpacu_asset_row .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu_table_wrap{margin:20px 0 0}.wpacu_table_wrap>table{border:1px solid #cdcdcd}.wpacu_table_wrap .table{width:100%;max-width:100%;margin-bottom:1rem;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu_table_wrap .table td,.wpacu_table_wrap .table th{padding:.75rem;vertical-align:top;border-top:1px solid #eceeef}.wpacu_table_wrap .table thead th{vertical-align:bottom;border-bottom:2px solid #eceeef}.wpacu_table_wrap .table tbody+tbody{border-top:2px solid #eceeef}.wpacu_table_wrap .table .table{background-color:#fff}.wpacu_table_wrap .table-sm td,.wpacu_table_wrap .table-sm th{padding:.3rem}.wpacu_table_wrap .table-bordered,.wpacu_table_wrap .table-bordered td,.wpacu_table_wrap .table-bordered th{border:1px solid #eceeef}.wpacu_table_wrap .table-bordered thead td,.wpacu_table_wrap .table-bordered thead th{border-bottom-width:2px}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(even){background-color:#f9f9f9}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(odd){background-color:#fff}.wpacu_table_wrap .table-active,.wpacu_table_wrap .table-active>td,.wpacu_table_wrap .table-active>th,.wpacu_table_wrap .table-hover .table-active:hover,.wpacu_table_wrap .table-hover .table-active:hover>td,.wpacu_table_wrap .table-hover .table-active:hover>th,.wpacu_table_wrap .table-hover tbody tr:hover{background-color:rgba(0,0,0,.075)}.wpacu_table_wrap .table-success,.wpacu_table_wrap .table-success>td,.wpacu_table_wrap .table-success>th{background-color:#dff0d8}.wpacu_table_wrap .table-hover .table-success:hover,.wpacu_table_wrap .table-hover .table-success:hover>td,.wpacu_table_wrap .table-hover .table-success:hover>th{background-color:#d0e9c6}.wpacu_table_wrap .table-info,.wpacu_table_wrap .table-info>td,.wpacu_table_wrap .table-info>th{background-color:#d9edf7}.wpacu_table_wrap .table-hover .table-info:hover,.wpacu_table_wrap .table-hover .table-info:hover>td,.wpacu_table_wrap .table-hover .table-info:hover>th{background-color:#c4e3f3}.wpacu_table_wrap .table-warning,.wpacu_table_wrap .table-warning>td,.wpacu_table_wrap .table-warning>th{background-color:#fcf8e3}.wpacu_table_wrap .table-hover .table-warning:hover,.wpacu_table_wrap .table-hover .table-warning:hover>td,.wpacu_table_wrap .table-hover .table-warning:hover>th{background-color:#faf2cc}.wpacu_table_wrap .table-danger,.wpacu_table_wrap .table-danger>td,.wpacu_table_wrap .table-danger>th{background-color:#f2dede}.wpacu_table_wrap .table-hover .table-danger:hover,.wpacu_table_wrap .table-hover .table-danger:hover>td,.wpacu_table_wrap .table-hover .table-danger:hover>th{background-color:#ebcccc}.wpacu_table_wrap .thead-inverse th{color:#fff;background-color:#292b2c}.wpacu_table_wrap .thead-default th{color:#464a4c;background-color:#eceeef}.wpacu_table_wrap .table-inverse{color:#fff;background-color:#292b2c}.wpacu_table_wrap .table-inverse td,.wpacu_table_wrap .table-inverse th,.wpacu_table_wrap .table-inverse thead th{border-color:#fff}.wpacu_table_wrap .table-inverse.table-bordered,.wpacu_table_wrap .table-responsive.table-bordered{border:0}.wpacu_table_wrap .table-responsive{display:block;width:100%;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar}
|
1 |
+
.wpacu_update_btn,label.wpacu_add_global{cursor:pointer!important}.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.license-status{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.license-status.inactive{color:#c00}.wpacu-tabs nav ul li span.license-status.active{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:#0085ba;border-bottom:none}.wpacu-tabs-style-topline nav a{padding:20px 10px;background:rgba(40,44,42,.05);color:#74777b;line-height:1;-webkit-transition:color .2s;transition:color .2s;text-decoration:none}.wpacu-tabs-style-topline nav a:focus,.wpacu-tabs-style-topline nav a:hover{color:#0085ba}.wpacu-tabs-style-topline nav li.wpacu-tab-current a{background:0 0;box-shadow:inset 0 3px 0 #0085ba;color:#0085ba}.wpacu-tabs-style-topline nav li.wpacu-tab-current a span:not(.dashicons){font-weight:600}.wpacu-tabs-style-topline nav a span{text-transform:uppercase;font-weight:400}.wpacu-script-attributes-area{margin:20px 0 0!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]{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}body.toplevel_page_wpassetcleanup_settings .notice{padding:10px!important}tr.wpacu_not_load td,tr.wpacu_not_load th{background:#FFE1E1!important}.dashicons-wpacu{width:17px;height:17px;margin:2px 0 0;font-size:16px;text-decoration:none}.wpacu_widefat .check-column.wpacu_check{padding:10px}body[class*=wpassetcleanup] #footer-left{border-left:2px solid green;padding-left:10px}#wpacu_meta_box_content{width:99%}#wpacu_meta_box_content h3{margin-left:0;padding-left:0}#wpacu_meta_box_content div.wpacu_note,#wpacu_wrap_assets div.wpacu_note{padding:10px;background-color:#f5f5f5}#wpacu_meta_box_content .dashicons.dashicons-warning{color:#c00}#wpacu_meta_box_content div.wpacu_warning,#wpacu_wrap_assets div.wpacu_warning{border:1px solid #c00}#wpacu_meta_box_content div.wpacu_verified{padding:10px;background-color:#f5f5f5;border-left:1px solid #ddd}#wpacu_meta_box_content div.wpacu_verified span{color:#0073aa;font-weight:700}#wpacu_meta_box_content ul.wpacu_asset_options{margin:0;padding:0}#wpacu_meta_box_content ul.wpacu_asset_options li{list-style:none;display:inline-block}#wpacu_wrap_assets img,#wpacu_wrap_assets small,.wpacu_asset_row td label{display:inline-block!important}#wpacu_meta_box_content ul.wpacu_asset_options label{font-weight:400;margin-right:5px;margin-top:5px;margin-bottom:5px}#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 small{margin:0!important;letter-spacing:normal!important}#wpacu_wrap_assets input[type=checkbox]{margin-right:4px!important}#wpacu_wrap_assets p{margin:10px 0!important;line-height:22px!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 td{padding:10px!important;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;border-bottom:1px solid #cdcdcd}.wpacu_asset_row td:first-child{border-top:1px solid #cdcdcd}.wpacu_asset_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 td label{margin:0!important;cursor:pointer!important;font-size:100%!important;font-weight:400!important}.wpacu_asset_row td label span{font-size:100%!important}.wpacu_asset_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{color:red!important}label.wpacu_global_checked{font-weight:700;color:#d54e21}label.wpacu_global_unload_exception{font-weight:700!important}label.wpacu_bulk_unload_active{color:#d54e21}tr.wpacu_global_rule_row.selected{background:#e7e7e7}.nav-tab-wrapper{border-bottom:1px solid #ccc;width:95%}ul.wpacu_asset_options{margin:0 10px 0 0;padding:0}ul.wpacu_asset_options li{margin:0 20px 0 0;list-style:none;display:inline-block}ul.wpacu_asset_options li.remove_rule label{font-weight:700}ul.wpacu_asset_options label{margin-right:20px;font-weight:400}ul.wpacu_asset_options label input{margin-right:4px}.wpacu_list_table,.wpacu_list_table div,.wpacu_list_table li,.wpacu_list_table p{font-weight:400}.wpacu_widefat{width:99%;border:1px solid #e5e5e5!important}.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;color:#fff!important;font-size:15px!important;padding:10px 24px!important;text-decoration:none!important;text-shadow:0 1px 0 #154682!important;height:auto!important;line-height:normal!important}.wpacu-btns .btn:focus,.wpacu-btns .btn:hover,.wpacu-btns a{text-decoration:none}.wpacu_update_btn:hover{background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#0061a7),color-stop(1,#007dc1))!important;background:-moz-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-webkit-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-o-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-ms-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:linear-gradient(to bottom,#0061a7 5%,#007dc1 100%)!important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0061a7', endColorstr='#007dc1', GradientType=0)!important;background-color:#0061a7!important}.wpacu_update_btn:active{position:relative!important;top:1px!important}ul.hire-reasons{margin-bottom:20px}ul.hire-reasons li{font-size:14px;line-height:22px;margin-bottom:12px}ul.hire-reasons li .dashicons{font-size:23px;line-height:23px}ul.hire-reasons li .dashicons.dashicons-yes{color:green}ol.getting-started li{font-size:14px;line-height:22px;margin-bottom:8px}.wpacu-get-help-wrap p{font-size:14px}.wpacu-btns .btn{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.5rem 1rem;font-size:1rem;-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;border-radius:0}.wpacu-btns .btn-link,.wpacu-btns .btn-link.active,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:disabled{background-color:transparent}.wpacu-btns .btn-link,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{border-color:transparent}.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{color:#014c8c;text-decoration:underline;background-color:transparent}.wpacu-btns .btn-link:disabled{color:#636c72}.wpacu-btns .btn-link:disabled:focus,.wpacu-btns .btn-link:disabled:hover{text-decoration:none}.wpacu-btns .btn-group-lg>.btn,.wpacu-btns .btn-lg{padding:.75rem 1.5rem;font-size:1.25rem;border-radius:.3rem}.wpacu-btns .btn-group-sm>.btn,.wpacu-btns .btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.wpacu-btns .btn-block{display:block;width:100%}.go-pro-button,.go-pro-link-no-style,.wordpress-core-file{display:inline-block;text-decoration:none}.wpacu-btns .btn-block+.btn-block{margin-top:.5rem}.wpacu-btns input[type=submit].btn-block,.wpacu-btns input[type=reset].btn-block,.wpacu-btns input[type=button].btn-block{width:100%}.wpacu-btns .fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.go-pro-button{background-color:#4CAF50;border:2px solid #4CAF50;color:#fff;padding:12px 18px;text-align:center;font-size:16px;margin:4px 2px;cursor:pointer;border-radius:10px;-webkit-transition-duration:.4s;transition-duration:.4s}.go-pro-button:hover{background-color:#fff;color:#000;border:2px solid #4CAF50}.go-pro-link-no-style .tooltip,.wordpress-core-file .tooltip{font-size:14px;line-height:18px;z-index:1;text-align:center;padding:6px;border-radius:6px;bottom:100%;left:50%}.go-pro-link-no-style{position:relative;color:inherit}.go-pro-link-no-style:not(.nav-tab){font-style:italic}.go-pro-link-no-style .tooltip{position:absolute;visibility:hidden;width:130px;background-color:#27ae60;color:#fff;margin-left:-65px}.go-pro-link-no-style .tooltip.wpacu-larger{width:240px}.go-pro-link-no-style:hover .tooltip{visibility:visible}.wordpress-core-file{position:relative;font-style:normal;color:inherit}.wordpress-core-file .tooltip{position:absolute;visibility:hidden;width:160px;background-color:#c00;color:#fff;margin-left:-80px}.wordpress-core-file:hover .tooltip{visibility:visible}body.wp-admin .go-pro-link-no-style .tooltip{font-size:12px;line-height:16px;padding:5px}.pro-page-unlock-notice{border-radius:10px;padding:10px;background:#f2faf2;border:1px solid #c0e8c0;width:auto;display:block}.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;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}.ajax-direct-call-error-area{background:#fff;padding:10px;border:1px solid #c00;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;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}.toplevel_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle{margin-top:2px;line-height:1.2}.toplevel_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle em{font-weight:200}.toplevel_page_wpassetcleanup_settings .setting_title p.wpacu_read_more{margin-top:-10px;font-style:italic;font-size:12px}.toplevel_page_wpassetcleanup_settings .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px}.toplevel_page_wpassetcleanup_settings .wpacu_switch.wpacu_locked_for_pro{opacity:.3}.toplevel_page_wpassetcleanup_settings .wpacu_switch input{display:none}.toplevel_page_wpassetcleanup_settings .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.2s;transition:.2s}.toplevel_page_wpassetcleanup_settings .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.2s;transition:.2s}.toplevel_page_wpassetcleanup_settings input:checked+.wpacu_slider{background-color:#52af00}.toplevel_page_wpassetcleanup_settings input:focus+.wpacu_slider{box-shadow:0 0 1px #52af00}.toplevel_page_wpassetcleanup_settings input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.toplevel_page_wpassetcleanup_settings .wpacu_slider.wpacu_round{border-radius:29px}.toplevel_page_wpassetcleanup_settings .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu_asset_row td{width:100%}.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_asset_row .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px;margin-right:5px!important}.wpacu_asset_row .wpacu_switch input{display:none}.wpacu_asset_row .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.2s;transition:.2s}.wpacu_asset_row .wpacu_slider:before{position:absolute;content:'';height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.2s;transition:.2s}.wpacu_asset_row .wpacu_slider_text{position:absolute;left:62px;top:3px}.wpacu_asset_row input:checked+.wpacu_slider{background-color:#C00}.wpacu_asset_row input:focus+.wpacu_slider{box-shadow:0 0 1px #C00}.wpacu_asset_row input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu_asset_row .wpacu_slider.wpacu_round{border-radius:29px}.wpacu_asset_row .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu_table_wrap{margin:20px 0 0}.wpacu_table_wrap>table{border:1px solid #cdcdcd}.wpacu_table_wrap .table{width:100%;max-width:100%;margin-bottom:1rem;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu_table_wrap .table td,.wpacu_table_wrap .table th{padding:.75rem;vertical-align:top;border-top:1px solid #eceeef}.wpacu_table_wrap .table thead th{vertical-align:bottom;border-bottom:2px solid #eceeef}.wpacu_table_wrap .table tbody+tbody{border-top:2px solid #eceeef}.wpacu_table_wrap .table .table{background-color:#fff}.wpacu_table_wrap .table-sm td,.wpacu_table_wrap .table-sm th{padding:.3rem}.wpacu_table_wrap .table-bordered,.wpacu_table_wrap .table-bordered td,.wpacu_table_wrap .table-bordered th{border:1px solid #eceeef}.wpacu_table_wrap .table-bordered thead td,.wpacu_table_wrap .table-bordered thead th{border-bottom-width:2px}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(even){background-color:#f9f9f9}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(odd){background-color:#fff}.wpacu_table_wrap .table-active,.wpacu_table_wrap .table-active>td,.wpacu_table_wrap .table-active>th,.wpacu_table_wrap .table-hover .table-active:hover,.wpacu_table_wrap .table-hover .table-active:hover>td,.wpacu_table_wrap .table-hover .table-active:hover>th,.wpacu_table_wrap .table-hover tbody tr:hover{background-color:rgba(0,0,0,.075)}.wpacu_table_wrap .table-success,.wpacu_table_wrap .table-success>td,.wpacu_table_wrap .table-success>th{background-color:#dff0d8}.wpacu_table_wrap .table-hover .table-success:hover,.wpacu_table_wrap .table-hover .table-success:hover>td,.wpacu_table_wrap .table-hover .table-success:hover>th{background-color:#d0e9c6}.wpacu_table_wrap .table-info,.wpacu_table_wrap .table-info>td,.wpacu_table_wrap .table-info>th{background-color:#d9edf7}.wpacu_table_wrap .table-hover .table-info:hover,.wpacu_table_wrap .table-hover .table-info:hover>td,.wpacu_table_wrap .table-hover .table-info:hover>th{background-color:#c4e3f3}.wpacu_table_wrap .table-warning,.wpacu_table_wrap .table-warning>td,.wpacu_table_wrap .table-warning>th{background-color:#fcf8e3}.wpacu_table_wrap .table-hover .table-warning:hover,.wpacu_table_wrap .table-hover .table-warning:hover>td,.wpacu_table_wrap .table-hover .table-warning:hover>th{background-color:#faf2cc}.wpacu_table_wrap .table-danger,.wpacu_table_wrap .table-danger>td,.wpacu_table_wrap .table-danger>th{background-color:#f2dede}.wpacu_table_wrap .table-hover .table-danger:hover,.wpacu_table_wrap .table-hover .table-danger:hover>td,.wpacu_table_wrap .table-hover .table-danger:hover>th{background-color:#ebcccc}.wpacu_table_wrap .thead-inverse th{color:#fff;background-color:#292b2c}.wpacu_table_wrap .thead-default th{color:#464a4c;background-color:#eceeef}.wpacu_table_wrap .table-inverse{color:#fff;background-color:#292b2c}.wpacu_table_wrap .table-inverse td,.wpacu_table_wrap .table-inverse th,.wpacu_table_wrap .table-inverse thead th{border-color:#fff}.wpacu_table_wrap .table-inverse.table-bordered,.wpacu_table_wrap .table-responsive.table-bordered{border:0}.wpacu_table_wrap .table-responsive{display:block;width:100%;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar}
|
classes/AdminBar.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace WpAssetCleanUp;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class AdminBar
|
6 |
+
* @package WpAssetCleanUp
|
7 |
+
*/
|
8 |
+
class AdminBar
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
*
|
12 |
+
*/
|
13 |
+
public function __construct()
|
14 |
+
{
|
15 |
+
add_action( 'plugins_loaded', array( $this, 'topBar' ) );
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
*
|
20 |
+
*/
|
21 |
+
public function topBar()
|
22 |
+
{
|
23 |
+
if (Menu::userCanManageAssets()) {
|
24 |
+
add_action( 'admin_bar_menu', array( $this, 'topBarInfo' ), 999 );
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @param $wp_admin_bar
|
30 |
+
*/
|
31 |
+
public function topBarInfo($wp_admin_bar)
|
32 |
+
{
|
33 |
+
if (Main::instance()->settings['test_mode']) {
|
34 |
+
$wp_admin_bar->add_menu(array(
|
35 |
+
'id' => 'wpacu-test-mode',
|
36 |
+
'title' => WPACU_PLUGIN_TITLE.': <span class="dashicons dashicons-admin-tools"></span> <strong>TEST MODE</strong> is <strong>ENABLED SITE-WIDE</strong>',
|
37 |
+
'href' => admin_url('admin.php?page=' . WPACU_PLUGIN_NAME . '_settings')
|
38 |
+
));
|
39 |
+
|
40 |
+
$wp_admin_bar->add_menu(array(
|
41 |
+
'parent' => 'wpacu-test-mode',
|
42 |
+
'id' => 'wpacu-test-mode-info',
|
43 |
+
'title' => 'With "Test Mode" active, any settings will be applied only for your view.',
|
44 |
+
));
|
45 |
+
|
46 |
+
$wp_admin_bar->add_menu(array(
|
47 |
+
'parent' => 'wpacu-test-mode',
|
48 |
+
'id' => 'wpacu-test-mode-info-2',
|
49 |
+
'title' => 'The visitors will view the website as if the plugin is disabled. <a target="_blank" style="display:inline-block; text-decoration: underline; padding-left: 5px;" href="https://assetcleanup.com/docs/">Read more</a>',
|
50 |
+
));
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
classes/BulkUnloads.php
CHANGED
@@ -28,13 +28,8 @@ class BulkUnloads
|
|
28 |
*/
|
29 |
public function __construct()
|
30 |
{
|
31 |
-
$this->wpacuFor
|
32 |
-
|
33 |
-
: $this->wpacuFor;
|
34 |
-
|
35 |
-
$this->wpacuPostType = isset($_REQUEST['wpacu_post_type'])
|
36 |
-
? $_REQUEST['wpacu_post_type']
|
37 |
-
: $this->wpacuPostType;
|
38 |
|
39 |
if (isset($_REQUEST['wpacu_update']) && $_REQUEST['wpacu_update'] == 1) {
|
40 |
$this->update();
|
@@ -107,7 +102,7 @@ class BulkUnloads
|
|
107 |
$removed = $wpacuUpdate->removeEverywhereUnloads(array(), array(), 'post');
|
108 |
|
109 |
if ($removed) {
|
110 |
-
add_action('
|
111 |
}
|
112 |
}
|
113 |
|
@@ -115,7 +110,7 @@ class BulkUnloads
|
|
115 |
$removed = $wpacuUpdate->removeBulkUnloads($this->wpacuPostType);
|
116 |
|
117 |
if ($removed) {
|
118 |
-
add_action('
|
119 |
}
|
120 |
}
|
121 |
}
|
@@ -126,8 +121,8 @@ class BulkUnloads
|
|
126 |
public function noticeGlobalsRemoved()
|
127 |
{
|
128 |
?>
|
129 |
-
<div class="updated notice is-dismissible">
|
130 |
-
<p>The selected styles/scripts were removed from the global unload list and they will now load in the pages/posts,
|
131 |
unless you have other rules that would prevent them from loading.</p>
|
132 |
</div>
|
133 |
<?php
|
@@ -139,8 +134,8 @@ class BulkUnloads
|
|
139 |
public function noticePostTypesRemoved()
|
140 |
{
|
141 |
?>
|
142 |
-
<div class="updated notice is-dismissible">
|
143 |
-
<p>The selected styles/scripts were removed from the unload list for <strong><u><?php echo $this->wpacuPostType; ?></u></strong>
|
144 |
post type and they will now load in the pages/posts, unless you have other rules that would prevent them from loading.</p>
|
145 |
</div>
|
146 |
<?php
|
28 |
*/
|
29 |
public function __construct()
|
30 |
{
|
31 |
+
$this->wpacuFor = Misc::getVar('request', 'wpacu_for', $this->wpacuFor);
|
32 |
+
$this->wpacuPostType = Misc::getVar('request', 'wpacu_post_type', $this->wpacuPostType);
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
if (isset($_REQUEST['wpacu_update']) && $_REQUEST['wpacu_update'] == 1) {
|
35 |
$this->update();
|
102 |
$removed = $wpacuUpdate->removeEverywhereUnloads(array(), array(), 'post');
|
103 |
|
104 |
if ($removed) {
|
105 |
+
add_action('wpacu_admin_notices', array($this, 'noticeGlobalsRemoved'));
|
106 |
}
|
107 |
}
|
108 |
|
110 |
$removed = $wpacuUpdate->removeBulkUnloads($this->wpacuPostType);
|
111 |
|
112 |
if ($removed) {
|
113 |
+
add_action('wpacu_admin_notices', array($this, 'noticePostTypesRemoved'));
|
114 |
}
|
115 |
}
|
116 |
}
|
121 |
public function noticeGlobalsRemoved()
|
122 |
{
|
123 |
?>
|
124 |
+
<div class="updated notice wpacu-notice is-dismissible">
|
125 |
+
<p><span class="dashicons dashicons-yes"></span> The selected styles/scripts were removed from the global unload list and they will now load in the pages/posts,
|
126 |
unless you have other rules that would prevent them from loading.</p>
|
127 |
</div>
|
128 |
<?php
|
134 |
public function noticePostTypesRemoved()
|
135 |
{
|
136 |
?>
|
137 |
+
<div class="updated notice wpacu-notice is-dismissible">
|
138 |
+
<p><span class="dashicons dashicons-yes"></span> The selected styles/scripts were removed from the unload list for <strong><u><?php echo $this->wpacuPostType; ?></u></strong>
|
139 |
post type and they will now load in the pages/posts, unless you have other rules that would prevent them from loading.</p>
|
140 |
</div>
|
141 |
<?php
|
classes/HomePage.php
CHANGED
@@ -17,10 +17,10 @@ class HomePage
|
|
17 |
*/
|
18 |
public function __construct()
|
19 |
{
|
20 |
-
$this->data['nonce_name']
|
21 |
$this->data['show_on_front'] = Misc::getShowOnFront();
|
22 |
|
23 |
-
$isHomePageEdit = (
|
24 |
|
25 |
// Only continue if we are on the plugin's homepage edit mode
|
26 |
if (! $isHomePageEdit) {
|
@@ -57,12 +57,11 @@ class HomePage
|
|
57 |
*/
|
58 |
public function page()
|
59 |
{
|
60 |
-
$wpacuNoLoadAssets =
|
61 |
-
? $_POST[WPACU_PLUGIN_NAME] : array();
|
62 |
|
63 |
-
$noncePost =
|
64 |
-
|
65 |
-
|
66 |
if (is_array($wpacuNoLoadAssets) && wp_verify_nonce($noncePost, $this->data['nonce_name'])) {
|
67 |
$wpacuUpdate = new Update;
|
68 |
$wpacuUpdate->updateFrontPage($wpacuNoLoadAssets);
|
17 |
*/
|
18 |
public function __construct()
|
19 |
{
|
20 |
+
$this->data['nonce_name'] = WPACU_PLUGIN_NAME.'_settings';
|
21 |
$this->data['show_on_front'] = Misc::getShowOnFront();
|
22 |
|
23 |
+
$isHomePageEdit = (Misc::getVar('get', 'page') === WPACU_PLUGIN_NAME.'_home_page');
|
24 |
|
25 |
// Only continue if we are on the plugin's homepage edit mode
|
26 |
if (! $isHomePageEdit) {
|
57 |
*/
|
58 |
public function page()
|
59 |
{
|
60 |
+
$wpacuNoLoadAssets = Misc::getVar('post', WPACU_PLUGIN_NAME, array());
|
|
|
61 |
|
62 |
+
$noncePost = Misc::getVar('post', $this->data['nonce_name']);
|
63 |
+
|
64 |
+
// Could Be an Empty Array as Well so just is_array() is enough to use
|
65 |
if (is_array($wpacuNoLoadAssets) && wp_verify_nonce($noncePost, $this->data['nonce_name'])) {
|
66 |
$wpacuUpdate = new Update;
|
67 |
$wpacuUpdate->updateFrontPage($wpacuNoLoadAssets);
|
classes/Main.php
CHANGED
@@ -51,11 +51,6 @@ class Main
|
|
51 |
public $isUpdateable = true;
|
52 |
// [/wpacu_lite]
|
53 |
|
54 |
-
/**
|
55 |
-
* @var bool
|
56 |
-
*/
|
57 |
-
public $isWooCommerceShopPage = false;
|
58 |
-
|
59 |
/**
|
60 |
* @var int
|
61 |
*/
|
@@ -69,28 +64,13 @@ class Main
|
|
69 |
/**
|
70 |
* @var array
|
71 |
*/
|
72 |
-
public $vars = array();
|
73 |
-
|
74 |
-
/**
|
75 |
-
* @var bool|mixed|void
|
76 |
-
*/
|
77 |
-
public $frontendShow = false;
|
78 |
-
|
79 |
-
/**
|
80 |
-
* @var bool
|
81 |
-
*/
|
82 |
-
public $dashboardShow = false;
|
83 |
|
84 |
/**
|
85 |
* @var bool
|
86 |
*/
|
87 |
public $isFrontendView = false;
|
88 |
|
89 |
-
/**
|
90 |
-
* @var bool|mixed
|
91 |
-
*/
|
92 |
-
public $disableEmojis = false;
|
93 |
-
|
94 |
/**
|
95 |
* @var array
|
96 |
*/
|
@@ -153,17 +133,6 @@ class Main
|
|
153 |
*/
|
154 |
public function __construct()
|
155 |
{
|
156 |
-
$wpacuSettingsClass = new Settings();
|
157 |
-
$this->settings = $wpacuSettingsClass->getAll();
|
158 |
-
|
159 |
-
$this->frontendShow = $this->settings['frontend_show'];
|
160 |
-
$this->dashboardShow = $this->settings['dashboard_show'];
|
161 |
-
$this->disableEmojis = $this->settings['disable_emojis'];
|
162 |
-
|
163 |
-
if ($this->dashboardShow && $this->settings['dom_get_type'] !== '') {
|
164 |
-
self::$domGetType = $this->settings['dom_get_type'];
|
165 |
-
}
|
166 |
-
|
167 |
if (array_key_exists(WPACU_LOAD_ASSETS_REQ_KEY, $_REQUEST)) {
|
168 |
add_filter('w3tc_minify_enable', '__return_false');
|
169 |
}
|
@@ -180,47 +149,27 @@ class Main
|
|
180 |
Misc::noAdminBarLoad();
|
181 |
}
|
182 |
|
183 |
-
//
|
184 |
-
|
185 |
-
|
186 |
-
Misc::noAdminBarLoad();
|
187 |
-
}
|
188 |
-
|
189 |
-
add_action('wp_head', array($this, 'saveFooterAssets'), 100000000);
|
190 |
-
add_action('wp_footer', array($this, 'printScriptsStyles'), PHP_INT_MAX);
|
191 |
-
}
|
192 |
|
193 |
// Front-end View - Unload the assets
|
194 |
-
|
195 |
-
|
196 |
-
add_action('wp_print_styles', array($this, 'filterStyles'), 100000);
|
197 |
-
|
198 |
-
// Unload Scripts - HEAD
|
199 |
-
add_action('wp_print_scripts', array($this, 'filterScripts'), 100000);
|
200 |
-
|
201 |
-
// Unload Scripts & Styles - FOOTER
|
202 |
-
// Needs to be triggered very soon as some old plugins/themes use wp_footer() to enqueue scripts
|
203 |
-
// Sometimes styles are loaded in the BODY section of the page
|
204 |
-
add_action('wp_print_footer_scripts', array($this, 'filterScripts'), 1);
|
205 |
-
add_action('wp_print_footer_scripts', array($this, 'filterStyles'), 1);
|
206 |
-
}
|
207 |
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
// Send an AJAX request to get the list of loaded scripts and styles and print it nicely
|
212 |
-
add_action(
|
213 |
-
'wp_ajax_'. WPACU_PLUGIN_NAME . '_get_loaded_assets',
|
214 |
-
array($this, 'ajaxGetJsonListCallback')
|
215 |
-
);
|
216 |
|
217 |
-
|
218 |
-
|
219 |
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
224 |
|
225 |
// [wpacu_lite]
|
226 |
if ( ! (defined('WPACU_PRO_HIDE_HTML_USAGE_COMMENT') && WPACU_PRO_HIDE_HTML_USAGE_COMMENT) ) {
|
@@ -229,12 +178,53 @@ class Main
|
|
229 |
// [/wpacu_lite]
|
230 |
}
|
231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
/**
|
|
|
|
|
233 |
* Priority: 8 (earliest)
|
234 |
*/
|
235 |
public function setVarsBeforeUpdate()
|
236 |
{
|
237 |
-
$this->isFrontendView = ($this->
|
238 |
&& !isset($_REQUEST[WPACU_LOAD_ASSETS_REQ_KEY])
|
239 |
&& !is_admin());
|
240 |
|
@@ -303,7 +293,7 @@ class Main
|
|
303 |
{
|
304 |
global $post;
|
305 |
|
306 |
-
|
307 |
return;
|
308 |
}
|
309 |
|
@@ -382,13 +372,11 @@ class Main
|
|
382 |
}
|
383 |
}
|
384 |
}
|
385 |
-
|
386 |
-
$list = array_unique($list);
|
387 |
// [wpacu_lite]
|
388 |
}
|
389 |
// [/wpacu_lite]
|
390 |
|
391 |
-
$list = apply_filters('wpacu_filter_scripts', $list);
|
392 |
|
393 |
// Let's see if there are load exceptions for this page
|
394 |
if (! empty($list) && ! empty($this->loadExceptions['scripts'])) {
|
@@ -430,6 +418,11 @@ class Main
|
|
430 |
return;
|
431 |
}
|
432 |
|
|
|
|
|
|
|
|
|
|
|
433 |
foreach ($list as $handle) {
|
434 |
$handle = trim($handle);
|
435 |
|
@@ -502,15 +495,13 @@ class Main
|
|
502 |
}
|
503 |
}
|
504 |
}
|
505 |
-
|
506 |
-
$list = array_unique($list);
|
507 |
// [wpacu_lite]
|
508 |
}
|
509 |
// [/wpacu_lite]
|
510 |
|
511 |
// Any bulk unloaded styles for 'category', 'post_tag' and more?
|
512 |
// If the premium extension is enabled, any of the unloaded CSS will be added to the list
|
513 |
-
$list = apply_filters('wpacu_filter_styles', $list);
|
514 |
|
515 |
// Let's see if there are load exceptions for this page
|
516 |
if (! empty($list) && ! empty($this->loadExceptions['styles'])) {
|
@@ -548,6 +539,11 @@ class Main
|
|
548 |
}
|
549 |
}
|
550 |
|
|
|
|
|
|
|
|
|
|
|
551 |
if (empty($list)) {
|
552 |
return;
|
553 |
}
|
@@ -597,7 +593,7 @@ class Main
|
|
597 |
$exceptionsListJson = get_option(
|
598 |
WPACU_PLUGIN_NAME . '_front_page_load_exceptions'
|
599 |
);
|
600 |
-
} elseif (
|
601 |
// [wpacu_pro]
|
602 |
if (class_exists( '\\WpAssetCleanUpPro\\LoadExceptions' )) {
|
603 |
$ExceptionsPro = new \WpAssetCleanUpPro\LoadExceptions();
|
@@ -609,7 +605,7 @@ class Main
|
|
609 |
if ($exceptionsListJson) {
|
610 |
$exceptionsList = json_decode($exceptionsListJson, true);
|
611 |
|
612 |
-
if (json_last_error()
|
613 |
$exceptionsList = $exceptionsListDefault;
|
614 |
}
|
615 |
}
|
@@ -695,7 +691,7 @@ class Main
|
|
695 |
public function printScriptsStyles()
|
696 |
{
|
697 |
// Not for WordPress AJAX calls
|
698 |
-
if (
|
699 |
return;
|
700 |
}
|
701 |
|
@@ -922,7 +918,7 @@ class Main
|
|
922 |
if ($isFrontEndView) {
|
923 |
$data = array(
|
924 |
'is_updateable' => true,
|
925 |
-
'post_type'
|
926 |
'bulk_unloaded' => array('post_type' => array())
|
927 |
);
|
928 |
|
@@ -932,18 +928,18 @@ class Main
|
|
932 |
$data['current'] = $currentUnloaded;
|
933 |
|
934 |
$data['all']['scripts'] = $list['scripts'];
|
935 |
-
$data['all']['styles']
|
936 |
|
937 |
-
$this->fetchUrl
|
938 |
|
939 |
-
$data['fetch_url']
|
940 |
|
941 |
-
$data['nonce_name']
|
942 |
-
$data['nonce_action']
|
943 |
|
944 |
$data = $this->alterAssetObj($data);
|
945 |
|
946 |
-
$data['global_unload']
|
947 |
|
948 |
if (Misc::isHomePage()) {
|
949 |
$type = 'front_page';
|
@@ -963,7 +959,8 @@ class Main
|
|
963 |
}
|
964 |
// [/wpacu_lite]
|
965 |
|
966 |
-
|
|
|
967 |
|
968 |
$data['is_bulk_unloadable'] = $data['bulk_unloaded_type'] = false;
|
969 |
|
@@ -1092,7 +1089,7 @@ class Main
|
|
1092 |
$data['all'] = (array)json_decode($json);
|
1093 |
|
1094 |
// This value is needed to determine the location of an asset (HEAD OR BODY)
|
1095 |
-
if ($contents
|
1096 |
$data['contents'] = base64_decode($contents);
|
1097 |
}
|
1098 |
|
@@ -1334,7 +1331,7 @@ class Main
|
|
1334 |
*/
|
1335 |
public function isSingularPage()
|
1336 |
{
|
1337 |
-
return ($this->
|
1338 |
}
|
1339 |
|
1340 |
/**
|
@@ -1356,7 +1353,7 @@ class Main
|
|
1356 |
$this->currentPostId = $wooCommerceShopPageId;
|
1357 |
|
1358 |
if ($this->currentPostId > 0) {
|
1359 |
-
$this->
|
1360 |
}
|
1361 |
} else {
|
1362 |
if ($wooCommerceShopPageId > 0 && Misc::isHomePage()) {
|
@@ -1483,6 +1480,10 @@ class Main
|
|
1483 |
*/
|
1484 |
public function doDisableEmojis()
|
1485 |
{
|
|
|
|
|
|
|
|
|
1486 |
// Emojis Actions and Filters
|
1487 |
remove_action('admin_print_styles', 'print_emoji_styles');
|
1488 |
remove_action('wp_head', 'print_emoji_detection_script', 7);
|
@@ -1495,6 +1496,8 @@ class Main
|
|
1495 |
|
1496 |
// TinyMCE Emojis
|
1497 |
add_filter('tiny_mce_plugins', array($this, 'removeEmojisTinymce'));
|
|
|
|
|
1498 |
}
|
1499 |
|
1500 |
/**
|
@@ -1537,7 +1540,7 @@ class Main
|
|
1537 |
} else {
|
1538 |
$existingList = json_decode($existingListJson, true);
|
1539 |
|
1540 |
-
if (json_last_error()
|
1541 |
$validJson = false;
|
1542 |
$existingList = $existingListEmpty;
|
1543 |
}
|
@@ -1550,6 +1553,28 @@ class Main
|
|
1550 |
);
|
1551 |
}
|
1552 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1553 |
// [wpacu_pro]
|
1554 |
/**
|
1555 |
* @return bool
|
51 |
public $isUpdateable = true;
|
52 |
// [/wpacu_lite]
|
53 |
|
|
|
|
|
|
|
|
|
|
|
54 |
/**
|
55 |
* @var int
|
56 |
*/
|
64 |
/**
|
65 |
* @var array
|
66 |
*/
|
67 |
+
public $vars = array('woo_url_not_match' => false, 'is_woo_shop_page' => false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
/**
|
70 |
* @var bool
|
71 |
*/
|
72 |
public $isFrontendView = false;
|
73 |
|
|
|
|
|
|
|
|
|
|
|
74 |
/**
|
75 |
* @var array
|
76 |
*/
|
133 |
*/
|
134 |
public function __construct()
|
135 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
if (array_key_exists(WPACU_LOAD_ASSETS_REQ_KEY, $_REQUEST)) {
|
137 |
add_filter('w3tc_minify_enable', '__return_false');
|
138 |
}
|
149 |
Misc::noAdminBarLoad();
|
150 |
}
|
151 |
|
152 |
+
// This is triggered AFTER "saveSettings" from 'Settings' class
|
153 |
+
// In case the settings were just updated, the script will get the latest values
|
154 |
+
add_action('plugins_loaded', array($this, 'initAfterPluginsLoaded'), 10);
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
// Front-end View - Unload the assets
|
157 |
+
// If there are reasons to prevent the unloading in case 'test mode' is enabled,
|
158 |
+
// then the prevention will trigger within filterStyles() and filterScripts()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
+
if (! isset($_REQUEST[WPACU_LOAD_ASSETS_REQ_KEY])) { // AJAX call? Do not trigger the code below
|
161 |
+
// Unload Styles - HEAD
|
162 |
+
add_action( 'wp_print_styles', array( $this, 'filterStyles' ), 100000 );
|
|
|
|
|
|
|
|
|
|
|
163 |
|
164 |
+
// Unload Scripts - HEAD
|
165 |
+
add_action( 'wp_print_scripts', array( $this, 'filterScripts' ), 100000 );
|
166 |
|
167 |
+
// Unload Scripts & Styles - FOOTER
|
168 |
+
// Needs to be triggered very soon as some old plugins/themes use wp_footer() to enqueue scripts
|
169 |
+
// Sometimes styles are loaded in the BODY section of the page
|
170 |
+
add_action( 'wp_print_footer_scripts', array( $this, 'filterScripts' ), 1 );
|
171 |
+
add_action( 'wp_print_footer_scripts', array( $this, 'filterStyles' ), 1 );
|
172 |
+
}
|
173 |
|
174 |
// [wpacu_lite]
|
175 |
if ( ! (defined('WPACU_PRO_HIDE_HTML_USAGE_COMMENT') && WPACU_PRO_HIDE_HTML_USAGE_COMMENT) ) {
|
178 |
// [/wpacu_lite]
|
179 |
}
|
180 |
|
181 |
+
/**
|
182 |
+
*
|
183 |
+
*/
|
184 |
+
public function initAfterPluginsLoaded()
|
185 |
+
{
|
186 |
+
$wpacuSettingsClass = new Settings();
|
187 |
+
$this->settings = $wpacuSettingsClass->getAll();
|
188 |
+
|
189 |
+
if ($this->settings['dashboard_show'] && $this->settings['dom_get_type']) {
|
190 |
+
self::$domGetType = $this->settings['dom_get_type'];
|
191 |
+
}
|
192 |
+
|
193 |
+
// Fetch the page in the background to see what scripts/styles are already loading
|
194 |
+
if (isset($_REQUEST[WPACU_LOAD_ASSETS_REQ_KEY]) || $this->settings['frontend_show']) {
|
195 |
+
if (isset($_REQUEST[WPACU_LOAD_ASSETS_REQ_KEY])) {
|
196 |
+
Misc::noAdminBarLoad();
|
197 |
+
}
|
198 |
+
|
199 |
+
add_action('wp_head', array($this, 'saveFooterAssets'), 100000000);
|
200 |
+
add_action('wp_footer', array($this, 'printScriptsStyles'), PHP_INT_MAX);
|
201 |
+
}
|
202 |
+
|
203 |
+
// Do not load the meta box nor do any AJAX calls
|
204 |
+
// if the asset management is not enabled for the Dashboard
|
205 |
+
if ( $this->settings['dashboard_show'] == 1 ) {
|
206 |
+
// Send an AJAX request to get the list of loaded scripts and styles and print it nicely
|
207 |
+
add_action(
|
208 |
+
'wp_ajax_' . WPACU_PLUGIN_NAME . '_get_loaded_assets',
|
209 |
+
array( $this, 'ajaxGetJsonListCallback' )
|
210 |
+
);
|
211 |
+
|
212 |
+
add_action( 'add_meta_boxes', array( $this, 'addMetaBox' ) );
|
213 |
+
}
|
214 |
+
|
215 |
+
if ($this->settings['disable_emojis'] == 1) {
|
216 |
+
add_action('init', array($this, 'doDisableEmojis'));
|
217 |
+
}
|
218 |
+
}
|
219 |
+
|
220 |
/**
|
221 |
+
* This has to be triggered after 'plugins_loaded' (e.g. in 'wp')
|
222 |
+
*
|
223 |
* Priority: 8 (earliest)
|
224 |
*/
|
225 |
public function setVarsBeforeUpdate()
|
226 |
{
|
227 |
+
$this->isFrontendView = ($this->settings['frontend_show'] && Menu::userCanManageAssets()
|
228 |
&& !isset($_REQUEST[WPACU_LOAD_ASSETS_REQ_KEY])
|
229 |
&& !is_admin());
|
230 |
|
293 |
{
|
294 |
global $post;
|
295 |
|
296 |
+
if ($post->ID === null) {
|
297 |
return;
|
298 |
}
|
299 |
|
372 |
}
|
373 |
}
|
374 |
}
|
|
|
|
|
375 |
// [wpacu_lite]
|
376 |
}
|
377 |
// [/wpacu_lite]
|
378 |
|
379 |
+
$list = apply_filters('wpacu_filter_scripts', array_unique($list));
|
380 |
|
381 |
// Let's see if there are load exceptions for this page
|
382 |
if (! empty($list) && ! empty($this->loadExceptions['scripts'])) {
|
418 |
return;
|
419 |
}
|
420 |
|
421 |
+
// e.g. for test mode or AJAX calls (where all assets have to load)
|
422 |
+
if ($this->preventUnloadAssets() === true) {
|
423 |
+
return;
|
424 |
+
}
|
425 |
+
|
426 |
foreach ($list as $handle) {
|
427 |
$handle = trim($handle);
|
428 |
|
495 |
}
|
496 |
}
|
497 |
}
|
|
|
|
|
498 |
// [wpacu_lite]
|
499 |
}
|
500 |
// [/wpacu_lite]
|
501 |
|
502 |
// Any bulk unloaded styles for 'category', 'post_tag' and more?
|
503 |
// If the premium extension is enabled, any of the unloaded CSS will be added to the list
|
504 |
+
$list = apply_filters('wpacu_filter_styles', array_unique($list));
|
505 |
|
506 |
// Let's see if there are load exceptions for this page
|
507 |
if (! empty($list) && ! empty($this->loadExceptions['styles'])) {
|
539 |
}
|
540 |
}
|
541 |
|
542 |
+
// e.g. for test mode or AJAX calls (where all assets have to load)
|
543 |
+
if ($this->preventUnloadAssets() === true) {
|
544 |
+
return;
|
545 |
+
}
|
546 |
+
|
547 |
if (empty($list)) {
|
548 |
return;
|
549 |
}
|
593 |
$exceptionsListJson = get_option(
|
594 |
WPACU_PLUGIN_NAME . '_front_page_load_exceptions'
|
595 |
);
|
596 |
+
} elseif ($type === 'for_pro' && Main::wpacuProEnabled()) {
|
597 |
// [wpacu_pro]
|
598 |
if (class_exists( '\\WpAssetCleanUpPro\\LoadExceptions' )) {
|
599 |
$ExceptionsPro = new \WpAssetCleanUpPro\LoadExceptions();
|
605 |
if ($exceptionsListJson) {
|
606 |
$exceptionsList = json_decode($exceptionsListJson, true);
|
607 |
|
608 |
+
if (json_last_error() !== JSON_ERROR_NONE) {
|
609 |
$exceptionsList = $exceptionsListDefault;
|
610 |
}
|
611 |
}
|
691 |
public function printScriptsStyles()
|
692 |
{
|
693 |
// Not for WordPress AJAX calls
|
694 |
+
if (self::$domGetType === 'direct' && defined('DOING_AJAX') && DOING_AJAX) {
|
695 |
return;
|
696 |
}
|
697 |
|
918 |
if ($isFrontEndView) {
|
919 |
$data = array(
|
920 |
'is_updateable' => true,
|
921 |
+
'post_type' => '',
|
922 |
'bulk_unloaded' => array('post_type' => array())
|
923 |
);
|
924 |
|
928 |
$data['current'] = $currentUnloaded;
|
929 |
|
930 |
$data['all']['scripts'] = $list['scripts'];
|
931 |
+
$data['all']['styles'] = $list['styles'];
|
932 |
|
933 |
+
$this->fetchUrl = Misc::getPageUrl($this->getCurrentPostId());
|
934 |
|
935 |
+
$data['fetch_url'] = $this->fetchUrl;
|
936 |
|
937 |
+
$data['nonce_name'] = Update::NONCE_FIELD_NAME;
|
938 |
+
$data['nonce_action'] = Update::NONCE_ACTION_NAME;
|
939 |
|
940 |
$data = $this->alterAssetObj($data);
|
941 |
|
942 |
+
$data['global_unload'] = $this->globalUnloaded;
|
943 |
|
944 |
if (Misc::isHomePage()) {
|
945 |
$type = 'front_page';
|
959 |
}
|
960 |
// [/wpacu_lite]
|
961 |
|
962 |
+
// WooCommerce Shop Page?
|
963 |
+
$data['is_woo_shop_page'] = $this->vars['is_woo_shop_page'];
|
964 |
|
965 |
$data['is_bulk_unloadable'] = $data['bulk_unloaded_type'] = false;
|
966 |
|
1089 |
$data['all'] = (array)json_decode($json);
|
1090 |
|
1091 |
// This value is needed to determine the location of an asset (HEAD OR BODY)
|
1092 |
+
if ($contents !== '') {
|
1093 |
$data['contents'] = base64_decode($contents);
|
1094 |
}
|
1095 |
|
1331 |
*/
|
1332 |
public function isSingularPage()
|
1333 |
{
|
1334 |
+
return ($this->vars['is_woo_shop_page'] || is_singular());
|
1335 |
}
|
1336 |
|
1337 |
/**
|
1353 |
$this->currentPostId = $wooCommerceShopPageId;
|
1354 |
|
1355 |
if ($this->currentPostId > 0) {
|
1356 |
+
$this->vars['is_woo_shop_page'] = true;
|
1357 |
}
|
1358 |
} else {
|
1359 |
if ($wooCommerceShopPageId > 0 && Misc::isHomePage()) {
|
1480 |
*/
|
1481 |
public function doDisableEmojis()
|
1482 |
{
|
1483 |
+
if ($this->preventUnloadAssets()) {
|
1484 |
+
return;
|
1485 |
+
}
|
1486 |
+
|
1487 |
// Emojis Actions and Filters
|
1488 |
remove_action('admin_print_styles', 'print_emoji_styles');
|
1489 |
remove_action('wp_head', 'print_emoji_detection_script', 7);
|
1496 |
|
1497 |
// TinyMCE Emojis
|
1498 |
add_filter('tiny_mce_plugins', array($this, 'removeEmojisTinymce'));
|
1499 |
+
|
1500 |
+
add_filter('emoji_svg_url', '__return_false');
|
1501 |
}
|
1502 |
|
1503 |
/**
|
1540 |
} else {
|
1541 |
$existingList = json_decode($existingListJson, true);
|
1542 |
|
1543 |
+
if (json_last_error() !== JSON_ERROR_NONE) {
|
1544 |
$validJson = false;
|
1545 |
$existingList = $existingListEmpty;
|
1546 |
}
|
1553 |
);
|
1554 |
}
|
1555 |
|
1556 |
+
/**
|
1557 |
+
* Situations when the assets will not be prevented from loading
|
1558 |
+
* e.g. test mode and a visitor accessing the page, an AJAX request from the Dashboard to print all the assets
|
1559 |
+
* @return bool
|
1560 |
+
*/
|
1561 |
+
public function preventUnloadAssets()
|
1562 |
+
{
|
1563 |
+
// This request specifically asks for all the assets to be loaded in order to print them in the assets management list
|
1564 |
+
// This is for the AJAX requests within the Dashboard, thus the admin needs to see all the assets,
|
1565 |
+
// including ones marked for unload, in case he/she decides to change their rules
|
1566 |
+
if (isset($_REQUEST[WPACU_LOAD_ASSETS_REQ_KEY])) {
|
1567 |
+
return true;
|
1568 |
+
}
|
1569 |
+
|
1570 |
+
// Is test mode enabled? Unload assets ONLY for the admin
|
1571 |
+
if (isset($this->settings['test_mode']) && $this->settings['test_mode'] && ! Menu::userCanManageAssets()) {
|
1572 |
+
return true; // visitors (non-logged in) will view the pages with all the assets loaded
|
1573 |
+
}
|
1574 |
+
|
1575 |
+
return false;
|
1576 |
+
}
|
1577 |
+
|
1578 |
// [wpacu_pro]
|
1579 |
/**
|
1580 |
* @return bool
|
classes/Misc.php
CHANGED
@@ -259,4 +259,28 @@ class Misc
|
|
259 |
{
|
260 |
return in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')));
|
261 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
}
|
259 |
{
|
260 |
return in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')));
|
261 |
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* @param $requestMethod
|
265 |
+
* @param $key
|
266 |
+
* @param mixed $defaultValue
|
267 |
+
*
|
268 |
+
* @return mixed
|
269 |
+
*/
|
270 |
+
public static function getVar($requestMethod, $key, $defaultValue = '')
|
271 |
+
{
|
272 |
+
if ($requestMethod === 'get' && $key && isset($_GET[$key])) {
|
273 |
+
return $_GET[$key];
|
274 |
+
}
|
275 |
+
|
276 |
+
if ($requestMethod === 'post' && $key && isset($_POST[$key])) {
|
277 |
+
return $_POST[$key];
|
278 |
+
}
|
279 |
+
|
280 |
+
if ($requestMethod === 'request' && $key && isset($_REQUEST[$key])) {
|
281 |
+
return $_REQUEST[$key];
|
282 |
+
}
|
283 |
+
|
284 |
+
return $defaultValue;
|
285 |
+
}
|
286 |
}
|
classes/OwnAssets.php
CHANGED
@@ -26,9 +26,29 @@ class OwnAssets
|
|
26 |
public function init()
|
27 |
{
|
28 |
add_action('admin_enqueue_scripts', array($this, 'stylesAndScriptsForAdmin'));
|
|
|
29 |
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
}
|
34 |
|
@@ -43,8 +63,8 @@ class OwnAssets
|
|
43 |
return;
|
44 |
}
|
45 |
|
46 |
-
$page =
|
47 |
-
$getPostId =
|
48 |
|
49 |
// Only load the plugin's assets when they are needed
|
50 |
// This an example of assets that are correctly loaded in WordPress
|
@@ -72,16 +92,27 @@ class OwnAssets
|
|
72 |
$this->enqueueAdminScripts();
|
73 |
}
|
74 |
|
75 |
-
|
76 |
/**
|
77 |
*
|
78 |
*/
|
79 |
public function stylesAndScriptsForPublic()
|
80 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
if (! Menu::userCanManageAssets()) {
|
82 |
return;
|
83 |
}
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
$this->enqueuePublicStyles();
|
86 |
$this->enqueuePublicScripts();
|
87 |
}
|
@@ -102,21 +133,17 @@ class OwnAssets
|
|
102 |
{
|
103 |
global $post, $pagenow;
|
104 |
|
105 |
-
$page =
|
106 |
|
107 |
-
$getPostId = (isset($_GET['post'])
|
108 |
-
&& isset($_GET['action'])
|
109 |
-
&& $_GET['action'] === 'edit'
|
110 |
-
&& $pagenow == 'post.php')
|
111 |
-
? (int)$_GET['post'] : '';
|
112 |
|
113 |
-
$postId =
|
114 |
|
115 |
if ($getPostId > 0 && $getPostId != $postId) {
|
116 |
$postId = $getPostId;
|
117 |
}
|
118 |
|
119 |
-
if ($page
|
120 |
$postId = 0; // for home page
|
121 |
}
|
122 |
|
@@ -130,7 +157,7 @@ class OwnAssets
|
|
130 |
}
|
131 |
|
132 |
// Only for Published Posts
|
133 |
-
if ($postStatus
|
134 |
return;
|
135 |
}
|
136 |
}
|
@@ -236,24 +263,6 @@ HTML;
|
|
236 |
return $assetVer;
|
237 |
}
|
238 |
|
239 |
-
/**
|
240 |
-
*
|
241 |
-
*/
|
242 |
-
public function codeablePostProject()
|
243 |
-
{
|
244 |
-
?>
|
245 |
-
<script>
|
246 |
-
(function(c,o,d,e,a,b,l){c['CodeableObject']=a;c[a]=c[a]||function(){
|
247 |
-
(c[a].q=c[a].q||[]).push(arguments)},c[a].l=1*new Date();b=o.createElement(d),
|
248 |
-
l=o.getElementsByTagName(d)[0];b.async=1;b.src=e;l.parentNode.insertBefore(b,l)
|
249 |
-
})(window,document,'script','https://referoo.co/assets/form.js','cdbl');
|
250 |
-
|
251 |
-
cdbl('shortcode', '0JTXB');
|
252 |
-
cdbl('render', 'wpacu-get-quote');
|
253 |
-
</script>
|
254 |
-
<?php
|
255 |
-
}
|
256 |
-
|
257 |
/**
|
258 |
* @return bool
|
259 |
*/
|
@@ -261,7 +270,7 @@ HTML;
|
|
261 |
{
|
262 |
if ((!$this->isTaxonomyEditPage)
|
263 |
&& Main::instance()->wpacuProEnabled()
|
264 |
-
&& class_exists(
|
265 |
$mainPro = new \WpAssetCleanUpPro\MainPro();
|
266 |
$this->isTaxonomyEditPage = $mainPro->isTaxonomyEditPage();
|
267 |
}
|
26 |
public function init()
|
27 |
{
|
28 |
add_action('admin_enqueue_scripts', array($this, 'stylesAndScriptsForAdmin'));
|
29 |
+
add_action('wp_enqueue_scripts', array($this, 'stylesAndScriptsForPublic'));
|
30 |
|
31 |
+
add_action('admin_head', array($this, 'inlineCode'));
|
32 |
+
add_action('wp_head', array($this, 'inlineCode'));
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
*
|
37 |
+
*/
|
38 |
+
public function inlineCode()
|
39 |
+
{
|
40 |
+
if (is_admin_bar_showing()) {
|
41 |
+
?>
|
42 |
+
<style type="text/css">
|
43 |
+
#wp-admin-bar-wpacu-test-mode span.dashicons { width: 15px; height: 15px; font-family: 'Dashicons', Arial, "Times New Roman", "Bitstream Charter", Times, serif; }
|
44 |
+
#wp-admin-bar-wpacu-test-mode > a:first-child strong { font-weight: bolder; color: #76f203; }
|
45 |
+
#wp-admin-bar-wpacu-test-mode > a:first-child:hover { color: #00b9eb; }
|
46 |
+
#wp-admin-bar-wpacu-test-mode > a:first-child:hover strong { color: #00b9eb; }
|
47 |
+
|
48 |
+
/* Add some spacing below the last text */
|
49 |
+
#wp-admin-bar-wpacu-test-mode-info-2 { padding-bottom: 8px !important; }
|
50 |
+
</style>
|
51 |
+
<?php
|
52 |
}
|
53 |
}
|
54 |
|
63 |
return;
|
64 |
}
|
65 |
|
66 |
+
$page = isset($_GET['page']) ? $_GET['page'] : '';
|
67 |
+
$getPostId = isset($_GET['post']) ? (int)$_GET['post'] : '';
|
68 |
|
69 |
// Only load the plugin's assets when they are needed
|
70 |
// This an example of assets that are correctly loaded in WordPress
|
92 |
$this->enqueueAdminScripts();
|
93 |
}
|
94 |
|
|
|
95 |
/**
|
96 |
*
|
97 |
*/
|
98 |
public function stylesAndScriptsForPublic()
|
99 |
{
|
100 |
+
// Do not print it when an AJAX call is made from the Dashboard
|
101 |
+
if (isset($_POST[WPACU_LOAD_ASSETS_REQ_KEY])) {
|
102 |
+
return;
|
103 |
+
}
|
104 |
+
|
105 |
+
// Only for the administrator with the right permission
|
106 |
if (! Menu::userCanManageAssets()) {
|
107 |
return;
|
108 |
}
|
109 |
|
110 |
+
// Is the Admin Bar not showing and "Manage in the Front-end" option is not enabled in the plugin's "Settings"?
|
111 |
+
// In this case, there's no point in loading the assets below
|
112 |
+
if (! is_admin_bar_showing() && ! Main::instance()->settings['frontend_show']) {
|
113 |
+
return;
|
114 |
+
}
|
115 |
+
|
116 |
$this->enqueuePublicStyles();
|
117 |
$this->enqueuePublicScripts();
|
118 |
}
|
133 |
{
|
134 |
global $post, $pagenow;
|
135 |
|
136 |
+
$page = isset($_GET['page']) ? $_GET['page'] : '';
|
137 |
|
138 |
+
$getPostId = (isset($_GET['post'], $_GET['action']) && $_GET['action'] === 'edit' && $pagenow === 'post.php') ? (int)$_GET['post'] : '';
|
|
|
|
|
|
|
|
|
139 |
|
140 |
+
$postId = isset($post->ID) ? $post->ID : 0;
|
141 |
|
142 |
if ($getPostId > 0 && $getPostId != $postId) {
|
143 |
$postId = $getPostId;
|
144 |
}
|
145 |
|
146 |
+
if ($page === WPACU_PLUGIN_NAME.'_home_page' || $postId < 1) {
|
147 |
$postId = 0; // for home page
|
148 |
}
|
149 |
|
157 |
}
|
158 |
|
159 |
// Only for Published Posts
|
160 |
+
if ($postStatus !== 'publish') {
|
161 |
return;
|
162 |
}
|
163 |
}
|
263 |
return $assetVer;
|
264 |
}
|
265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
/**
|
267 |
* @return bool
|
268 |
*/
|
270 |
{
|
271 |
if ((!$this->isTaxonomyEditPage)
|
272 |
&& Main::instance()->wpacuProEnabled()
|
273 |
+
&& class_exists('\\WpAssetCleanUpPro\\MainPro')) {
|
274 |
$mainPro = new \WpAssetCleanUpPro\MainPro();
|
275 |
$this->isTaxonomyEditPage = $mainPro->isTaxonomyEditPage();
|
276 |
}
|
classes/Plugin.php
CHANGED
@@ -69,7 +69,7 @@ class Plugin
|
|
69 |
{
|
70 |
if (isset($_GET['page']) && strpos($_GET['page'], WPACU_PLUGIN_NAME) !== false) {
|
71 |
$reviewUrl = 'https://wordpress.org/support/plugin/wp-asset-clean-up/reviews/?filter=5#new-post';
|
72 |
-
$text = 'Thank you for using
|
73 |
}
|
74 |
|
75 |
return $text;
|
69 |
{
|
70 |
if (isset($_GET['page']) && strpos($_GET['page'], WPACU_PLUGIN_NAME) !== false) {
|
71 |
$reviewUrl = 'https://wordpress.org/support/plugin/wp-asset-clean-up/reviews/?filter=5#new-post';
|
72 |
+
$text = 'Thank you for using '.WPACU_PLUGIN_TITLE.' v'.WPACU_PLUGIN_VERSION.') <span class="dashicons dashicons-smiley"></span> If you like it, please <a target="_blank" href="'.$reviewUrl.'"><strong>rate</strong> '.WPACU_PLUGIN_TITLE.'</a> <a target="_blank" href="'.$reviewUrl.'"><span class="dashicons dashicons-wpacu dashicons-star-filled"></span><span class="dashicons dashicons-wpacu dashicons-star-filled"></span><span class="dashicons dashicons-wpacu dashicons-star-filled"></span><span class="dashicons dashicons-wpacu dashicons-star-filled"></span><span class="dashicons dashicons-wpacu dashicons-star-filled"></span></a> on WordPress.org to help me spread the word to the community.';
|
73 |
}
|
74 |
|
75 |
return $text;
|
classes/Settings.php
CHANGED
@@ -12,9 +12,12 @@ class Settings
|
|
12 |
*/
|
13 |
public $settingsKeys = array(
|
14 |
// Stored in 'wpassetcleanup_settings'
|
|
|
|
|
15 |
'frontend_show',
|
16 |
-
|
17 |
-
'
|
|
|
18 |
'disable_emojis',
|
19 |
|
20 |
// Stored in 'wpassetcleanup_global_unload' option
|
@@ -39,7 +42,8 @@ class Settings
|
|
39 |
*/
|
40 |
public function init()
|
41 |
{
|
42 |
-
|
|
|
43 |
|
44 |
if (array_key_exists('page', $_GET) && $_GET['page'] === 'wpassetcleanup_settings') {
|
45 |
add_action('admin_notices', array($this, 'notices'));
|
@@ -78,8 +82,7 @@ class Settings
|
|
78 |
public function saveSettings()
|
79 |
{
|
80 |
if (! empty($_POST) && array_key_exists('wpacu_settings_page', $_POST)) {
|
81 |
-
$data =
|
82 |
-
|
83 |
$this->update($data);
|
84 |
}
|
85 |
}
|
12 |
*/
|
13 |
public $settingsKeys = array(
|
14 |
// Stored in 'wpassetcleanup_settings'
|
15 |
+
'dashboard_show',
|
16 |
+
'dom_get_type',
|
17 |
'frontend_show',
|
18 |
+
|
19 |
+
'test_mode',
|
20 |
+
|
21 |
'disable_emojis',
|
22 |
|
23 |
// Stored in 'wpassetcleanup_global_unload' option
|
42 |
*/
|
43 |
public function init()
|
44 |
{
|
45 |
+
// This is triggered BEFORE "initAfterPluginsLoaded" from 'Main' class
|
46 |
+
add_action('plugins_loaded', array($this, 'saveSettings'), 9);
|
47 |
|
48 |
if (array_key_exists('page', $_GET) && $_GET['page'] === 'wpassetcleanup_settings') {
|
49 |
add_action('admin_notices', array($this, 'notices'));
|
82 |
public function saveSettings()
|
83 |
{
|
84 |
if (! empty($_POST) && array_key_exists('wpacu_settings_page', $_POST)) {
|
85 |
+
$data = Misc::getVar('post', WPACU_PLUGIN_NAME . '_settings', array());
|
|
|
86 |
$this->update($data);
|
87 |
}
|
88 |
}
|
classes/Update.php
CHANGED
@@ -26,17 +26,25 @@ class Update
|
|
26 |
*/
|
27 |
public function init()
|
28 |
{
|
29 |
-
|
30 |
-
|
31 |
-
add_action('wp', array($this, 'frontendUpdate'), 9);
|
32 |
-
add_action('template_redirect', array($this, 'redirectAfterFrontEndUpdate'));
|
33 |
-
}
|
34 |
|
35 |
// After post/page is saved - update your styles/scripts lists
|
36 |
// This triggers ONLY in the Dashboard after "Update" button is clicked (on Edit mode)
|
37 |
add_action('save_post', array($this, 'savePost'));
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* TODO: Remove priority later on as it's not needed anymore because there is a redirect after form submit
|
42 |
* Priority: 9 (AFTER current post ID is correctly retrieved and BEFORE the data from the database is fetched)
|
@@ -54,10 +62,9 @@ class Update
|
|
54 |
$nonceName = self::NONCE_FIELD_NAME;
|
55 |
$nonceAction = self::NONCE_ACTION_NAME;
|
56 |
|
57 |
-
$updateAction =
|
58 |
-
$_POST['wpacu_update_asset_frontend'] : '';
|
59 |
|
60 |
-
if (! isset($_POST[$nonceName]) || $updateAction != 1 || ! Main::instance()->
|
61 |
return;
|
62 |
}
|
63 |
|
@@ -237,7 +244,7 @@ class Update
|
|
237 |
*/
|
238 |
public function saveLoadExceptions($type = 'post', $postId = '')
|
239 |
{
|
240 |
-
if ($type
|
241 |
// $postId needs to have a value if $type is a 'post' type
|
242 |
return;
|
243 |
}
|
@@ -249,11 +256,11 @@ class Update
|
|
249 |
$loadExceptionsStyles = $loadExceptionsScripts = array();
|
250 |
|
251 |
// Clear existing list first
|
252 |
-
if ($type
|
253 |
delete_post_meta($postId, '_' . WPACU_PLUGIN_NAME . '_load_exceptions');
|
254 |
-
} elseif ($type
|
255 |
delete_option(WPACU_PLUGIN_NAME . '_front_page_load_exceptions');
|
256 |
-
} /* [wpacu_pro] */ elseif ($type
|
257 |
// Clear existing list for pages like: taxonomy, 404, search, date etc.
|
258 |
do_action( 'wpacu_pro_clear_load_exceptions' );
|
259 |
} /* [/wpacu_pro] */
|
@@ -267,7 +274,7 @@ class Update
|
|
267 |
foreach ($_POST['wpacu_styles_load_it'] as $wpacuHandle) {
|
268 |
// Do not append it if the global unload is removed
|
269 |
if (isset($_POST['wpacu_options_styles'][$wpacuHandle])
|
270 |
-
&& $_POST['wpacu_options_styles'][$wpacuHandle]
|
271 |
continue;
|
272 |
}
|
273 |
$loadExceptionsStyles[] = $wpacuHandle;
|
@@ -278,7 +285,7 @@ class Update
|
|
278 |
foreach ($_POST['wpacu_scripts_load_it'] as $wpacuHandle) {
|
279 |
// Do not append it if the global unload is removed
|
280 |
if (isset($_POST['wpacu_options_scripts'][$wpacuHandle])
|
281 |
-
&& $_POST['wpacu_options_scripts'][$wpacuHandle]
|
282 |
continue;
|
283 |
}
|
284 |
$loadExceptionsScripts[] = $wpacuHandle;
|
@@ -312,13 +319,13 @@ class Update
|
|
312 |
|
313 |
$jsonLoadExceptions = json_encode($list);
|
314 |
|
315 |
-
if ($type
|
316 |
if (! add_post_meta($postId, '_' . WPACU_PLUGIN_NAME . '_load_exceptions', $jsonLoadExceptions, true)) {
|
317 |
update_post_meta($postId, '_' . WPACU_PLUGIN_NAME . '_load_exceptions', $jsonLoadExceptions);
|
318 |
}
|
319 |
-
} elseif ($type
|
320 |
update_option(WPACU_PLUGIN_NAME . '_front_page_load_exceptions', $jsonLoadExceptions);
|
321 |
-
} /* [wpacu_pro] */ elseif ($type
|
322 |
// Update any load extensions for pages like: taxonomy, 404, search, date etc.
|
323 |
do_action( 'wpacu_pro_update_load_exceptions', $jsonLoadExceptions );
|
324 |
} /* [/wpacu_pro] */
|
@@ -394,8 +401,8 @@ class Update
|
|
394 |
public function removeEverywhereUnloads($stylesList = array(), $scriptsList = array(), $checkType = '')
|
395 |
{
|
396 |
if ($checkType === 'post') {
|
397 |
-
$stylesList =
|
398 |
-
$scriptsList =
|
399 |
}
|
400 |
|
401 |
$removeStylesList = $removeScriptsList = array();
|
@@ -404,7 +411,7 @@ class Update
|
|
404 |
|
405 |
if (! empty($stylesList)) {
|
406 |
foreach ($stylesList as $handle => $action) {
|
407 |
-
if ($action
|
408 |
$removeStylesList[] = $handle;
|
409 |
}
|
410 |
}
|
@@ -412,7 +419,7 @@ class Update
|
|
412 |
|
413 |
if (! empty($scriptsList)) {
|
414 |
foreach ($scriptsList as $handle => $action) {
|
415 |
-
if ($action
|
416 |
$removeScriptsList[] = $handle;
|
417 |
}
|
418 |
}
|
@@ -426,7 +433,7 @@ class Update
|
|
426 |
|
427 |
$existingList = json_decode($existingListJson, true);
|
428 |
|
429 |
-
if (json_last_error()
|
430 |
foreach (array('styles', 'scripts') as $assetType) {
|
431 |
if ($assetType === 'styles') {
|
432 |
$list = $removeStylesList;
|
@@ -525,7 +532,7 @@ class Update
|
|
525 |
|
526 |
/**
|
527 |
* Lite Version: For post, pages, custom post types
|
528 |
-
* @param
|
529 |
* @return bool
|
530 |
*/
|
531 |
public function removeBulkUnloads($postType = '')
|
@@ -543,11 +550,8 @@ class Update
|
|
543 |
|
544 |
$bulkType = 'post_type';
|
545 |
|
546 |
-
$stylesList =
|
547 |
-
|
548 |
-
|
549 |
-
$scriptsList = isset($_POST['wpacu_options_'.$bulkType.'_scripts'])
|
550 |
-
? $_POST['wpacu_options_'.$bulkType.'_scripts'] : array();
|
551 |
|
552 |
if (empty($stylesList) && empty($scriptsList)) {
|
553 |
return false;
|
@@ -581,7 +585,7 @@ class Update
|
|
581 |
|
582 |
$existingList = json_decode($existingListJson, true);
|
583 |
|
584 |
-
if (json_last_error()
|
585 |
$list = array();
|
586 |
|
587 |
foreach (array('styles', 'scripts') as $assetType) {
|
26 |
*/
|
27 |
public function init()
|
28 |
{
|
29 |
+
// Triggers on front-end view
|
30 |
+
add_action('plugins_loaded', array($this, 'initAfterPluginsLoaded'), 11);
|
|
|
|
|
|
|
31 |
|
32 |
// After post/page is saved - update your styles/scripts lists
|
33 |
// This triggers ONLY in the Dashboard after "Update" button is clicked (on Edit mode)
|
34 |
add_action('save_post', array($this, 'savePost'));
|
35 |
}
|
36 |
|
37 |
+
/**
|
38 |
+
*
|
39 |
+
*/
|
40 |
+
public function initAfterPluginsLoaded()
|
41 |
+
{
|
42 |
+
if (! is_admin() && Main::instance()->settings['frontend_show']) {
|
43 |
+
add_action( 'wp', array( $this, 'frontendUpdate' ), 9 );
|
44 |
+
add_action( 'template_redirect', array( $this, 'redirectAfterFrontEndUpdate' ) );
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
/**
|
49 |
* TODO: Remove priority later on as it's not needed anymore because there is a redirect after form submit
|
50 |
* Priority: 9 (AFTER current post ID is correctly retrieved and BEFORE the data from the database is fetched)
|
62 |
$nonceName = self::NONCE_FIELD_NAME;
|
63 |
$nonceAction = self::NONCE_ACTION_NAME;
|
64 |
|
65 |
+
$updateAction = Misc::getVar('post', 'wpacu_update_asset_frontend');
|
|
|
66 |
|
67 |
+
if (! isset($_POST[$nonceName]) || $updateAction != 1 || ! Main::instance()->settings['frontend_show']) {
|
68 |
return;
|
69 |
}
|
70 |
|
244 |
*/
|
245 |
public function saveLoadExceptions($type = 'post', $postId = '')
|
246 |
{
|
247 |
+
if ($type === 'post' && !$postId) {
|
248 |
// $postId needs to have a value if $type is a 'post' type
|
249 |
return;
|
250 |
}
|
256 |
$loadExceptionsStyles = $loadExceptionsScripts = array();
|
257 |
|
258 |
// Clear existing list first
|
259 |
+
if ($type === 'post') {
|
260 |
delete_post_meta($postId, '_' . WPACU_PLUGIN_NAME . '_load_exceptions');
|
261 |
+
} elseif ($type === 'front_page') {
|
262 |
delete_option(WPACU_PLUGIN_NAME . '_front_page_load_exceptions');
|
263 |
+
} /* [wpacu_pro] */ elseif ($type === 'for_pro') {
|
264 |
// Clear existing list for pages like: taxonomy, 404, search, date etc.
|
265 |
do_action( 'wpacu_pro_clear_load_exceptions' );
|
266 |
} /* [/wpacu_pro] */
|
274 |
foreach ($_POST['wpacu_styles_load_it'] as $wpacuHandle) {
|
275 |
// Do not append it if the global unload is removed
|
276 |
if (isset($_POST['wpacu_options_styles'][$wpacuHandle])
|
277 |
+
&& $_POST['wpacu_options_styles'][$wpacuHandle] === 'remove') {
|
278 |
continue;
|
279 |
}
|
280 |
$loadExceptionsStyles[] = $wpacuHandle;
|
285 |
foreach ($_POST['wpacu_scripts_load_it'] as $wpacuHandle) {
|
286 |
// Do not append it if the global unload is removed
|
287 |
if (isset($_POST['wpacu_options_scripts'][$wpacuHandle])
|
288 |
+
&& $_POST['wpacu_options_scripts'][$wpacuHandle] === 'remove') {
|
289 |
continue;
|
290 |
}
|
291 |
$loadExceptionsScripts[] = $wpacuHandle;
|
319 |
|
320 |
$jsonLoadExceptions = json_encode($list);
|
321 |
|
322 |
+
if ($type === 'post') {
|
323 |
if (! add_post_meta($postId, '_' . WPACU_PLUGIN_NAME . '_load_exceptions', $jsonLoadExceptions, true)) {
|
324 |
update_post_meta($postId, '_' . WPACU_PLUGIN_NAME . '_load_exceptions', $jsonLoadExceptions);
|
325 |
}
|
326 |
+
} elseif ($type === 'front_page') {
|
327 |
update_option(WPACU_PLUGIN_NAME . '_front_page_load_exceptions', $jsonLoadExceptions);
|
328 |
+
} /* [wpacu_pro] */ elseif ($type === 'for_pro') {
|
329 |
// Update any load extensions for pages like: taxonomy, 404, search, date etc.
|
330 |
do_action( 'wpacu_pro_update_load_exceptions', $jsonLoadExceptions );
|
331 |
} /* [/wpacu_pro] */
|
401 |
public function removeEverywhereUnloads($stylesList = array(), $scriptsList = array(), $checkType = '')
|
402 |
{
|
403 |
if ($checkType === 'post') {
|
404 |
+
$stylesList = Misc::getVar('post', 'wpacu_options_styles', array());
|
405 |
+
$scriptsList = Misc::getVar('post', 'wpacu_options_scripts', array());
|
406 |
}
|
407 |
|
408 |
$removeStylesList = $removeScriptsList = array();
|
411 |
|
412 |
if (! empty($stylesList)) {
|
413 |
foreach ($stylesList as $handle => $action) {
|
414 |
+
if ($action === 'remove') {
|
415 |
$removeStylesList[] = $handle;
|
416 |
}
|
417 |
}
|
419 |
|
420 |
if (! empty($scriptsList)) {
|
421 |
foreach ($scriptsList as $handle => $action) {
|
422 |
+
if ($action === 'remove') {
|
423 |
$removeScriptsList[] = $handle;
|
424 |
}
|
425 |
}
|
433 |
|
434 |
$existingList = json_decode($existingListJson, true);
|
435 |
|
436 |
+
if (json_last_error() === JSON_ERROR_NONE) {
|
437 |
foreach (array('styles', 'scripts') as $assetType) {
|
438 |
if ($assetType === 'styles') {
|
439 |
$list = $removeStylesList;
|
532 |
|
533 |
/**
|
534 |
* Lite Version: For post, pages, custom post types
|
535 |
+
* @param mixed $postType
|
536 |
* @return bool
|
537 |
*/
|
538 |
public function removeBulkUnloads($postType = '')
|
550 |
|
551 |
$bulkType = 'post_type';
|
552 |
|
553 |
+
$stylesList = Misc::getVar('post', 'wpacu_options_' . $bulkType . '_styles', array());
|
554 |
+
$scriptsList = Misc::getVar('post', 'wpacu_options_' . $bulkType . '_scripts', array());
|
|
|
|
|
|
|
555 |
|
556 |
if (empty($stylesList) && empty($scriptsList)) {
|
557 |
return false;
|
585 |
|
586 |
$existingList = json_decode($existingListJson, true);
|
587 |
|
588 |
+
if (json_last_error() === JSON_ERROR_NONE) {
|
589 |
$list = array();
|
590 |
|
591 |
foreach (array('styles', 'scripts') as $assetType) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: speed, pagespeed, page speed, cleanup, remove style, remove script, dequeu
|
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7GJZCW6RD8ECS
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.9.8
|
7 |
-
Stable tag: 1.2.8
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl.html
|
10 |
|
@@ -131,6 +131,11 @@ If that's the case, then it's advisable to consult with a developer (ideally the
|
|
131 |
4. Scripts (.JS) are selected for site-wide unload
|
132 |
|
133 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
134 |
= 1.2.8 =
|
135 |
* Bug Fix: PHP code change to properly detect the singular pages had the wrong condition set
|
136 |
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7GJZCW6RD8ECS
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.9.8
|
7 |
+
Stable tag: 1.2.8.1
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl.html
|
10 |
|
131 |
4. Scripts (.JS) are selected for site-wide unload
|
132 |
|
133 |
== Changelog ==
|
134 |
+
= 1.2.8.1 =
|
135 |
+
* Added "Test Mode" option which will unload assets only if the user is logged in as administrator and has capability of activating plugins.
|
136 |
+
* This is good for debugging in case one might worry that a CSS/JavaScript file could be unloaded by mistake and break the website for the regular (non-logged in) users.
|
137 |
+
* Once the page loads fine and all looks good, the "Test Mode" can be disabled so the visitors will load the lighter version of the page.
|
138 |
+
|
139 |
= 1.2.8 =
|
140 |
* Bug Fix: PHP code change to properly detect the singular pages had the wrong condition set
|
141 |
|
templates/_top-area.php
CHANGED
@@ -61,7 +61,7 @@ $wpacu_current_page = str_replace(array('asset-cleanup_page_', 'toplevel_page_')
|
|
61 |
<nav>
|
62 |
<ul>
|
63 |
<?php foreach ($wpacu_top_area_links as $wpacu_link => $wpacu_info) { ?>
|
64 |
-
<li <?php if ($wpacu_current_page
|
65 |
<a <?php if (isset($wpacu_info['target']) && $wpacu_info['target'] === '_blank') { ?>target="_blank"<?php } ?> href="<?php echo $wpacu_link; ?>"><?php echo $wpacu_info['icon']; ?> <span><?php echo $wpacu_info['title']; ?></span></a>
|
66 |
</li>
|
67 |
<?php } ?>
|
61 |
<nav>
|
62 |
<ul>
|
63 |
<?php foreach ($wpacu_top_area_links as $wpacu_link => $wpacu_info) { ?>
|
64 |
+
<li <?php if ($wpacu_current_page === $wpacu_info['page']) { echo 'class="wpacu-tab-current"'; } ?>>
|
65 |
<a <?php if (isset($wpacu_info['target']) && $wpacu_info['target'] === '_blank') { ?>target="_blank"<?php } ?> href="<?php echo $wpacu_link; ?>"><?php echo $wpacu_info['icon']; ?> <span><?php echo $wpacu_info['title']; ?></span></a>
|
66 |
</li>
|
67 |
<?php } ?>
|
templates/admin-page-get-help.php
CHANGED
@@ -8,19 +8,19 @@ if (! isset($data)) {
|
|
8 |
|
9 |
include_once '_top-area.php';
|
10 |
?>
|
11 |
-
<div class="wrap wpacu-get-help-wrap">
|
12 |
-
<h1
|
13 |
<div class="help-content-wrap">
|
14 |
<div class="help-content upgrade-help">
|
15 |
<h2 class="content-title"><?php _e('I have purchased the Pro version. How to do the upgrade?', WPACU_PLUGIN_NAME); ?></h2>
|
16 |
<ul>
|
17 |
<li><strong>1)</strong> Go to "Plugins" -> "Installed Plugins", <strong>deactivate</strong> and then <strong>delete</strong> "Asset CleanUp: Page Speed Booster" (<em>no worries, any settings applied would be preserved</em>)
|
18 |
-
<div
|
19 |
-
<div class="wpacu-image-area wpacu-deactivate
|
20 |
<img src="<?php echo WPACU_PLUGIN_URL; ?>/assets/images/wpacu-upgrade-steps/wpacu-upgrade-step-1-deactivate.jpg" alt="" />
|
21 |
</div>
|
22 |
|
23 |
-
<div class="wpacu-image-area wpacu-delete
|
24 |
<img src="<?php echo WPACU_PLUGIN_URL; ?>/assets/images/wpacu-upgrade-steps/wpacu-upgrade-step-1-delete.jpg" alt="" />
|
25 |
</div>
|
26 |
<div class="clear"></div>
|
@@ -34,8 +34,8 @@ include_once '_top-area.php';
|
|
34 |
<hr />
|
35 |
</li>
|
36 |
<li><strong>3)</strong> Finally, <strong>activate</strong> Asset CleanUp Pro! That's it <span class="dashicons dashicons-smiley"></span>
|
37 |
-
<div class="wpacu-image-area">
|
38 |
-
<img src="<?php echo WPACU_PLUGIN_URL; ?>/assets/images/wpacu-upgrade-steps/wpacu-upgrade-step-3-activate-plugin.jpg"
|
39 |
</div>
|
40 |
</li>
|
41 |
</ul>
|
@@ -46,8 +46,8 @@ include_once '_top-area.php';
|
|
46 |
<div class="help-content tech-help second">
|
47 |
<h2 class="content-title"><?php _e('I am stuck and need assistance, can I get help?', WPACU_PLUGIN_NAME); ?></h2>
|
48 |
|
49 |
-
<p>If you believe the plugin has a bug (e.g. you're getting JavaScript or PHP errors generated by
|
50 |
-
<p>Note that the support forum from WordPress.org is only for reporting bugs about
|
51 |
|
52 |
<p>In case you need professional help in one of the following scenarios and you don't have a developer available to provide what you need, then me or any of my colleagues from <a href="https://app.codeable.io/tasks/new?ref=d3TOr">Codeable</a>, would be able to assist you:</p>
|
53 |
|
8 |
|
9 |
include_once '_top-area.php';
|
10 |
?>
|
11 |
+
<div class="wpacu-wrap wpacu-get-help-wrap">
|
12 |
+
<h1><?php echo WPACU_PLUGIN_TITLE; ?></h1>
|
13 |
<div class="help-content-wrap">
|
14 |
<div class="help-content upgrade-help">
|
15 |
<h2 class="content-title"><?php _e('I have purchased the Pro version. How to do the upgrade?', WPACU_PLUGIN_NAME); ?></h2>
|
16 |
<ul>
|
17 |
<li><strong>1)</strong> Go to "Plugins" -> "Installed Plugins", <strong>deactivate</strong> and then <strong>delete</strong> "Asset CleanUp: Page Speed Booster" (<em>no worries, any settings applied would be preserved</em>)
|
18 |
+
<div class="cols-wrap">
|
19 |
+
<div class="wpacu-image-area wpacu-deactivate col-left">
|
20 |
<img src="<?php echo WPACU_PLUGIN_URL; ?>/assets/images/wpacu-upgrade-steps/wpacu-upgrade-step-1-deactivate.jpg" alt="" />
|
21 |
</div>
|
22 |
|
23 |
+
<div class="wpacu-image-area wpacu-delete col-right">
|
24 |
<img src="<?php echo WPACU_PLUGIN_URL; ?>/assets/images/wpacu-upgrade-steps/wpacu-upgrade-step-1-delete.jpg" alt="" />
|
25 |
</div>
|
26 |
<div class="clear"></div>
|
34 |
<hr />
|
35 |
</li>
|
36 |
<li><strong>3)</strong> Finally, <strong>activate</strong> Asset CleanUp Pro! That's it <span class="dashicons dashicons-smiley"></span>
|
37 |
+
<div class="wpacu-image-area activate-plugin">
|
38 |
+
<img src="<?php echo WPACU_PLUGIN_URL; ?>/assets/images/wpacu-upgrade-steps/wpacu-upgrade-step-3-activate-plugin.jpg" alt="" />
|
39 |
</div>
|
40 |
</li>
|
41 |
</ul>
|
46 |
<div class="help-content tech-help second">
|
47 |
<h2 class="content-title"><?php _e('I am stuck and need assistance, can I get help?', WPACU_PLUGIN_NAME); ?></h2>
|
48 |
|
49 |
+
<p>If you believe the plugin has a bug (e.g. you're getting JavaScript or PHP errors generated by <?php echo WPACU_PLUGIN_TITLE; ?> or the selected scripts are not unloading etc.) that needs to be fixed, then <a href="https://wordpress.org/support/plugin/wp-asset-clean-up">please report it by opening a support ticket</a>.</p>
|
50 |
+
<p>Note that the support forum from WordPress.org is only for reporting bugs about <?php echo WPACU_PLUGIN_TITLE; ?> (lite version) and it's not for custom work request.</p>
|
51 |
|
52 |
<p>In case you need professional help in one of the following scenarios and you don't have a developer available to provide what you need, then me or any of my colleagues from <a href="https://app.codeable.io/tasks/new?ref=d3TOr">Codeable</a>, would be able to assist you:</p>
|
53 |
|
templates/admin-page-license.php
CHANGED
@@ -8,12 +8,12 @@ if (! isset($data)) {
|
|
8 |
|
9 |
include_once '_top-area.php';
|
10 |
?>
|
11 |
-
<div class="wrap">
|
12 |
-
<h1
|
13 |
-
<p>You're using the lite version of
|
14 |
<p><em>To unlock all features and get premium support, you can <a href="<?php echo WPACU_PLUGIN_GO_PRO_URL; ?>?utm_source=plugin_license">upgrade to the Pro version</a>.</em></p>
|
15 |
|
16 |
-
<div
|
17 |
<p><span class="dashicons dashicons-info"></span> If you already purchased the Pro version and you don't know how to activate it, <a href="admin.php?page=wpassetcleanup_get_help">follow the steps from the "Help" section</a>.</p>
|
18 |
<div class="clear"></div>
|
19 |
</div>
|
8 |
|
9 |
include_once '_top-area.php';
|
10 |
?>
|
11 |
+
<div class="wpacu-wrap">
|
12 |
+
<h1><?php echo WPACU_PLUGIN_TITLE; ?></h1>
|
13 |
+
<p>You're using the lite version of <?php echo WPACU_PLUGIN_TITLE; ?> (v<?php echo WPACU_PLUGIN_VERSION; ?>), so no license key is needed. You'll receive automatic notifications whenever a new version is available for download.</p>
|
14 |
<p><em>To unlock all features and get premium support, you can <a href="<?php echo WPACU_PLUGIN_GO_PRO_URL; ?>?utm_source=plugin_license">upgrade to the Pro version</a>.</em></p>
|
15 |
|
16 |
+
<div class="wrap-upgrade-info">
|
17 |
<p><span class="dashicons dashicons-info"></span> If you already purchased the Pro version and you don't know how to activate it, <a href="admin.php?page=wpassetcleanup_get_help">follow the steps from the "Help" section</a>.</p>
|
18 |
<div class="clear"></div>
|
19 |
</div>
|
templates/admin-page-pages-info.php
CHANGED
@@ -12,8 +12,8 @@ include_once '_top-area.php';
|
|
12 |
$availableForPro = '<a href="'.WPACU_PLUGIN_GO_PRO_URL.'?utm_source=plugin_pages_info" class="go-pro-link-no-style"><span class="tooltip">Available for Pro users<br />Click to upgrade!</span> <img width="20" height="20" src="'.WPACU_PLUGIN_URL.'/assets/icons/icon-lock.svg" valign="top" alt="" /></a>';
|
13 |
// [/wpacu_lite]
|
14 |
?>
|
15 |
-
<div class="wrap">
|
16 |
-
<h1
|
17 |
|
18 |
<!-- [wpacu_lite] -->
|
19 |
<p>* <em>Unloading assets (CSS & JavaScript) for page types that have a locker next to their name requires an <a href="<?php echo WPACU_PLUGIN_GO_PRO_URL; ?>?utm_source=plugin_pages_info&utm_medium=top_note">upgrade to the Pro version</a>.</em></p>
|
12 |
$availableForPro = '<a href="'.WPACU_PLUGIN_GO_PRO_URL.'?utm_source=plugin_pages_info" class="go-pro-link-no-style"><span class="tooltip">Available for Pro users<br />Click to upgrade!</span> <img width="20" height="20" src="'.WPACU_PLUGIN_URL.'/assets/icons/icon-lock.svg" valign="top" alt="" /></a>';
|
13 |
// [/wpacu_lite]
|
14 |
?>
|
15 |
+
<div class="wpacu-wrap">
|
16 |
+
<h1><?php echo WPACU_PLUGIN_TITLE; ?></h1>
|
17 |
|
18 |
<!-- [wpacu_lite] -->
|
19 |
<p>* <em>Unloading assets (CSS & JavaScript) for page types that have a locker next to their name requires an <a href="<?php echo WPACU_PLUGIN_GO_PRO_URL; ?>?utm_source=plugin_pages_info&utm_medium=top_note">upgrade to the Pro version</a>.</em></p>
|
templates/admin-page-settings-bulk-unloads.php
CHANGED
@@ -13,8 +13,8 @@ $availableForPro = '<span class="tooltip">Available for Pro users<br />Click to
|
|
13 |
// [/wpacu_lite]
|
14 |
?>
|
15 |
|
16 |
-
<div class="wrap">
|
17 |
-
<h1
|
18 |
<h2><?php _e('Bulk Unloaded', WPACU_PLUGIN_NAME); ?></h2>
|
19 |
|
20 |
<p>If you have used rules such as <em>"Unload everywhere"</em> or <em>"Unload on All Pages of <strong>post</strong> post type"</em> etc., then the assets will be shown here. Although, you can manage them when editing a page, post etc., this page will make things easier by seeing all the bulk unloads:</p>
|
@@ -33,6 +33,8 @@ $availableForPro = '<span class="tooltip">Available for Pro users<br />Click to
|
|
33 |
<div class="clear"></div>
|
34 |
|
35 |
<?php
|
|
|
|
|
36 |
if ($data['for'] === 'post_types') {
|
37 |
?>
|
38 |
<div style="margin: 15px 0;">
|
13 |
// [/wpacu_lite]
|
14 |
?>
|
15 |
|
16 |
+
<div class="wpacu-wrap">
|
17 |
+
<h1><?php echo WPACU_PLUGIN_TITLE; ?></h1>
|
18 |
<h2><?php _e('Bulk Unloaded', WPACU_PLUGIN_NAME); ?></h2>
|
19 |
|
20 |
<p>If you have used rules such as <em>"Unload everywhere"</em> or <em>"Unload on All Pages of <strong>post</strong> post type"</em> etc., then the assets will be shown here. Although, you can manage them when editing a page, post etc., this page will make things easier by seeing all the bulk unloads:</p>
|
33 |
<div class="clear"></div>
|
34 |
|
35 |
<?php
|
36 |
+
do_action('wpacu_admin_notices');
|
37 |
+
|
38 |
if ($data['for'] === 'post_types') {
|
39 |
?>
|
40 |
<div style="margin: 15px 0;">
|
templates/admin-page-settings-homepage.php
CHANGED
@@ -8,8 +8,8 @@ if (! isset($data)) {
|
|
8 |
|
9 |
include_once '_top-area.php';
|
10 |
?>
|
11 |
-
<div class="wrap">
|
12 |
-
<h1
|
13 |
<h2><?php _e('Home Page Scripts & Styles Management', WPACU_PLUGIN_NAME); ?></h2>
|
14 |
|
15 |
<?php
|
8 |
|
9 |
include_once '_top-area.php';
|
10 |
?>
|
11 |
+
<div class="wpacu-wrap">
|
12 |
+
<h1><?php echo WPACU_PLUGIN_TITLE; ?></h1>
|
13 |
<h2><?php _e('Home Page Scripts & Styles Management', WPACU_PLUGIN_NAME); ?></h2>
|
14 |
|
15 |
<?php
|
templates/admin-page-settings-plugin.php
CHANGED
@@ -12,8 +12,8 @@ include_once '_top-area.php';
|
|
12 |
$availableForPro = '<a href="'.WPACU_PLUGIN_GO_PRO_URL.'?utm_source=plugin_settings" class="go-pro-link-no-style"><span class="tooltip">Available for Pro users<br />Click to unlock all features!</span> <img width="20" height="20" src="'.WPACU_PLUGIN_URL.'/assets/icons/icon-lock.svg" valign="top" alt="" /></a> ';
|
13 |
// [/wpacu_lite]
|
14 |
?>
|
15 |
-
<div class="wrap">
|
16 |
-
<h1
|
17 |
|
18 |
<form method="post" action="">
|
19 |
<input type="hidden" name="wpacu_settings_page" value="1" />
|
@@ -26,8 +26,9 @@ $availableForPro = '<a href="'.WPACU_PLUGIN_GO_PRO_URL.'?utm_source=plugin_setti
|
|
26 |
</th>
|
27 |
<td>
|
28 |
<label class="wpacu_switch">
|
29 |
-
<input id="wpacu_dashboard"
|
30 |
-
|
|
|
31 |
name="<?php echo WPACU_PLUGIN_NAME.'_settings'; ?>[dashboard_show]"
|
32 |
value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
|
33 |
|
@@ -60,14 +61,32 @@ $availableForPro = '<a href="'.WPACU_PLUGIN_GO_PRO_URL.'?utm_source=plugin_setti
|
|
60 |
<label class="wpacu_switch">
|
61 |
<input id="wpacu_frontend"
|
62 |
type="checkbox"
|
63 |
-
|
64 |
name="<?php echo WPACU_PLUGIN_NAME.'_settings'; ?>[frontend_show]"
|
65 |
-
|
66 |
|
67 |
<small>If you are logged in, this will make the list of assets show below the page that you view (either home page, a post or a page).</small>
|
68 |
<p><small>The area will be shown through the <code>wp_footer</code> action so in case you do not see the asset list at the bottom of the page, make sure the theme is using <a href="https://codex.wordpress.org/Function_Reference/wp_footer"><code>wp_footer()</code></a> function before the <code></body></code> tag. Any theme that follows the standards should have it. If not, you will have to add it to make sure other plugins and code from functions.php will work fine.</small></p>
|
69 |
</td>
|
70 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
</table>
|
72 |
|
73 |
<hr />
|
@@ -81,10 +100,11 @@ $availableForPro = '<a href="'.WPACU_PLUGIN_GO_PRO_URL.'?utm_source=plugin_setti
|
|
81 |
</th>
|
82 |
<td>
|
83 |
<label class="wpacu_switch">
|
84 |
-
<input id="wpacu_disable_emojis"
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
88 |
|
89 |
<small>This will unload WordPress' Emojis (the smiley icons)</small>
|
90 |
<p><small>As of WordPress 4.2, a new feature was introduced that allows you to use the new Emojis. While on some WordPress setups is useful, in many situations (especially when you are not using WordPress as a blog), you just don’t need them and the file /wp-includes/js/wp-emoji-release.min.js is loaded along with extra inline JavaScript code which add up to the number of loaded HTTP requests.</small></p>
|
12 |
$availableForPro = '<a href="'.WPACU_PLUGIN_GO_PRO_URL.'?utm_source=plugin_settings" class="go-pro-link-no-style"><span class="tooltip">Available for Pro users<br />Click to unlock all features!</span> <img width="20" height="20" src="'.WPACU_PLUGIN_URL.'/assets/icons/icon-lock.svg" valign="top" alt="" /></a> ';
|
13 |
// [/wpacu_lite]
|
14 |
?>
|
15 |
+
<div class="wpacu-wrap">
|
16 |
+
<h1><?php echo WPACU_PLUGIN_TITLE; ?></h1>
|
17 |
|
18 |
<form method="post" action="">
|
19 |
<input type="hidden" name="wpacu_settings_page" value="1" />
|
26 |
</th>
|
27 |
<td>
|
28 |
<label class="wpacu_switch">
|
29 |
+
<input id="wpacu_dashboard"
|
30 |
+
type="checkbox"
|
31 |
+
<?php echo (($data['dashboard_show'] == 1) ? 'checked="checked"' : ''); ?>
|
32 |
name="<?php echo WPACU_PLUGIN_NAME.'_settings'; ?>[dashboard_show]"
|
33 |
value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
|
34 |
|
61 |
<label class="wpacu_switch">
|
62 |
<input id="wpacu_frontend"
|
63 |
type="checkbox"
|
64 |
+
<?php echo (($data['frontend_show'] == 1) ? 'checked="checked"' : ''); ?>
|
65 |
name="<?php echo WPACU_PLUGIN_NAME.'_settings'; ?>[frontend_show]"
|
66 |
+
value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
|
67 |
|
68 |
<small>If you are logged in, this will make the list of assets show below the page that you view (either home page, a post or a page).</small>
|
69 |
<p><small>The area will be shown through the <code>wp_footer</code> action so in case you do not see the asset list at the bottom of the page, make sure the theme is using <a href="https://codex.wordpress.org/Function_Reference/wp_footer"><code>wp_footer()</code></a> function before the <code></body></code> tag. Any theme that follows the standards should have it. If not, you will have to add it to make sure other plugins and code from functions.php will work fine.</small></p>
|
70 |
</td>
|
71 |
</tr>
|
72 |
+
<tr valign="top">
|
73 |
+
<th scope="row" class="setting_title">
|
74 |
+
<label for="wpacu_frontend">Enable Test Mode?</label>
|
75 |
+
<p class="wpacu_subtitle"><small><em>Apply plugin's changes for the admin only</em></small></p>
|
76 |
+
<p class="wpacu_read_more"><a target="_blank" href="https://assetcleanup.com/docs/?p=84">Read More</a></p>
|
77 |
+
</th>
|
78 |
+
<td>
|
79 |
+
<label class="wpacu_switch">
|
80 |
+
<input id="wpacu_frontend"
|
81 |
+
type="checkbox"
|
82 |
+
<?php echo (($data['test_mode'] == 1) ? 'checked="checked"' : ''); ?>
|
83 |
+
name="<?php echo WPACU_PLUGIN_NAME.'_settings'; ?>[test_mode]"
|
84 |
+
value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
|
85 |
+
|
86 |
+
<small>This is great for debugging when you're going through trial and error while removing unneeded CSS & JavaScript on your website. Your visitors will load the website with all the settings & assets loaded (just like it was before you activated the plugin).</small>
|
87 |
+
<p><small>For instance, you have an eCommerce website (e.g. WooCommerce, Easy Digital Downloads), and you're worried that unloading one wrong asset could break the "add to cart" functionality or the layout of the product page. You can enable this option, do the unloading for the CSS & JavaScript files you believe are not needed on certain pages, test to check if everything is alright, and then disable test mode to enable the unloading for your visitors too (not only the admin).</small></p>
|
88 |
+
</td>
|
89 |
+
</tr>
|
90 |
</table>
|
91 |
|
92 |
<hr />
|
100 |
</th>
|
101 |
<td>
|
102 |
<label class="wpacu_switch">
|
103 |
+
<input id="wpacu_disable_emojis"
|
104 |
+
type="checkbox"
|
105 |
+
<?php echo (($data['disable_emojis'] == 1) ? 'checked="checked"' : ''); ?>
|
106 |
+
name="<?php echo WPACU_PLUGIN_NAME.'_settings'; ?>[disable_emojis]"
|
107 |
+
value="1" /> <span class="wpacu_slider wpacu_round"></span> </label>
|
108 |
|
109 |
<small>This will unload WordPress' Emojis (the smiley icons)</small>
|
110 |
<p><small>As of WordPress 4.2, a new feature was introduced that allows you to use the new Emojis. While on some WordPress setups is useful, in many situations (especially when you are not using WordPress as a blog), you just don’t need them and the file /wp-includes/js/wp-emoji-release.min.js is loaded along with extra inline JavaScript code which add up to the number of loaded HTTP requests.</small></p>
|
templates/meta-box-loaded-assets/_asset-script-rows.php
CHANGED
@@ -45,8 +45,8 @@ foreach ($data['all']['scripts'] as $obj) {
|
|
45 |
$class .= ' script_'.$obj->handle;
|
46 |
?>
|
47 |
<tr class="wpacu_asset_row <?php echo $class; ?>">
|
48 |
-
<td valign="top"
|
49 |
-
<p
|
50 |
<label for="script_<?php echo $obj->handle; ?>"> <?php _e('Handle:', WPACU_PLUGIN_NAME); ?> <strong><span style="color: green;"><?php echo $obj->handle; ?></span></strong></label>
|
51 |
<?php
|
52 |
if (isset($obj->wp) && $obj->wp) {
|
@@ -57,7 +57,7 @@ foreach ($data['all']['scripts'] as $obj) {
|
|
57 |
?>
|
58 |
</p>
|
59 |
|
60 |
-
<div
|
61 |
<ul class="wpacu_asset_options wpacu_exception_options_area" <?php /* [wpacu_lite] */ if ($globalUnloaded || $isPostTypeUnloaded) { /* [/wpacu_lite] */ echo 'style="display: none;"'; } ?>>
|
62 |
<li class="wpacu_unload_this_page">
|
63 |
<label class="wpacu_switch"><input class="input-unload-on-this-page" id="script_<?php echo $obj->handle; ?>" <?php /* [wpacu_lite] */ if ($globalUnloaded || $isPostTypeUnloaded) { /* [/wpacu_lite] */ echo 'disabled="disabled"'; } echo $checked; ?> name="<?php echo WPACU_PLUGIN_NAME; ?>[scripts][]" type="checkbox" value="<?php echo $obj->handle; ?>" /><span class="wpacu_slider wpacu_round"></span></label> <label class="wpacu_slider_text" for="script_<?php echo $obj->handle; ?>">Unload on this page</label>
|
@@ -73,7 +73,7 @@ foreach ($data['all']['scripts'] as $obj) {
|
|
73 |
?>
|
74 |
</div>
|
75 |
|
76 |
-
<div
|
77 |
<?php
|
78 |
// Unloaded Everywhere
|
79 |
if ($globalUnloaded) {
|
@@ -127,7 +127,7 @@ foreach ($data['all']['scripts'] as $obj) {
|
|
127 |
</div>
|
128 |
|
129 |
<?php if ($data['bulk_unloaded_type'] === 'post_type') { ?>
|
130 |
-
<div
|
131 |
<?php } ?>
|
132 |
|
133 |
<?php
|
@@ -203,7 +203,7 @@ foreach ($data['all']['scripts'] as $obj) {
|
|
203 |
</li>
|
204 |
</ul>
|
205 |
<?php
|
206 |
-
if (isset($obj->src) && $obj->src
|
207 |
?>
|
208 |
<p><strong><?php _e('Source:', WPACU_PLUGIN_NAME); ?></strong> <a target="_blank" href="<?php echo $obj->srcHref; ?>"><?php echo $obj->src; ?></a></p>
|
209 |
<?php
|
@@ -220,12 +220,12 @@ foreach ($data['all']['scripts'] as $obj) {
|
|
220 |
$extraInfo[] = '<strong>'.__('Depends on:', WPACU_PLUGIN_NAME).'</strong> '.implode(', ', $obj->deps);
|
221 |
}
|
222 |
|
223 |
-
if (isset($obj->ver) && $obj->ver
|
224 |
$extraInfo[] = '<strong>'.__('Version:', WPACU_PLUGIN_NAME).'</strong> '.$obj->ver;
|
225 |
}
|
226 |
|
227 |
-
if (isset($obj->position) && $obj->position
|
228 |
-
$extraInfo[] = '<strong>'.__('Position:', WPACU_PLUGIN_NAME).'</strong> '.(($obj->position
|
229 |
}
|
230 |
|
231 |
// [wpacu_lite]
|
@@ -238,7 +238,7 @@ foreach ($data['all']['scripts'] as $obj) {
|
|
238 |
?>
|
239 |
|
240 |
<!-- [wpacu_lite] -->
|
241 |
-
<?php if (isset($obj->src) && $obj->src
|
242 |
<div class="wpacu-script-attributes-area wpacu-lite">
|
243 |
<p>If loaded (not unloaded by any of the rules above), apply the following attributes: <em><a class="go-pro-link-no-style" href="<?php echo WPACU_PLUGIN_GO_PRO_URL; ?>">* this option is available in Pro version</a></em></p>
|
244 |
|
45 |
$class .= ' script_'.$obj->handle;
|
46 |
?>
|
47 |
<tr class="wpacu_asset_row <?php echo $class; ?>">
|
48 |
+
<td valign="top">
|
49 |
+
<p class="wpacu_handle">
|
50 |
<label for="script_<?php echo $obj->handle; ?>"> <?php _e('Handle:', WPACU_PLUGIN_NAME); ?> <strong><span style="color: green;"><?php echo $obj->handle; ?></span></strong></label>
|
51 |
<?php
|
52 |
if (isset($obj->wp) && $obj->wp) {
|
57 |
?>
|
58 |
</p>
|
59 |
|
60 |
+
<div class="wpacu_asset_options_wrap">
|
61 |
<ul class="wpacu_asset_options wpacu_exception_options_area" <?php /* [wpacu_lite] */ if ($globalUnloaded || $isPostTypeUnloaded) { /* [/wpacu_lite] */ echo 'style="display: none;"'; } ?>>
|
62 |
<li class="wpacu_unload_this_page">
|
63 |
<label class="wpacu_switch"><input class="input-unload-on-this-page" id="script_<?php echo $obj->handle; ?>" <?php /* [wpacu_lite] */ if ($globalUnloaded || $isPostTypeUnloaded) { /* [/wpacu_lite] */ echo 'disabled="disabled"'; } echo $checked; ?> name="<?php echo WPACU_PLUGIN_NAME; ?>[scripts][]" type="checkbox" value="<?php echo $obj->handle; ?>" /><span class="wpacu_slider wpacu_round"></span></label> <label class="wpacu_slider_text" for="script_<?php echo $obj->handle; ?>">Unload on this page</label>
|
73 |
?>
|
74 |
</div>
|
75 |
|
76 |
+
<div class="wpacu_asset_options_wrap">
|
77 |
<?php
|
78 |
// Unloaded Everywhere
|
79 |
if ($globalUnloaded) {
|
127 |
</div>
|
128 |
|
129 |
<?php if ($data['bulk_unloaded_type'] === 'post_type') { ?>
|
130 |
+
<div class="wpacu_asset_options_wrap">
|
131 |
<?php } ?>
|
132 |
|
133 |
<?php
|
203 |
</li>
|
204 |
</ul>
|
205 |
<?php
|
206 |
+
if (isset($obj->src) && $obj->src !== '') {
|
207 |
?>
|
208 |
<p><strong><?php _e('Source:', WPACU_PLUGIN_NAME); ?></strong> <a target="_blank" href="<?php echo $obj->srcHref; ?>"><?php echo $obj->src; ?></a></p>
|
209 |
<?php
|
220 |
$extraInfo[] = '<strong>'.__('Depends on:', WPACU_PLUGIN_NAME).'</strong> '.implode(', ', $obj->deps);
|
221 |
}
|
222 |
|
223 |
+
if (isset($obj->ver) && $obj->ver !== '') {
|
224 |
$extraInfo[] = '<strong>'.__('Version:', WPACU_PLUGIN_NAME).'</strong> '.$obj->ver;
|
225 |
}
|
226 |
|
227 |
+
if (isset($obj->position) && $obj->position !== '') {
|
228 |
+
$extraInfo[] = '<strong>'.__('Position:', WPACU_PLUGIN_NAME).'</strong> '.(($obj->position === 'head') ? 'HEAD' : 'BODY');
|
229 |
}
|
230 |
|
231 |
// [wpacu_lite]
|
238 |
?>
|
239 |
|
240 |
<!-- [wpacu_lite] -->
|
241 |
+
<?php if (isset($obj->src) && $obj->src !== '') { ?>
|
242 |
<div class="wpacu-script-attributes-area wpacu-lite">
|
243 |
<p>If loaded (not unloaded by any of the rules above), apply the following attributes: <em><a class="go-pro-link-no-style" href="<?php echo WPACU_PLUGIN_GO_PRO_URL; ?>">* this option is available in Pro version</a></em></p>
|
244 |
|
templates/meta-box-loaded-assets/_asset-style-rows.php
CHANGED
@@ -46,8 +46,8 @@ foreach ($data['all']['styles'] as $obj) {
|
|
46 |
}
|
47 |
?>
|
48 |
<tr class="wpacu_asset_row <?php echo $class; ?>">
|
49 |
-
<td valign="top"
|
50 |
-
<p
|
51 |
<label for="style_<?php echo $obj->handle; ?>"><?php _e('Handle:', WPACU_PLUGIN_NAME); ?> <strong><span style="color: green;"><?php echo $obj->handle; ?></span></strong></label>
|
52 |
<?php
|
53 |
if (isset($obj->wp) && $obj->wp) {
|
@@ -58,7 +58,7 @@ foreach ($data['all']['styles'] as $obj) {
|
|
58 |
?>
|
59 |
</p>
|
60 |
|
61 |
-
<div
|
62 |
<ul class="wpacu_asset_options" <?php /* [wpacu_lite] */ if ($globalUnloaded || $isPostTypeUnloaded) { /* [/wpacu_lite] */ echo 'style="display: none;"'; } ?>>
|
63 |
<li class="wpacu_unload_this_page">
|
64 |
<label class="wpacu_switch"><input class="input-unload-on-this-page" id="style_<?php echo $obj->handle; ?>" <?php /* [wpacu_lite] */ if ($globalUnloaded || $isPostTypeUnloaded) { /* [/wpacu_lite] */ echo 'disabled="disabled"'; } echo $checked; ?> name="<?php echo WPACU_PLUGIN_NAME; ?>[styles][]" type="checkbox" value="<?php echo $obj->handle; ?>" /><span class="wpacu_slider wpacu_round"></span></label> <label class="wpacu_slider_text" for="style_<?php echo $obj->handle; ?>">Unload on this page</label>
|
@@ -74,7 +74,7 @@ foreach ($data['all']['styles'] as $obj) {
|
|
74 |
?>
|
75 |
</div>
|
76 |
|
77 |
-
<div
|
78 |
<?php
|
79 |
// Unloaded Everywhere
|
80 |
if ($globalUnloaded) {
|
@@ -126,7 +126,7 @@ foreach ($data['all']['styles'] as $obj) {
|
|
126 |
</div>
|
127 |
|
128 |
<?php if ($data['bulk_unloaded_type'] === 'post_type') { ?>
|
129 |
-
<div
|
130 |
<?php } ?>
|
131 |
|
132 |
<?php
|
@@ -209,7 +209,7 @@ foreach ($data['all']['styles'] as $obj) {
|
|
209 |
</li>
|
210 |
</ul>
|
211 |
<?php
|
212 |
-
if (isset($obj->src) && $obj->src
|
213 |
?>
|
214 |
<p><strong><?php _e('Source:', WPACU_PLUGIN_NAME); ?></strong> <a target="_blank" href="<?php echo $obj->srcHref; ?>"><?php echo $obj->src; ?></a></p>
|
215 |
<?php }
|
46 |
}
|
47 |
?>
|
48 |
<tr class="wpacu_asset_row <?php echo $class; ?>">
|
49 |
+
<td valign="top">
|
50 |
+
<p class="wpacu_handle">
|
51 |
<label for="style_<?php echo $obj->handle; ?>"><?php _e('Handle:', WPACU_PLUGIN_NAME); ?> <strong><span style="color: green;"><?php echo $obj->handle; ?></span></strong></label>
|
52 |
<?php
|
53 |
if (isset($obj->wp) && $obj->wp) {
|
58 |
?>
|
59 |
</p>
|
60 |
|
61 |
+
<div class="wpacu_asset_options_wrap">
|
62 |
<ul class="wpacu_asset_options" <?php /* [wpacu_lite] */ if ($globalUnloaded || $isPostTypeUnloaded) { /* [/wpacu_lite] */ echo 'style="display: none;"'; } ?>>
|
63 |
<li class="wpacu_unload_this_page">
|
64 |
<label class="wpacu_switch"><input class="input-unload-on-this-page" id="style_<?php echo $obj->handle; ?>" <?php /* [wpacu_lite] */ if ($globalUnloaded || $isPostTypeUnloaded) { /* [/wpacu_lite] */ echo 'disabled="disabled"'; } echo $checked; ?> name="<?php echo WPACU_PLUGIN_NAME; ?>[styles][]" type="checkbox" value="<?php echo $obj->handle; ?>" /><span class="wpacu_slider wpacu_round"></span></label> <label class="wpacu_slider_text" for="style_<?php echo $obj->handle; ?>">Unload on this page</label>
|
74 |
?>
|
75 |
</div>
|
76 |
|
77 |
+
<div class="wpacu_asset_options_wrap">
|
78 |
<?php
|
79 |
// Unloaded Everywhere
|
80 |
if ($globalUnloaded) {
|
126 |
</div>
|
127 |
|
128 |
<?php if ($data['bulk_unloaded_type'] === 'post_type') { ?>
|
129 |
+
<div class="wpacu_asset_options_wrap">
|
130 |
<?php } ?>
|
131 |
|
132 |
<?php
|
209 |
</li>
|
210 |
</ul>
|
211 |
<?php
|
212 |
+
if (isset($obj->src) && $obj->src !== '') {
|
213 |
?>
|
214 |
<p><strong><?php _e('Source:', WPACU_PLUGIN_NAME); ?></strong> <a target="_blank" href="<?php echo $obj->srcHref; ?>"><?php echo $obj->src; ?></a></p>
|
215 |
<?php }
|
templates/meta-box-loaded.php
CHANGED
@@ -115,7 +115,7 @@ if (isset($data['page_template'])) {
|
|
115 |
<?php
|
116 |
}
|
117 |
|
118 |
-
include_once
|
119 |
|
120 |
/*
|
121 |
Bug Fix: Make sure that savePost() from Update class is triggered ONLY if the meta box is loaded
|
115 |
<?php
|
116 |
}
|
117 |
|
118 |
+
include_once __DIR__.'/meta-box-loaded-assets/default.php';
|
119 |
|
120 |
/*
|
121 |
Bug Fix: Make sure that savePost() from Update class is triggered ONLY if the meta box is loaded
|
templates/settings-frontend.php
CHANGED
@@ -9,14 +9,14 @@ if (! isset($data)) {
|
|
9 |
|
10 |
<form action="#wpacu_wrap_assets" method="post">
|
11 |
<div id="wpacu_wrap_assets">
|
12 |
-
<h1
|
13 |
<?php
|
14 |
if ($data['is_updateable']) {
|
15 |
?>
|
16 |
<p><small>* this area is shown only for the admin users and if "Manage in the Front-end?" was selected in the plugin's settings</small></p>
|
17 |
<p><small>* 'admin-bar' and 'wpassetcleanup-style' are not included as they are irrelevant since they are used by the plugin for this area</small></p>
|
18 |
<?php
|
19 |
-
if ($data['
|
20 |
?>
|
21 |
<p><strong><span style="color: #0f6cab;" class="dashicons dashicons-cart"></span> This a WooCommerce shop page ('product' type archive). Unloading assets will also take effect for the pagination/sorting pages (e.g. /2, /3, /?orderby=popularity etc.).</strong></p>
|
22 |
<?php
|
@@ -81,7 +81,7 @@ if (! isset($data)) {
|
|
81 |
name="submit"><span class="dashicons dashicons-update"></span> <?php esc_attr_e('UPDATE', WPACU_PLUGIN_NAME); ?></button>
|
82 |
</div>
|
83 |
|
84 |
-
<p align="right"><small>Powered by
|
85 |
<?php } ?>
|
86 |
</div>
|
87 |
|
9 |
|
10 |
<form action="#wpacu_wrap_assets" method="post">
|
11 |
<div id="wpacu_wrap_assets">
|
12 |
+
<h1><?php echo WPACU_PLUGIN_TITLE; ?></h1>
|
13 |
<?php
|
14 |
if ($data['is_updateable']) {
|
15 |
?>
|
16 |
<p><small>* this area is shown only for the admin users and if "Manage in the Front-end?" was selected in the plugin's settings</small></p>
|
17 |
<p><small>* 'admin-bar' and 'wpassetcleanup-style' are not included as they are irrelevant since they are used by the plugin for this area</small></p>
|
18 |
<?php
|
19 |
+
if ($data['is_woo_shop_page']) {
|
20 |
?>
|
21 |
<p><strong><span style="color: #0f6cab;" class="dashicons dashicons-cart"></span> This a WooCommerce shop page ('product' type archive). Unloading assets will also take effect for the pagination/sorting pages (e.g. /2, /3, /?orderby=popularity etc.).</strong></p>
|
22 |
<?php
|
81 |
name="submit"><span class="dashicons dashicons-update"></span> <?php esc_attr_e('UPDATE', WPACU_PLUGIN_NAME); ?></button>
|
82 |
</div>
|
83 |
|
84 |
+
<p align="right"><small>Powered by <?php echo WPACU_PLUGIN_TITLE; ?> (lite version), version <?php echo WPACU_PLUGIN_VERSION; ?></small></p>
|
85 |
<?php } ?>
|
86 |
</div>
|
87 |
|
wpacu-load.php
CHANGED
@@ -54,3 +54,6 @@ new \WpAssetCleanUp\Menu;
|
|
54 |
|
55 |
// Plugin (Various Hooks)
|
56 |
new \WpAssetCleanUp\Plugin;
|
|
|
|
|
|
54 |
|
55 |
// Plugin (Various Hooks)
|
56 |
new \WpAssetCleanUp\Plugin;
|
57 |
+
|
58 |
+
// Admin Bar (Top Area of the website when user is logged in)
|
59 |
+
new \WpAssetCleanUp\AdminBar();
|
wpacu.php
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
/*
|
3 |
* Plugin Name: Asset CleanUp: Page Speed Booster
|
4 |
* Plugin URI: https://wordpress.org/plugins/wp-asset-clean-up/
|
5 |
-
* Version: 1.2.8
|
6 |
* Description: Prevent Chosen Scripts & Styles from loading in Posts/Pages to reduce HTTP Requests and have the website load faster
|
7 |
* Author: Gabriel Livan
|
8 |
* Author URI: http://www.gabelivan.com/
|
9 |
*/
|
10 |
|
11 |
-
define('WPACU_PLUGIN_VERSION', '1.2.8');
|
12 |
|
13 |
// Exit if accessed directly
|
14 |
if (! defined('ABSPATH')) {
|
@@ -22,13 +22,15 @@ if (! defined('ABSPATH')) {
|
|
22 |
|
23 |
// If the pro version (version above 1.0.2) was triggered first, we'll just check one of its constants
|
24 |
// If the lite version was triggered first, then we'll check if the pro version is active
|
25 |
-
if (defined('WPACU_PRO_NO_LITE_NEEDED') &&
|
|
|
26 |
return;
|
27 |
}
|
28 |
|
29 |
-
define('WPACU_PLUGIN_NAME',
|
30 |
-
define('
|
31 |
-
define('
|
|
|
32 |
|
33 |
// Do not load the plugin if the PHP version is below 5.3
|
34 |
// If PHP_VERSION_ID is not defined, then PHP version is below 5.2.7, thus the plugin is not usable
|
@@ -56,7 +58,7 @@ if ($wpacuWrongPhp && is_admin()) { // Dashboard
|
|
56 |
function wpAssetCleanUpWrongPhpNotice()
|
57 |
{
|
58 |
echo '<div class="error is-dismissible"><p>'.
|
59 |
-
__('<strong>
|
60 |
'</p></div>';
|
61 |
|
62 |
if (array_key_exists('active', $_GET)) {
|
2 |
/*
|
3 |
* Plugin Name: Asset CleanUp: Page Speed Booster
|
4 |
* Plugin URI: https://wordpress.org/plugins/wp-asset-clean-up/
|
5 |
+
* Version: 1.2.8.1
|
6 |
* Description: Prevent Chosen Scripts & Styles from loading in Posts/Pages to reduce HTTP Requests and have the website load faster
|
7 |
* Author: Gabriel Livan
|
8 |
* Author URI: http://www.gabelivan.com/
|
9 |
*/
|
10 |
|
11 |
+
define('WPACU_PLUGIN_VERSION', '1.2.8.1');
|
12 |
|
13 |
// Exit if accessed directly
|
14 |
if (! defined('ABSPATH')) {
|
22 |
|
23 |
// If the pro version (version above 1.0.2) was triggered first, we'll just check one of its constants
|
24 |
// If the lite version was triggered first, then we'll check if the pro version is active
|
25 |
+
if ( defined('WPACU_PRO_NO_LITE_NEEDED') && WPACU_PRO_NO_LITE_NEEDED !== false
|
26 |
+
&& defined('WPACU_PRO_PLUGIN_VERSION') && WPACU_PRO_PLUGIN_VERSION !== false ) {
|
27 |
return;
|
28 |
}
|
29 |
|
30 |
+
define('WPACU_PLUGIN_NAME', 'wpassetcleanup');
|
31 |
+
define('WPACU_PLUGIN_TITLE', 'Asset CleanUp');
|
32 |
+
define('WPACU_PLUGIN_FILE', __FILE__);
|
33 |
+
define('WPACU_PLUGIN_BASE', plugin_basename(WPACU_PLUGIN_FILE));
|
34 |
|
35 |
// Do not load the plugin if the PHP version is below 5.3
|
36 |
// If PHP_VERSION_ID is not defined, then PHP version is below 5.2.7, thus the plugin is not usable
|
58 |
function wpAssetCleanUpWrongPhpNotice()
|
59 |
{
|
60 |
echo '<div class="error is-dismissible"><p>'.
|
61 |
+
__('<strong>'.WPACU_PLUGIN_TITLE.'</strong> requires <span style="color: green;"><strong>5.3+</strong> PHP version</span> installed. You have <strong>'.PHP_VERSION.'</strong>. If you\'re website is compatible with PHP 7+ (e.g. you can check with your developers or contact the hosting company), it\'s strongly recommended to upgrade for a better performance. The plugin has been deactivated.', WPACU_PLUGIN_NAME).
|
62 |
'</p></div>';
|
63 |
|
64 |
if (array_key_exists('active', $_GET)) {
|