kses_allowed_protocols filter-hookWP 3.0.0

Filters the list of protocols allowed in HTML attributes.

Usage

add_filter( 'kses_allowed_protocols', 'wp_kama_kses_allowed_protocols_filter' );

/**
 * Function for `kses_allowed_protocols` filter-hook.
 * 
 * @param string[] $protocols Array of allowed protocols e.g. 'http', 'ftp', 'tel', and more.
 *
 * @return string[]
 */
function wp_kama_kses_allowed_protocols_filter( $protocols ){

	// filter...
	return $protocols;
}
$protocols(string[])
Array of allowed protocols e.g. 'http', 'ftp', 'tel', and more.

Changelog

Since 3.0.0 Introduced.

Where the hook is called

wp_allowed_protocols()
kses_allowed_protocols
wp-includes/functions.php 6914
$protocols = array_unique( (array) apply_filters( 'kses_allowed_protocols', $protocols ) );

Where the hook is used in WordPress

Usage not found.