[wp-trac] [WordPress Trac] #33944: Add parameters to widget_nav_menu_args filter
WordPress Trac
noreply at wordpress.org
Mon Sep 28 09:00:04 UTC 2015
#33944: Add parameters to widget_nav_menu_args filter
----------------------------+------------------------------
Reporter: walterbarcelos | Owner: DrewAPicture
Type: enhancement | Status: accepted
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
----------------------------+------------------------------
Changes (by walterbarcelos):
* keywords: has-patch reporter-feedback => has-patch
Comment:
Hi @DrewAPicture.
Sorry for the delay and thank you very much for reviewing this patch.
After reading your comments I think you're totally right. I only need the
{{{$instance}}} object to do what I'd like to do.
The idea is to add an action to {{{in_widget_form}}}, detect if it's a
custom menu widget and if so, display a dropdown so the user can select
any of the walkers I have implemented. Pretty much like the page template
selection on the page's form.
I need {{{$instance}}} because when I filter {{{widget_nav_menu_args}}} I
need to get the value selected on the dropdown, which is accessible
through the widget settings, in order to create the walker object and
assign it to {{{$nav_menu_args['walker']}}}.
Please let me know if you need more info.
Thanks,
Walter.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33944#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list