feat: Werbe-Badge im content blocker (unten rechts) + abschaltbar nur mit unlimited (v1.5.0)
- Kleines Badge "GDPR Content Blocker" unten rechts im platzhalter, verlinkt
auf die kaufseite (rel=nofollow sponsored). Server- und client-seitig.
- Wird IMMER angezeigt; abschaltbar via checkbox im Darstellung-tab
("Werbe-Badge ausblenden") - die checkbox ist aber nur mit aktiver
Unlimited-lizenz nutzbar (sonst disabled) und greift am render-punkt nur,
wenn is_unlimited() true ist.
- Dafuer speichert das plugin jetzt max_activations aus der backend-antwort
(activate/validate/swap) und bietet is_unlimited().
+ i18n DE/EN (134 strings). version 1.5.0.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
/* ── Wrapper / placeholder ── */
|
||||
.cb-blocker {
|
||||
position: relative; /* anchor for the bottom-right badge */
|
||||
display: flex;
|
||||
align-items: flex-start; /* pin content to the top */
|
||||
justify-content: center;
|
||||
@@ -27,12 +28,29 @@
|
||||
background-color: var(--cb-bg);
|
||||
color: var(--cb-text);
|
||||
box-sizing: border-box;
|
||||
padding: 24px 8px 20px; /* min 20px top/bottom, 8px sides */
|
||||
padding: 24px 8px 22px; /* min 20px top/bottom, 8px sides */
|
||||
font-family: inherit;
|
||||
border-radius: 4px;
|
||||
/* No reserved height: the placeholder is exactly as tall as its content. */
|
||||
}
|
||||
|
||||
/* ── Promo badge (bottom-right) ── */
|
||||
.cb-blocker .cb-blocker__badge {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
bottom: 5px;
|
||||
font-size: 0.6875rem;
|
||||
line-height: 1;
|
||||
color: var(--cb-text);
|
||||
opacity: 0.55;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.cb-blocker .cb-blocker__badge:hover {
|
||||
opacity: 1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* ── Inner content ── */
|
||||
.cb-blocker .cb-blocker__inner {
|
||||
width: 100%;
|
||||
|
||||
@@ -319,6 +319,18 @@
|
||||
inner.appendChild( label );
|
||||
|
||||
wrap.appendChild( inner );
|
||||
|
||||
// Promo badge (bottom-right), mirrors the server-rendered placeholder.
|
||||
if ( CFG.showBadge ) {
|
||||
const badge = document.createElement( 'a' );
|
||||
badge.className = 'cb-blocker__badge';
|
||||
badge.href = 'https://lucas-orth.de/wp-plugins/gdpr-content-blocker/';
|
||||
badge.target = '_blank';
|
||||
badge.rel = 'noopener noreferrer nofollow sponsored';
|
||||
badge.textContent = 'GDPR Content Blocker';
|
||||
wrap.appendChild( badge );
|
||||
}
|
||||
|
||||
return wrap;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user