Hooks: Mobile Menu

← Back to all hooks
Hook Return Usage
wpex_mobile_menu_open_button_text string

Returns the text or HTML to display for the mobile menu toggle button. Default isĀ ‘<span class=”fa fa-bars”></span>’.

wpex_header_menu_mobile_style string

Returns the header mobile menu style. Accepts sidr, toggle, full_screen or disabled. Default is “sidr”.

wpex_has_header_menu_mobile bool

Check if the header menu has a mobile menu version. If you are using a custom header you could potentially set this filter to __return_true so that the theme inserts the mobile menu code onto the page and then you can make use of it via a custom toggle button with the classname “mobile-menu-toggle”.

wpex_has_mobile_menu_alt bool

Check if the mobile menu is using a custom menu for the mobile menu and it’s not empty.

wpex_mobile_menu_toggle_class array

Returns array of classnames for the header menu mobile menu toggle element.

wpex_mobile_menu_toggle_style string

Returns the name of the mobile menu toggle style to be used. Accepts icon_buttons, icon_buttons_under_logo, navbar, fixed_top, custom.

wpex_header_menu_mobile_breakpoint int

Returns a numerical value for the mobile menu breakpoint, which is the screen width at which the main header menu becomes hidden and the mobile menu toggle becomes visible.

wpex_mobile_menu_source array

Returns an array of element classnames or ID’s to be appended to the Sidebar style mobile menu.

wpex_mobile_menu_open_button_text string

Returns the “text” to be used for the mobile menu hamburger icon. By default it returns the hamburger icon only.

wpex_mobile_menu_toggle_icon string

Returns the HTML to be used for the mobile menu hamburger toggle icon. By default this includes the link, screen reader text and icon.

wpex_header_menu_mobile_toggle_icons string

Returns the HTML to be added to the mobile menu toggle area next to the hamburger icons. By default it displays the Mobile menu icons menu.

wpex_get_mobile_menu_styles array

Returns array of mobile menu style choices ( sidr, toggle, full_screen or disabled).