WordPress开发者和主题制作者的搜索引擎



wp_kses_uri_attributes ›

Since5.0.1
已弃用n/a
wp_kses_uri_attributes ( 没有参数 )
链接:
返回:
  • (array) HTML attributes that must include a URL.
定义在:
文档:

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.



源码

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;
}