| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly. |
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; |
| 6 |
} |
| 7 |
|
| 8 |
/** |
| 9 |
* Beacon Single (1 Column) — admin color overrides. |
| 10 |
* |
| 11 |
* Color-specific CSS for the admin builder preview. Theme color CSS variables |
| 12 |
* are already declared in the main beacon-single.php; this file exists so that |
| 13 |
* the builder's per-color enqueue requests don't 404. |
| 14 |
* |
| 15 |
* @package Charitable |
| 16 |
* @author WP Charitable LLC |
| 17 |
* @since 1.8.12 |
| 18 |
*/ |
| 19 |
|
| 20 |
header( 'Content-type: text/css; charset: UTF-8' ); |
| 21 |
|
| 22 |
$primary = isset( $_GET['p'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['p'] ), 0, 6 ) : '#1d3a8a'; // phpcs:ignore |
| 23 |
$secondary = isset( $_GET['s'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['s'] ), 0, 6 ) : '#0D0D0D'; // phpcs:ignore |
| 24 |
$tertiary = isset( $_GET['t'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['t'] ), 0, 6 ) : '#5F5F5F'; // phpcs:ignore |
| 25 |
$button = isset( $_GET['b'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['b'] ), 0, 6 ) : '#1d3a8a'; // phpcs:ignore |
| 26 |
|
| 27 |
?> |
| 28 |
|
| 29 |
.charitable-preview.charitable-builder-template-beacon-single #charitable-design-wrap .charitable-campaign-preview { |
| 30 |
--charitable-hero-accent: <?php echo $primary; // phpcs:ignore ?>; |
| 31 |
} |
| 32 |
|