Open
Description
It would be nice if something like this could be possible:
html_build_attributes(
[
'id' => 'post'
'class' => [
'post',
'post--no-sidebar' => ! $has_sidebar,
'post--no-thumb' => ! $has_thumb,
],
]
);
I mean, that it would be possible to set as an attribute value an associative array, where elements that are false
, null
, etc. are excluded.
Metadata
Metadata
Assignees
Labels
No labels