Skip to content

2.0.0

Latest
Compare
Choose a tag to compare
@davidwebca davidwebca released this 31 Aug 17:11

This release introduces breaking changes and updates regarding custom attributes on any elements.

New

  • Any html attribute can now be added to any elements, including submenus (previously lacking because of WordPress core, fixed in (this trac ticket)[https://core.trac.wordpress.org/ticket/57140] thanks to my contribution to core).
  • Now supports arrays in all of our classes attributes and can now be declared like this :
 wp_nav_menu([
    'theme_location' => 'primary_navigation',
    'a_class' => ['text-white', 'bg-blue-500'],
    'li_atts' => [
        'class' => ['focus:ring-2', 'ring-orange-500']
    ]
    // ...
]);

Please note that this is not native WordPress behavior and that it is only provided by this package as a convenience.

Breaking

  • link_atts has been removed for consistency and a_atts should be used instead.