Summery Summery
Returns an array of HTML attribute names whose value contains a URL.
Syntax Syntax
Description Description
This function returns a list of all HTML attributes that must contain a URL according to the HTML specification.
This list includes URI attributes both allowed and disallowed by KSES.
Return Return
(string[]) HTML attribute names whose value contains a URL.
Source Source
File: wp-includes/kses.php
* @param string[] $allowed_protocols Array of allowed URL protocols.
* @return string Content with fixed HTML tags
*/
function wp_kses_split( $string, $allowed_html, $allowed_protocols ) {
global $pass_allowed_html, $pass_allowed_protocols;
$pass_allowed_html = $allowed_html;
$pass_allowed_protocols = $allowed_protocols;
return preg_replace_callback( '%(<!--.*?(-->|$))|(<[^>]*(>|$)|>)%', '_wp_kses_split_callback', $string );
}
/**
* Returns an array of HTML attribute names whose value contains a URL.
*
* This function returns a list of all HTML attributes that must contain
* a URL according to the HTML specification.
*
* This list includes URI attributes both allowed and disallowed by KSES.
*
* @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
*
* @since 5.0.1
*
* @return string[] HTML attribute names whose value contains a URL.
*/
function wp_kses_uri_attributes() {
$uri_attributes = array(
'action',
'archive',
'background',
'cite',
'classid',
'codebase',
'data',
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 5.0.1 | Introduced. |