[wp-trac] [WordPress Trac] #39849: Filter `nav_menu_items_{$post_type_name}_recent` passes base args, not recent

WordPress Trac noreply at wordpress.org
Thu Jun 15 14:44:26 UTC 2017


#39849: Filter `nav_menu_items_{$post_type_name}_recent` passes base args, not
recent
--------------------------+------------------------------
 Reporter:  eclev91       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:  4.7.2
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  administration
--------------------------+------------------------------

Comment (by welcher):

 @eclev91 I've added an initial patch and @johnbillion reviewed it with me.

 The concern with my approach is that `$args['walker']` is overridden after
 the array merge and doesn't exist in the `$recent_args` array. We both
 agreed that it may be better to add a fourth argument to the filter that
 holds `$recent_args` instead.

 Would you like to apply those changes?

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


More information about the wp-trac mailing list