← All changes
|
includes/css-templates/frontend/beacon-split.php
+21
-0
1.8.12.2
→
1.8.13
View file →
| @@ -31,8 +31,29 @@ | ||
| 31 | 31 | require_once dirname( __DIR__, 2 ) . '/admin/campaign-builder/templates/functions-campaign-templates.php'; |
| 32 | 32 | |
| 33 | 33 | ?> |
| 34 | 34 | |
| 35 | +<?php | |
| 36 | +/* | |
| 37 | + * Headline colour. Emitted ONLY when the campaign actually configured a primary | |
| 38 | + * colour (the endpoint omits 'p' otherwise), so a campaign that customised nothing | |
| 39 | + * falls back to the historic #000 in base.css and renders byte-identical. The hex | |
| 40 | + * guard stops a malformed 'p' from emitting an invalid token, which would make the | |
| 41 | + * headline inherit the theme's colour instead of falling back. | |
| 42 | + * | |
| 43 | + * Emitted at the top of the stylesheet rather than appended at the end, because | |
| 44 | + * save-the-museum.php has an unclosed rule near its end that would otherwise nest | |
| 45 | + * this declaration inside it. | |
| 46 | + */ | |
| 47 | +if ( isset( $_GET['p'] ) && preg_match( '/^#[A-Fa-f0-9]{3,6}$/', $primary ) ) : // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 48 | + ?> | |
| 49 | +<?php echo $wrapper; // phpcs:ignore ?> { | |
| 50 | + --charitable_campaign_theme_headline: <?php echo $primary; // phpcs:ignore ?>; | |
| 51 | +} | |
| 52 | + <?php | |
| 53 | +endif; | |
| 54 | +?> | |
| 55 | + | |
| 35 | 56 | :root { |
| 36 | 57 | --charitable_campaign_theme_primary: <?php echo $primary; // phpcs:ignore ?>; |
| 37 | 58 | --charitable_campaign_theme_secondary: <?php echo $secondary; // phpcs:ignore ?>; |
| 38 | 59 | --charitable_campaign_theme_tertiary: <?php echo $tertiary; // phpcs:ignore ?>; |