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

WordPress Trac noreply at wordpress.org
Mon Jun 27 11:50:32 UTC 2016


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

 * owner:   => ocean90
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"37881"]:
 {{{
 #!CommitTicketReference repository="" revision="37881"
 Nav Menus: Use `WP_Query` for quick searches.

 `the_post()` sets the `$in_the_loop` property to true which is unexpected
 in the admin if you're using filters which should only affect real loops.

 Props ruud at joyo.
 Fixes #27042.
 }}}

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


More information about the wp-trac mailing list