This is my code:
public static function display_menu(){
printf('<nav id="menu" class="column small-10">
%s
</nav>', self::get_mobile_menu()
);
}
public static function get_mobile_menu(){
if( false === ( $mobile_menu = get_transient(self::MENUMOBILE_TRANSIENT_NAME) )){
$mobile_menu_args = array(
'theme_location' => 'mobile',
'echo' => false,
'container' => '',
'container_class' => '',
'container_id' => '',
'menu_class' => 'right',
'items_wrap' => '<ul class="%2$s">%3$s</ul>',
'walker' => new Mobile_Menu_Walker()
);
$mobile_menu = wp_nav_menu($mobile_menu_args);
set_transient( self::MENUMOBILE_TRANSIENT_NAME, $mobile_menu, self::MENU_TRANSIENT_TIME );
}
return $mobile_menu;
}
If I switch to ENG version, the Walker nav create a menu with a div class="right"
and ul
without class… Why? in ITA version, it works!
The function "display_menu"
is called into header.php