[wp-trac] [WordPress Trac] #24035: in WP 3.5.1, filter wp_nav_menu_items is never called on empty menus

WordPress Trac noreply at wordpress.org
Thu Apr 11 17:01:28 UTC 2013


#24035: in WP 3.5.1, filter wp_nav_menu_items is never called on empty menus
--------------------------+------------------------------
 Reporter:  mykle         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:  3.5
 Severity:  normal        |  Resolution:
 Keywords:  close         |
--------------------------+------------------------------

Comment (by DrewAPicture):

 Replying to [comment:4 mykle]:
 > I would argue (politely!) that the menu filters are for changing the
 contents of a menu, and that adding contents to an empty menu is just as
 legitimate a use of those filters as any other.  If that's true, then you
 can't really say a menu is empty until you've called its filters.  That
 has been normal behavior up to 3.5 .

 I think that's a valid argument. On the other hand, reverting the change
 from [21868] doesn't maintain both what you're aiming for and hiding the
 markup for an empty menu.

 I can see moving the filter earlier or bailing later in the function, but
 there may be wider back-compat implications to consider. Let's see what
 @nacin or @SergeyBiryukov have to say.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24035#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list