Changeset 25088
- Timestamp:
- 08/22/2013 05:02:34 PM (11 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfourteen
- Files:
-
- 6 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/archive.php
r25023 r25088 48 48 the_post(); 49 49 50 twentyfourteen_get_template_part();50 get_template_part( 'content', get_post_format() ); 51 51 endwhile; 52 52 twentyfourteen_paging_nav(); -
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-## --> -
trunk/src/wp-content/themes/twentyfourteen/content-single.php
r25023 r25088 1 <?php2 /**3 * @package WordPress4 * @subpackage Twenty_Fourteen5 */6 ?>7 8 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>9 <?php if ( has_post_thumbnail() && ! has_post_format( array( 'video', 'image', 'aside', 'link', 'quote' ) ) ) : ?>10 <div class="attachment-featured-thumbnail">11 <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>12 </div>13 <?php endif; ?>14 15 <header class="entry-header">16 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>17 <div class="entry-meta">18 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>19 </div><!-- .entry-meta -->20 <?php21 endif;22 23 if ( ! has_post_format( array( 'status', 'chat', 'aside', 'link', 'quote', 'audio' ) ) ) :24 the_title( '<h1 class="entry-title">', '</h1>' );25 endif;26 ?>27 28 <div class="entry-meta">29 <?php if ( has_post_format( array( 'status', 'chat', 'aside', 'link', 'quote', 'audio' ) ) ) : ?>30 <span class="post-format">31 <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>32 </span>33 <?php endif; ?>34 35 <?php twentyfourteen_posted_on(); ?>36 37 <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>38 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>39 <?php endif; ?>40 41 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>42 </div><!-- .entry-meta -->43 </header><!-- .entry-header -->44 45 <div class="entry-content">46 <?php47 the_content();48 wp_link_pages( array(49 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',50 'after' => '</div>',51 'link_before' => '<span>',52 'link_after' => '</span>',53 ) );54 ?>55 </div><!-- .entry-content -->56 57 <footer class="entry-meta">58 <?php if ( has_post_format( array( 'quote', 'aside' ) ) ) : ?>59 <div class="entry-meta">60 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>61 </div><!-- .entry-meta -->62 <?php endif; ?>63 64 <?php if ( has_tag() ) : ?>65 <span class="tag-links">66 <?php echo get_the_tag_list(); ?>67 </span>68 <?php endif; ?>69 </footer><!-- .entry-meta -->70 </article><!-- #post-## --> -
trunk/src/wp-content/themes/twentyfourteen/content.php
r25021 r25088 19 19 <?php endif; ?> 20 20 21 < h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>21 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> 22 22 23 23 <div class="entry-meta"> 24 <?php if ( has_post_format( 'gallery' ) ) : ?>25 <span class="post-format">26 <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'twentyfourteen' ), get_post_format_string( 'gallery' ) ) ); ?>"><?php echo get_post_format_string( 'gallery' ); ?></a>27 </span>28 24 <?php 29 endif;30 31 25 if ( 'post' == get_post_type() ) 32 26 twentyfourteen_posted_on(); -
trunk/src/wp-content/themes/twentyfourteen/front-page.php
r25069 r25088 25 25 the_post(); 26 26 27 twentyfourteen_get_template_part();27 get_template_part( 'content', get_post_format() ); 28 28 29 29 comments_template(); -
trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php
r25087 r25088 144 144 add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' ); 145 145 add_action( 'save_post', 'twentyfourteen_category_transient_flusher' ); 146 147 /**148 * Include the Post-Format-specific template for the content.149 * This is called in index.php and single.php150 */151 function twentyfourteen_get_template_part() {152 if ( has_post_format( array( 'aside', 'quote', 'link', 'video', 'image' ) ) )153 get_template_part( 'content', 'post-format' );154 else155 get_template_part( 'content', get_post_format() );156 } -
trunk/src/wp-content/themes/twentyfourteen/index.php
r25023 r25088 23 23 the_post(); 24 24 25 twentyfourteen_get_template_part();25 get_template_part( 'content', get_post_format() ); 26 26 endwhile; 27 27 twentyfourteen_paging_nav(); -
trunk/src/wp-content/themes/twentyfourteen/search.php
r25023 r25088 22 22 the_post(); 23 23 24 twentyfourteen_get_template_part();24 get_template_part( 'content', get_post_format() ); 25 25 endwhile; 26 26 twentyfourteen_paging_nav(); -
trunk/src/wp-content/themes/twentyfourteen/single.php
r25023 r25088 15 15 the_post(); 16 16 17 get_template_part( 'content', 'single');17 get_template_part( 'content', get_post_format() ); 18 18 19 19 twentyfourteen_post_nav(); -
trunk/src/wp-content/themes/twentyfourteen/style.css
r25087 r25088 1026 1026 } 1027 1027 .post-formatted-posts .entry-title:after, 1028 .content-area span + span.entry-date:before,1028 .content-area span + .entry-date:before, 1029 1029 span + .byline:before, 1030 1030 span + .comments-link:before, … … 1140 1140 .format-video { 1141 1141 border-top: 1px solid rgba(0, 0, 0, 0.1); 1142 }1143 .format-aside .entry-title,1144 .format-quote .entry-title,1145 .format-link .entry-title {1146 display: none;1147 1142 } 1148 1143 .format-aside .entry-content,
Note: See TracChangeset
for help on using the changeset viewer.