PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 1.7.0.9 All 211 releases
charitable / includes / css-templates / admin / simple-2-col-header-colors.php

simple-2-col-header-colors.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, at includes/css-templates/admin/simple-2-col-header-colors.php

216 lines 7.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Exit if accessed directly.
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 /**
9 * Display custom CSS.
10 *
11 * @package Charitable
12 * @author WP Charitable LLC
13 * @since 1.8.0
14 * @version 1.8.3.7
15 */
16
17 header( 'Content-type: text/css; charset: UTF-8' );
18
19 if ( ! function_exists( 'charitable_sanitize_hex_color' ) ) {
20 /**
21 * Sanitize a hex color.
22 *
23 * @param string $color The color to sanitize.
24 * @return string|null The sanitized color or null if the color is invalid.
25 */
26 function charitable_sanitize_hex_color( $color ) {
27 // Ensure the value is a string.
28 $color = trim( $color );
29
30 // Check if it's a valid 6-character hex color including the hash.
31 if ( preg_match( '/^#[a-fA-F0-9]{6}$/', $color ) ) {
32 return $color;
33 }
34
35 // Optionally return a default color or handle errors.
36 return null; // Or return default color.
37 }
38 }
39
40 if ( ! function_exists( 'charitable_esc_attr_php' ) ) {
41 /**
42 * Escapes a string for use in PHP.
43 *
44 * @param string $text The text to escape.
45 * @return string The escaped text.
46 */
47 function charitable_esc_attr_php( $text ) {
48 return htmlspecialchars( $text, ENT_QUOTES, 'UTF-8' );
49 }
50 }
51
52 // @codingStandardsIgnoreStart
53
54 $primary = isset( $_GET['p'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['p'] ), 0, 6 ) : '#000000';
55 $secondary = isset( $_GET['s'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['s'] ), 0, 6 ) : '#2B66D1';
56 $tertiary = isset( $_GET['t'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['t'] ), 0, 6 ) : '#F99E36';
57 $button = isset( $_GET['b'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['b'] ), 0, 6 ) : '#5AA152';
58
59 $slug = 'simple-2-col-header'; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variable used in CSS selectors.
60 $wrapper = '.charitable-preview.charitable-builder-template-' . $slug . ' #charitable-design-wrap .charitable-campaign-preview'; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variable used in CSS selectors.
61
62 require_once dirname( __DIR__, 2 ) . '/admin/campaign-builder/templates/functions-campaign-templates.php';
63 ?>
64
65 /* field: headlines */
66
67 <?php echo charitable_esc_attr_php( $wrapper ); ?> h5.charitable-field-preview-headline,
68 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-campaign-title,
69 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-headline {
70 color: <?php echo $primary; ?>;
71 }
72
73 /* field: donation amount */
74
75 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount label,
76 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount input.custom-donation-input[type="text"] {
77 color: <?php echo $primary; ?>;
78 border-color: <?php echo $primary; ?> !important;
79 }
80 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount ul li.suggested-donation-amount.selected {
81 border-color: <?php echo $tertiary; ?>;
82 }
83 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount ul li.suggested-donation-amount.selected span.amount {
84 color: <?php echo $primary; ?>;
85 }
86
87 /* field: progress bar */
88
89 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar-info-row div.campaign-percent-raised {
90 color: <?php echo $primary; ?>;
91
92 }
93 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar-info-row div.campaign-goal {
94
95 }
96 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress {
97
98 }
99 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar {
100 background-color: <?php echo $secondary; ?>;
101 }
102 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar span {
103
104 }
105
106 /* field: button */
107
108 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-donate-button .charitable-field-preview-donate-button span.placeholder {
109
110 }
111 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-donate-button .charitable-field-preview-donate-button span.placeholder.button {
112 background-color: <?php echo $button; ?>;
113 border-color: <?php echo $button; ?>;
114 color: <?php echo charitable_get_constracting_text_color( $button ); ?>;
115 }
116
117
118 /* field: campaign summary */
119
120 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary {
121
122 }
123 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary div {
124 color: <?php echo $primary; ?>;
125 }
126 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary div span {
127 color: <?php echo $secondary; ?>;
128 }
129 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary .campaign-summary-item {
130 color: <?php echo $primary; ?>;
131 }
132
133
134 /* tabs: tab nav */
135
136 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav {
137 border: 1px solid transparent;
138 background-color: transparent;
139 }
140 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li {
141 }
142 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li a {
143 }
144 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li.active {
145 background-color: transparent;
146 }
147 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li:hover {
148 background-color: transparent;
149 }
150 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li.active a {
151 color: black;
152 }
153 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li:hover a {
154 color: <?php echo $tertiary; ?>;
155 }
156
157 /* tabs: style */
158
159 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li {
160 background-color: <?php echo $primary; ?>;
161 }
162 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li a {
163 color: white;
164 }
165 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li.active {
166 background-color: <?php echo $primary; ?>;
167 }
168 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li:hover {
169 background-color: <?php echo $primary; ?>;
170 }
171 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li.active a {
172 color: white;
173 }
174 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li:hover a {
175 color: white;
176 }
177
178 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li {
179 background-color: <?php echo $primary; ?>;
180 }
181 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li a {
182 color: white;
183 }
184 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li.active {
185 background-color: <?php echo $primary; ?>;
186 }
187 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li:hover {
188 background-color: <?php echo $primary; ?>;
189 }
190 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li.active a {
191 color: white;
192 }
193 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li:hover a {
194 color: white;
195 }
196
197 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li {
198 border-color: transparent;
199 }
200 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li a {
201 color: <?php echo $primary; ?>;
202 }
203 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li.active {
204 border-bottom: 1px solid <?php echo $tertiary; ?>;
205 }
206 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li:hover {
207 border-bottom: 1px solid <?php echo $tertiary; ?>;
208 }
209 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li.active a {
210 color: black;
211 }
212 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li:hover a {
213 color: <?php echo $tertiary; ?>;
214 }
215
216 // @codingStandardsIgnoreEnd