esc_textarea
Filters a string cleaned and escaped for output in a textarea element.
Использование
add_filter( 'esc_textarea', 'wp_kama_esc_textarea_filter', 10, 2 );
/**
* Function for `esc_textarea` filter-hook.
*
* @param string $safe_text The text after it has been escaped.
* @param string $text The text prior to being escaped.
*
* @return string
*/
function wp_kama_esc_textarea_filter( $safe_text, $text ){
// filter...
return $safe_text;
}
- $safe_text(строка)
- The text after it has been escaped.
- $text(строка)
- The text prior to being escaped.
Список изменений
| С версии 3.1.0 | Введена. |
Где вызывается хук
esc_textarea
wp-includes/formatting.php 4749
return apply_filters( 'esc_textarea', $safe_text, $text );