. */ public function renderHeadInit(): void { if (!Options::get('banner_enabled', false)) { return; } if (Options::get('banner_gcm_enabled', true)) { ?> 0 && function_exists('get_permalink')) { $policyUrl = get_permalink($privacyPageId); } if (!in_array($themeMode, ['auto', 'light', 'dark'], true)) { $themeMode = 'auto'; } // Font family map $fontMap = [ 'inter' => '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', 'roboto' => '"Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', 'poppins' => '"Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', 'system-ui' => 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', 'inherit' => 'inherit', ]; $resolvedFont = $fontMap[$fontFamily] ?? 'inherit'; $styleProps = [ '--wpz-font-family: ' . $resolvedFont, '--wpz-radius: ' . (int) $borderRadius . 'px', '--wpz-primary: ' . $primaryColor, ]; if (!empty($bgColor)) { $styleProps[] = '--wpz-bg: ' . $bgColor; } if (!empty($textColor)) { $styleProps[] = '--wpz-text: ' . $textColor; } $styleAttr = implode('; ', $styleProps) . ';'; $cookieLifetime = (int) Options::get('banner_cookie_lifetime', 180); if ($cookieLifetime <= 0) { $cookieLifetime = 180; } ?>