Updates or creates a new attribute on the currently matched tag with the passed value.
For boolean attributes special handling is provided:
true is passed as the value, then only the attribute name is added to the tag.false is passed, the attribute gets removed if it existed before.For string attributes, the value is escaped using the esc_attr function.
$namestringrequired
$valuestring|boolrequired
*/
case '-HEAD':
$this->state->stack_of_open_elements->pop();
| Version | Description |
|---|---|
| 6.6.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_html_processor/set_attribute