[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
Thu Mar 27 13:45:08 UTC 2014


#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 reporter-feedback  |     Focuses:  administration
-----------------------------------------+------------------------------

Comment (by ruud@…):

 The scenario in which this became apparent (and a problem) is as follows:
 We use a naming convention where a page/post title can have additional
 info enclosed with square brackets, e.g.: "Reception [senior department]"

 We have multiple 'Reception' pages throughout our website for each
 department. This helps us greatly in some cases where page/post titles are
 shown in CMS dropdowns etc. the bracket designation helps identify the
 page you want (instead of random choosing 1 of perhaps 6 'Reception'
 pages)

 To prevent showing this title to an end-user we use the 'the_title' filter
 with a 'in_the_loop' check. The filter then removes the square bracket
 part of the title.

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


More information about the wp-trac mailing list