sanitize_text_field хук-фильтрWP 2.9.0

Filters a sanitized text field string.

Использование

add_filter( 'sanitize_text_field', 'wp_kama_sanitize_text_field_filter', 10, 2 );

/**
 * Function for `sanitize_text_field` filter-hook.
 * 
 * @param string $filtered The sanitized string.
 * @param string $str      The string prior to being sanitized.
 *
 * @return string
 */
function wp_kama_sanitize_text_field_filter( $filtered, $str ){

	// filter...
	return $filtered;
}
$filtered(строка)
The sanitized string.
$str(строка)
The string prior to being sanitized.

Список изменений

С версии 2.9.0 Введена.

Где вызывается хук

sanitize_text_field()
sanitize_text_field
wp-includes/formatting.php 5424
return apply_filters( 'sanitize_text_field', $filtered, $str );

Где используется хук в WordPress

Использование не найдено.