[wp-trac] [WordPress Trac] #36996: get_the_post_thumbnail and the usage of class attribute

WordPress Trac noreply at wordpress.org
Wed Dec 14 02:54:17 UTC 2016


#36996: get_the_post_thumbnail and the usage of class attribute
-----------------------------+------------------------------
 Reporter:  TomasM           |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Post Thumbnails  |     Version:  2.9
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  template
-----------------------------+------------------------------

Comment (by TomasM):

 Looks like my question:
 https://core.trac.wordpress.org/ticket/36996#comment:6

 was solved by @bcworkz at https://wordpress.org/support/topic/need-help-
 with-fixing-core-bug/

 {{{#!php
 <?php
 if ( is_array( $size ) ) {
    $size    = '$size[0]x$size[1]';
    $classes = 'attachment-$size size-$size';
 } else {
    $classes = 'attachment-' . $size . ' size-' . $size;
 }
 }}}

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


More information about the wp-trac mailing list