wp_kses_uri_attributes

The timeline below displays how wordpress function wp_kses_uri_attributes has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.4

/**
 * 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', 'formaction', 'href', 'icon', 'longdesc', 'manifest', 'poster', 'profile', 'src', 'usemap', 'xmlns');
    /**
     * 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.
     */
    $uri_attributes = apply_filters('wp_kses_uri_attributes', $uri_attributes);
    return $uri_attributes;
}

WordPress Version: .28

/**
 * Helper function listing HTML attributes containing 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 array HTML attributes that must include a URL.
 */
function wp_kses_uri_attributes()
{
    $uri_attributes = array('action', 'archive', 'background', 'cite', 'classid', 'codebase', 'data', 'formaction', 'href', 'icon', 'longdesc', 'manifest', 'poster', 'profile', 'src', 'usemap', 'xmlns');
    /**
     * 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 array $uri_attributes HTML attributes requiring validation as a URL.
     */
    $uri_attributes = apply_filters('wp_kses_uri_attributes', $uri_attributes);
    return $uri_attributes;
}