PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.12.2
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.12.2
1.8.13.1 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 All 212 releases
charitable / includes / css-templates / admin / simple-2-col-colors.php

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

226 lines 8.0 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'] ) ? '#' . preg_replace( '/[^A-Za-z0-9 ]/', '', $_GET['p'] ) : '#000000';
55 $secondary = isset( $_GET['s'] ) ? '#' . preg_replace( '/[^A-Za-z0-9 ]/', '', $_GET['s'] ) : '#2B66D1';
56 $tertiary = isset( $_GET['t'] ) ? '#' . preg_replace( '/[^A-Za-z0-9 ]/', '', $_GET['t'] ) : '#F99E36';
57 $button = isset( $_GET['b'] ) ? '#' . preg_replace( '/[^A-Za-z0-9 ]/', '', $_GET['b'] ) : '#5AA152';
58
59 $slug = 'simple-2-col'; // 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
66 /* field: headlines */
67
68 <?php echo charitable_esc_attr_php( $wrapper ); ?> h5.charitable-field-preview-headline,
69 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-campaign-title,
70 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-headline {
71 color: <?php echo $primary; ?>;
72 }
73
74 /* field: donation amount */
75
76 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount label,
77 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount input.custom-donation-input[type="text"] {
78 color: <?php echo $primary; ?>;
79 border-color: <?php echo $primary; ?> !important;
80 }
81 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount ul li.suggested-donation-amount.selected {
82 border-color: <?php echo $tertiary; ?>;
83 }
84 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount ul li.suggested-donation-amount.selected span.amount {
85 color: <?php echo $primary; ?>;
86 }
87
88 /* field: progress bar */
89
90 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar-info-row div.campaign-percent-raised {
91 color: <?php echo $primary; ?>;
92
93 }
94 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar-info-row div.campaign-goal {
95
96 }
97 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress {
98
99 }
100 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar {
101 background-color: <?php echo $secondary; ?>;
102 }
103 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar span {
104
105 }
106
107 /* field: button */
108
109 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-donate-button .charitable-field-preview-donate-button span.placeholder {
110
111 }
112 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-donate-button .charitable-field-preview-donate-button span.placeholder.button {
113 background-color: <?php echo $button; ?> !important;
114 border-color: <?php echo $button; ?> !important;
115 color: <?php echo charitable_get_constracting_text_color( $button ); ?>;
116 text-transform: none;
117 border-radius: 0px;
118 margin-top: 0;
119 margin-bottom: 0;
120 width: 100%;
121 font-weight: 400;
122 min-height: 50px;
123 height: 50px;
124 font-size: 16px;
125 line-height: 50px;
126 }
127
128
129 /* field: campaign summary */
130
131 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary {
132
133 }
134 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary div {
135 color: <?php echo $primary; ?>;
136 }
137 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary div span {
138 color: <?php echo $secondary; ?>;
139 }
140 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary .campaign-summary-item {
141 color: <?php echo $primary; ?>;
142 }
143
144
145 /* tabs: tab nav */
146
147 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav {
148 border: 1px solid transparent;
149 background-color: transparent;
150 }
151 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li {
152 }
153 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li a {
154 }
155 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li.active {
156 background-color: transparent;
157 }
158 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li:hover {
159 background-color: transparent;
160 }
161 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li.active a {
162 color: black;
163 }
164 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li:hover a {
165 color: <?php echo $tertiary; ?>;
166 }
167
168 /* tabs: style */
169
170 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li {
171 background-color: <?php echo $primary; ?>;
172 }
173 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li a {
174 color: white;
175 }
176 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li.active {
177 background-color: <?php echo $primary; ?>;
178 }
179 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li:hover {
180 background-color: <?php echo $primary; ?>;
181 }
182 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li.active a {
183 color: white;
184 }
185 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li:hover a {
186 color: white;
187 }
188
189 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li {
190 background-color: <?php echo $primary; ?>;
191 }
192 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li a {
193 color: white;
194 }
195 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li.active {
196 background-color: <?php echo $primary; ?>;
197 }
198 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li:hover {
199 background-color: <?php echo $primary; ?>;
200 }
201 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li.active a {
202 color: white;
203 }
204 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li:hover a {
205 color: white;
206 }
207
208 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li {
209 border-color: transparent;
210 }
211 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li a {
212 color: <?php echo $primary; ?>;
213 }
214 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li.active {
215 border-bottom: 1px solid <?php echo $tertiary; ?>;
216 }
217 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li:hover {
218 border-bottom: 1px solid <?php echo $tertiary; ?>;
219 }
220 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li.active a {
221 color: black;
222 }
223 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li:hover a {
224 color: <?php echo $tertiary; ?>;
225 }
226 // @codingStandardsIgnoreEnd