sanitize_key
Filters a sanitized key string.
Usage
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(string)
- Sanitized key.
- $key(string)
- The key prior to sanitization.
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
sanitize_key
wp-includes/formatting.php 2186
return apply_filters( 'sanitize_key', $sanitized_key, $key );