- Timestamp:
- 11/07/2013 05:28:56 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php
r26026 r26034 166 166 */ 167 167 function twentyfourteen_post_thumbnail() { 168 if ( post_password_required() )168 if ( post_password_required() || ! has_post_thumbnail() ) 169 169 return; 170 170 … … 173 173 174 174 <div class="post-thumbnail"> 175 176 177 178 179 180 175 <?php 176 if ( is_active_sidebar( 'sidebar-2' ) || wp_is_mobile() ) 177 the_post_thumbnail( 'post-thumbnail' ); 178 else 179 the_post_thumbnail( 'post-thumbnail-full-width' ); 180 ?> 181 181 </div> 182 182 … … 184 184 185 185 <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>"> 186 <?php if ( has_post_thumbnail() && ( is_active_sidebar( 'sidebar-2' ) || wp_is_mobile() ) ) : 187 the_post_thumbnail( 'post-thumbnail' ); 188 elseif ( has_post_thumbnail() ) : 189 the_post_thumbnail( 'post-thumbnail-full-width' ); 190 else : ?> 191 <p class="screen-reader-text"><?php _e( 'No featured image.', 'twentyfourteen' ); ?></p> 192 <?php endif; ?> 186 <?php 187 if ( is_active_sidebar( 'sidebar-2' ) || wp_is_mobile() ) 188 the_post_thumbnail( 'post-thumbnail' ); 189 else 190 the_post_thumbnail( 'post-thumbnail-full-width' ); 191 ?> 193 192 </a> 194 193
Note: See TracChangeset
for help on using the changeset viewer.