Twenty Seventeen: Remove some extraneous function calls.
fixes #38848. git-svn-id: https://develop.svn.wordpress.org/trunk@39286 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c1b2e9dd41
commit
faf751b039
|
@ -17,12 +17,8 @@ global $twentyseventeencounter;
|
||||||
<?php if ( has_post_thumbnail() ) :
|
<?php if ( has_post_thumbnail() ) :
|
||||||
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
|
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
|
||||||
|
|
||||||
$post_thumbnail_id = get_post_thumbnail_id( $post->ID );
|
|
||||||
|
|
||||||
$thumbnail_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
|
|
||||||
|
|
||||||
// Calculate aspect ratio: h / w * 100%.
|
// Calculate aspect ratio: h / w * 100%.
|
||||||
$ratio = $thumbnail_attributes[2] / $thumbnail_attributes[1] * 100;
|
$ratio = $thumbnail[2] / $thumbnail[1] * 100;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);">
|
<div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);">
|
||||||
|
|
Loading…
Reference in New Issue