• Resolved tdmalone

    (@tdmalone)


    Hi there,

    Wondering if you could add a new filter to the plugin? I am trying to include descriptions in a theme when using Menu Image, and a filter on the item output would be really helpful!!

    Around line 205 just before the $item_output is returned, this could be achieved with one new line:

    $item_output = apply_filters(“menu_image_item_output”, $item_output, $item);

    I could then hook into this and, for example, append the description to the item_output with my own markup if the description is set in $item

    Thanks for your consideration.

    https://wordpress.org/plugins/menu-image/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    You can use walker_nav_menu_start_el filter with high priority.

    if you do this is not enough then pull request is welcome

    Thread Starter tdmalone

    (@tdmalone)

    Hi zviryatko, thanks – that’s perfect! I didn’t know about that filter 🙂

    A default priority of 10 works just fine for what I needed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Could you add a new filter?’ is closed to new replies.