| @@ -6,9 +6,10 @@ | ||
| 6 | 6 | * |
| 7 | 7 | * @author WP Charitable LLC |
| 8 | 8 | * @package Charitable/Templates/CSS |
| 9 | 9 | * @since 1.0.0 |
| 10 | - * @version 1.0.0 | |
| 10 | + * @version 1.7.0.8 | |
| 11 | + * @version 1.8.8.6 | |
| 11 | 12 | */ |
| 12 | 13 | |
| 13 | 14 | // Exit if accessed directly. |
| 14 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -15,12 +16,12 @@ | ||
| 15 | 16 | exit; |
| 16 | 17 | } |
| 17 | 18 | |
| 18 | 19 | // Introduced in 1.7.0.7, as we migrate away from WordPress customizer. |
| 19 | -$highlight_color_donation_form = charitable_get_option( 'donation_form_default_highlight_colour', false ); | |
| 20 | +$charitable_highlight_color_donation_form = esc_html( charitable_get_option( 'donation_form_default_highlight_colour', false ) ); | |
| 20 | 21 | |
| 21 | -$highlight_colour = charitable_get_option( 'highlight_colour', apply_filters( 'charitable_default_highlight_colour', '#f89d35' ) ); | |
| 22 | -$highlight_colour_error = ( false === $highlight_color_donation_form ) ? charitable_get_option( 'highlight_colour', apply_filters( 'charitable_default_highlight_colour', '#f89d35' ) ) : $highlight_color_donation_form; | |
| 22 | +$charitable_highlight_colour = charitable_get_option( 'highlight_colour', apply_filters( 'charitable_default_highlight_colour', '#f89d35' ) ); | |
| 23 | +$charitable_highlight_colour_error = ( false === $charitable_highlight_color_donation_form ) ? charitable_get_option( 'highlight_colour', apply_filters( 'charitable_default_highlight_colour', '#f89d35' ) ) : $charitable_highlight_color_donation_form; | |
| 23 | 24 | |
| 24 | 25 | ?> |
| 25 | 26 | <style id="charitable-highlight-colour-styles"> |
| 26 | 27 | .campaign-raised .amount, |
| @@ -29,19 +30,25 @@ | ||
| 29 | 30 | .time-left, |
| 30 | 31 | .charitable-form-field a:not(.button), |
| 31 | 32 | .charitable-form-fields .charitable-fieldset a:not(.button), |
| 32 | 33 | .charitable-notice, |
| 33 | -.charitable-notice .errors a { color: <?php echo $highlight_colour_error; ?>; } | |
| 34 | +.charitable-notice .errors a { | |
| 35 | + color: <?php echo esc_html( $charitable_highlight_colour_error ); ?>; | |
| 34 | 36 | |
| 37 | +} | |
| 38 | +#charitable-donation-form .charitable-notice { | |
| 39 | + border-color: <?php echo esc_html( $charitable_highlight_colour_error ); ?>; | |
| 40 | +} | |
| 41 | + | |
| 35 | 42 | .campaign-progress-bar .bar, |
| 36 | 43 | .donate-button, |
| 37 | 44 | .charitable-donation-form .donation-amount.selected, |
| 38 | -.charitable-donation-amount-form .donation-amount.selected { background-color: <?php echo $highlight_colour; ?>; } | |
| 45 | +.charitable-donation-amount-form .donation-amount.selected { background-color: <?php echo esc_html( $charitable_highlight_colour ); ?>; } | |
| 39 | 46 | |
| 40 | 47 | .charitable-donation-form .donation-amount.selected, |
| 41 | 48 | .charitable-donation-amount-form .donation-amount.selected, |
| 42 | 49 | .charitable-notice, |
| 43 | 50 | .charitable-drag-drop-images li:hover a.remove-image, |
| 44 | -.supports-drag-drop .charitable-drag-drop-dropzone.drag-over { border-color: <?php echo $highlight_colour; ?>; } | |
| 51 | +.supports-drag-drop .charitable-drag-drop-dropzone.drag-over { border-color: <?php echo esc_html( $charitable_highlight_colour ); ?>; } | |
| 45 | 52 | |
| 46 | -<?php do_action( 'charitable_custom_styles', $highlight_colour ) ?> | |
| 53 | +<?php do_action( 'charitable_custom_styles', $charitable_highlight_colour ); ?> | |
| 47 | 54 | </style> |