Skip to content
Docs
Get RestroPress

Filter

rpress_sanitize_key

Updated
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#

ParameterTypeDescription
$keystringSanitized key.
$raw_keystringThe 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), in rpress_sanitize_key()

See also#

Was this page helpful?