diff --git wp-includes/formatting.php wp-includes/formatting.php
index cb35f2d..c81073c 100644
|
|
|
function sanitize_textarea_field( $str ) { |
| 4715 | 4715 | } |
| 4716 | 4716 | |
| 4717 | 4717 | /** |
| | 4718 | * Sanitizes a checkbox or radio elements value. |
| | 4719 | * |
| | 4720 | * @since 4.9.0 |
| | 4721 | * |
| | 4722 | * @param mixed $value Checkbox or radio value to sanitize. |
| | 4723 | * @return string Sanitized value. |
| | 4724 | */ |
| | 4725 | function sanitize_checkbox_radio( $value ) { |
| | 4726 | /* As checkboxes and radios can have custom values, |
| | 4727 | * we can't always return 'on'/'off' values each time. Instead |
| | 4728 | * we can sanitize the value using the text fields functions |
| | 4729 | * which will do everything we need it to. |
| | 4730 | */ |
| | 4731 | $filtered = _sanitize_text_fields( $value, false ); |
| | 4732 | |
| | 4733 | /** |
| | 4734 | * Filters the value of a checkbox/radio. |
| | 4735 | * |
| | 4736 | * @param string $filtered The sanitized checkbox value. |
| | 4737 | * @param mixed $value The checkbox before being sanitized. |
| | 4738 | */ |
| | 4739 | return apply_filters( 'sanitize_checkbox_radio', $filtered, $value ); |
| | 4740 | } |
| | 4741 | |
| | 4742 | /** |
| 4718 | 4743 | * Internal helper function to sanitize a string from user input or from the db |
| 4719 | 4744 | * |
| 4720 | 4745 | * @since 4.7.0 |