[wp-trac] [WordPress Trac] #22271: get_post_class() does not always apply filter to output

WordPress Trac noreply at wordpress.org
Mon Nov 5 17:07:50 UTC 2012


#22271: get_post_class() does not always apply filter to output
-----------------------------+------------------------------
 Reporter:  F J Kaiser       |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Template         |     Version:  3.4
 Severity:  normal           |  Resolution:
 Keywords:  has-patch close  |
-----------------------------+------------------------------

Comment (by nacin):

 WordPress often applies a filter to all return values, but sometimes will
 not do so in an error, or will use an alternate filter name for unexpected
 or sudden returns. This seems like a good situation for there to be a
 unique filter.

 Those applying a post class will be doing so — in nearly all cases — with
 the expectation that $post is indeed an object. This seems like a very
 reasonable expectation, and practically, things could break if we try to
 apply the same post_class filter in this case.

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


More information about the wp-trac mailing list