- Timestamp:
- 08/15/2013 12:24:27 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/content-post-format.php
r25021 r25023 4 4 * @subpackage Twenty_Fourteen 5 5 */ 6 $format = get_post_format();7 6 ?> 8 7 9 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix'); ?>>8 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 10 9 <?php 11 if ( 'gallery' == $format) :12 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) );10 if ( has_post_format( 'gallery' ) ) : 11 $images = get_children( array( 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) ); 13 12 if ( $images ) : 14 $image = array_shift( $images ); ?> 13 $image = array_shift( $images ); 14 ?> 15 15 <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail"> 16 16 <?php echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-large' ); ?> 17 </a><?php 17 </a> 18 <?php 18 19 endif; 19 20 endif; … … 21 22 22 23 <header class="entry-header"> 23 <?php 24 /* translators: used between list items, there is a space after the comma */ 25 $categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) ); 26 if ( $categories_list && twentyfourteen_categorized_blog() && 'post' == get_post_type() ) : 27 ?> 24 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 28 25 <div class="entry-meta"> 29 <span class="cat-links"><?php echo $categories_list; ?></span>30 </div> 26 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> 27 </div><!-- .entry-meta --> 31 28 <?php endif; ?> 32 29 33 <?php 34 /* Show title only if it exists */ 35 the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' ); 36 ?> 30 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> 37 31 38 32 <div class="entry-meta">
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)