sanitize_key
Filters a sanitized key string.
Использование
add_filter( 'sanitize_key', 'wp_kama_sanitize_key_filter', 10, 2 ); /** * Function for `sanitize_key` filter-hook. * * @param string $sanitized_key Sanitized key. * @param string $key The key prior to sanitization. * * @return string */ function wp_kama_sanitize_key_filter( $sanitized_key, $key ){ // filter... return $sanitized_key; }
- $sanitized_key(строка)
- Sanitized key.
- $key(строка)
- The key prior to sanitization.
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
sanitize_key
wp-includes/formatting.php 2186
return apply_filters( 'sanitize_key', $sanitized_key, $key );