Changeset 39618 for trunk/src/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php
- Timestamp:
- 12/16/2016 10:07:41 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php
r39072 r39618 10 10 * @version 1.0 11 11 */ 12 12 13 ?> 13 14 14 15 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 15 16 <?php 16 if ( is_sticky() && is_home() ) :17 18 endif;17 if ( is_sticky() && is_home() ) { 18 echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) ); 19 } 19 20 ?> 20 21 <header class="entry-header"> 21 22 <?php 22 if ( 'post' === get_post_type() ) :23 24 if ( is_single() ) :25 26 else :27 28 29 endif;30 31 endif;23 if ( 'post' === get_post_type() ) { 24 echo '<div class="entry-meta">'; 25 if ( is_single() ) { 26 twentyseventeen_posted_on(); 27 } else { 28 echo twentyseventeen_time_link(); 29 twentyseventeen_edit_link(); 30 }; 31 echo '</div><!-- .entry-meta -->'; 32 }; 32 33 33 34 35 36 37 34 if ( is_single() ) { 35 the_title( '<h1 class="entry-title">', '</h1>' ); 36 } else { 37 the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); 38 } 38 39 ?> 39 40 </header><!-- .entry-header --> … … 49 50 <div class="entry-content"> 50 51 51 <?php if ( ! is_single() ) : 52 <?php 53 if ( ! is_single() ) { 52 54 53 55 // If not a single post, highlight the gallery. 54 if ( get_post_gallery() ) :56 if ( get_post_gallery() ) { 55 57 echo '<div class="entry-gallery">'; 56 58 echo get_post_gallery(); 57 59 echo '</div>'; 58 endif;60 }; 59 61 60 endif;62 }; 61 63 62 if ( is_single() || ! get_post_gallery() ) :64 if ( is_single() || ! get_post_gallery() ) { 63 65 64 66 /* translators: %s: Name of current post */ … … 75 77 ) ); 76 78 77 endif; ?> 79 }; 80 ?> 78 81 79 82 </div><!-- .entry-content --> 80 83 81 <?php if ( is_single() ) : ?> 82 <?php twentyseventeen_entry_footer(); ?> 83 <?php endif; ?> 84 <?php 85 if ( is_single() ) { 86 twentyseventeen_entry_footer(); 87 } 88 ?> 84 89 85 90 </article><!-- #post-## -->
Note: See TracChangeset
for help on using the changeset viewer.