[wp-trac] [WordPress Trac] #33944: Add parameters to widget_nav_menu_args filter
WordPress Trac
noreply at wordpress.org
Fri Sep 25 17:11:28 UTC 2015
#33944: Add parameters to widget_nav_menu_args filter
----------------------------+---------------------------
Reporter: walterbarcelos | Owner: DrewAPicture
Type: enhancement | Status: accepted
Priority: normal | Milestone: 4.4
Component: Widgets | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
----------------------------+---------------------------
Comment (by DrewAPicture):
After considering [attachment:33944.2.patch] a little bit, let's omit the
fifth parameter. I don't see the merit in passing either the `$this`
instance or the `id_base` for that matter. `id_base` is always going to be
`nav_menu` for widgets of this type.
We can always add `$this` later if there's a demonstrated need.
Side note: I'm also having a bit of "buyer's remorse" on adding
`$nav_menu` as a parameter in the first place when this hook was
introduced, mostly because it's already passed as part of the
`$nav_menu_args` array.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33944#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list