kollapsminoriteten/wp-content/plugins/blocksy-companion/framework/extensions/cookies-consent/global.php

132 lines
3.6 KiB
PHP
Raw Permalink Normal View History

2025-08-27 08:44:30 +02:00
<?php
2026-03-31 11:30:59 +02:00
if (! defined('ABSPATH')) {
exit;
}
2025-08-27 08:44:30 +02:00
// Content color
blocksy_output_colors([
2026-03-31 11:30:59 +02:00
'value' => blocksy_companion_theme_functions()->blocksy_get_theme_mod('cookieContentColor'),
2025-08-27 08:44:30 +02:00
'default' => [
'default' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
'hover' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
],
'css' => $css,
'variables' => [
'default' => [
'selector' => '.cookie-notification',
'variable' => 'theme-text-color'
],
'hover' => [
'selector' => '.cookie-notification',
'variable' => 'theme-link-hover-color'
],
],
]);
// Accept button color
blocksy_output_colors([
2026-03-31 11:30:59 +02:00
'value' => blocksy_companion_theme_functions()->blocksy_get_theme_mod('cookieButtonText'),
2025-08-27 08:44:30 +02:00
'default' => [
'default' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
'hover' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
],
'css' => $css,
'variables' => [
'default' => [
'selector' => '.cookie-notification .ct-cookies-accept-button',
'variable' => 'theme-button-text-initial-color'
],
'hover' => [
'selector' => '.cookie-notification .ct-cookies-accept-button',
'variable' => 'theme-button-text-hover-color'
]
],
]);
blocksy_output_colors([
2026-03-31 11:30:59 +02:00
'value' => blocksy_companion_theme_functions()->blocksy_get_theme_mod('cookieButtonBackground'),
2025-08-27 08:44:30 +02:00
'default' => [
'default' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
'hover' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
],
'css' => $css,
'variables' => [
'default' => [
'selector' => '.cookie-notification .ct-cookies-accept-button',
'variable' => 'theme-button-background-initial-color'
],
'hover' => [
'selector' => '.cookie-notification .ct-cookies-accept-button',
'variable' => 'theme-button-background-hover-color'
]
],
]);
// Decline button color
blocksy_output_colors([
2026-03-31 11:30:59 +02:00
'value' => blocksy_companion_theme_functions()->blocksy_get_theme_mod('cookieDeclineButtonText'),
2025-08-27 08:44:30 +02:00
'default' => [
'default' => [ 'color' => 'var(--theme-palette-color-3)' ],
'hover' => [ 'color' => 'var(--theme-palette-color-3)' ],
],
'css' => $css,
'variables' => [
'default' => [
'selector' => '.cookie-notification .ct-cookies-decline-button',
'variable' => 'theme-button-text-initial-color'
],
'hover' => [
'selector' => '.cookie-notification .ct-cookies-decline-button',
'variable' => 'theme-button-text-hover-color'
]
],
]);
blocksy_output_colors([
2026-03-31 11:30:59 +02:00
'value' => blocksy_companion_theme_functions()->blocksy_get_theme_mod('cookieDeclineButtonBackground'),
2025-08-27 08:44:30 +02:00
'default' => [
'default' => [ 'color' => 'rgba(224, 229, 235, 0.6)' ],
'hover' => [ 'color' => 'rgba(224, 229, 235, 1)' ],
],
'css' => $css,
'variables' => [
'default' => [
'selector' => '.cookie-notification .ct-cookies-decline-button',
'variable' => 'theme-button-background-initial-color'
],
'hover' => [
'selector' => '.cookie-notification .ct-cookies-decline-button',
'variable' => 'theme-button-background-hover-color'
]
],
]);
// Background color
blocksy_output_colors([
2026-03-31 11:30:59 +02:00
'value' => blocksy_companion_theme_functions()->blocksy_get_theme_mod('cookieBackground'),
2025-08-27 08:44:30 +02:00
'default' => [
'default' => [ 'color' => 'var(--theme-palette-color-8)' ],
],
'css' => $css,
'variables' => [
'default' => [
'selector' => '.cookie-notification',
'variable' => 'backgroundColor'
],
],
]);
2026-03-31 11:30:59 +02:00
$cookieMaxWidth = blocksy_companion_theme_functions()->blocksy_get_theme_mod( 'cookieMaxWidth', 400 );
2025-08-27 08:44:30 +02:00
$css->put(
'.cookie-notification',
'--maxWidth: ' . $cookieMaxWidth . 'px'
);