// Disabilita l'accesso alle REST API per gli utenti non autenticati add_filter( 'rest_authentication_errors', function( $result ) { if ( ! is_user_logged_in() ) { return new WP_Error( 'rest_forbidden', 'Accesso non autorizzato', array( 'status' => 403 ) ); } return $result; }); remove_action('template_redirect', 'wp_shortlink_header', 11); remove_action('wp_head', 'wp_generator'); add_filter('the_generator', '__return_empty_string'); add_filter('xmlrpc_enabled', '__return_false');