fix: tabs ohne seiten-rahmen, scan aller unterseiten, button-radius bei hover (v1.5.3)

- Admin-tabs: kein rahmen/box/outline in irgendeinem zustand mehr - nur die
  untere unterstreichung markiert den aktiven tab (WP-default-borders ueber-
  schrieben, auch :focus/:active).
- Scan deckt jetzt ALLE veroeffentlichten seiten/beitraege (alle public post
  types) ab statt nur 4. Backend: limit 10 -> 60 URLs und PARALLELE abfrage
  (concurrency 12, 8s/seite), plugin-AJAX-timeout 45 -> 90s.
- Platzhalter-button: border-radius in hover/focus/active festgenagelt (3px) ->
  theme kann die ecken beim hover nicht mehr veraendern.

+ version 1.5.3. (Backend-redeploy noetig fuer den scan.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
s4luorth
2026-06-08 18:19:57 +02:00
parent ef84c43ded
commit 3228965c60
4 changed files with 59 additions and 40 deletions

View File

@@ -125,14 +125,17 @@
letter-spacing: 0.01em;
}
/* Hover: only the colour changes — no frame, no resize. */
.cb-blocker .cb-blocker__button:hover {
/* Hover: only the colour changes — no frame, no resize, same corners. */
.cb-blocker .cb-blocker__button:hover,
.cb-blocker .cb-blocker__button:focus,
.cb-blocker .cb-blocker__button:active {
background-color: var(--cb-btn-hover-bg);
color: var(--cb-btn-hover-text);
border: none;
outline: none;
box-shadow: none;
transform: none;
border-radius: 3px; /* lock the corners — theme hover must not round them */
}
/* Keyboard focus keeps a subtle, accessible ring (not shown on mouse hover). */

View File

@@ -3,7 +3,7 @@
* Plugin Name: GDPR Content Blocker
* Plugin URI: https://lucas-orth.de/wp-plugins/gdpr-content-blocker/
* Description: DSGVO-konformer Consent-Blocker für externe iframes. Lädt Drittinhalte erst nach aktiver Einwilligung.
* Version: 1.5.2
* Version: 1.5.3
* Author: Lucas Orth
* Author URI: https://lucas-orth.de
* Text Domain: gdpr-content-blocker
@@ -15,7 +15,7 @@
defined( 'ABSPATH' ) || exit;
define( 'CB_VERSION', '1.5.2' );
define( 'CB_VERSION', '1.5.3' );
define( 'CB_FILE', __FILE__ );
define( 'CB_DIR', plugin_dir_path( __FILE__ ) );
define( 'CB_URL', plugin_dir_url( __FILE__ ) );

View File

@@ -498,25 +498,31 @@ class CB_Settings {
width: 20px;
height: 20px;
}
/* active tab indicator */
/* Tabs: no box/border/outline in any state — only a bottom underline
marks the active tab. Override WordPress' default nav-tab borders. */
.cb-admin-wrap .nav-tab-wrapper {
margin-bottom: 0;
}
.cb-admin-wrap .nav-tab-active,
.cb-admin-wrap .nav-tab-active:focus,
.cb-admin-wrap .nav-tab-active:hover {
background: #fff;
color: #2043B7;
border-bottom: 3px solid #2043B7;
font-weight: 600;
margin-bottom: -1px;
}
/* No focus box on tabs — only the bottom underline marks the active tab. */
.cb-admin-wrap .nav-tab,
.cb-admin-wrap .nav-tab:hover,
.cb-admin-wrap .nav-tab:focus,
.cb-admin-wrap .nav-tab:focus-visible,
.cb-admin-wrap .nav-tab:active {
border: none;
border-bottom: 3px solid transparent;
background: transparent;
box-shadow: none;
outline: none;
margin-bottom: -1px;
}
.cb-admin-wrap .nav-tab-active,
.cb-admin-wrap .nav-tab-active:focus,
.cb-admin-wrap .nav-tab-active:focus-visible,
.cb-admin-wrap .nav-tab-active:hover,
.cb-admin-wrap .nav-tab-active:active {
color: #2043B7;
border-bottom-color: #2043B7;
font-weight: 600;
}
/* 20px breathing room between tabs and content */
.cb-admin-wrap .cb-tab-content {
@@ -807,16 +813,21 @@ class CB_Settings {
private static function scan_urls(): array {
$urls = [ home_url( '/' ) ];
$posts = get_posts( [
'post_type' => [ 'page', 'post' ],
// All published content of every public post type (pages, posts, custom
// post types) — so the scan covers the whole site, not just a few pages.
$types = get_post_types( [ 'public' => true ], 'names' );
unset( $types['attachment'] );
$ids = get_posts( [
'post_type' => array_values( $types ),
'post_status' => 'publish',
'numberposts' => 4,
'orderby' => 'comment_count', // roughly "most visited"
'numberposts' => 500, // safety cap for very large sites
'orderby' => 'date',
'order' => 'DESC',
'fields' => 'ids',
'no_found_rows' => true,
] );
foreach ( $posts as $pid ) {
foreach ( $ids as $pid ) {
$link = get_permalink( $pid );
if ( $link ) {
$urls[] = $link;
@@ -838,7 +849,7 @@ class CB_Settings {
}
$response = wp_remote_post( CB_License::api_url() . '/api/v1/scan', [
'timeout' => 45,
'timeout' => 90,
'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json' ],
'body' => wp_json_encode( [
'key' => $lic['key'],