Core Function
View Source on Trac ↗ wp_kses_attr_check()
wp_kses_attr_check(
mixed $name,
mixed $value,
mixed $whole,
mixed $vless,
mixed $element,
mixed $allowed_html
) Determines whether an attribute is allowed.
Parameters 6 required
| Name / Type | Description |
|---|---|
| $name string | The attribute name. Passed by reference. Returns empty string when not allowed. Required |
| $value string | The attribute value. Passed by reference. Returns a filtered value. Required |
| $whole string | The `name=value` input. Passed by reference. Returns filtered input. Required |
| $vless string | Whether the attribute is valueless. Use 'y' or 'n'. Required |
| $element string | The name of the element to which this attribute belongs. Required |
| $allowed_html array | The full list of allowed elements and attributes. Required |
Return Value
(bool)
Whether or not the attribute is allowed.
Function Information
Since Version
4.2.3
Source File
wp-includes/kses.php
Advertisement