[wp-trac] [WordPress Trac] #18804: Add "has-post-thumbnail" class to post_class() when there's a featured image

WordPress Trac noreply at wordpress.org
Sun Jan 19 20:08:37 UTC 2014


#18804: Add "has-post-thumbnail" class to post_class() when there's a featured
image
-------------------------------------+------------------------------
 Reporter:  danielbachhuber          |       Owner:  danielbachhuber
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  3.9
Component:  Template                 |     Version:  2.9
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |
-------------------------------------+------------------------------

Comment (by lancewillett):

 This would be a great enhancement, and we can remove code from default
 themes, like  these two cases:
 [https://core.trac.wordpress.org/browser/trunk/src/wp-
 content/themes/twentyfourteen/functions.php#L463 Twenty Fourteen] and
 [https://core.trac.wordpress.org/browser/trunk/src/wp-
 content/themes/twentytwelve/functions.php#L430 Twenty Twelve].

 One note: it'd be nice to avoid adding the body class when the post is
 password protected. In the case of Twenty Fourteen, that way the CSS
 hooked to the class won't change the display of the post when an image
 isn't going to be displayed.

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


More information about the wp-trac mailing list