Glossary Term
wp_kses_hair()
wp_kses_hair() — Given a string of HTML attributes and values, parse into a structured attribute list. This function performs a number of transformations while parsing attribute strings: It normalizes attribute values and surrounds them with double quotes. It normalizes HTML character references inside attribute values. It removes “bad” URL protocols from attribute values. Otherwise this reads the attributes as if they were part of an HTML tag. It performs these transformations to lower the risk of mis-parsing down the line and to perform URL sanitization in line with the rest of the kses subsystem.
Inputs: $attr (string): Attribute list from HTML element to closing HTML element tag. $allowed_protocols (string[]): Array of allowed URL protocols.
Returns array Array of attribute information after parsing.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
