sanitize_text_field хук-фильтр . Yoast 2.9.0
Filter a sanitized text field string.
Использование
add_filter( 'sanitize_text_field', 'filter_function_name_2741', 10, 2 ); function filter_function_name_2741( $filtered, $str ){ // filter... return $filtered; }
- $filtered(строка)
- The sanitized string.
- $str(строка)
- The string prior to being sanitized.
Список изменений
С версии 2.9.0 | Введена. |
Где вызывается хук
sanitize_text_field
yoast/inc/class-wpseo-utils.php 189
return apply_filters( 'sanitize_text_field', $filtered, $value ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Using WP native filter.