[wp-trac] [WordPress Trac] #16503: get_post_format() generates queries on unsupported post types

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 9 09:44:52 UTC 2011


#16503: get_post_format() generates queries on unsupported post types
--------------------------+-----------------------
 Reporter:  nacin         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  3.1
Component:  Performance   |    Version:
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------
 get_post_format() is used in two places in the list table templating,
 which will cause an unnecessary term fetch query for every post. That's no
 fun.

 I started to fix this by patching the problem instances. But it should
 itself bail early if the post type isn't supported. Incoming patch does
 both. Pick and choose.

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


More information about the wp-trac mailing list