wp_kses_uri_attributes
Filter HookDescription
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.Hook Information
File Location |
wp-includes/kses.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1049 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$uri_attributes
|
HTML attribute names whose value contains a URL. |
Usage Examples
Basic Usage
<?php
// Hook into wp_kses_uri_attributes
add_filter('wp_kses_uri_attributes', 'my_custom_filter', 10, 1);
function my_custom_filter($uri_attributes) {
// Your custom filtering logic here
return $uri_attributes;
}
Source Code Context
wp-includes/kses.php:1049
- How this hook is used in WordPress core
<?php
1044 *
1045 * @since 5.0.1
1046 *
1047 * @param string[] $uri_attributes HTML attribute names whose value contains a URL.
1048 */
1049 $uri_attributes = apply_filters( 'wp_kses_uri_attributes', $uri_attributes );
1050
1051 return $uri_attributes;
1052 }
1053
1054 /**
PHP Documentation
<?php
/**
* 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.
*
* @since 5.0.1
*
* @param string[] $uri_attributes HTML attribute names whose value contains a URL.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/kses.php
Related Hooks
Related hooks will be displayed here in future updates.