This page redirects to an external site: https://developer.wordpress.org/reference/functions/sanitize_key/
Sanitize a string key. Keys are used as internal identifiers.
Lowercase alphanumeric characters, dashes and underscores are allowed. Uppercase characters will be converted to lowercase. After sanitize_key() has done its work, it passes the sanitized key through the sanitize_key filter.
<code style="color: #000000"><span style="color: #0000BB"><?php sanitize_key</span><span style="color: #007700">( </span><span style="color: #0000BB">$key </span><span style="color: #007700">); </span><span style="color: #0000BB">?></span></code>
apply_filters( 'sanitize_key', $key, $raw_key )Since: 3.0.0
sanitize_key() is located in /wp-includes/formatting.php.
sanitize_key() is in a class of functions that help you sanitize potentially unsafe data which allow you to pass an arbitrary variable and receive the clean version based on data type. Others include: