SanitizeCustomFormStyles.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\Settings\DonationForms\Actions; |
| 4 | |
| 5 | /** |
| 6 | * @since 4.5.0 |
| 7 | */ |
| 8 | class SanitizeCustomFormStyles |
| 9 | { |
| 10 | /** |
| 11 | * @since 4.5.0 |
| 12 | */ |
| 13 | public function __invoke($value, $option, $raw_value) |
| 14 | { |
| 15 | if ($option['id'] === 'custom_form_styles') { |
| 16 | return wp_strip_all_tags($raw_value); |
| 17 | } |
| 18 | |
| 19 | return $value; |
| 20 | } |
| 21 | } |
| 22 |