Make WordPress Core

Ticket #39750: functions.php.diff

File functions.php.diff, 733 bytes (added by thbabut, 8 years ago)

Patch for the TwentySeventeen-Theme

  • wp-content/themes/twentyseventeen/functions.

    old new  
    516516 * @return string A source size value for use in a post thumbnail 'sizes' attribute.
    517517 */
    518518function twentyseventeen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) {
    519         if ( is_archive() || is_search() || is_home() ) {
    520                 $attr['sizes'] = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px';
    521         } else {
    522                 $attr['sizes'] = '100vw';
    523         }
    524 
     519        $attr['sizes'] = '100vw';
    525520        return $attr;
    526521}
    527522add_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnail_sizes_attr', 10, 3 );