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:
37
wp-content/plugins/wp-super-cache/inc/delete-cache-button.js
Normal file
37
wp-content/plugins/wp-super-cache/inc/delete-cache-button.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/* global wpsc_ajax */
|
||||
( function ( $ ) {
|
||||
$( document ).ready( function () {
|
||||
$( '#wp-admin-bar-delete-cache' ).on( 'click', function () {
|
||||
$( '#wp-admin-bar-delete-cache' ).fadeOut( 'slow' );
|
||||
$.ajax( {
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
url: wpsc_ajax.ajax_url,
|
||||
data: {
|
||||
// wp ajax action
|
||||
action: 'ajax-delete-cache',
|
||||
|
||||
path: wpsc_ajax.path,
|
||||
admin: wpsc_ajax.admin,
|
||||
|
||||
// send the nonce along with the request
|
||||
nonce: wpsc_ajax.nonce,
|
||||
},
|
||||
success: function () {
|
||||
if ( wpsc_ajax.admin === '1' ) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log( 'Deleted entire cache' );
|
||||
} else {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log( 'Deleted cache for this page and reloading' );
|
||||
}
|
||||
window.location.reload();
|
||||
},
|
||||
complete: function () {
|
||||
$( '#wp-admin-bar-delete-cache' ).fadeIn( 'slow' );
|
||||
},
|
||||
} );
|
||||
return false;
|
||||
} );
|
||||
} );
|
||||
} )( jQuery );
|
||||
Reference in New Issue
Block a user