- Timestamp:
- 08/22/2013 05:02:34 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/content-post-format.php
r25023 r25088 1 <?php2 /**3 * @package WordPress4 * @subpackage Twenty_Fourteen5 */6 ?>7 8 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>9 <?php10 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' ) );12 if ( $images ) :13 $image = array_shift( $images );14 ?>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 <?php echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-large' ); ?>17 </a>18 <?php19 endif;20 endif;21 ?>22 23 <header class="entry-header">24 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>25 <div class="entry-meta">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 -->28 <?php endif; ?>29 30 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>31 32 <div class="entry-meta">33 <span class="post-format">34 <a class="entry-format" href="<?php echo esc_url( get_post_format_link( get_post_format() ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'twentyfourteen' ), get_post_format_string( get_post_format() ) ) ); ?>"><?php echo get_post_format_string( get_post_format() ); ?></a>35 </span>36 37 <?php38 if ( 'post' == get_post_type() )39 twentyfourteen_posted_on();40 41 if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) :42 ?>43 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>44 <?php endif; ?>45 46 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>47 </div><!-- .entry-meta -->48 </header><!-- .entry-header -->49 50 <div class="entry-content">51 <?php52 the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) );53 wp_link_pages( array(54 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',55 'after' => '</div>',56 'link_before' => '<span>',57 'link_after' => '</span>',58 ) );59 ?>60 </div><!-- .entry-content -->61 62 <footer class="entry-meta">63 <?php if ( has_post_format( array( 'quote', 'aside' ) ) ) : ?>64 <div class="entry-meta">65 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>66 </div>67 <?php endif; ?>68 69 <?php if ( has_tag() ) : ?>70 <span class="tag-links"><?php echo get_the_tag_list(); ?></span>71 <?php endif; ?>72 </footer><!-- .entry-meta -->73 </article><!-- #post-## -->
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)