summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2018-06-08 10:05:32 -0400
committerAnthony G. Basile <blueness@gentoo.org>2018-06-08 10:05:32 -0400
commit302b760bd00e82d9f5a8cef4ba821c1759a6601b (patch)
treeb128712347390937b10066e55745bdac5dfb638c /themes/twentyfourteen
parentUpdate jetpack 6.0 (diff)
downloadblogs-gentoo-302b760bd00e82d9f5a8cef4ba821c1759a6601b.tar.gz
blogs-gentoo-302b760bd00e82d9f5a8cef4ba821c1759a6601b.tar.bz2
blogs-gentoo-302b760bd00e82d9f5a8cef4ba821c1759a6601b.zip
Update twentyfourteen 2.2
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/featured-content.php8
-rw-r--r--themes/twentyfourteen/footer.php11
-rw-r--r--themes/twentyfourteen/functions.php389
-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.txt9
-rw-r--r--themes/twentyfourteen/rtl.css13
-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.css16
-rw-r--r--themes/twentyfourteen/tag.php21
-rw-r--r--themes/twentyfourteen/taxonomy-post_format.php21
38 files changed, 1007 insertions, 863 deletions
diff --git a/themes/twentyfourteen/archive.php b/themes/twentyfourteen/archive.php
index 6a4deed0..e2b4b414 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,14 +46,15 @@ get_header(); ?>
<?php
// Start the Loop.
- while ( have_posts() ) : the_post();
+ while ( have_posts() ) :
+ the_post();
- /*
- * Include the post format-specific template for the content. If you want to
- * use this in a child theme, then include a file called content-___.php
- * (where ___ is the post format) and that will be used instead.
- */
- get_template_part( 'content', get_post_format() );
+ /*
+ * Include the post format-specific template for the content. If you want to
+ * use this in a child theme, then include a file called content-___.php
+ * (where ___ is the post format) and that will be used instead.
+ */
+ get_template_part( 'content', get_post_format() );
endwhile;
// Previous/next page navigation.
diff --git a/themes/twentyfourteen/author.php b/themes/twentyfourteen/author.php
index a40f2090..90a5bc0b 100644
--- a/themes/twentyfourteen/author.php
+++ b/themes/twentyfourteen/author.php
@@ -45,14 +45,15 @@ get_header(); ?>
rewind_posts();
// Start the Loop.
- while ( have_posts() ) : the_post();
+ while ( have_posts() ) :
+ the_post();
- /*
- * Include the post format-specific template for the content. If you want to
- * use this in a child theme, then include a file called content-___.php
- * (where ___ is the post format) and that will be used instead.
- */
- get_template_part( 'content', get_post_format() );
+ /*
+ * Include the post format-specific template for the content. If you want to
+ * use this in a child theme, then include a file called content-___.php
+ * (where ___ is the post format) and that will be used instead.
+ */
+ get_template_part( 'content', get_post_format() );
endwhile;
// Previous/next page navigation.
diff --git a/themes/twentyfourteen/category.php b/themes/twentyfourteen/category.php
index 97745ff1..2264c1e3 100644
--- a/themes/twentyfourteen/category.php
+++ b/themes/twentyfourteen/category.php
@@ -22,22 +22,23 @@ get_header(); ?>
<?php
// Show an optional term description.
$term_description = term_description();
- if ( ! empty( $term_description ) ) :
- printf( '<div class="taxonomy-description">%s</div>', $term_description );
+ if ( ! empty( $term_description ) ) :
+ printf( '<div class="taxonomy-description">%s</div>', $term_description );
endif;
?>
</header><!-- .archive-header -->
<?php
// 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 d62e91a7..a20dc1ec 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,11 +55,13 @@ 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 0401579d..554416df 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,17 +44,21 @@
<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 9fa9df41..8fc2095a 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,17 +44,21 @@
<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 6cc88224..d5a16fef 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 6e3fe832..db382fef 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,17 +44,21 @@
<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 a81e493d..11aa1e8f 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,17 +44,21 @@
<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 858301ef..5c979863 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,17 +44,21 @@
<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 98394190..6a33baa7 100644
--- a/themes/twentyfourteen/content-page.php
+++ b/themes/twentyfourteen/content-page.php
@@ -18,12 +18,14 @@
<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 10a5d112..fa0b8992 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,17 +44,21 @@
<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 4c49aaa1..951a13cf 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,17 +44,21 @@
<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 e571d8b3..03eb3e89 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,10 +30,11 @@
<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
@@ -52,17 +53,21 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content( sprintf(
- __( 'Continue reading %s <span class="meta-nav">&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/featured-content.php b/themes/twentyfourteen/featured-content.php
index c56edf3e..f9f32dd3 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 519e1288..d1016eb9 100644
--- a/themes/twentyfourteen/footer.php
+++ b/themes/twentyfourteen/footer.php
@@ -18,11 +18,18 @@
<div class="site-info">
<?php do_action( 'twentyfourteen_credits' ); ?>
- <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfourteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyfourteen' ), 'WordPress' ); ?></a>
+ <?php
+ if ( function_exists( 'the_privacy_policy_link' ) ) {
+ the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
+ }
+ ?>
+ <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfourteen' ) ); ?>" class="imprint">
+ <?php printf( __( 'Proudly powered by %s', 'twentyfourteen' ), 'WordPress' ); ?>
+ </a>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/themes/twentyfourteen/functions.php b/themes/twentyfourteen/functions.php
index 2946d19d..49deb790 100644
--- a/themes/twentyfourteen/functions.php
+++ b/themes/twentyfourteen/functions.php
@@ -44,79 +44,101 @@ if ( version_compare( $GLOBALS['wp_version'], '3.6', '<' ) ) {
}
if ( ! function_exists( 'twentyfourteen_setup' ) ) :
-/**
- * Twenty Fourteen setup.
- *
- * Set up theme defaults and registers support for various WordPress features.
- *
- * Note that this function is hooked into the after_setup_theme hook, which
- * runs before the init hook. The init hook is too late for some features, such
- * as indicating support post thumbnails.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_setup() {
-
- /*
- * Make Twenty Fourteen available for translation.
+ /**
+ * Twenty Fourteen setup.
+ *
+ * Set up theme defaults and registers support for various WordPress features.
*
- * 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.
+ * Note that this function is hooked into the after_setup_theme hook, which
+ * runs before the init hook. The init hook is too late for some features, such
+ * as indicating support post thumbnails.
+ *
+ * @since Twenty Fourteen 1.0
*/
- load_theme_textdomain( 'twentyfourteen' );
+ function twentyfourteen_setup() {
+
+ /*
+ * Make Twenty Fourteen available for translation.
+ *
+ * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfourteen
+ * If you're building a theme based on Twenty Fourteen, use a find and
+ * replace to change 'twentyfourteen' to the name of your theme in all
+ * template files.
+ */
+ load_theme_textdomain( 'twentyfourteen' );
+
+ // This theme styles the visual editor to resemble the theme style.
+ add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) );
+
+ // 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 styles the visual editor to resemble the theme style.
- add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) );
+ /*
+ * Switch default core markup for search form, comment form, and comments
+ * to output valid HTML5.
+ */
+ add_theme_support(
+ 'html5', array(
+ 'search-form',
+ 'comment-form',
+ 'comment-list',
+ 'gallery',
+ 'caption',
+ )
+ );
- // Add RSS feed links to <head> for posts and comments.
- add_theme_support( 'automatic-feed-links' );
+ /*
+ * 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',
+ )
+ );
- // 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 allows users to set a custom background.
+ add_theme_support(
+ 'custom-background', apply_filters(
+ 'twentyfourteen_custom_background_args', array(
+ 'default-color' => 'f5f5f5',
+ )
+ )
+ );
- // This theme uses wp_nav_menu() in two locations.
- register_nav_menus( array(
- 'primary' => __( 'Top primary menu', 'twentyfourteen' ),
- 'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ),
- ) );
+ // Add support for featured content.
+ add_theme_support(
+ 'featured-content', array(
+ 'featured_content_filter' => 'twentyfourteen_get_featured_posts',
+ 'max_posts' => 6,
+ )
+ );
- /*
- * 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 uses its own gallery styles.
+ add_filter( 'use_default_gallery_style', '__return_false' );
- /*
- * 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' );
-}
+ // 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' );
@@ -170,33 +192,39 @@ function twentyfourteen_widgets_init() {
require get_template_directory() . '/inc/widgets.php';
register_widget( 'Twenty_Fourteen_Ephemera_Widget' );
- register_sidebar( array(
- 'name' => __( 'Primary Sidebar', 'twentyfourteen' ),
- 'id' => 'sidebar-1',
- 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h1 class="widget-title">',
- 'after_title' => '</h1>',
- ) );
- register_sidebar( array(
- 'name' => __( 'Content Sidebar', 'twentyfourteen' ),
- 'id' => 'sidebar-2',
- 'description' => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ),
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h1 class="widget-title">',
- 'after_title' => '</h1>',
- ) );
- register_sidebar( array(
- 'name' => __( 'Footer Widget Area', 'twentyfourteen' ),
- 'id' => 'sidebar-3',
- 'description' => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h1 class="widget-title">',
- 'after_title' => '</h1>',
- ) );
+ register_sidebar(
+ array(
+ 'name' => __( 'Primary Sidebar', 'twentyfourteen' ),
+ 'id' => 'sidebar-1',
+ 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
+ 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+ 'after_widget' => '</aside>',
+ 'before_title' => '<h1 class="widget-title">',
+ 'after_title' => '</h1>',
+ )
+ );
+ register_sidebar(
+ array(
+ 'name' => __( 'Content Sidebar', 'twentyfourteen' ),
+ 'id' => 'sidebar-2',
+ 'description' => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ),
+ 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+ 'after_widget' => '</aside>',
+ 'before_title' => '<h1 class="widget-title">',
+ 'after_title' => '</h1>',
+ )
+ );
+ register_sidebar(
+ array(
+ 'name' => __( 'Footer Widget Area', 'twentyfourteen' ),
+ 'id' => 'sidebar-3',
+ 'description' => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),
+ 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+ 'after_widget' => '</aside>',
+ 'before_title' => '<h1 class="widget-title">',
+ 'after_title' => '</h1>',
+ )
+ );
}
add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
@@ -218,7 +246,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;
@@ -257,10 +285,12 @@ 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 );
@@ -303,96 +333,99 @@ function twentyfourteen_resource_hints( $urls, $relation_type ) {
add_filter( 'wp_resource_hints', 'twentyfourteen_resource_hints', 10, 2 );
if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) :
-/**
- * Print the attached image with a link to the next attached image.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_the_attached_image() {
- $post = get_post();
/**
- * Filter the default Twenty Fourteen attachment size.
+ * Print the attached image with a link to the next attached image.
*
* @since Twenty Fourteen 1.0
- *
- * @param array $dimensions {
- * An array of height and width dimensions.
- *
- * @type int $height Height of the image in pixels. Default 810.
- * @type int $width Width of the image in pixels. Default 810.
- * }
*/
- $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 810, 810 ) );
- $next_attachment_url = wp_get_attachment_url();
+ function twentyfourteen_the_attached_image() {
+ $post = get_post();
+ /**
+ * Filter the default Twenty Fourteen attachment size.
+ *
+ * @since Twenty Fourteen 1.0
+ *
+ * @param array $dimensions {
+ * An array of height and width dimensions.
+ *
+ * @type int $height Height of the image in pixels. Default 810.
+ * @type int $width Width of the image in pixels. Default 810.
+ * }
+ */
+ $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 810, 810 ) );
+ $next_attachment_url = wp_get_attachment_url();
+
+ /*
+ * Grab the IDs of all the image attachments in a gallery so we can get the URL
+ * of the next adjacent image in a gallery, or the first image (if we're
+ * looking at the last image in a gallery), or, in a gallery of one, just the
+ * link to that image file.
+ */
+ $attachment_ids = get_posts(
+ array(
+ 'post_parent' => $post->post_parent,
+ 'fields' => 'ids',
+ 'numberposts' => -1,
+ 'post_status' => 'inherit',
+ 'post_type' => 'attachment',
+ 'post_mime_type' => 'image',
+ 'order' => 'ASC',
+ 'orderby' => 'menu_order ID',
+ )
+ );
- /*
- * Grab the IDs of all the image attachments in a gallery so we can get the URL
- * of the next adjacent image in a gallery, or the first image (if we're
- * looking at the last image in a gallery), or, in a gallery of one, just the
- * link to that image file.
- */
- $attachment_ids = get_posts( array(
- 'post_parent' => $post->post_parent,
- 'fields' => 'ids',
- 'numberposts' => -1,
- 'post_status' => 'inherit',
- 'post_type' => 'attachment',
- 'post_mime_type' => 'image',
- 'order' => 'ASC',
- 'orderby' => 'menu_order ID',
- ) );
-
- // If there is more than 1 attachment in a gallery...
- if ( count( $attachment_ids ) > 1 ) {
- foreach ( $attachment_ids as $idx => $attachment_id ) {
- if ( $attachment_id == $post->ID ) {
- $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ];
- break;
+ // If there is more than 1 attachment in a gallery...
+ if ( count( $attachment_ids ) > 1 ) {
+ foreach ( $attachment_ids as $idx => $attachment_id ) {
+ if ( $attachment_id == $post->ID ) {
+ $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ];
+ break;
+ }
}
- }
- // get the URL of the next image attachment...
- if ( $next_id ) {
- $next_attachment_url = get_attachment_link( $next_id );
+ // get the URL of the next image attachment...
+ if ( $next_id ) {
+ $next_attachment_url = get_attachment_link( $next_id );
+ } // or get the URL of the first image attachment.
+ else {
+ $next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
+ }
}
- // or get the URL of the first image attachment.
- else {
- $next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
- }
+ printf(
+ '<a href="%1$s" rel="attachment">%2$s</a>',
+ esc_url( $next_attachment_url ),
+ wp_get_attachment_image( $post->ID, $attachment_size )
+ );
}
-
- printf( '<a href="%1$s" rel="attachment">%2$s</a>',
- esc_url( $next_attachment_url ),
- wp_get_attachment_image( $post->ID, $attachment_size )
- );
-}
endif;
if ( ! function_exists( 'twentyfourteen_list_authors' ) ) :
-/**
- * Print a list of all site contributors who published at least one post.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_list_authors() {
- $contributor_ids = get_users( array(
- 'fields' => 'ID',
- 'orderby' => 'post_count',
- 'order' => 'DESC',
- 'who' => 'authors',
- ) );
-
- foreach ( $contributor_ids as $contributor_id ) :
- $post_count = count_user_posts( $contributor_id );
-
- // Move on if user has not published a post (yet).
- if ( ! $post_count ) {
- continue;
- }
- ?>
+ /**
+ * Print a list of all site contributors who published at least one post.
+ *
+ * @since Twenty Fourteen 1.0
+ */
+ function twentyfourteen_list_authors() {
+ $contributor_ids = get_users(
+ array(
+ 'fields' => 'ID',
+ 'orderby' => 'post_count',
+ 'order' => 'DESC',
+ 'who' => 'authors',
+ )
+ );
- <div class="contributor">
+ 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-info">
<div class="contributor-avatar"><?php echo get_avatar( $contributor_id, 132 ); ?></div>
<div class="contributor-summary">
@@ -409,7 +442,7 @@ function twentyfourteen_list_authors() {
<?php
endforeach;
-}
+ }
endif;
/**
@@ -574,9 +607,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 7286d889..4dec164a 100644
--- a/themes/twentyfourteen/header.php
+++ b/themes/twentyfourteen/header.php
@@ -51,7 +51,15 @@
<nav id="primary-navigation" class="site-navigation primary-navigation" role="navigation">
<button class="menu-toggle"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></button>
<a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a>
- <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu' ) ); ?>
+ <?php
+ wp_nav_menu(
+ array(
+ 'theme_location' => 'primary',
+ 'menu_class' => 'nav-menu',
+ 'menu_id' => 'primary-menu',
+ )
+ );
+?>
</nav>
</div>
diff --git a/themes/twentyfourteen/image.php b/themes/twentyfourteen/image.php
index 83ac67f6..999800fa 100644
--- a/themes/twentyfourteen/image.php
+++ b/themes/twentyfourteen/image.php
@@ -18,45 +18,48 @@ 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 c184d912..3943aeef 100644
--- a/themes/twentyfourteen/inc/back-compat.php
+++ b/themes/twentyfourteen/inc/back-compat.php
@@ -44,9 +44,11 @@ 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 287b1068..bfea8976 100644
--- a/themes/twentyfourteen/inc/custom-header.php
+++ b/themes/twentyfourteen/inc/custom-header.php
@@ -35,36 +35,40 @@ 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() ) :
?>
@@ -84,20 +88,20 @@ function 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;
@@ -122,20 +126,20 @@ function twentyfourteen_admin_header_style() {
vertical-align: middle;
}
</style>
-<?php
-}
+ <?php
+ }
endif; // twentyfourteen_admin_header_style
if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :
-/**
- * Create the custom header image markup displayed on the Appearance > Header screen.
- *
- * @see twentyfourteen_custom_header_setup()
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_admin_header_image() {
-?>
+ /**
+ * Create the custom header image markup displayed on the Appearance > Header screen.
+ *
+ * @see twentyfourteen_custom_header_setup()
+ *
+ * @since Twenty Fourteen 1.0
+ */
+ function twentyfourteen_admin_header_image() {
+ ?>
<div id="headimg">
<?php if ( get_header_image() ) : ?>
<img src="<?php header_image(); ?>" alt="">
@@ -143,5 +147,5 @@ function 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 39289159..5a41f188 100644
--- a/themes/twentyfourteen/inc/customizer.php
+++ b/themes/twentyfourteen/inc/customizer.php
@@ -16,21 +16,25 @@
*/
function twentyfourteen_customize_register( $wp_customize ) {
// Add postMessage support for site title and description.
- $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
- $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
- $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
+ $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
+ $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
+ $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
if ( isset( $wp_customize->selective_refresh ) ) {
- $wp_customize->selective_refresh->add_partial( 'blogname', array(
- 'selector' => '.site-title a',
- 'container_inclusive' => false,
- 'render_callback' => 'twentyfourteen_customize_partial_blogname',
- ) );
- $wp_customize->selective_refresh->add_partial( 'blogdescription', array(
- 'selector' => '.site-description',
- 'container_inclusive' => false,
- 'render_callback' => 'twentyfourteen_customize_partial_blogdescription',
- ) );
+ $wp_customize->selective_refresh->add_partial(
+ 'blogname', array(
+ 'selector' => '.site-title a',
+ 'container_inclusive' => false,
+ 'render_callback' => 'twentyfourteen_customize_partial_blogname',
+ )
+ );
+ $wp_customize->selective_refresh->add_partial(
+ 'blogdescription', array(
+ 'selector' => '.site-description',
+ 'container_inclusive' => false,
+ 'render_callback' => 'twentyfourteen_customize_partial_blogdescription',
+ )
+ );
}
// Rename the label to "Site Title Color" because this only affects the site title in this theme.
@@ -49,31 +53,38 @@ function twentyfourteen_customize_register( $wp_customize ) {
}
// Add the featured content section in case it's not already there.
- $wp_customize->add_section( 'featured_content', array(
- 'title' => __( 'Featured Content', 'twentyfourteen' ),
- 'description' => sprintf( __( 'Use a <a href="%1$s">tag</a> to feature your posts. If no posts match the tag, <a href="%2$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ),
- esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
- admin_url( 'edit.php?show_sticky=1' )
- ),
- 'priority' => 130,
- 'active_callback' => 'is_front_page',
- ) );
+ $wp_customize->add_section(
+ 'featured_content', array(
+ 'title' => __( 'Featured Content', 'twentyfourteen' ),
+ 'description' => sprintf(
+ __( 'Use a <a href="%1$s">tag</a> to feature your posts. If no posts match the tag, <a href="%2$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ),
+ esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
+ admin_url( 'edit.php?show_sticky=1' )
+ ),
+ 'priority' => 130,
+ 'active_callback' => 'is_front_page',
+ )
+ );
// Add the featured content layout setting and control.
- $wp_customize->add_setting( 'featured_content_layout', array(
- 'default' => 'grid',
- 'sanitize_callback' => 'twentyfourteen_sanitize_layout',
- ) );
+ $wp_customize->add_setting(
+ 'featured_content_layout', array(
+ 'default' => 'grid',
+ 'sanitize_callback' => 'twentyfourteen_sanitize_layout',
+ )
+ );
- $wp_customize->add_control( 'featured_content_layout', array(
- 'label' => __( 'Layout', 'twentyfourteen' ),
- 'section' => 'featured_content',
- 'type' => 'select',
- 'choices' => array(
- 'grid' => __( 'Grid', 'twentyfourteen' ),
- 'slider' => __( 'Slider', 'twentyfourteen' ),
- ),
- ) );
+ $wp_customize->add_control(
+ 'featured_content_layout', array(
+ 'label' => __( 'Layout', 'twentyfourteen' ),
+ 'section' => 'featured_content',
+ 'type' => 'select',
+ 'choices' => array(
+ 'grid' => __( 'Grid', 'twentyfourteen' ),
+ 'slider' => __( 'Slider', 'twentyfourteen' ),
+ ),
+ )
+ );
}
add_action( 'customize_register', 'twentyfourteen_customize_register' );
@@ -137,16 +148,18 @@ function twentyfourteen_contextual_help() {
return;
}
- get_current_screen()->add_help_tab( array(
- 'id' => 'twentyfourteen',
- 'title' => __( 'Twenty Fourteen', 'twentyfourteen' ),
- 'content' =>
- '<ul>' .
- '<li>' . sprintf( __( 'The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled by a <a href="%1$s">tag</a>; you can change the tag and layout in <a href="%2$s">Appearance &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 ffeb993d..808a8a74 100644
--- a/themes/twentyfourteen/inc/featured-content.php
+++ b/themes/twentyfourteen/inc/featured-content.php
@@ -23,8 +23,6 @@ class Featured_Content {
*
* @since Twenty Fourteen 1.0
*
- * @static
- * @access public
* @var int
*/
public static $max_posts = 15;
@@ -34,8 +32,6 @@ class Featured_Content {
*
* All custom functionality will be hooked into the "init" action.
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*/
public static function setup() {
@@ -51,8 +47,6 @@ class Featured_Content {
* If no theme support is found there is no need to hook into WordPress.
* We'll just return early instead.
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*/
public static function init() {
@@ -83,15 +77,15 @@ class Featured_Content {
self::$max_posts = absint( $theme_support[0]['max_posts'] );
}
- add_filter( $filter, array( __CLASS__, 'get_featured_posts' ) );
- add_action( 'customize_register', array( __CLASS__, 'customize_register' ), 9 );
- add_action( 'admin_init', array( __CLASS__, 'register_setting' ) );
- add_action( 'switch_theme', array( __CLASS__, 'delete_transient' ) );
- add_action( 'save_post', array( __CLASS__, 'delete_transient' ) );
- add_action( 'delete_post_tag', array( __CLASS__, 'delete_post_tag' ) );
- add_action( 'customize_controls_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
- add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ) );
- add_action( 'wp_loaded', array( __CLASS__, 'wp_loaded' ) );
+ add_filter( $filter, array( __CLASS__, 'get_featured_posts' ) );
+ add_action( 'customize_register', array( __CLASS__, 'customize_register' ), 9 );
+ add_action( 'admin_init', array( __CLASS__, 'register_setting' ) );
+ add_action( 'switch_theme', array( __CLASS__, 'delete_transient' ) );
+ add_action( 'save_post', array( __CLASS__, 'delete_transient' ) );
+ add_action( 'delete_post_tag', array( __CLASS__, 'delete_post_tag' ) );
+ add_action( 'customize_controls_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
+ add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ) );
+ add_action( 'wp_loaded', array( __CLASS__, 'wp_loaded' ) );
}
/**
@@ -100,13 +94,11 @@ class Featured_Content {
* Has to run on wp_loaded so that the preview filters of the Customizer
* have a chance to alter the value.
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*/
public static function wp_loaded() {
if ( self::get_setting( 'hide-tag' ) ) {
- add_filter( 'get_terms', array( __CLASS__, 'hide_featured_term' ), 10, 3 );
+ add_filter( 'get_terms', array( __CLASS__, 'hide_featured_term' ), 10, 3 );
add_filter( 'get_the_terms', array( __CLASS__, 'hide_the_featured_term' ), 10, 3 );
}
}
@@ -114,8 +106,6 @@ class Featured_Content {
/**
* Get featured posts.
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*
* @return array Array of featured posts.
@@ -128,10 +118,12 @@ class Featured_Content {
return array();
}
- $featured_posts = get_posts( array(
- 'include' => $post_ids,
- 'posts_per_page' => count( $post_ids ),
- ) );
+ $featured_posts = get_posts(
+ array(
+ 'include' => $post_ids,
+ 'posts_per_page' => count( $post_ids ),
+ )
+ );
return $featured_posts;
}
@@ -144,8 +136,6 @@ class Featured_Content {
*
* Sets the "featured_content_ids" transient.
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*
* @return array Array of post IDs.
@@ -160,18 +150,20 @@ class Featured_Content {
if ( $term ) {
// Query for featured posts.
- $featured_ids = get_posts( array(
- 'fields' => 'ids',
- 'numberposts' => self::$max_posts,
- 'suppress_filters' => false,
- 'tax_query' => array(
- array(
- 'field' => 'term_id',
- 'taxonomy' => 'post_tag',
- 'terms' => $term->term_id,
+ $featured_ids = get_posts(
+ array(
+ 'fields' => 'ids',
+ 'numberposts' => self::$max_posts,
+ 'suppress_filters' => false,
+ 'tax_query' => array(
+ array(
+ 'field' => 'term_id',
+ 'taxonomy' => 'post_tag',
+ 'terms' => $term->term_id,
+ ),
),
- ),
- ) );
+ )
+ );
}
// Get sticky posts if no Featured Content exists.
@@ -189,8 +181,6 @@ class Featured_Content {
/**
* Return an array with IDs of posts maked as sticky.
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*
* @return array Array of sticky posts.
@@ -206,8 +196,6 @@ class Featured_Content {
*
* @see Featured_Content::validate_settings().
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*/
public static function delete_transient() {
@@ -221,8 +209,6 @@ class Featured_Content {
* Hooked onto the 'pre_get_posts' action, this changes the parameters of
* the query before it gets any posts.
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*
* @param WP_Query $query WP_Query object.
@@ -269,8 +255,6 @@ class Featured_Content {
*
* @see Featured_Content::validate_settings().
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*
* @param int $tag_id The term_id of the tag that has been deleted.
@@ -283,7 +267,7 @@ class Featured_Content {
}
$settings['tag-id'] = 0;
- $settings = self::validate_settings( $settings );
+ $settings = self::validate_settings( $settings );
update_option( 'featured-content', $settings );
}
@@ -292,8 +276,6 @@ class Featured_Content {
*
* Hooks into the "get_terms" filter.
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*
* @param array $terms List of term objects. This is the return value of get_terms().
@@ -340,8 +322,6 @@ class Featured_Content {
*
* Hooks into the "get_the_terms" filter.
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*
* @param array $terms A list of term objects. This is the return value of get_the_terms().
@@ -381,8 +361,6 @@ class Featured_Content {
/**
* Register custom setting on the Settings -> Reading screen.
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*/
public static function register_setting() {
@@ -392,54 +370,61 @@ 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() {
@@ -458,8 +443,6 @@ class Featured_Content {
* its name as the first parameter to the function and only that
* value will be returned.
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*
* @param string $key The key of a recognized setting.
@@ -491,8 +474,6 @@ class Featured_Content {
* format before saving to the database. This function will also
* delete the transient set in Featured_Content::get_featured_content().
*
- * @static
- * @access public
* @since Twenty Fourteen 1.0
*
* @param array $input Array of settings input.
diff --git a/themes/twentyfourteen/inc/template-tags.php b/themes/twentyfourteen/inc/template-tags.php
index 1d35d0d5..89393316 100644
--- a/themes/twentyfourteen/inc/template-tags.php
+++ b/themes/twentyfourteen/inc/template-tags.php
@@ -8,53 +8,55 @@
*/
if ( ! function_exists( 'twentyfourteen_paging_nav' ) ) :
-/**
- * Display navigation to next/previous set of posts when applicable.
- *
- * @since Twenty Fourteen 1.0
- *
- * @global WP_Query $wp_query WordPress Query object.
- * @global WP_Rewrite $wp_rewrite WordPress Rewrite object.
- */
-function twentyfourteen_paging_nav() {
- global $wp_query, $wp_rewrite;
-
- // Don't print empty markup if there's only one page.
- if ( $wp_query->max_num_pages < 2 ) {
- return;
- }
-
- $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
- $pagenum_link = html_entity_decode( get_pagenum_link() );
- $query_args = array();
- $url_parts = explode( '?', $pagenum_link );
-
- if ( isset( $url_parts[1] ) ) {
- wp_parse_str( $url_parts[1], $query_args );
- }
+ /**
+ * Display navigation to next/previous set of posts when applicable.
+ *
+ * @since Twenty Fourteen 1.0
+ *
+ * @global WP_Query $wp_query WordPress Query object.
+ * @global WP_Rewrite $wp_rewrite WordPress Rewrite object.
+ */
+ function twentyfourteen_paging_nav() {
+ global $wp_query, $wp_rewrite;
+
+ // Don't print empty markup if there's only one page.
+ if ( $wp_query->max_num_pages < 2 ) {
+ return;
+ }
- $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
- $pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
+ $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
+ $pagenum_link = html_entity_decode( get_pagenum_link() );
+ $query_args = array();
+ $url_parts = explode( '?', $pagenum_link );
- $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
- $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
+ if ( isset( $url_parts[1] ) ) {
+ wp_parse_str( $url_parts[1], $query_args );
+ }
- // Set up paginated links.
- $links = paginate_links( array(
- 'base' => $pagenum_link,
- 'format' => $format,
- 'total' => $wp_query->max_num_pages,
- 'current' => $paged,
- 'mid_size' => 1,
- 'add_args' => array_map( 'urlencode', $query_args ),
- 'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
- 'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
- ) );
+ $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
+ $pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
+
+ $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
+ $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
+
+ // Set up paginated links.
+ $links = paginate_links(
+ array(
+ 'base' => $pagenum_link,
+ 'format' => $format,
+ 'total' => $wp_query->max_num_pages,
+ 'current' => $paged,
+ 'mid_size' => 1,
+ 'add_args' => array_map( 'urlencode', $query_args ),
+ 'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
+ 'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
+ )
+ );
- if ( $links ) :
+ if ( $links ) :
- ?>
- <nav class="navigation paging-navigation" role="navigation">
+ ?>
+ <nav class="navigation paging-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentyfourteen' ); ?></h1>
<div class="pagination loop-pagination">
<?php echo $links; ?>
@@ -62,62 +64,63 @@ function 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>';
- }
+ /**
+ * Print HTML with meta information for the current post-date/time and author.
+ *
+ * @since Twenty Fourteen 1.0
+ */
+ function twentyfourteen_posted_on() {
+ if ( is_sticky() && is_home() && ! is_paged() ) {
+ echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>';
+ }
- // Set up and print post meta information.
- printf( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>',
- esc_url( get_permalink() ),
- esc_attr( get_the_date( 'c' ) ),
- esc_html( get_the_date() ),
- esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
- get_the_author()
- );
-}
+ // Set up and print post meta information.
+ printf(
+ '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>',
+ esc_url( get_permalink() ),
+ esc_attr( get_the_date( 'c' ) ),
+ esc_html( get_the_date() ),
+ esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
+ get_the_author()
+ );
+ }
endif;
/**
@@ -130,9 +133,11 @@ endif;
function twentyfourteen_categorized_blog() {
if ( false === ( $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ) ) ) {
// Create an array of all the categories that are attached to posts
- $all_the_cool_cats = get_categories( array(
- 'hide_empty' => 1,
- ) );
+ $all_the_cool_cats = get_categories(
+ array(
+ 'hide_empty' => 1,
+ )
+ );
// Count the number of categories that are attached to the posts
$all_the_cool_cats = count( $all_the_cool_cats );
@@ -159,69 +164,71 @@ function twentyfourteen_category_transient_flusher() {
delete_transient( 'twentyfourteen_category_count' );
}
add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' );
-add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
+add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
if ( ! function_exists( 'twentyfourteen_post_thumbnail' ) ) :
-/**
- * Display an optional post thumbnail.
- *
- * Wraps the post thumbnail in an anchor element on index
- * views, or a div element when on single views.
- *
- * @since Twenty Fourteen 1.0
- * @since Twenty Fourteen 1.4 Was made 'pluggable', or overridable.
- */
-function twentyfourteen_post_thumbnail() {
- if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
- return;
- }
+ /**
+ * Display an optional post thumbnail.
+ *
+ * Wraps the post thumbnail in an anchor element on index
+ * views, or a div element when on single views.
+ *
+ * @since Twenty Fourteen 1.0
+ * @since Twenty Fourteen 1.4 Was made 'pluggable', or overridable.
+ */
+ function twentyfourteen_post_thumbnail() {
+ if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
+ return;
+ }
- if ( is_singular() ) :
- ?>
+ if ( is_singular() ) :
+ ?>
- <div class="post-thumbnail">
- <?php
+ <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 533f34a5..64118b5e 100644
--- a/themes/twentyfourteen/inc/widgets.php
+++ b/themes/twentyfourteen/inc/widgets.php
@@ -16,7 +16,6 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
/**
* The supported post formats.
*
- * @access private
* @since Twenty Fourteen 1.0
*
* @var array
@@ -31,11 +30,13 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
* @return Twenty_Fourteen_Ephemera_Widget
*/
public function __construct() {
- parent::__construct( 'widget_twentyfourteen_ephemera', __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ), array(
- 'classname' => 'widget_twentyfourteen_ephemera',
- 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen' ),
- 'customize_selective_refresh' => true,
- ) );
+ parent::__construct(
+ 'widget_twentyfourteen_ephemera', __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ), array(
+ 'classname' => 'widget_twentyfourteen_ephemera',
+ 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen' ),
+ 'customize_selective_refresh' => true,
+ )
+ );
if ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) {
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
@@ -62,7 +63,6 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
/**
* Output the HTML for this widget.
*
- * @access public
* @since Twenty Fourteen 1.0
*
* @param array $args An array of standard parameters for widgets in this theme.
@@ -106,24 +106,26 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
$number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? $format_string : $instance['title'], $instance, $this->id_base );
- $ephemera = new WP_Query( array(
- 'order' => 'DESC',
- 'posts_per_page' => $number,
- 'no_found_rows' => true,
- 'post_status' => 'publish',
- 'post__not_in' => get_option( 'sticky_posts' ),
- 'tax_query' => array(
- array(
- 'taxonomy' => 'post_format',
- 'terms' => array( "post-format-$format" ),
- 'field' => 'slug',
- 'operator' => 'IN',
+ $ephemera = new WP_Query(
+ array(
+ 'order' => 'DESC',
+ 'posts_per_page' => $number,
+ 'no_found_rows' => true,
+ 'post_status' => 'publish',
+ 'post__not_in' => get_option( 'sticky_posts' ),
+ 'tax_query' => array(
+ array(
+ 'taxonomy' => 'post_format',
+ 'terms' => array( "post-format-$format" ),
+ 'field' => 'slug',
+ 'operator' => 'IN',
+ ),
),
- ),
- ) );
+ )
+ );
if ( $ephemera->have_posts() ) :
- $tmp_content_width = $GLOBALS['content_width'];
+ $tmp_content_width = $GLOBALS['content_width'];
$GLOBALS['content_width'] = 306;
echo $args['before_widget'];
@@ -134,61 +136,65 @@ 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' ) );
@@ -198,20 +204,21 @@ 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 3f46be21..42064cfe 100644
--- a/themes/twentyfourteen/index.php
+++ b/themes/twentyfourteen/index.php
@@ -19,30 +19,31 @@ 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 a21849ec..ac4629d7 100644
--- a/themes/twentyfourteen/js/functions.js
+++ b/themes/twentyfourteen/js/functions.js
@@ -122,7 +122,8 @@
} );
/**
- * @summary Add or remove ARIA attributes.
+ * Add or remove ARIA attributes.
+ *
* Uses jQuery's width() function to determine the size of the window and add
* the default ARIA attributes for the menu toggle if it's visible.
* @since Twenty Fourteen 1.4
diff --git a/themes/twentyfourteen/page-templates/contributors.php b/themes/twentyfourteen/page-templates/contributors.php
index 92602ab1..b4103e8a 100644
--- a/themes/twentyfourteen/page-templates/contributors.php
+++ b/themes/twentyfourteen/page-templates/contributors.php
@@ -12,35 +12,36 @@ get_header(); ?>
<div id="main-content" class="main-content">
<?php
- if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
- // Include the featured content template.
- get_template_part( 'featured-content' );
- }
+if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
+ // Include the featured content template.
+ get_template_part( 'featured-content' );
+}
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
// Start the Loop.
- while ( have_posts() ) : the_post();
+ while ( have_posts() ) :
+ the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <?php
- the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' );
+ <?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 8830c870..ea5fa588 100644
--- a/themes/twentyfourteen/page-templates/full-width.php
+++ b/themes/twentyfourteen/page-templates/full-width.php
@@ -12,25 +12,26 @@ get_header(); ?>
<div id="main-content" class="main-content">
<?php
- if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
- // Include the featured content template.
- get_template_part( 'featured-content' );
- }
+if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
+ // Include the featured content template.
+ get_template_part( 'featured-content' );
+}
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
// Start the Loop.
- while ( have_posts() ) : the_post();
+ while ( have_posts() ) :
+ the_post();
- // Include the page content template.
- get_template_part( 'content', 'page' );
+ // Include the page content template.
+ get_template_part( 'content', 'page' );
- // If comments are open or we have at least one comment, load up the comment template.
- if ( comments_open() || get_comments_number() ) {
- comments_template();
- }
+ // If comments are open or we have at least one comment, load up the comment template.
+ if ( comments_open() || get_comments_number() ) {
+ comments_template();
+ }
endwhile;
?>
</div><!-- #content -->
diff --git a/themes/twentyfourteen/page.php b/themes/twentyfourteen/page.php
index 44724e94..bd033aeb 100644
--- a/themes/twentyfourteen/page.php
+++ b/themes/twentyfourteen/page.php
@@ -16,25 +16,26 @@ get_header(); ?>
<div id="main-content" class="main-content">
<?php
- if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
- // Include the featured content template.
- get_template_part( 'featured-content' );
- }
+if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
+ // Include the featured content template.
+ get_template_part( 'featured-content' );
+}
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
// Start the Loop.
- while ( have_posts() ) : the_post();
+ while ( have_posts() ) :
+ the_post();
- // Include the page content template.
- get_template_part( 'content', 'page' );
+ // Include the page content template.
+ get_template_part( 'content', 'page' );
- // If comments are open or we have at least one comment, load up the comment template.
- if ( comments_open() || get_comments_number() ) {
- comments_template();
- }
+ // If comments are open or we have at least one comment, load up the comment template.
+ if ( comments_open() || get_comments_number() ) {
+ comments_template();
+ }
endwhile;
?>
diff --git a/themes/twentyfourteen/readme.txt b/themes/twentyfourteen/readme.txt
index bb027240..96b7a3a3 100644
--- a/themes/twentyfourteen/readme.txt
+++ b/themes/twentyfourteen/readme.txt
@@ -2,7 +2,7 @@
Contributors: the WordPress team
Requires at least: WordPress 3.6
Tested up to: WordPress 5.0-trunk
-Stable tag: 2.1
+Stable tag: 2.2
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
@@ -22,7 +22,7 @@ For more information about Twenty Fourteen please go to https://codex.wordpress.
== Copyright ==
-Twenty Fourteen WordPress Theme, Copyright 2013-2017 WordPress.org & Automattic.com
+Twenty Fourteen WordPress Theme, Copyright 2013-2018 WordPress.org & Automattic.com
Twenty Fourteen is Distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify
@@ -50,6 +50,11 @@ Source: http://www.genericons.com
== Changelog ==
+= 2.2 =
+* Released: May 17, 2018
+
+https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_2.2
+
= 2.1 =
* Released: November 14, 2017
diff --git a/themes/twentyfourteen/rtl.css b/themes/twentyfourteen/rtl.css
index 5ff7312c..58d97579 100644
--- a/themes/twentyfourteen/rtl.css
+++ b/themes/twentyfourteen/rtl.css
@@ -288,6 +288,9 @@ td {
margin-left: 10px;
}
+.comment-form #wp-comment-cookies-consent {
+ margin: 0 0 0 10px;
+}
/**
* 7.0 Sidebars
@@ -355,6 +358,14 @@ td {
margin: -1px 0 0 18px;
}
+/**
+ * 8.0 Footer
+ * -----------------------------------------------------------------------------
+ */
+
+.site-info span[role=separator] {
+ padding: 0 0.5em;
+}
/**
* 9.0 Featured Content
@@ -855,4 +866,4 @@ td {
margin-left: -18%;
margin-right: auto;
}
-} \ No newline at end of file
+}
diff --git a/themes/twentyfourteen/search.php b/themes/twentyfourteen/search.php
index d90d88a1..6945c40a 100644
--- a/themes/twentyfourteen/search.php
+++ b/themes/twentyfourteen/search.php
@@ -20,14 +20,15 @@ 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 be3c8e02..6117b7f5 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 e089165e..1940c732 100644
--- a/themes/twentyfourteen/single.php
+++ b/themes/twentyfourteen/single.php
@@ -13,22 +13,23 @@ get_header(); ?>
<div id="content" class="site-content" role="main">
<?php
// Start the Loop.
- while ( have_posts() ) : the_post();
+ while ( have_posts() ) :
+ the_post();
- /*
- * Include the post format-specific template for the content. If you want to
- * use this in a child theme, then include a file called content-___.php
- * (where ___ is the post format) and that will be used instead.
- */
- get_template_part( 'content', get_post_format() );
+ /*
+ * Include the post format-specific template for the content. If you want to
+ * use this in a child theme, then include a file called content-___.php
+ * (where ___ is the post format) and that will be used instead.
+ */
+ get_template_part( 'content', get_post_format() );
- // Previous/next post navigation.
- twentyfourteen_post_nav();
+ // Previous/next post navigation.
+ twentyfourteen_post_nav();
- // If comments are open or we have at least one comment, load up the comment template.
- if ( comments_open() || get_comments_number() ) {
- comments_template();
- }
+ // If comments are open or we have at least one comment, load up the comment template.
+ if ( comments_open() || get_comments_number() ) {
+ comments_template();
+ }
endwhile;
?>
</div><!-- #content -->
diff --git a/themes/twentyfourteen/style.css b/themes/twentyfourteen/style.css
index 32ed8373..46a86b4c 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.1
+Version: 2.2
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
@@ -2186,6 +2186,13 @@ a.post-thumbnail:hover {
margin-bottom: 0;
}
+.comment-form #wp-comment-cookies-consent {
+ margin: 0 10px 0 0;
+}
+
+.comment-form .comment-form-cookies-consent label {
+ display: inline;
+}
/**
* 7.0 Sidebars
@@ -2916,6 +2923,13 @@ a.post-thumbnail:hover {
color: #41a62a;
}
+.site-info span[role=separator] {
+ padding: 0 0.25em 0 0.5em;
+}
+
+.site-info span[role=separator]::before {
+ content: '\002f';
+}
/**
* 9.0 Featured Content
diff --git a/themes/twentyfourteen/tag.php b/themes/twentyfourteen/tag.php
index 5930d2cf..663fe5e9 100644
--- a/themes/twentyfourteen/tag.php
+++ b/themes/twentyfourteen/tag.php
@@ -24,22 +24,23 @@ get_header(); ?>
<?php
// Show an optional term description.
$term_description = term_description();
- if ( ! empty( $term_description ) ) :
- printf( '<div class="taxonomy-description">%s</div>', $term_description );
+ if ( ! empty( $term_description ) ) :
+ printf( '<div class="taxonomy-description">%s</div>', $term_description );
endif;
?>
</header><!-- .archive-header -->
<?php
// 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 f7cee9f7..fa733505 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,14 +57,15 @@ 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.