[wp-trac] [WordPress Trac] #27042: Use of the_post() in _wp_admin_menu_quick_search() is making in_the_loop = true

WordPress Trac noreply at wordpress.org
Sun Jun 26 12:36:45 UTC 2016


#27042: Use of the_post() in _wp_admin_menu_quick_search() is making in_the_loop =
true
------------------------------------+------------------------------
 Reporter:  ruud@…                  |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Menus                   |     Version:  3.0
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  administration
------------------------------------+------------------------------

Comment (by ruud@…):

 Using WP_Query instead of query_posts seems like a more performant way of
 obtaining this small list of pages. Also this solves the initial 'problem'
 of having a 'in_the_loop=true' value.
 Somehow the 'in_the_loop=true' feels like a side-effect of the former/old
 method of getting posts for this specific purpose.

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


More information about the wp-trac mailing list