Support » Plugin: Image Widget » Compatibility with Max Mega Menu

  • Resolved megamenu

    (@megamenu)



    Hi,

    One of the latest updates has broken compatibility with Max Mega Menu – the assets are no longer being loaded on the nav-menus.php page (where we need them).

    In the admin_setup function, you have this:

    $should_load = 'customize' == $screen->base || 'widgets' == $screen->base;

    Wouuld you be able to refactor that code slightly and add in a filter – so that I can add “nav-menus” as one of the screens to load the assets on? Maybe something like:

    $should_load = false;
    
    $screens_to_load = apply_filters('image_widget_load_screens', array('customize', 'widgets'));
    
    foreach ( $screens_to_load as $screen_to_load ) {
    	if ( $screen_to_load == $screen->base ) {
    		$should_load = true;
    		break;
    	}
    }

    Regards,
    Tom

    • This topic was modified 1 year, 4 months ago by  megamenu.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Zach,

    Just thought I’d update here.

    Today I’ve been working on making MMM compatible with the upcoming WordPress 4.8 widgets. You’ll find those changes in the development version of MMM.

    I believe, if it’s possible for you to do, if you enqueue your scripts using the same technique as the new core Media Widgets then you should get your scripts loading correctly for the Widgets page and the Customizer (and it should also “just work” with MMM). Just a suggestion as I’ve been digging around the core code today 🙂

    Regards,
    Tom

    Plugin Author Zach Tirrell

    (@zbtirrell)

    I haven’t looked at what they are doing, but we’ll have a fix out shortly that will “just work” 🙂

    Plugin Contributor nicosantos

    (@nicosantos)

    Hey Tom,

    We just pushed the fix for this! Please update to version 4.4.3 and let us know if it works as expected now.

    Best,
    Nico

    Hi Nico,

    Great – working perfectly here 🙂

    Thanks
    Tom

    Plugin Contributor nicosantos

    (@nicosantos)

    Stoked to hear Tom! Thanks for confirming 🙂

    Best,
    Nico

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Compatibility with Max Mega Menu’ is closed to new replies.