• Hi,

    Awesome plugin – made my menus much easier to handle.

    But I do have images in some of my menu items and since activating this plugin I cannot see the option to add or edit images (I’m using this plugin: https://www.ads-software.com/plugins/nav-menu-images/). Please can you offer support?

    Or maybe make an extension for this plugin to display images? ??

    Thanks a bunch,
    Elliott

    • This topic was modified 7 years, 12 months ago by emangham.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Robert Noakes

    (@rnoakes3rd)

    Good Evening @emangham,

    I tried to add compatibility for the Nav Menu Images plugin, but the custom walker used by that plugin wasn’t built with compatibility in-mind. You may want to drop @dimadin a line to see if he would be willing to make the plugin more compatible with other plugins that use a customized Walker_Nav_Menu_Edit class. I followed a similar structure to the Nav Menu Roles plugin during early development.

    I am happy to hear that the plugin is useful to you and definitely appreciate your feedback!

    Thank you,
    Robert

    Hey @rnoakes3rd, how would you make it more compatible? Problem is that it seems that both plugins rely on changing walker class to add custom content inside menu item box since core lacks hook that can be used and (at least at the time for me) that is the only way to do.

    Plugin Author Robert Noakes

    (@rnoakes3rd)

    Good Morning @dimadin,

    The Nav Menu Roles plugin is where I got my inspiration for compatibility. @helgatheviking did a great job of making her plugin compatible with other plugins and themes and has some great information in the plugin FAQs at https://www.ads-software.com/plugins/nav-menu-roles/faq/. I believe your plugin would work with the same kind of treatment.

    Robert

    Thanks for the shoutout! It wasn’t my idea, but in the absence of official hooks, several menu plugins adopted a standardized hook convention. If we’re all using the same hook, we can all replace the Walkers and all our plugins will still work. You can simply add

    
    do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args );
    

    to your Walker and then add your new fields to that hook. This opens you up to reaching the PHP $_POST vars limit a little sooner than you might otherwise… which was the reason an official hook was never added to core, though if I recall there’s a workaround for that in core now, so that may not even been a problem any more.

    Here’s the long-suffering trac ticket on the subject:
    https://core.trac.www.ads-software.com/ticket/18584

    It appears there is some movement again towards making core more extensible in it’s own right without needing the hook, but the hook is a really easy stop-gap.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Support for Nav Images’ is closed to new replies.