sanitize_textarea_field
Filters a sanitized textarea field string.
Использование
add_filter( 'sanitize_textarea_field', 'wp_kama_sanitize_textarea_field_filter', 10, 2 ); /** * Function for `sanitize_textarea_field` filter-hook. * * @param string $filtered The sanitized string. * @param string $str The string prior to being sanitized. * * @return string */ function wp_kama_sanitize_textarea_field_filter( $filtered, $str ){ // filter... return $filtered; }
- $filtered(строка)
- The sanitized string.
- $str(строка)
- The string prior to being sanitized.
Список изменений
С версии 4.7.0 | Введена. |
Где вызывается хук
sanitize_textarea_field
wp-includes/formatting.php 5594
return apply_filters( 'sanitize_textarea_field', $filtered, $str );