Filter
rpress_sanitize_key
On this page
Filters a key string after it has been sanitized for RestroPress settings.
Runs at the end of rpress_sanitize_key, after characters other than letters, numbers, underscores, dashes, dots, colons and slashes have been removed.
Available since RestroPress 1.0.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$key | string | Sanitized key. |
$raw_key | string | The key before sanitization. |
Return value#
string. The sanitized key.
Example#
function my_sanitize_key( $key, $raw_key ) {
return strtolower( $key );
}
add_filter( 'rpress_sanitize_key', 'my_sanitize_key', 10, 2 );
Source#
Applied in:
includes/formatting.php(line 300), inrpress_sanitize_key()
See also#
Was this page helpful?
