feat: caching, optimization, legal pages & footer

- WP Super Cache enabled (PHP mode, gzip, Nginx compatible)
- Autoptimize: CSS/HTML minification + deferred JS + Google Fonts optimization
- Cookie Notice: GDPR/LOPD banner styled with brand colors (navy/burgundy/gold)
- Legal pages: Aviso Legal, Política de Privacidad, Política de Cookies (ES)
- MU-plugin: custom footer with legal links + Cloud Host credit
- Footer: copyright, legal nav, Hosted & Maintained by Cloud Host (cloudhost.es)
- Security: X-Frame-Options, X-Content-Type, Referrer-Policy headers
- Security: XML-RPC disabled, REST user enumeration blocked
- Performance: emoji scripts removed, post revisions limited to 3
This commit is contained in:
Malin
2026-05-19 19:58:11 +02:00
parent 67241f537f
commit 6daabcab65
277 changed files with 96841 additions and 0 deletions

View File

@@ -0,0 +1,221 @@
tr[data-slug="autoptimize"] span.deactivate{
position: relative;
}
.ao-feedback {
background: #fff;
max-width: 400px;
z-index: 10000;
box-shadow: 0 0 15px -5px rgba(0, 0, 0, .5);
transition: all .3s ease-out;
}
.ao-feedback .popup--header {
position: relative;
background-color: #e5e5e5;
}
.ao-feedback .popup--header h5 {
margin: 0;
font-size: 16px;
padding: 10px 15px;
color: #222;
font-weight: 900;
text-align: left;
}
.ao-feedback .popup--body {
padding: 15px;
padding-top: 5px;
}
.ao-feedback .popup--form {
margin: 0;
font-size: 13px;
padding-top: 10px;
}
.ao-feedback .popup--form input[type="radio"] {
margin: 0 10px 0 0;
}
.ao-feedback .popup--form input[type="radio"]:checked ~ textarea {
display: block;
}
.ao-feedback .popup--form textarea {
width: 100%;
margin: 10px 0 0;
display: none;
max-height: 150px;
}
.ao-feedback .popup--form input[type='email'] {
width: 100%;
margin: 10px 0 0;
}
.ao-feedback .popup--form input[type='email']:invalid {
color:red;
border-color:red;
}
.ao-feedback .popup--form p.last-attempt {
display: none;
}
.ao-feedback li {
display: flex;
align-items: center;
margin-bottom: 15px;
flex-wrap: wrap;
}
.ao-feedback li label {
max-width: 90%;
}
.ao-feedback li:last-child {
margin-bottom: 0;
}
.ao-feedback .popup--footer {
padding: 0 15px 15px;
}
.ao-feedback .actions {
display: flex;
flex-wrap: wrap;
}
.info-disclosure-link {
width: 100%;
margin-bottom: 15px;
}
.ao-feedback .info-disclosure-content {
max-height: 0;
overflow: hidden;
width: 100%;
transition: .3s ease;
}
.ao-feedback .info-disclosure-content.active {
max-height: 300px;
}
.ao-feedback .info-disclosure-content p {
margin: 0;
}
.ao-feedback .info-disclosure-content ul {
margin: 10px 0;
border-radius: 3px;
}
.ao-feedback .info-disclosure-content ul li {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0;
padding: 5px 0;
border-bottom: 1px solid #ccc;
}
.ao-feedback .buttons {
display: flex;
width: 100%;
}
.ao-feedback .buttons input:nth-child(2) {
margin: auto;
}
.ao-feedback .buttons input:last-child {
margin-left: auto;
}
.ao-plugin-uninstall-feedback-popup .popup--header:before {
content: "";
display: block;
position: absolute;
border: 20px solid #e5e5e5;
left: -10px;
top: 50%;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-left: 0;
transform: translateY(-50%);
}
.ao-plugin-uninstall-feedback-popup {
display: none;
position: absolute;
white-space: normal;
width: 400px;
left: 122%;
top: -21px;
}
.ao-plugin-uninstall-feedback-popup.sending-feedback .popup--body i {
animation: rotation 2s infinite linear;
display: block;
float: none;
align-items: center;
width: 100%;
margin: 0 auto;
height: 100%;
background: transparent;
padding: 0;
}
.ao-plugin-uninstall-feedback-popup.sending-feedback .popup--body i:before {
padding: 0;
background: transparent;
box-shadow: none;
color: #b4b9be
}
.ao-plugin-uninstall-feedback-popup.active {
display: block;
}
body.ao-feedback-open .ao-feedback-overlay {
content: "";
display: block;
background-color: rgba(0, 0, 0, 0.5);
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 10000;
position: fixed;
}
.rtl .ao-plugin-uninstall-feedback-popup {
left: -500px;
}
.rtl .ao-feedback .popup--header h5 {
text-align: right;
}
.rtl .ao-plugin-uninstall-feedback-popup .popup--header:before {
display:none;
}
@media (max-width: 768px) {
.ao-plugin-uninstall-feedback-popup, .rtl .ao-plugin-uninstall-feedback-popup {
position: fixed;
max-width: 100%;
margin: 0 auto;
left: 50%;
top: 50px;
transform: translateX(-50%);
}
.ao-plugin-uninstall-feedback-popup .popup--header:before {
display: none;
}
}

View File

@@ -0,0 +1,122 @@
(function ($) {
$(document).ready(function () {
var targetElement = 'tr[data-slug="autoptimize"] span.deactivate a';
var redirectUrl = $(targetElement).attr('href');
if ($('.ao-feedback-overlay').length === 0) {
$('body').prepend('<div class="ao-feedback-overlay"></div>');
}
$('#ao_uninstall_feedback_popup').appendTo($(targetElement).parent());
$(targetElement).on('click', function (e) {
e.preventDefault();
$('#ao_uninstall_feedback_popup ').addClass('active');
$('body').addClass('ao-feedback-open');
$('.ao-feedback-overlay').on('click', function () {
$('#ao_uninstall_feedback_popup ').removeClass('active');
$('body').removeClass('ao-feedback-open');
});
});
$('#ao_uninstall_feedback_popup .info-disclosure-link').on('click', function (e) {
e.preventDefault();
$(this).parent().find('.info-disclosure-content').toggleClass('active');
});
$('#ao_uninstall_feedback_popup input[type="radio"]').on('change', function () {
var radio = $(this);
$('p.last-attempt').hide();
if (radio.parent().find('textarea').length > 0 &&
radio.parent().find('textarea').val().length === 0) {
$('#ao_uninstall_feedback_popup #ao-deactivate-yes').attr('disabled', 'disabled');
radio.parent().find('textarea').on('keyup', function (e) {
if ($(this).val().length === 0) {
$('#ao_uninstall_feedback_popup #ao-deactivate-yes').attr('disabled', 'disabled');
} else if ( $('#ao_feedback998')[0].checkValidity() == true ) {
$('#ao_uninstall_feedback_popup #ao-deactivate-yes').removeAttr('disabled');
}
});
} else {
if ( $('#ao_feedback998')[0].checkValidity() == true ) {
$('#ao_uninstall_feedback_popup #ao-deactivate-yes').removeAttr('disabled');
}
$(this).siblings('p.last-attempt').show();
}
});
$('#ao_feedback998').on('keyup', function (e) {
email_node = $(this);
email_val = email_node.val();
if ( email_val.length > 0 && email_node[0].checkValidity() == false ) {
$('#ao_uninstall_feedback_popup #ao-deactivate-yes').attr('disabled', 'disabled');
} else if ( $( '#ao_uninstall_feedback_popup input[name="ao-deactivate-option"]:checked' ).length > 0 ) {
$('#ao_uninstall_feedback_popup #ao-deactivate-yes').removeAttr('disabled');
}
});
$('#ao_uninstall_feedback_popup #ao-deactivate-no').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
$(targetElement).unbind('click');
$('body').removeClass('ao-feedback-open');
$('#ao_uninstall_feedback_popup').remove();
if (redirectUrl !== '') {
location.href = redirectUrl;
}
});
$('#ao_uninstall_feedback_popup #ao-deactivate-cancel').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
$('#ao_uninstall_feedback_popup ').removeClass('active');
$('body').removeClass('ao-feedback-open');
});
$('#ao_feedback_email_toggle').on('click', function (e) {
$('#ao_feedback998').toggle();
});
$('#ao_uninstall_feedback_popup #ao-deactivate-yes').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
$(targetElement).unbind('click');
var modal_data = JSON.parse(atob($('#ao_uninstall_feedback_popup').data('modal')))
var selectedOption = $( '#ao_uninstall_feedback_popup input[name="ao-deactivate-option"]:checked' );
var reason;
if( selectedOption.attr("id") === "ao_feedback999" ){
reason = 'Other: ' + selectedOption.parent().find('textarea').val().trim()
}else{
reason = selectedOption.parent().find('label').attr('data-reason').trim()
}
var data = {
'url': modal_data.home,
'reason': reason,
'type': 'WP ' + $('#core_version').text().trim(),
'version' : 'AO ' + $('#ao_plugin_version').text().trim(),
'email': $('#ao_feedback998').val().trim(),
};
$.ajax({
type: 'POST',
url: atob( modal_data.dest ),
data: data,
complete() {
$('body').removeClass('ao-feedback-open');
$('#ao_uninstall_feedback_popup').remove();
if (redirectUrl !== '') {
location.href = redirectUrl;
}
},
beforeSend() {
$('#ao_uninstall_feedback_popup').addClass('sending-feedback');
$('#ao_uninstall_feedback_popup .popup--footer').remove();
$('#ao_uninstall_feedback_popup .popup--body').html('<i class="dashicons dashicons-update-alt"></i>');
}
});
});
});
})(jQuery);

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -0,0 +1,246 @@
/* Loading Modal */
.autoptimize-loading
{
display: none;
position: fixed;
background-color: rgba(102, 102, 102, 0.8);
background-image: url('loading.gif');
background-position: center;
background-repeat: no-repeat;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9000000000;
}
/* Toolbar Font Colors */
#wp-admin-bar-autoptimize .white
{
color: #EEE;
}
#wp-admin-bar-autoptimize .green
{
color: #26BD26;
}
#wp-admin-bar-autoptimize .orange
{
color: #EC9103;
}
#wp-admin-bar-autoptimize .red
{
color: #EA1919;
}
#wp-admin-bar-autoptimize .bg-green
{
background: #26BD26;
}
#wp-admin-bar-autoptimize .bg-orange
{
background: #EC9103;
}
#wp-admin-bar-autoptimize .bg-red
{
background: #EA1919;
}
/* Toolbar Bullet Icons */
#wp-admin-bar-autoptimize.bullet-green .ab-icon::before,
#wp-admin-bar-autoptimize.bullet-green:hover .ab-icon::before
{
content: "\f159";
color: #02CA02;
font-size: 14px;
}
#wp-admin-bar-autoptimize.bullet-orange .ab-icon::before,
#wp-admin-bar-autoptimize.bullet-orange:hover .ab-icon::before
{
content: "\f159";
color: #EC9103;
font-size: 14px;
}
#wp-admin-bar-autoptimize.bullet-red .ab-icon::before,
#wp-admin-bar-autoptimize.bullet-red:hover .ab-icon::before
{
content: "\f159";
color: #EA1919;
font-size: 14px;
-webkit-animation: blink 1s step-end infinite;
animation: blink 1s step-end infinite;
}
@-webkit-keyframes blink { 50% { visibility: hidden; }}
@keyframes blink { 50% { visibility: hidden; }}
/* Some cosmetic Toolbar things */
#wp-admin-bar-autoptimize table, #wp-admin-bar-autoptimize th, #wp-admin-bar-autoptimize td
{
border: 0px !important;
}
#wp-admin-bar-autoptimize-default
{
padding-top: 0 !important;
}
#wp-admin-bar-autoptimize-delete-cache .ab-item
{
cursor: pointer !important;
background: #464b50;
}
#wp-admin-bar-autoptimize-delete-cache .ab-item:hover
{
color: rgba(240,245,250,0.85) !important;
background: #B57373 !important;
}
#wp-admin-bar-autoptimize-cache-info
{
padding-top: 8px !important;
padding-bottom: 8px !important;
}
#wp-admin-bar-autoptimize-cache-info,
#wp-admin-bar-autoptimize-cache-info .ab-item
{
height: auto !important;
cursor: default !important;
}
#wp-admin-bar-autoptimize-cache-info td + td
{
padding-left: 3px;
}
#wp-admin-bar-autoptimize-cache-info .ab-item,
#wp-admin-bar-autoptimize-cache-info .ab-item:hover
{
color: #b4b9be !important;
}
#wp-admin-bar-autoptimize-cache-info .ab-item > p
{
display: block;
}
#wp-admin-bar-autoptimize-cache-info .ab-item p,
#wp-admin-bar-autoptimize-cache-info .ab-item td
{
font-size: 11px !important;
line-height: 16px !important;
}
#wp-admin-bar-autoptimize-cache-info .ab-item table
{
display: inline-block !important;
margin-left: 10px !important;
}
/* Radial Bar */
.autoptimize-radial-bar
{
display: inline-block !important;
margin-top: 5px !important;
}
.autoptimize-radial-bar,
.autoptimize-radial-bar .mask,
.autoptimize-radial-bar .fill,
.autoptimize-radial-bar .shadow
{
width : 36px !important;
height : 36px !important;
}
.autoptimize-radial-bar
{
background-color : #d6dadc;
}
.autoptimize-radial-bar .fill
{
background-color : #02ca02;
}
.autoptimize-radial-bar .numbers
{
color : #02ca02;
}
.autoptimize-radial-bar .mask
{
clip : rect(0px, 36px, 36px, 18px);
}
.autoptimize-radial-bar .fill
{
clip : rect(0px, 18px, 36px, 0px);
}
.autoptimize-radial-bar .inset
{
width : 26px !important;
height : 26px !important;
margin-left : 5px !important;
margin-top : 5px !important;
background-color : #32373c;
}
.autoptimize-radial-bar .percentage
{
width : 26px !important;
height : 16px !important;
line-height : 11px !important;
top : 7px !important;
left : 0px !important;
overflow : hidden;
}
.autoptimize-radial-bar .numbers
{
width : 26px !important;
font-weight : 600 !important;
font-size : 9px !important;
margin-top : -5px !important;
display : inline-block;
vertical-align : top;
text-align : center;
}
.autoptimize-radial-bar .inset
{
box-shadow : 3px 3px 5px rgba(0,0,0,0.3) !important;
}
.autoptimize-radial-bar .shadow
{
box-shadow : 3px 3px 5px rgba(0,0,0,0.3) inset !important;
}
.autoptimize-radial-bar .mask,
.autoptimize-radial-bar .fill,
.autoptimize-radial-bar .shadow,
.autoptimize-radial-bar .inset,
.autoptimize-radial-bar .percentage
{
position : absolute !important;
}
.autoptimize-radial-bar,
.autoptimize-radial-bar .mask,
.autoptimize-radial-bar .fill,
.autoptimize-radial-bar .shadow,
.autoptimize-radial-bar .inset
{
border-radius : 50% !important;
}
/* fixes for toolbar on frontend for other themes messing things up */
#wp-admin-bar-autoptimize tr{border:0 !important}
#wp-admin-bar-autoptimize td{background-color:#32373c !important}

View File

@@ -0,0 +1,82 @@
jQuery( document ).ready(function()
{
var percentage = jQuery( '#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar' ).attr('percentage');
var rotate = percentage * 1.8;
jQuery( '#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .mask.full, #wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .fill' ).css({
'-webkit-transform' : 'rotate(' + rotate + 'deg)',
'-ms-transform' : 'rotate(' + rotate + 'deg)',
'transform' : 'rotate(' + rotate + 'deg)'
});
// Fix Background color of circle percentage & delete cache to fit with the current color theme
jQuery( '#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .inset' ).css( 'background-color', jQuery( '#wp-admin-bar-autoptimize .ab-sub-wrapper' ).css( 'background-color') );
jQuery( '#wp-admin-bar-autoptimize-delete-cache .ab-item' ).css( 'background-color', jQuery( '#wpadminbar' ).css( 'background-color') );
jQuery( '#wp-admin-bar-autoptimize-default li' ).on('click', function(e)
{
var id = ( typeof e.target.id != 'undefined' && e.target.id ) ? e.target.id : jQuery( e.target ).parent( 'li' ).attr( 'id' );
var action = '';
if( id == 'wp-admin-bar-autoptimize-delete-cache' ){
action = 'autoptimize_delete_cache';
} else {
return;
}
// Remove the class "hover" from drop-down Autoptimize menu to hide it.
jQuery( '#wp-admin-bar-autoptimize' ).removeClass( 'hover' );
// Create and Show the Autoptimize Loading Modal
var modal_loading = jQuery( '<div class="autoptimize-loading"></div>' ).appendTo( 'body' ).show();
var success = function() {
// Reset output values & class names of cache info
jQuery( '#wp-admin-bar-autoptimize-cache-info .size' ).attr( 'class', 'size green' ).html( '0.00 B' );
jQuery( '#wp-admin-bar-autoptimize-cache-info .files' ).html( '0' );
jQuery( '#wp-admin-bar-autoptimize-cache-info .percentage .numbers' ).attr( 'class', 'numbers green' ).html( '0%' );
jQuery( '#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .fill' ).attr( 'class', 'fill bg-green' );
// Reset the class names of bullet icon
jQuery( '#wp-admin-bar-autoptimize' ).attr( 'class', 'menupop bullet-green' );
// Reset the Radial Bar progress
jQuery( '#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .mask.full, #wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .fill' ).css({
'-webkit-transform' : 'rotate(0deg)',
'-ms-transform' : 'rotate(0deg)',
'transform' : 'rotate(0deg)'
});
};
var notice = function() {
jQuery( '<div id="ao-delete-cache-timeout" class="notice notice-error is-dismissible"><p><strong><span style="display:block;clear:both;">' + autoptimize_ajax_object.error_msg + '</span></strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' + autoptimize_ajax_object.dismiss_msg + '</span></button></div><br>' ).insertAfter( '#wpbody .wrap h1:first-of-type' ).show();
};
jQuery.ajax({
type : 'GET',
url : autoptimize_ajax_object.ajaxurl,
data : {'action':action, 'nonce':autoptimize_ajax_object.nonce},
dataType : 'json',
cache : false,
timeout : 9000,
success : function( cleared )
{
// Remove the Autoptimize Loading Modal
modal_loading.remove();
if ( cleared ) {
success();
} else {
notice();
}
},
error: function( jqXHR, textStatus )
{
// Remove the Autoptimize Loading Modal
modal_loading.remove();
// WordPress Admin Notice
notice();
}
});
});
});

View File

@@ -0,0 +1 @@
.autoptimize-loading{display:none;position:fixed;background-color:rgba(102,102,102,.8);background-image:url(loading.gif);background-position:center;background-repeat:no-repeat;top:0;left:0;width:100%;height:100%;z-index:9000000000}#wp-admin-bar-autoptimize .white{color:#eee}#wp-admin-bar-autoptimize .green{color:#26bd26}#wp-admin-bar-autoptimize .orange{color:#ec9103}#wp-admin-bar-autoptimize .red{color:#ea1919}#wp-admin-bar-autoptimize .bg-green{background:#26bd26}#wp-admin-bar-autoptimize .bg-orange{background:#ec9103}#wp-admin-bar-autoptimize .bg-red{background:#ea1919}#wp-admin-bar-autoptimize.bullet-green .ab-icon:before,#wp-admin-bar-autoptimize.bullet-green:hover .ab-icon:before{content:"\f159";color:#02ca02;font-size:14px}#wp-admin-bar-autoptimize.bullet-orange .ab-icon:before,#wp-admin-bar-autoptimize.bullet-orange:hover .ab-icon:before{content:"\f159";color:#ec9103;font-size:14px}#wp-admin-bar-autoptimize.bullet-red .ab-icon:before,#wp-admin-bar-autoptimize.bullet-red:hover .ab-icon:before{content:"\f159";color:#ea1919;font-size:14px;-webkit-animation:blink 1s step-end infinite;animation:blink 1s step-end infinite}@-webkit-keyframes blink{50%{visibility:hidden}}@keyframes blink{50%{visibility:hidden}}#wp-admin-bar-autoptimize table,#wp-admin-bar-autoptimize th,#wp-admin-bar-autoptimize td{border:0 !important}#wp-admin-bar-autoptimize-default{padding-top:0 !important}#wp-admin-bar-autoptimize-delete-cache .ab-item{cursor:pointer !important;background:#464b50}#wp-admin-bar-autoptimize-delete-cache .ab-item:hover{color:rgba(240,245,250,.85) !important;background:#b57373 !important}#wp-admin-bar-autoptimize-cache-info{padding-top:8px !important;padding-bottom:8px !important}#wp-admin-bar-autoptimize-cache-info,#wp-admin-bar-autoptimize-cache-info .ab-item{height:auto !important;cursor:default !important}#wp-admin-bar-autoptimize-cache-info td+td{padding-left:3px}#wp-admin-bar-autoptimize-cache-info .ab-item,#wp-admin-bar-autoptimize-cache-info .ab-item:hover{color:#b4b9be !important}#wp-admin-bar-autoptimize-cache-info .ab-item>p{display:block}#wp-admin-bar-autoptimize-cache-info .ab-item p,#wp-admin-bar-autoptimize-cache-info .ab-item td{font-size:11px !important;line-height:16px !important}#wp-admin-bar-autoptimize-cache-info .ab-item table{display:inline-block !important;margin-left:10px !important}.autoptimize-radial-bar{display:inline-block !important;margin-top:5px !important}.autoptimize-radial-bar,.autoptimize-radial-bar .mask,.autoptimize-radial-bar .fill,.autoptimize-radial-bar .shadow{width:36px !important;height:36px !important}.autoptimize-radial-bar{background-color:#d6dadc}.autoptimize-radial-bar .fill{background-color:#02ca02}.autoptimize-radial-bar .numbers{color:#02ca02}.autoptimize-radial-bar .mask{clip:rect(0px,36px,36px,18px)}.autoptimize-radial-bar .fill{clip:rect(0px,18px,36px,0px)}.autoptimize-radial-bar .inset{width:26px !important;height:26px !important;margin-left:5px !important;margin-top:5px !important;background-color:#32373c}.autoptimize-radial-bar .percentage{width:26px !important;height:16px !important;line-height:11px !important;top:7px !important;left:0 !important;overflow:hidden}.autoptimize-radial-bar .numbers{width:26px !important;font-weight:600 !important;font-size:9px !important;margin-top:-5px !important;display:inline-block;vertical-align:top;text-align:center}.autoptimize-radial-bar .inset{box-shadow:3px 3px 5px rgba(0,0,0,.3) !important}.autoptimize-radial-bar .shadow{box-shadow:3px 3px 5px rgba(0,0,0,.3) inset !important}.autoptimize-radial-bar .mask,.autoptimize-radial-bar .fill,.autoptimize-radial-bar .shadow,.autoptimize-radial-bar .inset,.autoptimize-radial-bar .percentage{position:absolute !important}.autoptimize-radial-bar,.autoptimize-radial-bar .mask,.autoptimize-radial-bar .fill,.autoptimize-radial-bar .shadow,.autoptimize-radial-bar .inset{border-radius:50% !important}#wp-admin-bar-autoptimize tr{border:0 !important}#wp-admin-bar-autoptimize td{background-color:#32373c !important}

View File

@@ -0,0 +1,6 @@
jQuery(document).ready(function()
{var percentage=jQuery('#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar').attr('percentage');var rotate=percentage*1.8;jQuery('#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .mask.full, #wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .fill').css({'-webkit-transform':'rotate('+rotate+'deg)','-ms-transform':'rotate('+rotate+'deg)','transform':'rotate('+rotate+'deg)'});jQuery('#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .inset').css('background-color',jQuery('#wp-admin-bar-autoptimize .ab-sub-wrapper').css('background-color'));jQuery('#wp-admin-bar-autoptimize-delete-cache .ab-item').css('background-color',jQuery('#wpadminbar').css('background-color'));jQuery('#wp-admin-bar-autoptimize-default li').on('click',function(e)
{var id=(typeof e.target.id!='undefined'&&e.target.id)?e.target.id:jQuery(e.target).parent('li').attr('id');var action='';if(id=='wp-admin-bar-autoptimize-delete-cache'){action='autoptimize_delete_cache';}else{return;}
jQuery('#wp-admin-bar-autoptimize').removeClass('hover');var modal_loading=jQuery('<div class="autoptimize-loading"></div>').appendTo('body').show();var success=function(){jQuery('#wp-admin-bar-autoptimize-cache-info .size').attr('class','size green').html('0.00 B');jQuery('#wp-admin-bar-autoptimize-cache-info .files').html('0');jQuery('#wp-admin-bar-autoptimize-cache-info .percentage .numbers').attr('class','numbers green').html('0%');jQuery('#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .fill').attr('class','fill bg-green');jQuery('#wp-admin-bar-autoptimize').attr('class','menupop bullet-green');jQuery('#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .mask.full, #wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .fill').css({'-webkit-transform':'rotate(0deg)','-ms-transform':'rotate(0deg)','transform':'rotate(0deg)'});};var notice=function(){jQuery('<div id="ao-delete-cache-timeout" class="notice notice-error is-dismissible"><p><strong><span style="display:block;clear:both;">'+autoptimize_ajax_object.error_msg+'</span></strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">'+autoptimize_ajax_object.dismiss_msg+'</span></button></div><br>').insertAfter('#wpbody .wrap h1:first-of-type').show();};jQuery.ajax({type:'GET',url:autoptimize_ajax_object.ajaxurl,data:{'action':action,'nonce':autoptimize_ajax_object.nonce},dataType:'json',cache:false,timeout:9000,success:function(cleared)
{modal_loading.remove();if(cleared){success();}else{notice();}},error:function(jqXHR,textStatus)
{modal_loading.remove();notice();}});});});