wc_implode_html_attributes( array $raw_attributes )
Implode and escape HTML attributes for output.
Description Description
Parameters Parameters
- $raw_attributes
-
(Required) Attribute name value pairs.
Return Return
(string)
Source Source
File: includes/wc-formatting-functions.php
function wc_implode_html_attributes( $raw_attributes ) {
$attributes = array();
foreach ( $raw_attributes as $name => $value ) {
$attributes[] = esc_attr( $name ) . '="' . esc_attr( $value ) . '"';
}
return implode( ' ', $attributes );
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |