Snippets: Disable Mobile Menu Toggle Animation

By default the Toggle mobile menu style uses the javascript slideDown animation but it can be disabled with a little code. When disabled the show/hide functionality will be done via the "visible" classname instead so you can apply custom CSS animations if you wanted or no animation at all.

add_filter( 'wpex_localize_array', funtion( $array ) {
    $array['animateMobileToggle'] = false;
    return $array;
} );

Snippet Type: PHP

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)