Codex tools: Log in
Contents |
Sanitize a string key.
Keys are used as internal identifiers. Lowercase alphanumeric characters, dashes and underscores are allowed.
<?php sanitize_key( $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: