[wp-trac] [WordPress Trac] #37114: Allow short-circuiting `get_post_class` for performance

WordPress Trac noreply at wordpress.org
Mon Sep 5 05:44:13 UTC 2022


#37114: Allow short-circuiting `get_post_class` for performance
-------------------------------+------------------------------------
 Reporter:  bordoni            |       Owner:  davidbaumwald
     Type:  enhancement        |      Status:  closed
 Priority:  normal             |   Milestone:  6.1
Component:  Posts, Post Types  |     Version:  4.2
 Severity:  normal             |  Resolution:  fixed
 Keywords:  has-patch commit   |     Focuses:  template, performance
-------------------------------+------------------------------------
Changes (by peterwilsoncc):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"54066" 54066]:
 {{{
 #!CommitTicketReference repository="" revision="54066"
 Posts, Post Types: Allow bypassing of term classes in `get_post_class()`.

 Introduces the filter `wp_post_class_taxonomies` to allow developers to
 bypass the generation of term based classes with the `get_post_class()`
 function.

 Developers can use this filter to reduce the number of taxonomies for
 which classes term classes are generated. This can improve performance on
 sites with a large number of custom taxonomies.

 Props boonebgorges, bordoni, davidbaumwald, desrosj, invelity, mukesh27,
 sebastianpisula, steveo2000, swissspidy, system909, tlovett1, xparham.
 Fixes #37114.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/37114#comment:35>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list