PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.11.3
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.11.3
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 / basic-colors.php

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

51 lines 2.1 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 basic CSS.
10 *
11 * @package Charitable
12 * @author WP Charitable LLC
13 * @since 1.8.0
14 * @version 1.8.8.6
15 */
16
17 if ( ! function_exists( 'wp_unslash' ) ) {
18 /**
19 * Unslash a value.
20 *
21 * @param mixed $value The value to unslash.
22 * @return mixed The unslashed value.
23 */
24 function wp_unslash( $value ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- This is a WordPress core function fallback for older WordPress versions.
25 return is_array( $value ) ? array_map( 'wp_unslash', $value ) : stripslashes( $value );
26 }
27 }
28
29 if ( ! function_exists( 'sanitize_text_field' ) ) {
30 /**
31 * Sanitize a text field.
32 *
33 * @param string $str The string to sanitize.
34 * @return string The sanitized string.
35 */
36 function sanitize_text_field( $str ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- This is a WordPress core function fallback for older WordPress versions.
37 $filtered = preg_replace( '/[\r\n\t\0\x0B]/', '', $str );
38 $filtered = filter_var( $filtered, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH );
39 return trim( $filtered );
40 }
41 }
42
43 header( 'Content-type: text/css; charset: UTF-8' );
44
45 $primary = isset( $_GET['p'] ) ? '#' . preg_replace( '/[^A-Za-z0-9 ]/', '', sanitize_text_field( wp_unslash( $_GET['p'] ) ) ) : '#3418d2'; // phpcs:ignore
46 $secondary = isset( $_GET['s'] ) ? '#' . preg_replace( '/[^A-Za-z0-9 ]/', '', sanitize_text_field( wp_unslash( $_GET['s'] ) ) ) : '#005eff'; // phpcs:ignore
47 $tertiary = isset( $_GET['t'] ) ? '#' . preg_replace( '/[^A-Za-z0-9 ]/', '', sanitize_text_field( wp_unslash( $_GET['t'] ) ) ) : '#00a1ff'; // phpcs:ignore
48 $button = isset( $_GET['b'] ) ? '#' . preg_replace( '/[^A-Za-z0-9 ]/', '', sanitize_text_field( wp_unslash( $_GET['b'] ) ) ) : '#ec5f25'; // phpcs:ignore
49
50 $wrapper = '.charitable-preview #charitable-design-wrap .charitable-campaign-preview'; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Variable is defined but not used in this file.
51