On this page
apply_filters( 'sanitize_key', string $sanitized_key, string $key )
Filters a sanitized key string.
Parameters
$sanitized_keystring-
Sanitized key.
$keystring-
The key prior to sanitization.
More Information
- By default, sanitize_key() function sanitize a string key, which is used as internal identifiers, into lowercase alphanumeric, dashes, and underscores characters. After sanitize_key() function has done its work, it passes the sanitized key through this
sanitize_keyfilter. - The filter passes $key and $raw_key as parameters, which allows the user of this filter to perform additional sanitization based on these two keys.
Source
File: wp-includes/formatting.php. View all references
return apply_filters( 'sanitize_key', $sanitized_key, $key );
Related
Used By
| Used By | Description |
|---|---|
| sanitize_key() wp-includes/formatting.php | Sanitizes a string key. |
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/sanitize_key