pocketsize / bolts-wp

A starter theme for WordPress using Bolts
2 stars 0 forks source link

Implement custom attributes in attributes() #19

Closed andreekeberg closed 5 years ago

andreekeberg commented 5 years ago

Add support for merging additional attributes into the ones passed to the component. It requires us to parse the existing attributes before merging these, if the passed attributes was passed as a string.

Example:

$attributes = attributes($attributes : '', [ 'target' => $target ?? '_blank' ])