b2_format_html_attributes()
Formats an array of attributes into a string to be used inside a HTML tag.
b2_format_html_attributes(array<string|int, mixed> $atts) : string
The first attribute will contain a single space before it.
E.g.
b2_format_html_attributes( array( 'data-thing' => 'foo', 'class' = 'test' ) )
would give this string:
' data-thing="foo" class="test"'
Parameters
- $atts : array<string|int, mixed>
-
The attributes to format
Return values
string —The attribute string