Ticket #25257: 25257.diff
| File 25257.diff, 62.1 KB (added by , 12 years ago) |
|---|
-
src/wp-content/themes/twentyfourteen/archive.php
45 45 </header><!-- .page-header --> 46 46 47 47 <?php 48 while ( have_posts() ) :49 the_post();48 // Start the Loop. 49 while ( have_posts() ) : the_post(); 50 50 51 /* 52 * Include the post format-specific template for the content. If you want to 53 * use this in a child theme, then include a file called called content-___.php 54 * (where ___ is the post format) and that will be used instead. 55 */ 51 56 get_template_part( 'content', get_post_format() ); 57 52 58 endwhile; 59 // Previous/next page navigation. 53 60 twentyfourteen_paging_nav(); 54 61 55 62 else : 63 // If no content, include the "No posts found" template. 56 64 get_template_part( 'content', 'none' ); 57 65 58 66 endif; -
src/wp-content/themes/twentyfourteen/author.php
45 45 */ 46 46 rewind_posts(); 47 47 48 while ( have_posts() ) :49 the_post();48 // Start the Loop. 49 while ( have_posts() ) : the_post(); 50 50 51 /* 52 * Include the post format-specific template for the content. If you want to 53 * use this in a child theme, then include a file called called content-___.php 54 * (where ___ is the post format) and that will be used instead. 55 */ 51 56 get_template_part( 'content', get_post_format() ); 57 52 58 endwhile; 59 // Previous/next page navigation. 53 60 twentyfourteen_paging_nav(); 54 61 55 62 else : 63 // If no content, include the "No posts found" template. 56 64 get_template_part( 'content', 'none' ); 57 65 58 66 endif; -
src/wp-content/themes/twentyfourteen/category.php
29 29 </header><!-- .archive-header --> 30 30 31 31 <?php 32 while ( have_posts() ) :33 the_post();32 // Start the Loop. 33 while ( have_posts() ) : the_post(); 34 34 35 get_template_part( 'content', get_post_format() ); 35 /* 36 * Include the post format-specific template for the content. If you want to 37 * use this in a child theme, then include a file called called content-___.php 38 * (where ___ is the post format) and that will be used instead. 39 */ 40 get_template_part( 'content', get_post_format() ); 41 36 42 endwhile; 43 // Previous/next page navigation. 37 44 twentyfourteen_paging_nav(); 38 45 39 46 else : 47 // If no content, include the "No posts found" template. 40 48 get_template_part( 'content', 'none' ); 41 49 42 50 endif; -
src/wp-content/themes/twentyfourteen/comments.php
25 25 <h2 class="comments-title"> 26 26 <?php 27 27 printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentyfourteen' ), 28 number_format_i18n( get_comments_number() ), get_the_title() ); 28 number_format_i18n( get_comments_number() ), 29 get_the_title() 30 ); 29 31 ?> 30 32 </h2> 31 33 32 34 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> 33 <nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">34 <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>35 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div>36 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div>37 </nav><!-- #comment-nav-above -->35 <nav id="comment-nav-above" class="navigation comment-navigation" role="navigation"> 36 <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> 37 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> 38 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> 39 </nav><!-- #comment-nav-above --> 38 40 <?php endif; // Check for comment navigation. ?> 39 41 40 42 <ol class="comment-list"> … … 48 50 </ol><!-- .comment-list --> 49 51 50 52 <?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 -->53 <nav id="comment-nav-below" class="navigation comment-navigation" role="navigation"> 54 <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> 55 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> 56 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> 57 </nav><!-- #comment-nav-below --> 56 58 <?php endif; // Check for comment navigation. ?> 57 59 58 60 <?php if ( ! comments_open() ) : ?> 59 <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>61 <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p> 60 62 <?php endif; ?> 61 63 62 64 <?php endif; // have_comments() ?> -
src/wp-content/themes/twentyfourteen/content-aside.php
34 34 <?php twentyfourteen_posted_on(); ?> 35 35 36 36 <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?> 37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 38 38 <?php endif; ?> 39 39 40 40 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> -
src/wp-content/themes/twentyfourteen/content-audio.php
34 34 <?php twentyfourteen_posted_on(); ?> 35 35 36 36 <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?> 37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 38 38 <?php endif; ?> 39 39 40 40 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> -
src/wp-content/themes/twentyfourteen/content-featured-post.php
11 11 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 12 12 <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>"> 13 13 <?php 14 // Output the featured image. 14 15 if ( has_post_thumbnail() ) : 15 16 if ( 'grid' == get_theme_mod( 'featured_content_layout' ) ) { 16 17 the_post_thumbnail(); … … 23 24 24 25 <header class="entry-header"> 25 26 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 26 <div class="entry-meta">27 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>28 </div><!-- .entry-meta -->27 <div class="entry-meta"> 28 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> 29 </div><!-- .entry-meta --> 29 30 <?php endif; ?> 30 31 31 32 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">','</a></h1>' ); ?> -
src/wp-content/themes/twentyfourteen/content-gallery.php
13 13 14 14 <header class="entry-header"> 15 15 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 16 <div class="entry-meta">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>18 </div><!-- .entry-meta -->16 <div class="entry-meta"> 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> 18 </div><!-- .entry-meta --> 19 19 <?php 20 endif;20 endif; 21 21 22 22 if ( is_single() ) : 23 23 the_title( '<h1 class="entry-title">', '</h1>' ); … … 34 34 <?php twentyfourteen_posted_on(); ?> 35 35 36 36 <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?> 37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 38 38 <?php endif; ?> 39 39 40 40 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> -
src/wp-content/themes/twentyfourteen/content-image.php
13 13 14 14 <header class="entry-header"> 15 15 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 16 <div class="entry-meta">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>18 </div><!-- .entry-meta -->16 <div class="entry-meta"> 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> 18 </div><!-- .entry-meta --> 19 19 <?php 20 20 endif; 21 21 … … 34 34 <?php twentyfourteen_posted_on(); ?> 35 35 36 36 <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?> 37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 38 38 <?php endif; ?> 39 39 40 40 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> -
src/wp-content/themes/twentyfourteen/content-link.php
13 13 14 14 <header class="entry-header"> 15 15 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 16 <div class="entry-meta">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>18 </div><!-- .entry-meta -->16 <div class="entry-meta"> 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> 18 </div><!-- .entry-meta --> 19 19 <?php 20 20 endif; 21 21 … … 34 34 <?php twentyfourteen_posted_on(); ?> 35 35 36 36 <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?> 37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 38 38 <?php endif; ?> 39 39 40 40 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> -
src/wp-content/themes/twentyfourteen/content-none.php
14 14 15 15 <div class="page-content"> 16 16 <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?> 17 18 <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfourteen' ), admin_url( 'post-new.php' ) ); ?></p> 19 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> 20 18 <?php elseif ( is_search() ) : ?> 21 22 <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p> 23 <?php get_search_form(); ?> 24 19 <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p> 20 <?php get_search_form(); ?> 25 21 <?php else : ?> 26 27 <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p> 28 <?php get_search_form(); ?> 29 22 <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p> 23 <?php get_search_form(); ?> 30 24 <?php endif; ?> 31 25 </div><!-- .page-content --> -
src/wp-content/themes/twentyfourteen/content-page.php
10 10 11 11 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 12 12 <?php 13 // Page thumbnail and title. 13 14 twentyfourteen_post_thumbnail(); 14 15 the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); 15 16 ?> -
src/wp-content/themes/twentyfourteen/content-quote.php
13 13 14 14 <header class="entry-header"> 15 15 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 16 <div class="entry-meta">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>18 </div><!-- .entry-meta -->16 <div class="entry-meta"> 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> 18 </div><!-- .entry-meta --> 19 19 <?php 20 20 endif; 21 21 … … 34 34 <?php twentyfourteen_posted_on(); ?> 35 35 36 36 <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?> 37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 38 38 <?php endif; ?> 39 39 40 40 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> -
src/wp-content/themes/twentyfourteen/content-video.php
13 13 14 14 <header class="entry-header"> 15 15 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 16 <div class="entry-meta">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>18 </div><!-- .entry-meta -->16 <div class="entry-meta"> 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> 18 </div><!-- .entry-meta --> 19 19 <?php 20 20 endif; 21 21 … … 34 34 <?php twentyfourteen_posted_on(); ?> 35 35 36 36 <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?> 37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>37 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 38 38 <?php endif; ?> 39 39 40 40 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> -
src/wp-content/themes/twentyfourteen/content.php
30 30 31 31 <div class="entry-meta"> 32 32 <?php 33 if ( 'post' == get_post_type() ) 33 if ( 'post' == get_post_type() ) : 34 34 twentyfourteen_posted_on(); 35 endif; 35 36 36 37 if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : 37 38 ?> -
src/wp-content/themes/twentyfourteen/featured-content.php
11 11 <div id="featured-content" class="featured-content"> 12 12 <div class="featured-content-inner"> 13 13 <?php 14 /** 15 * Fires before the Twenty Fourteen featured content. 16 * 17 * @since Twenty Fourteen 1.0 18 */ 14 19 do_action( 'twentyfourteen_featured_posts_before' ); 15 20 16 21 $featured_posts = twentyfourteen_get_featured_posts(); 17 22 foreach ( (array) $featured_posts as $order => $post ) : 18 23 setup_postdata( $post ); 19 24 25 // Include the featured content template. 20 26 get_template_part( 'content', 'featured-post' ); 21 27 endforeach; 22 28 29 /** 30 * Fires after the Twenty Fourteen featured content. 31 * 32 * @since Twenty Fourteen 1.0 33 */ 23 34 do_action( 'twentyfourteen_featured_posts_after' ); 24 35 25 36 wp_reset_postdata(); -
src/wp-content/themes/twentyfourteen/functions.php
6 6 * theme as custom template tags. Others are attached to action and filter 7 7 * hooks in WordPress to change core functionality. 8 8 * 9 * When using a child theme (see http://codex.wordpress.org/Theme_Development 10 * and http://codex.wordpress.org/Child_Themes), you can override certain 11 * functions (those wrapped in a function_exists() call) by defining them first 12 * in your child theme's functions.php file. The child theme's functions.php 13 * file is included before the parent theme's file, so the child theme 14 * functions would be used. 9 * When using a child theme you can override certain functions (those wrapped 10 * in a function_exists() call) by defining them first in your child theme's 11 * functions.php file. The child theme's functions.php file is included before 12 * the parent theme's file, so the child theme functions would be used. 15 13 * 14 * @link http://codex.wordpress.org/Theme_Development 15 * @link http://codex.wordpress.org/Child_Themes 16 * 16 17 * Functions that are not pluggable (not wrapped in function_exists()) are 17 18 * instead attached to a filter or action hook. 18 19 * … … 27 28 /** 28 29 * Set up the content width value based on the theme's design. 29 30 * 30 * @ linktwentyfourteen_content_width()31 * @see twentyfourteen_content_width() 31 32 * 32 33 * @since Twenty Fourteen 1.0 33 34 */ … … 138 139 * @return array An array of WP_Post objects. 139 140 */ 140 141 function twentyfourteen_get_featured_posts() { 142 /** 143 * Filter the featured posts to return in Twenty Fourteen. 144 * 145 * @since Twenty Fourteen 1.0 146 * 147 * @param array|bool $posts Array of featured posts, otherwise false. 148 */ 141 149 return apply_filters( 'twentyfourteen_get_featured_posts', array() ); 142 150 } 143 151 … … 149 157 * @return bool Whether there are featured posts. 150 158 */ 151 159 function twentyfourteen_has_featured_posts() { 160 /** This filter is documented in functions.php */ 152 161 return ! is_paged() && (bool) apply_filters( 'twentyfourteen_get_featured_posts', false ); 153 162 } 154 163 155 164 /** 156 * Register two widget areas.165 * Register two Twenty Fourteen widget areas. 157 166 * 158 167 * @since Twenty Fourteen 1.0 159 168 * … … 214 223 } 215 224 216 225 /** 217 * Enqueue scripts and styles for front end.226 * Enqueue scripts and styles for the front end. 218 227 * 219 228 * @since Twenty Fourteen 1.0 220 229 * … … 280 289 */ 281 290 function twentyfourteen_the_attached_image() { 282 291 $post = get_post(); 292 /** 293 * Filter the default Twenty Fourteen attachment size. 294 * 295 * @since Twenty Fourteen 1.0 296 * 297 * @param array $dimensions { 298 * An array of height and width dimensions. 299 * 300 * @type int $height Height of the image in pixels. Default 1200. 301 * @type int $width Width of the image in pixels. Default 1200. 302 * } 303 */ 283 304 $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 1200, 1200 ) ); 284 305 $next_attachment_url = wp_get_attachment_url(); 285 306 -
src/wp-content/themes/twentyfourteen/header.php
21 21 <head> 22 22 <meta charset="<?php bloginfo( 'charset' ); ?>" /> 23 23 <meta name="viewport" content="width=device-width" /> 24 24 25 <title><?php wp_title( '|', true, 'right' ); ?></title> 26 25 27 <link rel="profile" href="http://gmpg.org/xfn/11" /> 26 28 <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> 29 27 30 <!--[if lt IE 9]> 28 <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>31 <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script> 29 32 <![endif]--> 33 30 34 <?php wp_head(); ?> 31 35 </head> 32 36 33 37 <body <?php body_class(); ?>> 34 38 <div id="page" class="hfeed site"> 35 39 <?php if ( get_header_image() ) : ?> 36 <div id="site-header">37 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">38 <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />39 </a>40 </div>40 <div id="site-header"> 41 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> 42 <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /> 43 </a> 44 </div> 41 45 <?php endif; ?> 42 46 43 47 <header id="masthead" class="site-header" role="banner"> -
src/wp-content/themes/twentyfourteen/image.php
7 7 * @since Twenty Fourteen 1.0 8 8 */ 9 9 10 // Retrieve attachment metadata. 10 11 $metadata = wp_get_attachment_metadata(); 11 12 12 13 get_header(); … … 15 16 <section id="primary" class="content-area image-attachment"> 16 17 <div id="content" class="site-content" role="main"> 17 18 18 <?php while ( have_posts() ) : the_post(); ?> 19 19 <?php 20 // Start the Loop. 21 while ( have_posts() ) : the_post(); 22 ?> 20 23 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 21 24 <header class="entry-header"> 22 25 <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> … … 39 42 </div><!-- .attachment --> 40 43 41 44 <?php if ( has_excerpt() ) : ?> 42 <div class="entry-caption">43 <?php the_excerpt(); ?>44 </div><!-- .entry-caption -->45 <div class="entry-caption"> 46 <?php the_excerpt(); ?> 47 </div><!-- .entry-caption --> 45 48 <?php endif; ?> 46 49 </div><!-- .entry-attachment --> 47 50 -
src/wp-content/themes/twentyfourteen/inc/custom-header.php
17 17 * @uses twentyfourteen_admin_header_image() 18 18 */ 19 19 function twentyfourteen_custom_header_setup() { 20 /** 21 * Filter Twenty Fourteen custom-header support arguments. 22 * 23 * @since Twenty Fourteen 1.0 24 * 25 * @param array $args { 26 * An array of custom-header support arguments. 27 * 28 * @type bool $header_text Whether to display custom header text. Default false. 29 * @type int $width Width in pixels of the custom header image. Default 1260. 30 * @type int $height Height in pixels of the custom header image. Default 240. 31 * @type bool $flex_height Whether to allow flexible-height header images. Default true. 32 * @type string $admin_head_callback Callback function used to style the image displayed in 33 * the Appearance > Header screen. 34 * @type string $admin_preview_callback Callback function used to create the custom header markup in 35 * the Appearance > Header screen. 36 * } 37 */ 20 38 add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array( 21 39 'header-text' => false, 22 40 'width' => 1260, … … 30 48 31 49 if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) : 32 50 /** 33 * Style the header image displayed on the Appearance > Header admin panel.51 * Style the header image displayed on the Appearance > Header screen. 34 52 * 35 * @ link twentyfourteen_custom_header_setup().53 * @see twentyfourteen_custom_header_setup() 36 54 * 37 55 * @since Twenty Fourteen 1.0 38 56 */ … … 65 83 66 84 if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) : 67 85 /** 68 * Create the custom header image markup displayed on the Appearance > Header admin panel.86 * Create the custom header image markup displayed on the Appearance > Header screen. 69 87 * 70 * @ link twentyfourteen_custom_header_setup().88 * @see twentyfourteen_custom_header_setup() 71 89 * 72 90 * @since Twenty Fourteen 1.0 73 91 */ … … 75 93 ?> 76 94 <div id="headimg"> 77 95 <?php if ( get_header_image() ) : ?> 78 <img src="<?php header_image(); ?>" alt="">96 <img src="<?php header_image(); ?>" alt=""> 79 97 <?php endif; ?> 80 98 <h1><a id="name" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1> 81 99 </div> -
src/wp-content/themes/twentyfourteen/inc/customizer.php
72 72 add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' ); 73 73 74 74 /** 75 * Tweak the brightness of a color by adjusting the RGB values by the given interval. 75 * Tweak the brightness of a color by adjusting the RGB 76 * values by the given interval. 76 77 * 77 * Use positive values of $steps to brighten the color and negative values to darken the color. 78 * All three RGB values are modified by the specified steps, within the range of 0-255. The hue 79 * is generally maintained unless the number of steps causes one value to be capped at 0 or 255. 78 * Use positive values of $steps to brighten the color and negative 79 * values to darken the color. All three RGB values are modified by 80 * the specified steps, within the range of 0-255. The hue is generally 81 * maintained unless the number of steps causes one value to be capped 82 * at 0 or 255. 80 83 * 81 84 * @since Twenty Fourteen 1.0 82 85 * 83 86 * @param string $color The original color, in 3- or 6-digit hexadecimal form. 84 * @param int $steps The number of steps to adjust the color by, in RGB units.87 * @param int $steps The number of steps to adjust the color by, in RGB units. 85 88 * @return string $color The new color, in 6-digit hexadecimal form. 86 89 */ 87 90 function twentyfourteen_adjust_color( $color, $steps ) { … … 109 112 } 110 113 111 114 /** 112 * Return sa slightly lighter color than what is set as the theme's115 * Return a slightly lighter color than what is set as the theme's 113 116 * accent color. 114 117 * 115 118 * @since Twenty Fourteen 1.0 116 119 * 117 * @return string 120 * @return string Hex color. 118 121 */ 119 122 function twentyfourteen_accent_mid() { 120 123 return twentyfourteen_adjust_color( get_theme_mod( 'accent_color' ), 29 ); 121 124 } 122 125 123 126 /** 124 * Return sa lighter color than what is set as the theme's accent color.127 * Return a lighter color than what is set as the theme's accent color. 125 128 * 126 129 * @since Twenty Fourteen 1.0 127 130 * 128 * @return string 131 * @return string Hex color. 129 132 */ 130 133 function twentyfourteen_accent_light() { 131 134 return twentyfourteen_adjust_color( get_theme_mod( 'accent_color' ), 49 ); 132 135 } 133 136 134 137 /** 135 * Cache sthe generated variants of the theme's accent color.138 * Cache the generated variants of the theme's accent color. 136 139 * 137 140 * @since Twenty Fourteen 1.0 138 141 * … … 324 327 add_action( 'wp_enqueue_scripts', 'twentyfourteen_customizer_styles' ); 325 328 326 329 /** 327 * Add scontextual help to the Themes and Post edit screens.330 * Add contextual help to the Themes and Post edit screens. 328 331 * 329 332 * @since Twenty Fourteen 1.0 330 333 * -
src/wp-content/themes/twentyfourteen/inc/featured-content.php
2 2 /** 3 3 * Twenty Fourteen Featured Content 4 4 * 5 * This module allows you to define a subset of posts to be displayed in the6 * theme's Featured Content area.5 * This module allows you to define a subset of posts to be displayed 6 * in the theme's Featured Content area. 7 7 * 8 * For maximum compatibility with different methods of posting users will9 * designate a featured post tag to associate posts with. Since this tag now10 * has special meaning beyond that of a normal tags, users will have the11 * ability to hide it from the front-end of their site.8 * For maximum compatibility with different methods of posting users 9 * will designate a featured post tag to associate posts with. Since 10 * this tag now has special meaning beyond that of a normal tags, users 11 * will have the ability to hide it from the front-end of their site. 12 12 */ 13 13 class Featured_Content { 14 14 15 15 /** 16 * The maximum number of posts that a Featured Content area can contain. We 17 * define a default value here but themes can override this by defining a 18 * "max_posts" entry in the second parameter passed in the call to 19 * add_theme_support( 'featured-content' ). 16 * The maximum number of posts a Featured Content area can contain. 20 17 * 18 * We define a default value here but themes can override 19 * this by defining a "max_posts" entry in the second parameter 20 * passed in the call to add_theme_support( 'featured-content' ). 21 * 21 22 * @see Featured_Content::init() 23 * 24 * @since Twenty Fourteen 1.0 25 * 26 * @static 27 * @access public 28 * @var int 22 29 */ 23 30 public static $max_posts = 15; 24 31 25 32 /** 26 * Instantiate 33 * Instantiate. 27 34 * 28 35 * All custom functionality will be hooked into the "init" action. 36 * 37 * @static 38 * @access public 39 * @since Twenty Fourteen 1.0 29 40 */ 30 41 public static function setup() { 31 42 add_action( 'init', array( __CLASS__, 'init' ), 30 ); 32 43 } 33 44 34 45 /** 35 * Conditionally hook into WordPress 46 * Conditionally hook into WordPress. 36 47 * 37 48 * Theme must declare that they support this module by adding 38 49 * add_theme_support( 'featured-content' ); during after_setup_theme. … … 40 51 * If no theme support is found there is no need to hook into WordPress. 41 52 * We'll just return early instead. 42 53 * 43 * @uses Featured_Content::$max_posts 54 * @static 55 * @access public 56 * @since Twenty Fourteen 1.0 44 57 */ 45 58 public static function init() { 46 59 $theme_support = get_theme_support( 'featured-content' ); … … 85 98 * 86 99 * Has to run on wp_loaded so that the preview filters of the customizer 87 100 * have a chance to alter the value. 101 * 102 * @static 103 * @access public 104 * @since Twenty Fourteen 1.0 88 105 */ 89 106 public static function wp_loaded() { 90 107 if ( self::get_setting( 'hide-tag' ) ) { … … 94 111 } 95 112 96 113 /** 97 * Get featured posts 114 * Get featured posts. 98 115 * 99 * @uses Featured_Content::get_featured_post_ids() 116 * @static 117 * @access public 118 * @since Twenty Fourteen 1.0 100 119 * 101 * @return array 120 * @return array Array of featured posts. 102 121 */ 103 122 public static function get_featured_posts() { 104 123 $post_ids = self::get_featured_post_ids(); … … 124 143 * 125 144 * Sets the "featured_content_ids" transient. 126 145 * 127 * @return array Array of post IDs 146 * @static 147 * @access public 148 * @since Twenty Fourteen 1.0 149 * 150 * @return array Array of post IDs. 128 151 */ 129 152 public static function get_featured_post_ids() { 130 153 // Return array of cached results if they exist. … … 170 193 } 171 194 172 195 /** 173 * Return san array with IDs of posts maked as sticky.196 * Return an array with IDs of posts maked as sticky. 174 197 * 175 * @return array 198 * @static 199 * @access public 200 * @since Twenty Fourteen 1.0 201 * 202 * @return array Array of sticky posts. 176 203 */ 177 204 public static function get_sticky_posts() { 178 205 $settings = self::get_setting(); … … 180 207 } 181 208 182 209 /** 183 * Delete transient210 * Delete featured content ids transient. 184 211 * 185 212 * Hooks in the "save_post" action. 213 * 186 214 * @see Featured_Content::validate_settings(). 215 * 216 * @static 217 * @access public 218 * @since Twenty Fourteen 1.0 187 219 */ 188 220 public static function delete_transient() { 189 221 delete_transient( 'featured_content_ids' ); 190 222 } 191 223 192 224 /** 193 * Exclude featured posts from the home page blog query 225 * Exclude featured posts from the home page blog query. 194 226 * 195 * Filter the home page posts, and remove any featured post ID's from it. Hooked196 * onto the 'pre_get_posts' action, this changes the parameters of the query197 * before it gets any posts.227 * Filter the home page posts, and remove any featured post ID's from it. 228 * Hooked onto the 'pre_get_posts' action, this changes the parameters of 229 * the query before it gets any posts. 198 230 * 199 * @uses Featured_Content::get_featured_post_ids(); 200 * @param WP_Query $query 201 * @return WP_Query Possibly modified WP_Query 231 * @static 232 * @access public 233 * @since Twenty Fourteen 1.0 234 * 235 * @param WP_Query $query WP_Query object. 236 * @return WP_Query Possibly-modified WP_Query. 202 237 */ 203 238 public static function pre_get_posts( $query ) { 204 239 … … 233 268 } 234 269 235 270 /** 236 * Reset tag option when the saved tag is deleted 271 * Reset tag option when the saved tag is deleted. 237 272 * 238 * It's important to mention that the transient needs to be deleted, too.239 * While it may not be obvious by looking at the function alone, the transient240 * is deleted by Featured_Content::validate_settings().273 * It's important to mention that the transient needs to be deleted, 274 * too. While it may not be obvious by looking at the function alone, 275 * the transient is deleted by Featured_Content::validate_settings(). 241 276 * 242 277 * Hooks in the "delete_post_tag" action. 278 * 243 279 * @see Featured_Content::validate_settings(). 244 280 * 281 * @static 282 * @access public 283 * @since Twenty Fourteen 1.0 284 * 245 285 * @param int $tag_id The term_id of the tag that has been deleted. 246 286 * @return void 247 287 */ … … 258 298 } 259 299 260 300 /** 261 * Hide featured tag from displaying when global terms are queried from the front-end 301 * Hide featured tag from displaying when global terms are queried from the front-end. 262 302 * 263 303 * Hooks into the "get_terms" filter. 264 304 * 265 * @param array $terms A list of term objects. This is the return value of get_terms(). 305 * @static 306 * @access public 307 * @since Twenty Fourteen 1.0 308 * 309 * @param array $terms List of term objects. This is the return value of get_terms(). 266 310 * @param array $taxonomies An array of taxonomy slugs. 267 * @return array $terms311 * @return array A filtered array of terms. 268 312 * 269 313 * @uses Featured_Content::get_setting() 270 314 */ … … 295 339 } 296 340 297 341 /** 298 * Hide featured tag from display when terms associated with a post object are queried from the front-end 342 * Hide featured tag from display when terms associated with a post object 343 * are queried from the front-end. 299 344 * 300 345 * Hooks into the "get_the_terms" filter. 301 346 * 302 * @param array $terms A list of term objects. This is the return value of get_the_terms(). 303 * @param int $id The ID field for the post object that terms are associated with. 347 * @static 348 * @access public 349 * @since Twenty Fourteen 1.0 350 * 351 * @param array $terms A list of term objects. This is the return value of get_the_terms(). 352 * @param int $id The ID field for the post object that terms are associated with. 304 353 * @param array $taxonomy An array of taxonomy slugs. 305 * @return array $terms354 * @return array Filtered array of terms. 306 355 * 307 356 * @uses Featured_Content::get_setting() 308 357 */ … … 333 382 } 334 383 335 384 /** 336 * Register custom setting on the Settings -> Reading screen 385 * Register custom setting on the Settings -> Reading screen. 337 386 * 338 * @uses Featured_Content::render_form() 339 * @uses Featured_Content::validate_settings() 387 * @static 388 * @access public 389 * @since Twenty Fourteen 1.0 340 390 * 341 391 * @return void 342 392 */ … … 347 397 /** 348 398 * Add settings to the Customizer. 349 399 * 400 * @static 401 * @access public 402 * @since Twenty Fourteen 1.0 403 * 350 404 * @param WP_Customize_Manager $wp_customize Theme Customizer object. 351 405 */ 352 406 public static function customize_register( $wp_customize ) { … … 386 440 /** 387 441 * Enqueue the tag suggestion script. 388 442 * 443 * @static 444 * @access public 389 445 * @since Twenty Fourteen 1.0 390 446 */ 391 447 public static function enqueue_scripts() { … … 393 449 } 394 450 395 451 /** 396 * Get settings452 * Get featured content settings. 397 453 * 398 * Get all settings recognized by this module. This function will return 399 * all settings whether or not they have been stored in the database yet. 400 * This ensures that all keys are available at all times. 454 * Get all settings recognized by this module. This function 455 * will return all settings whether or not they have been stored 456 * in the database yet. This ensures that all keys are available 457 * at all times. 401 458 * 402 * In the event that you only require one setting, you may pass its name 403 * as the first parameter to the function and only that value will be returned. 459 * In the event that you only require one setting, you may pass 460 * its name as the first parameter to the function and only that 461 * value will be returned. 404 462 * 405 * @uses Featured_Content::sanitize_quantity() 463 * @static 464 * @access public 465 * @since Twenty Fourteen 1.0 406 466 * 407 467 * @param string $key The key of a recognized setting. 408 468 * @return mixed Array of all settings by default. A single value if passed as first parameter. … … 429 489 } 430 490 431 491 /** 432 * Validate settings492 * Validate featured content settings. 433 493 * 434 * Make sure that all user supplied content is in an 435 * expected format before saving to the database. This 436 * function will also delete the transient set in 437 * Featured_Content::get_featured_content(). 494 * Make sure that all user supplied content is in an expected 495 * format before saving to the database. This function will also 496 * delete the transient set in Featured_Content::get_featured_content(). 438 497 * 439 * @uses Featured_Content::self::sanitize_quantity() 440 * @uses Featured_Content::self::delete_transient() 498 * @static 499 * @access public 500 * @since Twenty Fourteen 1.0 441 501 * 442 * @param array $input 443 * @return array $output502 * @param array $input Array of settings input. 503 * @return array Validated settings output. 444 504 */ 445 505 public static function validate_settings( $input ) { 446 506 $output = array(); … … 469 529 470 530 $output['hide-tag'] = isset( $input['hide-tag'] ) && $input['hide-tag'] ? 1 : 0; 471 531 532 // Delete the featured post ids transient. 472 533 self::delete_transient(); 473 534 474 535 return $output; 475 536 } 476 537 477 538 /** 478 * Sanitize quantity 539 * Sanitize quantity of featured posts. 479 540 * 541 * @static 542 * @access public 543 * @since Twenty Fourteen 1.0 544 * 480 545 * @param int $input The value to sanitize. 481 546 * @return int A number between 1 and FeaturedContent::$max_posts. 482 *483 * @uses Featured_Content::$max_posts484 547 */ 485 548 public static function sanitize_quantity( $input ) { 486 549 $quantity = absint( $input ); … … 493 556 494 557 return $quantity; 495 558 } 496 }497 559 560 } // Featured_Content 561 498 562 Featured_Content::setup(); -
src/wp-content/themes/twentyfourteen/inc/template-tags.php
36 36 $format = $GLOBALS['wp_rewrite']->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : ''; 37 37 $format .= $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit( 'page/%#%', 'paged' ) : '?paged=%#%'; 38 38 39 $links = paginate_links( array( 39 // Setup paginated links. 40 $links = paginate_links( array( 40 41 'base' => $pagenum_link, 41 42 'format' => $format, 42 43 'total' => $GLOBALS['wp_query']->max_num_pages, … … 109 110 echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>'; 110 111 } 111 112 113 // Setup and print post meta information. 112 114 printf( __( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>', 'twentyfourteen' ), 113 115 esc_url( get_permalink() ), 114 116 esc_attr( get_the_date( 'c' ) ), … … 149 151 } 150 152 151 153 /** 152 * Flush out the transients used in twentyfourteen_categorized_blog 154 * Flush out the transients used in twentyfourteen_categorized_blog. 153 155 * 154 156 * @since Twenty Fourteen 1.0 155 157 * … … 163 165 add_action( 'save_post', 'twentyfourteen_category_transient_flusher' ); 164 166 165 167 /** 166 * Displays an optional post thumbnail, with an anchor element 167 * when on index views, and a div element when on a single view. 168 * Display an optional post thumbnail on a single view. 168 169 * 170 * Adds an anchor element to the post thumbnail, when on 171 * index views, and a div element when on a single view. 172 * 169 173 * @since Twenty Fourteen 1.0 170 174 * 171 175 * @return void … … 176 180 } 177 181 178 182 if ( is_singular() ) : 179 ?> 183 ?> 184 <div class="post-thumbnail"> 185 <?php 186 if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() ) { 187 the_post_thumbnail( 'twentyfourteen-full-width' ); 188 } else { 189 the_post_thumbnail(); 190 } 191 ?> 192 </div> 180 193 181 <div class="post-thumbnail">182 <?php183 if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() ) {184 the_post_thumbnail( 'twentyfourteen-full-width' );185 } else {186 the_post_thumbnail();187 }188 ?>189 </div>190 191 194 <?php else : ?> 192 195 193 196 <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>"> -
src/wp-content/themes/twentyfourteen/inc/widgets.php
16 16 /** 17 17 * The supported post formats. 18 18 * 19 * @access private 19 20 * @since Twenty Fourteen 1.0 20 21 * 21 22 * @var array … … 25 26 /** 26 27 * Pluralized post format strings. 27 28 * 29 * @access private 28 30 * @since Twenty Fourteen 1.0 29 31 * 30 32 * @var array … … 65 67 /** 66 68 * Output the HTML for this widget. 67 69 * 70 * @access public 68 71 * @since Twenty Fourteen 1.0 69 72 * 70 * @param array $args An array of standard parameters for widgets in this theme.73 * @param array $args An array of standard parameters for widgets in this theme. 71 74 * @param array $instance An array of settings for this widget instance. 72 75 * @return void Echoes its output. 73 76 */ … … 219 222 } 220 223 221 224 /** 222 * Deal with the settings when they are saved by the admin. Here is where 223 * any validation should happen. 225 * Deal with the settings when they are saved by the admin. 224 226 * 227 * Here is where any validation should happen. 228 * 225 229 * @since Twenty Fourteen 1.0 226 230 * 227 * @param array $new_instance 228 * @param array $instance 229 * @return array 231 * @param array $new_instance New widget instance. 232 * @param array $instance Original widget instance. 233 * @return array Updated widget instance. 230 234 */ 231 235 function update( $new_instance, $instance ) { 232 236 $instance['title'] = strip_tags( $new_instance['title'] ); -
src/wp-content/themes/twentyfourteen/index.php
2 2 /** 3 3 * The main template file 4 4 * 5 * This is the most generic template file in a WordPress theme 6 * and oneof the two required files for a theme (the other being style.css).5 * This is the most generic template file in a WordPress theme and one 6 * of the two required files for a theme (the other being style.css). 7 7 * It is used to display a page when nothing more specific matches a query. 8 8 * E.g., it puts together the home page when no home.php file exists. 9 * 9 10 * @link http://codex.wordpress.org/Template_Hierarchy 10 11 * 11 12 * @package WordPress … … 18 19 <div id="main-content" class="main-content"> 19 20 20 21 <?php 21 if ( is_front_page() && twentyfourteen_has_featured_posts() ) { 22 if ( is_front_page() && twentyfourteen_has_featured_posts() ) : 23 // Include the featured content template. 22 24 get_template_part( 'featured-content' ); 23 }25 endif; 24 26 ?> 25 27 26 28 <div id="primary" class="content-area"> … … 28 30 29 31 <?php 30 32 if ( have_posts() ) : 31 while ( have_posts() ) :32 the_post();33 // Start the Loop. 34 while ( have_posts() ) : the_post(); 33 35 36 /* 37 * Include the post format-specific template for the content. If you want to 38 * use this in a child theme, then include a file called called content-___.php 39 * (where ___ is the post format) and that will be used instead. 40 */ 34 41 get_template_part( 'content', get_post_format() ); 42 35 43 endwhile; 44 // Previous/next post navigation. 36 45 twentyfourteen_paging_nav(); 37 46 38 47 else : 48 // If no content, include the "No posts found" template. 39 49 get_template_part( 'content', 'none' ); 40 50 41 51 endif; -
src/wp-content/themes/twentyfourteen/page-templates/contributors.php
13 13 14 14 <?php 15 15 if ( is_front_page() && twentyfourteen_has_featured_posts() ) { 16 // Include the featured content template. 16 17 get_template_part( 'featured-content' ); 17 18 } 18 19 ?> … … 20 21 <div id="primary" class="content-area"> 21 22 <div id="content" class="site-content" role="main"> 22 23 <?php 23 while ( have_posts() ) :24 the_post();24 // Start the Loop. 25 while ( have_posts() ) : the_post(); 25 26 ?> 26 27 27 28 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 28 29 <?php 29 30 the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); 30 31 32 // Output the authors list. 31 33 twentyfourteen_list_authors(); 32 34 33 35 edit_post_link( __( 'Edit', 'twentyfourteen' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); -
src/wp-content/themes/twentyfourteen/page-templates/full-width.php
13 13 14 14 <?php 15 15 if ( is_front_page() && twentyfourteen_has_featured_posts() ) { 16 // Include the featured content template. 16 17 get_template_part( 'featured-content' ); 17 18 } 18 19 ?> … … 20 21 <div id="primary" class="content-area"> 21 22 <div id="content" class="site-content" role="main"> 22 23 <?php 23 while ( have_posts() ) :24 the_post();24 // Start the Loop. 25 while ( have_posts() ) : the_post(); 25 26 27 // Include the page content template. 26 28 get_template_part( 'content', 'page' ); 27 29 28 30 // If comments are open or we have at least one comment, load up the comment template. -
src/wp-content/themes/twentyfourteen/page.php
3 3 * The template for displaying all pages 4 4 * 5 5 * This is the template that displays all pages by default. 6 * Please note that this is the WordPress construct of pages and that other 'pages'7 * o n your WordPress site will use a different template.6 * Please note that this is the WordPress construct of pages and that 7 * other 'pages' on your WordPress site will use a different template. 8 8 * 9 9 * @package WordPress 10 10 * @subpackage Twenty_Fourteen … … 16 16 <div id="main-content" class="main-content"> 17 17 18 18 <?php 19 if ( is_front_page() && twentyfourteen_has_featured_posts() ) { 19 if ( is_front_page() && twentyfourteen_has_featured_posts() ) :\ 20 // Include the featured content template. 20 21 get_template_part( 'featured-content' ); 21 }22 endif; 22 23 ?> 23 24 <div id="primary" class="content-area"> 24 25 <div id="content" class="site-content" role="main"> 25 26 26 27 <?php 27 while ( have_posts() ) :28 the_post();28 // Start the Loop. 29 while ( have_posts() ) : the_post(); 29 30 31 // Include the page content template. 30 32 get_template_part( 'content', 'page' ); 31 33 32 34 // If comments are open or we have at least one comment, load up the comment template. 33 if ( comments_open() || get_comments_number() ) {35 if ( comments_open() || get_comments_number() ) : 34 36 comments_template(); 35 }37 endif; 36 38 endwhile; 37 39 ?> 38 40 -
src/wp-content/themes/twentyfourteen/search.php
14 14 15 15 <?php if ( have_posts() ) : ?> 16 16 17 <header class="page-header">18 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1>19 </header><!-- .page-header -->17 <header class="page-header"> 18 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1> 19 </header><!-- .page-header --> 20 20 21 <?php22 while ( have_posts() ) :23 the_post();21 <?php 22 // Start the Loop. 23 while ( have_posts() ) : the_post(); 24 24 25 /* 26 * Include the post format-specific template for the content. If you want to 27 * use this in a child theme, then include a file called called content-___.php 28 * (where ___ is the post format) and that will be used instead. 29 */ 25 30 get_template_part( 'content', get_post_format() ); 31 26 32 endwhile; 33 // Previous/next post navigation. 27 34 twentyfourteen_paging_nav(); 28 35 29 36 else : 37 // If no content, include the "No posts found" template. 30 38 get_template_part( 'content', 'none' ); 31 39 32 40 endif; -
src/wp-content/themes/twentyfourteen/sidebar-content.php
7 7 * @since Twenty Fourteen 1.0 8 8 */ 9 9 10 if ( ! is_active_sidebar( 'sidebar-2' ) ) {10 if ( ! is_active_sidebar( 'sidebar-2' ) ) : 11 11 return; 12 } 12 endif; 13 13 ?> 14 14 <div id="content-sidebar" class="content-sidebar widget-area" role="complementary"> 15 15 <?php dynamic_sidebar( 'sidebar-2' ); ?> -
src/wp-content/themes/twentyfourteen/sidebar-footer.php
7 7 * @since Twenty Fourteen 1.0 8 8 */ 9 9 10 if ( ! is_active_sidebar( 'sidebar-3' ) ) {10 if ( ! is_active_sidebar( 'sidebar-3' ) ) : 11 11 return; 12 } 12 endif; 13 13 ?> 14 14 15 15 <div id="supplementary"> -
src/wp-content/themes/twentyfourteen/sidebar.php
12 12 $description = get_bloginfo( 'description' ); 13 13 if ( ! empty ( $description ) ) : 14 14 ?> 15 <h2 class="site-description"><?php echo esc_html( $description ); ?></h2>15 <h2 class="site-description"><?php echo esc_html( $description ); ?></h2> 16 16 <?php endif; ?> 17 17 18 18 <?php if ( has_nav_menu( 'secondary' ) ) : ?> 19 <nav role="navigation" class="navigation site-navigation secondary-navigation">20 <?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?>21 </nav>19 <nav role="navigation" class="navigation site-navigation secondary-navigation"> 20 <?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?> 21 </nav> 22 22 <?php endif; ?> 23 23 24 24 <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?> 25 <div id="primary-sidebar" class="primary-sidebar widget-area" role="complementary">26 <?php dynamic_sidebar( 'sidebar-1' ); ?>27 </div><!-- #primary-sidebar -->25 <div id="primary-sidebar" class="primary-sidebar widget-area" role="complementary"> 26 <?php dynamic_sidebar( 'sidebar-1' ); ?> 27 </div><!-- #primary-sidebar --> 28 28 <?php endif; ?> 29 29 </div><!-- #secondary --> -
src/wp-content/themes/twentyfourteen/single.php
12 12 <div id="primary" class="content-area"> 13 13 <div id="content" class="site-content" role="main"> 14 14 <?php 15 while ( have_posts() ) :16 the_post();15 // Start the Loop. 16 while ( have_posts() ) : the_post(); 17 17 18 /* 19 * Include the post format-specific template for the content. If you want to 20 * use this in a child theme, then include a file called called content-___.php 21 * (where ___ is the post format) and that will be used instead. 22 */ 18 23 get_template_part( 'content', get_post_format() ); 19 24 25 // Previous/next post navigation. 20 26 twentyfourteen_post_nav(); 21 27 22 28 // If comments are open or we have at least one comment, load up the comment template. 23 if ( comments_open() || get_comments_number() ) {29 if ( comments_open() || get_comments_number() ) : 24 30 comments_template(); 25 }31 endif; 26 32 endwhile; 27 33 ?> 28 34 </div><!-- #content --> -
src/wp-content/themes/twentyfourteen/tag.php
18 18 19 19 <?php if ( have_posts() ) : ?> 20 20 21 <header class="archive-header">22 <h1 class="archive-title"><?php single_tag_title(); ?></h1>21 <header class="archive-header"> 22 <h1 class="archive-title"><?php single_tag_title(); ?></h1> 23 23 24 <?php25 // Show an optional term description.26 $term_description = term_description();27 if ( ! empty( $term_description ) ) :28 printf( '<div class="taxonomy-description">%s</div>', $term_description );29 endif;30 ?>31 </header><!-- .archive-header -->24 <?php 25 // Show an optional term description. 26 $term_description = term_description(); 27 if ( ! empty( $term_description ) ) : 28 printf( '<div class="taxonomy-description">%s</div>', $term_description ); 29 endif; 30 ?> 31 </header><!-- .archive-header --> 32 32 33 33 <?php 34 while ( have_posts() ) :35 the_post();34 // Start the Loop. 35 while ( have_posts() ) : the_post(); 36 36 37 /* 38 * Include the post format-specific template for the content. If you want to 39 * use this in a child theme, then include a file called called content-___.php 40 * (where ___ is the post format) and that will be used instead. 41 */ 37 42 get_template_part( 'content', get_post_format() ); 43 38 44 endwhile; 45 // Previous/next page navigation. 39 46 twentyfourteen_paging_nav(); 40 47 41 48 else : 49 // If no content, include the "No posts found" template. 42 50 get_template_part( 'content', 'none' ); 43 51 44 52 endif; -
src/wp-content/themes/twentyfourteen/taxonomy-post_format.php
20 20 21 21 <?php if ( have_posts() ) : ?> 22 22 23 <header class="archive-header"> 24 <h1 class="archive-title"> 25 <?php 26 if ( is_tax( 'post_format', 'post-format-aside' ) ) : 27 _e( 'Asides', 'twentyfourteen' ); 23 <header class="archive-header"> 24 <h1 class="archive-title"> 25 <?php 26 if ( is_tax( 'post_format', 'post-format-aside' ) ) : 27 _e( 'Asides', 'twentyfourteen' ); 28 elseif ( is_tax( 'post_format', 'post-format-image' ) ) : 29 _e( 'Images', 'twentyfourteen' ); 30 elseif ( is_tax( 'post_format', 'post-format-video' ) ) : 31 _e( 'Videos', 'twentyfourteen' ); 32 elseif ( is_tax( 'post_format', 'post-format-audio' ) ) : 33 _e( 'Audio', 'twentyfourteen' ); 34 elseif ( is_tax( 'post_format', 'post-format-quote' ) ) : 35 _e( 'Quotes', 'twentyfourteen' ); 36 elseif ( is_tax( 'post_format', 'post-format-link' ) ) : 37 _e( 'Links', 'twentyfourteen' ); 38 elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) : 39 _e( 'Galleries', 'twentyfourteen' ); 40 else : 41 _e( 'Archives', 'twentyfourteen' ); 42 endif; 43 ?> 44 </h1> 45 </header><!-- .archive-header --> 28 46 29 elseif ( is_tax( 'post_format', 'post-format-image' ) ) :30 _e( 'Images', 'twentyfourteen' );31 32 elseif ( is_tax( 'post_format', 'post-format-video' ) ) :33 _e( 'Videos', 'twentyfourteen' );34 35 elseif ( is_tax( 'post_format', 'post-format-audio' ) ) :36 _e( 'Audio', 'twentyfourteen' );37 38 elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :39 _e( 'Quotes', 'twentyfourteen' );40 41 elseif ( is_tax( 'post_format', 'post-format-link' ) ) :42 _e( 'Links', 'twentyfourteen' );43 44 elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :45 _e( 'Galleries', 'twentyfourteen' );46 47 else :48 _e( 'Archives', 'twentyfourteen' );49 50 endif;51 ?>52 </h1>53 </header><!-- .archive-header -->54 55 47 <?php 56 while ( have_posts() ) :57 the_post();48 // Start the Loop. 49 while ( have_posts() ) : the_post(); 58 50 51 /* 52 * Include the post format-specific template for the content. If you want to 53 * use this in a child theme, then include a file called called content-___.php 54 * (where ___ is the post format) and that will be used instead. 55 */ 59 56 get_template_part( 'content', get_post_format() ); 57 60 58 endwhile; 59 // Previous/next page navigation. 61 60 twentyfourteen_paging_nav(); 62 61 63 62 else : 63 // If no content, include the "No posts found" template. 64 64 get_template_part( 'content', 'none' ); 65 65 66 66 endif;