summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'themes/twentyfourteen')
-rw-r--r--themes/twentyfourteen/archive.php19
-rw-r--r--themes/twentyfourteen/author.php15
-rw-r--r--themes/twentyfourteen/category.php21
-rw-r--r--themes/twentyfourteen/comments.php46
-rw-r--r--themes/twentyfourteen/content-aside.php30
-rw-r--r--themes/twentyfourteen/content-audio.php30
-rw-r--r--themes/twentyfourteen/content-featured-post.php14
-rw-r--r--themes/twentyfourteen/content-gallery.php30
-rw-r--r--themes/twentyfourteen/content-image.php30
-rw-r--r--themes/twentyfourteen/content-link.php30
-rw-r--r--themes/twentyfourteen/content-page.php14
-rw-r--r--themes/twentyfourteen/content-quote.php30
-rw-r--r--themes/twentyfourteen/content-video.php30
-rw-r--r--themes/twentyfourteen/content.php35
-rw-r--r--themes/twentyfourteen/css/blocks.css396
-rw-r--r--themes/twentyfourteen/css/editor-blocks.css479
-rw-r--r--themes/twentyfourteen/featured-content.php8
-rw-r--r--themes/twentyfourteen/footer.php2
-rw-r--r--themes/twentyfourteen/functions.php448
-rw-r--r--themes/twentyfourteen/header.php10
-rw-r--r--themes/twentyfourteen/image.php49
-rw-r--r--themes/twentyfourteen/inc/back-compat.php8
-rw-r--r--themes/twentyfourteen/inc/custom-header.php96
-rw-r--r--themes/twentyfourteen/inc/customizer.php105
-rw-r--r--themes/twentyfourteen/inc/featured-content.php161
-rw-r--r--themes/twentyfourteen/inc/template-tags.php269
-rw-r--r--themes/twentyfourteen/inc/widgets.php151
-rw-r--r--themes/twentyfourteen/index.php33
-rw-r--r--themes/twentyfourteen/js/functions.js3
-rw-r--r--themes/twentyfourteen/page-templates/contributors.php31
-rw-r--r--themes/twentyfourteen/page-templates/full-width.php23
-rw-r--r--themes/twentyfourteen/page.php23
-rw-r--r--themes/twentyfourteen/readme.txt14
-rw-r--r--themes/twentyfourteen/search.php17
-rw-r--r--themes/twentyfourteen/sidebar.php2
-rw-r--r--themes/twentyfourteen/single.php27
-rw-r--r--themes/twentyfourteen/style.css2
-rw-r--r--themes/twentyfourteen/tag.php21
-rw-r--r--themes/twentyfourteen/taxonomy-post_format.php21
39 files changed, 1805 insertions, 968 deletions
diff --git a/themes/twentyfourteen/archive.php b/themes/twentyfourteen/archive.php
index e2b4b414..6a4deed0 100644
--- a/themes/twentyfourteen/archive.php
+++ b/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' ) ) );
@@ -46,15 +46,14 @@ 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 page navigation.
diff --git a/themes/twentyfourteen/author.php b/themes/twentyfourteen/author.php
index 90a5bc0b..a40f2090 100644
--- a/themes/twentyfourteen/author.php
+++ b/themes/twentyfourteen/author.php
@@ -45,15 +45,14 @@ 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.
diff --git a/themes/twentyfourteen/category.php b/themes/twentyfourteen/category.php
index 2264c1e3..97745ff1 100644
--- a/themes/twentyfourteen/category.php
+++ b/themes/twentyfourteen/category.php
@@ -22,23 +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
// 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() );
+ 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 page navigation.
diff --git a/themes/twentyfourteen/comments.php b/themes/twentyfourteen/comments.php
index a20dc1ec..d62e91a7 100644
--- a/themes/twentyfourteen/comments.php
+++ b/themes/twentyfourteen/comments.php
@@ -25,23 +25,23 @@ 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 &ldquo;%s&rdquo;', 'comments title', 'twentyfourteen' ), get_the_title() );
- } else {
- printf(
- /* translators: 1: number of comments, 2: post title */
- _nx(
- '%1$s thought on &ldquo;%2$s&rdquo;',
- '%1$s thoughts on &ldquo;%2$s&rdquo;',
- $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 &ldquo;%s&rdquo;', 'comments title', 'twentyfourteen' ), get_the_title() );
+ } else {
+ printf(
+ /* translators: 1: number of comments, 2: post title */
+ _nx(
+ '%1$s thought on &ldquo;%2$s&rdquo;',
+ '%1$s thoughts on &ldquo;%2$s&rdquo;',
+ $comments_number,
+ 'comments title',
+ 'twentyfourteen'
+ ),
+ number_format_i18n( $comments_number ),
+ get_the_title()
+ );
+ }
?>
</h2>
@@ -55,13 +55,11 @@ 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 -->
diff --git a/themes/twentyfourteen/content-aside.php b/themes/twentyfourteen/content-aside.php
index 554416df..0401579d 100644
--- a/themes/twentyfourteen/content-aside.php
+++ b/themes/twentyfourteen/content-aside.php
@@ -19,8 +19,8 @@
<?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;
@@ -44,21 +44,17 @@ if ( is_single() ) :
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content(
- sprintf(
- __( 'Continue reading %s <span class="meta-nav">&rarr;</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">&rarr;</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 -->
diff --git a/themes/twentyfourteen/content-audio.php b/themes/twentyfourteen/content-audio.php
index 8fc2095a..9fa9df41 100644
--- a/themes/twentyfourteen/content-audio.php
+++ b/themes/twentyfourteen/content-audio.php
@@ -19,8 +19,8 @@
<?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;
@@ -44,21 +44,17 @@ if ( is_single() ) :
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content(
- sprintf(
- __( 'Continue reading %s <span class="meta-nav">&rarr;</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">&rarr;</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 -->
diff --git a/themes/twentyfourteen/content-featured-post.php b/themes/twentyfourteen/content-featured-post.php
index d5a16fef..6cc88224 100644
--- a/themes/twentyfourteen/content-featured-post.php
+++ b/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/themes/twentyfourteen/content-gallery.php b/themes/twentyfourteen/content-gallery.php
index db382fef..6e3fe832 100644
--- a/themes/twentyfourteen/content-gallery.php
+++ b/themes/twentyfourteen/content-gallery.php
@@ -19,8 +19,8 @@
<?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;
@@ -44,21 +44,17 @@ if ( is_single() ) :
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content(
- sprintf(
- __( 'Continue reading %s <span class="meta-nav">&rarr;</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">&rarr;</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 -->
diff --git a/themes/twentyfourteen/content-image.php b/themes/twentyfourteen/content-image.php
index 11aa1e8f..a81e493d 100644
--- a/themes/twentyfourteen/content-image.php
+++ b/themes/twentyfourteen/content-image.php
@@ -19,8 +19,8 @@
<?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;
@@ -44,21 +44,17 @@ if ( is_single() ) :
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content(
- sprintf(
- __( 'Continue reading %s <span class="meta-nav">&rarr;</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">&rarr;</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 -->
diff --git a/themes/twentyfourteen/content-link.php b/themes/twentyfourteen/content-link.php
index 5c979863..858301ef 100644
--- a/themes/twentyfourteen/content-link.php
+++ b/themes/twentyfourteen/content-link.php
@@ -19,8 +19,8 @@
<?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;
@@ -44,21 +44,17 @@ if ( is_single() ) :
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content(
- sprintf(
- __( 'Continue reading %s <span class="meta-nav">&rarr;</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">&rarr;</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 -->
diff --git a/themes/twentyfourteen/content-page.php b/themes/twentyfourteen/content-page.php
index 6a33baa7..98394190 100644
--- a/themes/twentyfourteen/content-page.php
+++ b/themes/twentyfourteen/content-page.php
@@ -18,14 +18,12 @@
<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>' );
?>
diff --git a/themes/twentyfourteen/content-quote.php b/themes/twentyfourteen/content-quote.php
index fa0b8992..10a5d112 100644
--- a/themes/twentyfourteen/content-quote.php
+++ b/themes/twentyfourteen/content-quote.php
@@ -19,8 +19,8 @@
<?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;
@@ -44,21 +44,17 @@ if ( is_single() ) :
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content(
- sprintf(
- __( 'Continue reading %s <span class="meta-nav">&rarr;</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">&rarr;</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 -->
diff --git a/themes/twentyfourteen/content-video.php b/themes/twentyfourteen/content-video.php
index 951a13cf..4c49aaa1 100644
--- a/themes/twentyfourteen/content-video.php
+++ b/themes/twentyfourteen/content-video.php
@@ -19,8 +19,8 @@
<?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;
@@ -44,21 +44,17 @@ if ( is_single() ) :
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content(
- sprintf(
- __( 'Continue reading %s <span class="meta-nav">&rarr;</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">&rarr;</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 -->
diff --git a/themes/twentyfourteen/content.php b/themes/twentyfourteen/content.php
index 03eb3e89..e571d8b3 100644
--- a/themes/twentyfourteen/content.php
+++ b/themes/twentyfourteen/content.php
@@ -21,8 +21,8 @@
<?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;
@@ -30,11 +30,10 @@ if ( is_single() ) :
<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
@@ -53,21 +52,17 @@ if ( is_single() ) :
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content(
- sprintf(
- __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
- the_title( '<span class="screen-reader-text">', '</span>', false )
- )
- );
+ the_content( sprintf(
+ __( 'Continue reading %s <span class="meta-nav">&rarr;</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/themes/twentyfourteen/css/blocks.css b/themes/twentyfourteen/css/blocks.css
new file mode 100644
index 00000000..425c8dbc
--- /dev/null
+++ b/themes/twentyfourteen/css/blocks.css
@@ -0,0 +1,396 @@
+/*
+Theme Name: Twenty Fourteen
+Description: Used to style blocks.
+*/
+
+/*--------------------------------------------------------------
+>>> TABLE OF CONTENTS:
+----------------------------------------------------------------
+1.0 General Block Styles
+2.0 Blocks - Common Blocks
+3.0 Blocks - Formatting
+4.0 Blocks - Layout Elements
+5.0 Blocks - Widgets
+6.0 Blocks - Colors
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+1.0 General Block Styles
+--------------------------------------------------------------*/
+
+[class^="wp-block-"] figcaption,
+[class^="wp-block-"] figcaption.editor-rich-text__tinymce.mce-content-body {
+ font-size: 12px;
+ font-style: italic;
+ line-height: 1.5;
+ margin: 9px 0 0;
+}
+
+/* Alignments */
+
+[class^="wp-block-"].alignleft,
+[class^="wp-block-"] .alignleft {
+ margin-right: 24px;
+}
+
+[class^="wp-block-"].alignright,
+[class^="wp-block-"] .alignright {
+ margin-left: 24px;
+}
+
+/*--------------------------------------------------------------
+2.0 Blocks - Common Blocks
+--------------------------------------------------------------*/
+
+/* Paragraph */
+
+p.has-drop-cap:not(:focus)::first-letter {
+ font-size: 5em;
+}
+
+/* Image */
+
+.wp-block-image {
+ margin-bottom: 24px;
+}
+
+.wp-block-image figcaption {
+ text-align: left;
+}
+
+@media screen and (min-width: 810px) {
+ .full-width .site-content .wp-block-image figure.alignleft {
+ margin-left: -168px;
+ }
+
+ .full-width .site-content .wp-block-image figure.alignright {
+ margin-right: -168px;
+ }
+}
+
+.rtl .wp-block-image figcaption {
+ text-align: right;
+}
+
+/* Gallery */
+
+.wp-block-gallery {
+ margin: 0 0 24px;
+}
+
+.wp-block-gallery .blocks-gallery-image figcaption,
+.wp-block-gallery .blocks-gallery-item figcaption {
+ left: 0;
+ right: 0;
+ width: auto;
+}
+
+/* Quote */
+
+.wp-block-quote:not(.is-large):not(.is-style-large) {
+ border-left: 0;
+ border-right: 0;
+ padding-left: 0;
+ padding-right: 0;
+}
+
+.wp-block-quote.is-large,
+.wp-block-quote.is-style-large {
+ padding: 0;
+}
+
+.wp-block-quote cite {
+ color: #2b2b2b;
+ font-size: 16px;
+ font-weight: 400;
+}
+
+.wp-block-quote.alignleft cite,
+.wp-block-quote.alignright cite {
+ display: inline-block;
+ margin-bottom: 17px;
+ margin-top: 0;
+}
+
+.rtl .wp-block-quote.alignleft {
+ margin-right: 24px;
+}
+
+.rtl .wp-block-quote.alignright {
+ margin-left: 24px;
+}
+
+/* Audio */
+
+.wp-block-audio audio {
+ display: block;
+ width: 100%;
+}
+
+/* Cover */
+
+.wp-block-cover-image.aligncenter,
+.wp-block-cover.aligncenter {
+ display: flex;
+}
+
+/* File */
+
+.wp-block-file .wp-block-file__button {
+ background-color: #24890d;
+ border: 0;
+ border-radius: 2px;
+ color: #fff;
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 15px;
+ padding: 10px 30px 11px;
+ text-transform: uppercase;
+ vertical-align: bottom;
+}
+
+.wp-block-file .wp-block-file__button:hover,
+.wp-block-file .wp-block-file__button:focus {
+ background-color: #41a62a;
+}
+
+.wp-block-file .wp-block-file__button:active {
+ background-color: #55d737;
+}
+
+/*--------------------------------------------------------------
+3.0 Blocks - Formatting
+--------------------------------------------------------------*/
+
+/* Code */
+
+.wp-block-code {
+ border: 0;
+ padding: 0;
+}
+
+/* Pullquote */
+
+.wp-block-pullquote {
+ border: 0;
+ margin: 0;
+}
+
+.wp-block-pullquote cite {
+ color: #2b2b2b;
+ font-size: 16px;
+ font-weight: 400;
+ margin-top: 0;
+ text-transform: none;
+}
+
+.wp-block-pullquote.alignleft {
+ margin-right: 1em;
+}
+
+.wp-block-pullquote.alignright {
+ margin-right: 1em;
+}
+
+@media screen and (min-width: 810px) {
+ .full-width .site-content .wp-block-pullquote.alignleft {
+ margin-left: -168px;
+ }
+
+ .full-width .site-content .wp-block-pullquote.alignright {
+ margin-right: -168px;
+ }
+}
+
+/* Table */
+
+.wp-block-table {
+ overflow-x: visible;
+}
+
+.wp-block-table th,
+.wp-block-table td {
+ border-color: rgba(0, 0, 0, 0.1);
+ border-width: 0 1px 1px 0;
+}
+
+/*--------------------------------------------------------------
+4.0 Blocks - Layout Elements
+--------------------------------------------------------------*/
+
+/* 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-transform: uppercase;
+ vertical-align: bottom;
+}
+
+.wp-block-button__link {
+ background-color: #24890d;
+ color: #fff;
+}
+
+.wp-block-button__link:hover,
+.wp-block-button__link:focus {
+ background-color: #41a62a;
+ color: #fff;
+}
+
+.wp-block-button__link:active {
+ background-color: #55d737;
+}
+
+/* Separator */
+
+.wp-block-separator {
+ border: 0;
+ max-width: 100px;
+}
+
+.wp-block-separator.is-style-wide {
+ max-width: 100%;
+}
+
+/* Media & Text */
+
+.wp-block-media-text {
+ margin-bottom: 24px;
+}
+
+.wp-block-media-text *:last-child {
+ margin-bottom: 0;
+}
+
+/*--------------------------------------------------------------
+5.0 Blocks - Widgets
+--------------------------------------------------------------*/
+
+/* Archives, Categories & Latest Posts */
+
+.wp-block-archives.aligncenter,
+.wp-block-categories.aligncenter,
+.wp-block-latest-posts.aligncenter {
+ list-style-position: inside;
+ margin-left: 20px;
+ text-align: center;
+}
+
+.rtl .wp-block-archives.aligncenter,
+.rtl .wp-block-categories.aligncenter,
+.rtl .wp-block-latest-posts.aligncenter {
+ margin-left: 0;
+ margin-right: 20px;
+}
+
+/* Latest Comments */
+
+.wp-block-latest-comments {
+ margin: 0;
+ padding: 0;
+}
+
+.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,
+.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta {
+ margin-left: 60px;
+}
+
+.wp-block-latest-comments .avatar, .wp-block-latest-comments__comment-avatar {
+ border-radius: 0;
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ padding: 2px;
+}
+
+.wp-block-latest-comments__comment,
+.wp-block-latest-comments__comment-excerpt,
+.wp-block-latest-comments__comment-excerpt p {
+ font-size: 16px;
+}
+
+.wp-block-latest-comments__comment-meta a {
+ color: #2b2b2b;
+ font-weight: 900;
+ text-decoration: none;
+}
+
+.wp-block-latest-comments_comment-meta a:hover,
+.wp-block-latest-comments_comment-meta a:focus {
+ color: #41a62a;
+}
+
+.wp-block-latest-comments__comment-excerpt p:last-child {
+}
+
+.wp-block-latest-comments__comment-date {
+ text-transform: uppercase;
+}
+
+.wp-block-latest-comments .wp-block-latest-comments__comment {
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
+ margin-bottom: 24px;
+ padding-top: 24px;
+}
+
+/* Latest Posts */
+
+.wp-block-latest-posts.is-grid {
+ margin-left: 0;
+ margin-right: 0;
+}
+
+/*--------------------------------------------------------------
+6.0 Blocks - Colors
+--------------------------------------------------------------*/
+
+.has-green-color {
+ color: #24890d;
+}
+
+.has-green-background-color {
+ background-color: #24890d;
+}
+
+.has-black-color {
+ color: #000;
+}
+
+.has-black-background-color {
+ background-color: #000;
+}
+
+.has-dark-gray-color {
+ color: #2b2b2b;
+}
+
+.has-dark-gray-background-color {
+ background-color: #2b2b2b;
+}
+
+.has-medium-gray-color {
+ color: #767676;
+}
+
+.has-medium-gray-background-color {
+ background-color: #767676;
+}
+
+.has-light-gray-color {
+ color: #f5f5f5;
+}
+
+.has-light-gray-background-color {
+ background-color: #f5f5f5;
+}
+
+.has-white-color {
+ color: #fff;
+}
+
+.has-white-background-color {
+ background-color: #fff;
+}
diff --git a/themes/twentyfourteen/css/editor-blocks.css b/themes/twentyfourteen/css/editor-blocks.css
new file mode 100644
index 00000000..e8fba395
--- /dev/null
+++ b/themes/twentyfourteen/css/editor-blocks.css
@@ -0,0 +1,479 @@
+/*
+Theme Name: Twenty Fourteen
+Description: Used to style blocks in the editor.
+*/
+
+/*--------------------------------------------------------------
+>>> TABLE OF CONTENTS:
+----------------------------------------------------------------
+1.0 General Typography
+2.0 General Block Styles
+3.0 Blocks - Common Blocks
+4.0 Blocks - Formatting
+5.0 Blocks - Layout Elements
+6.0 Blocks - Widgets
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+1.0 General Typography
+--------------------------------------------------------------*/
+
+.edit-post-visual-editor .editor-block-list__block,
+.edit-post-visual-editor .editor-block-list__block p,
+.editor-default-block-appender textarea.editor-default-block-appender__content {
+ font-size: 16px;
+ line-height: 1.5;
+}
+
+.editor-default-block-appender textarea.editor-default-block-appender__content {
+ font-family: Lato, sans-serif;
+}
+
+.edit-post-visual-editor .editor-block-list__block {
+ color: #2b2b2b;
+}
+
+.editor-post-title__block .editor-post-title__input {
+ font-family: Lato, sans-serif;
+ font-size: 33px;
+ font-weight: 300;
+ line-height: 1.0909090909;
+ text-transform: uppercase;
+}
+
+/* Headers */
+
+.wp-block-freeform.block-library-rich-text__tinymce h1 {
+ font-size: 26px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h2 {
+ font-size: 24px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h3 {
+ font-size: 22px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h4 {
+ font-size: 20px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h5 {
+ font-size: 18px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h6 {
+ font-size: 16px;
+}
+
+/*--------------------------------------------------------------
+2.0 General Block Styles
+--------------------------------------------------------------*/
+
+/* Main column width */
+
+.wp-block {
+ max-width: 504px; /* 474px + 30px to account for padding */
+}
+
+/* Link styles */
+
+.edit-post-visual-editor a,
+.editor-block-list__block a,
+.wp-block-freeform.block-library-rich-text__tinymce a {
+ color: #24890d;
+}
+
+/* List styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce li {
+ line-height: 1.5;
+}
+
+.edit-post-visual-editor ul:not(.wp-block-gallery),
+.editor-block-list__block ul:not(.wp-block-gallery),
+.block-library-list ul,
+.edit-post-visual-editor ol,
+.editor-block-list__block ol,
+.block-library-list ol {
+ margin: 0 0 1.6em 1.3333em;
+ padding: 0;
+}
+
+.block-library-list .editor-rich-text__tinymce {
+ padding: 0;
+}
+
+.edit-post-visual-editor ul:not(.wp-block-gallery),
+.editor-block-list__block ul:not(.wp-block-gallery),
+.block-library-list ul {
+ list-style: disc;
+}
+
+.edit-post-visual-editor ol,
+.editor-block-list__block ol,
+.block-library-list ol {
+ list-style: decimal;
+}
+
+.edit-post-visual-editor ul:not(.wp-block-gallery) li > ul,
+.editor-block-list__block ul:not(.wp-block-gallery) li > ul,
+.block-library-list li > ul,
+.edit-post-visual-editor li > ol,
+.editor-block-list__block li > ol,
+.block-library-list li > ol {
+ margin-bottom: 0;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce li,
+.editor-block-list__block li {
+ margin-bottom: 0;
+}
+
+.rtl .edit-post-visual-editor ul:not(.wp-block-gallery),
+.rtl .editor-block-list__block ul:not(.wp-block-gallery),
+.rtl .block-library-list ul,
+.rtl .edit-post-visual-editor ol,
+.rtl .editor-block-list__block ol,
+.rtl .block-library-list ol {
+ margin-left: 0;
+ margin-right: 1.3333em;
+}
+
+/* Code */
+
+.wp-block-freeform.block-library-rich-text__tinymce code {
+ background: transparent;
+}
+
+
+/* Captions */
+
+[class^="wp-block-"] figcaption,
+[class^="wp-block-"] figcaption.editor-rich-text__tinymce.mce-content-body {
+ font-size: 12px;
+ font-style: italic;
+ line-height: 1.5;
+ margin: 9px 0 0;
+}
+
+/* Tables */
+
+.edit-post-visual-editor .editor-block-list__block table,
+.edit-post-visual-editor .editor-block-list__block table th,
+.edit-post-visual-editor .editor-block-list__block table td {
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ font-size: 14px;
+ line-height: 1.2857142857;
+}
+
+.edit-post-visual-editor .editor-block-list__block table {
+ border-collapse: separate;
+ border-spacing: 0;
+ border-width: 1px 0 0 1px;
+ margin-bottom: 24px;
+ width: 100%;
+}
+
+.edit-post-visual-editor .editor-block-list__block table th {
+ border-width: 0 1px 1px 0;
+ font-weight: 700;
+ text-align: left;
+ text-transform: uppercase;
+}
+
+.edit-post-visual-editor .editor-block-list__block table td {
+ border-width: 0 1px 1px 0;
+}
+
+.rtl .edit-post-visual-editor .editor-block-list__block table th {
+ text-align: right;
+}
+
+/* Quotes */
+
+.wp-block-freeform.block-library-rich-text__tinymce blockquote {
+ border-left: 0;
+ border-right: 0;
+ padding-left: 0;
+ padding-right: 0;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce blockquote p {
+ font-size: 19px;
+}
+
+/* Tables */
+
+.editor-block-list__block .wp-block-table th,
+.editor-block-list__block .wp-block-table td {
+ padding: 0;
+}
+
+/*--------------------------------------------------------------
+3.0 Blocks - Common Blocks
+--------------------------------------------------------------*/
+
+/* Paragraph */
+
+p.has-drop-cap:not(:focus)::first-letter {
+ font-size: 5em;
+}
+
+/* Image */
+
+.wp-block-image {
+ margin-bottom: 24px;
+ max-width: 800px;
+}
+
+.wp-block-image figcaption {
+ text-align: left;
+}
+
+@media screen and (min-width: 810px) {
+ [data-type="core/image"][data-align="left"] .editor-block-list__block-edit {
+ clear: left;
+ margin-left: -198px; /* 30px wider than front-end, to account for editor tool spacing */
+ }
+
+ [data-type="core/image"][data-align="right"] .editor-block-list__block-edit {
+ clear: right;
+ margin-right: -198px; /* 30px wider than front-end, to account for editor tool spacing */
+ }
+}
+
+.rtl .wp-block-image figcaption {
+ text-align: right;
+}
+
+/* Gallery */
+
+.editor-block-list__block .wp-block-gallery {
+ margin-left: 0;
+ margin-right: 0;
+}
+
+/* Quote */
+
+.editor-block-list__block .wp-block-quote p {
+ font-size: 19px;
+}
+
+.wp-block-quote:not(.is-large):not(.is-style-large) {
+ border-left: 0;
+ border-right: 0;
+ padding-left: 0;
+ padding-right: 0;
+}
+
+.wp-block-quote.is-large,
+.wp-block-quote.is-style-large {
+ padding: 0;
+}
+
+.wp-block-quote.is-large p,
+.wp-block-quote.is-style-large p {
+ font-size: 24px;
+ line-height: 1.6;
+}
+
+.wp-block-quote .wp-block-quote__citation {
+ color: #2b2b2b;
+ font-size: 16px;
+ font-weight: 400;
+ margin-top: 0;
+}
+
+.wp-block-quote.alignleft .wp-block-quote__citation,
+.wp-block-quote.alignright .wp-block-quote__citation {
+ display: inline-block;
+ margin-bottom: 17px;
+}
+
+@media screen and (min-width: 1200px) {
+ .editor-block-list__block .wp-block-quote.alignleft,
+ .editor-block-list__block .wp-block-quote.alignright {
+ width: -webkit-calc(50% + 130px);
+ width: calc(50% + 130px);
+ }
+
+ .editor-block-list__block .wp-block-quote.alignleft {
+ clear: left;
+ margin-left: -168px;
+ }
+
+ .editor-block-list__block .wp-block-quote.alignright {
+ clear: right;
+ margin-right: -168px;
+ }
+}
+
+/* Cover */
+
+.wp-block-cover-image.aligncenter,
+.wp-block-cover.aligncenter {
+ display: flex;
+}
+
+/* File */
+
+.wp-block-file .wp-block-file__textlink {
+ color: #24890d;
+ text-decoration: underline;
+}
+
+.wp-block-file .wp-block-file__button {
+ background-color: #24890d;
+ border: 0;
+ border-radius: 2px;
+ color: #fff;
+ font-size: 12px;
+ font-weight: 700;
+ line-height: normal;
+ padding: 10px 30px 11px;
+ text-transform: uppercase;
+ vertical-align: bottom;
+}
+
+.editor-block-list__block .wp-block-file .wp-block-file__button.mce-content-body {
+ line-height: normal;
+}
+
+/*--------------------------------------------------------------
+4.0 Blocks - Formatting
+--------------------------------------------------------------*/
+
+/* Code */
+
+.wp-block-code {
+ border: 0;
+ padding: 0;
+}
+
+/* Pullquote */
+
+.wp-block-pullquote {
+ border: 0;
+ margin: 0;
+}
+
+.wp-block-pullquote .wp-block-pullquote__citation {
+ color: #2b2b2b;
+ font-size: 16px;
+ font-weight: 400;
+ margin-top: 0;
+ text-transform: none;
+}
+
+.wp-block-pullquote.alignleft blockquote > .editor-rich-text p,
+.wp-block-pullquote.alignright blockquote > .editor-rich-text p {
+ font-size: 20px;
+}
+
+@media screen and (min-width: 810px) {
+ .editor-block-list__block .wp-block-pullquote.alignleft {
+ margin-left: -168px;
+ }
+
+ .editor-block-list__block .wp-block-pullquote.alignright {
+ margin-right: -168px;
+ }
+}
+
+/*--------------------------------------------------------------
+5.0 Blocks - Layout Elements
+--------------------------------------------------------------*/
+
+/* 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;
+ text-transform: uppercase;
+ vertical-align: bottom;
+}
+
+.editor-block-list__block .wp-block-button .mce-content-body {
+ line-height: normal;
+}
+
+/* Media & Text */
+
+.wp-block-media-text *:last-child {
+ margin-bottom: 0;
+}
+
+/*--------------------------------------------------------------
+6.0 Blocks - Widgets
+--------------------------------------------------------------*/
+
+/* Archives, Categories & Latest Posts */
+
+[data-align="center"] .wp-block-archives ul,
+[data-align="center"] .wp-block-categories ul,
+[data-align="center"] .wp-block-categories ul {
+ list-style-position: inside;
+}
+
+.wp-block-archives li a,
+.wp-block-categories__list li a,
+.wp-block-latest-posts li a {
+ text-decoration: underline;
+}
+
+/* Latest Comments */
+
+.editor-block-list__block ol.wp-block-latest-comments,
+.rtl .editor-block-list__block ol.wp-block-latest-comments {
+ margin: 0;
+ padding: 0;
+}
+
+.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,
+.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta {
+ margin-left: 60px;
+}
+
+.wp-block-latest-comments .avatar, .wp-block-latest-comments__comment-avatar {
+ border-radius: 0;
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ padding: 2px;
+}
+
+.wp-block-latest-comments__comment,
+.wp-block-latest-comments__comment-excerpt,
+.wp-block-latest-comments__comment-excerpt p {
+ font-size: 16px;
+}
+
+.editor-block-list__block .wp-block-latest-comments__comment-meta a,
+.editor-block-list__block .wp-block-latest-comments__comment-meta a:visited {
+ color: #2b2b2b;
+ font-weight: 900;
+ text-decoration: none;
+}
+
+.wp-block-latest-comments__comment-date {
+ text-transform: uppercase;
+}
+
+.wp-block-latest-comments .wp-block-latest-comments__comment {
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
+ margin-bottom: 24px;
+ padding-top: 24px;
+}
+
+/* Latest Posts */
+
+.edit-post-visual-editor .editor-block-list__block .wp-block-latest-posts.is-grid {
+ list-style: none;
+ margin-left: 0;
+ margin-right: 0;
+}
diff --git a/themes/twentyfourteen/featured-content.php b/themes/twentyfourteen/featured-content.php
index f9f32dd3..c56edf3e 100644
--- a/themes/twentyfourteen/featured-content.php
+++ b/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/themes/twentyfourteen/footer.php b/themes/twentyfourteen/footer.php
index d1016eb9..066fa385 100644
--- a/themes/twentyfourteen/footer.php
+++ b/themes/twentyfourteen/footer.php
@@ -32,4 +32,4 @@
<?php wp_footer(); ?>
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/themes/twentyfourteen/functions.php b/themes/twentyfourteen/functions.php
index 49deb790..3babfeb1 100644
--- a/themes/twentyfourteen/functions.php
+++ b/themes/twentyfourteen/functions.php
@@ -44,101 +44,122 @@ 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.
+/**
+ * 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.
*
- * @since Twenty Fourteen 1.0
+ * 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.
*/
- 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' ) );
-
- // 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' ),
- )
- );
+ load_theme_textdomain( 'twentyfourteen' );
- /*
- * 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 styles the visual editor to resemble the theme style.
+ add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) );
- /*
- * 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',
- )
- );
+ // Load regular editor styles into the new block-based editor.
+ add_theme_support( 'editor-styles' );
- // This theme allows users to set a custom background.
- add_theme_support(
- 'custom-background', apply_filters(
- 'twentyfourteen_custom_background_args', array(
- 'default-color' => 'f5f5f5',
- )
- )
- );
+ // Load default block styles.
+ add_theme_support( 'wp-block-styles' );
- // Add support for featured content.
- add_theme_support(
- 'featured-content', array(
- 'featured_content_filter' => 'twentyfourteen_get_featured_posts',
- 'max_posts' => 6,
- )
- );
+ // 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',
+ ),
+ ) );
+
+ // 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' ),
+ ) );
- // This theme uses its own gallery styles.
- add_filter( 'use_default_gallery_style', '__return_false' );
+ /*
+ * 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'
+ ) );
- // Indicate widget sidebars can use selective refresh in the Customizer.
- add_theme_support( 'customize-selective-refresh-widgets' );
- }
+ /*
+ * 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' );
+}
endif; // twentyfourteen_setup
add_action( 'after_setup_theme', 'twentyfourteen_setup' );
@@ -192,39 +213,33 @@ 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' );
@@ -246,7 +261,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;
@@ -267,6 +282,9 @@ function twentyfourteen_scripts() {
// Load our main stylesheet.
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' );
+
// Load the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131205' );
wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' );
@@ -285,12 +303,10 @@ 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 );
@@ -332,100 +348,110 @@ function twentyfourteen_resource_hints( $urls, $relation_type ) {
}
add_filter( 'wp_resource_hints', 'twentyfourteen_resource_hints', 10, 2 );
+/**
+ * Enqueue styles for the block-based editor.
+ *
+ * @since Twenty Fourteen 2.3
+ */
+function twentyfourteen_block_editor_styles() {
+ // Block styles.
+ wp_enqueue_style( 'twentyfourteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
+ // 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();
/**
- * Print the attached image with a link to the next attached image.
+ * 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.
+ * }
*/
- 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',
- )
- );
+ $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 810, 810 ) );
+ $next_attachment_url = wp_get_attachment_url();
- // 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;
- }
+ /*
+ * 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;
}
+ }
- // 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 ) );
- }
+ // get the URL of the next image attachment...
+ if ( $next_id ) {
+ $next_attachment_url = get_attachment_link( $next_id );
}
- printf(
- '<a href="%1$s" rel="attachment">%2$s</a>',
- esc_url( $next_attachment_url ),
- wp_get_attachment_image( $post->ID, $attachment_size )
- );
+ // 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 )
+ );
+}
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">
@@ -442,7 +468,7 @@ if ( ! function_exists( 'twentyfourteen_list_authors' ) ) :
<?php
endforeach;
- }
+}
endif;
/**
@@ -607,9 +633,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/themes/twentyfourteen/header.php b/themes/twentyfourteen/header.php
index 4dec164a..7286d889 100644
--- a/themes/twentyfourteen/header.php
+++ b/themes/twentyfourteen/header.php
@@ -51,15 +51,7 @@
<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/themes/twentyfourteen/image.php b/themes/twentyfourteen/image.php
index 999800fa..83ac67f6 100644
--- a/themes/twentyfourteen/image.php
+++ b/themes/twentyfourteen/image.php
@@ -18,48 +18,45 @@ get_header();
<?php
// Start the Loop.
- while ( have_posts() ) :
- the_post();
+ 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>' ); ?>
+ <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'] ); ?> &times; <?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'] ); ?> &times; <?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/themes/twentyfourteen/inc/back-compat.php b/themes/twentyfourteen/inc/back-compat.php
index 3943aeef..c184d912 100644
--- a/themes/twentyfourteen/inc/back-compat.php
+++ b/themes/twentyfourteen/inc/back-compat.php
@@ -44,11 +44,9 @@ 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/themes/twentyfourteen/inc/custom-header.php b/themes/twentyfourteen/inc/custom-header.php
index bfea8976..287b1068 100644
--- a/themes/twentyfourteen/inc/custom-header.php
+++ b/themes/twentyfourteen/inc/custom-header.php
@@ -35,40 +35,36 @@ 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() ) :
?>
@@ -88,20 +84,20 @@ if ( ! function_exists( 'twentyfourteen_header_style' ) ) :
<?php endif; ?>
</style>
<?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;
@@ -126,20 +122,20 @@ if ( ! function_exists( '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="">
@@ -147,5 +143,5 @@ if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :
<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
- }
+}
endif; // twentyfourteen_admin_header_image
diff --git a/themes/twentyfourteen/inc/customizer.php b/themes/twentyfourteen/inc/customizer.php
index 5a41f188..39289159 100644
--- a/themes/twentyfourteen/inc/customizer.php
+++ b/themes/twentyfourteen/inc/customizer.php
@@ -16,25 +16,21 @@
*/
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.
@@ -53,38 +49,31 @@ 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' );
@@ -148,18 +137,16 @@ 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 &rarr; 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&rsquo;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&mdash;above the title&mdash;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 &rarr; 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&rsquo;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&mdash;above the title&mdash;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/themes/twentyfourteen/inc/featured-content.php b/themes/twentyfourteen/inc/featured-content.php
index 808a8a74..ffeb993d 100644
--- a/themes/twentyfourteen/inc/featured-content.php
+++ b/themes/twentyfourteen/inc/featured-content.php
@@ -23,6 +23,8 @@ class Featured_Content {
*
* @since Twenty Fourteen 1.0
*
+ * @static
+ * @access public
* @var int
*/
public static $max_posts = 15;
@@ -32,6 +34,8 @@ 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() {
@@ -47,6 +51,8 @@ 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() {
@@ -77,15 +83,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' ) );
}
/**
@@ -94,11 +100,13 @@ 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 );
}
}
@@ -106,6 +114,8 @@ class Featured_Content {
/**
* Get featured posts.
*
+ * @static
+ * @access public
* @since Twenty Fourteen 1.0
*
* @return array Array of featured posts.
@@ -118,12 +128,10 @@ 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;
}
@@ -136,6 +144,8 @@ class Featured_Content {
*
* Sets the "featured_content_ids" transient.
*
+ * @static
+ * @access public
* @since Twenty Fourteen 1.0
*
* @return array Array of post IDs.
@@ -150,20 +160,18 @@ 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.
@@ -181,6 +189,8 @@ 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.
@@ -196,6 +206,8 @@ class Featured_Content {
*
* @see Featured_Content::validate_settings().
*
+ * @static
+ * @access public
* @since Twenty Fourteen 1.0
*/
public static function delete_transient() {
@@ -209,6 +221,8 @@ 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.
@@ -255,6 +269,8 @@ 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.
@@ -267,7 +283,7 @@ class Featured_Content {
}
$settings['tag-id'] = 0;
- $settings = self::validate_settings( $settings );
+ $settings = self::validate_settings( $settings );
update_option( 'featured-content', $settings );
}
@@ -276,6 +292,8 @@ 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().
@@ -322,6 +340,8 @@ 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().
@@ -361,6 +381,8 @@ class Featured_Content {
/**
* Register custom setting on the Settings -> Reading screen.
*
+ * @static
+ * @access public
* @since Twenty Fourteen 1.0
*/
public static function register_setting() {
@@ -370,61 +392,54 @@ 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&rsquo;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&rsquo;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() {
@@ -443,6 +458,8 @@ 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.
@@ -474,6 +491,8 @@ 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/themes/twentyfourteen/inc/template-tags.php b/themes/twentyfourteen/inc/template-tags.php
index 89393316..1d35d0d5 100644
--- a/themes/twentyfourteen/inc/template-tags.php
+++ b/themes/twentyfourteen/inc/template-tags.php
@@ -8,55 +8,53 @@
*/
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;
- }
+/**
+ * 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;
- $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 );
+ // Don't print empty markup if there's only one page.
+ if ( $wp_query->max_num_pages < 2 ) {
+ return;
+ }
- if ( isset( $url_parts[1] ) ) {
- wp_parse_str( $url_parts[1], $query_args );
- }
+ $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 );
- $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' => __( '&larr; Previous', 'twentyfourteen' ),
- 'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
- )
- );
+ if ( isset( $url_parts[1] ) ) {
+ wp_parse_str( $url_parts[1], $query_args );
+ }
+
+ $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=%#%';
- if ( $links ) :
+ // 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' => __( '&larr; Previous', 'twentyfourteen' ),
+ 'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
+ ) );
- ?>
- <nav class="navigation paging-navigation" role="navigation">
+ if ( $links ) :
+
+ ?>
+ <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; ?>
@@ -64,63 +62,62 @@ if ( ! function_exists( 'twentyfourteen_paging_nav' ) ) :
</nav><!-- .navigation -->
<?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>';
- }
-
- // 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()
- );
+/**
+ * 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()
+ );
+}
endif;
/**
@@ -133,11 +130,9 @@ 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 );
@@ -164,71 +159,69 @@ 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
+ <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>
- <?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">&rarr;</span>', 'twentyfourteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
);
- return ' &hellip; ' . $link;
- }
- add_filter( 'excerpt_more', 'twentyfourteen_excerpt_more' );
+ return ' &hellip; ' . $link;
+}
+add_filter( 'excerpt_more', 'twentyfourteen_excerpt_more' );
endif;
diff --git a/themes/twentyfourteen/inc/widgets.php b/themes/twentyfourteen/inc/widgets.php
index 64118b5e..533f34a5 100644
--- a/themes/twentyfourteen/inc/widgets.php
+++ b/themes/twentyfourteen/inc/widgets.php
@@ -16,6 +16,7 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
/**
* The supported post formats.
*
+ * @access private
* @since Twenty Fourteen 1.0
*
* @var array
@@ -30,13 +31,11 @@ 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' ) );
@@ -63,6 +62,7 @@ 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,26 +106,24 @@ 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'];
@@ -136,65 +134,61 @@ 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">&rarr;</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">&rarr;</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' ),
- esc_url( get_permalink() ),
- number_format_i18n( $total_images )
- );
- ?>
+ <?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;
+ endif;
else :
the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
@@ -204,21 +198,20 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
<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/themes/twentyfourteen/index.php b/themes/twentyfourteen/index.php
index 42064cfe..3f46be21 100644
--- a/themes/twentyfourteen/index.php
+++ b/themes/twentyfourteen/index.php
@@ -19,31 +19,30 @@ 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.
diff --git a/themes/twentyfourteen/js/functions.js b/themes/twentyfourteen/js/functions.js
index ac4629d7..a21849ec 100644
--- a/themes/twentyfourteen/js/functions.js
+++ b/themes/twentyfourteen/js/functions.js
@@ -122,8 +122,7 @@
} );
/**
- * Add or remove ARIA attributes.
- *
+ * @summary 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/themes/twentyfourteen/page-templates/contributors.php b/themes/twentyfourteen/page-templates/contributors.php
index b4103e8a..92602ab1 100644
--- a/themes/twentyfourteen/page-templates/contributors.php
+++ b/themes/twentyfourteen/page-templates/contributors.php
@@ -12,36 +12,35 @@ 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 -->' );
+ <?php
+ 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();
- }
+ // 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/themes/twentyfourteen/page-templates/full-width.php b/themes/twentyfourteen/page-templates/full-width.php
index ea5fa588..8830c870 100644
--- a/themes/twentyfourteen/page-templates/full-width.php
+++ b/themes/twentyfourteen/page-templates/full-width.php
@@ -12,26 +12,25 @@ 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/themes/twentyfourteen/page.php b/themes/twentyfourteen/page.php
index bd033aeb..44724e94 100644
--- a/themes/twentyfourteen/page.php
+++ b/themes/twentyfourteen/page.php
@@ -16,26 +16,25 @@ 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/themes/twentyfourteen/readme.txt b/themes/twentyfourteen/readme.txt
index 96b7a3a3..69d4e653 100644
--- a/themes/twentyfourteen/readme.txt
+++ b/themes/twentyfourteen/readme.txt
@@ -1,8 +1,8 @@
=== Twenty Fourteen ===
Contributors: the WordPress team
Requires at least: WordPress 3.6
-Tested up to: WordPress 5.0-trunk
-Stable tag: 2.2
+Tested up to: WordPress 5.0
+Stable tag: 2.4
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,16 @@ Source: http://www.genericons.com
== Changelog ==
+= 2.4 =
+* Released: December 19, 2018
+
+https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_2.4
+
+= 2.3 =
+* Released: December 6, 2018
+
+https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_2.3
+
= 2.2 =
* Released: May 17, 2018
diff --git a/themes/twentyfourteen/search.php b/themes/twentyfourteen/search.php
index 6945c40a..d90d88a1 100644
--- a/themes/twentyfourteen/search.php
+++ b/themes/twentyfourteen/search.php
@@ -20,15 +20,14 @@ get_header(); ?>
<?php
// 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() );
+ 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.
diff --git a/themes/twentyfourteen/sidebar.php b/themes/twentyfourteen/sidebar.php
index 6117b7f5..be3c8e02 100644
--- a/themes/twentyfourteen/sidebar.php
+++ b/themes/twentyfourteen/sidebar.php
@@ -10,7 +10,7 @@
<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/themes/twentyfourteen/single.php b/themes/twentyfourteen/single.php
index 1940c732..e089165e 100644
--- a/themes/twentyfourteen/single.php
+++ b/themes/twentyfourteen/single.php
@@ -13,23 +13,22 @@ 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/themes/twentyfourteen/style.css b/themes/twentyfourteen/style.css
index 46a86b4c..162d2375 100644
--- a/themes/twentyfourteen/style.css
+++ b/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.2
+Version: 2.4
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
diff --git a/themes/twentyfourteen/tag.php b/themes/twentyfourteen/tag.php
index 663fe5e9..5930d2cf 100644
--- a/themes/twentyfourteen/tag.php
+++ b/themes/twentyfourteen/tag.php
@@ -24,23 +24,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
// 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() );
+ 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 page navigation.
diff --git a/themes/twentyfourteen/taxonomy-post_format.php b/themes/twentyfourteen/taxonomy-post_format.php
index fa733505..f7cee9f7 100644
--- a/themes/twentyfourteen/taxonomy-post_format.php
+++ b/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' );
@@ -57,15 +57,14 @@ get_header(); ?>
<?php
// 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() );
+ 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 page navigation.