diff --git a/gdpr-content-blocker/assets/admin.js b/gdpr-content-blocker/assets/admin.js
index 73a3c26..74a84b7 100644
--- a/gdpr-content-blocker/assets/admin.js
+++ b/gdpr-content-blocker/assets/admin.js
@@ -222,9 +222,18 @@
}
$tr.append( $st );
- // Action: take over as a new service (only useful for uncovered third parties)
+ // Action column.
const $act = $( '
| ' );
- if ( f.third_party && ! f.covered ) {
+ const host = ( f.host || '' ).toLowerCase();
+ const isGoogleFont = host === 'fonts.googleapis.com' || host === 'fonts.gstatic.com';
+
+ if ( isGoogleFont ) {
+ // Google Fonts can't be consent-gated meaningfully — the right fix is
+ // hosting them locally. Show a non-clickable hint, no button.
+ $act.append( $( '' )
+ .css( { color: '#8a6d3b', fontStyle: 'italic' } )
+ .text( i18n.fontHint || 'Host this font locally for GDPR-compliant operation.' ) );
+ } else if ( f.third_party && ! f.covered ) {
// Prefill from the matching preset (full data) if there is one,
// otherwise just seed host + pattern.
const data = preset
@@ -250,40 +259,6 @@
$out.append( $table );
}
- /* ── Local Google Fonts: download & embed ── */
- $( '#cb-fonts-fetch' ).on( 'click', function () {
- const i18n = cbAdmin.i18n || {};
- const $btn = $( this ).prop( 'disabled', true );
- const $st = $( '#cb-fonts-status' ).text( i18n.fontsFetching || 'Downloading…' );
-
- $.post( cbAdmin.ajaxUrl, { action: 'cb_fonts_fetch', nonce: cbAdmin.fontsNonce } )
- .done( function ( resp ) {
- if ( ! resp || ! resp.success ) {
- const msg = resp && resp.data && resp.data.message ? resp.data.message : 'Error';
- $st.text( ( i18n.fontsError || 'Error:' ) + ' ' + msg );
- return;
- }
- $st.text( resp.data.message || 'OK' );
- setTimeout( function () { window.location.reload(); }, 900 );
- } )
- .fail( function ( xhr ) {
- $st.text( ( i18n.fontsError || 'Error:' ) + ' ' + xhr.status );
- } )
- .always( function () {
- $btn.prop( 'disabled', false );
- } );
- } );
-
- $( '#cb-fonts-clear' ).on( 'click', function () {
- const i18n = cbAdmin.i18n || {};
- if ( ! window.confirm( i18n.fontsClearConfirm || 'Delete local fonts?' ) ) {
- return;
- }
- $( this ).prop( 'disabled', true );
- $.post( cbAdmin.ajaxUrl, { action: 'cb_fonts_clear', nonce: cbAdmin.fontsNonce } )
- .always( function () { window.location.reload(); } );
- } );
-
/* ── Activate a tab by key ── */
function activateTab( tab ) {
$( '.cb-tab-content' ).hide();
diff --git a/gdpr-content-blocker/gdpr-content-blocker.php b/gdpr-content-blocker/gdpr-content-blocker.php
index 016514a..12b06b7 100644
--- a/gdpr-content-blocker/gdpr-content-blocker.php
+++ b/gdpr-content-blocker/gdpr-content-blocker.php
@@ -37,7 +37,6 @@ require_once CB_DIR . 'includes/class-renderer.php';
require_once CB_DIR . 'includes/class-autodetect.php';
require_once CB_DIR . 'includes/class-license.php';
require_once CB_DIR . 'includes/class-updater.php';
-require_once CB_DIR . 'includes/class-fonts.php';
// Language policy: German source strings for any German locale (de_*), English
// for everything else. We map the plugin's locale accordingly and ship an
@@ -60,7 +59,6 @@ function cb_init(): void {
CB_Autodetect::init();
CB_License::init();
CB_Updater::init();
- CB_Fonts::init();
}
// Schedule / clear the daily license re-check.
diff --git a/gdpr-content-blocker/includes/class-fonts.php b/gdpr-content-blocker/includes/class-fonts.php
deleted file mode 100644
index 77aaf74..0000000
--- a/gdpr-content-blocker/includes/class-fonts.php
+++ /dev/null
@@ -1,529 +0,0 @@
- (also protocol-relative)
- * - @import / direct gstatic URLs inside inline