[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
Tue Aug 9 23:14:09 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:  Awaiting Review
Component:  Performance      |    Version:
 Severity:  trivial          |   Keywords:
-----------------------------+-----------------------------
 In `WP_Query::get_posts()`, we call `get_post_types(
 array('exclude_from_search' => false) )` which we store as
 `$in_search_post_types`, but we only actually use it if `( 'any' ==
 $post_type )`. The result is not used anywhere else. We should move this
 into the conditional.

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


More information about the wp-trac mailing list