Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/blogs-gentoo:master commit in: themes/twentyfourteen/js/, themes/twentyfourteen/inc/, themes/twentyfourteen/, ...
Date: Wed, 02 Jan 2019 03:14:41
Message-Id: 1546398858.c00d17bd8b26b20be39ada518d07bb5a07478b29.blueness@gentoo
1 commit: c00d17bd8b26b20be39ada518d07bb5a07478b29
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 2 03:14:18 2019 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 2 03:14:18 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/blogs-gentoo.git/commit/?id=c00d17bd
7
8 Update twentyfourteen 2.4
9
10 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
11
12 themes/twentyfourteen/archive.php | 19 +-
13 themes/twentyfourteen/author.php | 15 +-
14 themes/twentyfourteen/category.php | 21 +-
15 themes/twentyfourteen/comments.php | 46 +-
16 themes/twentyfourteen/content-aside.php | 30 +-
17 themes/twentyfourteen/content-audio.php | 30 +-
18 themes/twentyfourteen/content-featured-post.php | 14 +-
19 themes/twentyfourteen/content-gallery.php | 30 +-
20 themes/twentyfourteen/content-image.php | 30 +-
21 themes/twentyfourteen/content-link.php | 30 +-
22 themes/twentyfourteen/content-page.php | 14 +-
23 themes/twentyfourteen/content-quote.php | 30 +-
24 themes/twentyfourteen/content-video.php | 30 +-
25 themes/twentyfourteen/content.php | 35 +-
26 themes/twentyfourteen/css/blocks.css | 396 +++++++++++++++++
27 themes/twentyfourteen/css/editor-blocks.css | 479 +++++++++++++++++++++
28 themes/twentyfourteen/featured-content.php | 8 +-
29 themes/twentyfourteen/footer.php | 2 +-
30 themes/twentyfourteen/functions.php | 448 ++++++++++---------
31 themes/twentyfourteen/header.php | 10 +-
32 themes/twentyfourteen/image.php | 49 +--
33 themes/twentyfourteen/inc/back-compat.php | 8 +-
34 themes/twentyfourteen/inc/custom-header.php | 96 ++---
35 themes/twentyfourteen/inc/customizer.php | 105 ++---
36 themes/twentyfourteen/inc/featured-content.php | 161 ++++---
37 themes/twentyfourteen/inc/template-tags.php | 269 ++++++------
38 themes/twentyfourteen/inc/widgets.php | 151 ++++---
39 themes/twentyfourteen/index.php | 33 +-
40 themes/twentyfourteen/js/functions.js | 3 +-
41 .../twentyfourteen/page-templates/contributors.php | 31 +-
42 .../twentyfourteen/page-templates/full-width.php | 23 +-
43 themes/twentyfourteen/page.php | 23 +-
44 themes/twentyfourteen/readme.txt | 14 +-
45 themes/twentyfourteen/search.php | 17 +-
46 themes/twentyfourteen/sidebar.php | 2 +-
47 themes/twentyfourteen/single.php | 27 +-
48 themes/twentyfourteen/style.css | 2 +-
49 themes/twentyfourteen/tag.php | 21 +-
50 themes/twentyfourteen/taxonomy-post_format.php | 21 +-
51 39 files changed, 1805 insertions(+), 968 deletions(-)
52
53 diff --git a/themes/twentyfourteen/archive.php b/themes/twentyfourteen/archive.php
54 index e2b4b41..6a4deed 100644
55 --- a/themes/twentyfourteen/archive.php
56 +++ b/themes/twentyfourteen/archive.php
57 @@ -27,8 +27,8 @@ get_header(); ?>
58 <header class="page-header">
59 <h1 class="page-title">
60 <?php
61 - if ( is_day() ) :
62 - printf( __( 'Daily Archives: %s', 'twentyfourteen' ), get_the_date() );
63 + if ( is_day() ) :
64 + printf( __( 'Daily Archives: %s', 'twentyfourteen' ), get_the_date() );
65
66 elseif ( is_month() ) :
67 printf( __( 'Monthly Archives: %s', 'twentyfourteen' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyfourteen' ) ) );
68 @@ -46,15 +46,14 @@ get_header(); ?>
69
70 <?php
71 // Start the Loop.
72 - while ( have_posts() ) :
73 - the_post();
74 + while ( have_posts() ) : the_post();
75
76 - /*
77 - * Include the post format-specific template for the content. If you want to
78 - * use this in a child theme, then include a file called content-___.php
79 - * (where ___ is the post format) and that will be used instead.
80 - */
81 - get_template_part( 'content', get_post_format() );
82 + /*
83 + * Include the post format-specific template for the content. If you want to
84 + * use this in a child theme, then include a file called content-___.php
85 + * (where ___ is the post format) and that will be used instead.
86 + */
87 + get_template_part( 'content', get_post_format() );
88
89 endwhile;
90 // Previous/next page navigation.
91
92 diff --git a/themes/twentyfourteen/author.php b/themes/twentyfourteen/author.php
93 index 90a5bc0..a40f209 100644
94 --- a/themes/twentyfourteen/author.php
95 +++ b/themes/twentyfourteen/author.php
96 @@ -45,15 +45,14 @@ get_header(); ?>
97 rewind_posts();
98
99 // Start the Loop.
100 - while ( have_posts() ) :
101 - the_post();
102 + while ( have_posts() ) : the_post();
103
104 - /*
105 - * Include the post format-specific template for the content. If you want to
106 - * use this in a child theme, then include a file called content-___.php
107 - * (where ___ is the post format) and that will be used instead.
108 - */
109 - get_template_part( 'content', get_post_format() );
110 + /*
111 + * Include the post format-specific template for the content. If you want to
112 + * use this in a child theme, then include a file called content-___.php
113 + * (where ___ is the post format) and that will be used instead.
114 + */
115 + get_template_part( 'content', get_post_format() );
116
117 endwhile;
118 // Previous/next page navigation.
119
120 diff --git a/themes/twentyfourteen/category.php b/themes/twentyfourteen/category.php
121 index 2264c1e..97745ff 100644
122 --- a/themes/twentyfourteen/category.php
123 +++ b/themes/twentyfourteen/category.php
124 @@ -22,23 +22,22 @@ get_header(); ?>
125 <?php
126 // Show an optional term description.
127 $term_description = term_description();
128 - if ( ! empty( $term_description ) ) :
129 - printf( '<div class="taxonomy-description">%s</div>', $term_description );
130 + if ( ! empty( $term_description ) ) :
131 + printf( '<div class="taxonomy-description">%s</div>', $term_description );
132 endif;
133 ?>
134 </header><!-- .archive-header -->
135
136 <?php
137 // Start the Loop.
138 - while ( have_posts() ) :
139 - the_post();
140 -
141 - /*
142 - * Include the post format-specific template for the content. If you want to
143 - * use this in a child theme, then include a file called content-___.php
144 - * (where ___ is the post format) and that will be used instead.
145 - */
146 - get_template_part( 'content', get_post_format() );
147 + while ( have_posts() ) : the_post();
148 +
149 + /*
150 + * Include the post format-specific template for the content. If you want to
151 + * use this in a child theme, then include a file called content-___.php
152 + * (where ___ is the post format) and that will be used instead.
153 + */
154 + get_template_part( 'content', get_post_format() );
155
156 endwhile;
157 // Previous/next page navigation.
158
159 diff --git a/themes/twentyfourteen/comments.php b/themes/twentyfourteen/comments.php
160 index a20dc1e..d62e91a 100644
161 --- a/themes/twentyfourteen/comments.php
162 +++ b/themes/twentyfourteen/comments.php
163 @@ -25,23 +25,23 @@ if ( post_password_required() ) {
164 <h2 class="comments-title">
165 <?php
166 $comments_number = get_comments_number();
167 - if ( '1' === $comments_number ) {
168 - /* translators: %s: post title */
169 - printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentyfourteen' ), get_the_title() );
170 - } else {
171 - printf(
172 - /* translators: 1: number of comments, 2: post title */
173 - _nx(
174 - '%1$s thought on &ldquo;%2$s&rdquo;',
175 - '%1$s thoughts on &ldquo;%2$s&rdquo;',
176 - $comments_number,
177 - 'comments title',
178 - 'twentyfourteen'
179 - ),
180 - number_format_i18n( $comments_number ),
181 - get_the_title()
182 - );
183 - }
184 + if ( '1' === $comments_number ) {
185 + /* translators: %s: post title */
186 + printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentyfourteen' ), get_the_title() );
187 + } else {
188 + printf(
189 + /* translators: 1: number of comments, 2: post title */
190 + _nx(
191 + '%1$s thought on &ldquo;%2$s&rdquo;',
192 + '%1$s thoughts on &ldquo;%2$s&rdquo;',
193 + $comments_number,
194 + 'comments title',
195 + 'twentyfourteen'
196 + ),
197 + number_format_i18n( $comments_number ),
198 + get_the_title()
199 + );
200 + }
201 ?>
202 </h2>
203
204 @@ -55,13 +55,11 @@ if ( post_password_required() ) {
205
206 <ol class="comment-list">
207 <?php
208 - wp_list_comments(
209 - array(
210 - 'style' => 'ol',
211 - 'short_ping' => true,
212 - 'avatar_size' => 34,
213 - )
214 - );
215 + wp_list_comments( array(
216 + 'style' => 'ol',
217 + 'short_ping' => true,
218 + 'avatar_size' => 34,
219 + ) );
220 ?>
221 </ol><!-- .comment-list -->
222
223
224 diff --git a/themes/twentyfourteen/content-aside.php b/themes/twentyfourteen/content-aside.php
225 index 554416d..0401579 100644
226 --- a/themes/twentyfourteen/content-aside.php
227 +++ b/themes/twentyfourteen/content-aside.php
228 @@ -19,8 +19,8 @@
229 <?php
230 endif;
231
232 -if ( is_single() ) :
233 - the_title( '<h1 class="entry-title">', '</h1>' );
234 + if ( is_single() ) :
235 + the_title( '<h1 class="entry-title">', '</h1>' );
236 else :
237 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
238 endif;
239 @@ -44,21 +44,17 @@ if ( is_single() ) :
240 <div class="entry-content">
241 <?php
242 /* translators: %s: Name of current post */
243 - the_content(
244 - sprintf(
245 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
246 - the_title( '<span class="screen-reader-text">', '</span>', false )
247 - )
248 - );
249 -
250 - wp_link_pages(
251 - array(
252 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
253 - 'after' => '</div>',
254 - 'link_before' => '<span>',
255 - 'link_after' => '</span>',
256 - )
257 - );
258 + the_content( sprintf(
259 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
260 + the_title( '<span class="screen-reader-text">', '</span>', false )
261 + ) );
262 +
263 + wp_link_pages( array(
264 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
265 + 'after' => '</div>',
266 + 'link_before' => '<span>',
267 + 'link_after' => '</span>',
268 + ) );
269 ?>
270 </div><!-- .entry-content -->
271
272
273 diff --git a/themes/twentyfourteen/content-audio.php b/themes/twentyfourteen/content-audio.php
274 index 8fc2095..9fa9df4 100644
275 --- a/themes/twentyfourteen/content-audio.php
276 +++ b/themes/twentyfourteen/content-audio.php
277 @@ -19,8 +19,8 @@
278 <?php
279 endif;
280
281 -if ( is_single() ) :
282 - the_title( '<h1 class="entry-title">', '</h1>' );
283 + if ( is_single() ) :
284 + the_title( '<h1 class="entry-title">', '</h1>' );
285 else :
286 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
287 endif;
288 @@ -44,21 +44,17 @@ if ( is_single() ) :
289 <div class="entry-content">
290 <?php
291 /* translators: %s: Name of current post */
292 - the_content(
293 - sprintf(
294 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
295 - the_title( '<span class="screen-reader-text">', '</span>', false )
296 - )
297 - );
298 -
299 - wp_link_pages(
300 - array(
301 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
302 - 'after' => '</div>',
303 - 'link_before' => '<span>',
304 - 'link_after' => '</span>',
305 - )
306 - );
307 + the_content( sprintf(
308 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
309 + the_title( '<span class="screen-reader-text">', '</span>', false )
310 + ) );
311 +
312 + wp_link_pages( array(
313 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
314 + 'after' => '</div>',
315 + 'link_before' => '<span>',
316 + 'link_after' => '</span>',
317 + ) );
318 ?>
319 </div><!-- .entry-content -->
320
321
322 diff --git a/themes/twentyfourteen/content-featured-post.php b/themes/twentyfourteen/content-featured-post.php
323 index d5a16fe..6cc8822 100644
324 --- a/themes/twentyfourteen/content-featured-post.php
325 +++ b/themes/twentyfourteen/content-featured-post.php
326 @@ -12,12 +12,12 @@
327 <a class="post-thumbnail" href="<?php the_permalink(); ?>">
328 <?php
329 // Output the featured image.
330 - if ( has_post_thumbnail() ) :
331 - if ( 'grid' == get_theme_mod( 'featured_content_layout' ) ) {
332 - the_post_thumbnail();
333 - } else {
334 - the_post_thumbnail( 'twentyfourteen-full-width' );
335 - }
336 + if ( has_post_thumbnail() ) :
337 + if ( 'grid' == get_theme_mod( 'featured_content_layout' ) ) {
338 + the_post_thumbnail();
339 + } else {
340 + the_post_thumbnail( 'twentyfourteen-full-width' );
341 + }
342 endif;
343 ?>
344 </a>
345 @@ -29,6 +29,6 @@
346 </div><!-- .entry-meta -->
347 <?php endif; ?>
348
349 - <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
350 + <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">','</a></h1>' ); ?>
351 </header><!-- .entry-header -->
352 </article><!-- #post-## -->
353
354 diff --git a/themes/twentyfourteen/content-gallery.php b/themes/twentyfourteen/content-gallery.php
355 index db382fe..6e3fe83 100644
356 --- a/themes/twentyfourteen/content-gallery.php
357 +++ b/themes/twentyfourteen/content-gallery.php
358 @@ -19,8 +19,8 @@
359 <?php
360 endif;
361
362 -if ( is_single() ) :
363 - the_title( '<h1 class="entry-title">', '</h1>' );
364 + if ( is_single() ) :
365 + the_title( '<h1 class="entry-title">', '</h1>' );
366 else :
367 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
368 endif;
369 @@ -44,21 +44,17 @@ if ( is_single() ) :
370 <div class="entry-content">
371 <?php
372 /* translators: %s: Name of current post */
373 - the_content(
374 - sprintf(
375 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
376 - the_title( '<span class="screen-reader-text">', '</span>', false )
377 - )
378 - );
379 -
380 - wp_link_pages(
381 - array(
382 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
383 - 'after' => '</div>',
384 - 'link_before' => '<span>',
385 - 'link_after' => '</span>',
386 - )
387 - );
388 + the_content( sprintf(
389 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
390 + the_title( '<span class="screen-reader-text">', '</span>', false )
391 + ) );
392 +
393 + wp_link_pages( array(
394 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
395 + 'after' => '</div>',
396 + 'link_before' => '<span>',
397 + 'link_after' => '</span>',
398 + ) );
399 ?>
400 </div><!-- .entry-content -->
401
402
403 diff --git a/themes/twentyfourteen/content-image.php b/themes/twentyfourteen/content-image.php
404 index 11aa1e8..a81e493 100644
405 --- a/themes/twentyfourteen/content-image.php
406 +++ b/themes/twentyfourteen/content-image.php
407 @@ -19,8 +19,8 @@
408 <?php
409 endif;
410
411 -if ( is_single() ) :
412 - the_title( '<h1 class="entry-title">', '</h1>' );
413 + if ( is_single() ) :
414 + the_title( '<h1 class="entry-title">', '</h1>' );
415 else :
416 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
417 endif;
418 @@ -44,21 +44,17 @@ if ( is_single() ) :
419 <div class="entry-content">
420 <?php
421 /* translators: %s: Name of current post */
422 - the_content(
423 - sprintf(
424 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
425 - the_title( '<span class="screen-reader-text">', '</span>', false )
426 - )
427 - );
428 -
429 - wp_link_pages(
430 - array(
431 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
432 - 'after' => '</div>',
433 - 'link_before' => '<span>',
434 - 'link_after' => '</span>',
435 - )
436 - );
437 + the_content( sprintf(
438 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
439 + the_title( '<span class="screen-reader-text">', '</span>', false )
440 + ) );
441 +
442 + wp_link_pages( array(
443 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
444 + 'after' => '</div>',
445 + 'link_before' => '<span>',
446 + 'link_after' => '</span>',
447 + ) );
448 ?>
449 </div><!-- .entry-content -->
450
451
452 diff --git a/themes/twentyfourteen/content-link.php b/themes/twentyfourteen/content-link.php
453 index 5c97986..858301e 100644
454 --- a/themes/twentyfourteen/content-link.php
455 +++ b/themes/twentyfourteen/content-link.php
456 @@ -19,8 +19,8 @@
457 <?php
458 endif;
459
460 -if ( is_single() ) :
461 - the_title( '<h1 class="entry-title">', '</h1>' );
462 + if ( is_single() ) :
463 + the_title( '<h1 class="entry-title">', '</h1>' );
464 else :
465 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
466 endif;
467 @@ -44,21 +44,17 @@ if ( is_single() ) :
468 <div class="entry-content">
469 <?php
470 /* translators: %s: Name of current post */
471 - the_content(
472 - sprintf(
473 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
474 - the_title( '<span class="screen-reader-text">', '</span>', false )
475 - )
476 - );
477 -
478 - wp_link_pages(
479 - array(
480 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
481 - 'after' => '</div>',
482 - 'link_before' => '<span>',
483 - 'link_after' => '</span>',
484 - )
485 - );
486 + the_content( sprintf(
487 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
488 + the_title( '<span class="screen-reader-text">', '</span>', false )
489 + ) );
490 +
491 + wp_link_pages( array(
492 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
493 + 'after' => '</div>',
494 + 'link_before' => '<span>',
495 + 'link_after' => '</span>',
496 + ) );
497 ?>
498 </div><!-- .entry-content -->
499
500
501 diff --git a/themes/twentyfourteen/content-page.php b/themes/twentyfourteen/content-page.php
502 index 6a33baa..9839419 100644
503 --- a/themes/twentyfourteen/content-page.php
504 +++ b/themes/twentyfourteen/content-page.php
505 @@ -18,14 +18,12 @@
506 <div class="entry-content">
507 <?php
508 the_content();
509 - wp_link_pages(
510 - array(
511 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
512 - 'after' => '</div>',
513 - 'link_before' => '<span>',
514 - 'link_after' => '</span>',
515 - )
516 - );
517 + wp_link_pages( array(
518 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
519 + 'after' => '</div>',
520 + 'link_before' => '<span>',
521 + 'link_after' => '</span>',
522 + ) );
523
524 edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
525 ?>
526
527 diff --git a/themes/twentyfourteen/content-quote.php b/themes/twentyfourteen/content-quote.php
528 index fa0b899..10a5d11 100644
529 --- a/themes/twentyfourteen/content-quote.php
530 +++ b/themes/twentyfourteen/content-quote.php
531 @@ -19,8 +19,8 @@
532 <?php
533 endif;
534
535 -if ( is_single() ) :
536 - the_title( '<h1 class="entry-title">', '</h1>' );
537 + if ( is_single() ) :
538 + the_title( '<h1 class="entry-title">', '</h1>' );
539 else :
540 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
541 endif;
542 @@ -44,21 +44,17 @@ if ( is_single() ) :
543 <div class="entry-content">
544 <?php
545 /* translators: %s: Name of current post */
546 - the_content(
547 - sprintf(
548 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
549 - the_title( '<span class="screen-reader-text">', '</span>', false )
550 - )
551 - );
552 -
553 - wp_link_pages(
554 - array(
555 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
556 - 'after' => '</div>',
557 - 'link_before' => '<span>',
558 - 'link_after' => '</span>',
559 - )
560 - );
561 + the_content( sprintf(
562 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
563 + the_title( '<span class="screen-reader-text">', '</span>', false )
564 + ) );
565 +
566 + wp_link_pages( array(
567 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
568 + 'after' => '</div>',
569 + 'link_before' => '<span>',
570 + 'link_after' => '</span>',
571 + ) );
572 ?>
573 </div><!-- .entry-content -->
574
575
576 diff --git a/themes/twentyfourteen/content-video.php b/themes/twentyfourteen/content-video.php
577 index 951a13c..4c49aaa 100644
578 --- a/themes/twentyfourteen/content-video.php
579 +++ b/themes/twentyfourteen/content-video.php
580 @@ -19,8 +19,8 @@
581 <?php
582 endif;
583
584 -if ( is_single() ) :
585 - the_title( '<h1 class="entry-title">', '</h1>' );
586 + if ( is_single() ) :
587 + the_title( '<h1 class="entry-title">', '</h1>' );
588 else :
589 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
590 endif;
591 @@ -44,21 +44,17 @@ if ( is_single() ) :
592 <div class="entry-content">
593 <?php
594 /* translators: %s: Name of current post */
595 - the_content(
596 - sprintf(
597 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
598 - the_title( '<span class="screen-reader-text">', '</span>', false )
599 - )
600 - );
601 -
602 - wp_link_pages(
603 - array(
604 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
605 - 'after' => '</div>',
606 - 'link_before' => '<span>',
607 - 'link_after' => '</span>',
608 - )
609 - );
610 + the_content( sprintf(
611 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
612 + the_title( '<span class="screen-reader-text">', '</span>', false )
613 + ) );
614 +
615 + wp_link_pages( array(
616 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
617 + 'after' => '</div>',
618 + 'link_before' => '<span>',
619 + 'link_after' => '</span>',
620 + ) );
621 ?>
622 </div><!-- .entry-content -->
623
624
625 diff --git a/themes/twentyfourteen/content.php b/themes/twentyfourteen/content.php
626 index 03eb3e8..e571d8b 100644
627 --- a/themes/twentyfourteen/content.php
628 +++ b/themes/twentyfourteen/content.php
629 @@ -21,8 +21,8 @@
630 <?php
631 endif;
632
633 -if ( is_single() ) :
634 - the_title( '<h1 class="entry-title">', '</h1>' );
635 + if ( is_single() ) :
636 + the_title( '<h1 class="entry-title">', '</h1>' );
637 else :
638 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
639 endif;
640 @@ -30,11 +30,10 @@ if ( is_single() ) :
641
642 <div class="entry-meta">
643 <?php
644 - if ( 'post' == get_post_type() ) {
645 - twentyfourteen_posted_on();
646 - }
647 + if ( 'post' == get_post_type() )
648 + twentyfourteen_posted_on();
649
650 - if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
651 + if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
652 ?>
653 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
654 <?php
655 @@ -53,21 +52,17 @@ if ( is_single() ) :
656 <div class="entry-content">
657 <?php
658 /* translators: %s: Name of current post */
659 - the_content(
660 - sprintf(
661 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
662 - the_title( '<span class="screen-reader-text">', '</span>', false )
663 - )
664 - );
665 + the_content( sprintf(
666 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
667 + the_title( '<span class="screen-reader-text">', '</span>', false )
668 + ) );
669
670 - wp_link_pages(
671 - array(
672 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
673 - 'after' => '</div>',
674 - 'link_before' => '<span>',
675 - 'link_after' => '</span>',
676 - )
677 - );
678 + wp_link_pages( array(
679 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
680 + 'after' => '</div>',
681 + 'link_before' => '<span>',
682 + 'link_after' => '</span>',
683 + ) );
684 ?>
685 </div><!-- .entry-content -->
686 <?php endif; ?>
687
688 diff --git a/themes/twentyfourteen/css/blocks.css b/themes/twentyfourteen/css/blocks.css
689 new file mode 100644
690 index 0000000..425c8db
691 --- /dev/null
692 +++ b/themes/twentyfourteen/css/blocks.css
693 @@ -0,0 +1,396 @@
694 +/*
695 +Theme Name: Twenty Fourteen
696 +Description: Used to style blocks.
697 +*/
698 +
699 +/*--------------------------------------------------------------
700 +>>> TABLE OF CONTENTS:
701 +----------------------------------------------------------------
702 +1.0 General Block Styles
703 +2.0 Blocks - Common Blocks
704 +3.0 Blocks - Formatting
705 +4.0 Blocks - Layout Elements
706 +5.0 Blocks - Widgets
707 +6.0 Blocks - Colors
708 +--------------------------------------------------------------*/
709 +
710 +/*--------------------------------------------------------------
711 +1.0 General Block Styles
712 +--------------------------------------------------------------*/
713 +
714 +[class^="wp-block-"] figcaption,
715 +[class^="wp-block-"] figcaption.editor-rich-text__tinymce.mce-content-body {
716 + font-size: 12px;
717 + font-style: italic;
718 + line-height: 1.5;
719 + margin: 9px 0 0;
720 +}
721 +
722 +/* Alignments */
723 +
724 +[class^="wp-block-"].alignleft,
725 +[class^="wp-block-"] .alignleft {
726 + margin-right: 24px;
727 +}
728 +
729 +[class^="wp-block-"].alignright,
730 +[class^="wp-block-"] .alignright {
731 + margin-left: 24px;
732 +}
733 +
734 +/*--------------------------------------------------------------
735 +2.0 Blocks - Common Blocks
736 +--------------------------------------------------------------*/
737 +
738 +/* Paragraph */
739 +
740 +p.has-drop-cap:not(:focus)::first-letter {
741 + font-size: 5em;
742 +}
743 +
744 +/* Image */
745 +
746 +.wp-block-image {
747 + margin-bottom: 24px;
748 +}
749 +
750 +.wp-block-image figcaption {
751 + text-align: left;
752 +}
753 +
754 +@media screen and (min-width: 810px) {
755 + .full-width .site-content .wp-block-image figure.alignleft {
756 + margin-left: -168px;
757 + }
758 +
759 + .full-width .site-content .wp-block-image figure.alignright {
760 + margin-right: -168px;
761 + }
762 +}
763 +
764 +.rtl .wp-block-image figcaption {
765 + text-align: right;
766 +}
767 +
768 +/* Gallery */
769 +
770 +.wp-block-gallery {
771 + margin: 0 0 24px;
772 +}
773 +
774 +.wp-block-gallery .blocks-gallery-image figcaption,
775 +.wp-block-gallery .blocks-gallery-item figcaption {
776 + left: 0;
777 + right: 0;
778 + width: auto;
779 +}
780 +
781 +/* Quote */
782 +
783 +.wp-block-quote:not(.is-large):not(.is-style-large) {
784 + border-left: 0;
785 + border-right: 0;
786 + padding-left: 0;
787 + padding-right: 0;
788 +}
789 +
790 +.wp-block-quote.is-large,
791 +.wp-block-quote.is-style-large {
792 + padding: 0;
793 +}
794 +
795 +.wp-block-quote cite {
796 + color: #2b2b2b;
797 + font-size: 16px;
798 + font-weight: 400;
799 +}
800 +
801 +.wp-block-quote.alignleft cite,
802 +.wp-block-quote.alignright cite {
803 + display: inline-block;
804 + margin-bottom: 17px;
805 + margin-top: 0;
806 +}
807 +
808 +.rtl .wp-block-quote.alignleft {
809 + margin-right: 24px;
810 +}
811 +
812 +.rtl .wp-block-quote.alignright {
813 + margin-left: 24px;
814 +}
815 +
816 +/* Audio */
817 +
818 +.wp-block-audio audio {
819 + display: block;
820 + width: 100%;
821 +}
822 +
823 +/* Cover */
824 +
825 +.wp-block-cover-image.aligncenter,
826 +.wp-block-cover.aligncenter {
827 + display: flex;
828 +}
829 +
830 +/* File */
831 +
832 +.wp-block-file .wp-block-file__button {
833 + background-color: #24890d;
834 + border: 0;
835 + border-radius: 2px;
836 + color: #fff;
837 + font-size: 12px;
838 + font-weight: 700;
839 + line-height: 15px;
840 + padding: 10px 30px 11px;
841 + text-transform: uppercase;
842 + vertical-align: bottom;
843 +}
844 +
845 +.wp-block-file .wp-block-file__button:hover,
846 +.wp-block-file .wp-block-file__button:focus {
847 + background-color: #41a62a;
848 +}
849 +
850 +.wp-block-file .wp-block-file__button:active {
851 + background-color: #55d737;
852 +}
853 +
854 +/*--------------------------------------------------------------
855 +3.0 Blocks - Formatting
856 +--------------------------------------------------------------*/
857 +
858 +/* Code */
859 +
860 +.wp-block-code {
861 + border: 0;
862 + padding: 0;
863 +}
864 +
865 +/* Pullquote */
866 +
867 +.wp-block-pullquote {
868 + border: 0;
869 + margin: 0;
870 +}
871 +
872 +.wp-block-pullquote cite {
873 + color: #2b2b2b;
874 + font-size: 16px;
875 + font-weight: 400;
876 + margin-top: 0;
877 + text-transform: none;
878 +}
879 +
880 +.wp-block-pullquote.alignleft {
881 + margin-right: 1em;
882 +}
883 +
884 +.wp-block-pullquote.alignright {
885 + margin-right: 1em;
886 +}
887 +
888 +@media screen and (min-width: 810px) {
889 + .full-width .site-content .wp-block-pullquote.alignleft {
890 + margin-left: -168px;
891 + }
892 +
893 + .full-width .site-content .wp-block-pullquote.alignright {
894 + margin-right: -168px;
895 + }
896 +}
897 +
898 +/* Table */
899 +
900 +.wp-block-table {
901 + overflow-x: visible;
902 +}
903 +
904 +.wp-block-table th,
905 +.wp-block-table td {
906 + border-color: rgba(0, 0, 0, 0.1);
907 + border-width: 0 1px 1px 0;
908 +}
909 +
910 +/*--------------------------------------------------------------
911 +4.0 Blocks - Layout Elements
912 +--------------------------------------------------------------*/
913 +
914 +/* Buttons */
915 +
916 +.wp-block-button .wp-block-button__link {
917 + border: 0;
918 + border-radius: 2px;
919 + font-size: 12px;
920 + font-weight: 700;
921 + line-height: 15px;
922 + padding: 10px 30px 11px;
923 + text-transform: uppercase;
924 + vertical-align: bottom;
925 +}
926 +
927 +.wp-block-button__link {
928 + background-color: #24890d;
929 + color: #fff;
930 +}
931 +
932 +.wp-block-button__link:hover,
933 +.wp-block-button__link:focus {
934 + background-color: #41a62a;
935 + color: #fff;
936 +}
937 +
938 +.wp-block-button__link:active {
939 + background-color: #55d737;
940 +}
941 +
942 +/* Separator */
943 +
944 +.wp-block-separator {
945 + border: 0;
946 + max-width: 100px;
947 +}
948 +
949 +.wp-block-separator.is-style-wide {
950 + max-width: 100%;
951 +}
952 +
953 +/* Media & Text */
954 +
955 +.wp-block-media-text {
956 + margin-bottom: 24px;
957 +}
958 +
959 +.wp-block-media-text *:last-child {
960 + margin-bottom: 0;
961 +}
962 +
963 +/*--------------------------------------------------------------
964 +5.0 Blocks - Widgets
965 +--------------------------------------------------------------*/
966 +
967 +/* Archives, Categories & Latest Posts */
968 +
969 +.wp-block-archives.aligncenter,
970 +.wp-block-categories.aligncenter,
971 +.wp-block-latest-posts.aligncenter {
972 + list-style-position: inside;
973 + margin-left: 20px;
974 + text-align: center;
975 +}
976 +
977 +.rtl .wp-block-archives.aligncenter,
978 +.rtl .wp-block-categories.aligncenter,
979 +.rtl .wp-block-latest-posts.aligncenter {
980 + margin-left: 0;
981 + margin-right: 20px;
982 +}
983 +
984 +/* Latest Comments */
985 +
986 +.wp-block-latest-comments {
987 + margin: 0;
988 + padding: 0;
989 +}
990 +
991 +.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,
992 +.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta {
993 + margin-left: 60px;
994 +}
995 +
996 +.wp-block-latest-comments .avatar, .wp-block-latest-comments__comment-avatar {
997 + border-radius: 0;
998 + border: 1px solid rgba(0, 0, 0, 0.1);
999 + padding: 2px;
1000 +}
1001 +
1002 +.wp-block-latest-comments__comment,
1003 +.wp-block-latest-comments__comment-excerpt,
1004 +.wp-block-latest-comments__comment-excerpt p {
1005 + font-size: 16px;
1006 +}
1007 +
1008 +.wp-block-latest-comments__comment-meta a {
1009 + color: #2b2b2b;
1010 + font-weight: 900;
1011 + text-decoration: none;
1012 +}
1013 +
1014 +.wp-block-latest-comments_comment-meta a:hover,
1015 +.wp-block-latest-comments_comment-meta a:focus {
1016 + color: #41a62a;
1017 +}
1018 +
1019 +.wp-block-latest-comments__comment-excerpt p:last-child {
1020 +}
1021 +
1022 +.wp-block-latest-comments__comment-date {
1023 + text-transform: uppercase;
1024 +}
1025 +
1026 +.wp-block-latest-comments .wp-block-latest-comments__comment {
1027 + border-top: 1px solid rgba(0, 0, 0, 0.1);
1028 + margin-bottom: 24px;
1029 + padding-top: 24px;
1030 +}
1031 +
1032 +/* Latest Posts */
1033 +
1034 +.wp-block-latest-posts.is-grid {
1035 + margin-left: 0;
1036 + margin-right: 0;
1037 +}
1038 +
1039 +/*--------------------------------------------------------------
1040 +6.0 Blocks - Colors
1041 +--------------------------------------------------------------*/
1042 +
1043 +.has-green-color {
1044 + color: #24890d;
1045 +}
1046 +
1047 +.has-green-background-color {
1048 + background-color: #24890d;
1049 +}
1050 +
1051 +.has-black-color {
1052 + color: #000;
1053 +}
1054 +
1055 +.has-black-background-color {
1056 + background-color: #000;
1057 +}
1058 +
1059 +.has-dark-gray-color {
1060 + color: #2b2b2b;
1061 +}
1062 +
1063 +.has-dark-gray-background-color {
1064 + background-color: #2b2b2b;
1065 +}
1066 +
1067 +.has-medium-gray-color {
1068 + color: #767676;
1069 +}
1070 +
1071 +.has-medium-gray-background-color {
1072 + background-color: #767676;
1073 +}
1074 +
1075 +.has-light-gray-color {
1076 + color: #f5f5f5;
1077 +}
1078 +
1079 +.has-light-gray-background-color {
1080 + background-color: #f5f5f5;
1081 +}
1082 +
1083 +.has-white-color {
1084 + color: #fff;
1085 +}
1086 +
1087 +.has-white-background-color {
1088 + background-color: #fff;
1089 +}
1090
1091 diff --git a/themes/twentyfourteen/css/editor-blocks.css b/themes/twentyfourteen/css/editor-blocks.css
1092 new file mode 100644
1093 index 0000000..e8fba39
1094 --- /dev/null
1095 +++ b/themes/twentyfourteen/css/editor-blocks.css
1096 @@ -0,0 +1,479 @@
1097 +/*
1098 +Theme Name: Twenty Fourteen
1099 +Description: Used to style blocks in the editor.
1100 +*/
1101 +
1102 +/*--------------------------------------------------------------
1103 +>>> TABLE OF CONTENTS:
1104 +----------------------------------------------------------------
1105 +1.0 General Typography
1106 +2.0 General Block Styles
1107 +3.0 Blocks - Common Blocks
1108 +4.0 Blocks - Formatting
1109 +5.0 Blocks - Layout Elements
1110 +6.0 Blocks - Widgets
1111 +--------------------------------------------------------------*/
1112 +
1113 +/*--------------------------------------------------------------
1114 +1.0 General Typography
1115 +--------------------------------------------------------------*/
1116 +
1117 +.edit-post-visual-editor .editor-block-list__block,
1118 +.edit-post-visual-editor .editor-block-list__block p,
1119 +.editor-default-block-appender textarea.editor-default-block-appender__content {
1120 + font-size: 16px;
1121 + line-height: 1.5;
1122 +}
1123 +
1124 +.editor-default-block-appender textarea.editor-default-block-appender__content {
1125 + font-family: Lato, sans-serif;
1126 +}
1127 +
1128 +.edit-post-visual-editor .editor-block-list__block {
1129 + color: #2b2b2b;
1130 +}
1131 +
1132 +.editor-post-title__block .editor-post-title__input {
1133 + font-family: Lato, sans-serif;
1134 + font-size: 33px;
1135 + font-weight: 300;
1136 + line-height: 1.0909090909;
1137 + text-transform: uppercase;
1138 +}
1139 +
1140 +/* Headers */
1141 +
1142 +.wp-block-freeform.block-library-rich-text__tinymce h1 {
1143 + font-size: 26px;
1144 +}
1145 +
1146 +.wp-block-freeform.block-library-rich-text__tinymce h2 {
1147 + font-size: 24px;
1148 +}
1149 +
1150 +.wp-block-freeform.block-library-rich-text__tinymce h3 {
1151 + font-size: 22px;
1152 +}
1153 +
1154 +.wp-block-freeform.block-library-rich-text__tinymce h4 {
1155 + font-size: 20px;
1156 +}
1157 +
1158 +.wp-block-freeform.block-library-rich-text__tinymce h5 {
1159 + font-size: 18px;
1160 +}
1161 +
1162 +.wp-block-freeform.block-library-rich-text__tinymce h6 {
1163 + font-size: 16px;
1164 +}
1165 +
1166 +/*--------------------------------------------------------------
1167 +2.0 General Block Styles
1168 +--------------------------------------------------------------*/
1169 +
1170 +/* Main column width */
1171 +
1172 +.wp-block {
1173 + max-width: 504px; /* 474px + 30px to account for padding */
1174 +}
1175 +
1176 +/* Link styles */
1177 +
1178 +.edit-post-visual-editor a,
1179 +.editor-block-list__block a,
1180 +.wp-block-freeform.block-library-rich-text__tinymce a {
1181 + color: #24890d;
1182 +}
1183 +
1184 +/* List styles */
1185 +
1186 +.wp-block-freeform.block-library-rich-text__tinymce li {
1187 + line-height: 1.5;
1188 +}
1189 +
1190 +.edit-post-visual-editor ul:not(.wp-block-gallery),
1191 +.editor-block-list__block ul:not(.wp-block-gallery),
1192 +.block-library-list ul,
1193 +.edit-post-visual-editor ol,
1194 +.editor-block-list__block ol,
1195 +.block-library-list ol {
1196 + margin: 0 0 1.6em 1.3333em;
1197 + padding: 0;
1198 +}
1199 +
1200 +.block-library-list .editor-rich-text__tinymce {
1201 + padding: 0;
1202 +}
1203 +
1204 +.edit-post-visual-editor ul:not(.wp-block-gallery),
1205 +.editor-block-list__block ul:not(.wp-block-gallery),
1206 +.block-library-list ul {
1207 + list-style: disc;
1208 +}
1209 +
1210 +.edit-post-visual-editor ol,
1211 +.editor-block-list__block ol,
1212 +.block-library-list ol {
1213 + list-style: decimal;
1214 +}
1215 +
1216 +.edit-post-visual-editor ul:not(.wp-block-gallery) li > ul,
1217 +.editor-block-list__block ul:not(.wp-block-gallery) li > ul,
1218 +.block-library-list li > ul,
1219 +.edit-post-visual-editor li > ol,
1220 +.editor-block-list__block li > ol,
1221 +.block-library-list li > ol {
1222 + margin-bottom: 0;
1223 +}
1224 +
1225 +.wp-block-freeform.block-library-rich-text__tinymce li,
1226 +.editor-block-list__block li {
1227 + margin-bottom: 0;
1228 +}
1229 +
1230 +.rtl .edit-post-visual-editor ul:not(.wp-block-gallery),
1231 +.rtl .editor-block-list__block ul:not(.wp-block-gallery),
1232 +.rtl .block-library-list ul,
1233 +.rtl .edit-post-visual-editor ol,
1234 +.rtl .editor-block-list__block ol,
1235 +.rtl .block-library-list ol {
1236 + margin-left: 0;
1237 + margin-right: 1.3333em;
1238 +}
1239 +
1240 +/* Code */
1241 +
1242 +.wp-block-freeform.block-library-rich-text__tinymce code {
1243 + background: transparent;
1244 +}
1245 +
1246 +
1247 +/* Captions */
1248 +
1249 +[class^="wp-block-"] figcaption,
1250 +[class^="wp-block-"] figcaption.editor-rich-text__tinymce.mce-content-body {
1251 + font-size: 12px;
1252 + font-style: italic;
1253 + line-height: 1.5;
1254 + margin: 9px 0 0;
1255 +}
1256 +
1257 +/* Tables */
1258 +
1259 +.edit-post-visual-editor .editor-block-list__block table,
1260 +.edit-post-visual-editor .editor-block-list__block table th,
1261 +.edit-post-visual-editor .editor-block-list__block table td {
1262 + border: 1px solid rgba(0, 0, 0, 0.1);
1263 + font-size: 14px;
1264 + line-height: 1.2857142857;
1265 +}
1266 +
1267 +.edit-post-visual-editor .editor-block-list__block table {
1268 + border-collapse: separate;
1269 + border-spacing: 0;
1270 + border-width: 1px 0 0 1px;
1271 + margin-bottom: 24px;
1272 + width: 100%;
1273 +}
1274 +
1275 +.edit-post-visual-editor .editor-block-list__block table th {
1276 + border-width: 0 1px 1px 0;
1277 + font-weight: 700;
1278 + text-align: left;
1279 + text-transform: uppercase;
1280 +}
1281 +
1282 +.edit-post-visual-editor .editor-block-list__block table td {
1283 + border-width: 0 1px 1px 0;
1284 +}
1285 +
1286 +.rtl .edit-post-visual-editor .editor-block-list__block table th {
1287 + text-align: right;
1288 +}
1289 +
1290 +/* Quotes */
1291 +
1292 +.wp-block-freeform.block-library-rich-text__tinymce blockquote {
1293 + border-left: 0;
1294 + border-right: 0;
1295 + padding-left: 0;
1296 + padding-right: 0;
1297 +}
1298 +
1299 +.wp-block-freeform.block-library-rich-text__tinymce blockquote p {
1300 + font-size: 19px;
1301 +}
1302 +
1303 +/* Tables */
1304 +
1305 +.editor-block-list__block .wp-block-table th,
1306 +.editor-block-list__block .wp-block-table td {
1307 + padding: 0;
1308 +}
1309 +
1310 +/*--------------------------------------------------------------
1311 +3.0 Blocks - Common Blocks
1312 +--------------------------------------------------------------*/
1313 +
1314 +/* Paragraph */
1315 +
1316 +p.has-drop-cap:not(:focus)::first-letter {
1317 + font-size: 5em;
1318 +}
1319 +
1320 +/* Image */
1321 +
1322 +.wp-block-image {
1323 + margin-bottom: 24px;
1324 + max-width: 800px;
1325 +}
1326 +
1327 +.wp-block-image figcaption {
1328 + text-align: left;
1329 +}
1330 +
1331 +@media screen and (min-width: 810px) {
1332 + [data-type="core/image"][data-align="left"] .editor-block-list__block-edit {
1333 + clear: left;
1334 + margin-left: -198px; /* 30px wider than front-end, to account for editor tool spacing */
1335 + }
1336 +
1337 + [data-type="core/image"][data-align="right"] .editor-block-list__block-edit {
1338 + clear: right;
1339 + margin-right: -198px; /* 30px wider than front-end, to account for editor tool spacing */
1340 + }
1341 +}
1342 +
1343 +.rtl .wp-block-image figcaption {
1344 + text-align: right;
1345 +}
1346 +
1347 +/* Gallery */
1348 +
1349 +.editor-block-list__block .wp-block-gallery {
1350 + margin-left: 0;
1351 + margin-right: 0;
1352 +}
1353 +
1354 +/* Quote */
1355 +
1356 +.editor-block-list__block .wp-block-quote p {
1357 + font-size: 19px;
1358 +}
1359 +
1360 +.wp-block-quote:not(.is-large):not(.is-style-large) {
1361 + border-left: 0;
1362 + border-right: 0;
1363 + padding-left: 0;
1364 + padding-right: 0;
1365 +}
1366 +
1367 +.wp-block-quote.is-large,
1368 +.wp-block-quote.is-style-large {
1369 + padding: 0;
1370 +}
1371 +
1372 +.wp-block-quote.is-large p,
1373 +.wp-block-quote.is-style-large p {
1374 + font-size: 24px;
1375 + line-height: 1.6;
1376 +}
1377 +
1378 +.wp-block-quote .wp-block-quote__citation {
1379 + color: #2b2b2b;
1380 + font-size: 16px;
1381 + font-weight: 400;
1382 + margin-top: 0;
1383 +}
1384 +
1385 +.wp-block-quote.alignleft .wp-block-quote__citation,
1386 +.wp-block-quote.alignright .wp-block-quote__citation {
1387 + display: inline-block;
1388 + margin-bottom: 17px;
1389 +}
1390 +
1391 +@media screen and (min-width: 1200px) {
1392 + .editor-block-list__block .wp-block-quote.alignleft,
1393 + .editor-block-list__block .wp-block-quote.alignright {
1394 + width: -webkit-calc(50% + 130px);
1395 + width: calc(50% + 130px);
1396 + }
1397 +
1398 + .editor-block-list__block .wp-block-quote.alignleft {
1399 + clear: left;
1400 + margin-left: -168px;
1401 + }
1402 +
1403 + .editor-block-list__block .wp-block-quote.alignright {
1404 + clear: right;
1405 + margin-right: -168px;
1406 + }
1407 +}
1408 +
1409 +/* Cover */
1410 +
1411 +.wp-block-cover-image.aligncenter,
1412 +.wp-block-cover.aligncenter {
1413 + display: flex;
1414 +}
1415 +
1416 +/* File */
1417 +
1418 +.wp-block-file .wp-block-file__textlink {
1419 + color: #24890d;
1420 + text-decoration: underline;
1421 +}
1422 +
1423 +.wp-block-file .wp-block-file__button {
1424 + background-color: #24890d;
1425 + border: 0;
1426 + border-radius: 2px;
1427 + color: #fff;
1428 + font-size: 12px;
1429 + font-weight: 700;
1430 + line-height: normal;
1431 + padding: 10px 30px 11px;
1432 + text-transform: uppercase;
1433 + vertical-align: bottom;
1434 +}
1435 +
1436 +.editor-block-list__block .wp-block-file .wp-block-file__button.mce-content-body {
1437 + line-height: normal;
1438 +}
1439 +
1440 +/*--------------------------------------------------------------
1441 +4.0 Blocks - Formatting
1442 +--------------------------------------------------------------*/
1443 +
1444 +/* Code */
1445 +
1446 +.wp-block-code {
1447 + border: 0;
1448 + padding: 0;
1449 +}
1450 +
1451 +/* Pullquote */
1452 +
1453 +.wp-block-pullquote {
1454 + border: 0;
1455 + margin: 0;
1456 +}
1457 +
1458 +.wp-block-pullquote .wp-block-pullquote__citation {
1459 + color: #2b2b2b;
1460 + font-size: 16px;
1461 + font-weight: 400;
1462 + margin-top: 0;
1463 + text-transform: none;
1464 +}
1465 +
1466 +.wp-block-pullquote.alignleft blockquote > .editor-rich-text p,
1467 +.wp-block-pullquote.alignright blockquote > .editor-rich-text p {
1468 + font-size: 20px;
1469 +}
1470 +
1471 +@media screen and (min-width: 810px) {
1472 + .editor-block-list__block .wp-block-pullquote.alignleft {
1473 + margin-left: -168px;
1474 + }
1475 +
1476 + .editor-block-list__block .wp-block-pullquote.alignright {
1477 + margin-right: -168px;
1478 + }
1479 +}
1480 +
1481 +/*--------------------------------------------------------------
1482 +5.0 Blocks - Layout Elements
1483 +--------------------------------------------------------------*/
1484 +
1485 +/* Buttons */
1486 +
1487 +.wp-block-button .wp-block-button__link {
1488 + background-color: #24890d;
1489 + border: 0;
1490 + border-radius: 2px;
1491 + color: #fff;
1492 + font-size: 12px;
1493 + font-weight: 700;
1494 + padding: 10px 30px 11px;
1495 + text-transform: uppercase;
1496 + vertical-align: bottom;
1497 +}
1498 +
1499 +.editor-block-list__block .wp-block-button .mce-content-body {
1500 + line-height: normal;
1501 +}
1502 +
1503 +/* Media & Text */
1504 +
1505 +.wp-block-media-text *:last-child {
1506 + margin-bottom: 0;
1507 +}
1508 +
1509 +/*--------------------------------------------------------------
1510 +6.0 Blocks - Widgets
1511 +--------------------------------------------------------------*/
1512 +
1513 +/* Archives, Categories & Latest Posts */
1514 +
1515 +[data-align="center"] .wp-block-archives ul,
1516 +[data-align="center"] .wp-block-categories ul,
1517 +[data-align="center"] .wp-block-categories ul {
1518 + list-style-position: inside;
1519 +}
1520 +
1521 +.wp-block-archives li a,
1522 +.wp-block-categories__list li a,
1523 +.wp-block-latest-posts li a {
1524 + text-decoration: underline;
1525 +}
1526 +
1527 +/* Latest Comments */
1528 +
1529 +.editor-block-list__block ol.wp-block-latest-comments,
1530 +.rtl .editor-block-list__block ol.wp-block-latest-comments {
1531 + margin: 0;
1532 + padding: 0;
1533 +}
1534 +
1535 +.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,
1536 +.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta {
1537 + margin-left: 60px;
1538 +}
1539 +
1540 +.wp-block-latest-comments .avatar, .wp-block-latest-comments__comment-avatar {
1541 + border-radius: 0;
1542 + border: 1px solid rgba(0, 0, 0, 0.1);
1543 + padding: 2px;
1544 +}
1545 +
1546 +.wp-block-latest-comments__comment,
1547 +.wp-block-latest-comments__comment-excerpt,
1548 +.wp-block-latest-comments__comment-excerpt p {
1549 + font-size: 16px;
1550 +}
1551 +
1552 +.editor-block-list__block .wp-block-latest-comments__comment-meta a,
1553 +.editor-block-list__block .wp-block-latest-comments__comment-meta a:visited {
1554 + color: #2b2b2b;
1555 + font-weight: 900;
1556 + text-decoration: none;
1557 +}
1558 +
1559 +.wp-block-latest-comments__comment-date {
1560 + text-transform: uppercase;
1561 +}
1562 +
1563 +.wp-block-latest-comments .wp-block-latest-comments__comment {
1564 + border-top: 1px solid rgba(0, 0, 0, 0.1);
1565 + margin-bottom: 24px;
1566 + padding-top: 24px;
1567 +}
1568 +
1569 +/* Latest Posts */
1570 +
1571 +.edit-post-visual-editor .editor-block-list__block .wp-block-latest-posts.is-grid {
1572 + list-style: none;
1573 + margin-left: 0;
1574 + margin-right: 0;
1575 +}
1576
1577 diff --git a/themes/twentyfourteen/featured-content.php b/themes/twentyfourteen/featured-content.php
1578 index f9f32dd..c56edf3 100644
1579 --- a/themes/twentyfourteen/featured-content.php
1580 +++ b/themes/twentyfourteen/featured-content.php
1581 @@ -19,11 +19,11 @@
1582 do_action( 'twentyfourteen_featured_posts_before' );
1583
1584 $featured_posts = twentyfourteen_get_featured_posts();
1585 - foreach ( (array) $featured_posts as $order => $post ) :
1586 - setup_postdata( $post );
1587 + foreach ( (array) $featured_posts as $order => $post ) :
1588 + setup_postdata( $post );
1589
1590 - // Include the featured content template.
1591 - get_template_part( 'content', 'featured-post' );
1592 + // Include the featured content template.
1593 + get_template_part( 'content', 'featured-post' );
1594 endforeach;
1595
1596 /**
1597
1598 diff --git a/themes/twentyfourteen/footer.php b/themes/twentyfourteen/footer.php
1599 index d1016eb..066fa38 100644
1600 --- a/themes/twentyfourteen/footer.php
1601 +++ b/themes/twentyfourteen/footer.php
1602 @@ -32,4 +32,4 @@
1603
1604 <?php wp_footer(); ?>
1605 </body>
1606 -</html>
1607 +</html>
1608 \ No newline at end of file
1609
1610 diff --git a/themes/twentyfourteen/functions.php b/themes/twentyfourteen/functions.php
1611 index 49deb79..3babfeb 100644
1612 --- a/themes/twentyfourteen/functions.php
1613 +++ b/themes/twentyfourteen/functions.php
1614 @@ -44,101 +44,122 @@ if ( version_compare( $GLOBALS['wp_version'], '3.6', '<' ) ) {
1615 }
1616
1617 if ( ! function_exists( 'twentyfourteen_setup' ) ) :
1618 - /**
1619 - * Twenty Fourteen setup.
1620 - *
1621 - * Set up theme defaults and registers support for various WordPress features.
1622 - *
1623 - * Note that this function is hooked into the after_setup_theme hook, which
1624 - * runs before the init hook. The init hook is too late for some features, such
1625 - * as indicating support post thumbnails.
1626 +/**
1627 + * Twenty Fourteen setup.
1628 + *
1629 + * Set up theme defaults and registers support for various WordPress features.
1630 + *
1631 + * Note that this function is hooked into the after_setup_theme hook, which
1632 + * runs before the init hook. The init hook is too late for some features, such
1633 + * as indicating support post thumbnails.
1634 + *
1635 + * @since Twenty Fourteen 1.0
1636 + */
1637 +function twentyfourteen_setup() {
1638 +
1639 + /*
1640 + * Make Twenty Fourteen available for translation.
1641 *
1642 - * @since Twenty Fourteen 1.0
1643 + * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfourteen
1644 + * If you're building a theme based on Twenty Fourteen, use a find and
1645 + * replace to change 'twentyfourteen' to the name of your theme in all
1646 + * template files.
1647 */
1648 - function twentyfourteen_setup() {
1649 -
1650 - /*
1651 - * Make Twenty Fourteen available for translation.
1652 - *
1653 - * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfourteen
1654 - * If you're building a theme based on Twenty Fourteen, use a find and
1655 - * replace to change 'twentyfourteen' to the name of your theme in all
1656 - * template files.
1657 - */
1658 - load_theme_textdomain( 'twentyfourteen' );
1659 -
1660 - // This theme styles the visual editor to resemble the theme style.
1661 - add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) );
1662 -
1663 - // Add RSS feed links to <head> for posts and comments.
1664 - add_theme_support( 'automatic-feed-links' );
1665 -
1666 - // Enable support for Post Thumbnails, and declare two sizes.
1667 - add_theme_support( 'post-thumbnails' );
1668 - set_post_thumbnail_size( 672, 372, true );
1669 - add_image_size( 'twentyfourteen-full-width', 1038, 576, true );
1670 -
1671 - // This theme uses wp_nav_menu() in two locations.
1672 - register_nav_menus(
1673 - array(
1674 - 'primary' => __( 'Top primary menu', 'twentyfourteen' ),
1675 - 'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ),
1676 - )
1677 - );
1678 + load_theme_textdomain( 'twentyfourteen' );
1679
1680 - /*
1681 - * Switch default core markup for search form, comment form, and comments
1682 - * to output valid HTML5.
1683 - */
1684 - add_theme_support(
1685 - 'html5', array(
1686 - 'search-form',
1687 - 'comment-form',
1688 - 'comment-list',
1689 - 'gallery',
1690 - 'caption',
1691 - )
1692 - );
1693 + // This theme styles the visual editor to resemble the theme style.
1694 + add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) );
1695
1696 - /*
1697 - * Enable support for Post Formats.
1698 - * See https://codex.wordpress.org/Post_Formats
1699 - */
1700 - add_theme_support(
1701 - 'post-formats', array(
1702 - 'aside',
1703 - 'image',
1704 - 'video',
1705 - 'audio',
1706 - 'quote',
1707 - 'link',
1708 - 'gallery',
1709 - )
1710 - );
1711 + // Load regular editor styles into the new block-based editor.
1712 + add_theme_support( 'editor-styles' );
1713
1714 - // This theme allows users to set a custom background.
1715 - add_theme_support(
1716 - 'custom-background', apply_filters(
1717 - 'twentyfourteen_custom_background_args', array(
1718 - 'default-color' => 'f5f5f5',
1719 - )
1720 - )
1721 - );
1722 + // Load default block styles.
1723 + add_theme_support( 'wp-block-styles' );
1724
1725 - // Add support for featured content.
1726 - add_theme_support(
1727 - 'featured-content', array(
1728 - 'featured_content_filter' => 'twentyfourteen_get_featured_posts',
1729 - 'max_posts' => 6,
1730 - )
1731 - );
1732 + // Add support for responsive embeds.
1733 + add_theme_support( 'responsive-embeds' );
1734 +
1735 + // Add support for custom color scheme.
1736 + add_theme_support( 'editor-color-palette', array(
1737 + array(
1738 + 'name' => __( 'Green', 'twentyfourteen' ),
1739 + 'slug' => 'green',
1740 + 'color' => '#24890d',
1741 + ),
1742 + array(
1743 + 'name' => __( 'Black', 'twentyfourteen' ),
1744 + 'slug' => 'black',
1745 + 'color' => '#000',
1746 + ),
1747 + array(
1748 + 'name' => __( 'Dark Gray', 'twentyfourteen' ),
1749 + 'slug' => 'dark-gray',
1750 + 'color' => '#2b2b2b',
1751 + ),
1752 + array(
1753 + 'name' => __( 'Medium Gray', 'twentyfourteen' ),
1754 + 'slug' => 'medium-gray',
1755 + 'color' => '#767676',
1756 + ),
1757 + array(
1758 + 'name' => __( 'Light Gray', 'twentyfourteen' ),
1759 + 'slug' => 'light-gray',
1760 + 'color' => '#f5f5f5',
1761 + ),
1762 + array(
1763 + 'name' => __( 'White', 'twentyfourteen' ),
1764 + 'slug' => 'white',
1765 + 'color' => '#fff',
1766 + ),
1767 + ) );
1768 +
1769 + // Add RSS feed links to <head> for posts and comments.
1770 + add_theme_support( 'automatic-feed-links' );
1771 +
1772 + // Enable support for Post Thumbnails, and declare two sizes.
1773 + add_theme_support( 'post-thumbnails' );
1774 + set_post_thumbnail_size( 672, 372, true );
1775 + add_image_size( 'twentyfourteen-full-width', 1038, 576, true );
1776 +
1777 + // This theme uses wp_nav_menu() in two locations.
1778 + register_nav_menus( array(
1779 + 'primary' => __( 'Top primary menu', 'twentyfourteen' ),
1780 + 'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ),
1781 + ) );
1782
1783 - // This theme uses its own gallery styles.
1784 - add_filter( 'use_default_gallery_style', '__return_false' );
1785 + /*
1786 + * Switch default core markup for search form, comment form, and comments
1787 + * to output valid HTML5.
1788 + */
1789 + add_theme_support( 'html5', array(
1790 + 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
1791 + ) );
1792
1793 - // Indicate widget sidebars can use selective refresh in the Customizer.
1794 - add_theme_support( 'customize-selective-refresh-widgets' );
1795 - }
1796 + /*
1797 + * Enable support for Post Formats.
1798 + * See https://codex.wordpress.org/Post_Formats
1799 + */
1800 + add_theme_support( 'post-formats', array(
1801 + 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery',
1802 + ) );
1803 +
1804 + // This theme allows users to set a custom background.
1805 + add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array(
1806 + 'default-color' => 'f5f5f5',
1807 + ) ) );
1808 +
1809 + // Add support for featured content.
1810 + add_theme_support( 'featured-content', array(
1811 + 'featured_content_filter' => 'twentyfourteen_get_featured_posts',
1812 + 'max_posts' => 6,
1813 + ) );
1814 +
1815 + // This theme uses its own gallery styles.
1816 + add_filter( 'use_default_gallery_style', '__return_false' );
1817 +
1818 + // Indicate widget sidebars can use selective refresh in the Customizer.
1819 + add_theme_support( 'customize-selective-refresh-widgets' );
1820 +}
1821 endif; // twentyfourteen_setup
1822 add_action( 'after_setup_theme', 'twentyfourteen_setup' );
1823
1824 @@ -192,39 +213,33 @@ function twentyfourteen_widgets_init() {
1825 require get_template_directory() . '/inc/widgets.php';
1826 register_widget( 'Twenty_Fourteen_Ephemera_Widget' );
1827
1828 - register_sidebar(
1829 - array(
1830 - 'name' => __( 'Primary Sidebar', 'twentyfourteen' ),
1831 - 'id' => 'sidebar-1',
1832 - 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
1833 - 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
1834 - 'after_widget' => '</aside>',
1835 - 'before_title' => '<h1 class="widget-title">',
1836 - 'after_title' => '</h1>',
1837 - )
1838 - );
1839 - register_sidebar(
1840 - array(
1841 - 'name' => __( 'Content Sidebar', 'twentyfourteen' ),
1842 - 'id' => 'sidebar-2',
1843 - 'description' => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ),
1844 - 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
1845 - 'after_widget' => '</aside>',
1846 - 'before_title' => '<h1 class="widget-title">',
1847 - 'after_title' => '</h1>',
1848 - )
1849 - );
1850 - register_sidebar(
1851 - array(
1852 - 'name' => __( 'Footer Widget Area', 'twentyfourteen' ),
1853 - 'id' => 'sidebar-3',
1854 - 'description' => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),
1855 - 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
1856 - 'after_widget' => '</aside>',
1857 - 'before_title' => '<h1 class="widget-title">',
1858 - 'after_title' => '</h1>',
1859 - )
1860 - );
1861 + register_sidebar( array(
1862 + 'name' => __( 'Primary Sidebar', 'twentyfourteen' ),
1863 + 'id' => 'sidebar-1',
1864 + 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
1865 + 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
1866 + 'after_widget' => '</aside>',
1867 + 'before_title' => '<h1 class="widget-title">',
1868 + 'after_title' => '</h1>',
1869 + ) );
1870 + register_sidebar( array(
1871 + 'name' => __( 'Content Sidebar', 'twentyfourteen' ),
1872 + 'id' => 'sidebar-2',
1873 + 'description' => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ),
1874 + 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
1875 + 'after_widget' => '</aside>',
1876 + 'before_title' => '<h1 class="widget-title">',
1877 + 'after_title' => '</h1>',
1878 + ) );
1879 + register_sidebar( array(
1880 + 'name' => __( 'Footer Widget Area', 'twentyfourteen' ),
1881 + 'id' => 'sidebar-3',
1882 + 'description' => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),
1883 + 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
1884 + 'after_widget' => '</aside>',
1885 + 'before_title' => '<h1 class="widget-title">',
1886 + 'after_title' => '</h1>',
1887 + ) );
1888 }
1889 add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
1890
1891 @@ -246,7 +261,7 @@ function twentyfourteen_font_url() {
1892 'family' => urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ),
1893 'subset' => urlencode( 'latin,latin-ext' ),
1894 );
1895 - $font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
1896 + $font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
1897 }
1898
1899 return $font_url;
1900 @@ -267,6 +282,9 @@ function twentyfourteen_scripts() {
1901 // Load our main stylesheet.
1902 wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri() );
1903
1904 + // Theme block stylesheet.
1905 + wp_enqueue_style( 'twentyfourteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfourteen-style' ), '20181018' );
1906 +
1907 // Load the Internet Explorer specific stylesheet.
1908 wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131205' );
1909 wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' );
1910 @@ -285,12 +303,10 @@ function twentyfourteen_scripts() {
1911
1912 if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) {
1913 wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131205', true );
1914 - wp_localize_script(
1915 - 'twentyfourteen-slider', 'featuredSliderDefaults', array(
1916 - 'prevText' => __( 'Previous', 'twentyfourteen' ),
1917 - 'nextText' => __( 'Next', 'twentyfourteen' ),
1918 - )
1919 - );
1920 + wp_localize_script( 'twentyfourteen-slider', 'featuredSliderDefaults', array(
1921 + 'prevText' => __( 'Previous', 'twentyfourteen' ),
1922 + 'nextText' => __( 'Next', 'twentyfourteen' )
1923 + ) );
1924 }
1925
1926 wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150315', true );
1927 @@ -332,100 +348,110 @@ function twentyfourteen_resource_hints( $urls, $relation_type ) {
1928 }
1929 add_filter( 'wp_resource_hints', 'twentyfourteen_resource_hints', 10, 2 );
1930
1931 +/**
1932 + * Enqueue styles for the block-based editor.
1933 + *
1934 + * @since Twenty Fourteen 2.3
1935 + */
1936 +function twentyfourteen_block_editor_styles() {
1937 + // Block styles.
1938 + wp_enqueue_style( 'twentyfourteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
1939 + // Add custom fonts.
1940 + wp_enqueue_style( 'twentyfourteen-fonts', twentyfourteen_font_url(), array(), null );
1941 +}
1942 +add_action( 'enqueue_block_editor_assets', 'twentyfourteen_block_editor_styles' );
1943 +
1944 if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) :
1945 +/**
1946 + * Print the attached image with a link to the next attached image.
1947 + *
1948 + * @since Twenty Fourteen 1.0
1949 + */
1950 +function twentyfourteen_the_attached_image() {
1951 + $post = get_post();
1952 /**
1953 - * Print the attached image with a link to the next attached image.
1954 + * Filter the default Twenty Fourteen attachment size.
1955 *
1956 * @since Twenty Fourteen 1.0
1957 + *
1958 + * @param array $dimensions {
1959 + * An array of height and width dimensions.
1960 + *
1961 + * @type int $height Height of the image in pixels. Default 810.
1962 + * @type int $width Width of the image in pixels. Default 810.
1963 + * }
1964 */
1965 - function twentyfourteen_the_attached_image() {
1966 - $post = get_post();
1967 - /**
1968 - * Filter the default Twenty Fourteen attachment size.
1969 - *
1970 - * @since Twenty Fourteen 1.0
1971 - *
1972 - * @param array $dimensions {
1973 - * An array of height and width dimensions.
1974 - *
1975 - * @type int $height Height of the image in pixels. Default 810.
1976 - * @type int $width Width of the image in pixels. Default 810.
1977 - * }
1978 - */
1979 - $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 810, 810 ) );
1980 - $next_attachment_url = wp_get_attachment_url();
1981 -
1982 - /*
1983 - * Grab the IDs of all the image attachments in a gallery so we can get the URL
1984 - * of the next adjacent image in a gallery, or the first image (if we're
1985 - * looking at the last image in a gallery), or, in a gallery of one, just the
1986 - * link to that image file.
1987 - */
1988 - $attachment_ids = get_posts(
1989 - array(
1990 - 'post_parent' => $post->post_parent,
1991 - 'fields' => 'ids',
1992 - 'numberposts' => -1,
1993 - 'post_status' => 'inherit',
1994 - 'post_type' => 'attachment',
1995 - 'post_mime_type' => 'image',
1996 - 'order' => 'ASC',
1997 - 'orderby' => 'menu_order ID',
1998 - )
1999 - );
2000 + $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 810, 810 ) );
2001 + $next_attachment_url = wp_get_attachment_url();
2002
2003 - // If there is more than 1 attachment in a gallery...
2004 - if ( count( $attachment_ids ) > 1 ) {
2005 - foreach ( $attachment_ids as $idx => $attachment_id ) {
2006 - if ( $attachment_id == $post->ID ) {
2007 - $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ];
2008 - break;
2009 - }
2010 + /*
2011 + * Grab the IDs of all the image attachments in a gallery so we can get the URL
2012 + * of the next adjacent image in a gallery, or the first image (if we're
2013 + * looking at the last image in a gallery), or, in a gallery of one, just the
2014 + * link to that image file.
2015 + */
2016 + $attachment_ids = get_posts( array(
2017 + 'post_parent' => $post->post_parent,
2018 + 'fields' => 'ids',
2019 + 'numberposts' => -1,
2020 + 'post_status' => 'inherit',
2021 + 'post_type' => 'attachment',
2022 + 'post_mime_type' => 'image',
2023 + 'order' => 'ASC',
2024 + 'orderby' => 'menu_order ID',
2025 + ) );
2026 +
2027 + // If there is more than 1 attachment in a gallery...
2028 + if ( count( $attachment_ids ) > 1 ) {
2029 + foreach ( $attachment_ids as $idx => $attachment_id ) {
2030 + if ( $attachment_id == $post->ID ) {
2031 + $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ];
2032 + break;
2033 }
2034 + }
2035
2036 - // get the URL of the next image attachment...
2037 - if ( $next_id ) {
2038 - $next_attachment_url = get_attachment_link( $next_id );
2039 - } // or get the URL of the first image attachment.
2040 - else {
2041 - $next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
2042 - }
2043 + // get the URL of the next image attachment...
2044 + if ( $next_id ) {
2045 + $next_attachment_url = get_attachment_link( $next_id );
2046 }
2047
2048 - printf(
2049 - '<a href="%1$s" rel="attachment">%2$s</a>',
2050 - esc_url( $next_attachment_url ),
2051 - wp_get_attachment_image( $post->ID, $attachment_size )
2052 - );
2053 + // or get the URL of the first image attachment.
2054 + else {
2055 + $next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
2056 + }
2057 }
2058 +
2059 + printf( '<a href="%1$s" rel="attachment">%2$s</a>',
2060 + esc_url( $next_attachment_url ),
2061 + wp_get_attachment_image( $post->ID, $attachment_size )
2062 + );
2063 +}
2064 endif;
2065
2066 if ( ! function_exists( 'twentyfourteen_list_authors' ) ) :
2067 - /**
2068 - * Print a list of all site contributors who published at least one post.
2069 - *
2070 - * @since Twenty Fourteen 1.0
2071 - */
2072 - function twentyfourteen_list_authors() {
2073 - $contributor_ids = get_users(
2074 - array(
2075 - 'fields' => 'ID',
2076 - 'orderby' => 'post_count',
2077 - 'order' => 'DESC',
2078 - 'who' => 'authors',
2079 - )
2080 - );
2081 -
2082 - foreach ( $contributor_ids as $contributor_id ) :
2083 - $post_count = count_user_posts( $contributor_id );
2084 -
2085 - // Move on if user has not published a post (yet).
2086 - if ( ! $post_count ) {
2087 - continue;
2088 - }
2089 - ?>
2090 +/**
2091 + * Print a list of all site contributors who published at least one post.
2092 + *
2093 + * @since Twenty Fourteen 1.0
2094 + */
2095 +function twentyfourteen_list_authors() {
2096 + $contributor_ids = get_users( array(
2097 + 'fields' => 'ID',
2098 + 'orderby' => 'post_count',
2099 + 'order' => 'DESC',
2100 + 'who' => 'authors',
2101 + ) );
2102 +
2103 + foreach ( $contributor_ids as $contributor_id ) :
2104 + $post_count = count_user_posts( $contributor_id );
2105 +
2106 + // Move on if user has not published a post (yet).
2107 + if ( ! $post_count ) {
2108 + continue;
2109 + }
2110 + ?>
2111
2112 - <div class="contributor">
2113 + <div class="contributor">
2114 <div class="contributor-info">
2115 <div class="contributor-avatar"><?php echo get_avatar( $contributor_id, 132 ); ?></div>
2116 <div class="contributor-summary">
2117 @@ -442,7 +468,7 @@ if ( ! function_exists( 'twentyfourteen_list_authors' ) ) :
2118
2119 <?php
2120 endforeach;
2121 - }
2122 +}
2123 endif;
2124
2125 /**
2126 @@ -607,9 +633,9 @@ if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow
2127 * `is_customize_preview` function was introduced.
2128 */
2129 if ( ! function_exists( 'is_customize_preview' ) ) :
2130 - function is_customize_preview() {
2131 - global $wp_customize;
2132 +function is_customize_preview() {
2133 + global $wp_customize;
2134
2135 - return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview();
2136 - }
2137 + return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview();
2138 +}
2139 endif;
2140
2141 diff --git a/themes/twentyfourteen/header.php b/themes/twentyfourteen/header.php
2142 index 4dec164..7286d88 100644
2143 --- a/themes/twentyfourteen/header.php
2144 +++ b/themes/twentyfourteen/header.php
2145 @@ -51,15 +51,7 @@
2146 <nav id="primary-navigation" class="site-navigation primary-navigation" role="navigation">
2147 <button class="menu-toggle"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></button>
2148 <a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a>
2149 - <?php
2150 - wp_nav_menu(
2151 - array(
2152 - 'theme_location' => 'primary',
2153 - 'menu_class' => 'nav-menu',
2154 - 'menu_id' => 'primary-menu',
2155 - )
2156 - );
2157 -?>
2158 + <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu' ) ); ?>
2159 </nav>
2160 </div>
2161
2162
2163 diff --git a/themes/twentyfourteen/image.php b/themes/twentyfourteen/image.php
2164 index 999800f..83ac67f 100644
2165 --- a/themes/twentyfourteen/image.php
2166 +++ b/themes/twentyfourteen/image.php
2167 @@ -18,48 +18,45 @@ get_header();
2168
2169 <?php
2170 // Start the Loop.
2171 - while ( have_posts() ) :
2172 - the_post();
2173 + while ( have_posts() ) : the_post();
2174 ?>
2175 - <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
2176 - <header class="entry-header">
2177 - <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
2178 + <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
2179 + <header class="entry-header">
2180 + <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
2181
2182 - <div class="entry-meta">
2183 + <div class="entry-meta">
2184
2185 - <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>
2186 + <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>
2187
2188 - <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>
2189 + <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>
2190
2191 - <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>
2192 - <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
2193 - </div><!-- .entry-meta -->
2194 - </header><!-- .entry-header -->
2195 + <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>
2196 + <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
2197 + </div><!-- .entry-meta -->
2198 + </header><!-- .entry-header -->
2199
2200 - <div class="entry-content">
2201 - <div class="entry-attachment">
2202 - <div class="attachment">
2203 - <?php twentyfourteen_the_attached_image(); ?>
2204 - </div><!-- .attachment -->
2205 + <div class="entry-content">
2206 + <div class="entry-attachment">
2207 + <div class="attachment">
2208 + <?php twentyfourteen_the_attached_image(); ?>
2209 + </div><!-- .attachment -->
2210
2211 - <?php if ( has_excerpt() ) : ?>
2212 + <?php if ( has_excerpt() ) : ?>
2213 <div class="entry-caption">
2214 <?php the_excerpt(); ?>
2215 </div><!-- .entry-caption -->
2216 <?php endif; ?>
2217 - </div><!-- .entry-attachment -->
2218 + </div><!-- .entry-attachment -->
2219
2220 - <?php
2221 - the_content();
2222 - wp_link_pages(
2223 - array(
2224 + <?php
2225 + the_content();
2226 + wp_link_pages( array(
2227 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
2228 'after' => '</div>',
2229 'link_before' => '<span>',
2230 'link_after' => '</span>',
2231 - )
2232 - );
2233 - ?>
2234 + ) );
2235 + ?>
2236 </div><!-- .entry-content -->
2237 </article><!-- #post-## -->
2238
2239
2240 diff --git a/themes/twentyfourteen/inc/back-compat.php b/themes/twentyfourteen/inc/back-compat.php
2241 index 3943aee..c184d91 100644
2242 --- a/themes/twentyfourteen/inc/back-compat.php
2243 +++ b/themes/twentyfourteen/inc/back-compat.php
2244 @@ -44,11 +44,9 @@ function twentyfourteen_upgrade_notice() {
2245 * @since Twenty Fourteen 1.0
2246 */
2247 function twentyfourteen_customize() {
2248 - wp_die(
2249 - 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(
2250 - 'back_link' => true,
2251 - )
2252 - );
2253 + 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(
2254 + 'back_link' => true,
2255 + ) );
2256 }
2257 add_action( 'load-customize.php', 'twentyfourteen_customize' );
2258
2259
2260 diff --git a/themes/twentyfourteen/inc/custom-header.php b/themes/twentyfourteen/inc/custom-header.php
2261 index bfea897..287b106 100644
2262 --- a/themes/twentyfourteen/inc/custom-header.php
2263 +++ b/themes/twentyfourteen/inc/custom-header.php
2264 @@ -35,40 +35,36 @@ function twentyfourteen_custom_header_setup() {
2265 * the Appearance > Header screen.
2266 * }
2267 */
2268 - add_theme_support(
2269 - 'custom-header', apply_filters(
2270 - 'twentyfourteen_custom_header_args', array(
2271 - 'default-text-color' => 'fff',
2272 - 'width' => 1260,
2273 - 'height' => 240,
2274 - 'flex-height' => true,
2275 - 'wp-head-callback' => 'twentyfourteen_header_style',
2276 - 'admin-head-callback' => 'twentyfourteen_admin_header_style',
2277 - 'admin-preview-callback' => 'twentyfourteen_admin_header_image',
2278 - )
2279 - )
2280 - );
2281 + add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array(
2282 + 'default-text-color' => 'fff',
2283 + 'width' => 1260,
2284 + 'height' => 240,
2285 + 'flex-height' => true,
2286 + 'wp-head-callback' => 'twentyfourteen_header_style',
2287 + 'admin-head-callback' => 'twentyfourteen_admin_header_style',
2288 + 'admin-preview-callback' => 'twentyfourteen_admin_header_image',
2289 + ) ) );
2290 }
2291 add_action( 'after_setup_theme', 'twentyfourteen_custom_header_setup' );
2292
2293 if ( ! function_exists( 'twentyfourteen_header_style' ) ) :
2294 - /**
2295 - * Styles the header image and text displayed on the blog
2296 - *
2297 - * @see twentyfourteen_custom_header_setup().
2298 - */
2299 - function twentyfourteen_header_style() {
2300 - $text_color = get_header_textcolor();
2301 +/**
2302 + * Styles the header image and text displayed on the blog
2303 + *
2304 + * @see twentyfourteen_custom_header_setup().
2305 + *
2306 + */
2307 +function twentyfourteen_header_style() {
2308 + $text_color = get_header_textcolor();
2309
2310 - // If no custom color for text is set, let's bail.
2311 - if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) ) {
2312 - return;
2313 - }
2314 + // If no custom color for text is set, let's bail.
2315 + if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) )
2316 + return;
2317
2318 - // If we get this far, we have custom styles.
2319 - ?>
2320 - <style type="text/css" id="twentyfourteen-header-css">
2321 - <?php
2322 + // If we get this far, we have custom styles.
2323 + ?>
2324 + <style type="text/css" id="twentyfourteen-header-css">
2325 + <?php
2326 // Has the text been hidden?
2327 if ( ! display_header_text() ) :
2328 ?>
2329 @@ -88,20 +84,20 @@ if ( ! function_exists( 'twentyfourteen_header_style' ) ) :
2330 <?php endif; ?>
2331 </style>
2332 <?php
2333 - }
2334 +}
2335 endif; // twentyfourteen_header_style
2336
2337
2338 if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) :
2339 - /**
2340 - * Style the header image displayed on the Appearance > Header screen.
2341 - *
2342 - * @see twentyfourteen_custom_header_setup()
2343 - *
2344 - * @since Twenty Fourteen 1.0
2345 - */
2346 - function twentyfourteen_admin_header_style() {
2347 - ?>
2348 +/**
2349 + * Style the header image displayed on the Appearance > Header screen.
2350 + *
2351 + * @see twentyfourteen_custom_header_setup()
2352 + *
2353 + * @since Twenty Fourteen 1.0
2354 + */
2355 +function twentyfourteen_admin_header_style() {
2356 +?>
2357 <style type="text/css" id="twentyfourteen-admin-header-css">
2358 .appearance_page_custom-header #headimg {
2359 background-color: #000;
2360 @@ -126,20 +122,20 @@ if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) :
2361 vertical-align: middle;
2362 }
2363 </style>
2364 - <?php
2365 - }
2366 +<?php
2367 +}
2368 endif; // twentyfourteen_admin_header_style
2369
2370 if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :
2371 - /**
2372 - * Create the custom header image markup displayed on the Appearance > Header screen.
2373 - *
2374 - * @see twentyfourteen_custom_header_setup()
2375 - *
2376 - * @since Twenty Fourteen 1.0
2377 - */
2378 - function twentyfourteen_admin_header_image() {
2379 - ?>
2380 +/**
2381 + * Create the custom header image markup displayed on the Appearance > Header screen.
2382 + *
2383 + * @see twentyfourteen_custom_header_setup()
2384 + *
2385 + * @since Twenty Fourteen 1.0
2386 + */
2387 +function twentyfourteen_admin_header_image() {
2388 +?>
2389 <div id="headimg">
2390 <?php if ( get_header_image() ) : ?>
2391 <img src="<?php header_image(); ?>" alt="">
2392 @@ -147,5 +143,5 @@ if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :
2393 <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>
2394 </div>
2395 <?php
2396 - }
2397 +}
2398 endif; // twentyfourteen_admin_header_image
2399
2400 diff --git a/themes/twentyfourteen/inc/customizer.php b/themes/twentyfourteen/inc/customizer.php
2401 index 5a41f18..3928915 100644
2402 --- a/themes/twentyfourteen/inc/customizer.php
2403 +++ b/themes/twentyfourteen/inc/customizer.php
2404 @@ -16,25 +16,21 @@
2405 */
2406 function twentyfourteen_customize_register( $wp_customize ) {
2407 // Add postMessage support for site title and description.
2408 - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
2409 - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
2410 - $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
2411 + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
2412 + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
2413 + $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
2414
2415 if ( isset( $wp_customize->selective_refresh ) ) {
2416 - $wp_customize->selective_refresh->add_partial(
2417 - 'blogname', array(
2418 - 'selector' => '.site-title a',
2419 - 'container_inclusive' => false,
2420 - 'render_callback' => 'twentyfourteen_customize_partial_blogname',
2421 - )
2422 - );
2423 - $wp_customize->selective_refresh->add_partial(
2424 - 'blogdescription', array(
2425 - 'selector' => '.site-description',
2426 - 'container_inclusive' => false,
2427 - 'render_callback' => 'twentyfourteen_customize_partial_blogdescription',
2428 - )
2429 - );
2430 + $wp_customize->selective_refresh->add_partial( 'blogname', array(
2431 + 'selector' => '.site-title a',
2432 + 'container_inclusive' => false,
2433 + 'render_callback' => 'twentyfourteen_customize_partial_blogname',
2434 + ) );
2435 + $wp_customize->selective_refresh->add_partial( 'blogdescription', array(
2436 + 'selector' => '.site-description',
2437 + 'container_inclusive' => false,
2438 + 'render_callback' => 'twentyfourteen_customize_partial_blogdescription',
2439 + ) );
2440 }
2441
2442 // Rename the label to "Site Title Color" because this only affects the site title in this theme.
2443 @@ -53,38 +49,31 @@ function twentyfourteen_customize_register( $wp_customize ) {
2444 }
2445
2446 // Add the featured content section in case it's not already there.
2447 - $wp_customize->add_section(
2448 - 'featured_content', array(
2449 - 'title' => __( 'Featured Content', 'twentyfourteen' ),
2450 - 'description' => sprintf(
2451 - __( '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' ),
2452 - esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
2453 - admin_url( 'edit.php?show_sticky=1' )
2454 - ),
2455 - 'priority' => 130,
2456 - 'active_callback' => 'is_front_page',
2457 - )
2458 - );
2459 + $wp_customize->add_section( 'featured_content', array(
2460 + 'title' => __( 'Featured Content', 'twentyfourteen' ),
2461 + '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' ),
2462 + esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
2463 + admin_url( 'edit.php?show_sticky=1' )
2464 + ),
2465 + 'priority' => 130,
2466 + 'active_callback' => 'is_front_page',
2467 + ) );
2468
2469 // Add the featured content layout setting and control.
2470 - $wp_customize->add_setting(
2471 - 'featured_content_layout', array(
2472 - 'default' => 'grid',
2473 - 'sanitize_callback' => 'twentyfourteen_sanitize_layout',
2474 - )
2475 - );
2476 + $wp_customize->add_setting( 'featured_content_layout', array(
2477 + 'default' => 'grid',
2478 + 'sanitize_callback' => 'twentyfourteen_sanitize_layout',
2479 + ) );
2480
2481 - $wp_customize->add_control(
2482 - 'featured_content_layout', array(
2483 - 'label' => __( 'Layout', 'twentyfourteen' ),
2484 - 'section' => 'featured_content',
2485 - 'type' => 'select',
2486 - 'choices' => array(
2487 - 'grid' => __( 'Grid', 'twentyfourteen' ),
2488 - 'slider' => __( 'Slider', 'twentyfourteen' ),
2489 - ),
2490 - )
2491 - );
2492 + $wp_customize->add_control( 'featured_content_layout', array(
2493 + 'label' => __( 'Layout', 'twentyfourteen' ),
2494 + 'section' => 'featured_content',
2495 + 'type' => 'select',
2496 + 'choices' => array(
2497 + 'grid' => __( 'Grid', 'twentyfourteen' ),
2498 + 'slider' => __( 'Slider', 'twentyfourteen' ),
2499 + ),
2500 + ) );
2501 }
2502 add_action( 'customize_register', 'twentyfourteen_customize_register' );
2503
2504 @@ -148,18 +137,16 @@ function twentyfourteen_contextual_help() {
2505 return;
2506 }
2507
2508 - get_current_screen()->add_help_tab(
2509 - array(
2510 - 'id' => 'twentyfourteen',
2511 - 'title' => __( 'Twenty Fourteen', 'twentyfourteen' ),
2512 - 'content' =>
2513 - '<ul>' .
2514 - '<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>' .
2515 - '<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>' .
2516 - '<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>' .
2517 - '</ul>',
2518 - )
2519 - );
2520 + get_current_screen()->add_help_tab( array(
2521 + 'id' => 'twentyfourteen',
2522 + 'title' => __( 'Twenty Fourteen', 'twentyfourteen' ),
2523 + 'content' =>
2524 + '<ul>' .
2525 + '<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>' .
2526 + '<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>' .
2527 + '<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>' .
2528 + '</ul>',
2529 + ) );
2530 }
2531 add_action( 'admin_head-themes.php', 'twentyfourteen_contextual_help' );
2532 -add_action( 'admin_head-edit.php', 'twentyfourteen_contextual_help' );
2533 +add_action( 'admin_head-edit.php', 'twentyfourteen_contextual_help' );
2534
2535 diff --git a/themes/twentyfourteen/inc/featured-content.php b/themes/twentyfourteen/inc/featured-content.php
2536 index 808a8a7..ffeb993 100644
2537 --- a/themes/twentyfourteen/inc/featured-content.php
2538 +++ b/themes/twentyfourteen/inc/featured-content.php
2539 @@ -23,6 +23,8 @@ class Featured_Content {
2540 *
2541 * @since Twenty Fourteen 1.0
2542 *
2543 + * @static
2544 + * @access public
2545 * @var int
2546 */
2547 public static $max_posts = 15;
2548 @@ -32,6 +34,8 @@ class Featured_Content {
2549 *
2550 * All custom functionality will be hooked into the "init" action.
2551 *
2552 + * @static
2553 + * @access public
2554 * @since Twenty Fourteen 1.0
2555 */
2556 public static function setup() {
2557 @@ -47,6 +51,8 @@ class Featured_Content {
2558 * If no theme support is found there is no need to hook into WordPress.
2559 * We'll just return early instead.
2560 *
2561 + * @static
2562 + * @access public
2563 * @since Twenty Fourteen 1.0
2564 */
2565 public static function init() {
2566 @@ -77,15 +83,15 @@ class Featured_Content {
2567 self::$max_posts = absint( $theme_support[0]['max_posts'] );
2568 }
2569
2570 - add_filter( $filter, array( __CLASS__, 'get_featured_posts' ) );
2571 - add_action( 'customize_register', array( __CLASS__, 'customize_register' ), 9 );
2572 - add_action( 'admin_init', array( __CLASS__, 'register_setting' ) );
2573 - add_action( 'switch_theme', array( __CLASS__, 'delete_transient' ) );
2574 - add_action( 'save_post', array( __CLASS__, 'delete_transient' ) );
2575 - add_action( 'delete_post_tag', array( __CLASS__, 'delete_post_tag' ) );
2576 - add_action( 'customize_controls_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
2577 - add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ) );
2578 - add_action( 'wp_loaded', array( __CLASS__, 'wp_loaded' ) );
2579 + add_filter( $filter, array( __CLASS__, 'get_featured_posts' ) );
2580 + add_action( 'customize_register', array( __CLASS__, 'customize_register' ), 9 );
2581 + add_action( 'admin_init', array( __CLASS__, 'register_setting' ) );
2582 + add_action( 'switch_theme', array( __CLASS__, 'delete_transient' ) );
2583 + add_action( 'save_post', array( __CLASS__, 'delete_transient' ) );
2584 + add_action( 'delete_post_tag', array( __CLASS__, 'delete_post_tag' ) );
2585 + add_action( 'customize_controls_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
2586 + add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ) );
2587 + add_action( 'wp_loaded', array( __CLASS__, 'wp_loaded' ) );
2588 }
2589
2590 /**
2591 @@ -94,11 +100,13 @@ class Featured_Content {
2592 * Has to run on wp_loaded so that the preview filters of the Customizer
2593 * have a chance to alter the value.
2594 *
2595 + * @static
2596 + * @access public
2597 * @since Twenty Fourteen 1.0
2598 */
2599 public static function wp_loaded() {
2600 if ( self::get_setting( 'hide-tag' ) ) {
2601 - add_filter( 'get_terms', array( __CLASS__, 'hide_featured_term' ), 10, 3 );
2602 + add_filter( 'get_terms', array( __CLASS__, 'hide_featured_term' ), 10, 3 );
2603 add_filter( 'get_the_terms', array( __CLASS__, 'hide_the_featured_term' ), 10, 3 );
2604 }
2605 }
2606 @@ -106,6 +114,8 @@ class Featured_Content {
2607 /**
2608 * Get featured posts.
2609 *
2610 + * @static
2611 + * @access public
2612 * @since Twenty Fourteen 1.0
2613 *
2614 * @return array Array of featured posts.
2615 @@ -118,12 +128,10 @@ class Featured_Content {
2616 return array();
2617 }
2618
2619 - $featured_posts = get_posts(
2620 - array(
2621 - 'include' => $post_ids,
2622 - 'posts_per_page' => count( $post_ids ),
2623 - )
2624 - );
2625 + $featured_posts = get_posts( array(
2626 + 'include' => $post_ids,
2627 + 'posts_per_page' => count( $post_ids ),
2628 + ) );
2629
2630 return $featured_posts;
2631 }
2632 @@ -136,6 +144,8 @@ class Featured_Content {
2633 *
2634 * Sets the "featured_content_ids" transient.
2635 *
2636 + * @static
2637 + * @access public
2638 * @since Twenty Fourteen 1.0
2639 *
2640 * @return array Array of post IDs.
2641 @@ -150,20 +160,18 @@ class Featured_Content {
2642
2643 if ( $term ) {
2644 // Query for featured posts.
2645 - $featured_ids = get_posts(
2646 - array(
2647 - 'fields' => 'ids',
2648 - 'numberposts' => self::$max_posts,
2649 - 'suppress_filters' => false,
2650 - 'tax_query' => array(
2651 - array(
2652 - 'field' => 'term_id',
2653 - 'taxonomy' => 'post_tag',
2654 - 'terms' => $term->term_id,
2655 - ),
2656 + $featured_ids = get_posts( array(
2657 + 'fields' => 'ids',
2658 + 'numberposts' => self::$max_posts,
2659 + 'suppress_filters' => false,
2660 + 'tax_query' => array(
2661 + array(
2662 + 'field' => 'term_id',
2663 + 'taxonomy' => 'post_tag',
2664 + 'terms' => $term->term_id,
2665 ),
2666 - )
2667 - );
2668 + ),
2669 + ) );
2670 }
2671
2672 // Get sticky posts if no Featured Content exists.
2673 @@ -181,6 +189,8 @@ class Featured_Content {
2674 /**
2675 * Return an array with IDs of posts maked as sticky.
2676 *
2677 + * @static
2678 + * @access public
2679 * @since Twenty Fourteen 1.0
2680 *
2681 * @return array Array of sticky posts.
2682 @@ -196,6 +206,8 @@ class Featured_Content {
2683 *
2684 * @see Featured_Content::validate_settings().
2685 *
2686 + * @static
2687 + * @access public
2688 * @since Twenty Fourteen 1.0
2689 */
2690 public static function delete_transient() {
2691 @@ -209,6 +221,8 @@ class Featured_Content {
2692 * Hooked onto the 'pre_get_posts' action, this changes the parameters of
2693 * the query before it gets any posts.
2694 *
2695 + * @static
2696 + * @access public
2697 * @since Twenty Fourteen 1.0
2698 *
2699 * @param WP_Query $query WP_Query object.
2700 @@ -255,6 +269,8 @@ class Featured_Content {
2701 *
2702 * @see Featured_Content::validate_settings().
2703 *
2704 + * @static
2705 + * @access public
2706 * @since Twenty Fourteen 1.0
2707 *
2708 * @param int $tag_id The term_id of the tag that has been deleted.
2709 @@ -267,7 +283,7 @@ class Featured_Content {
2710 }
2711
2712 $settings['tag-id'] = 0;
2713 - $settings = self::validate_settings( $settings );
2714 + $settings = self::validate_settings( $settings );
2715 update_option( 'featured-content', $settings );
2716 }
2717
2718 @@ -276,6 +292,8 @@ class Featured_Content {
2719 *
2720 * Hooks into the "get_terms" filter.
2721 *
2722 + * @static
2723 + * @access public
2724 * @since Twenty Fourteen 1.0
2725 *
2726 * @param array $terms List of term objects. This is the return value of get_terms().
2727 @@ -322,6 +340,8 @@ class Featured_Content {
2728 *
2729 * Hooks into the "get_the_terms" filter.
2730 *
2731 + * @static
2732 + * @access public
2733 * @since Twenty Fourteen 1.0
2734 *
2735 * @param array $terms A list of term objects. This is the return value of get_the_terms().
2736 @@ -361,6 +381,8 @@ class Featured_Content {
2737 /**
2738 * Register custom setting on the Settings -> Reading screen.
2739 *
2740 + * @static
2741 + * @access public
2742 * @since Twenty Fourteen 1.0
2743 */
2744 public static function register_setting() {
2745 @@ -370,61 +392,54 @@ class Featured_Content {
2746 /**
2747 * Add settings to the Customizer.
2748 *
2749 + * @static
2750 + * @access public
2751 * @since Twenty Fourteen 1.0
2752 *
2753 * @param WP_Customize_Manager $wp_customize Customizer object.
2754 */
2755 public static function customize_register( $wp_customize ) {
2756 - $wp_customize->add_section(
2757 - 'featured_content', array(
2758 - 'title' => __( 'Featured Content', 'twentyfourteen' ),
2759 - 'description' => sprintf(
2760 - __( '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' ),
2761 - esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
2762 - admin_url( 'edit.php?show_sticky=1' )
2763 - ),
2764 - 'priority' => 130,
2765 - 'theme_supports' => 'featured-content',
2766 - )
2767 - );
2768 + $wp_customize->add_section( 'featured_content', array(
2769 + 'title' => __( 'Featured Content', 'twentyfourteen' ),
2770 + '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' ),
2771 + esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
2772 + admin_url( 'edit.php?show_sticky=1' )
2773 + ),
2774 + 'priority' => 130,
2775 + 'theme_supports' => 'featured-content',
2776 + ) );
2777
2778 // Add Featured Content settings.
2779 - $wp_customize->add_setting(
2780 - 'featured-content[tag-name]', array(
2781 - 'default' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ),
2782 - 'type' => 'option',
2783 - 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ),
2784 - )
2785 - );
2786 - $wp_customize->add_setting(
2787 - 'featured-content[hide-tag]', array(
2788 - 'default' => true,
2789 - 'type' => 'option',
2790 - 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ),
2791 - )
2792 - );
2793 + $wp_customize->add_setting( 'featured-content[tag-name]', array(
2794 + 'default' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ),
2795 + 'type' => 'option',
2796 + 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ),
2797 + ) );
2798 + $wp_customize->add_setting( 'featured-content[hide-tag]', array(
2799 + 'default' => true,
2800 + 'type' => 'option',
2801 + 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ),
2802 + ) );
2803
2804 // Add Featured Content controls.
2805 - $wp_customize->add_control(
2806 - 'featured-content[tag-name]', array(
2807 - 'label' => __( 'Tag Name', 'twentyfourteen' ),
2808 - 'section' => 'featured_content',
2809 - 'priority' => 20,
2810 - )
2811 - );
2812 - $wp_customize->add_control(
2813 - 'featured-content[hide-tag]', array(
2814 - 'label' => __( 'Don&rsquo;t display tag on front end.', 'twentyfourteen' ),
2815 - 'section' => 'featured_content',
2816 - 'type' => 'checkbox',
2817 - 'priority' => 30,
2818 - )
2819 - );
2820 + $wp_customize->add_control( 'featured-content[tag-name]', array(
2821 + 'label' => __( 'Tag Name', 'twentyfourteen' ),
2822 + 'section' => 'featured_content',
2823 + 'priority' => 20,
2824 + ) );
2825 + $wp_customize->add_control( 'featured-content[hide-tag]', array(
2826 + 'label' => __( 'Don&rsquo;t display tag on front end.', 'twentyfourteen' ),
2827 + 'section' => 'featured_content',
2828 + 'type' => 'checkbox',
2829 + 'priority' => 30,
2830 + ) );
2831 }
2832
2833 /**
2834 * Enqueue the tag suggestion script.
2835 *
2836 + * @static
2837 + * @access public
2838 * @since Twenty Fourteen 1.0
2839 */
2840 public static function enqueue_scripts() {
2841 @@ -443,6 +458,8 @@ class Featured_Content {
2842 * its name as the first parameter to the function and only that
2843 * value will be returned.
2844 *
2845 + * @static
2846 + * @access public
2847 * @since Twenty Fourteen 1.0
2848 *
2849 * @param string $key The key of a recognized setting.
2850 @@ -474,6 +491,8 @@ class Featured_Content {
2851 * format before saving to the database. This function will also
2852 * delete the transient set in Featured_Content::get_featured_content().
2853 *
2854 + * @static
2855 + * @access public
2856 * @since Twenty Fourteen 1.0
2857 *
2858 * @param array $input Array of settings input.
2859
2860 diff --git a/themes/twentyfourteen/inc/template-tags.php b/themes/twentyfourteen/inc/template-tags.php
2861 index 8939331..1d35d0d 100644
2862 --- a/themes/twentyfourteen/inc/template-tags.php
2863 +++ b/themes/twentyfourteen/inc/template-tags.php
2864 @@ -8,55 +8,53 @@
2865 */
2866
2867 if ( ! function_exists( 'twentyfourteen_paging_nav' ) ) :
2868 - /**
2869 - * Display navigation to next/previous set of posts when applicable.
2870 - *
2871 - * @since Twenty Fourteen 1.0
2872 - *
2873 - * @global WP_Query $wp_query WordPress Query object.
2874 - * @global WP_Rewrite $wp_rewrite WordPress Rewrite object.
2875 - */
2876 - function twentyfourteen_paging_nav() {
2877 - global $wp_query, $wp_rewrite;
2878 -
2879 - // Don't print empty markup if there's only one page.
2880 - if ( $wp_query->max_num_pages < 2 ) {
2881 - return;
2882 - }
2883 +/**
2884 + * Display navigation to next/previous set of posts when applicable.
2885 + *
2886 + * @since Twenty Fourteen 1.0
2887 + *
2888 + * @global WP_Query $wp_query WordPress Query object.
2889 + * @global WP_Rewrite $wp_rewrite WordPress Rewrite object.
2890 + */
2891 +function twentyfourteen_paging_nav() {
2892 + global $wp_query, $wp_rewrite;
2893
2894 - $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
2895 - $pagenum_link = html_entity_decode( get_pagenum_link() );
2896 - $query_args = array();
2897 - $url_parts = explode( '?', $pagenum_link );
2898 + // Don't print empty markup if there's only one page.
2899 + if ( $wp_query->max_num_pages < 2 ) {
2900 + return;
2901 + }
2902
2903 - if ( isset( $url_parts[1] ) ) {
2904 - wp_parse_str( $url_parts[1], $query_args );
2905 - }
2906 + $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
2907 + $pagenum_link = html_entity_decode( get_pagenum_link() );
2908 + $query_args = array();
2909 + $url_parts = explode( '?', $pagenum_link );
2910
2911 - $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
2912 - $pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
2913 -
2914 - $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
2915 - $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
2916 -
2917 - // Set up paginated links.
2918 - $links = paginate_links(
2919 - array(
2920 - 'base' => $pagenum_link,
2921 - 'format' => $format,
2922 - 'total' => $wp_query->max_num_pages,
2923 - 'current' => $paged,
2924 - 'mid_size' => 1,
2925 - 'add_args' => array_map( 'urlencode', $query_args ),
2926 - 'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
2927 - 'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
2928 - )
2929 - );
2930 + if ( isset( $url_parts[1] ) ) {
2931 + wp_parse_str( $url_parts[1], $query_args );
2932 + }
2933 +
2934 + $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
2935 + $pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
2936 +
2937 + $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
2938 + $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
2939
2940 - if ( $links ) :
2941 + // Set up paginated links.
2942 + $links = paginate_links( array(
2943 + 'base' => $pagenum_link,
2944 + 'format' => $format,
2945 + 'total' => $wp_query->max_num_pages,
2946 + 'current' => $paged,
2947 + 'mid_size' => 1,
2948 + 'add_args' => array_map( 'urlencode', $query_args ),
2949 + 'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
2950 + 'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
2951 + ) );
2952
2953 - ?>
2954 - <nav class="navigation paging-navigation" role="navigation">
2955 + if ( $links ) :
2956 +
2957 + ?>
2958 + <nav class="navigation paging-navigation" role="navigation">
2959 <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentyfourteen' ); ?></h1>
2960 <div class="pagination loop-pagination">
2961 <?php echo $links; ?>
2962 @@ -64,63 +62,62 @@ if ( ! function_exists( 'twentyfourteen_paging_nav' ) ) :
2963 </nav><!-- .navigation -->
2964 <?php
2965 endif;
2966 - }
2967 +}
2968 endif;
2969
2970 if ( ! function_exists( 'twentyfourteen_post_nav' ) ) :
2971 - /**
2972 - * Display navigation to next/previous post when applicable.
2973 - *
2974 - * @since Twenty Fourteen 1.0
2975 - */
2976 - function twentyfourteen_post_nav() {
2977 - // Don't print empty markup if there's nowhere to navigate.
2978 - $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
2979 - $next = get_adjacent_post( false, '', false );
2980 -
2981 - if ( ! $next && ! $previous ) {
2982 - return;
2983 - }
2984 +/**
2985 + * Display navigation to next/previous post when applicable.
2986 + *
2987 + * @since Twenty Fourteen 1.0
2988 + */
2989 +function twentyfourteen_post_nav() {
2990 + // Don't print empty markup if there's nowhere to navigate.
2991 + $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
2992 + $next = get_adjacent_post( false, '', false );
2993 +
2994 + if ( ! $next && ! $previous ) {
2995 + return;
2996 + }
2997
2998 - ?>
2999 - <nav class="navigation post-navigation" role="navigation">
3000 + ?>
3001 + <nav class="navigation post-navigation" role="navigation">
3002 <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
3003 <div class="nav-links">
3004 <?php
3005 if ( is_attachment() ) :
3006 previous_post_link( '%link', __( '<span class="meta-nav">Published In</span>%title', 'twentyfourteen' ) );
3007 - else :
3008 - previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) );
3009 - next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) );
3010 - endif;
3011 - ?>
3012 - </div><!-- .nav-links -->
3013 - </nav><!-- .navigation -->
3014 - <?php
3015 - }
3016 + else :
3017 + previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) );
3018 + next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) );
3019 + endif;
3020 + ?>
3021 + </div><!-- .nav-links -->
3022 + </nav><!-- .navigation -->
3023 + <?php
3024 +}
3025 endif;
3026
3027 if ( ! function_exists( 'twentyfourteen_posted_on' ) ) :
3028 - /**
3029 - * Print HTML with meta information for the current post-date/time and author.
3030 - *
3031 - * @since Twenty Fourteen 1.0
3032 - */
3033 - function twentyfourteen_posted_on() {
3034 - if ( is_sticky() && is_home() && ! is_paged() ) {
3035 - echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>';
3036 - }
3037 -
3038 - // Set up and print post meta information.
3039 - printf(
3040 - '<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>',
3041 - esc_url( get_permalink() ),
3042 - esc_attr( get_the_date( 'c' ) ),
3043 - esc_html( get_the_date() ),
3044 - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
3045 - get_the_author()
3046 - );
3047 +/**
3048 + * Print HTML with meta information for the current post-date/time and author.
3049 + *
3050 + * @since Twenty Fourteen 1.0
3051 + */
3052 +function twentyfourteen_posted_on() {
3053 + if ( is_sticky() && is_home() && ! is_paged() ) {
3054 + echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>';
3055 }
3056 +
3057 + // Set up and print post meta information.
3058 + 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>',
3059 + esc_url( get_permalink() ),
3060 + esc_attr( get_the_date( 'c' ) ),
3061 + esc_html( get_the_date() ),
3062 + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
3063 + get_the_author()
3064 + );
3065 +}
3066 endif;
3067
3068 /**
3069 @@ -133,11 +130,9 @@ endif;
3070 function twentyfourteen_categorized_blog() {
3071 if ( false === ( $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ) ) ) {
3072 // Create an array of all the categories that are attached to posts
3073 - $all_the_cool_cats = get_categories(
3074 - array(
3075 - 'hide_empty' => 1,
3076 - )
3077 - );
3078 + $all_the_cool_cats = get_categories( array(
3079 + 'hide_empty' => 1,
3080 + ) );
3081
3082 // Count the number of categories that are attached to the posts
3083 $all_the_cool_cats = count( $all_the_cool_cats );
3084 @@ -164,71 +159,69 @@ function twentyfourteen_category_transient_flusher() {
3085 delete_transient( 'twentyfourteen_category_count' );
3086 }
3087 add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' );
3088 -add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
3089 +add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
3090
3091 if ( ! function_exists( 'twentyfourteen_post_thumbnail' ) ) :
3092 - /**
3093 - * Display an optional post thumbnail.
3094 - *
3095 - * Wraps the post thumbnail in an anchor element on index
3096 - * views, or a div element when on single views.
3097 - *
3098 - * @since Twenty Fourteen 1.0
3099 - * @since Twenty Fourteen 1.4 Was made 'pluggable', or overridable.
3100 - */
3101 - function twentyfourteen_post_thumbnail() {
3102 - if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
3103 - return;
3104 - }
3105 +/**
3106 + * Display an optional post thumbnail.
3107 + *
3108 + * Wraps the post thumbnail in an anchor element on index
3109 + * views, or a div element when on single views.
3110 + *
3111 + * @since Twenty Fourteen 1.0
3112 + * @since Twenty Fourteen 1.4 Was made 'pluggable', or overridable.
3113 + */
3114 +function twentyfourteen_post_thumbnail() {
3115 + if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
3116 + return;
3117 + }
3118
3119 - if ( is_singular() ) :
3120 - ?>
3121 + if ( is_singular() ) :
3122 + ?>
3123
3124 - <div class="post-thumbnail">
3125 - <?php
3126 + <div class="post-thumbnail">
3127 + <?php
3128 if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
3129 the_post_thumbnail( 'twentyfourteen-full-width' );
3130 } else {
3131 the_post_thumbnail();
3132 }
3133 - ?>
3134 - </div>
3135 + ?>
3136 + </div>
3137
3138 - <?php else : ?>
3139 + <?php else : ?>
3140
3141 <a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
3142 <?php
3143 - if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
3144 - the_post_thumbnail( 'twentyfourteen-full-width' );
3145 - } else {
3146 - the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
3147 - }
3148 + if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
3149 + the_post_thumbnail( 'twentyfourteen-full-width' );
3150 + } else {
3151 + the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
3152 + }
3153 ?>
3154 </a>
3155
3156 - <?php
3157 - endif; // End is_singular()
3158 - }
3159 + <?php endif; // End is_singular()
3160 +}
3161 endif;
3162
3163 if ( ! function_exists( 'twentyfourteen_excerpt_more' ) && ! is_admin() ) :
3164 - /**
3165 - * Replaces "[...]" (appended to automatically generated excerpts) with ...
3166 - * and a Continue reading link.
3167 - *
3168 - * @since Twenty Fourteen 1.3
3169 - *
3170 - * @param string $more Default Read More excerpt link.
3171 - * @return string Filtered Read More excerpt link.
3172 - */
3173 - function twentyfourteen_excerpt_more( $more ) {
3174 - $link = sprintf(
3175 - '<a href="%1$s" class="more-link">%2$s</a>',
3176 - esc_url( get_permalink( get_the_ID() ) ),
3177 +/**
3178 + * Replaces "[...]" (appended to automatically generated excerpts) with ...
3179 + * and a Continue reading link.
3180 + *
3181 + * @since Twenty Fourteen 1.3
3182 + *
3183 + * @param string $more Default Read More excerpt link.
3184 + * @return string Filtered Read More excerpt link.
3185 + */
3186 +function twentyfourteen_excerpt_more( $more ) {
3187 + $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
3188 + esc_url( get_permalink( get_the_ID() ) ),
3189 /* translators: %s: Name of current post */
3190 sprintf( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
3191 );
3192 - return ' &hellip; ' . $link;
3193 - }
3194 - add_filter( 'excerpt_more', 'twentyfourteen_excerpt_more' );
3195 + return ' &hellip; ' . $link;
3196 +}
3197 +add_filter( 'excerpt_more', 'twentyfourteen_excerpt_more' );
3198 endif;
3199
3200 diff --git a/themes/twentyfourteen/inc/widgets.php b/themes/twentyfourteen/inc/widgets.php
3201 index 64118b5..533f34a 100644
3202 --- a/themes/twentyfourteen/inc/widgets.php
3203 +++ b/themes/twentyfourteen/inc/widgets.php
3204 @@ -16,6 +16,7 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
3205 /**
3206 * The supported post formats.
3207 *
3208 + * @access private
3209 * @since Twenty Fourteen 1.0
3210 *
3211 * @var array
3212 @@ -30,13 +31,11 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
3213 * @return Twenty_Fourteen_Ephemera_Widget
3214 */
3215 public function __construct() {
3216 - parent::__construct(
3217 - 'widget_twentyfourteen_ephemera', __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ), array(
3218 - 'classname' => 'widget_twentyfourteen_ephemera',
3219 - 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen' ),
3220 - 'customize_selective_refresh' => true,
3221 - )
3222 - );
3223 + parent::__construct( 'widget_twentyfourteen_ephemera', __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ), array(
3224 + 'classname' => 'widget_twentyfourteen_ephemera',
3225 + 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen' ),
3226 + 'customize_selective_refresh' => true,
3227 + ) );
3228
3229 if ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) {
3230 add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
3231 @@ -63,6 +62,7 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
3232 /**
3233 * Output the HTML for this widget.
3234 *
3235 + * @access public
3236 * @since Twenty Fourteen 1.0
3237 *
3238 * @param array $args An array of standard parameters for widgets in this theme.
3239 @@ -106,26 +106,24 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
3240 $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
3241 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? $format_string : $instance['title'], $instance, $this->id_base );
3242
3243 - $ephemera = new WP_Query(
3244 - array(
3245 - 'order' => 'DESC',
3246 - 'posts_per_page' => $number,
3247 - 'no_found_rows' => true,
3248 - 'post_status' => 'publish',
3249 - 'post__not_in' => get_option( 'sticky_posts' ),
3250 - 'tax_query' => array(
3251 - array(
3252 - 'taxonomy' => 'post_format',
3253 - 'terms' => array( "post-format-$format" ),
3254 - 'field' => 'slug',
3255 - 'operator' => 'IN',
3256 - ),
3257 + $ephemera = new WP_Query( array(
3258 + 'order' => 'DESC',
3259 + 'posts_per_page' => $number,
3260 + 'no_found_rows' => true,
3261 + 'post_status' => 'publish',
3262 + 'post__not_in' => get_option( 'sticky_posts' ),
3263 + 'tax_query' => array(
3264 + array(
3265 + 'taxonomy' => 'post_format',
3266 + 'terms' => array( "post-format-$format" ),
3267 + 'field' => 'slug',
3268 + 'operator' => 'IN',
3269 ),
3270 - )
3271 - );
3272 + ),
3273 + ) );
3274
3275 if ( $ephemera->have_posts() ) :
3276 - $tmp_content_width = $GLOBALS['content_width'];
3277 + $tmp_content_width = $GLOBALS['content_width'];
3278 $GLOBALS['content_width'] = 306;
3279
3280 echo $args['before_widget'];
3281 @@ -136,65 +134,61 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
3282 <ol>
3283
3284 <?php
3285 - while ( $ephemera->have_posts() ) :
3286 - $ephemera->the_post();
3287 - $tmp_more = $GLOBALS['more'];
3288 - $GLOBALS['more'] = 0;
3289 + while ( $ephemera->have_posts() ) :
3290 + $ephemera->the_post();
3291 + $tmp_more = $GLOBALS['more'];
3292 + $GLOBALS['more'] = 0;
3293 ?>
3294 <li>
3295 <article <?php post_class(); ?>>
3296 - <div class="entry-content">
3297 - <?php
3298 - if ( has_post_format( 'gallery' ) ) :
3299 -
3300 - if ( post_password_required() ) :
3301 - the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
3302 - else :
3303 - $images = array();
3304 -
3305 - $galleries = get_post_galleries( get_the_ID(), false );
3306 - if ( isset( $galleries[0]['ids'] ) ) {
3307 - $images = explode( ',', $galleries[0]['ids'] );
3308 - }
3309 -
3310 - if ( ! $images ) :
3311 - $images = get_posts(
3312 - array(
3313 - 'fields' => 'ids',
3314 - 'numberposts' => -1,
3315 - 'order' => 'ASC',
3316 - 'orderby' => 'menu_order',
3317 + <div class="entry-content">
3318 + <?php
3319 + if ( has_post_format( 'gallery' ) ) :
3320 +
3321 + if ( post_password_required() ) :
3322 + the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
3323 + else :
3324 + $images = array();
3325 +
3326 + $galleries = get_post_galleries( get_the_ID(), false );
3327 + if ( isset( $galleries[0]['ids'] ) )
3328 + $images = explode( ',', $galleries[0]['ids'] );
3329 +
3330 + if ( ! $images ) :
3331 + $images = get_posts( array(
3332 + 'fields' => 'ids',
3333 + 'numberposts' => -1,
3334 + 'order' => 'ASC',
3335 + 'orderby' => 'menu_order',
3336 'post_mime_type' => 'image',
3337 - 'post_parent' => get_the_ID(),
3338 - 'post_type' => 'attachment',
3339 - )
3340 - );
3341 - endif;
3342 + 'post_parent' => get_the_ID(),
3343 + 'post_type' => 'attachment',
3344 + ) );
3345 + endif;
3346
3347 - $total_images = count( $images );
3348 + $total_images = count( $images );
3349
3350 - if ( has_post_thumbnail() ) :
3351 - $post_thumbnail = get_the_post_thumbnail();
3352 + if ( has_post_thumbnail() ) :
3353 + $post_thumbnail = get_the_post_thumbnail();
3354 elseif ( $total_images > 0 ) :
3355 $image = reset( $images );
3356 $post_thumbnail = wp_get_attachment_image( $image, 'post-thumbnail' );
3357 endif;
3358
3359 - if ( ! empty( $post_thumbnail ) ) :
3360 + if ( ! empty ( $post_thumbnail ) ) :
3361 ?>
3362 <a href="<?php the_permalink(); ?>"><?php echo $post_thumbnail; ?></a>
3363 <?php endif; ?>
3364 <p class="wp-caption-text">
3365 - <?php
3366 - printf(
3367 - _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' ),
3368 - esc_url( get_permalink() ),
3369 - number_format_i18n( $total_images )
3370 - );
3371 - ?>
3372 + <?php
3373 + 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' ),
3374 + esc_url( get_permalink() ),
3375 + number_format_i18n( $total_images )
3376 + );
3377 + ?>
3378 </p>
3379 <?php
3380 - endif;
3381 + endif;
3382
3383 else :
3384 the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
3385 @@ -204,21 +198,20 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
3386
3387 <header class="entry-header">
3388 <div class="entry-meta">
3389 - <?php
3390 - if ( ! has_post_format( 'link' ) ) :
3391 - the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
3392 - endif;
3393 + <?php
3394 + if ( ! has_post_format( 'link' ) ) :
3395 + the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
3396 + endif;
3397
3398 - printf(
3399 - '<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>',
3400 - esc_url( get_permalink() ),
3401 - esc_attr( get_the_date( 'c' ) ),
3402 - esc_html( get_the_date() ),
3403 - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
3404 - get_the_author()
3405 - );
3406 + 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>',
3407 + esc_url( get_permalink() ),
3408 + esc_attr( get_the_date( 'c' ) ),
3409 + esc_html( get_the_date() ),
3410 + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
3411 + get_the_author()
3412 + );
3413
3414 - if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
3415 + if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
3416 ?>
3417 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
3418 <?php endif; ?>
3419
3420 diff --git a/themes/twentyfourteen/index.php b/themes/twentyfourteen/index.php
3421 index 42064cf..3f46be2 100644
3422 --- a/themes/twentyfourteen/index.php
3423 +++ b/themes/twentyfourteen/index.php
3424 @@ -19,31 +19,30 @@ get_header(); ?>
3425 <div id="main-content" class="main-content">
3426
3427 <?php
3428 -if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
3429 - // Include the featured content template.
3430 - get_template_part( 'featured-content' );
3431 -}
3432 + if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
3433 + // Include the featured content template.
3434 + get_template_part( 'featured-content' );
3435 + }
3436 ?>
3437
3438 <div id="primary" class="content-area">
3439 <div id="content" class="site-content" role="main">
3440
3441 <?php
3442 - if ( have_posts() ) :
3443 - // Start the Loop.
3444 - while ( have_posts() ) :
3445 - the_post();
3446 -
3447 - /*
3448 - * Include the post format-specific template for the content. If you want to
3449 - * use this in a child theme, then include a file called content-___.php
3450 - * (where ___ is the post format) and that will be used instead.
3451 - */
3452 - get_template_part( 'content', get_post_format() );
3453 + if ( have_posts() ) :
3454 + // Start the Loop.
3455 + while ( have_posts() ) : the_post();
3456 +
3457 + /*
3458 + * Include the post format-specific template for the content. If you want to
3459 + * use this in a child theme, then include a file called content-___.php
3460 + * (where ___ is the post format) and that will be used instead.
3461 + */
3462 + get_template_part( 'content', get_post_format() );
3463
3464 endwhile;
3465 - // Previous/next post navigation.
3466 - twentyfourteen_paging_nav();
3467 + // Previous/next post navigation.
3468 + twentyfourteen_paging_nav();
3469
3470 else :
3471 // If no content, include the "No posts found" template.
3472
3473 diff --git a/themes/twentyfourteen/js/functions.js b/themes/twentyfourteen/js/functions.js
3474 index ac4629d..a21849e 100644
3475 --- a/themes/twentyfourteen/js/functions.js
3476 +++ b/themes/twentyfourteen/js/functions.js
3477 @@ -122,8 +122,7 @@
3478 } );
3479
3480 /**
3481 - * Add or remove ARIA attributes.
3482 - *
3483 + * @summary Add or remove ARIA attributes.
3484 * Uses jQuery's width() function to determine the size of the window and add
3485 * the default ARIA attributes for the menu toggle if it's visible.
3486 * @since Twenty Fourteen 1.4
3487
3488 diff --git a/themes/twentyfourteen/page-templates/contributors.php b/themes/twentyfourteen/page-templates/contributors.php
3489 index b4103e8..92602ab 100644
3490 --- a/themes/twentyfourteen/page-templates/contributors.php
3491 +++ b/themes/twentyfourteen/page-templates/contributors.php
3492 @@ -12,36 +12,35 @@ get_header(); ?>
3493 <div id="main-content" class="main-content">
3494
3495 <?php
3496 -if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
3497 - // Include the featured content template.
3498 - get_template_part( 'featured-content' );
3499 -}
3500 + if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
3501 + // Include the featured content template.
3502 + get_template_part( 'featured-content' );
3503 + }
3504 ?>
3505
3506 <div id="primary" class="content-area">
3507 <div id="content" class="site-content" role="main">
3508 <?php
3509 // Start the Loop.
3510 - while ( have_posts() ) :
3511 - the_post();
3512 + while ( have_posts() ) : the_post();
3513 ?>
3514
3515 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
3516 - <?php
3517 - the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' );
3518 + <?php
3519 + the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' );
3520
3521 - // Output the authors list.
3522 - twentyfourteen_list_authors();
3523 + // Output the authors list.
3524 + twentyfourteen_list_authors();
3525
3526 - edit_post_link( __( 'Edit', 'twentyfourteen' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' );
3527 - ?>
3528 + edit_post_link( __( 'Edit', 'twentyfourteen' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' );
3529 + ?>
3530 </article><!-- #post-## -->
3531
3532 <?php
3533 - // If comments are open or we have at least one comment, load up the comment template.
3534 - if ( comments_open() || get_comments_number() ) {
3535 - comments_template();
3536 - }
3537 + // If comments are open or we have at least one comment, load up the comment template.
3538 + if ( comments_open() || get_comments_number() ) {
3539 + comments_template();
3540 + }
3541 endwhile;
3542 ?>
3543 </div><!-- #content -->
3544
3545 diff --git a/themes/twentyfourteen/page-templates/full-width.php b/themes/twentyfourteen/page-templates/full-width.php
3546 index ea5fa58..8830c87 100644
3547 --- a/themes/twentyfourteen/page-templates/full-width.php
3548 +++ b/themes/twentyfourteen/page-templates/full-width.php
3549 @@ -12,26 +12,25 @@ get_header(); ?>
3550 <div id="main-content" class="main-content">
3551
3552 <?php
3553 -if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
3554 - // Include the featured content template.
3555 - get_template_part( 'featured-content' );
3556 -}
3557 + if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
3558 + // Include the featured content template.
3559 + get_template_part( 'featured-content' );
3560 + }
3561 ?>
3562
3563 <div id="primary" class="content-area">
3564 <div id="content" class="site-content" role="main">
3565 <?php
3566 // Start the Loop.
3567 - while ( have_posts() ) :
3568 - the_post();
3569 + while ( have_posts() ) : the_post();
3570
3571 - // Include the page content template.
3572 - get_template_part( 'content', 'page' );
3573 + // Include the page content template.
3574 + get_template_part( 'content', 'page' );
3575
3576 - // If comments are open or we have at least one comment, load up the comment template.
3577 - if ( comments_open() || get_comments_number() ) {
3578 - comments_template();
3579 - }
3580 + // If comments are open or we have at least one comment, load up the comment template.
3581 + if ( comments_open() || get_comments_number() ) {
3582 + comments_template();
3583 + }
3584 endwhile;
3585 ?>
3586 </div><!-- #content -->
3587
3588 diff --git a/themes/twentyfourteen/page.php b/themes/twentyfourteen/page.php
3589 index bd033ae..44724e9 100644
3590 --- a/themes/twentyfourteen/page.php
3591 +++ b/themes/twentyfourteen/page.php
3592 @@ -16,26 +16,25 @@ get_header(); ?>
3593 <div id="main-content" class="main-content">
3594
3595 <?php
3596 -if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
3597 - // Include the featured content template.
3598 - get_template_part( 'featured-content' );
3599 -}
3600 + if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
3601 + // Include the featured content template.
3602 + get_template_part( 'featured-content' );
3603 + }
3604 ?>
3605 <div id="primary" class="content-area">
3606 <div id="content" class="site-content" role="main">
3607
3608 <?php
3609 // Start the Loop.
3610 - while ( have_posts() ) :
3611 - the_post();
3612 + while ( have_posts() ) : the_post();
3613
3614 - // Include the page content template.
3615 - get_template_part( 'content', 'page' );
3616 + // Include the page content template.
3617 + get_template_part( 'content', 'page' );
3618
3619 - // If comments are open or we have at least one comment, load up the comment template.
3620 - if ( comments_open() || get_comments_number() ) {
3621 - comments_template();
3622 - }
3623 + // If comments are open or we have at least one comment, load up the comment template.
3624 + if ( comments_open() || get_comments_number() ) {
3625 + comments_template();
3626 + }
3627 endwhile;
3628 ?>
3629
3630
3631 diff --git a/themes/twentyfourteen/readme.txt b/themes/twentyfourteen/readme.txt
3632 index 96b7a3a..69d4e65 100644
3633 --- a/themes/twentyfourteen/readme.txt
3634 +++ b/themes/twentyfourteen/readme.txt
3635 @@ -1,8 +1,8 @@
3636 === Twenty Fourteen ===
3637 Contributors: the WordPress team
3638 Requires at least: WordPress 3.6
3639 -Tested up to: WordPress 5.0-trunk
3640 -Stable tag: 2.2
3641 +Tested up to: WordPress 5.0
3642 +Stable tag: 2.4
3643 License: GPLv2 or later
3644 License URI: http://www.gnu.org/licenses/gpl-2.0.html
3645 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
3646 @@ -50,6 +50,16 @@ Source: http://www.genericons.com
3647
3648 == Changelog ==
3649
3650 += 2.4 =
3651 +* Released: December 19, 2018
3652 +
3653 +https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_2.4
3654 +
3655 += 2.3 =
3656 +* Released: December 6, 2018
3657 +
3658 +https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_2.3
3659 +
3660 = 2.2 =
3661 * Released: May 17, 2018
3662
3663
3664 diff --git a/themes/twentyfourteen/search.php b/themes/twentyfourteen/search.php
3665 index 6945c40..d90d88a 100644
3666 --- a/themes/twentyfourteen/search.php
3667 +++ b/themes/twentyfourteen/search.php
3668 @@ -20,15 +20,14 @@ get_header(); ?>
3669
3670 <?php
3671 // Start the Loop.
3672 - while ( have_posts() ) :
3673 - the_post();
3674 -
3675 - /*
3676 - * Include the post format-specific template for the content. If you want to
3677 - * use this in a child theme, then include a file called content-___.php
3678 - * (where ___ is the post format) and that will be used instead.
3679 - */
3680 - get_template_part( 'content', get_post_format() );
3681 + while ( have_posts() ) : the_post();
3682 +
3683 + /*
3684 + * Include the post format-specific template for the content. If you want to
3685 + * use this in a child theme, then include a file called content-___.php
3686 + * (where ___ is the post format) and that will be used instead.
3687 + */
3688 + get_template_part( 'content', get_post_format() );
3689
3690 endwhile;
3691 // Previous/next post navigation.
3692
3693 diff --git a/themes/twentyfourteen/sidebar.php b/themes/twentyfourteen/sidebar.php
3694 index 6117b7f..be3c8e0 100644
3695 --- a/themes/twentyfourteen/sidebar.php
3696 +++ b/themes/twentyfourteen/sidebar.php
3697 @@ -10,7 +10,7 @@
3698 <div id="secondary">
3699 <?php
3700 $description = get_bloginfo( 'description', 'display' );
3701 - if ( ! empty( $description ) ) :
3702 + if ( ! empty ( $description ) ) :
3703 ?>
3704 <h2 class="site-description"><?php echo esc_html( $description ); ?></h2>
3705 <?php endif; ?>
3706
3707 diff --git a/themes/twentyfourteen/single.php b/themes/twentyfourteen/single.php
3708 index 1940c73..e089165 100644
3709 --- a/themes/twentyfourteen/single.php
3710 +++ b/themes/twentyfourteen/single.php
3711 @@ -13,23 +13,22 @@ get_header(); ?>
3712 <div id="content" class="site-content" role="main">
3713 <?php
3714 // Start the Loop.
3715 - while ( have_posts() ) :
3716 - the_post();
3717 + while ( have_posts() ) : the_post();
3718
3719 - /*
3720 - * Include the post format-specific template for the content. If you want to
3721 - * use this in a child theme, then include a file called content-___.php
3722 - * (where ___ is the post format) and that will be used instead.
3723 - */
3724 - get_template_part( 'content', get_post_format() );
3725 + /*
3726 + * Include the post format-specific template for the content. If you want to
3727 + * use this in a child theme, then include a file called content-___.php
3728 + * (where ___ is the post format) and that will be used instead.
3729 + */
3730 + get_template_part( 'content', get_post_format() );
3731
3732 - // Previous/next post navigation.
3733 - twentyfourteen_post_nav();
3734 + // Previous/next post navigation.
3735 + twentyfourteen_post_nav();
3736
3737 - // If comments are open or we have at least one comment, load up the comment template.
3738 - if ( comments_open() || get_comments_number() ) {
3739 - comments_template();
3740 - }
3741 + // If comments are open or we have at least one comment, load up the comment template.
3742 + if ( comments_open() || get_comments_number() ) {
3743 + comments_template();
3744 + }
3745 endwhile;
3746 ?>
3747 </div><!-- #content -->
3748
3749 diff --git a/themes/twentyfourteen/style.css b/themes/twentyfourteen/style.css
3750 index 46a86b4..162d237 100644
3751 --- a/themes/twentyfourteen/style.css
3752 +++ b/themes/twentyfourteen/style.css
3753 @@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyfourteen/
3754 Author: the WordPress team
3755 Author URI: https://wordpress.org/
3756 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.
3757 -Version: 2.2
3758 +Version: 2.4
3759 License: GNU General Public License v2 or later
3760 License URI: http://www.gnu.org/licenses/gpl-2.0.html
3761 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
3762
3763 diff --git a/themes/twentyfourteen/tag.php b/themes/twentyfourteen/tag.php
3764 index 663fe5e..5930d2c 100644
3765 --- a/themes/twentyfourteen/tag.php
3766 +++ b/themes/twentyfourteen/tag.php
3767 @@ -24,23 +24,22 @@ get_header(); ?>
3768 <?php
3769 // Show an optional term description.
3770 $term_description = term_description();
3771 - if ( ! empty( $term_description ) ) :
3772 - printf( '<div class="taxonomy-description">%s</div>', $term_description );
3773 + if ( ! empty( $term_description ) ) :
3774 + printf( '<div class="taxonomy-description">%s</div>', $term_description );
3775 endif;
3776 ?>
3777 </header><!-- .archive-header -->
3778
3779 <?php
3780 // Start the Loop.
3781 - while ( have_posts() ) :
3782 - the_post();
3783 -
3784 - /*
3785 - * Include the post format-specific template for the content. If you want to
3786 - * use this in a child theme, then include a file called content-___.php
3787 - * (where ___ is the post format) and that will be used instead.
3788 - */
3789 - get_template_part( 'content', get_post_format() );
3790 + while ( have_posts() ) : the_post();
3791 +
3792 + /*
3793 + * Include the post format-specific template for the content. If you want to
3794 + * use this in a child theme, then include a file called content-___.php
3795 + * (where ___ is the post format) and that will be used instead.
3796 + */
3797 + get_template_part( 'content', get_post_format() );
3798
3799 endwhile;
3800 // Previous/next page navigation.
3801
3802 diff --git a/themes/twentyfourteen/taxonomy-post_format.php b/themes/twentyfourteen/taxonomy-post_format.php
3803 index fa73350..f7cee9f 100644
3804 --- a/themes/twentyfourteen/taxonomy-post_format.php
3805 +++ b/themes/twentyfourteen/taxonomy-post_format.php
3806 @@ -26,8 +26,8 @@ get_header(); ?>
3807 <header class="archive-header">
3808 <h1 class="archive-title">
3809 <?php
3810 - if ( is_tax( 'post_format', 'post-format-aside' ) ) :
3811 - _e( 'Asides', 'twentyfourteen' );
3812 + if ( is_tax( 'post_format', 'post-format-aside' ) ) :
3813 + _e( 'Asides', 'twentyfourteen' );
3814
3815 elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
3816 _e( 'Images', 'twentyfourteen' );
3817 @@ -57,15 +57,14 @@ get_header(); ?>
3818
3819 <?php
3820 // Start the Loop.
3821 - while ( have_posts() ) :
3822 - the_post();
3823 -
3824 - /*
3825 - * Include the post format-specific template for the content. If you want to
3826 - * use this in a child theme, then include a file called content-___.php
3827 - * (where ___ is the post format) and that will be used instead.
3828 - */
3829 - get_template_part( 'content', get_post_format() );
3830 + while ( have_posts() ) : the_post();
3831 +
3832 + /*
3833 + * Include the post format-specific template for the content. If you want to
3834 + * use this in a child theme, then include a file called content-___.php
3835 + * (where ___ is the post format) and that will be used instead.
3836 + */
3837 + get_template_part( 'content', get_post_format() );
3838
3839 endwhile;
3840 // Previous/next page navigation.