• Hello,

    I have multi site set-up for my website and i’m using multilingual press and max mega menu both.
    When i add widget in mega menu then menu disappears. I tried finding the solution and almost found something.

    In megamenu.php

    Change

    add_filter( 'wp_nav_menu_objects', array( $this, 'add_widgets_to_menu' ), apply_filters( 'megamenu_wp_nav_menu_objects_priority', 10 ), 2 );

    to

    add_filter( 'wp_nav_menu_objects', array( $this, 'add_widgets_to_menu' ),PHP_INT_MAX, 2 );

    Then it works but using filter hook i’m unable to change priority without making change in plugin.

    I’m trying

    add_filter('megamenu_wp_nav_menu_objects_priority',function (){
    	return PHP_INT_MAX;
    });
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi vikasdrc,

    The code you’ve posted looks like it should do what you intend it to do.

    It looks like multilingualpress is now a Pro only plugin, so I’m unable to test anything. Can you reduce the priority of the wp_nav_menu_objects filter in multilingualpress instead? It seems it would be better to avoid using PHP_INT_MAX if possible, or ask multilingualpress to make their code compatible.

    Regards,
    Tom

    Thread Starter vikasdrc

    (@vikasdrc)

    Thanks for your reply Tom.

    But i think hook should work to change priority.
    Thanks anyways will ask to multilingualpress.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Incompatible with multilingualpress’ is closed to new replies.