Definition:
function sanitize_key( $key ) {}
Sanitize a string key.
Keys are used as internal identifiers. Lowercase alphanumeric characters, dashes and underscores are allowed.
Parameters
- string $key: String key
Return values
returns:Sanitized key
Defined filters
- sanitize_key
apply_filters( 'sanitize_key', $key, $raw_key )
Source code
function sanitize_key( $key ) { $raw_key = $key; $key = strtolower( $key ); $key = preg_replace( '/[^a-z0-9_\-]/', '', $key ); return apply_filters( 'sanitize_key', $key, $raw_key ); }
2775
No comments yet... Be the first to leave a reply!