Changeset 25021
- Timestamp:
- 08/14/2013 04:38:01 PM (12 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfourteen
- Files:
-
- 1 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/404.php
r24832 r25021 12 12 <div id="content" class="site-content" role="main"> 13 13 14 <article id="post-0" class="post error404 not-found"> 15 <header class="entry-header"> 16 <h1 class="entry-title"><?php _e( 'Oops! That page can’t be found.', 'twentyfourteen' ); ?></h1> 17 </header><!-- .entry-header --> 14 <header class="page-header"> 15 <h1 class="page-title"><?php _e( "Oops! That page can't be found.", 'twentyfourteen' ); ?></h1> 16 </header> 18 17 19 <div class="entry-content">20 <p><?php _e( 'It looks like nothing was found at this location. Maybe try one of the links below ora search?', 'twentyfourteen' ); ?></p>18 <div class="page-content"> 19 <p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentyfourteen' ); ?></p> 21 20 22 <?php get_search_form(); ?> 21 <?php get_search_form(); ?> 22 </div><!-- .page-content --> 23 23 24 </div><!-- .entry-content -->25 </article><!-- #post-0 .post .error404 .not-found-->24 </div><!-- #content --> 25 </div><!-- #primary --> 26 26 27 </div><!-- #content .site-content --> 28 </div><!-- #primary .content-area --> 29 30 <?php get_sidebar( 'content' ); ?> 31 32 <?php get_sidebar(); ?> 33 34 <?php get_footer(); ?> 27 <?php 28 get_sidebar( 'content' ); 29 get_sidebar(); 30 get_footer(); -
trunk/src/wp-content/themes/twentyfourteen/archive.php
r24832 r25021 2 2 /** 3 3 * The template for displaying Archive pages. 4 * 5 * Used to display archive-type pages if nothing more specific matches a query. 6 * For example, puts together date-based pages if no date.php file exists. 7 * 8 * If you'd like to further customize these archive views, you may create a 9 * new template file for each specific one. For example, Twenty Fourteen 10 * already has tag.php for Tag archives, category.php for Category archives, 11 * and author.php for Author archives. 4 12 * 5 13 * Learn more: http://codex.wordpress.org/Template_Hierarchy … … 14 22 <div id="content" class="site-content" role="main"> 15 23 16 <?php if ( have_posts() ) : ?>24 <?php if ( have_posts() ) : ?> 17 25 18 26 <header class="page-header"> 19 27 <h1 class="page-title"> 20 28 <?php 21 if ( is_ category() ) {22 printf( __( ' Category Archives: %s', 'twentyfourteen' ), '<span>' . single_cat_title( '', false ) . '</span>');29 if ( is_day() ) : 30 printf( __( 'Day: %s', 'twentyfourteen' ), get_the_date() ); 23 31 24 } elseif ( is_tag() ) {25 printf( __( ' Tag Archives: %s', 'twentyfourteen' ), '<span>' . single_tag_title( '', false ) . '</span>');32 elseif ( is_month() ) : 33 printf( __( 'Month: %s', 'twentyfourteen' ), get_the_date( 'F Y' ) ); 26 34 27 } elseif ( is_author() ) { 28 /* Queue the first post, that way we know 29 * what author we're dealing with (if that is the case). 30 */ 31 the_post(); 32 printf( __( 'Author Archives: %s', 'twentyfourteen' ), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); 33 /* Since we called the_post() above, we need to 34 * rewind the loop back to the beginning that way 35 * we can run the loop properly, in full. 36 */ 37 rewind_posts(); 35 elseif ( is_year() ) : 36 printf( __( 'Year: %s', 'twentyfourteen' ), get_the_date( 'Y' ) ); 38 37 39 } elseif ( is_day() ) { 40 printf( __( 'Daily Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date() . '</span>' ); 41 42 } elseif ( is_month() ) { 43 printf( __( 'Monthly Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date( 'F Y' ) . '</span>' ); 44 45 } elseif ( is_year() ) { 46 printf( __( 'Yearly Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date( 'Y' ) . '</span>' ); 47 48 } else { 38 else : 49 39 _e( 'Archives', 'twentyfourteen' ); 50 40 51 }41 endif; 52 42 ?> 53 43 </h1> 54 <?php55 if ( is_category() ) {56 // show an optional category description57 $category_description = category_description();58 if ( ! empty( $category_description ) )59 echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );60 61 } elseif ( is_tag() ) {62 // show an optional tag description63 $tag_description = tag_description();64 if ( ! empty( $tag_description ) )65 echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );66 }67 ?>68 44 </header><!-- .page-header --> 69 45 70 <?php while ( have_posts() ) : the_post(); ?> 46 <?php 47 while ( have_posts() ) : 48 the_post(); 71 49 72 <?php twentyfourteen_get_template_part(); ?> 50 twentyfourteen_get_template_part(); 51 endwhile; 52 twentyfourteen_content_nav( 'nav-below' ); 73 53 74 <?php endwhile; ?> 54 else : 55 get_template_part( 'no-results', 'archive' ); 75 56 76 <?php twentyfourteen_content_nav( 'nav-below' ); ?> 57 endif; 58 ?> 59 </div><!-- #content --> 60 </section><!-- #primary --> 77 61 78 <?php else : ?> 79 80 <?php get_template_part( 'no-results', 'archive' ); ?> 81 82 <?php endif; ?> 83 84 </div><!-- #content .site-content --> 85 </section><!-- #primary .content-area --> 86 87 <?php get_sidebar( 'content' ); ?> 88 89 <?php get_sidebar(); ?> 90 91 <?php get_footer(); ?> 62 <?php 63 get_sidebar( 'content' ); 64 get_sidebar(); 65 get_footer(); -
trunk/src/wp-content/themes/twentyfourteen/comments.php
r24832 r25021 3 3 * The template for displaying Comments. 4 4 * 5 * The area of the page that contains both current comments 6 * and the comment form. The actual display of comments is 7 * handled by a callback to twentyfourteen_comment() which is 8 * located in the functions.php file. 5 * The area of the page that contains comments and the comment form. 9 6 * 10 7 * @package WordPress 11 8 * @subpackage Twenty_Fourteen 12 9 */ 10 11 /* 12 * If the current post is protected by a password and the visitor has not yet 13 * entered the password we will return early without loading the comments. 14 */ 15 if ( post_password_required() ) 16 return; 13 17 ?> 14 18 15 <?php 16 /* 17 * If the current post is protected by a password and 18 * the visitor has not yet entered the password we will 19 * return early without loading the comments. 20 */ 21 if ( post_password_required() ) 22 return; 23 ?> 24 25 <div id="comments" class="comments-area"> 26 27 <?php // You can start editing here -- including this comment! ?> 19 <div id="comments" class="comments-area"> 28 20 29 21 <?php if ( have_comments() ) : ?> 30 <h2 class="comments-title">31 <?php32 printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentyfourteen' ),33 number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );34 ?>35 </h2>36 22 37 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> 38 <nav role="navigation" id="comment-nav-above" class="site-navigation comment-navigation clearfix"> 39 <h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> 40 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> 41 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> 42 </nav><!-- #comment-nav-above .site-navigation .comment-navigation --> 43 <?php endif; // check for comment navigation ?> 23 <h2 class="comments-title"> 24 <?php 25 printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentyfourteen' ), 26 number_format_i18n( get_comments_number() ), get_the_title() ); 27 ?> 28 </h2> 44 29 45 <ol class="commentlist"> 46 <?php 47 /* Loop through and list the comments. Tell wp_list_comments() 48 * to use twentyfourteen_comment() to format the comments. 49 * If you want to overload this in a child theme then you can 50 * define twentyfourteen_comment() and that will be used instead. 51 * See twentyfourteen_comment() in inc/template-tags.php for more. 52 */ 53 wp_list_comments( array( 'callback' => 'twentyfourteen_comment' ) ); 54 ?> 55 </ol><!-- .commentlist --> 30 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> 31 <nav id="comment-nav-above" class="navigation comment-navigation" role="navigation"> 32 <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> 33 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> 34 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> 35 </nav><!-- #comment-nav-above --> 36 <?php endif; // Check for comment navigation. ?> 56 37 57 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> 58 <nav role="navigation" id="comment-nav-below" class="site-navigation comment-navigation clearfix"> 59 <h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> 60 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> 61 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> 62 </nav><!-- #comment-nav-below .site-navigation .comment-navigation --> 63 <?php endif; // check for comment navigation ?> 38 <ol class="comment-list"> 39 <?php 40 wp_list_comments( array( 41 'style' => 'ol', 42 'short_ping' => true, 43 44 // TODO: Remove callback and update styles. 45 'callback'=>'twentyfourteen_comment', 46 ) ); 47 ?> 48 </ol><!-- .comment-list --> 49 50 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> 51 <nav id="comment-nav-below" class="navigation comment-navigation" role="navigation"> 52 <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> 53 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> 54 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> 55 </nav><!-- #comment-nav-below --> 56 <?php endif; // Check for comment navigation. ?> 57 58 <?php if ( ! comments_open() ) : ?> 59 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p> 60 <?php endif; ?> 64 61 65 62 <?php endif; // have_comments() ?> 66 63 67 <?php68 // If comments are closed and there are comments, let's leave a little note, shall we?69 if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :70 ?>71 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>72 <?php endif; ?>73 74 64 <?php comment_form(); ?> 75 65 76 </div><!-- #comments .comments-area-->66 </div><!-- #comments --> -
trunk/src/wp-content/themes/twentyfourteen/content-featured-post.php
r24832 r25021 6 6 ?> 7 7 8 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix'); ?>>9 <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-featured">8 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 9 <a class="attachment-featured-featured" href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>"> 10 10 <?php 11 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 1 ) ); 11 if ( has_post_thumbnail() ) : 12 the_post_thumbnail( 'featured-thumbnail-featured' ); 12 13 13 if ( '' != get_the_post_thumbnail() ) : 14 the_post_thumbnail( 'featured-thumbnail-featured' ); 15 elseif ( $images ) : 16 $image = array_shift( $images ); 17 echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-featured' ); 18 else : ?> 19 <img src="<?php echo get_template_directory_uri(); ?>/images/placeholder.png" alt="" class="featured-thumbnail-featured" /><?php 14 else : 15 $images = get_children( array( 16 'post_parent' => get_the_ID(), 17 'post_type' => 'attachment', 18 'post_mime_type' => 'image', 19 'orderby' => 'menu_order', 20 'order' => 'ASC', 21 'numberposts' => 1, 22 ) ); 23 24 if ( $images ) : 25 $image = array_shift( $images ); 26 echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-featured' ); 27 28 else : ?> 29 <img class="featured-thumbnail-featured" src="<?php echo get_template_directory_uri(); ?>/images/placeholder.png" alt="" /><?php 30 31 endif; 20 32 endif; 21 33 ?> … … 24 36 <div class="entry-wrap"> 25 37 <header class="entry-header"> 38 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 26 39 <div class="entry-meta"> 27 <?php 28 /* translators: used between list items, there is a space after the comma */ 29 $categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) ); 30 if ( $categories_list && twentyfourteen_categorized_blog() ) : 31 ?> 32 <span class="cat-links"> 33 <?php echo $categories_list; ?> 34 </span> 35 <?php endif; // End if categories ?> 40 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> 36 41 </div><!-- .entry-meta --> 37 <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1> 42 <?php endif; ?> 43 44 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> 38 45 </header><!-- .entry-header --> 39 46 40 <div class="entry-summary clearfix">47 <div class="entry-summary"> 41 48 <?php the_excerpt(); ?> 42 49 </div><!-- .entry-summary --> 43 50 </div> 44 45 </article><!-- #post-<?php the_ID(); ?> --> 51 </article><!-- #post-## --> -
trunk/src/wp-content/themes/twentyfourteen/content-page.php
r24832 r25021 1 1 <?php 2 2 /** 3 * The template used for displaying page content in page.php3 * The template used for displaying page content. 4 4 * 5 5 * @package WordPress … … 9 9 10 10 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 11 <header class="entry-header"> 12 <h1 class="entry-title"><?php the_title(); ?></h1> 13 </header><!-- .entry-header --> 11 <?php the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); ?> 14 12 15 <div class="entry-content clearfix"> 16 <?php the_content(); ?> 13 <div class="entry-content"> 17 14 <?php 15 the_content(); 18 16 wp_link_pages( array( 19 17 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 20 18 'after' => '</div>', 21 19 'link_before' => '<span>', 22 'link_after' => '</span>' 20 'link_after' => '</span>', 23 21 ) ); 22 23 edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); 24 24 ?> 25 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>26 25 </div><!-- .entry-content --> 27 </article><!-- #post- <?php the_ID(); ?>-->26 </article><!-- #post-## --> -
trunk/src/wp-content/themes/twentyfourteen/content-post-format.php
r24989 r25021 44 44 if ( 'post' == get_post_type() ) 45 45 twentyfourteen_posted_on(); 46 47 if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : 46 48 ?> 47 48 <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?> 49 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 49 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 50 50 <?php endif; ?> 51 51 … … 54 54 </header><!-- .entry-header --> 55 55 56 <div class="entry-content clearfix"> 57 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); ?> 56 <div class="entry-content"> 58 57 <?php 58 the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); 59 59 wp_link_pages( array( 60 60 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 61 61 'after' => '</div>', 62 62 'link_before' => '<span>', 63 'link_after' => '</span>' 63 'link_after' => '</span>', 64 64 ) ); 65 65 ?> … … 67 67 68 68 <footer class="entry-meta"> 69 <?php if ( ( 'quote' == $format ) || ( 'aside' == $format) ) : ?>69 <?php if ( has_post_format( array( 'quote', 'aside' ) ) ) : ?> 70 70 <div class="entry-meta"> 71 <?php the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' ); ?>71 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> 72 72 </div> 73 73 <?php endif; ?> 74 74 75 <?php 76 $tag_list = get_the_tag_list(); 77 if ( '' != $tag_list && 'post' == get_post_type() ) : 78 ?> 79 <span class="tag-links"><?php echo $tag_list; ?></span> 80 <?php endif; // End if $tag_list ?> 75 <?php if ( has_tag() ) : ?> 76 <span class="tag-links"><?php echo get_the_tag_list(); ?></span> 77 <?php endif; ?> 81 78 </footer><!-- .entry-meta --> 82 83 </article><!-- #post-<?php the_ID(); ?> --> 79 </article><!-- #post-## --> -
trunk/src/wp-content/themes/twentyfourteen/content-recent-formatted-post.php
r24832 r25021 7 7 $GLOBALS['content_width'] = 306; 8 8 9 $format = get_post_format(); 10 if ( false === $format ) 11 $format = 'standard'; 9 $images = get_posts( array( 10 'post_parent' => get_post()->post_parent, 11 'fields' => 'ids', 12 'numberposts' => -1, 13 'post_status' => 'inherit', 14 'post_type' => 'attachment', 15 'post_mime_type' => 'image', 16 'order' => 'ASC', 17 'orderby' => 'menu_order ID' 18 ) ); 19 $total_images = count( $images ); 12 20 ?> 13 21 14 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix'); ?>>15 <div class="entry-content clearfix">22 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 23 <div class="entry-content"> 16 24 <?php 17 if ( 'gallery' == $format ) : 18 $featured_image = get_the_post_thumbnail( get_the_ID(), 'featured-thumbnail-formatted' ); 19 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) ); 20 if ( $images ) : 21 $total_images = count( $images ); 22 if ( empty( $featured_image ) ) { 23 $image = array_shift( $images ); 24 $featured_image = wp_get_attachment_image( $image->ID, 'featured-thumbnail-formatted' ); 25 } 25 if ( has_post_format( 'gallery' ) ) : 26 if ( has_post_thumbnail() ) : 27 $featured_image = get_the_post_thumbnail( get_the_ID(), 'featured-thumbnail-formatted' ); 28 elseif ( $total_images > 0 ) : 29 $image = array_shift( $images ); 30 $featured_image = wp_get_attachment_image( $image, 'featured-thumbnail-formatted' ); 26 31 ?> 27 <a href="<?php the_permalink(); ?>"><?php echo $featured_image; ?></a> 28 <p class="wp-caption-text"><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyfourteen' ), 29 'href="' . get_permalink() . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', 32 <a href="<?php the_permalink(); ?>"><?php echo $featured_image; ?></a> 33 <p class="wp-caption-text"> 34 <?php 35 printf( _n( 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photo</a>.', 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photos</a>.', $total_images, 'twentyfourteen' ), 36 esc_url( get_permalink() ), 30 37 number_format_i18n( $total_images ) 31 ); ?></p><?php 38 ); 39 ?> 40 </p> 41 <?php 32 42 else : 33 43 the_excerpt(); … … 42 52 <div class="entry-meta"> 43 53 <?php 44 if ( 'link' != $format) :45 the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' )) ) . '" rel="bookmark">', '</a></h1>' );54 if ( ! has_post_format( 'link' ) ) : 55 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); 46 56 endif; 57 58 twentyfourteen_posted_on(); 59 60 if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : 47 61 ?> 48 <?php twentyfourteen_posted_on(); ?>49 <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>50 62 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 51 63 <?php endif; ?> 52 64 </div><!-- .entry-meta --> 53 65 </header><!-- .entry-header --> 54 </article> 66 </article><!-- #post-## --> -
trunk/src/wp-content/themes/twentyfourteen/content-single.php
r24832 r25021 4 4 * @subpackage Twenty_Fourteen 5 5 */ 6 $format = get_post_format(); 7 if ( false === $format ) 8 $format = 'standard'; 6 has_post_format() 9 7 ?> 10 8 11 9 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 12 <?php if ( ( 'video' != $format ) && ( 'image' != $format ) && ( 'aside' != $format ) && ( 'link' != $format ) && ( 'quote' != $format) ) : ?>10 <?php if ( has_post_thumbnail() && ! has_post_format( array( 'video', 'image', 'aside', 'link', 'quote' ) ) ) : ?> 13 11 <div class="attachment-featured-thumbnail"> 14 <?php 15 if ( '' != get_the_post_thumbnail() ) 16 the_post_thumbnail( 'featured-thumbnail-large' ); 17 ?> 12 <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?> 18 13 </div> 19 14 <?php endif; ?> 20 15 21 16 <header class="entry-header"> 17 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 22 18 <div class="entry-meta"> 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() ) : 27 ?> 28 <span class="cat-links"> 29 <?php echo $categories_list; ?> 30 </span> 31 <?php endif; // End if categories ?> 19 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> 32 20 </div><!-- .entry-meta --> 21 <?php 22 endif; 33 23 34 <?php if ( ( 'standard' == $format ) || ( 'video' == $format ) || ( 'image' == $format ) || ( 'gallery' == $format ) ) : ?> 35 <h1 class="entry-title"><?php the_title(); ?></h1> 36 <?php endif; ?> 24 if ( ! has_post_format( array( 'status', 'chat', 'aside', 'link', 'quote', 'audio' ) ) ) : 25 the_title( '<h1 class="entry-title">', '</h1>' ); 26 endif; 27 ?> 37 28 38 29 <div class="entry-meta"> 39 <?php if ( 'standard' != $format) : ?>30 <?php if ( has_post_format() ) : ?> 40 31 <span class="post-format"> 41 32 <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> … … 45 36 <?php twentyfourteen_posted_on(); ?> 46 37 47 <?php if ( ! post_password_required() && ( comments_open() || '0' !=get_comments_number() ) ) : ?>38 <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?> 48 39 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 49 40 <?php endif; ?> … … 53 44 </header><!-- .entry-header --> 54 45 55 <div class="entry-content clearfix"> 56 <?php the_content(); ?> 46 <div class="entry-content"> 57 47 <?php 48 the_content(); 58 49 wp_link_pages( array( 59 50 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 60 51 'after' => '</div>', 61 52 'link_before' => '<span>', 62 'link_after' => '</span>' 53 'link_after' => '</span>', 63 54 ) ); 64 55 ?> … … 66 57 67 58 <footer class="entry-meta"> 68 <?php if ( ( 'quote' == $format ) || ( 'aside' == $format) ) : ?>59 <?php if ( has_post_format( array( 'quote', 'aside' ) ) ) : ?> 69 60 <div class="entry-meta"> 70 <?php the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' ); ?>61 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> 71 62 </div><!-- .entry-meta --> 72 63 <?php endif; ?> 73 64 74 <?php 75 $tag_list = get_the_tag_list(); 76 if ( '' != $tag_list ) : 77 ?> 65 <?php if ( has_tag() ) : ?> 78 66 <span class="tag-links"> 79 <?php echo $tag_list; ?>67 <?php echo get_the_tag_list(); ?> 80 68 </span> 81 <?php endif; // End if $tag_list?>69 <?php endif; ?> 82 70 </footer><!-- .entry-meta --> 83 </article><!-- #post- <?php the_ID(); ?>-->71 </article><!-- #post-## --> -
trunk/src/wp-content/themes/twentyfourteen/content.php
r24832 r25021 4 4 * @subpackage Twenty_Fourteen 5 5 */ 6 $format = get_post_format(); 6 7 7 ?> 8 8 9 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix'); ?>>9 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 10 10 <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"> 11 <?php 12 if ( '' != get_the_post_thumbnail() ) 13 the_post_thumbnail( 'featured-thumbnail-large' ); 14 ?> 11 <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?> 15 12 </a> 16 13 17 14 <header class="entry-header"> 18 <?php 19 /* translators: used between list items, there is a space after the comma */ 20 $categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) ); 21 if ( $categories_list && twentyfourteen_categorized_blog() && 'post' == get_post_type() ) : 22 ?> 15 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 23 16 <div class="entry-meta"> 24 <span class="cat-links"><?php echo $categories_list; ?></span>17 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> 25 18 </div> 26 19 <?php endif; ?> … … 29 22 30 23 <div class="entry-meta"> 31 <?php if ( 'gallery' == $format) : ?>24 <?php if ( has_post_format( 'gallery' ) ) : ?> 32 25 <span class="post-format"> 33 <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>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> 34 27 </span> 35 <?php endif; ?> 28 <?php 29 endif; 36 30 37 <?php38 31 if ( 'post' == get_post_type() ) 39 32 twentyfourteen_posted_on(); 33 34 if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : 40 35 ?> 36 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 37 <?php 38 endif; 41 39 42 <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?> 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>' ); ?> 40 edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); 41 ?> 47 42 </div><!-- .entry-meta --> 48 43 </header><!-- .entry-header --> 49 44 50 45 <?php if ( is_search() ) : ?> 51 <div class="entry-summary clearfix">46 <div class="entry-summary"> 52 47 <?php the_excerpt(); ?> 53 48 </div><!-- .entry-summary --> 54 49 <?php else : ?> 55 <div class="entry-content clearfix"> 56 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); ?> 50 <div class="entry-content"> 57 51 <?php 52 the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); 58 53 wp_link_pages( array( 59 54 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 60 55 'after' => '</div>', 61 56 'link_before' => '<span>', 62 'link_after' => '</span>' 57 'link_after' => '</span>', 63 58 ) ); 64 59 ?> … … 66 61 <?php endif; ?> 67 62 68 <?php 69 $tag_list = get_the_tag_list(); 70 if ( '' != $tag_list && 'post' == get_post_type() ) : 71 ?> 72 <footer class="entry-meta"> 73 <span class="tag-links"><?php echo $tag_list; ?></span> 74 </footer><!-- .entry-meta --> 75 <?php endif; // End if $tag_list ?> 76 </article><!-- #post-<?php the_ID(); ?> --> 63 <?php if ( has_tag() ) : ?> 64 <footer class="entry-meta"> 65 <span class="tag-links"><?php echo get_the_tag_list(); ?></span> 66 </footer><!-- .entry-meta --> 67 <?php endif; ?> 68 </article><!-- #post-## --> -
trunk/src/wp-content/themes/twentyfourteen/featured-content.php
r24832 r25021 1 1 <div class="featured-content-wrapper"> 2 <div id="featured-content" class="featured-content clearfix">2 <div id="featured-content" class="featured-content"> 3 3 4 4 <?php … … 8 8 foreach ( (array) $featured_posts as $order => $post ) : 9 9 setup_postdata( $post ); 10 10 11 get_template_part( 'content', 'featured-post' ); 11 12 endforeach; -
trunk/src/wp-content/themes/twentyfourteen/footer.php
r24832 r25021 3 3 * The template for displaying the footer. 4 4 * 5 * Contains the closing of the id=main div and all content after5 * Contains footer content and the closing of the #main and #page div elements. 6 6 * 7 7 * @package WordPress … … 10 10 ?> 11 11 12 </div><!-- #main .site-main -->12 </div><!-- #main --> 13 13 14 <?php get_sidebar( 'footer' ); ?>14 <?php get_sidebar( 'footer' ); ?> 15 15 16 <footer id="colophon" class="site-footer" role="contentinfo">17 <div class="site-info">18 <?php do_action( 'twentyfourteen_credits' ); ?>19 <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentythirteen' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentythirteen' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>20 </div><!-- .site-info -->21 </footer><!-- #colophon .site-footer-->22 </div><!-- #page .hfeed .site -->16 <footer id="colophon" class="site-footer" role="contentinfo"> 17 <div class="site-info"> 18 <?php do_action( 'twentyfourteen_credits' ); ?> 19 <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentythirteen' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentythirteen' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a> 20 </div><!-- .site-info --> 21 </footer><!-- #colophon --> 22 </div><!-- #page --> 23 23 24 <?php wp_footer(); ?> 25 24 <?php wp_footer(); ?> 26 25 </body> 27 26 </html> -
trunk/src/wp-content/themes/twentyfourteen/full-width-page.php
r24832 r25021 9 9 get_header(); ?> 10 10 11 <?php if ( is_front_page() ) : ?>12 13 <div class="front-page-content-wrapper">14 <div class="front-page-content-main">15 16 <?php if ( twentyfourteen_has_featured_posts() ) : ?>17 <?php get_template_part( 'featured-content' ); ?>18 <?php endif; ?>19 20 <div class="front-page-content-area clearfix">21 22 <div id="primary" class="content-area no-sidebar">23 <div id="content" class="site-content full-width" role="main">24 <?php25 if ( have_posts() ) :26 while ( have_posts() ) :27 the_post();28 get_template_part( 'content', 'page' );29 comments_template( '', true );30 endwhile;31 32 twentyfourteen_content_nav( 'nav-below' );33 else :34 get_template_part( 'no-results', 'index' );35 endif;36 ?>37 </div><!-- #content .site-content -->38 </div><!-- #primary .content-area -->39 40 </div><!-- .front-page-content-area -->41 42 </div><!-- .front-page-content-main -->43 </div><!-- .front-page-content-wrapper -->44 45 <?php else : ?>46 47 11 <div id="primary" class="content-area"> 48 12 <div id="content" class="site-content full-width" role="main"> 13 <?php 14 while ( have_posts() ) : 15 the_post(); 49 16 50 <?php while ( have_posts() ) : the_post(); ?>17 get_template_part( 'content', 'page' ); 51 18 52 <?php get_template_part( 'content', 'page' ); ?> 19 // If comments are open or we have at least one comment, load up the comment template. 20 if ( comments_open() || get_comments_number() ) 21 comments_template(); 22 endwhile; 23 ?> 24 </div><!-- #content --> 25 </div><!-- #primary --> 53 26 54 <?php comments_template( '', true ); ?> 55 56 <?php endwhile; ?> 57 58 </div><!-- #content .site-content --> 59 </div><!-- #primary .content-area --> 60 61 <?php endif; // is_front_page() check ?> 62 63 <?php get_sidebar(); ?> 64 65 <?php get_footer(); ?> 27 <?php 28 get_sidebar(); 29 get_footer(); -
trunk/src/wp-content/themes/twentyfourteen/functions.php
r24990 r25021 28 28 * before the init hook. The init hook is too late for some features, such as indicating 29 29 * support post thumbnails. 30 *31 30 */ 32 31 function twentyfourteen_setup() { 33 /**34 * Custom template tags for this theme.35 */36 require( get_template_directory() . '/inc/template-tags.php' );37 38 /**39 * Customizer additions40 */41 require( get_template_directory() . '/inc/customizer.php' );42 32 43 33 /** … … 82 72 * This theme allows users to set a custom background. 83 73 */ 84 $args = apply_filters( 'twentyfourteen_custom_background_args', array( 'default-color' => 'f5f5f5' ) ); 85 86 if ( function_exists( 'wp_get_theme' ) ) { 87 add_theme_support( 'custom-background', $args ); 88 } else { 89 // Compat: Versions of WordPress prior to 3.4. 90 define( 'BACKGROUND_COLOR', $args['default-color'] ); 91 add_custom_background(); 92 } 74 add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array( 75 'default-color' => 'f5f5f5', 76 ) ) ); 93 77 } 94 78 endif; // twentyfourteen_setup … … 113 97 return false; 114 98 115 $minimum = absint( $minimum );116 99 $featured_posts = apply_filters( 'twentyfourteen_get_featured_posts', array() ); 117 100 118 if ( ! is_array( $featured_posts ) ) 119 return false; 120 121 if ( $minimum > count( $featured_posts ) ) 122 return false; 123 124 return true; 101 return is_array( $featured_posts ) && count( $featured_posts ) > absint( $minimum ); 125 102 } 126 103 … … 192 169 193 170 /** 194 * Register Google fonts for Twenty Fourteen 171 * Register Google fonts for Twenty Fourteen. 195 172 * 196 173 */ … … 198 175 /* translators: If there are characters in your language that are not supported 199 176 by Lato, translate this to 'off'. Do not translate into your own language. */ 200 if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) { 201 202 $protocol = is_ssl() ? 'https' : 'http'; 203 204 wp_register_style( 'twentyfourteen-lato', "$protocol://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic", array(), null ); 205 } 177 if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) 178 wp_register_style( 'twentyfourteen-lato', '//fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic', array(), null ); 206 179 } 207 180 add_action( 'init', 'twentyfourteen_fonts' ); … … 216 189 wp_enqueue_style( 'twentyfourteen-lato' ); 217 190 218 if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {191 if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) 219 192 wp_enqueue_script( 'comment-reply' ); 220 } 221 222 if ( is_singular() && wp_attachment_is_image() ) { 193 194 if ( is_singular() && wp_attachment_is_image() ) 223 195 wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' ); 224 }225 196 226 197 wp_enqueue_script( 'twentyfourteen-theme', get_template_directory_uri() . '/js/theme.js', array( 'jquery' ), '20130402', true ); … … 232 203 * 233 204 */ 234 function twentyfourteen_admin_fonts( $hook_suffix ) { 235 if ( 'appearance_page_custom-header' != $hook_suffix ) 236 return; 237 205 function twentyfourteen_admin_fonts() { 238 206 wp_enqueue_style( 'twentyfourteen-lato' ); 239 207 } 240 add_action( 'admin_ enqueue_scripts', 'twentyfourteen_admin_fonts' );208 add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen_admin_fonts' ); 241 209 242 210 /** … … 285 253 } 286 254 add_filter( 'get_the_excerpt', 'twentyfourteen_custom_excerpt_more' ); 255 256 if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) : 257 /** 258 * Prints the attached image with a link to the next attached image. 259 * 260 * @since Twenty Thirteen 1.0 261 * 262 * @return void 263 */ 264 function twentyfourteen_the_attached_image() { 265 $post = get_post(); 266 $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 1200, 1200 ) ); 267 $next_attachment_url = wp_get_attachment_url(); 268 269 /** 270 * Grab the IDs of all the image attachments in a gallery so we can get the URL 271 * of the next adjacent image in a gallery, or the first image (if we're 272 * looking at the last image in a gallery), or, in a gallery of one, just the 273 * link to that image file. 274 */ 275 $attachment_ids = get_posts( array( 276 'post_parent' => $post->post_parent, 277 'fields' => 'ids', 278 'numberposts' => -1, 279 'post_status' => 'inherit', 280 'post_type' => 'attachment', 281 'post_mime_type' => 'image', 282 'order' => 'ASC', 283 'orderby' => 'menu_order ID' 284 ) ); 285 286 // If there is more than 1 attachment in a gallery... 287 if ( count( $attachment_ids ) > 1 ) { 288 foreach ( $attachment_ids as $attachment_id ) { 289 if ( $attachment_id == $post->ID ) { 290 $next_id = current( $attachment_ids ); 291 break; 292 } 293 } 294 295 // get the URL of the next image attachment... 296 if ( $next_id ) 297 $next_attachment_url = get_attachment_link( $next_id ); 298 299 // or get the URL of the first image attachment. 300 else 301 $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) ); 302 } 303 304 printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>', 305 esc_url( $next_attachment_url ), 306 the_title_attribute( array( 'echo' => false ) ), 307 wp_get_attachment_image( $post->ID, $attachment_size ) 308 ); 309 } 310 endif; 287 311 288 312 /** … … 329 353 330 354 if ( $class ) 331 echo 'class="clearfix ' . $class . '"';355 printf( 'class="%s"', $class ); 332 356 } 333 357 … … 445 469 } 446 470 add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 ); 471 472 /** 473 * Custom template tags for this theme. 474 */ 475 require get_template_directory() . '/inc/template-tags.php'; 476 477 /** 478 * Customizer additions 479 */ 480 require get_template_directory() . '/inc/customizer.php'; -
trunk/src/wp-content/themes/twentyfourteen/header.php
r24832 r25021 11 11 <html <?php language_attributes(); ?> class="no-js"> 12 12 <head> 13 <script>14 /**15 * Replaces class "no-js" with "js" in the <html>-tag when JavaScript is being used.16 * Allows easy styling for browsers [not] supporting/running JavaScript.17 */18 document.documentElement.className = document.documentElement.className.replace(/(\s|^)no-js(\s|$)/, '$1js$2');19 </script>20 13 <meta charset="<?php bloginfo( 'charset' ); ?>" /> 21 14 <meta name="viewport" content="width=device-width" /> … … 60 53 61 54 <?php $header_image = get_header_image(); 62 if ( ! empty( $header_image ) ) {?>55 if ( ! empty( $header_image ) ) : ?> 63 56 <div id="site-header"> 64 57 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> … … 66 59 </a> 67 60 </div> 68 <?php }?>61 <?php endif; ?> 69 62 70 <header id="masthead" class="site-header clearfix" role="banner">71 <div class="header-main clear fix">63 <header id="masthead" class="site-header" role="banner"> 64 <div class="header-main clear"> 72 65 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> 73 66 … … 85 78 86 79 <nav role="navigation" class="site-navigation primary-navigation"> 87 <h1 class=" assistive-text"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></h1>88 <div class=" assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyfourteen' ); ?>"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a></div>80 <h1 class="screen-reader-text"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></h1> 81 <div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyfourteen' ); ?>"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a></div> 89 82 <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?> 90 83 </nav> … … 96 89 <?php if ( $social_links ) : ?> 97 90 <div class="social-links-wrapper hide"> 98 <ul class="social-links clear fix">91 <ul class="social-links clear"> 99 92 <?php if ( is_email( $email_link ) ) : ?> 100 93 <li class="email-link"> … … 189 182 190 183 <div class="search-box-wrapper hide"> 191 <div class="search-box clear fix">184 <div class="search-box clear"> 192 185 <?php get_search_form(); ?> 193 186 </div> 194 187 </div> 195 </header><!-- #masthead .site-header-->188 </header><!-- #masthead --> 196 189 197 <div id="main" class="site-main clearfix">190 <div id="main" class="site-main"> -
trunk/src/wp-content/themes/twentyfourteen/image.php
r24832 r25021 10 10 ?> 11 11 12 < divid="primary" class="content-area image-attachment">12 <section id="primary" class="content-area image-attachment"> 13 13 <div id="content" class="site-content full-width" role="main"> 14 14 … … 17 17 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 18 18 <header class="entry-header"> 19 < h1 class="entry-title"><?php the_title(); ?></h1>19 <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> 20 20 21 21 <div class="entry-meta"> … … 32 32 33 33 <div class="entry-content"> 34 35 34 <div class="entry-attachment"> 36 35 <div class="attachment"> 37 <?php 38 /** 39 * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, 40 * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file 41 */ 42 $attachments = array_values( get_children( array( 43 'post_parent' => $post->post_parent, 44 'post_status' => 'inherit', 45 'post_type' => 'attachment', 46 'post_mime_type' => 'image', 47 'order' => 'ASC', 48 'orderby' => 'menu_order ID' 49 ) ) ); 50 foreach ( $attachments as $k => $attachment ) { 51 if ( $attachment->ID == $post->ID ) 52 break; 53 } 54 $k++; 55 // If there is more than 1 attachment in a gallery 56 if ( count( $attachments ) > 1 ) { 57 if ( isset( $attachments[ $k ] ) ) 58 // get the URL of the next image attachment 59 $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); 60 else 61 // or get the URL of the first image attachment 62 $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); 63 } else { 64 // or, if there's only 1 image, get the URL of the image 65 $next_attachment_url = wp_get_attachment_url(); 66 } 67 ?> 68 69 <a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php 70 $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 1200, 1200 ) ); // Filterable image size. 71 echo wp_get_attachment_image( $post->ID, $attachment_size ); 72 ?></a> 36 <?php twentyfourteen_the_attached_image(); ?> 73 37 </div><!-- .attachment --> 74 38 75 <?php if ( ! empty( $post->post_excerpt) ) : ?>39 <?php if ( has_excerpt() ) : ?> 76 40 <div class="entry-caption"> 77 41 <?php the_excerpt(); ?> … … 80 44 </div><!-- .entry-attachment --> 81 45 82 <?php the_content(); ?>83 46 <?php 47 the_content(); 84 48 wp_link_pages( array( 85 49 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 86 50 'after' => '</div>', 87 51 'link_before' => '<span>', 88 'link_after' => '</span>' 52 'link_after' => '</span>', 89 53 ) ); 90 54 ?> … … 92 56 93 57 <footer class="entry-meta"> 94 <?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?> 95 <?php printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() ); ?> 96 <?php elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open ?> 97 <?php printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() ); ?> 98 <?php elseif ( comments_open() && ! pings_open() ) : // Only comments open ?> 99 <?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyfourteen' ); ?> 100 <?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?> 101 <?php _e( 'Both comments and trackbacks are currently closed.', 'twentyfourteen' ); ?> 102 <?php endif; ?> 58 <?php 59 if ( comments_open() && pings_open() ) : // Comments and trackbacks open 60 printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() ); 61 elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open 62 printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() ); 63 elseif ( comments_open() && ! pings_open() ) : // Only comments open 64 _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyfourteen' ); 65 elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed 66 _e( 'Both comments and trackbacks are currently closed.', 'twentyfourteen' ); 67 endif; 68 ?> 103 69 </footer><!-- .entry-meta --> 104 </article><!-- #post- <?php the_ID(); ?>-->70 </article><!-- #post-## --> 105 71 106 72 <nav id="image-navigation" class="site-navigation"> … … 113 79 <?php endwhile; // end of the loop. ?> 114 80 115 </div><!-- #content .site-content-->116 </ div><!-- #primary .content-area .image-attachment-->81 </div><!-- #content --> 82 </section><!-- #primary --> 117 83 118 <?php get_sidebar(); ?>119 120 <?php get_footer(); ?> 84 <?php 85 get_sidebar(); 86 get_footer(); -
trunk/src/wp-content/themes/twentyfourteen/inc/custom-header.php
r24832 r25021 23 23 */ 24 24 function twentyfourteen_custom_header_setup() { 25 $args = array( 26 'default-image' => '', 25 add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array( 27 26 'default-text-color' => 'fff', 28 27 'width' => 1260, … … 32 31 'admin-head-callback' => 'twentyfourteen_admin_header_style', 33 32 'admin-preview-callback' => 'twentyfourteen_admin_header_image', 34 ) ;33 ) ) ); 35 34 36 $args = apply_filters( 'twentyfourteen_custom_header_args', $args );37 38 if ( function_exists( 'wp_get_theme' ) ) {39 add_theme_support( 'custom-header', $args );40 } else {41 // Compat: Versions of WordPress prior to 3.4.42 define( 'HEADER_TEXTCOLOR', $args['default-text-color'] );43 define( 'HEADER_IMAGE', $args['default-image'] );44 define( 'HEADER_IMAGE_WIDTH', $args['width'] );45 define( 'HEADER_IMAGE_HEIGHT', $args['height'] );46 add_custom_image_header( $args['wp-head-callback'], $args['admin-head-callback'], $args['admin-preview-callback'] );47 }48 35 } 49 36 add_action( 'after_setup_theme', 'twentyfourteen_custom_header_setup' ); 50 51 /**52 * Shiv for get_custom_header().53 *54 * get_custom_header() was introduced to WordPress55 * in version 3.4. To provide backward compatibility56 * with previous versions, we will define our own version57 * of this function.58 *59 * @todo Remove this function when WordPress 3.6 is released.60 * @return stdClass All properties represent attributes of the curent header image.61 *62 * @package WordPress63 * @subpackage Twenty_Fourteen64 */65 66 if ( ! function_exists( 'get_custom_header' ) ) {67 function get_custom_header() {68 return (object) array(69 'url' => get_header_image(),70 'thumbnail_url' => get_header_image(),71 'width' => HEADER_IMAGE_WIDTH,72 'height' => HEADER_IMAGE_HEIGHT,73 );74 }75 }76 37 77 38 if ( ! function_exists( 'twentyfourteen_header_style' ) ) : … … 83 44 */ 84 45 function twentyfourteen_header_style() { 46 $header_text_color = get_header_textcolor(); 85 47 86 48 // If no custom options for text are set, let's bail 87 // get_header_textcolor()options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value88 if ( HEADER_TEXTCOLOR == get_header_textcolor())49 // $header_text_color options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value 50 if ( HEADER_TEXTCOLOR == $header_text_color ) 89 51 return; 90 52 // If we get this far, we have custom styles. Let's do this. … … 93 55 <?php 94 56 // Has the text been hidden? 95 if ( 'blank' == get_header_textcolor()) :57 if ( 'blank' == $header_text_color ) : 96 58 ?> 97 59 .site-title { … … 105 67 ?> 106 68 .site-title a { 107 color: #<?php echo get_header_textcolor(); ?> !important;69 color: #<?php echo $header_text_color; ?> !important; 108 70 } 109 71 <?php endif; ?> … … 154 116 * 155 117 */ 156 function twentyfourteen_admin_header_image() { ?> 118 function twentyfourteen_admin_header_image() { 119 $header_image = get_header_image(); 120 ?> 157 121 <div id="headimg"> 158 <?php 159 if ( 'blank' == get_header_textcolor() || '' == get_header_textcolor() ) 160 $style = ' style="display:none;"'; 161 else 162 $style = ' style="color:#' . get_header_textcolor() . ';"'; 163 ?> 164 <?php $header_image = get_header_image(); 165 if ( ! empty( $header_image ) ) : ?> 166 <img src="<?php echo esc_url( $header_image ); ?>" alt="" /> 122 <?php if ( ! empty( $header_image ) ) : ?> 123 <img src="<?php echo esc_url( $header_image ); ?>" alt=""> 167 124 <?php endif; ?> 168 <h1 ><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>125 <h1 class="displaying-header-text"><a id="name"<?php echo sprintf( ' style="color:#%s;"', get_header_textcolor() ); ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1> 169 126 </div> 170 <?php } 127 <?php 128 } 171 129 endif; // twentyfourteen_admin_header_image -
trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php
r24832 r25021 36 36 ?> 37 37 <nav role="navigation" id="<?php echo $nav_id; ?>" class="<?php echo $nav_class; ?>"> 38 <h1 class=" assistive-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>38 <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1> 39 39 40 40 <?php if ( is_single() ) : // navigation links for single posts ?> … … 183 183 } 184 184 add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' ); 185 add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );185 add_action( 'save_post', 'twentyfourteen_category_transient_flusher' ); 186 186 187 187 /** … … 190 190 */ 191 191 function twentyfourteen_get_template_part() { 192 193 $format = get_post_format(); 194 195 switch( $format ) { 196 case 'aside': 197 case 'quote': 198 case 'link': 199 case 'video': 200 case 'image': 201 get_template_part( 'content', 'post-format' ); 202 break; 203 default: 204 get_template_part( 'content', get_post_format() ); 205 break; 206 } 207 192 if ( has_post_format( array( 'aside', 'quote', 'link', 'video', 'image' ) ) ) 193 get_template_part( 'content', 'post-format' ); 194 else 195 get_template_part( 'content', get_post_format() ); 208 196 } -
trunk/src/wp-content/themes/twentyfourteen/index.php
r24832 r25021 15 15 get_header(); ?> 16 16 17 <?php if ( is_front_page() ) : ?>18 19 <div class="front-page-content-wrapper">20 <div class="front-page-content-main">21 22 <?php if ( twentyfourteen_has_featured_posts() ) : ?>23 <?php get_template_part( 'featured-content' ); ?>24 <?php endif; ?>25 26 <div class="front-page-content-area clearfix">27 28 <div id="primary" class="content-area no-sidebar">29 <div id="content" class="site-content" role="main">30 <?php31 if ( have_posts() ) :32 while ( have_posts() ) :33 the_post();34 twentyfourteen_get_template_part();35 endwhile;36 37 twentyfourteen_content_nav( 'nav-below' );38 else :39 get_template_part( 'no-results', 'index' );40 endif;41 ?>42 </div><!-- #content .site-content -->43 </div><!-- #primary .content-area -->44 45 <?php get_template_part( 'recent-formatted-posts' ); ?>46 47 </div><!-- .front-page-content-area -->48 49 </div><!-- .front-page-content-main -->50 </div><!-- .front-page-content-wrapper -->51 52 <?php get_sidebar(); ?>53 54 <?php else : ?>55 56 17 <div id="primary" class="content-area"> 57 18 <div id="content" class="site-content" role="main"> 58 19 59 <?php if ( have_posts() ) : ?> 20 <?php 21 if ( have_posts() ) : 22 while ( have_posts() ) : 23 the_post(); 60 24 61 <?php while ( have_posts() ) : the_post(); ?> 25 twentyfourteen_get_template_part(); 26 endwhile; 27 twentyfourteen_content_nav( 'nav-below' ); 62 28 63 <?php twentyfourteen_get_template_part(); ?> 29 else : 30 get_template_part( 'no-results', 'index' ); 64 31 65 <?php endwhile; ?> 32 endif; 33 ?> 66 34 67 <?php twentyfourteen_content_nav( 'nav-below' ); ?> 35 </div><!-- #content --> 36 </div><!-- #primary --> 68 37 69 <?php else : ?> 70 71 <?php get_template_part( 'no-results', 'index' ); ?> 72 73 <?php endif; ?> 74 75 </div><!-- #content .site-content --> 76 </div><!-- #primary .content-area --> 77 78 <?php get_sidebar( 'content' ); ?> 79 80 <?php get_sidebar(); ?> 81 82 <?php endif; // is_front_page() check ?> 83 84 <?php get_footer(); ?> 38 <?php 39 get_sidebar( 'content' ); 40 get_sidebar(); 41 get_footer(); -
trunk/src/wp-content/themes/twentyfourteen/no-results.php
r24832 r25021 1 1 <?php 2 2 /** 3 * The template part for displaying a message that posts cannot be found. 4 * 5 * Learn more: http://codex.wordpress.org/Template_Hierarchy 3 * The template for displaying a "No posts found" message. 6 4 * 7 5 * @package WordPress … … 10 8 ?> 11 9 12 <article id="post-0" class="post no-results not-found"> 13 <header class="entry-header"> 14 <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1> 15 </header><!-- .entry-header --> 10 <header class="page-header"> 11 <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1> 12 </header> 16 13 17 <div class="entry-content">18 14 <div class="page-content"> 15 <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?> 19 16 20 17 <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfourteen' ), admin_url( 'post-new.php' ) ); ?></p> 21 18 22 19 <?php elseif ( is_search() ) : ?> 23 20 24 25 21 <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p> 22 <?php get_search_form(); ?> 26 23 27 24 <?php else : ?> 28 25 29 30 26 <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p> 27 <?php get_search_form(); ?> 31 28 32 <?php endif; ?> 33 </div><!-- .entry-content --> 34 </article><!-- #post-0 .post .no-results .not-found --> 29 <?php endif; ?> 30 </div><!-- .page-content --> -
trunk/src/wp-content/themes/twentyfourteen/page.php
r24832 r25021 14 14 get_header(); ?> 15 15 16 <?php if ( is_front_page() ) : ?>17 18 <div class="front-page-content-wrapper">19 <div class="front-page-content-main">20 21 <?php if ( twentyfourteen_has_featured_posts() ) : ?>22 <?php get_template_part( 'featured-content' ); ?>23 <?php endif; ?>24 25 <div class="front-page-content-area clearfix">26 27 <div id="primary" class="content-area no-sidebar">28 <div id="content" class="site-content" role="main">29 <?php30 if ( have_posts() ) :31 while ( have_posts() ) :32 the_post();33 get_template_part( 'content', 'page' );34 comments_template( '', true );35 endwhile;36 37 twentyfourteen_content_nav( 'nav-below' );38 else :39 get_template_part( 'no-results', 'index' );40 endif;41 ?>42 </div><!-- #content .site-content -->43 </div><!-- #primary .content-area -->44 45 <?php get_template_part( 'recent-formatted-posts' ); ?>46 47 </div><!-- .front-page-content-area -->48 49 </div><!-- .front-page-content-main -->50 </div><!-- .front-page-content-wrapper -->51 52 <?php get_sidebar(); ?>53 54 <?php else : ?>55 56 16 <div id="primary" class="content-area"> 57 17 <div id="content" class="site-content" role="main"> 58 18 59 <?php while ( have_posts() ) : the_post(); ?> 19 <?php 20 while ( have_posts() ) : 21 the_post(); 60 22 61 <?php get_template_part( 'content', 'page' ); ?>23 get_template_part( 'content', 'page' ); 62 24 63 <?php comments_template( '', true ); ?> 64 65 <?php endwhile; ?> 25 // If comments are open or we have at least one comment, load up the comment template. 26 if ( comments_open() || get_comments_number() ) 27 comments_template(); 28 endwhile; 29 ?> 66 30 67 31 </div><!-- #content .site-content --> 68 32 </div><!-- #primary .content-area --> 69 33 70 <?php get_sidebar( 'content' ); ?> 71 72 <?php get_sidebar(); ?> 73 74 <?php endif; // is_front_page() check ?> 75 76 <?php get_footer(); ?> 34 <?php 35 get_sidebar( 'content' ); 36 get_sidebar(); 37 get_footer(); -
trunk/src/wp-content/themes/twentyfourteen/search.php
r24832 r25021 12 12 <div id="content" class="site-content" role="main"> 13 13 14 <?php if ( have_posts() ) : ?>14 <?php if ( have_posts() ) : ?> 15 15 16 16 <header class="page-header"> 17 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), '<span>' . get_search_query() . '</span>'); ?></h1>17 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1> 18 18 </header><!-- .page-header --> 19 19 20 <?php while ( have_posts() ) : the_post(); ?> 20 <?php 21 while ( have_posts() ) : 22 the_post(); 21 23 22 <?php twentyfourteen_get_template_part(); ?> 24 twentyfourteen_get_template_part(); 25 endwhile; 23 26 24 <?php endwhile; ?>27 twentyfourteen_content_nav( 'nav-below' ); 25 28 26 <?php twentyfourteen_content_nav( 'nav-below' ); ?> 29 else : 30 get_template_part( 'no-results', 'search' ); 27 31 28 <?php else : ?> 32 endif; 33 ?> 29 34 30 <?php get_template_part( 'no-results', 'search' ); ?> 35 </div><!-- #content --> 36 </section><!-- #primary --> 31 37 32 <?php endif; ?> 33 34 </div><!-- #content .site-content --> 35 </section><!-- #primary .content-area --> 36 37 <?php get_sidebar( 'content' ); ?> 38 39 <?php get_sidebar(); ?> 40 41 <?php get_footer(); ?> 38 <?php 39 get_sidebar( 'content' ); 40 get_sidebar(); 41 get_footer(); -
trunk/src/wp-content/themes/twentyfourteen/searchform.php
r24832 r25021 7 7 */ 8 8 ?> 9 <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search"> 10 <label for="s" class="assistive-text"><?php _e( 'Search', 'twentyfourteen' ); ?></label> 11 <input type="text" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" id="s" placeholder="<?php esc_attr_e( 'Search …', 'twentyfourteen' ); ?>" /> 12 <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyfourteen' ); ?>" /> 13 </form> 9 <form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> 10 <label> 11 <span class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'twentyfourteen' ); ?></span> 12 <input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', 'twentyfourteen' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php _ex( 'Search for:', 'label', 'twentyfourteen' ); ?>"> 13 </label> 14 <input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'twentyfourteen' ); ?>"> 15 </form> -
trunk/src/wp-content/themes/twentyfourteen/sidebar.php
r24832 r25021 9 9 <div id="secondary"> 10 10 <div id="secondary-top"> 11 <?php 12 $description = get_bloginfo( 'description' ); 13 if ( ! empty ( $description ) ) : ?> 11 <?php 12 $description = get_bloginfo( 'description' ); 13 if ( ! empty ( $description ) ) : 14 ?> 14 15 <h2 class="site-description"><?php echo esc_html( $description ); ?></h2> 15 <?php endif; ?>16 <?php endif; ?> 16 17 17 <?php if ( has_nav_menu( 'secondary' ) ) : ?>18 <nav role="navigation" class=" site-navigation secondary-navigation">18 <?php if ( has_nav_menu( 'secondary' ) ) : ?> 19 <nav role="navigation" class="navigation secondary-navigation"> 19 20 <?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?> 20 21 </nav> 21 <?php endif; ?>22 <?php endif; ?> 22 23 </div> 23 24 24 25 <div id="secondary-bottom" class="widget-area" role="complementary"> 25 <?php do_action( 'before_sidebar' ); ?> 26 27 <?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?> 28 <aside id="categories" class="widget widget_categories"> 29 <h1 class="widget-title"><?php _e( 'Categories', 'twentyfourteen' ); ?></h1> 30 <ul> 31 <?php wp_list_categories( array( 'title_li' => '' ) ); ?> 32 </ul> 33 </aside> 34 35 <aside id="archives" class="widget widget_archive"> 36 <h1 class="widget-title"><?php _e( 'Archives', 'twentyfourteen' ); ?></h1> 37 <ul> 38 <?php wp_get_archives( array( 'type' => 'monthly' ) ); ?> 39 </ul> 40 </aside> 41 <?php endif; // end sidebar widget area ?> 26 <?php 27 do_action( 'before_sidebar' ); 28 dynamic_sidebar( 'sidebar-1' ); 29 ?> 42 30 </div><!-- .widget-area --> 43 31 </div><!-- #secondary --> -
trunk/src/wp-content/themes/twentyfourteen/single.php
r24832 r25021 11 11 <div id="primary" class="content-area"> 12 12 <div id="content" class="site-content" role="main"> 13 <?php 14 while ( have_posts() ) : 15 the_post(); 13 16 14 <?php while ( have_posts() ) : the_post(); ?>17 get_template_part( 'content', 'single' ); 15 18 16 <?php get_template_part( 'content', 'single' ); ?>19 twentyfourteen_content_nav( 'nav-below' ); 17 20 18 <?php twentyfourteen_content_nav( 'nav-below' ); ?> 21 // If comments are open or we have at least one comment, load up the comment template. 22 if ( comments_open() || get_comments_number() ) 23 comments_template(); 24 endwhile; 25 ?> 26 </div><!-- #content --> 27 </div><!-- #primary --> 19 28 20 <?php 21 // If comments are open or we have at least one comment, load up the comment template 22 if ( comments_open() || '0' != get_comments_number() ) 23 comments_template( '', true ); 24 ?> 25 26 <?php endwhile; // end of the loop. ?> 27 28 </div><!-- #content .site-content --> 29 </div><!-- #primary .content-area --> 30 31 <?php get_sidebar( 'content' ); ?> 32 33 <?php get_sidebar(); ?> 34 35 <?php get_footer(); ?> 29 <?php 30 get_sidebar( 'content' ); 31 get_sidebar(); 32 get_footer(); -
trunk/src/wp-content/themes/twentyfourteen/style.css
r24991 r25021 435 435 width: 100%; 436 436 } 437 #searchform input[type="text"]{437 .search-field { 438 438 width: 100%; 439 439 } … … 488 488 } 489 489 490 /* Text meant only for screen readers */ 491 .assistive-text { 492 clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ 490 /* Assistive text */ 491 .screen-reader-text { 493 492 clip: rect(1px, 1px, 1px, 1px); 494 493 position: absolute !important; 494 } 495 496 .screen-reader-text:focus { 497 background-color: #f1f1f1; 498 border-radius: 3px; 499 box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); 500 clip: auto !important; 501 color: #21759b; 502 display: block; 503 font-size: 14px; 504 font-weight: bold; 505 height: auto; 506 line-height: normal; 507 padding: 15px 23px 14px; 508 position: absolute; 509 left: 5px; 510 top: 5px; 511 text-decoration: none; 512 width: auto; 513 z-index: 100000; /* Above WP toolbar */ 495 514 } 496 515 … … 500 519 } 501 520 502 /* Clearing floats */ 503 .clearfix:after { 521 /* Clearing */ 522 .clear:before, 523 .clear:after, 524 [class*="content"]:before, 525 [class*="content"]:after, 526 [class*="site"]:before, 527 [class*="site"]:after { 528 content: ''; 529 display: table; 530 } 531 532 .clear:after, 533 [class*="content"]:after, 534 [class*="site"]:after { 504 535 clear: both; 505 }506 .clearfix:before,507 .clearfix:after {508 display: table;509 content: "";510 536 } 511 537 … … 772 798 background-color: #35921f; 773 799 } 774 .search-box #searchform input[type="text"]{800 .search-box .search-field { 775 801 background-color: #fff; 776 802 float: right; … … 1033 1059 } 1034 1060 .entry-content, 1061 .page-content, 1035 1062 .entry-summary { 1036 1063 position: relative; 1037 1064 z-index: 2; 1038 1065 } 1039 .entry-content a { 1066 .entry-content a, 1067 .page-content a, { 1040 1068 text-decoration: underline; 1041 1069 } … … 1076 1104 1077 1105 /* #primary specific styles */ 1078 #primary .entry-header { 1106 #primary .entry-header, 1107 #primary .page-header { 1079 1108 background-color: #fff; 1080 1109 padding: 24px 10px 12px; 1081 1110 padding: 2.4rem 1.0rem 1.2rem; 1082 1111 } 1083 #primary .entry-title { 1112 #primary .entry-title, 1113 #primary .page-title { 1084 1114 font-size: 33px; 1085 1115 font-size: 3.3rem; … … 1097 1127 } 1098 1128 #primary .entry-content, 1129 #primary .page-content, 1099 1130 #primary .entry-summary { 1100 1131 background-color: #fff; … … 1166 1197 /* Page specific styles */ 1167 1198 .page #primary .entry-header, 1168 .error404 #primary . entry-header,1199 .error404 #primary .page-header, 1169 1200 .single-attachment #primary .entry-header, 1170 1201 .page #primary .entry-content, 1171 .error404 #primary . entry-content,1202 .error404 #primary .page-content, 1172 1203 .single-attachment #primary .entry-content { 1173 1204 padding-top: 0; … … 1276 1307 /* For Firefox to avoid jagged edge */ 1277 1308 @-moz-document url-prefix() { 1278 1279 1309 .tag-links a:before { 1310 border-right: 10px solid #8c8c8c; 1280 1311 left: -10px; 1281 1312 left: -1.0rem; 1282 1313 } 1283 1314 } 1284 1315 .tag-links a:hover:before { … … 1553 1584 ----------------------------------------------- */ 1554 1585 1555 .error404 . entry-content #searchform {1586 .error404 .page-content .search-form { 1556 1587 margin-bottom: 36px; 1557 1588 margin-bottom: 3.6rem; 1558 1589 } 1559 .error404 . entry-content .widget-title,1560 .error404 . entry-content .widgettitle {1590 .error404 .page-content .widget-title, 1591 .error404 .page-content .widgettitle { 1561 1592 border-top: 5px solid #000; 1562 1593 color: #2b2b2b; … … 1569 1600 ----------------------------------------------- */ 1570 1601 1602 img { 1603 max-width: 100%; 1604 height: auto; 1605 } 1571 1606 #site-header img, 1572 1607 .attachment-featured-thumbnail-large, … … 1574 1609 .comment-content img, 1575 1610 .widget img { 1576 max-width: 100%;1577 1611 vertical-align: middle; 1578 }1579 #site-header img,1580 .entry-content img,1581 .attachment-featured-thumbnail-large,1582 img[class*="align"],1583 img[class*="wp-image-"],1584 .widget img {1585 height: auto;1586 }1587 #site-header img,1588 .entry-content img,1589 img.size-full,1590 img.size-large,1591 img.wp-post-image {1592 max-width: 100%;1593 height: auto;1594 1612 } 1595 1613 .attachment-featured-featured img, … … 1616 1634 margin-bottom: 0.7rem; 1617 1635 } 1618 .entry-content img.wp-smiley, 1619 .comment-content img.wp-smiley { 1636 .wp-smiley { 1620 1637 border: none; 1621 1638 margin-bottom: 0; … … 1852 1869 padding: 0 1.0rem; 1853 1870 } 1854 .comment list {1871 .comment-list { 1855 1872 list-style: none; 1856 1873 margin: 0 0 48px 0; … … 1871 1888 } 1872 1889 .comment-meta a, 1873 .comment list li.trackback a,1874 .comment list li.pingback a {1890 .comment-list li.trackback a, 1891 .comment-list li.pingback a { 1875 1892 color: #8c8c8c; 1876 1893 } 1877 1894 .comment-author a:hover, 1878 1895 .comment-meta a:hover, 1879 .comment list li.trackback a:hover,1880 .comment list li.pingback a:hover {1896 .comment-list li.trackback a:hover, 1897 .comment-list li.pingback a:hover { 1881 1898 color: #41a62a; 1882 1899 text-decoration: none; … … 1888 1905 } 1889 1906 .comments-area article, 1890 .comment list li.trackback,1891 .comment list li.pingback {1907 .comment-list li.trackback, 1908 .comment-list li.pingback { 1892 1909 border-top: 1px solid rgba(0, 0, 0, 0.1); 1893 1910 margin-bottom: 24px; … … 1896 1913 padding: 2.4rem 1.0rem 0; 1897 1914 } 1898 .comment list li:first-child article {1915 .comment-list li:first-child article { 1899 1916 border: none; 1900 1917 } … … 1959 1976 margin-bottom: 0; 1960 1977 } 1961 .comment list .children {1978 .comment-list .children { 1962 1979 list-style: none; 1963 1980 margin-left: 20px; … … 2316 2333 2317 2334 /* Search widget */ 2318 #searchsubmit {2335 .search-submit { 2319 2336 display: none; 2320 2337 } … … 2853 2870 } 2854 2871 .page #primary .entry-header, 2855 .error404 #primary . entry-header {2872 .error404 #primary .page-header { 2856 2873 margin: 0 4.59183673%; 2857 2874 padding: 0 4.46428571% 12px; … … 2887 2904 } 2888 2905 .comments-area article, 2889 .comment list li.trackback,2890 .comment list li.pingback {2906 .comment-list li.trackback, 2907 .comment-list li.pingback { 2891 2908 margin-bottom: 36px; 2892 2909 margin-bottom: 3.6rem; … … 2914 2931 #comments #respond, 2915 2932 .comments-area article, 2916 .comment list li.trackback,2917 .comment list li.pingback,2933 .comment-list li.trackback, 2934 .comment-list li.pingback, 2918 2935 .post-navigation .nav-previous, 2919 2936 .post-navigation .nav-next { … … 2934 2951 .full-width #comments #respond, 2935 2952 .full-width .comments-area article, 2936 .full-width .comment list li.trackback,2937 .full-width .comment list li.pingback {2953 .full-width .comment-list li.trackback, 2954 .full-width .comment-list li.pingback { 2938 2955 padding-right: 6.04307432%; 2939 2956 padding-left: 6.04307432%; … … 2988 3005 } 2989 3006 .page #primary .entry-header, 2990 .error404 #primary . entry-header {3007 .error404 #primary .page-header { 2991 3008 margin: 0 8.03571428% 0 12.5%; 2992 3009 } … … 3017 3034 #comments #respond, 3018 3035 .comments-area article, 3019 .comment list li.trackback,3020 .comment list li.pingback,3036 .comment-list li.trackback, 3037 .comment-list li.pingback, 3021 3038 .post-navigation .nav-previous, 3022 3039 .post-navigation .nav-next { … … 3027 3044 padding-right: 13.8900862%; 3028 3045 } 3029 .comment list,3030 .full-width .comment list {3046 .comment-list, 3047 .full-width .comment-list { 3031 3048 margin-left: -70px; 3032 3049 margin-left: -7.0rem; … … 3041 3058 .full-width #comments #respond, 3042 3059 .full-width .comments-area article, 3043 .full-width .comment list li.trackback,3044 .full-width .comment list li.pingback {3060 .full-width .comment-list li.trackback, 3061 .full-width .comment-list li.pingback { 3045 3062 padding-right: 11.30926724%; 3046 3063 padding-left: 11.30926724%; … … 3067 3084 background-color: #000; 3068 3085 content: ''; 3086 display: block; 3069 3087 height: 100%; 3070 3088 min-height: 100%; … … 3120 3138 width: 24.87804878%; 3121 3139 } 3122 #primary .entry-header { 3140 #primary .entry-header, 3141 #primary .page-header { 3123 3142 margin: -48px 4.59183673% 0; 3124 3143 margin: -4.8rem 4.59183673% 0; … … 3127 3146 } 3128 3147 #primary .entry-content, 3148 #primary .page-content, 3129 3149 #primary .entry-summary { 3130 3150 margin: 0 4.59183673%; … … 3186 3206 } 3187 3207 .page #primary .entry-header, 3188 .error404 #primary . entry-header {3208 .error404 #primary .page-header { 3189 3209 margin: 0 4.59183673%; 3190 3210 padding: 0 4.46428571% 12px; … … 3201 3221 #primary .full-width .entry-header, 3202 3222 #primary .full-width .entry-content, 3223 #primary .full-width .page-content, 3203 3224 #primary .full-width footer.entry-meta { 3204 3225 margin: 0 5.882236%; … … 3208 3229 #comments #respond, 3209 3230 .comments-area article, 3210 .comment list li.trackback,3211 .comment list li.pingback,3231 .comment-list li.trackback, 3232 .comment-list li.pingback, 3212 3233 .post-navigation .nav-previous, 3213 3234 .post-navigation .nav-next { … … 3215 3236 padding-left: 9.19765166%; 3216 3237 } 3217 .comment list,3218 .full-width .comment list {3238 .comment-list, 3239 .full-width .comment-list { 3219 3240 margin-left: 0; 3220 3241 } … … 3228 3249 .full-width #comments #respond, 3229 3250 .full-width .comments-area article, 3230 .full-width .comment list li.trackback,3231 .full-width .comment list li.pingback {3251 .full-width .comment-list li.trackback, 3252 .full-width .comment-list li.pingback { 3232 3253 padding-right: 5.882236%; 3233 3254 padding-left: 5.882236%; … … 3283 3304 3284 3305 @media screen and (min-width: 1150px) { 3285 #primary .entry-header { 3306 #primary .entry-header, 3307 #primary .page-header { 3286 3308 margin: -48px 8.03571428% 0 12.5%; 3287 3309 margin: -4.8rem 8.03571428% 0 12.5%; 3288 3310 } 3289 3311 #primary .entry-content, 3312 #primary .page-content, 3290 3313 #primary .entry-summary { 3291 3314 margin: 0 8.03571428% 0 12.5%; … … 3299 3322 #comments #respond, 3300 3323 .comments-area article, 3301 .comment list li.trackback,3302 .comment list li.pingback,3324 .comment-list li.trackback, 3325 .comment-list li.pingback, 3303 3326 .post-navigation .nav-previous, 3304 3327 .post-navigation .nav-next { … … 3309 3332 padding-right: 13.73697916%; 3310 3333 } 3311 .comment list,3312 .full-width .comment list {3334 .comment-list, 3335 .full-width .comment-list { 3313 3336 margin-left: -70px; 3314 3337 margin-left: -7.0rem; … … 3322 3345 } 3323 3346 .page #primary .entry-header, 3324 .error404 #primary . entry-header {3347 .error404 #primary .page-header { 3325 3348 margin: 0 8.03571428% 0 12.5%; 3326 3349 } 3327 3350 #primary .full-width .entry-header, 3328 3351 #primary .full-width .entry-content, 3352 #primary .full-width .page-content, 3329 3353 #primary .full-width footer.entry-meta { 3330 3354 margin: 0 11.21868265%; … … 3336 3360 .full-width #comments #respond, 3337 3361 .full-width .comments-area article, 3338 .full-width .comment list li.trackback,3339 .full-width .comment list li.pingback {3362 .full-width .comment-list li.trackback, 3363 .full-width .comment-list li.pingback { 3340 3364 padding-right: 11.21868265%; 3341 3365 padding-left: 11.21868265%; … … 3366 3390 #primary .full-width .entry-header, 3367 3391 #primary .full-width .entry-content, 3392 #primary .full-width .page-content, 3368 3393 #primary .full-width footer.entry-meta { 3369 3394 margin: 0 0 0 11.21868265%; … … 3375 3400 .full-width #comments #respond, 3376 3401 .full-width .comments-area article, 3377 .full-width .comment list li.trackback,3378 .full-width .comment list li.pingback {3402 .full-width .comment-list li.trackback, 3403 .full-width .comment-list li.pingback { 3379 3404 padding-right: 0; 3380 3405 }
Note: See TracChangeset
for help on using the changeset viewer.