[wp-trac] [WordPress Trac] #21479: Twenty Twelve: hide category and tag output in post meta if only 1 term

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 15 11:38:03 UTC 2012


#21479: Twenty Twelve: hide category and tag output in post meta if only 1 term
------------------------------+---------------------------
 Reporter:  lancewillett      |       Owner:  lancewillett
     Type:  defect (bug)      |      Status:  reopened
 Priority:  normal            |   Milestone:  3.5
Component:  Bundled Theme     |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+---------------------------

Comment (by SergeyBiryukov):

 We could use `wp_count_terms()`, which performs a faster query (`SELECT
 COUNT(*)` instead of requesting all the category data, 0.8ms vs. 4.0ms on
 my install).

 [attachment:21479.4.patch] also simplifies the `$tag_list` check.

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


More information about the wp-trac mailing list