[wp-trac] [WordPress Trac] #29463: Add filter in WP_Nav_Menu_Widget

WordPress Trac noreply at wordpress.org
Tue Nov 4 17:06:22 UTC 2014


#29463: Add filter in WP_Nav_Menu_Widget
-----------------------------------------------+---------------------------
 Reporter:  cyman                              |       Owner:
     Type:  enhancement                        |      Status:  new
 Priority:  normal                             |   Milestone:  4.1
Component:  Widgets                            |     Version:  3.0
 Severity:  normal                             |  Resolution:
 Keywords:  dev-feedback has-patch needs-docs  |     Focuses:
                                               |  administration
-----------------------------------------------+---------------------------

Comment (by cyman):

 Replying to [comment:11 DrewAPicture]:
 > It occurs to me that instead of introducing a new filter here -- which
 would effectively be a duplicate of `wp_nav_menu_args` -- perhaps we
 should simply introduce a "context" parameter to the existing filter hook
 that would allow targeting of this particular context. Maybe something
 like 'menu-widget' (this context), vs 'none' or '' (main context).


 I would not agree, all the other native WP widgets have the filters
 applied. This was the only exception in `default-widgets.php`.

 While adding a context to the existing filter sounds like a great idea, I
 think that we should then also consider doing the same for the other
 native WP widgets in the `default-widgets.php` file - keeping the code
 consistent, right?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29463#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list