[wp-trac] [WordPress Trac] #55372: Use tax_query in wp_get_nav_menu_items

WordPress Trac noreply at wordpress.org
Tue Mar 29 11:05:43 UTC 2022

#55372: Use tax_query in wp_get_nav_menu_items
 Reporter:  spacedmonkey                         |       Owner:
                                                 |  spacedmonkey
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.0
Component:  Menus                                |     Version:  3.0
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch needs-unit-tests good-     |     Focuses:
  first-bug                                      |  performance
Changes (by spacedmonkey):

 * status:  assigned => closed
 * resolution:   => fixed


 In [changeset:"53010" 53010]:
 #!CommitTicketReference repository="" revision="53010"
 Menus: Convert `wp_get_nav_menu_items` function to use a taxonomy query.

 Change the `wp_get_nav_menu_items` function to replace the call to
 `get_objects_in_term` with a simple taxonomy query. This change improves
 performance as it results in one fewer query to retrieve menu items from

 Props Spacedmonkey, peterwilsoncc.
 Fixes #55372.

Ticket URL: <https://core.trac.wordpress.org/ticket/55372#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list