Changeset 41343
- Timestamp:
- 09/08/2017 06:03:09 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentysixteen/functions.php
r41341 r41343 372 372 $width = $size[0]; 373 373 374 840 <= $width && $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px'; 374 if ( 840 <= $width ){ 375 $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px'; 376 } 375 377 376 378 if ( 'page' === get_post_type() ) { 377 840 > $width && $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px'; 379 if ( 840 > $width ) { 380 $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px'; 381 } 378 382 } else { 379 840 > $width && 600 <= $width && $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px'; 380 600 > $width && $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px'; 383 if ( 840 > $width && 600 <= $width ) { 384 $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px'; 385 } elseif ( 600 > $width ) { 386 $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px'; 387 } 381 388 } 382 389 … … 398 405 function twentysixteen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) { 399 406 if ( 'post-thumbnail' === $size ) { 400 is_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 60vw, (max-width: 1362px) 62vw, 840px'; 401 ! is_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 88vw, 1200px'; 407 if ( is_active_sidebar( 'sidebar-1' ) ) { 408 $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 60vw, (max-width: 1362px) 62vw, 840px'; 409 } else { 410 $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 88vw, 1200px'; 411 } 402 412 } 403 413 return $attr;
Note: See TracChangeset
for help on using the changeset viewer.