- 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
34 lines
868 B
JavaScript
34 lines
868 B
JavaScript
(function ($) {
|
|
//shorthand for ready event.
|
|
$(
|
|
function () {
|
|
$( 'div[data-dismissible] button.notice-dismiss' ).on('click',
|
|
function (event) {
|
|
event.preventDefault();
|
|
var $this = $( this );
|
|
|
|
var attr_value, option_name, dismissible_length, data;
|
|
|
|
attr_value = $this.parent().attr( 'data-dismissible' ).split( '-' );
|
|
|
|
// remove the dismissible length from the attribute value and rejoin the array.
|
|
dismissible_length = attr_value.pop();
|
|
|
|
option_name = attr_value.join( '-' );
|
|
|
|
data = {
|
|
'action': 'dismiss_admin_notice',
|
|
'option_name': option_name,
|
|
'dismissible_length': dismissible_length,
|
|
'nonce': dismissible_notice.nonce
|
|
};
|
|
|
|
// We can also pass the url value separately from ajaxurl for front end AJAX implementations
|
|
$.post( ajaxurl, data );
|
|
}
|
|
);
|
|
}
|
|
)
|
|
|
|
}(jQuery));
|