Support » Plugin: Max Mega Menu » unsetting the menu if defined ICL_LANGUAGE_CODE breaks output

  • Resolved haveboard

    (@haveboard)


    I have a megamenu with rows and columns, each column with a text widget as a header for each column in the menu. upon upgrading from 2.4.2 to 2.5.1 the output no longer returns properly. commenting out this unset makes the output work as intened again in 2.5.1

    megamenu.php lines 1092 -1094

    if ( defined( 'ICL_LANGUAGE_CODE' ) ) {
         unset( $defaults['menu'] );
    }

    The menu items are being output immediately after the first mega-sub-menu instead of being wrapped by their appropriate mega-menu-row’s because this icl language code is triggered and unsets the megamenu, from what I can tell.

    Bad Output:

    
                <ul class="mega-sub-menu">
                  <li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-menu-item-19129" id="mega-menu-item-19129"><a class="mega-menu-link" href="#">submenu item</a></li>
    
                  <li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-menu-item-18951" id="mega-menu-item-18951"><a class="mega-menu-link" href="#">submenu item</a></li>
    
                  <li class="mega-menu-row" id="mega-menu-18932-0">
                    <ul class="mega-sub-menu">
                      <li class="mega-menu-column mega-menu-columns-4-of-12" id="mega-menu-18932-0-0">
                        <ul class="mega-sub-menu">
                          <li class="mega-menu-item mega-menu-item-type-widget widget_text mega-menu-item-text-4" id="mega-menu-item-text-4">
                            <h4 class="mega-block-title">Database</h4>
    
                            <div class="textwidget"></div>
                          </li>
                        </ul>
                      </li>
    

    VS

    Good Menu Output:

                <ul class="mega-sub-menu">
                  <li class="mega-menu-row" id="mega-menu-18932-0">
                    <ul class="mega-sub-menu">
                      <li class="mega-menu-column mega-menu-columns-4-of-12" id="mega-menu-18932-0-0">
                        <ul class="mega-sub-menu">
                          <li class="mega-menu-item mega-menu-item-type-widget widget_text mega-menu-item-text-4" id="mega-menu-item-text-4">
                            <h4 class="mega-block-title">Database</h4>
    
                            <div class="textwidget"></div>
                          </li>
    
                          <li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-menu-item-18935" id="mega-menu-item-18935"><a class="mega-menu-link" href="#">Sub mneu item</a></li>
    
                          <li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-menu-item-19129" id="mega-menu-item-19129"><a class="mega-menu-link" href="#">Sub mneu item</a></li>
                        </ul>
                      </li>
    
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘unsetting the menu if defined ICL_LANGUAGE_CODE breaks output’ is closed to new replies.