diff --git a/wp-content/themes/twentyfourteen/archive.php b/wp-content/themes/twentyfourteen/archive.php index 6a4deed0f262f8f0918ca2cdea95aa443dad843a..cf8b63846784f4add118518961a85d41cb48413c 100644 --- a/wp-content/themes/twentyfourteen/archive.php +++ b/wp-content/themes/twentyfourteen/archive.php @@ -27,8 +27,8 @@ get_header(); ?> <header class="page-header"> <h1 class="page-title"> <?php - if ( is_day() ) : - printf( __( 'Daily Archives: %s', 'twentyfourteen' ), get_the_date() ); + if ( is_day() ) : + printf( __( 'Daily Archives: %s', 'twentyfourteen' ), get_the_date() ); elseif ( is_month() ) : printf( __( 'Monthly Archives: %s', 'twentyfourteen' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyfourteen' ) ) ); @@ -40,20 +40,21 @@ get_header(); ?> _e( 'Archives', 'twentyfourteen' ); endif; - ?> + ?> </h1> </header><!-- .page-header --> - <?php + <?php // Start the Loop. - while ( have_posts() ) : the_post(); + while ( have_posts() ) : + the_post(); - /* - * Include the post format-specific template for the content. If you want to - * use this in a child theme, then include a file called content-___.php - * (where ___ is the post format) and that will be used instead. - */ - get_template_part( 'content', get_post_format() ); + /* + * Include the post format-specific template for the content. If you want to + * use this in a child theme, then include a file called content-___.php + * (where ___ is the post format) and that will be used instead. + */ + get_template_part( 'content', get_post_format() ); endwhile; // Previous/next page navigation. @@ -64,7 +65,7 @@ get_header(); ?> get_template_part( 'content', 'none' ); endif; - ?> + ?> </div><!-- #content --> </section><!-- #primary --> diff --git a/wp-content/themes/twentyfourteen/author.php b/wp-content/themes/twentyfourteen/author.php index a40f2090996254fa4c1ac7836574efa55af1e50b..91157f6d989d53f4474c516ed51d3018fb279e14 100644 --- a/wp-content/themes/twentyfourteen/author.php +++ b/wp-content/themes/twentyfourteen/author.php @@ -36,7 +36,7 @@ get_header(); ?> <?php endif; ?> </header><!-- .archive-header --> - <?php + <?php /* * Since we called the_post() above, we need to rewind * the loop back to the beginning that way we can run @@ -45,14 +45,15 @@ get_header(); ?> rewind_posts(); // Start the Loop. - while ( have_posts() ) : the_post(); + while ( have_posts() ) : + the_post(); - /* - * Include the post format-specific template for the content. If you want to - * use this in a child theme, then include a file called content-___.php - * (where ___ is the post format) and that will be used instead. - */ - get_template_part( 'content', get_post_format() ); + /* + * Include the post format-specific template for the content. If you want to + * use this in a child theme, then include a file called content-___.php + * (where ___ is the post format) and that will be used instead. + */ + get_template_part( 'content', get_post_format() ); endwhile; // Previous/next page navigation. @@ -63,7 +64,7 @@ get_header(); ?> get_template_part( 'content', 'none' ); endif; - ?> + ?> </div><!-- #content --> </section><!-- #primary --> diff --git a/wp-content/themes/twentyfourteen/category.php b/wp-content/themes/twentyfourteen/category.php index 97745ff1d65585c0b9b0db7a39eb6f6886a484a4..f4b2a3b6d165f9b3125cf97936e9b7499569beba 100644 --- a/wp-content/themes/twentyfourteen/category.php +++ b/wp-content/themes/twentyfourteen/category.php @@ -22,21 +22,22 @@ get_header(); ?> <?php // Show an optional term description. $term_description = term_description(); - if ( ! empty( $term_description ) ) : - printf( '<div class="taxonomy-description">%s</div>', $term_description ); + if ( ! empty( $term_description ) ) : + printf( '<div class="taxonomy-description">%s</div>', $term_description ); endif; ?> </header><!-- .archive-header --> - <?php + <?php // Start the Loop. - while ( have_posts() ) : the_post(); + while ( have_posts() ) : + the_post(); /* - * Include the post format-specific template for the content. If you want to - * use this in a child theme, then include a file called content-___.php - * (where ___ is the post format) and that will be used instead. - */ + * Include the post format-specific template for the content. If you want to + * use this in a child theme, then include a file called content-___.php + * (where ___ is the post format) and that will be used instead. + */ get_template_part( 'content', get_post_format() ); endwhile; @@ -48,7 +49,7 @@ get_header(); ?> get_template_part( 'content', 'none' ); endif; - ?> + ?> </div><!-- #content --> </section><!-- #primary --> diff --git a/wp-content/themes/twentyfourteen/comments.php b/wp-content/themes/twentyfourteen/comments.php index d62e91a7c748a42fa2aa473293a29d8020250fa5..0b81703fefb3576fb3f8b069eea79af8b92c6d15 100644 --- a/wp-content/themes/twentyfourteen/comments.php +++ b/wp-content/themes/twentyfourteen/comments.php @@ -25,27 +25,27 @@ if ( post_password_required() ) { <h2 class="comments-title"> <?php $comments_number = get_comments_number(); - if ( '1' === $comments_number ) { - /* translators: %s: post title */ - printf( _x( 'One thought on “%s”', 'comments title', 'twentyfourteen' ), get_the_title() ); - } else { - printf( - /* translators: 1: number of comments, 2: post title */ - _nx( - '%1$s thought on “%2$s”', - '%1$s thoughts on “%2$s”', - $comments_number, - 'comments title', - 'twentyfourteen' - ), - number_format_i18n( $comments_number ), - get_the_title() - ); - } + if ( '1' === $comments_number ) { + /* translators: %s: post title */ + printf( _x( 'One thought on “%s”', 'comments title', 'twentyfourteen' ), get_the_title() ); + } else { + printf( + /* translators: 1: number of comments, 2: post title */ + _nx( + '%1$s thought on “%2$s”', + '%1$s thoughts on “%2$s”', + $comments_number, + 'comments title', + 'twentyfourteen' + ), + number_format_i18n( $comments_number ), + get_the_title() + ); + } ?> </h2> - <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> + <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> <nav id="comment-nav-above" class="navigation comment-navigation" role="navigation"> <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> @@ -55,15 +55,17 @@ if ( post_password_required() ) { <ol class="comment-list"> <?php - wp_list_comments( array( - 'style' => 'ol', - 'short_ping' => true, - 'avatar_size' => 34, - ) ); + wp_list_comments( + array( + 'style' => 'ol', + 'short_ping' => true, + 'avatar_size' => 34, + ) + ); ?> </ol><!-- .comment-list --> - <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> + <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> <nav id="comment-nav-below" class="navigation comment-navigation" role="navigation"> <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> @@ -71,7 +73,7 @@ if ( post_password_required() ) { </nav><!-- #comment-nav-below --> <?php endif; // Check for comment navigation. ?> - <?php if ( ! comments_open() ) : ?> + <?php if ( ! comments_open() ) : ?> <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p> <?php endif; ?> diff --git a/wp-content/themes/twentyfourteen/content-aside.php b/wp-content/themes/twentyfourteen/content-aside.php index 0401579df0581edd677d1f722c77af992f804290..48d7abca19177df5e49213438c9f1a0d9c675d4d 100644 --- a/wp-content/themes/twentyfourteen/content-aside.php +++ b/wp-content/themes/twentyfourteen/content-aside.php @@ -16,15 +16,15 @@ <div class="entry-meta"> <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> </div><!-- .entry-meta --> - <?php + <?php endif; - if ( is_single() ) : - the_title( '<h1 class="entry-title">', '</h1>' ); +if ( is_single() ) : + the_title( '<h1 class="entry-title">', '</h1>' ); else : the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); endif; - ?> + ?> <div class="entry-meta"> <span class="post-format"> @@ -44,18 +44,22 @@ <div class="entry-content"> <?php /* translators: %s: Name of current post */ - the_content( sprintf( - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), - the_title( '<span class="screen-reader-text">', '</span>', false ) - ) ); - - wp_link_pages( array( - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', - 'after' => '</div>', - 'link_before' => '<span>', - 'link_after' => '</span>', - ) ); - ?> + the_content( + sprintf( + __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), + the_title( '<span class="screen-reader-text">', '</span>', false ) + ) + ); + + wp_link_pages( + array( + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', + 'after' => '</div>', + 'link_before' => '<span>', + 'link_after' => '</span>', + ) + ); + ?> </div><!-- .entry-content --> <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?> diff --git a/wp-content/themes/twentyfourteen/content-audio.php b/wp-content/themes/twentyfourteen/content-audio.php index 9fa9df41d4a94aad6078f9b84fc8ef65e953542a..c700996a08c94db127885215a61eec891c2c85ad 100644 --- a/wp-content/themes/twentyfourteen/content-audio.php +++ b/wp-content/themes/twentyfourteen/content-audio.php @@ -16,15 +16,15 @@ <div class="entry-meta"> <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> </div><!-- .entry-meta --> - <?php + <?php endif; - if ( is_single() ) : - the_title( '<h1 class="entry-title">', '</h1>' ); +if ( is_single() ) : + the_title( '<h1 class="entry-title">', '</h1>' ); else : the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); endif; - ?> + ?> <div class="entry-meta"> <span class="post-format"> @@ -44,18 +44,22 @@ <div class="entry-content"> <?php /* translators: %s: Name of current post */ - the_content( sprintf( - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), - the_title( '<span class="screen-reader-text">', '</span>', false ) - ) ); - - wp_link_pages( array( - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', - 'after' => '</div>', - 'link_before' => '<span>', - 'link_after' => '</span>', - ) ); - ?> + the_content( + sprintf( + __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), + the_title( '<span class="screen-reader-text">', '</span>', false ) + ) + ); + + wp_link_pages( + array( + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', + 'after' => '</div>', + 'link_before' => '<span>', + 'link_after' => '</span>', + ) + ); + ?> </div><!-- .entry-content --> <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?> diff --git a/wp-content/themes/twentyfourteen/content-featured-post.php b/wp-content/themes/twentyfourteen/content-featured-post.php index 6cc88224b4d56e84f2702195803507729b725d07..d5a16fef203ee73d4e21f3f8106cf682978c3204 100644 --- a/wp-content/themes/twentyfourteen/content-featured-post.php +++ b/wp-content/themes/twentyfourteen/content-featured-post.php @@ -12,12 +12,12 @@ <a class="post-thumbnail" href="<?php the_permalink(); ?>"> <?php // Output the featured image. - if ( has_post_thumbnail() ) : - if ( 'grid' == get_theme_mod( 'featured_content_layout' ) ) { - the_post_thumbnail(); - } else { - the_post_thumbnail( 'twentyfourteen-full-width' ); - } + if ( has_post_thumbnail() ) : + if ( 'grid' == get_theme_mod( 'featured_content_layout' ) ) { + the_post_thumbnail(); + } else { + the_post_thumbnail( 'twentyfourteen-full-width' ); + } endif; ?> </a> @@ -29,6 +29,6 @@ </div><!-- .entry-meta --> <?php endif; ?> - <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">','</a></h1>' ); ?> + <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> </header><!-- .entry-header --> </article><!-- #post-## --> diff --git a/wp-content/themes/twentyfourteen/content-gallery.php b/wp-content/themes/twentyfourteen/content-gallery.php index 6e3fe8324947897837db3c0c16f0280fef1d2eea..e8c252454c05dfbb20740776154cb1986e1a243c 100644 --- a/wp-content/themes/twentyfourteen/content-gallery.php +++ b/wp-content/themes/twentyfourteen/content-gallery.php @@ -16,15 +16,15 @@ <div class="entry-meta"> <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> </div><!-- .entry-meta --> - <?php + <?php endif; - if ( is_single() ) : - the_title( '<h1 class="entry-title">', '</h1>' ); +if ( is_single() ) : + the_title( '<h1 class="entry-title">', '</h1>' ); else : the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); endif; - ?> + ?> <div class="entry-meta"> <span class="post-format"> @@ -44,18 +44,22 @@ <div class="entry-content"> <?php /* translators: %s: Name of current post */ - the_content( sprintf( - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), - the_title( '<span class="screen-reader-text">', '</span>', false ) - ) ); - - wp_link_pages( array( - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', - 'after' => '</div>', - 'link_before' => '<span>', - 'link_after' => '</span>', - ) ); - ?> + the_content( + sprintf( + __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), + the_title( '<span class="screen-reader-text">', '</span>', false ) + ) + ); + + wp_link_pages( + array( + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', + 'after' => '</div>', + 'link_before' => '<span>', + 'link_after' => '</span>', + ) + ); + ?> </div><!-- .entry-content --> <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?> diff --git a/wp-content/themes/twentyfourteen/content-image.php b/wp-content/themes/twentyfourteen/content-image.php index a81e493d062ed21fa1425d8a1bfd161897ad92a3..70b1e04c09f2cb3a659a6b4015a4faa8759f41e4 100644 --- a/wp-content/themes/twentyfourteen/content-image.php +++ b/wp-content/themes/twentyfourteen/content-image.php @@ -16,15 +16,15 @@ <div class="entry-meta"> <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> </div><!-- .entry-meta --> - <?php + <?php endif; - if ( is_single() ) : - the_title( '<h1 class="entry-title">', '</h1>' ); +if ( is_single() ) : + the_title( '<h1 class="entry-title">', '</h1>' ); else : the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); endif; - ?> + ?> <div class="entry-meta"> <span class="post-format"> @@ -44,18 +44,22 @@ <div class="entry-content"> <?php /* translators: %s: Name of current post */ - the_content( sprintf( - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), - the_title( '<span class="screen-reader-text">', '</span>', false ) - ) ); - - wp_link_pages( array( - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', - 'after' => '</div>', - 'link_before' => '<span>', - 'link_after' => '</span>', - ) ); - ?> + the_content( + sprintf( + __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), + the_title( '<span class="screen-reader-text">', '</span>', false ) + ) + ); + + wp_link_pages( + array( + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', + 'after' => '</div>', + 'link_before' => '<span>', + 'link_after' => '</span>', + ) + ); + ?> </div><!-- .entry-content --> <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?> diff --git a/wp-content/themes/twentyfourteen/content-link.php b/wp-content/themes/twentyfourteen/content-link.php index 858301efc1bc04469e97fa8e1dd844da7af718c9..d51d634c5eccd776baee039c864908f13005efb1 100644 --- a/wp-content/themes/twentyfourteen/content-link.php +++ b/wp-content/themes/twentyfourteen/content-link.php @@ -16,15 +16,15 @@ <div class="entry-meta"> <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> </div><!-- .entry-meta --> - <?php + <?php endif; - if ( is_single() ) : - the_title( '<h1 class="entry-title">', '</h1>' ); +if ( is_single() ) : + the_title( '<h1 class="entry-title">', '</h1>' ); else : the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); endif; - ?> + ?> <div class="entry-meta"> <span class="post-format"> @@ -44,18 +44,22 @@ <div class="entry-content"> <?php /* translators: %s: Name of current post */ - the_content( sprintf( - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), - the_title( '<span class="screen-reader-text">', '</span>', false ) - ) ); - - wp_link_pages( array( - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', - 'after' => '</div>', - 'link_before' => '<span>', - 'link_after' => '</span>', - ) ); - ?> + the_content( + sprintf( + __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), + the_title( '<span class="screen-reader-text">', '</span>', false ) + ) + ); + + wp_link_pages( + array( + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', + 'after' => '</div>', + 'link_before' => '<span>', + 'link_after' => '</span>', + ) + ); + ?> </div><!-- .entry-content --> <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?> diff --git a/wp-content/themes/twentyfourteen/content-page.php b/wp-content/themes/twentyfourteen/content-page.php index 98394190b3cd8797ddf92eae272713b7cf56ed24..ca8ebd9bb47a01ceef8d2acab099cf59ae08ca54 100644 --- a/wp-content/themes/twentyfourteen/content-page.php +++ b/wp-content/themes/twentyfourteen/content-page.php @@ -18,14 +18,16 @@ <div class="entry-content"> <?php the_content(); - wp_link_pages( array( - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', - 'after' => '</div>', - 'link_before' => '<span>', - 'link_after' => '</span>', - ) ); + wp_link_pages( + array( + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', + 'after' => '</div>', + 'link_before' => '<span>', + 'link_after' => '</span>', + ) + ); edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); - ?> + ?> </div><!-- .entry-content --> </article><!-- #post-## --> diff --git a/wp-content/themes/twentyfourteen/content-quote.php b/wp-content/themes/twentyfourteen/content-quote.php index 10a5d1122bdb1a1b8e9c1952c5a543cf823ec92c..27a7b169ca4e3e3cecba5fb82028c42494f57322 100644 --- a/wp-content/themes/twentyfourteen/content-quote.php +++ b/wp-content/themes/twentyfourteen/content-quote.php @@ -16,15 +16,15 @@ <div class="entry-meta"> <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> </div><!-- .entry-meta --> - <?php + <?php endif; - if ( is_single() ) : - the_title( '<h1 class="entry-title">', '</h1>' ); +if ( is_single() ) : + the_title( '<h1 class="entry-title">', '</h1>' ); else : the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); endif; - ?> + ?> <div class="entry-meta"> <span class="post-format"> @@ -44,18 +44,22 @@ <div class="entry-content"> <?php /* translators: %s: Name of current post */ - the_content( sprintf( - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), - the_title( '<span class="screen-reader-text">', '</span>', false ) - ) ); - - wp_link_pages( array( - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', - 'after' => '</div>', - 'link_before' => '<span>', - 'link_after' => '</span>', - ) ); - ?> + the_content( + sprintf( + __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), + the_title( '<span class="screen-reader-text">', '</span>', false ) + ) + ); + + wp_link_pages( + array( + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', + 'after' => '</div>', + 'link_before' => '<span>', + 'link_after' => '</span>', + ) + ); + ?> </div><!-- .entry-content --> <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?> diff --git a/wp-content/themes/twentyfourteen/content-video.php b/wp-content/themes/twentyfourteen/content-video.php index 4c49aaa145ef35f8188149eafeb49271d09ac7bb..13609b64a602696ece8eee618e0c7c0fa137de5e 100644 --- a/wp-content/themes/twentyfourteen/content-video.php +++ b/wp-content/themes/twentyfourteen/content-video.php @@ -16,15 +16,15 @@ <div class="entry-meta"> <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> </div><!-- .entry-meta --> - <?php + <?php endif; - if ( is_single() ) : - the_title( '<h1 class="entry-title">', '</h1>' ); +if ( is_single() ) : + the_title( '<h1 class="entry-title">', '</h1>' ); else : the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); endif; - ?> + ?> <div class="entry-meta"> <span class="post-format"> @@ -44,18 +44,22 @@ <div class="entry-content"> <?php /* translators: %s: Name of current post */ - the_content( sprintf( - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), - the_title( '<span class="screen-reader-text">', '</span>', false ) - ) ); - - wp_link_pages( array( - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', - 'after' => '</div>', - 'link_before' => '<span>', - 'link_after' => '</span>', - ) ); - ?> + the_content( + sprintf( + __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), + the_title( '<span class="screen-reader-text">', '</span>', false ) + ) + ); + + wp_link_pages( + array( + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', + 'after' => '</div>', + 'link_before' => '<span>', + 'link_after' => '</span>', + ) + ); + ?> </div><!-- .entry-content --> <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?> diff --git a/wp-content/themes/twentyfourteen/content.php b/wp-content/themes/twentyfourteen/content.php index e571d8b38abbc0ba93b7543644a2d69574b9345f..2d54fc9aa54dc05588960eaf0a038928ae6ed110 100644 --- a/wp-content/themes/twentyfourteen/content.php +++ b/wp-content/themes/twentyfourteen/content.php @@ -18,25 +18,26 @@ <div class="entry-meta"> <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> </div> - <?php + <?php endif; - if ( is_single() ) : - the_title( '<h1 class="entry-title">', '</h1>' ); +if ( is_single() ) : + the_title( '<h1 class="entry-title">', '</h1>' ); else : the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); endif; - ?> + ?> <div class="entry-meta"> <?php - if ( 'post' == get_post_type() ) - twentyfourteen_posted_on(); + if ( 'post' == get_post_type() ) { + twentyfourteen_posted_on(); + } - if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : - ?> + if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : + ?> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> - <?php + <?php endif; edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); @@ -52,17 +53,21 @@ <div class="entry-content"> <?php /* translators: %s: Name of current post */ - the_content( sprintf( - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), - the_title( '<span class="screen-reader-text">', '</span>', false ) - ) ); + the_content( + sprintf( + __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), + the_title( '<span class="screen-reader-text">', '</span>', false ) + ) + ); - wp_link_pages( array( - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', - 'after' => '</div>', - 'link_before' => '<span>', - 'link_after' => '</span>', - ) ); + wp_link_pages( + array( + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', + 'after' => '</div>', + 'link_before' => '<span>', + 'link_after' => '</span>', + ) + ); ?> </div><!-- .entry-content --> <?php endif; ?> diff --git a/wp-content/themes/twentyfourteen/css/blocks.css b/wp-content/themes/twentyfourteen/css/blocks.css index 425c8dbc214f7180a4575e5f6da619bccb314988..e0f0e231e7ed4aaa29868dce58498f599237954d 100644 --- a/wp-content/themes/twentyfourteen/css/blocks.css +++ b/wp-content/themes/twentyfourteen/css/blocks.css @@ -139,7 +139,6 @@ p.has-drop-cap:not(:focus)::first-letter { .wp-block-file .wp-block-file__button { background-color: #24890d; border: 0; - border-radius: 2px; color: #fff; font-size: 12px; font-weight: 700; @@ -221,12 +220,11 @@ p.has-drop-cap:not(:focus)::first-letter { /* Buttons */ .wp-block-button .wp-block-button__link { - border: 0; - border-radius: 2px; font-size: 12px; font-weight: 700; line-height: 15px; padding: 10px 30px 11px; + text-decoration: none; text-transform: uppercase; vertical-align: bottom; } @@ -236,8 +234,14 @@ p.has-drop-cap:not(:focus)::first-letter { color: #fff; } +.is-style-outline .wp-block-button__link:not(.has-text-color) { + color: #24890d; +} + .wp-block-button__link:hover, -.wp-block-button__link:focus { +.wp-block-button__link:focus, +.is-style-outline .wp-block-button__link:not(.has-text-color):hover, +.is-style-outline .wp-block-button__link:not(.has-text-color):focus { background-color: #41a62a; color: #fff; } diff --git a/wp-content/themes/twentyfourteen/css/editor-blocks.css b/wp-content/themes/twentyfourteen/css/editor-blocks.css index e8fba395465e820dc0c805a97414fab5625e3434..079896cbfc80058ecdb4aaeea339a42a19665f3e 100644 --- a/wp-content/themes/twentyfourteen/css/editor-blocks.css +++ b/wp-content/themes/twentyfourteen/css/editor-blocks.css @@ -389,10 +389,6 @@ p.has-drop-cap:not(:focus)::first-letter { /* Buttons */ .wp-block-button .wp-block-button__link { - background-color: #24890d; - border: 0; - border-radius: 2px; - color: #fff; font-size: 12px; font-weight: 700; padding: 10px 30px 11px; @@ -400,6 +396,15 @@ p.has-drop-cap:not(:focus)::first-letter { vertical-align: bottom; } +.wp-block-button__link { + background-color: #24890d; + color: #fff; +} + +.is-style-outline .wp-block-button__link { + color: #24890d; +} + .editor-block-list__block .wp-block-button .mce-content-body { line-height: normal; } diff --git a/wp-content/themes/twentyfourteen/css/editor-style.css b/wp-content/themes/twentyfourteen/css/editor-style.css index 6bd5ac0f413a4308f342b7ff71ac4b08ea5c3de8..4c5482adc25a938d7bd9b8e7d708990a46660954 100644 --- a/wp-content/themes/twentyfourteen/css/editor-style.css +++ b/wp-content/themes/twentyfourteen/css/editor-style.css @@ -628,7 +628,6 @@ img { box-shadow: 1px 1px 1px rgba(0,0,0,.8); color: #000; height: 36px; - margin-left: -24px; width: 48px; } @@ -637,7 +636,7 @@ img { content: '\f452'; display: inline-block; font: normal 32px/1.125 Genericons; - position: absolute; + position: relative; top: 1px; left: 10px; } diff --git a/wp-content/themes/twentyfourteen/featured-content.php b/wp-content/themes/twentyfourteen/featured-content.php index c56edf3e24b1325441c8ae34958665c977663bc3..f9f32dd33b23049673cad426f385610c6f913207 100644 --- a/wp-content/themes/twentyfourteen/featured-content.php +++ b/wp-content/themes/twentyfourteen/featured-content.php @@ -19,11 +19,11 @@ do_action( 'twentyfourteen_featured_posts_before' ); $featured_posts = twentyfourteen_get_featured_posts(); - foreach ( (array) $featured_posts as $order => $post ) : - setup_postdata( $post ); + foreach ( (array) $featured_posts as $order => $post ) : + setup_postdata( $post ); - // Include the featured content template. - get_template_part( 'content', 'featured-post' ); + // Include the featured content template. + get_template_part( 'content', 'featured-post' ); endforeach; /** diff --git a/wp-content/themes/twentyfourteen/footer.php b/wp-content/themes/twentyfourteen/footer.php index 066fa38536bb82a4105c2febcefbecb2c4ded9ad..d1016eb96a4d96dc0d3f704cc3e0f476c69fb4bd 100644 --- a/wp-content/themes/twentyfourteen/footer.php +++ b/wp-content/themes/twentyfourteen/footer.php @@ -32,4 +32,4 @@ <?php wp_footer(); ?> </body> -</html> \ No newline at end of file +</html> diff --git a/wp-content/themes/twentyfourteen/functions.php b/wp-content/themes/twentyfourteen/functions.php index 3babfeb157d99ce0abc2316fb131a49fd3d9b063..ea32f14e4f9b52758908f26a29cb3da2e3fa69a8 100644 --- a/wp-content/themes/twentyfourteen/functions.php +++ b/wp-content/themes/twentyfourteen/functions.php @@ -44,122 +44,152 @@ if ( version_compare( $GLOBALS['wp_version'], '3.6', '<' ) ) { } if ( ! function_exists( 'twentyfourteen_setup' ) ) : -/** - * Twenty Fourteen setup. - * - * Set up theme defaults and registers support for various WordPress features. - * - * Note that this function is hooked into the after_setup_theme hook, which - * runs before the init hook. The init hook is too late for some features, such - * as indicating support post thumbnails. - * - * @since Twenty Fourteen 1.0 - */ -function twentyfourteen_setup() { - - /* - * Make Twenty Fourteen available for translation. + /** + * Twenty Fourteen setup. * - * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfourteen - * If you're building a theme based on Twenty Fourteen, use a find and - * replace to change 'twentyfourteen' to the name of your theme in all - * template files. + * Set up theme defaults and registers support for various WordPress features. + * + * Note that this function is hooked into the after_setup_theme hook, which + * runs before the init hook. The init hook is too late for some features, such + * as indicating support post thumbnails. + * + * @since Twenty Fourteen 1.0 */ - load_theme_textdomain( 'twentyfourteen' ); + function twentyfourteen_setup() { + + /* + * Make Twenty Fourteen available for translation. + * + * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfourteen + * If you're building a theme based on Twenty Fourteen, use a find and + * replace to change 'twentyfourteen' to the name of your theme in all + * template files. + */ + load_theme_textdomain( 'twentyfourteen' ); + + // This theme styles the visual editor to resemble the theme style. + add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) ); + + // Load regular editor styles into the new block-based editor. + add_theme_support( 'editor-styles' ); + + // Load default block styles. + add_theme_support( 'wp-block-styles' ); + + // Add support for responsive embeds. + add_theme_support( 'responsive-embeds' ); + + // Add support for custom color scheme. + add_theme_support( + 'editor-color-palette', + array( + array( + 'name' => __( 'Green', 'twentyfourteen' ), + 'slug' => 'green', + 'color' => '#24890d', + ), + array( + 'name' => __( 'Black', 'twentyfourteen' ), + 'slug' => 'black', + 'color' => '#000', + ), + array( + 'name' => __( 'Dark Gray', 'twentyfourteen' ), + 'slug' => 'dark-gray', + 'color' => '#2b2b2b', + ), + array( + 'name' => __( 'Medium Gray', 'twentyfourteen' ), + 'slug' => 'medium-gray', + 'color' => '#767676', + ), + array( + 'name' => __( 'Light Gray', 'twentyfourteen' ), + 'slug' => 'light-gray', + 'color' => '#f5f5f5', + ), + array( + 'name' => __( 'White', 'twentyfourteen' ), + 'slug' => 'white', + 'color' => '#fff', + ), + ) + ); - // This theme styles the visual editor to resemble the theme style. - add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) ); + // Add RSS feed links to <head> for posts and comments. + add_theme_support( 'automatic-feed-links' ); - // Load regular editor styles into the new block-based editor. - add_theme_support( 'editor-styles' ); + // Enable support for Post Thumbnails, and declare two sizes. + add_theme_support( 'post-thumbnails' ); + set_post_thumbnail_size( 672, 372, true ); + add_image_size( 'twentyfourteen-full-width', 1038, 576, true ); - // Load default block styles. - add_theme_support( 'wp-block-styles' ); + // This theme uses wp_nav_menu() in two locations. + register_nav_menus( + array( + 'primary' => __( 'Top primary menu', 'twentyfourteen' ), + 'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ), + ) + ); - // Add support for responsive embeds. - add_theme_support( 'responsive-embeds' ); + /* + * Switch default core markup for search form, comment form, and comments + * to output valid HTML5. + */ + add_theme_support( + 'html5', + array( + 'search-form', + 'comment-form', + 'comment-list', + 'gallery', + 'caption', + ) + ); - // Add support for custom color scheme. - add_theme_support( 'editor-color-palette', array( - array( - 'name' => __( 'Green', 'twentyfourteen' ), - 'slug' => 'green', - 'color' => '#24890d', - ), - array( - 'name' => __( 'Black', 'twentyfourteen' ), - 'slug' => 'black', - 'color' => '#000', - ), - array( - 'name' => __( 'Dark Gray', 'twentyfourteen' ), - 'slug' => 'dark-gray', - 'color' => '#2b2b2b', - ), - array( - 'name' => __( 'Medium Gray', 'twentyfourteen' ), - 'slug' => 'medium-gray', - 'color' => '#767676', - ), - array( - 'name' => __( 'Light Gray', 'twentyfourteen' ), - 'slug' => 'light-gray', - 'color' => '#f5f5f5', - ), - array( - 'name' => __( 'White', 'twentyfourteen' ), - 'slug' => 'white', - 'color' => '#fff', - ), - ) ); - - // Add RSS feed links to <head> for posts and comments. - add_theme_support( 'automatic-feed-links' ); - - // Enable support for Post Thumbnails, and declare two sizes. - add_theme_support( 'post-thumbnails' ); - set_post_thumbnail_size( 672, 372, true ); - add_image_size( 'twentyfourteen-full-width', 1038, 576, true ); - - // This theme uses wp_nav_menu() in two locations. - register_nav_menus( array( - 'primary' => __( 'Top primary menu', 'twentyfourteen' ), - 'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ), - ) ); + /* + * Enable support for Post Formats. + * See https://codex.wordpress.org/Post_Formats + */ + add_theme_support( + 'post-formats', + array( + 'aside', + 'image', + 'video', + 'audio', + 'quote', + 'link', + 'gallery', + ) + ); - /* - * Switch default core markup for search form, comment form, and comments - * to output valid HTML5. - */ - add_theme_support( 'html5', array( - 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' - ) ); + // This theme allows users to set a custom background. + add_theme_support( + 'custom-background', + apply_filters( + 'twentyfourteen_custom_background_args', + array( + 'default-color' => 'f5f5f5', + ) + ) + ); - /* - * Enable support for Post Formats. - * See https://codex.wordpress.org/Post_Formats - */ - add_theme_support( 'post-formats', array( - 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery', - ) ); - - // This theme allows users to set a custom background. - add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array( - 'default-color' => 'f5f5f5', - ) ) ); - - // Add support for featured content. - add_theme_support( 'featured-content', array( - 'featured_content_filter' => 'twentyfourteen_get_featured_posts', - 'max_posts' => 6, - ) ); - - // This theme uses its own gallery styles. - add_filter( 'use_default_gallery_style', '__return_false' ); - - // Indicate widget sidebars can use selective refresh in the Customizer. - add_theme_support( 'customize-selective-refresh-widgets' ); -} + // Add support for featured content. + add_theme_support( + 'featured-content', + array( + 'featured_content_filter' => 'twentyfourteen_get_featured_posts', + 'max_posts' => 6, + ) + ); + + // This theme uses its own gallery styles. + add_filter( 'use_default_gallery_style', '__return_false' ); + + // Indicate widget sidebars can use selective refresh in the Customizer. + add_theme_support( 'customize-selective-refresh-widgets' ); + } endif; // twentyfourteen_setup add_action( 'after_setup_theme', 'twentyfourteen_setup' ); @@ -213,33 +243,39 @@ function twentyfourteen_widgets_init() { require get_template_directory() . '/inc/widgets.php'; register_widget( 'Twenty_Fourteen_Ephemera_Widget' ); - register_sidebar( array( - 'name' => __( 'Primary Sidebar', 'twentyfourteen' ), - 'id' => 'sidebar-1', - 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ), - 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => '</aside>', - 'before_title' => '<h1 class="widget-title">', - 'after_title' => '</h1>', - ) ); - register_sidebar( array( - 'name' => __( 'Content Sidebar', 'twentyfourteen' ), - 'id' => 'sidebar-2', - 'description' => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ), - 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => '</aside>', - 'before_title' => '<h1 class="widget-title">', - 'after_title' => '</h1>', - ) ); - register_sidebar( array( - 'name' => __( 'Footer Widget Area', 'twentyfourteen' ), - 'id' => 'sidebar-3', - 'description' => __( 'Appears in the footer section of the site.', 'twentyfourteen' ), - 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => '</aside>', - 'before_title' => '<h1 class="widget-title">', - 'after_title' => '</h1>', - ) ); + register_sidebar( + array( + 'name' => __( 'Primary Sidebar', 'twentyfourteen' ), + 'id' => 'sidebar-1', + 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ), + 'before_widget' => '<aside id="%1$s" class="widget %2$s">', + 'after_widget' => '</aside>', + 'before_title' => '<h1 class="widget-title">', + 'after_title' => '</h1>', + ) + ); + register_sidebar( + array( + 'name' => __( 'Content Sidebar', 'twentyfourteen' ), + 'id' => 'sidebar-2', + 'description' => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ), + 'before_widget' => '<aside id="%1$s" class="widget %2$s">', + 'after_widget' => '</aside>', + 'before_title' => '<h1 class="widget-title">', + 'after_title' => '</h1>', + ) + ); + register_sidebar( + array( + 'name' => __( 'Footer Widget Area', 'twentyfourteen' ), + 'id' => 'sidebar-3', + 'description' => __( 'Appears in the footer section of the site.', 'twentyfourteen' ), + 'before_widget' => '<aside id="%1$s" class="widget %2$s">', + 'after_widget' => '</aside>', + 'before_title' => '<h1 class="widget-title">', + 'after_title' => '</h1>', + ) + ); } add_action( 'widgets_init', 'twentyfourteen_widgets_init' ); @@ -261,7 +297,7 @@ function twentyfourteen_font_url() { 'family' => urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), 'subset' => urlencode( 'latin,latin-ext' ), ); - $font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); + $font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return $font_url; @@ -283,7 +319,7 @@ function twentyfourteen_scripts() { wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri() ); // Theme block stylesheet. - wp_enqueue_style( 'twentyfourteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfourteen-style' ), '20181018' ); + wp_enqueue_style( 'twentyfourteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfourteen-style' ), '20181230' ); // Load the Internet Explorer specific stylesheet. wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131205' ); @@ -303,10 +339,14 @@ function twentyfourteen_scripts() { if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) { wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131205', true ); - wp_localize_script( 'twentyfourteen-slider', 'featuredSliderDefaults', array( - 'prevText' => __( 'Previous', 'twentyfourteen' ), - 'nextText' => __( 'Next', 'twentyfourteen' ) - ) ); + wp_localize_script( + 'twentyfourteen-slider', + 'featuredSliderDefaults', + array( + 'prevText' => __( 'Previous', 'twentyfourteen' ), + 'nextText' => __( 'Next', 'twentyfourteen' ), + ) + ); } wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150315', true ); @@ -355,103 +395,106 @@ add_filter( 'wp_resource_hints', 'twentyfourteen_resource_hints', 10, 2 ); */ function twentyfourteen_block_editor_styles() { // Block styles. - wp_enqueue_style( 'twentyfourteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' ); + wp_enqueue_style( 'twentyfourteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20181230' ); // Add custom fonts. wp_enqueue_style( 'twentyfourteen-fonts', twentyfourteen_font_url(), array(), null ); } add_action( 'enqueue_block_editor_assets', 'twentyfourteen_block_editor_styles' ); if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) : -/** - * Print the attached image with a link to the next attached image. - * - * @since Twenty Fourteen 1.0 - */ -function twentyfourteen_the_attached_image() { - $post = get_post(); /** - * Filter the default Twenty Fourteen attachment size. + * Print the attached image with a link to the next attached image. * * @since Twenty Fourteen 1.0 - * - * @param array $dimensions { - * An array of height and width dimensions. - * - * @type int $height Height of the image in pixels. Default 810. - * @type int $width Width of the image in pixels. Default 810. - * } */ - $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 810, 810 ) ); - $next_attachment_url = wp_get_attachment_url(); + function twentyfourteen_the_attached_image() { + $post = get_post(); + /** + * Filter the default Twenty Fourteen attachment size. + * + * @since Twenty Fourteen 1.0 + * + * @param array $dimensions { + * An array of height and width dimensions. + * + * @type int $height Height of the image in pixels. Default 810. + * @type int $width Width of the image in pixels. Default 810. + * } + */ + $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 810, 810 ) ); + $next_attachment_url = wp_get_attachment_url(); + + /* + * 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, 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. + */ + $attachment_ids = get_posts( + array( + 'post_parent' => $post->post_parent, + 'fields' => 'ids', + 'numberposts' => -1, + 'post_status' => 'inherit', + 'post_type' => 'attachment', + 'post_mime_type' => 'image', + 'order' => 'ASC', + 'orderby' => 'menu_order ID', + ) + ); - /* - * 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, 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. - */ - $attachment_ids = get_posts( array( - 'post_parent' => $post->post_parent, - 'fields' => 'ids', - 'numberposts' => -1, - 'post_status' => 'inherit', - 'post_type' => 'attachment', - 'post_mime_type' => 'image', - 'order' => 'ASC', - 'orderby' => 'menu_order ID', - ) ); - - // If there is more than 1 attachment in a gallery... - if ( count( $attachment_ids ) > 1 ) { - foreach ( $attachment_ids as $idx => $attachment_id ) { - if ( $attachment_id == $post->ID ) { - $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ]; - break; + // If there is more than 1 attachment in a gallery... + if ( count( $attachment_ids ) > 1 ) { + foreach ( $attachment_ids as $idx => $attachment_id ) { + if ( $attachment_id == $post->ID ) { + $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ]; + break; + } } - } - // get the URL of the next image attachment... - if ( $next_id ) { - $next_attachment_url = get_attachment_link( $next_id ); + // get the URL of the next image attachment... + if ( $next_id ) { + $next_attachment_url = get_attachment_link( $next_id ); + } // or get the URL of the first image attachment. + else { + $next_attachment_url = get_attachment_link( reset( $attachment_ids ) ); + } } - // or get the URL of the first image attachment. - else { - $next_attachment_url = get_attachment_link( reset( $attachment_ids ) ); - } + printf( + '<a href="%1$s" rel="attachment">%2$s</a>', + esc_url( $next_attachment_url ), + wp_get_attachment_image( $post->ID, $attachment_size ) + ); } - - printf( '<a href="%1$s" rel="attachment">%2$s</a>', - esc_url( $next_attachment_url ), - wp_get_attachment_image( $post->ID, $attachment_size ) - ); -} endif; if ( ! function_exists( 'twentyfourteen_list_authors' ) ) : -/** - * Print a list of all site contributors who published at least one post. - * - * @since Twenty Fourteen 1.0 - */ -function twentyfourteen_list_authors() { - $contributor_ids = get_users( array( - 'fields' => 'ID', - 'orderby' => 'post_count', - 'order' => 'DESC', - 'who' => 'authors', - ) ); - - foreach ( $contributor_ids as $contributor_id ) : - $post_count = count_user_posts( $contributor_id ); - - // Move on if user has not published a post (yet). - if ( ! $post_count ) { - continue; - } - ?> + /** + * Print a list of all site contributors who published at least one post. + * + * @since Twenty Fourteen 1.0 + */ + function twentyfourteen_list_authors() { + $contributor_ids = get_users( + array( + 'fields' => 'ID', + 'orderby' => 'post_count', + 'order' => 'DESC', + 'who' => 'authors', + ) + ); + + foreach ( $contributor_ids as $contributor_id ) : + $post_count = count_user_posts( $contributor_id ); + + // Move on if user has not published a post (yet). + if ( ! $post_count ) { + continue; + } + ?> - <div class="contributor"> + <div class="contributor"> <div class="contributor-info"> <div class="contributor-avatar"><?php echo get_avatar( $contributor_id, 132 ); ?></div> <div class="contributor-summary"> @@ -466,9 +509,9 @@ function twentyfourteen_list_authors() { </div><!-- .contributor-info --> </div><!-- .contributor --> - <?php + <?php endforeach; -} + } endif; /** @@ -633,9 +676,9 @@ if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow * `is_customize_preview` function was introduced. */ if ( ! function_exists( 'is_customize_preview' ) ) : -function is_customize_preview() { - global $wp_customize; + function is_customize_preview() { + global $wp_customize; - return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview(); -} + return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview(); + } endif; diff --git a/wp-content/themes/twentyfourteen/header.php b/wp-content/themes/twentyfourteen/header.php index 7286d8893810f763e6c0cac85eb7ba9f1e189d5c..3207e7357433f0fe6216f832d2bb68b75ace5502 100644 --- a/wp-content/themes/twentyfourteen/header.php +++ b/wp-content/themes/twentyfourteen/header.php @@ -51,7 +51,15 @@ <nav id="primary-navigation" class="site-navigation primary-navigation" role="navigation"> <button class="menu-toggle"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></button> <a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a> - <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu' ) ); ?> + <?php + wp_nav_menu( + array( + 'theme_location' => 'primary', + 'menu_class' => 'nav-menu', + 'menu_id' => 'primary-menu', + ) + ); + ?> </nav> </div> diff --git a/wp-content/themes/twentyfourteen/image.php b/wp-content/themes/twentyfourteen/image.php index 83ac67f68d4dabedd9b5ed5e9612a2065280df56..f0af8b83bdb166e64efee80127b3afb1ffcce04c 100644 --- a/wp-content/themes/twentyfourteen/image.php +++ b/wp-content/themes/twentyfourteen/image.php @@ -18,45 +18,48 @@ get_header(); <?php // Start the Loop. - while ( have_posts() ) : the_post(); - ?> - <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> - <header class="entry-header"> - <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> + while ( have_posts() ) : + the_post(); + ?> + <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> + <header class="entry-header"> + <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> - <div class="entry-meta"> + <div class="entry-meta"> - <span class="entry-date"><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time></span> + <span class="entry-date"><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time></span> - <span class="full-size-link"><a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"><?php echo esc_html( $metadata['width'] ); ?> × <?php echo esc_html( $metadata['height'] ); ?></a></span> + <span class="full-size-link"><a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"><?php echo esc_html( $metadata['width'] ); ?> × <?php echo esc_html( $metadata['height'] ); ?></a></span> - <span class="parent-post-link"><a href="<?php echo esc_url( get_permalink( $post->post_parent ) ); ?>" rel="gallery"><?php echo get_the_title( $post->post_parent ); ?></a></span> - <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> - </div><!-- .entry-meta --> - </header><!-- .entry-header --> + <span class="parent-post-link"><a href="<?php echo esc_url( get_permalink( $post->post_parent ) ); ?>" rel="gallery"><?php echo get_the_title( $post->post_parent ); ?></a></span> + <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> + </div><!-- .entry-meta --> + </header><!-- .entry-header --> - <div class="entry-content"> - <div class="entry-attachment"> - <div class="attachment"> - <?php twentyfourteen_the_attached_image(); ?> - </div><!-- .attachment --> + <div class="entry-content"> + <div class="entry-attachment"> + <div class="attachment"> + <?php twentyfourteen_the_attached_image(); ?> + </div><!-- .attachment --> - <?php if ( has_excerpt() ) : ?> + <?php if ( has_excerpt() ) : ?> <div class="entry-caption"> <?php the_excerpt(); ?> </div><!-- .entry-caption --> <?php endif; ?> - </div><!-- .entry-attachment --> + </div><!-- .entry-attachment --> - <?php - the_content(); - wp_link_pages( array( + <?php + the_content(); + wp_link_pages( + array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', - ) ); - ?> + ) + ); + ?> </div><!-- .entry-content --> </article><!-- #post-## --> diff --git a/wp-content/themes/twentyfourteen/inc/back-compat.php b/wp-content/themes/twentyfourteen/inc/back-compat.php index c184d912c7f21bc9fac0a400a957fa7d0f651265..0e8f34b5cdb99c97a8df43a523d70df9ab82f366 100644 --- a/wp-content/themes/twentyfourteen/inc/back-compat.php +++ b/wp-content/themes/twentyfourteen/inc/back-compat.php @@ -44,9 +44,13 @@ function twentyfourteen_upgrade_notice() { * @since Twenty Fourteen 1.0 */ function twentyfourteen_customize() { - wp_die( sprintf( __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), $GLOBALS['wp_version'] ), '', array( - 'back_link' => true, - ) ); + wp_die( + sprintf( __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), $GLOBALS['wp_version'] ), + '', + array( + 'back_link' => true, + ) + ); } add_action( 'load-customize.php', 'twentyfourteen_customize' ); diff --git a/wp-content/themes/twentyfourteen/inc/custom-header.php b/wp-content/themes/twentyfourteen/inc/custom-header.php index 287b10682d6296f7f9f69ecc46a987d687b18cb6..92382eaa5e9dd6573884d96291734baf0ce09b0a 100644 --- a/wp-content/themes/twentyfourteen/inc/custom-header.php +++ b/wp-content/themes/twentyfourteen/inc/custom-header.php @@ -35,69 +35,75 @@ function twentyfourteen_custom_header_setup() { * the Appearance > Header screen. * } */ - add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array( - 'default-text-color' => 'fff', - 'width' => 1260, - 'height' => 240, - 'flex-height' => true, - 'wp-head-callback' => 'twentyfourteen_header_style', - 'admin-head-callback' => 'twentyfourteen_admin_header_style', - 'admin-preview-callback' => 'twentyfourteen_admin_header_image', - ) ) ); + add_theme_support( + 'custom-header', + apply_filters( + 'twentyfourteen_custom_header_args', + array( + 'default-text-color' => 'fff', + 'width' => 1260, + 'height' => 240, + 'flex-height' => true, + 'wp-head-callback' => 'twentyfourteen_header_style', + 'admin-head-callback' => 'twentyfourteen_admin_header_style', + 'admin-preview-callback' => 'twentyfourteen_admin_header_image', + ) + ) + ); } add_action( 'after_setup_theme', 'twentyfourteen_custom_header_setup' ); if ( ! function_exists( 'twentyfourteen_header_style' ) ) : -/** - * Styles the header image and text displayed on the blog - * - * @see twentyfourteen_custom_header_setup(). - * - */ -function twentyfourteen_header_style() { - $text_color = get_header_textcolor(); + /** + * Styles the header image and text displayed on the blog + * + * @see twentyfourteen_custom_header_setup(). + */ + function twentyfourteen_header_style() { + $text_color = get_header_textcolor(); - // If no custom color for text is set, let's bail. - if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) ) - return; + // If no custom color for text is set, let's bail. + if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) ) { + return; + } - // If we get this far, we have custom styles. - ?> - <style type="text/css" id="twentyfourteen-header-css"> - <?php + // If we get this far, we have custom styles. + ?> + <style type="text/css" id="twentyfourteen-header-css"> + <?php // Has the text been hidden? if ( ! display_header_text() ) : - ?> + ?> .site-title, .site-description { clip: rect(1px 1px 1px 1px); /* IE7 */ clip: rect(1px, 1px, 1px, 1px); position: absolute; } - <?php - // If the user has set a custom color for the text, use that. + <?php + // If the user has set a custom color for the text, use that. elseif ( $text_color != get_theme_support( 'custom-header', 'default-text-color' ) ) : - ?> + ?> .site-title a { color: #<?php echo esc_attr( $text_color ); ?>; } <?php endif; ?> </style> - <?php -} + <?php + } endif; // twentyfourteen_header_style if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) : -/** - * Style the header image displayed on the Appearance > Header screen. - * - * @see twentyfourteen_custom_header_setup() - * - * @since Twenty Fourteen 1.0 - */ -function twentyfourteen_admin_header_style() { -?> + /** + * Style the header image displayed on the Appearance > Header screen. + * + * @see twentyfourteen_custom_header_setup() + * + * @since Twenty Fourteen 1.0 + */ + function twentyfourteen_admin_header_style() { + ?> <style type="text/css" id="twentyfourteen-admin-header-css"> .appearance_page_custom-header #headimg { background-color: #000; @@ -122,26 +128,26 @@ function twentyfourteen_admin_header_style() { vertical-align: middle; } </style> -<?php -} + <?php + } endif; // twentyfourteen_admin_header_style if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) : -/** - * Create the custom header image markup displayed on the Appearance > Header screen. - * - * @see twentyfourteen_custom_header_setup() - * - * @since Twenty Fourteen 1.0 - */ -function twentyfourteen_admin_header_image() { -?> + /** + * Create the custom header image markup displayed on the Appearance > Header screen. + * + * @see twentyfourteen_custom_header_setup() + * + * @since Twenty Fourteen 1.0 + */ + function twentyfourteen_admin_header_image() { + ?> <div id="headimg"> <?php if ( get_header_image() ) : ?> <img src="<?php header_image(); ?>" alt=""> <?php endif; ?> <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( sprintf( 'color: #%s;', get_header_textcolor() ) ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1> </div> -<?php -} + <?php + } endif; // twentyfourteen_admin_header_image diff --git a/wp-content/themes/twentyfourteen/inc/customizer.php b/wp-content/themes/twentyfourteen/inc/customizer.php index 39289159b5b41f90577896c03c098c06651d13c7..153140939ea092247df751bdb14d0851e45cfd00 100644 --- a/wp-content/themes/twentyfourteen/inc/customizer.php +++ b/wp-content/themes/twentyfourteen/inc/customizer.php @@ -16,21 +16,27 @@ */ function twentyfourteen_customize_register( $wp_customize ) { // Add postMessage support for site title and description. - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; - $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; if ( isset( $wp_customize->selective_refresh ) ) { - $wp_customize->selective_refresh->add_partial( 'blogname', array( - 'selector' => '.site-title a', - 'container_inclusive' => false, - 'render_callback' => 'twentyfourteen_customize_partial_blogname', - ) ); - $wp_customize->selective_refresh->add_partial( 'blogdescription', array( - 'selector' => '.site-description', - 'container_inclusive' => false, - 'render_callback' => 'twentyfourteen_customize_partial_blogdescription', - ) ); + $wp_customize->selective_refresh->add_partial( + 'blogname', + array( + 'selector' => '.site-title a', + 'container_inclusive' => false, + 'render_callback' => 'twentyfourteen_customize_partial_blogname', + ) + ); + $wp_customize->selective_refresh->add_partial( + 'blogdescription', + array( + 'selector' => '.site-description', + 'container_inclusive' => false, + 'render_callback' => 'twentyfourteen_customize_partial_blogdescription', + ) + ); } // Rename the label to "Site Title Color" because this only affects the site title in this theme. @@ -49,31 +55,41 @@ function twentyfourteen_customize_register( $wp_customize ) { } // Add the featured content section in case it's not already there. - $wp_customize->add_section( 'featured_content', array( - 'title' => __( 'Featured Content', 'twentyfourteen' ), - 'description' => sprintf( __( 'Use a <a href="%1$s">tag</a> to feature your posts. If no posts match the tag, <a href="%2$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ), - esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), - admin_url( 'edit.php?show_sticky=1' ) - ), - 'priority' => 130, - 'active_callback' => 'is_front_page', - ) ); + $wp_customize->add_section( + 'featured_content', + array( + 'title' => __( 'Featured Content', 'twentyfourteen' ), + 'description' => sprintf( + __( 'Use a <a href="%1$s">tag</a> to feature your posts. If no posts match the tag, <a href="%2$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ), + esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), + admin_url( 'edit.php?show_sticky=1' ) + ), + 'priority' => 130, + 'active_callback' => 'is_front_page', + ) + ); // Add the featured content layout setting and control. - $wp_customize->add_setting( 'featured_content_layout', array( - 'default' => 'grid', - 'sanitize_callback' => 'twentyfourteen_sanitize_layout', - ) ); + $wp_customize->add_setting( + 'featured_content_layout', + array( + 'default' => 'grid', + 'sanitize_callback' => 'twentyfourteen_sanitize_layout', + ) + ); - $wp_customize->add_control( 'featured_content_layout', array( - 'label' => __( 'Layout', 'twentyfourteen' ), - 'section' => 'featured_content', - 'type' => 'select', - 'choices' => array( - 'grid' => __( 'Grid', 'twentyfourteen' ), - 'slider' => __( 'Slider', 'twentyfourteen' ), - ), - ) ); + $wp_customize->add_control( + 'featured_content_layout', + array( + 'label' => __( 'Layout', 'twentyfourteen' ), + 'section' => 'featured_content', + 'type' => 'select', + 'choices' => array( + 'grid' => __( 'Grid', 'twentyfourteen' ), + 'slider' => __( 'Slider', 'twentyfourteen' ), + ), + ) + ); } add_action( 'customize_register', 'twentyfourteen_customize_register' ); @@ -137,16 +153,18 @@ function twentyfourteen_contextual_help() { return; } - get_current_screen()->add_help_tab( array( - 'id' => 'twentyfourteen', - 'title' => __( 'Twenty Fourteen', 'twentyfourteen' ), - 'content' => - '<ul>' . - '<li>' . sprintf( __( 'The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled by a <a href="%1$s">tag</a>; you can change the tag and layout in <a href="%2$s">Appearance → Customize</a>. If no posts match the tag, <a href="%3$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ), esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), admin_url( 'customize.php' ), admin_url( 'edit.php?show_sticky=1' ) ) . '</li>' . - '<li>' . sprintf( __( 'Enhance your site design by using <a href="%s">Featured Images</a> for posts you’d like to stand out (also known as post thumbnails). This allows you to associate an image with your post without inserting it. Twenty Fourteen uses featured images for posts and pages—above the title—and in the Featured Content area on the home page.', 'twentyfourteen' ), 'https://codex.wordpress.org/Post_Thumbnails#Setting_a_Post_Thumbnail' ) . '</li>' . - '<li>' . sprintf( __( 'For an in-depth tutorial, and more tips and tricks, visit the <a href="%s">Twenty Fourteen documentation</a>.', 'twentyfourteen' ), 'https://codex.wordpress.org/Twenty_Fourteen' ) . '</li>' . - '</ul>', - ) ); + get_current_screen()->add_help_tab( + array( + 'id' => 'twentyfourteen', + 'title' => __( 'Twenty Fourteen', 'twentyfourteen' ), + 'content' => + '<ul>' . + '<li>' . sprintf( __( 'The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled by a <a href="%1$s">tag</a>; you can change the tag and layout in <a href="%2$s">Appearance → Customize</a>. If no posts match the tag, <a href="%3$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ), esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), admin_url( 'customize.php' ), admin_url( 'edit.php?show_sticky=1' ) ) . '</li>' . + '<li>' . sprintf( __( 'Enhance your site design by using <a href="%s">Featured Images</a> for posts you’d like to stand out (also known as post thumbnails). This allows you to associate an image with your post without inserting it. Twenty Fourteen uses featured images for posts and pages—above the title—and in the Featured Content area on the home page.', 'twentyfourteen' ), 'https://codex.wordpress.org/Post_Thumbnails#Setting_a_Post_Thumbnail' ) . '</li>' . + '<li>' . sprintf( __( 'For an in-depth tutorial, and more tips and tricks, visit the <a href="%s">Twenty Fourteen documentation</a>.', 'twentyfourteen' ), 'https://codex.wordpress.org/Twenty_Fourteen' ) . '</li>' . + '</ul>', + ) + ); } add_action( 'admin_head-themes.php', 'twentyfourteen_contextual_help' ); -add_action( 'admin_head-edit.php', 'twentyfourteen_contextual_help' ); +add_action( 'admin_head-edit.php', 'twentyfourteen_contextual_help' ); diff --git a/wp-content/themes/twentyfourteen/inc/featured-content.php b/wp-content/themes/twentyfourteen/inc/featured-content.php index ffeb993db81ff4bc80403d9664712f6e55d2c24e..23fb38d71412c45516cfc0f92fb7d6bb6e75ce91 100644 --- a/wp-content/themes/twentyfourteen/inc/featured-content.php +++ b/wp-content/themes/twentyfourteen/inc/featured-content.php @@ -23,8 +23,6 @@ class Featured_Content { * * @since Twenty Fourteen 1.0 * - * @static - * @access public * @var int */ public static $max_posts = 15; @@ -34,8 +32,6 @@ class Featured_Content { * * All custom functionality will be hooked into the "init" action. * - * @static - * @access public * @since Twenty Fourteen 1.0 */ public static function setup() { @@ -51,8 +47,6 @@ class Featured_Content { * If no theme support is found there is no need to hook into WordPress. * We'll just return early instead. * - * @static - * @access public * @since Twenty Fourteen 1.0 */ public static function init() { @@ -83,15 +77,15 @@ class Featured_Content { self::$max_posts = absint( $theme_support[0]['max_posts'] ); } - add_filter( $filter, array( __CLASS__, 'get_featured_posts' ) ); - add_action( 'customize_register', array( __CLASS__, 'customize_register' ), 9 ); - add_action( 'admin_init', array( __CLASS__, 'register_setting' ) ); - add_action( 'switch_theme', array( __CLASS__, 'delete_transient' ) ); - add_action( 'save_post', array( __CLASS__, 'delete_transient' ) ); - add_action( 'delete_post_tag', array( __CLASS__, 'delete_post_tag' ) ); - add_action( 'customize_controls_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) ); - add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ) ); - add_action( 'wp_loaded', array( __CLASS__, 'wp_loaded' ) ); + add_filter( $filter, array( __CLASS__, 'get_featured_posts' ) ); + add_action( 'customize_register', array( __CLASS__, 'customize_register' ), 9 ); + add_action( 'admin_init', array( __CLASS__, 'register_setting' ) ); + add_action( 'switch_theme', array( __CLASS__, 'delete_transient' ) ); + add_action( 'save_post', array( __CLASS__, 'delete_transient' ) ); + add_action( 'delete_post_tag', array( __CLASS__, 'delete_post_tag' ) ); + add_action( 'customize_controls_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) ); + add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ) ); + add_action( 'wp_loaded', array( __CLASS__, 'wp_loaded' ) ); } /** @@ -100,13 +94,11 @@ class Featured_Content { * Has to run on wp_loaded so that the preview filters of the Customizer * have a chance to alter the value. * - * @static - * @access public * @since Twenty Fourteen 1.0 */ public static function wp_loaded() { if ( self::get_setting( 'hide-tag' ) ) { - add_filter( 'get_terms', array( __CLASS__, 'hide_featured_term' ), 10, 3 ); + add_filter( 'get_terms', array( __CLASS__, 'hide_featured_term' ), 10, 3 ); add_filter( 'get_the_terms', array( __CLASS__, 'hide_the_featured_term' ), 10, 3 ); } } @@ -114,8 +106,6 @@ class Featured_Content { /** * Get featured posts. * - * @static - * @access public * @since Twenty Fourteen 1.0 * * @return array Array of featured posts. @@ -128,10 +118,12 @@ class Featured_Content { return array(); } - $featured_posts = get_posts( array( - 'include' => $post_ids, - 'posts_per_page' => count( $post_ids ), - ) ); + $featured_posts = get_posts( + array( + 'include' => $post_ids, + 'posts_per_page' => count( $post_ids ), + ) + ); return $featured_posts; } @@ -144,8 +136,6 @@ class Featured_Content { * * Sets the "featured_content_ids" transient. * - * @static - * @access public * @since Twenty Fourteen 1.0 * * @return array Array of post IDs. @@ -160,18 +150,20 @@ class Featured_Content { if ( $term ) { // Query for featured posts. - $featured_ids = get_posts( array( - 'fields' => 'ids', - 'numberposts' => self::$max_posts, - 'suppress_filters' => false, - 'tax_query' => array( - array( - 'field' => 'term_id', - 'taxonomy' => 'post_tag', - 'terms' => $term->term_id, + $featured_ids = get_posts( + array( + 'fields' => 'ids', + 'numberposts' => self::$max_posts, + 'suppress_filters' => false, + 'tax_query' => array( + array( + 'field' => 'term_id', + 'taxonomy' => 'post_tag', + 'terms' => $term->term_id, + ), ), - ), - ) ); + ) + ); } // Get sticky posts if no Featured Content exists. @@ -189,8 +181,6 @@ class Featured_Content { /** * Return an array with IDs of posts maked as sticky. * - * @static - * @access public * @since Twenty Fourteen 1.0 * * @return array Array of sticky posts. @@ -206,8 +196,6 @@ class Featured_Content { * * @see Featured_Content::validate_settings(). * - * @static - * @access public * @since Twenty Fourteen 1.0 */ public static function delete_transient() { @@ -221,8 +209,6 @@ class Featured_Content { * Hooked onto the 'pre_get_posts' action, this changes the parameters of * the query before it gets any posts. * - * @static - * @access public * @since Twenty Fourteen 1.0 * * @param WP_Query $query WP_Query object. @@ -269,8 +255,6 @@ class Featured_Content { * * @see Featured_Content::validate_settings(). * - * @static - * @access public * @since Twenty Fourteen 1.0 * * @param int $tag_id The term_id of the tag that has been deleted. @@ -283,7 +267,7 @@ class Featured_Content { } $settings['tag-id'] = 0; - $settings = self::validate_settings( $settings ); + $settings = self::validate_settings( $settings ); update_option( 'featured-content', $settings ); } @@ -292,8 +276,6 @@ class Featured_Content { * * Hooks into the "get_terms" filter. * - * @static - * @access public * @since Twenty Fourteen 1.0 * * @param array $terms List of term objects. This is the return value of get_terms(). @@ -340,8 +322,6 @@ class Featured_Content { * * Hooks into the "get_the_terms" filter. * - * @static - * @access public * @since Twenty Fourteen 1.0 * * @param array $terms A list of term objects. This is the return value of get_the_terms(). @@ -381,8 +361,6 @@ class Featured_Content { /** * Register custom setting on the Settings -> Reading screen. * - * @static - * @access public * @since Twenty Fourteen 1.0 */ public static function register_setting() { @@ -392,54 +370,66 @@ class Featured_Content { /** * Add settings to the Customizer. * - * @static - * @access public * @since Twenty Fourteen 1.0 * * @param WP_Customize_Manager $wp_customize Customizer object. */ public static function customize_register( $wp_customize ) { - $wp_customize->add_section( 'featured_content', array( - 'title' => __( 'Featured Content', 'twentyfourteen' ), - 'description' => sprintf( __( 'Use a <a href="%1$s">tag</a> to feature your posts. If no posts match the tag, <a href="%2$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ), - esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), - admin_url( 'edit.php?show_sticky=1' ) - ), - 'priority' => 130, - 'theme_supports' => 'featured-content', - ) ); + $wp_customize->add_section( + 'featured_content', + array( + 'title' => __( 'Featured Content', 'twentyfourteen' ), + 'description' => sprintf( + __( 'Use a <a href="%1$s">tag</a> to feature your posts. If no posts match the tag, <a href="%2$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ), + esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), + admin_url( 'edit.php?show_sticky=1' ) + ), + 'priority' => 130, + 'theme_supports' => 'featured-content', + ) + ); // Add Featured Content settings. - $wp_customize->add_setting( 'featured-content[tag-name]', array( - 'default' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), - 'type' => 'option', - 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ), - ) ); - $wp_customize->add_setting( 'featured-content[hide-tag]', array( - 'default' => true, - 'type' => 'option', - 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ), - ) ); + $wp_customize->add_setting( + 'featured-content[tag-name]', + array( + 'default' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), + 'type' => 'option', + 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ), + ) + ); + $wp_customize->add_setting( + 'featured-content[hide-tag]', + array( + 'default' => true, + 'type' => 'option', + 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ), + ) + ); // Add Featured Content controls. - $wp_customize->add_control( 'featured-content[tag-name]', array( - 'label' => __( 'Tag Name', 'twentyfourteen' ), - 'section' => 'featured_content', - 'priority' => 20, - ) ); - $wp_customize->add_control( 'featured-content[hide-tag]', array( - 'label' => __( 'Don’t display tag on front end.', 'twentyfourteen' ), - 'section' => 'featured_content', - 'type' => 'checkbox', - 'priority' => 30, - ) ); + $wp_customize->add_control( + 'featured-content[tag-name]', + array( + 'label' => __( 'Tag Name', 'twentyfourteen' ), + 'section' => 'featured_content', + 'priority' => 20, + ) + ); + $wp_customize->add_control( + 'featured-content[hide-tag]', + array( + 'label' => __( 'Don’t display tag on front end.', 'twentyfourteen' ), + 'section' => 'featured_content', + 'type' => 'checkbox', + 'priority' => 30, + ) + ); } /** * Enqueue the tag suggestion script. * - * @static - * @access public * @since Twenty Fourteen 1.0 */ public static function enqueue_scripts() { @@ -458,8 +448,6 @@ class Featured_Content { * its name as the first parameter to the function and only that * value will be returned. * - * @static - * @access public * @since Twenty Fourteen 1.0 * * @param string $key The key of a recognized setting. @@ -491,8 +479,6 @@ class Featured_Content { * format before saving to the database. This function will also * delete the transient set in Featured_Content::get_featured_content(). * - * @static - * @access public * @since Twenty Fourteen 1.0 * * @param array $input Array of settings input. diff --git a/wp-content/themes/twentyfourteen/inc/template-tags.php b/wp-content/themes/twentyfourteen/inc/template-tags.php index 1d35d0d5b9bcb8b899eebdcb240fc74de5237613..cf5debfa4b970f8c85b6373f269c0eb56722e4b2 100644 --- a/wp-content/themes/twentyfourteen/inc/template-tags.php +++ b/wp-content/themes/twentyfourteen/inc/template-tags.php @@ -8,116 +8,119 @@ */ if ( ! function_exists( 'twentyfourteen_paging_nav' ) ) : -/** - * Display navigation to next/previous set of posts when applicable. - * - * @since Twenty Fourteen 1.0 - * - * @global WP_Query $wp_query WordPress Query object. - * @global WP_Rewrite $wp_rewrite WordPress Rewrite object. - */ -function twentyfourteen_paging_nav() { - global $wp_query, $wp_rewrite; - - // Don't print empty markup if there's only one page. - if ( $wp_query->max_num_pages < 2 ) { - return; - } - - $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; - $pagenum_link = html_entity_decode( get_pagenum_link() ); - $query_args = array(); - $url_parts = explode( '?', $pagenum_link ); - - if ( isset( $url_parts[1] ) ) { - wp_parse_str( $url_parts[1], $query_args ); - } + /** + * Display navigation to next/previous set of posts when applicable. + * + * @since Twenty Fourteen 1.0 + * + * @global WP_Query $wp_query WordPress Query object. + * @global WP_Rewrite $wp_rewrite WordPress Rewrite object. + */ + function twentyfourteen_paging_nav() { + global $wp_query, $wp_rewrite; + + // Don't print empty markup if there's only one page. + if ( $wp_query->max_num_pages < 2 ) { + return; + } - $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link ); - $pagenum_link = trailingslashit( $pagenum_link ) . '%_%'; + $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; + $pagenum_link = html_entity_decode( get_pagenum_link() ); + $query_args = array(); + $url_parts = explode( '?', $pagenum_link ); - $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : ''; - $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%'; + if ( isset( $url_parts[1] ) ) { + wp_parse_str( $url_parts[1], $query_args ); + } - // Set up paginated links. - $links = paginate_links( array( - 'base' => $pagenum_link, - 'format' => $format, - 'total' => $wp_query->max_num_pages, - 'current' => $paged, - 'mid_size' => 1, - 'add_args' => array_map( 'urlencode', $query_args ), - 'prev_text' => __( '← Previous', 'twentyfourteen' ), - 'next_text' => __( 'Next →', 'twentyfourteen' ), - ) ); + $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link ); + $pagenum_link = trailingslashit( $pagenum_link ) . '%_%'; + + $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : ''; + $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%'; + + // Set up paginated links. + $links = paginate_links( + array( + 'base' => $pagenum_link, + 'format' => $format, + 'total' => $wp_query->max_num_pages, + 'current' => $paged, + 'mid_size' => 1, + 'add_args' => array_map( 'urlencode', $query_args ), + 'prev_text' => __( '← Previous', 'twentyfourteen' ), + 'next_text' => __( 'Next →', 'twentyfourteen' ), + ) + ); - if ( $links ) : + if ( $links ) : - ?> - <nav class="navigation paging-navigation" role="navigation"> + ?> + <nav class="navigation paging-navigation" role="navigation"> <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentyfourteen' ); ?></h1> <div class="pagination loop-pagination"> <?php echo $links; ?> </div><!-- .pagination --> </nav><!-- .navigation --> - <?php + <?php endif; -} + } endif; if ( ! function_exists( 'twentyfourteen_post_nav' ) ) : -/** - * Display navigation to next/previous post when applicable. - * - * @since Twenty Fourteen 1.0 - */ -function twentyfourteen_post_nav() { - // Don't print empty markup if there's nowhere to navigate. - $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); - $next = get_adjacent_post( false, '', false ); - - if ( ! $next && ! $previous ) { - return; - } + /** + * Display navigation to next/previous post when applicable. + * + * @since Twenty Fourteen 1.0 + */ + function twentyfourteen_post_nav() { + // Don't print empty markup if there's nowhere to navigate. + $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); + $next = get_adjacent_post( false, '', false ); + + if ( ! $next && ! $previous ) { + return; + } - ?> - <nav class="navigation post-navigation" role="navigation"> + ?> + <nav class="navigation post-navigation" role="navigation"> <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1> <div class="nav-links"> <?php if ( is_attachment() ) : previous_post_link( '%link', __( '<span class="meta-nav">Published In</span>%title', 'twentyfourteen' ) ); - else : - previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) ); - next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) ); - endif; - ?> - </div><!-- .nav-links --> - </nav><!-- .navigation --> - <?php -} + else : + previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) ); + next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) ); + endif; + ?> + </div><!-- .nav-links --> + </nav><!-- .navigation --> + <?php + } endif; if ( ! function_exists( 'twentyfourteen_posted_on' ) ) : -/** - * Print HTML with meta information for the current post-date/time and author. - * - * @since Twenty Fourteen 1.0 - */ -function twentyfourteen_posted_on() { - if ( is_sticky() && is_home() && ! is_paged() ) { - echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>'; - } + /** + * Print HTML with meta information for the current post-date/time and author. + * + * @since Twenty Fourteen 1.0 + */ + function twentyfourteen_posted_on() { + if ( is_sticky() && is_home() && ! is_paged() ) { + echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>'; + } - // Set up and print post meta information. - 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>', - esc_url( get_permalink() ), - esc_attr( get_the_date( 'c' ) ), - esc_html( get_the_date() ), - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), - get_the_author() - ); -} + // Set up and print post meta information. + 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>', + esc_url( get_permalink() ), + esc_attr( get_the_date( 'c' ) ), + esc_html( get_the_date() ), + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), + get_the_author() + ); + } endif; /** @@ -130,9 +133,11 @@ endif; function twentyfourteen_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ) ) ) { // Create an array of all the categories that are attached to posts - $all_the_cool_cats = get_categories( array( - 'hide_empty' => 1, - ) ); + $all_the_cool_cats = get_categories( + array( + 'hide_empty' => 1, + ) + ); // Count the number of categories that are attached to the posts $all_the_cool_cats = count( $all_the_cool_cats ); @@ -159,69 +164,71 @@ function twentyfourteen_category_transient_flusher() { delete_transient( 'twentyfourteen_category_count' ); } add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' ); -add_action( 'save_post', 'twentyfourteen_category_transient_flusher' ); +add_action( 'save_post', 'twentyfourteen_category_transient_flusher' ); if ( ! function_exists( 'twentyfourteen_post_thumbnail' ) ) : -/** - * Display an optional post thumbnail. - * - * Wraps the post thumbnail in an anchor element on index - * views, or a div element when on single views. - * - * @since Twenty Fourteen 1.0 - * @since Twenty Fourteen 1.4 Was made 'pluggable', or overridable. - */ -function twentyfourteen_post_thumbnail() { - if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { - return; - } + /** + * Display an optional post thumbnail. + * + * Wraps the post thumbnail in an anchor element on index + * views, or a div element when on single views. + * + * @since Twenty Fourteen 1.0 + * @since Twenty Fourteen 1.4 Was made 'pluggable', or overridable. + */ + function twentyfourteen_post_thumbnail() { + if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { + return; + } - if ( is_singular() ) : - ?> + if ( is_singular() ) : + ?> - <div class="post-thumbnail"> - <?php - if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) { - the_post_thumbnail( 'twentyfourteen-full-width' ); - } else { - the_post_thumbnail(); - } - ?> - </div> + <div class="post-thumbnail"> + <?php + if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) { + the_post_thumbnail( 'twentyfourteen-full-width' ); + } else { + the_post_thumbnail(); + } + ?> + </div> - <?php else : ?> + <?php else : ?> <a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true"> <?php - if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) { - the_post_thumbnail( 'twentyfourteen-full-width' ); - } else { - the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) ); - } + if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) { + the_post_thumbnail( 'twentyfourteen-full-width' ); + } else { + the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) ); + } ?> </a> - <?php endif; // End is_singular() -} + <?php + endif; // End is_singular() + } endif; if ( ! function_exists( 'twentyfourteen_excerpt_more' ) && ! is_admin() ) : -/** - * Replaces "[...]" (appended to automatically generated excerpts) with ... - * and a Continue reading link. - * - * @since Twenty Fourteen 1.3 - * - * @param string $more Default Read More excerpt link. - * @return string Filtered Read More excerpt link. - */ -function twentyfourteen_excerpt_more( $more ) { - $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>', - esc_url( get_permalink( get_the_ID() ) ), + /** + * Replaces "[...]" (appended to automatically generated excerpts) with ... + * and a Continue reading link. + * + * @since Twenty Fourteen 1.3 + * + * @param string $more Default Read More excerpt link. + * @return string Filtered Read More excerpt link. + */ + function twentyfourteen_excerpt_more( $more ) { + $link = sprintf( + '<a href="%1$s" class="more-link">%2$s</a>', + esc_url( get_permalink( get_the_ID() ) ), /* translators: %s: Name of current post */ sprintf( __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' ) ); - return ' … ' . $link; -} -add_filter( 'excerpt_more', 'twentyfourteen_excerpt_more' ); + return ' … ' . $link; + } + add_filter( 'excerpt_more', 'twentyfourteen_excerpt_more' ); endif; diff --git a/wp-content/themes/twentyfourteen/inc/widgets.php b/wp-content/themes/twentyfourteen/inc/widgets.php index 533f34a5b7e6decbb35ad1aa36feb5badd13664e..7ddabec386a9bdc72dd8fe0dd4ab83b932ce2c99 100644 --- a/wp-content/themes/twentyfourteen/inc/widgets.php +++ b/wp-content/themes/twentyfourteen/inc/widgets.php @@ -16,7 +16,6 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget { /** * The supported post formats. * - * @access private * @since Twenty Fourteen 1.0 * * @var array @@ -31,11 +30,15 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget { * @return Twenty_Fourteen_Ephemera_Widget */ public function __construct() { - parent::__construct( 'widget_twentyfourteen_ephemera', __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ), array( - 'classname' => 'widget_twentyfourteen_ephemera', - 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen' ), - 'customize_selective_refresh' => true, - ) ); + parent::__construct( + 'widget_twentyfourteen_ephemera', + __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ), + array( + 'classname' => 'widget_twentyfourteen_ephemera', + 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen' ), + 'customize_selective_refresh' => true, + ) + ); if ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) { add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); @@ -62,7 +65,6 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget { /** * Output the HTML for this widget. * - * @access public * @since Twenty Fourteen 1.0 * * @param array $args An array of standard parameters for widgets in this theme. @@ -106,24 +108,26 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget { $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] ); $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? $format_string : $instance['title'], $instance, $this->id_base ); - $ephemera = new WP_Query( array( - 'order' => 'DESC', - 'posts_per_page' => $number, - 'no_found_rows' => true, - 'post_status' => 'publish', - 'post__not_in' => get_option( 'sticky_posts' ), - 'tax_query' => array( - array( - 'taxonomy' => 'post_format', - 'terms' => array( "post-format-$format" ), - 'field' => 'slug', - 'operator' => 'IN', + $ephemera = new WP_Query( + array( + 'order' => 'DESC', + 'posts_per_page' => $number, + 'no_found_rows' => true, + 'post_status' => 'publish', + 'post__not_in' => get_option( 'sticky_posts' ), + 'tax_query' => array( + array( + 'taxonomy' => 'post_format', + 'terms' => array( "post-format-$format" ), + 'field' => 'slug', + 'operator' => 'IN', + ), ), - ), - ) ); + ) + ); if ( $ephemera->have_posts() ) : - $tmp_content_width = $GLOBALS['content_width']; + $tmp_content_width = $GLOBALS['content_width']; $GLOBALS['content_width'] = 306; echo $args['before_widget']; @@ -134,84 +138,89 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget { <ol> <?php - while ( $ephemera->have_posts() ) : - $ephemera->the_post(); - $tmp_more = $GLOBALS['more']; - $GLOBALS['more'] = 0; - ?> + while ( $ephemera->have_posts() ) : + $ephemera->the_post(); + $tmp_more = $GLOBALS['more']; + $GLOBALS['more'] = 0; + ?> <li> <article <?php post_class(); ?>> - <div class="entry-content"> - <?php - if ( has_post_format( 'gallery' ) ) : - - if ( post_password_required() ) : - the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); - else : - $images = array(); - - $galleries = get_post_galleries( get_the_ID(), false ); - if ( isset( $galleries[0]['ids'] ) ) - $images = explode( ',', $galleries[0]['ids'] ); - - if ( ! $images ) : - $images = get_posts( array( - 'fields' => 'ids', - 'numberposts' => -1, - 'order' => 'ASC', - 'orderby' => 'menu_order', + <div class="entry-content"> + <?php + if ( has_post_format( 'gallery' ) ) : + + if ( post_password_required() ) : + the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); + else : + $images = array(); + + $galleries = get_post_galleries( get_the_ID(), false ); + if ( isset( $galleries[0]['ids'] ) ) { + $images = explode( ',', $galleries[0]['ids'] ); + } + + if ( ! $images ) : + $images = get_posts( + array( + 'fields' => 'ids', + 'numberposts' => -1, + 'order' => 'ASC', + 'orderby' => 'menu_order', 'post_mime_type' => 'image', - 'post_parent' => get_the_ID(), - 'post_type' => 'attachment', - ) ); - endif; + 'post_parent' => get_the_ID(), + 'post_type' => 'attachment', + ) + ); + endif; - $total_images = count( $images ); + $total_images = count( $images ); - if ( has_post_thumbnail() ) : - $post_thumbnail = get_the_post_thumbnail(); + if ( has_post_thumbnail() ) : + $post_thumbnail = get_the_post_thumbnail(); elseif ( $total_images > 0 ) : $image = reset( $images ); $post_thumbnail = wp_get_attachment_image( $image, 'post-thumbnail' ); endif; - if ( ! empty ( $post_thumbnail ) ) : - ?> + if ( ! empty( $post_thumbnail ) ) : + ?> <a href="<?php the_permalink(); ?>"><?php echo $post_thumbnail; ?></a> <?php endif; ?> <p class="wp-caption-text"> - <?php - 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' ), + <?php + 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' ), esc_url( get_permalink() ), number_format_i18n( $total_images ) ); - ?> + ?> </p> - <?php - endif; + <?php + endif; else : the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); endif; - ?> + ?> </div><!-- .entry-content --> <header class="entry-header"> <div class="entry-meta"> - <?php - if ( ! has_post_format( 'link' ) ) : - the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); - endif; + <?php + if ( ! has_post_format( 'link' ) ) : + the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); + endif; - 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>', - esc_url( get_permalink() ), - esc_attr( get_the_date( 'c' ) ), - esc_html( get_the_date() ), - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), - get_the_author() - ); + 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>', + esc_url( get_permalink() ), + esc_attr( get_the_date( 'c' ) ), + esc_html( get_the_date() ), + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), + get_the_author() + ); - if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : + if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> <?php endif; ?> diff --git a/wp-content/themes/twentyfourteen/index.php b/wp-content/themes/twentyfourteen/index.php index 3f46be21d1e8c47c841169efca1c94bf9b7c1d01..0c3d5e9b12361554cfe5d2aa97db296b7da361be 100644 --- a/wp-content/themes/twentyfourteen/index.php +++ b/wp-content/themes/twentyfourteen/index.php @@ -19,37 +19,38 @@ get_header(); ?> <div id="main-content" class="main-content"> <?php - if ( is_front_page() && twentyfourteen_has_featured_posts() ) { - // Include the featured content template. - get_template_part( 'featured-content' ); - } +if ( is_front_page() && twentyfourteen_has_featured_posts() ) { + // Include the featured content template. + get_template_part( 'featured-content' ); +} ?> <div id="primary" class="content-area"> <div id="content" class="site-content" role="main"> <?php - if ( have_posts() ) : - // Start the Loop. - while ( have_posts() ) : the_post(); - - /* - * Include the post format-specific template for the content. If you want to - * use this in a child theme, then include a file called content-___.php - * (where ___ is the post format) and that will be used instead. - */ - get_template_part( 'content', get_post_format() ); + if ( have_posts() ) : + // Start the Loop. + while ( have_posts() ) : + the_post(); + + /* + * Include the post format-specific template for the content. If you want to + * use this in a child theme, then include a file called content-___.php + * (where ___ is the post format) and that will be used instead. + */ + get_template_part( 'content', get_post_format() ); endwhile; - // Previous/next post navigation. - twentyfourteen_paging_nav(); + // Previous/next post navigation. + twentyfourteen_paging_nav(); else : // If no content, include the "No posts found" template. get_template_part( 'content', 'none' ); endif; - ?> + ?> </div><!-- #content --> </div><!-- #primary --> diff --git a/wp-content/themes/twentyfourteen/js/functions.js b/wp-content/themes/twentyfourteen/js/functions.js index a21849ec350d4ff6e2ed4edf30381a1a38f72c76..ac4629d77e887656f40c2b369a52a216bfa1936d 100644 --- a/wp-content/themes/twentyfourteen/js/functions.js +++ b/wp-content/themes/twentyfourteen/js/functions.js @@ -122,7 +122,8 @@ } ); /** - * @summary Add or remove ARIA attributes. + * Add or remove ARIA attributes. + * * Uses jQuery's width() function to determine the size of the window and add * the default ARIA attributes for the menu toggle if it's visible. * @since Twenty Fourteen 1.4 diff --git a/wp-content/themes/twentyfourteen/page-templates/contributors.php b/wp-content/themes/twentyfourteen/page-templates/contributors.php index 92602ab1cd24b65b63e2a36781da73b1efcd53f2..6b1d19dbff4ef46403ecd41790b1eed5f7fb97b1 100644 --- a/wp-content/themes/twentyfourteen/page-templates/contributors.php +++ b/wp-content/themes/twentyfourteen/page-templates/contributors.php @@ -12,35 +12,36 @@ get_header(); ?> <div id="main-content" class="main-content"> <?php - if ( is_front_page() && twentyfourteen_has_featured_posts() ) { - // Include the featured content template. - get_template_part( 'featured-content' ); - } +if ( is_front_page() && twentyfourteen_has_featured_posts() ) { + // Include the featured content template. + get_template_part( 'featured-content' ); +} ?> <div id="primary" class="content-area"> <div id="content" class="site-content" role="main"> <?php // Start the Loop. - while ( have_posts() ) : the_post(); - ?> + while ( have_posts() ) : + the_post(); + ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php - the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); + the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); - // Output the authors list. - twentyfourteen_list_authors(); + // Output the authors list. + twentyfourteen_list_authors(); - edit_post_link( __( 'Edit', 'twentyfourteen' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); + edit_post_link( __( 'Edit', 'twentyfourteen' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?> </article><!-- #post-## --> - <?php - // If comments are open or we have at least one comment, load up the comment template. - if ( comments_open() || get_comments_number() ) { - comments_template(); - } + <?php + // If comments are open or we have at least one comment, load up the comment template. + if ( comments_open() || get_comments_number() ) { + comments_template(); + } endwhile; ?> </div><!-- #content --> diff --git a/wp-content/themes/twentyfourteen/page-templates/full-width.php b/wp-content/themes/twentyfourteen/page-templates/full-width.php index 8830c870a5ca05f0d6f5c1aab90a24edd3cf9f39..ea5fa58873dc4b38fa1c6eb19b4315a075ac4010 100644 --- a/wp-content/themes/twentyfourteen/page-templates/full-width.php +++ b/wp-content/themes/twentyfourteen/page-templates/full-width.php @@ -12,25 +12,26 @@ get_header(); ?> <div id="main-content" class="main-content"> <?php - if ( is_front_page() && twentyfourteen_has_featured_posts() ) { - // Include the featured content template. - get_template_part( 'featured-content' ); - } +if ( is_front_page() && twentyfourteen_has_featured_posts() ) { + // Include the featured content template. + get_template_part( 'featured-content' ); +} ?> <div id="primary" class="content-area"> <div id="content" class="site-content" role="main"> <?php // Start the Loop. - while ( have_posts() ) : the_post(); + while ( have_posts() ) : + the_post(); - // Include the page content template. - get_template_part( 'content', 'page' ); + // Include the page content template. + get_template_part( 'content', 'page' ); - // If comments are open or we have at least one comment, load up the comment template. - if ( comments_open() || get_comments_number() ) { - comments_template(); - } + // If comments are open or we have at least one comment, load up the comment template. + if ( comments_open() || get_comments_number() ) { + comments_template(); + } endwhile; ?> </div><!-- #content --> diff --git a/wp-content/themes/twentyfourteen/page.php b/wp-content/themes/twentyfourteen/page.php index 44724e946675b46f2dbbd49e7bce12f2c272f111..bd033aeb48ef970b9a64a659214c8713184dcba7 100644 --- a/wp-content/themes/twentyfourteen/page.php +++ b/wp-content/themes/twentyfourteen/page.php @@ -16,25 +16,26 @@ get_header(); ?> <div id="main-content" class="main-content"> <?php - if ( is_front_page() && twentyfourteen_has_featured_posts() ) { - // Include the featured content template. - get_template_part( 'featured-content' ); - } +if ( is_front_page() && twentyfourteen_has_featured_posts() ) { + // Include the featured content template. + get_template_part( 'featured-content' ); +} ?> <div id="primary" class="content-area"> <div id="content" class="site-content" role="main"> <?php // Start the Loop. - while ( have_posts() ) : the_post(); + while ( have_posts() ) : + the_post(); - // Include the page content template. - get_template_part( 'content', 'page' ); + // Include the page content template. + get_template_part( 'content', 'page' ); - // If comments are open or we have at least one comment, load up the comment template. - if ( comments_open() || get_comments_number() ) { - comments_template(); - } + // If comments are open or we have at least one comment, load up the comment template. + if ( comments_open() || get_comments_number() ) { + comments_template(); + } endwhile; ?> diff --git a/wp-content/themes/twentyfourteen/readme.txt b/wp-content/themes/twentyfourteen/readme.txt index 69d4e65345098d7f0c200f6a4a28caf8643d8a6c..c122378a9e087430ede7ebe5f8d9ae778c1ff1b7 100644 --- a/wp-content/themes/twentyfourteen/readme.txt +++ b/wp-content/themes/twentyfourteen/readme.txt @@ -2,7 +2,7 @@ Contributors: the WordPress team Requires at least: WordPress 3.6 Tested up to: WordPress 5.0 -Stable tag: 2.4 +Stable tag: 2.5 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: blog, news, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready @@ -50,6 +50,11 @@ Source: http://www.genericons.com == Changelog == += 2.5 = +* Released: January 9, 2019 + +https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_2.5 + = 2.4 = * Released: December 19, 2018 diff --git a/wp-content/themes/twentyfourteen/search.php b/wp-content/themes/twentyfourteen/search.php index d90d88a14643a08f6e0f7aefc30f91415abb6a1f..6b20315aade574c7b4c3dc92961648c27d0a45ab 100644 --- a/wp-content/themes/twentyfourteen/search.php +++ b/wp-content/themes/twentyfourteen/search.php @@ -20,14 +20,15 @@ get_header(); ?> <?php // Start the Loop. - while ( have_posts() ) : the_post(); + while ( have_posts() ) : + the_post(); - /* - * Include the post format-specific template for the content. If you want to - * use this in a child theme, then include a file called content-___.php - * (where ___ is the post format) and that will be used instead. - */ - get_template_part( 'content', get_post_format() ); + /* + * Include the post format-specific template for the content. If you want to + * use this in a child theme, then include a file called content-___.php + * (where ___ is the post format) and that will be used instead. + */ + get_template_part( 'content', get_post_format() ); endwhile; // Previous/next post navigation. @@ -38,7 +39,7 @@ get_header(); ?> get_template_part( 'content', 'none' ); endif; - ?> + ?> </div><!-- #content --> </section><!-- #primary --> diff --git a/wp-content/themes/twentyfourteen/sidebar.php b/wp-content/themes/twentyfourteen/sidebar.php index be3c8e0280f12f10859398fbf922dfc91f974f14..60800ffeaca02aa76c50865ec85cfc7e31149890 100644 --- a/wp-content/themes/twentyfourteen/sidebar.php +++ b/wp-content/themes/twentyfourteen/sidebar.php @@ -10,8 +10,8 @@ <div id="secondary"> <?php $description = get_bloginfo( 'description', 'display' ); - if ( ! empty ( $description ) ) : - ?> + if ( ! empty( $description ) ) : + ?> <h2 class="site-description"><?php echo esc_html( $description ); ?></h2> <?php endif; ?> diff --git a/wp-content/themes/twentyfourteen/single.php b/wp-content/themes/twentyfourteen/single.php index e089165e58586e883a54629128fae552696288b6..1940c7329fd5d61b948b54283c5b8cfdec3ab7bc 100644 --- a/wp-content/themes/twentyfourteen/single.php +++ b/wp-content/themes/twentyfourteen/single.php @@ -13,22 +13,23 @@ get_header(); ?> <div id="content" class="site-content" role="main"> <?php // Start the Loop. - while ( have_posts() ) : the_post(); + while ( have_posts() ) : + the_post(); - /* - * Include the post format-specific template for the content. If you want to - * use this in a child theme, then include a file called content-___.php - * (where ___ is the post format) and that will be used instead. - */ - get_template_part( 'content', get_post_format() ); + /* + * Include the post format-specific template for the content. If you want to + * use this in a child theme, then include a file called content-___.php + * (where ___ is the post format) and that will be used instead. + */ + get_template_part( 'content', get_post_format() ); - // Previous/next post navigation. - twentyfourteen_post_nav(); + // Previous/next post navigation. + twentyfourteen_post_nav(); - // If comments are open or we have at least one comment, load up the comment template. - if ( comments_open() || get_comments_number() ) { - comments_template(); - } + // If comments are open or we have at least one comment, load up the comment template. + if ( comments_open() || get_comments_number() ) { + comments_template(); + } endwhile; ?> </div><!-- #content --> diff --git a/wp-content/themes/twentyfourteen/style.css b/wp-content/themes/twentyfourteen/style.css index 162d237500f6f05f332c8fa2df41d2cf9f1c9909..1fc323137591a111997c37e7f9654ec31cfca4fd 100644 --- a/wp-content/themes/twentyfourteen/style.css +++ b/wp-content/themes/twentyfourteen/style.css @@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyfourteen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: In 2014, our default theme lets you create a responsive magazine website with a sleek, modern design. Feature your favorite homepage content in either a grid or a slider. Use the three widget areas to customize your website, and change your content's layout with a full-width page template and a contributor page to show off your authors. Creating a magazine website with WordPress has never been easier. -Version: 2.4 +Version: 2.5 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: blog, news, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready @@ -1405,7 +1405,6 @@ a.post-thumbnail:hover { box-shadow: 1px 1px 1px rgba(0,0,0,.8); color: #000; height: 36px; - margin: -28px 0 0 -24px; /* Keep centered on video (container includes visible controls bar) */ width: 48px; } @@ -1415,7 +1414,7 @@ a.post-thumbnail:hover { content: '\f452'; display: inline-block; font: normal 32px/1.125 Genericons; - position: absolute; + position: relative; top: 1px; left: 10px; } diff --git a/wp-content/themes/twentyfourteen/tag.php b/wp-content/themes/twentyfourteen/tag.php index 5930d2cf27309896fd22fddc2aad5e93b0fb2647..2f1a54f8da8c9249277d00f988d41368bf248561 100644 --- a/wp-content/themes/twentyfourteen/tag.php +++ b/wp-content/themes/twentyfourteen/tag.php @@ -24,22 +24,23 @@ get_header(); ?> <?php // Show an optional term description. $term_description = term_description(); - if ( ! empty( $term_description ) ) : - printf( '<div class="taxonomy-description">%s</div>', $term_description ); + if ( ! empty( $term_description ) ) : + printf( '<div class="taxonomy-description">%s</div>', $term_description ); endif; ?> </header><!-- .archive-header --> - <?php + <?php // Start the Loop. - while ( have_posts() ) : the_post(); + while ( have_posts() ) : + the_post(); - /* - * Include the post format-specific template for the content. If you want to - * use this in a child theme, then include a file called content-___.php - * (where ___ is the post format) and that will be used instead. - */ - get_template_part( 'content', get_post_format() ); + /* + * Include the post format-specific template for the content. If you want to + * use this in a child theme, then include a file called content-___.php + * (where ___ is the post format) and that will be used instead. + */ + get_template_part( 'content', get_post_format() ); endwhile; // Previous/next page navigation. @@ -50,7 +51,7 @@ get_header(); ?> get_template_part( 'content', 'none' ); endif; - ?> + ?> </div><!-- #content --> </section><!-- #primary --> diff --git a/wp-content/themes/twentyfourteen/taxonomy-post_format.php b/wp-content/themes/twentyfourteen/taxonomy-post_format.php index f7cee9f7f68737fb6fb8c452970ffc29be4e69de..a6f60c5f5f680a17fb4a5bda945e1eb0f762c70a 100644 --- a/wp-content/themes/twentyfourteen/taxonomy-post_format.php +++ b/wp-content/themes/twentyfourteen/taxonomy-post_format.php @@ -26,8 +26,8 @@ get_header(); ?> <header class="archive-header"> <h1 class="archive-title"> <?php - if ( is_tax( 'post_format', 'post-format-aside' ) ) : - _e( 'Asides', 'twentyfourteen' ); + if ( is_tax( 'post_format', 'post-format-aside' ) ) : + _e( 'Asides', 'twentyfourteen' ); elseif ( is_tax( 'post_format', 'post-format-image' ) ) : _e( 'Images', 'twentyfourteen' ); @@ -51,20 +51,21 @@ get_header(); ?> _e( 'Archives', 'twentyfourteen' ); endif; - ?> + ?> </h1> </header><!-- .archive-header --> - <?php + <?php // Start the Loop. - while ( have_posts() ) : the_post(); + while ( have_posts() ) : + the_post(); - /* - * Include the post format-specific template for the content. If you want to - * use this in a child theme, then include a file called content-___.php - * (where ___ is the post format) and that will be used instead. - */ - get_template_part( 'content', get_post_format() ); + /* + * Include the post format-specific template for the content. If you want to + * use this in a child theme, then include a file called content-___.php + * (where ___ is the post format) and that will be used instead. + */ + get_template_part( 'content', get_post_format() ); endwhile; // Previous/next page navigation. @@ -75,7 +76,7 @@ get_header(); ?> get_template_part( 'content', 'none' ); endif; - ?> + ?> </div><!-- #content --> </section><!-- #primary -->