wp_kses_uri_attributes
Filters the list of attributes that are required to contain a URL.
Use this filter to add any data- attributes that are required to be validated as a URL.
Usage
add_filter( 'wp_kses_uri_attributes', 'wp_kama_kses_uri_attributes_filter' );
/**
* Function for `wp_kses_uri_attributes` filter-hook.
*
* @param string[] $uri_attributes HTML attribute names whose value contains a URL.
*
* @return string[]
*/
function wp_kama_kses_uri_attributes_filter( $uri_attributes ){
// filter...
return $uri_attributes;
}
- $uri_attributes(string[])
- HTML attribute names whose value contains a URL.
Changelog
| Since 5.0.1 | Introduced. |
Where the hook is called
wp_kses_uri_attributes
wp-includes/kses.php 1260
$uri_attributes = apply_filters( 'wp_kses_uri_attributes', $uri_attributes );