[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Displays content for front page 4 * 5 * @package WordPress 6 * @subpackage Twenty_Seventeen 7 * @since Twenty Seventeen 1.0 8 * @version 1.0 9 */ 10 11 ?> 12 <article id="post-<?php the_ID(); ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> > 13 14 <?php 15 if ( has_post_thumbnail() ) : 16 $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' ); 17 18 // Calculate aspect ratio: h / w * 100%. 19 $ratio = $thumbnail[2] / $thumbnail[1] * 100; 20 ?> 21 22 <div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);"> 23 <div class="panel-image-prop" style="padding-top: <?php echo esc_attr( $ratio ); ?>%"></div> 24 </div><!-- .panel-image --> 25 26 <?php endif; ?> 27 28 <div class="panel-content"> 29 <div class="wrap"> 30 <header class="entry-header"> 31 <?php the_title( '<h2 class="entry-title">', '</h2>' ); ?> 32 33 <?php twentyseventeen_edit_link( get_the_ID() ); ?> 34 35 </header><!-- .entry-header --> 36 37 <div class="entry-content"> 38 <?php 39 the_content( 40 sprintf( 41 /* translators: %s: Post title. Only visible to screen readers. */ 42 __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), 43 get_the_title() 44 ) 45 ); 46 wp_link_pages( 47 array( 48 'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ), 49 'after' => '</div>', 50 ) 51 ); 52 ?> 53 </div><!-- .entry-content --> 54 55 </div><!-- .wrap --> 56 </div><!-- .panel-content --> 57 58 </article><!-- #post-<?php the_ID(); ?> -->
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Sun Dec 22 08:20:01 2024 | Cross-referenced by PHPXref |