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);