[wp-trac] [WordPress Trac] #19671: Only retrieve categories list if post type supports categories

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 26 20:02:24 UTC 2011


#19671: Only retrieve categories list if post type supports categories
--------------------------+-----------------------------
 Reporter:  niallkennedy  |      Owner:
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Template      |    Version:  3.3
 Severity:  minor         |   Keywords:  has-patch
--------------------------+-----------------------------
 The {{{get_the_category_list}}} function attempts to pull a list of
 categories before it checks if a category relationship applies to the
 current {{{post_type}}}. Attached patch moves the category retrieval down
 a few lines: after we've determined a category relationship could exist.

 === Before ===

 * Fetch and assign all categories to a variable
 * Test if post type uses categories

 === After ===

 * Test if post type uses categories
 * Fetch and assign all categories to a variable


 Saves fetch time and filtering for post types without a category
 relationship.

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


More information about the wp-trac mailing list