Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

purcebr on "filter hook to add options to the Walker_Nav_Menu_Edit walker"

$
0
0

Hi There!

I've set up a custom plugin to allow my user to edit each
li's background color from the Menu edit area. It adds a farbtastic color picker to each menu item, by using the wp_edit_nav_menu_walker to replace the Walker_Nav_Menu_Edit walker with a custom one. I copied out the default walker from core, copied it to a new custom walker, and made my *small* change to get the color picker to show.

This works, and everyone is happy.

But shouldn't there be a filter_hook to add a custom option to the Walker_Nav_Menu_Edit walker without overriding the whole thing? So my plugin is working, but what if I wanted to make another change to the edit walker from another plugin - one plugin's change would cancel out the other, right?

I'm wondering if there's an opportunity to improve the Walker_Nav_Menu_Edit to be with a filter hook or two to allow for custom menu options without overriding the whole walker? Maybe I'm getting ahead of myself, but I love the opportunity to contribute a patch if it could help.

thanks a bunch!!!

Bryan


Viewing all articles
Browse latest Browse all 8245

Trending Articles