[wp-trac] [WordPress Trac] #31724: Multiple calls get_terms() when: custom taxonomy (with no posts in it) and wp_nav_menu

WordPress Trac noreply at wordpress.org
Sun Mar 22 01:33:44 UTC 2015


#31724: Multiple calls get_terms() when: custom taxonomy (with no posts in it) and
wp_nav_menu
--------------------------+-----------------------------
 Reporter:  kg69design    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.1.1
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+-----------------------------
 1. When custom taxonomy is registered but with no custom-posts assigned to
 it, and when there is a wp_nav_menu() in current theme - database queries
 increased significantly (from 30 to 100+) (detect with get_num_queries()
 and query-monitor-plugin)

 2. Problem disappeared when I:
 --- delete wp_nav_menu() in current theme or
 --- delete register_taxonomy() or
 --- add 1+ custom-post into this taxonomy or
 --- commented line 588 in /wp-includes/nav-menu.php (get_terms($taxonomy,
 array('include' => $terms[$taxonomy]) );)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31724>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list