wp_kses_attr_check

SummerySummery

Determines whether an attribute is allowed.

Syntax

wp_kses_attr_check( string $name, string $value, string $whole, string $vless, string $element, array $allowed_html )

ParametersParameters

$name

(string) (Required) The attribute name. Passed by reference. Returns empty string when not allowed.

$value

(string) (Required) The attribute value. Passed by reference. Returns a filtered value.

$whole

(string) (Required) The name=value input. Passed by reference. Returns filtered input.

$vless

(string) (Required) Whether the attribute is valueless. Use 'y' or 'n'.

$element

(string) (Required) The name of the element to which this attribute belongs.

$allowed_html

(array) (Required) The full list of allowed elements and attributes.

ReturnReturn

(bool) Whether or not the attribute is allowed.

SourceSource

File: wp-includes/kses.php


			

ChangelogChangelog

Changelog
Version Description
5.0.0 Add support for data-* wildcard attributes.
4.2.3 Introduced.
Scroll to Top