Header Builder Menu filters
1. Filter 'menu_item_with_sublists'
Filter to disable all submenu items for menus in the header builder.
Filter usage:
add_filter('menu_item_with_sublists', '__return_false');
Example:
Before using the filter - the submenu is shown
After using the filter - no submenu
2. Filter: 'menu_item_dropdown_full_width'
Filter to make the first submenu full-width (for the menus in the header builder)
Filter usage:
add_filter('menu_item_dropdown_full_width', '__return_true');
Example:
Before using the filter - https://prnt.sc/2WILhXsVmbT7 ( submenu limited by settings of columns for item or container width - https://prnt.sc/BA57Ff1IpEHO )
After using the filter - https://prnt.sc/_rV8kwN94aSB ( submenu is stretched by window width )
Note: You need to have mega menu type selected for menu item parent -> https://prnt.sc/ZyuZd8mqdhzh)
3. Filter: 'menu_dropdown_ajax'
Filter to make submenus ajax loading (for menus in the header builder)
Filter usage:
add_filter('menu_dropdown_ajax', '__return_true');
Example:
Before using the filter - https://prnt.sc/2WILhXsVmbT7 ( submenu is loaded with page load )
After using the filter - https://prnt.sc/cC6Jc0RcRuFU ( submenu is not loaded untill user iterate with menu item )
Note: You need to have mega menu type selected for menu item parent -> https://prnt.sc/ZyuZd8mqdhzh)
4. Filter name: 'menu_item_with_svg_arrow'
Filter to disable arrows showing that there are submenus (for menus in the header builder)
Filter usage:
add_filter('menu_item_with_svg_arrow', '__return_false', 20);
Example:
Before using the filter - https://prnt.sc/0QmxdQhDknsv (arrows are shown in items that have submenus)
After using the filter - https://prnt.sc/fj80qxWHQ-rL (no arrows are shown)