Skip to content

Create a menu-opener featured link in the menu builder #212

@dswebsme

Description

@dswebsme

With this commit we've successfully decoupled the menu-opener from the right-menu.

9f4c200

This allows us to manipulate the placement of the menu-opener via hooks. For example, a child theme could contain:

remove_action( 'emma_after_right_menu_items', 'emma_add_menu_opener_menu_item' );
add_action( 'emma_after_primary_menu_items', 'emma_add_menu_opener_menu_item' );

Unfortunately, there are still some limitations to this approach in that we can still only place the menu-opener in one of the 4 default menu areas (left, right, primary, footer). We could not use this method to add a the menu-opener to a utility-widget area.

Ideally, we should be able to place the menu-opener freely and without code in any menu as a Featured Link in the WordPress menu builder.

This would also allow us to revert these commits to keep our menu areas clean and consistent with the WordPress way:

  • e9e75a5
  • a85d051
  • f9f0c15
  • Similarly, the right-menu could also be restored to it's former state (prior to the menu rework)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions