[wp-trac] [WordPress Trac] #39771: Suggestion for edit to content-front-page.php in TwentySeventeen Theme

WordPress Trac noreply at wordpress.org
Thu Feb 2 22:15:27 UTC 2017


#39771: Suggestion for edit to content-front-page.php in TwentySeventeen Theme
---------------------------+------------------------------
 Reporter:  dayun123       |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:  4.7.2
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------
Changes (by dingo_bastard):

 * component:  Themes => Bundled Theme


Comment:

 The odd thing is that the `content-front-page-panels.php` uses

 {{{#!php
 <?php if ( has_post_thumbnail() ) :
         $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(
 $post->ID ), 'twentyseventeen-featured-image' );

         // Calculate aspect ratio: h / w * 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-prop" style="padding-top: <?php
 echo esc_attr( $ratio ); ?>%"></div>
         </div><!-- .panel-image -->

 <?php endif; ?>
 }}}

 Maybe somebody missed that.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39771#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list