Ticket #38848: 38848.diff
File 38848.diff, 1020 bytes (added by , 8 years ago) |
---|
-
src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php
17 17 <?php if ( has_post_thumbnail() ) : 18 18 $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' ); 19 19 20 $post_thumbnail_id = get_post_thumbnail_id( $post->ID );21 22 $thumbnail_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );23 24 20 // Calculate aspect ratio: h / w * 100%. 25 $ratio = $thumbnail _attributes[2] / $thumbnail_attributes[1] * 100;21 $ratio = $thumbnail[2] / $thumbnail[1] * 100; 26 22 ?> 27 23 28 24 <div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);">