Ticket #39750: functions.php.diff
File functions.php.diff, 733 bytes (added by , 8 years ago) |
---|
-
wp-content/themes/twentyseventeen/functions.
old new 516 516 * @return string A source size value for use in a post thumbnail 'sizes' attribute. 517 517 */ 518 518 function 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'; 525 520 return $attr; 526 521 } 527 522 add_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnail_sizes_attr', 10, 3 );