[wp-trac] [WordPress Trac] #18364: Don't compute in_search_post_types if we're not going to use it

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 10 03:26:39 UTC 2011


#18364: Don't compute in_search_post_types if we're not going to use it
-----------------------------+------------------
 Reporter:  mitchoyoshitaka  |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  3.3
Component:  Performance      |     Version:
 Severity:  trivial          |  Resolution:
 Keywords:  has-patch        |
-----------------------------+------------------

Comment (by mitchoyoshitaka):

 Wait, just noticed that this logic here might in fact have a flaw: if
 there are no post types which have `exclude_from_search` = false, then
 magically *all* post types will be checked? Am I reading this right? In
 that case, shouldn't we just immediately return no results?

 Obviously, this wouldn't be an issue except in a very customized setup
 where all post types have `exclude_from_search` = true, but still...
 thoughts anyone?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18364#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list