kses_allowed_protocols
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
kses_allowed_protocols
wp-includes/functions.php 7218
$protocols = array_unique( (array) apply_filters( 'kses_allowed_protocols', $protocols ) );