Gentoo Archives: gentoo-commits

From: Yury German <blueknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/blogs-gentoo:master commit in: themes/twentyfourteen/page-templates/, themes/mantra/admin/js/, ...
Date: Sun, 28 Apr 2019 22:35:48
Message-Id: 1556490629.4ef1e1c47c509ea8ca1f194fcfb9ce816c01f29e.blueknight@gentoo
1 commit: 4ef1e1c47c509ea8ca1f194fcfb9ce816c01f29e
2 Author: Yury German <blueknight <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 28 22:30:29 2019 +0000
4 Commit: Yury German <blueknight <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 28 22:30:29 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/blogs-gentoo.git/commit/?id=4ef1e1c4
7
8 Updating the themes
9
10 Updated themes. The followng themes updated:
11 Mantra - 3.0.5 => 3.1.0, Twenty Fifteen 2.2 => 2.4
12 Twenty Fourteen 2.4 => 2.6, Twenty Sixteen 1.7 => 1.9
13 Signed-off-by: Yury German <blueknight <AT> gentoo.org>
14
15 themes/mantra/admin/js/admin.js | 8 +-
16 themes/mantra/admin/settings.php | 2 +-
17 themes/mantra/functions.php | 2 +-
18 themes/mantra/includes/custom-styles.php | 10 +-
19 themes/mantra/includes/theme-frontpage.php | 4 +-
20 themes/mantra/includes/theme-functions.php | 3 +-
21 themes/mantra/includes/theme-setup.php | 3 +-
22 themes/mantra/readme.txt | 26 +-
23 themes/mantra/resources/css/rtl.css | 1 +
24 themes/mantra/style.css | 335 +++++++------
25 themes/twentyfifteen/archive.php | 21 +-
26 themes/twentyfifteen/comments.php | 52 +-
27 themes/twentyfifteen/content-link.php | 40 +-
28 themes/twentyfifteen/content-none.php | 2 +-
29 themes/twentyfifteen/content-page.php | 20 +-
30 themes/twentyfifteen/content-search.php | 2 +-
31 themes/twentyfifteen/content.php | 40 +-
32 themes/twentyfifteen/css/blocks.css | 18 +-
33 themes/twentyfifteen/css/editor-blocks.css | 13 +-
34 themes/twentyfifteen/functions.php | 531 ++++++++++----------
35 themes/twentyfifteen/header.php | 16 +-
36 themes/twentyfifteen/image.php | 77 +--
37 themes/twentyfifteen/inc/back-compat.php | 10 +-
38 themes/twentyfifteen/inc/custom-header.php | 84 ++--
39 themes/twentyfifteen/inc/customizer.php | 370 +++++++-------
40 themes/twentyfifteen/inc/template-tags.php | 321 +++++++------
41 themes/twentyfifteen/index.php | 21 +-
42 themes/twentyfifteen/js/functions.js | 3 +-
43 themes/twentyfifteen/page.php | 5 +-
44 themes/twentyfifteen/readme.txt | 12 +-
45 themes/twentyfifteen/search.php | 22 +-
46 themes/twentyfifteen/sidebar.php | 26 +-
47 themes/twentyfifteen/single.php | 25 +-
48 themes/twentyfifteen/style.css | 2 +-
49 themes/twentyfourteen/archive.php | 27 +-
50 themes/twentyfourteen/author.php | 21 +-
51 themes/twentyfourteen/category.php | 21 +-
52 themes/twentyfourteen/comments.php | 52 +-
53 themes/twentyfourteen/content-aside.php | 36 +-
54 themes/twentyfourteen/content-audio.php | 36 +-
55 themes/twentyfourteen/content-featured-post.php | 14 +-
56 themes/twentyfourteen/content-gallery.php | 36 +-
57 themes/twentyfourteen/content-image.php | 36 +-
58 themes/twentyfourteen/content-link.php | 36 +-
59 themes/twentyfourteen/content-none.php | 4 +-
60 themes/twentyfourteen/content-page.php | 16 +-
61 themes/twentyfourteen/content-quote.php | 36 +-
62 themes/twentyfourteen/content-video.php | 36 +-
63 themes/twentyfourteen/content.php | 43 +-
64 themes/twentyfourteen/css/blocks.css | 12 +-
65 themes/twentyfourteen/css/editor-blocks.css | 13 +-
66 themes/twentyfourteen/css/editor-style.css | 3 +-
67 themes/twentyfourteen/featured-content.php | 8 +-
68 themes/twentyfourteen/footer.php | 2 +-
69 themes/twentyfourteen/functions.php | 489 ++++++++++---------
70 themes/twentyfourteen/header.php | 12 +-
71 themes/twentyfourteen/image.php | 51 +-
72 themes/twentyfourteen/inc/back-compat.php | 10 +-
73 themes/twentyfourteen/inc/custom-header.php | 110 +++--
74 themes/twentyfourteen/inc/customizer.php | 110 +++--
75 themes/twentyfourteen/inc/featured-content.php | 166 +++----
76 themes/twentyfourteen/inc/template-tags.php | 285 +++++------
77 themes/twentyfourteen/inc/widgets.php | 155 +++---
78 themes/twentyfourteen/index.php | 37 +-
79 themes/twentyfourteen/js/functions.js | 3 +-
80 .../twentyfourteen/page-templates/contributors.php | 31 +-
81 .../twentyfourteen/page-templates/full-width.php | 23 +-
82 themes/twentyfourteen/page.php | 23 +-
83 themes/twentyfourteen/readme.txt | 12 +-
84 themes/twentyfourteen/search.php | 17 +-
85 themes/twentyfourteen/sidebar.php | 4 +-
86 themes/twentyfourteen/single.php | 27 +-
87 themes/twentyfourteen/style.css | 5 +-
88 themes/twentyfourteen/tag.php | 25 +-
89 themes/twentyfourteen/taxonomy-post_format.php | 27 +-
90 themes/twentysixteen/archive.php | 21 +-
91 themes/twentysixteen/comments.php | 64 +--
92 themes/twentysixteen/css/blocks.css | 19 +-
93 themes/twentysixteen/css/editor-blocks.css | 15 +-
94 themes/twentysixteen/footer.php | 26 +-
95 themes/twentysixteen/functions.php | 532 +++++++++++----------
96 themes/twentysixteen/header.php | 34 +-
97 themes/twentysixteen/image.php | 122 ++---
98 themes/twentysixteen/inc/back-compat.php | 10 +-
99 themes/twentysixteen/inc/customizer.php | 476 ++++++++++--------
100 themes/twentysixteen/inc/template-tags.php | 344 ++++++-------
101 themes/twentysixteen/index.php | 21 +-
102 themes/twentysixteen/page.php | 3 +-
103 themes/twentysixteen/readme.txt | 12 +-
104 themes/twentysixteen/search.php | 21 +-
105 themes/twentysixteen/sidebar.php | 2 +-
106 themes/twentysixteen/single.php | 29 +-
107 themes/twentysixteen/style.css | 2 +-
108 .../twentysixteen/template-parts/content-page.php | 20 +-
109 .../template-parts/content-single.php | 22 +-
110 themes/twentysixteen/template-parts/content.php | 32 +-
111 96 files changed, 3336 insertions(+), 2728 deletions(-)
112
113 diff --git a/themes/mantra/admin/js/admin.js b/themes/mantra/admin/js/admin.js
114 index d026e51f..462394f0 100644
115 --- a/themes/mantra/admin/js/admin.js
116 +++ b/themes/mantra/admin/js/admin.js
117 @@ -41,7 +41,7 @@ jQuery(document).ready(function() {
118 });
119
120 // Jquery confim window on reset to defaults
121 - jQuery('#mantra_defaults').click (function() {
122 + jQuery('#mantra_defaults').click( function() {
123 if (!confirm('Reset Mantra Settings to Defaults?')) { return false; }
124 });
125
126 @@ -130,12 +130,12 @@ jQuery(document).ready(function() {
127 $sliderNr=jQuery('#mantra_slideType').val();
128 //Show category if a category type is selected
129 if ($sliderNr=="Latest Posts from Category" || $sliderNr=="Random Posts from Category" )
130 - jQuery('#slider-category').show();
131 - else jQuery('#slider-category').hide();
132 + jQuery('#slider-category').show();
133 + else jQuery('#slider-category').hide();
134 //Show number of slides if that's the case
135 if ($sliderNr=="Latest Posts" || $sliderNr =="Random Posts" || $sliderNr =="Sticky Posts" || $sliderNr=="Latest Posts from Category" || $sliderNr=="Random Posts from Category" )
136 jQuery('#slider-post-number').show();
137 - else jQuery('#slider-post-number').hide();
138 + else jQuery('#slider-post-number').hide();
139 });//onchange funciton
140
141
142
143 diff --git a/themes/mantra/admin/settings.php b/themes/mantra/admin/settings.php
144 index 553b2d6f..81875345 100644
145 --- a/themes/mantra/admin/settings.php
146 +++ b/themes/mantra/admin/settings.php
147 @@ -258,7 +258,7 @@ function doAjaxRequest(){
148 jQuery('#post-dropdown').html(data);
149 },
150 error: function(errorThrown){
151 - alert('Error':errorThrown);
152 + alert( {'Error':errorThrown} );
153 console.log(errorThrown);
154 }
155 });
156
157 diff --git a/themes/mantra/functions.php b/themes/mantra/functions.php
158 index 903c40e7..ff875ae0 100644
159 --- a/themes/mantra/functions.php
160 +++ b/themes/mantra/functions.php
161 @@ -9,7 +9,7 @@
162
163 // theme specifics
164 define ('_CRYOUT_THEME_NAME','mantra');
165 -define ('_CRYOUT_THEME_VERSION','3.0.5');
166 +define ('_CRYOUT_THEME_VERSION','3.1.0');
167
168 require_once(get_template_directory() . "/admin/main.php"); // Load necessary admin files
169
170
171 diff --git a/themes/mantra/includes/custom-styles.php b/themes/mantra/includes/custom-styles.php
172 index 153ef422..9ec4b91b 100644
173 --- a/themes/mantra/includes/custom-styles.php
174 +++ b/themes/mantra/includes/custom-styles.php
175 @@ -176,7 +176,7 @@ function mantra_custom_styles() {
176 if ($mantra_footercolor != "171717") { ?> #footer2 { background-color:<?php echo esc_attr( $mantra_footercolor ); ?>; }<?php }
177 if ($mantra_titlecolor != "0D85CC") { ?> #site-title span a { color:<?php echo esc_attr( $mantra_titlecolor ); ?>; }<?php }
178 if ($mantra_descriptioncolor != "0D85CC") { ?> #site-description { color:<?php echo esc_attr( $mantra_descriptioncolor ); ?>; }<?php }
179 - if ($mantra_contentcolor != "333333") { ?> #content, #content p, #content ul, #content ol { color:<?php echo esc_attr( $mantra_contentcolor ); ?> ;}<?php }
180 + if ($mantra_contentcolor != "333333") { ?> #content { color:<?php echo esc_attr( $mantra_contentcolor ); ?> ;}<?php }
181 if ($mantra_linkscolor != "0D85CC") { ?> .widget-area a:link, .widget-area a:visited, a:link, a:visited ,#searchform #s:hover, #container #s:hover, #access a:hover,
182 #wp-calendar tbody td a, #site-info a, #site-copyright a, #access li:hover > a,
183 #access ul ul:hover > a { color:<?php echo esc_attr( $mantra_linkscolor ); ?>; }<?php }
184 @@ -188,10 +188,10 @@ function mantra_custom_styles() {
185 if ($mantra_sideheadbackcolor != "444444") { ?> .widget-title { background-color:<?php echo esc_attr( $mantra_sideheadbackcolor ); ?>; }<?php }
186 if ($mantra_sideheadtextcolor != "2EA5FD") { ?> .widget-title { color:<?php echo esc_attr( $mantra_sideheadtextcolor ); ?>; }<?php }
187
188 - if ($mantra_magazinelayout == "Enable") { ?> #content article.post{ float:left; width:47%; margin-right:3%; }
189 - #content article.sticky { margin-right:3%;padding:0; }
190 + if ($mantra_magazinelayout == "Enable") { ?> #content article.post{ float:left; width:48%; margin-right:4%; }
191 + #content article.sticky { padding: 0; }
192 #content article.sticky > * {margin:2%;}
193 - #content article:nth-of-type(2n+1) {clear: both; } <?php } ?>
194 + #content article:nth-of-type(2n) {clear: right; margin-right: 0;} <?php } ?>
195
196 #footer-widget-area .widget-title { color:<?php echo esc_attr( $mantra_footerheader ); ?>; }
197 #footer-widget-area a { color:<?php echo esc_attr( $mantra_footertext ); ?>; }
198 @@ -215,7 +215,7 @@ function mantra_custom_styles() {
199 if ($mantra_postcateg == "Hide") { ?> .entry-meta span.bl_categ, .entry-meta2 span.bl_categ { display:none; } <?php }
200 if ($mantra_posttag == "Hide") { ?> .entry-utility span.bl_posted, .entry-meta2 span.bl_tagg,.entry-meta3 span.bl_tagg { display:none; } <?php }
201 if ($mantra_postbook == "Hide") { ?> .entry-utility span.bl_bookmark { display:none; } <?php }
202 - if ($mantra_parmargin) { ?> #content p:not(:last-child), .entry-content ul, .entry-summary ul,
203 + if ($mantra_parmargin) { ?> .entry-content p:not(:last-child), .entry-content ul, .entry-summary ul,
204 .entry-content ol, .entry-summary ol { margin-bottom:<?php echo esc_attr( $mantra_parmargin ); ?>;} <?php }
205 if ($mantra_parindent != "0px") { ?> p {text-indent: <?php echo esc_attr( $mantra_parindent );?>; } <?php }
206 if ($mantra_posttime == "Hide") { ?> .entry-meta .entry-time { display:none; } <?php }
207
208 diff --git a/themes/mantra/includes/theme-frontpage.php b/themes/mantra/includes/theme-frontpage.php
209 index aaba9bbb..a730d6b6 100644
210 --- a/themes/mantra/includes/theme-frontpage.php
211 +++ b/themes/mantra/includes/theme-frontpage.php
212 @@ -167,8 +167,8 @@ function mantra_frontpage_generator() {
213 <?php } // columns
214
215 // Frontpage text areas
216 - if (!empty($mantra_fronttext3)) {?><div id="front-text3" class="front-text"><?php echo do_shortcode( $mantra_fronttext3 ) ?></div><?php }
217 - if (!empty($mantra_fronttext4)) {?><div id="front-text4" class="front-text"><?php echo do_shortcode( $mantra_fronttext4 ) ?></div><?php }
218 + if (!empty($mantra_fronttext3)) {?><div id="front-text3" class="front-text"><?php echo do_shortcode( force_balance_tags( $mantra_fronttext3 ) ) ?></div><?php }
219 + if (!empty($mantra_fronttext4)) {?><div id="front-text4" class="front-text"><?php echo do_shortcode( force_balance_tags( $mantra_fronttext4 ) ) ?></div><?php }
220
221 ?>
222 </div> <!-- frontpage -->
223
224 diff --git a/themes/mantra/includes/theme-functions.php b/themes/mantra/includes/theme-functions.php
225 index 5658a254..dfadb1cd 100644
226 --- a/themes/mantra/includes/theme-functions.php
227 +++ b/themes/mantra/includes/theme-functions.php
228 @@ -33,6 +33,7 @@ add_action( 'wp_head', 'mantra_header_scripts', 100 );
229 */
230 function mantra_title_and_description() {
231 global $mantra_options;
232 + global $mantra_totalSize;
233 extract( $mantra_options );
234
235 // Header styling and image loading
236 @@ -41,7 +42,7 @@ function mantra_title_and_description() {
237 global $post;
238
239 if (get_header_image() != '') { $header_image = get_header_image(); }
240 - if ( is_singular() && has_post_thumbnail( $post->ID ) && ($mantra_fheader == "Enable") && ($image = wp_get_attachment_image_src(get_post_thumbnail_id( $post->ID ), 'header' ) ) && (intval($image[1]) >= HEADER_IMAGE_WIDTH) ):
241 + if ( is_singular() && has_post_thumbnail( $post->ID ) && ($mantra_fheader == "Enable") && ($image = wp_get_attachment_image_src(get_post_thumbnail_id( $post->ID ), 'header' ) ) && (intval($image[1]) >= $mantra_totalSize) ):
242 $header_image = $image[0];
243 endif;
244
245
246 diff --git a/themes/mantra/includes/theme-setup.php b/themes/mantra/includes/theme-setup.php
247 index cc23596d..216c6740 100644
248 --- a/themes/mantra/includes/theme-setup.php
249 +++ b/themes/mantra/includes/theme-setup.php
250 @@ -86,8 +86,7 @@ function mantra_setup() {
251 add_theme_support( 'custom-background' );
252
253 // Register image size for the theme's header area
254 - $mantra_hheight = intval( $mantra_hheight );
255 - add_image_size( 'header', apply_filters( 'mantra_header_image_width', $mantra_totalSize ), apply_filters( 'mantra_header_image_height', $mantra_hheight), true );
256 + add_image_size( 'header', apply_filters( 'mantra_header_image_width', $mantra_totalSize ), apply_filters( 'mantra_header_image_height', intval($mantra_hheight) ), apply_filters( 'mantra_header_image_crop', true ) );
257
258 // Register image size for presentation page slider
259 add_image_size( 'slider', apply_filters( 'mantra_slider_image_width', $mantra_fpsliderwidth ), apply_filters( 'mantra_slider_image_height', $mantra_fpsliderheight ), true );
260
261 diff --git a/themes/mantra/readme.txt b/themes/mantra/readme.txt
262 index 504ae8f3..563bab36 100644
263 --- a/themes/mantra/readme.txt
264 +++ b/themes/mantra/readme.txt
265 @@ -1,11 +1,11 @@
266 =============
267 Mantra WordPress Theme
268 -Copyright 2011-18 Cryout Creations
269 +Copyright 2011-19 Cryout Creations
270
271 Author: Cryout Creations
272 Requires at least: 4.2
273 -Tested up to: 4.9.6
274 -Stable tag: 3.0.5
275 +Tested up to: 5.0.3
276 +Stable tag: 3.1.0
277 License: GPLv3
278 License URI: http://www.gnu.org/licenses/gpl.html
279 Donate link: https://www.cryoutcreations.eu/donate/
280 @@ -71,7 +71,7 @@ https://www.pexels.com/photo/attractive-bar-barista-breakfast-296888/
281 All other images bundled with the theme (used in the demo presentation page and admin section) are created by Cryout Creations and released with the theme under GPLv3 as well.
282
283
284 -== Original Translations ==
285 +== Original Translations Contributors ==
286
287 Chinese (Simplified) - L�n Xuan Li
288 Czech - Satapouch
289 @@ -95,11 +95,27 @@ Turkish - Emre Dalkili�
290
291 == Changelog ==
292
293 += 3.1.0 =
294 +* Added 'mantra_header_image_crop' filter for 'header' image size crop position attribute
295 +* Added HTML markup auto-correction on presentation page extra text areas
296 +* Adjusted general lists bullet styling to improve compatibility with plugins and Gutenberg
297 +* Fixed widgets containing custom HTML sometimes overlapping in the sidebars
298 +* Fixed posts on the presentation page having extra margin when magazine layout was used
299 +* Fixed use of undefined constant sometimes making featured images unusable in the header
300 +* Gutenberg editor tweaks and improvements:
301 + * Added suport for wide image blocks in content
302 + * Adjusted aligned elements styling to improve compatibility with Gutenberg
303 + * Improved list appearance in blocks
304 + * Improved horizontal ruler (hr) styling to work with Gutenberg
305 + * Fixed captions alignment and sizing in Gutenberg blocks
306 + * Fixed block galleries margins
307 + * Fixed cover image blocks text appearance
308 +
309 = 3.0.5 =
310 * Added option to control editor styling activation after reintroducing basic editor styling
311 * Improved slider captions by making slide links clickable through the captions
312 * Improved slider administration interface by hiding unused fields when slider shortcode is used
313 -* Changed default excerpt ellipis value to avoid settings page issues on some servers
314 +* Changed default excerpt ellipsis value to avoid settings page issues on some servers
315 * Fixed magazine layout two columns responsiveness
316 * Fixed usage of obsolete constant in generated styling
317
318
319 diff --git a/themes/mantra/resources/css/rtl.css b/themes/mantra/resources/css/rtl.css
320 index 83f7bd6d..a5c212b8 100644
321 --- a/themes/mantra/resources/css/rtl.css
322 +++ b/themes/mantra/resources/css/rtl.css
323 @@ -61,6 +61,7 @@ body {
324 .entry-content ul > li {
325 padding-left: 0;
326 padding-right: 20px;
327 + background-position-x: right;
328 }
329
330 .entry-content li li {
331
332 diff --git a/themes/mantra/style.css b/themes/mantra/style.css
333 index ad14b4e8..7f9f1905 100644
334 --- a/themes/mantra/style.css
335 +++ b/themes/mantra/style.css
336 @@ -4,13 +4,13 @@ Theme URI: https://www.cryoutcreations.eu/wordpress-themes/mantra
337 Description: Mantra is a do-it-yourself WordPress theme, featuring a pack of over 100 customization options and easy to use tweaks capable of tuning WordPress to your very specific needs and likes. With the help of a simple and efficient user interface you can customize everything:the layout (1,2 or 3 columns), total and partial site widths, colors (all texts, links, backgrounds etc.), fonts (over 35 font-families plus all Google Fonts), text and header sizes, post metas, post excerpts, post formats, header and background images, custom menus, 27 social media links and icons, pins, bullets and much much more. With a fully responsive layout,a customizable showcase presentation page, animated slider, magazine and blog layouts, 8 widget areas, modern graphics and an easy and intuitive admin section, you can start creating your dream site right now.
338 Author: Cryout Creations
339 Author URI: https://www.cryoutcreations.eu
340 -Version: 3.0.5
341 +Version: 3.1.0
342 License: GNU General Public License v2.0
343 License URI: http://www.gnu.org/licenses/gpl-2.0.html
344 Tags: one-column, two-columns, three-columns, right-sidebar, left-sidebar, footer-widgets, grid-layout, custom-background, custom-colors, custom-header, custom-menu, featured-image-header, featured-images, front-page-post-form, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, blog, entertainment, news
345 Text domain: mantra
346
347 -Copyright (c) 2011-2018 Cryout Creations
348 +Copyright (c) 2011-2019 Cryout Creations
349 https://www.cryoutcreations.eu
350 */
351
352 @@ -136,22 +136,22 @@ a img {
353 }
354
355 /* Post info */
356 -.crycon-author:before { content: '\e801'; } /* '?' */
357 -.crycon-category:before { content: '\e805'; } /* '?' */
358 -.crycon-category2:before { content: '\e817'; } /* '?' */
359 -.crycon-folder-close:before { content: '\e81c'; } /* '?' */
360 -.crycon-folder-open:before { content: '\e81d'; } /* '?' */
361 -.crycon-tag:before { content: '\e802'; } /* '?' */
362 -.crycon-bookmark:before { content: '\e810'; } /* '?' */
363 -.crycon-edit:before { content: '\e804'; } /* '?' */
364 -.crycon-comment:before { content: '\e800'; } /* '?' */
365 -.crycon-comments:before { content: '\e815';} /* '?' */
366 -.crycon-date:before { content: '\e82b'; } /* '?' */
367 -.crycon-time:before { content: '\e80d'; } /* '?' */
368 +.crycon-author:before { content: '\e801'; }
369 +.crycon-category:before { content: '\e805'; }
370 +.crycon-category2:before { content: '\e817'; }
371 +.crycon-folder-close:before { content: '\e81c'; }
372 +.crycon-folder-open:before { content: '\e81d'; }
373 +.crycon-tag:before { content: '\e802'; }
374 +.crycon-bookmark:before { content: '\e810'; }
375 +.crycon-edit:before { content: '\e804'; }
376 +.crycon-comment:before { content: '\e800'; }
377 +.crycon-comments:before { content: '\e815';}
378 +.crycon-date:before { content: '\e82b'; }
379 +.crycon-time:before { content: '\e80d'; }
380 .crycon-forward:before { content: '\e81b';-webkit-transform:rotate(180deg) scale(-1, 1);-ms-transform:rotate(180deg) scale(-1, 1);transform:rotate(180deg) scale(-1, 1);margin-left:5px;font-size:10px;
381 --moz-transition:.2s margin ease; -o-transition:.2s margin ease; -webkit-transition:.2s margin ease; transition:.2s margin ease; } /* '?' */
382 +-moz-transition:.2s margin ease; -o-transition:.2s margin ease; -webkit-transition:.2s margin ease; transition:.2s margin ease; }
383 .crycon-reply:before { content: '\e81b';transform:rotate(180deg);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);margin-right:5px;font-size:10px;
384 --moz-transition:.2s margin ease; -o-transition:.2s margin ease; -webkit-transition:.2s margin ease; transition:.2s margin ease; } /* '?' */
385 +-moz-transition:.2s margin ease; -o-transition:.2s margin ease; -webkit-transition:.2s margin ease; transition:.2s margin ease; }
386
387 /* Post metas */
388 .crycon-metas:before {
389 @@ -162,100 +162,152 @@ a img {
390 color: #555;
391 }
392
393 -.crycon-time:before,.crycon-folder-close:before, .crycon-folder-open:before {font-size:14px; } /* '?' */
394 -.crycon-time:before {margin-top:1px; } /* '?' */
395 -.crycon-edit:before {margin-right:1px; } /* '?' */
396 +.crycon-time:before,.crycon-folder-close:before, .crycon-folder-open:before {font-size:14px; }
397 +.crycon-time:before {margin-top:1px; }
398 +.crycon-edit:before {margin-right:1px; }
399
400 /* Post formats */
401 -.crycon-status:before { content: '\e81a'; } /* '?' */
402 -.crycon-aside:before { content: '\e82a'; } /* '?' */
403 -.crycon-link:before { content: '\e818'; } /* '?' */
404 -.crycon-audio:before { content: '\e823'; } /* '?' */
405 -.crycon-video:before { content: '\e829'; } /* '?' */
406 -.crycon-image:before { content: '\e824'; } /* '?' */
407 -.crycon-gallery:before { content: '\e825'; } /* '?' */
408 -.crycon-quote:before { content: '\e80f'; } /* '?' */
409 +.crycon-status:before { content: '\e81a'; }
410 +.crycon-aside:before { content: '\e82a'; }
411 +.crycon-link:before { content: '\e818'; }
412 +.crycon-audio:before { content: '\e823'; }
413 +.crycon-video:before { content: '\e829'; }
414 +.crycon-image:before { content: '\e824'; }
415 +.crycon-gallery:before { content: '\e825'; }
416 +.crycon-quote:before { content: '\e80f'; }
417
418 /* Misc */
419 -.crycon-search:before { content: '\e816'; } /* '?' */
420 -.crycon-down-dir:before { content: '\e803'; } /* '?' */
421 -.crycon-right-dir:before { content: '\e806'; } /* '?' */
422 -.crycon-angle-left:before { content: '\e807'; } /* '?' */
423 -.crycon-angle-right:before { content: '\e808'; } /* '?' */
424 -.crycon-angle-up:before { content: '\e809'; } /* '?' */
425 -.crycon-angle-down:before { content: '\e80a'; } /* '?' */
426 -.crycon-minus:before { content: '\e80b'; } /* '?' */
427 -.crycon-left-open:before { content: '\e80c'; } /* '?' */
428 -.crycon-up:before { content: '\e80e'; } /* '?' */
429 -.crycon-left-dir:before { content: '\e811'; } /* '?' */
430 -.crycon-up-open:before { content: '\e812'; } /* '?' */
431 -.crycon-ok:before { content: '\e813'; } /* '?' */
432 -.crycon-cancel:before { content: '\e814'; } /* '?' */
433 -.crycon-up-dir:before { content: '\e819'; } /* '?' */
434 -.crycon-right-open:before { content: '\e81e'; } /* '?' */
435 -.crycon-home:before { content: '\e81f'; } /* '?' */
436 -.crycon-menu:before { content: '\e820'; } /* '?' */
437 -.crycon-plus:before { content: '\e821'; } /* '?' */
438 -.crycon-down-open:before { content: '\e822'; } /* '?' */
439 -.crycon-down:before { content: '\e826'; } /* '?' */
440 -.crycon-left:before { content: '\e827'; } /* '?' */
441 -.crycon-right:before { content: '\e828'; } /* '?' */
442 -.crycon-star-empty:before { content: '\e82c'; } /* '?' */
443 -.crycon-star:before { content: '\e82d'; } /* '?' */
444 -.crycon-mail:before { content: '\e82e'; } /* '?' */
445 -.crycon-home-1:before { content: '\e82f'; } /* '?' */
446 -.crycon-attach:before { content: '\e830'; } /* '?' */
447 -.crycon-eye:before { content: '\e831'; } /* '?' */
448 -.crycon-eye-off:before { content: '\e832'; } /* '?' */
449 -.crycon-tags:before { content: '\e833'; } /* '?' */
450 -.crycon-flag:before { content: '\e834'; } /* '?' */
451 -.crycon-warning:before { content: '\e835'; } /* '?' */
452 -.crycon-location:before { content: '\e836'; } /* '?' */
453 -.crycon-trash:before { content: '\e837'; } /* '?' */
454 -.crycon-doc:before { content: '\e838'; } /* '?' */
455 -.crycon-phone:before { content: '\e839'; } /* '?' */
456 -.crycon-cog:before { content: '\e83a'; } /* '?' */
457 -.crycon-basket:before { content: '\e83b'; } /* '?' */
458 -.crycon-basket-circled:before { content: '\e83c'; } /* '?' */
459 -.crycon-wrench:before { content: '\e83d'; } /* '?' */
460 -.crycon-wrench-circled:before { content: '\e83e'; } /* '?' */
461 -.crycon-mic:before { content: '\e83f'; } /* '?' */
462 -.crycon-volume:before { content: '\e840'; } /* '?' */
463 -.crycon-volume-down:before { content: '\e841'; } /* '?' */
464 -.crycon-volume-off:before { content: '\e842'; } /* '?' */
465 -.crycon-headphones:before { content: '\e843'; } /* '?' */
466 -.crycon-lightbulb:before { content: '\e844'; } /* '?' */
467 -.crycon-resize-full:before { content: '\e845'; } /* '?' */
468 -.crycon-resize-full-alt:before { content: '\e846'; } /* '?' */
469 -.crycon-resize-small:before { content: '\e847'; } /* '?' */
470 -.crycon-resize-vertical:before { content: '\e848'; } /* '?' */
471 -.crycon-resize-horizontal:before { content: '\e849'; } /* '?' */
472 -.crycon-move:before { content: '\e84a'; } /* '?' */
473 -.crycon-zoom-in:before { content: '\e84b'; } /* '?' */
474 -.crycon-zoom-out:before { content: '\e84c'; } /* '?' */
475 -.crycon-arrows-cw:before { content: '\e84d'; } /* '?' */
476 -.crycon-desktop:before { content: '\e84e'; } /* '?' */
477 -.crycon-inbox:before { content: '\e84f'; } /* '?' */
478 -.crycon-cloud:before { content: '\e850'; } /* '?' */
479 -.crycon-book:before { content: '\e851'; } /* '?' */
480 -.crycon-certificate:before { content: '\e852'; } /* '?' */
481 -.crycon-tasks:before { content: '\e853'; } /* '?' */
482 -.crycon-thumbs-up:before { content: '\e854'; } /* '?' */
483 -.crycon-thumbs-down:before { content: '\e855'; } /* '?' */
484 -.crycon-help-circled:before { content: '\e856'; } /* '?' */
485 -.crycon-star-circled:before { content: '\e857'; } /* '?' */
486 -.crycon-bell:before { content: '\e858'; } /* '?' */
487 -.crycon-rss:before { content: '\e859'; } /* '?' */
488 -.crycon-trash-circled:before { content: '\e85a'; } /* '?' */
489 -.crycon-cogs:before { content: '\e85b'; } /* '?' */
490 -.crycon-cog-circled:before { content: '\e85c'; } /* '?' */
491 -.crycon-calendar-circled:before { content: '\e85d'; } /* '?' */
492 -.crycon-mic-circled:before { content: '\e85e'; } /* '?' */
493 -.crycon-volume-up:before { content: '\e85f'; } /* '?' */
494 -.crycon-print:before { content: '\e860'; } /* '?' */
495 -.crycon-edit-alt:before { content: '\e861'; } /* '?' */
496 -.crycon-edit-2:before { content: '\e862'; } /* '?' */
497 -.crycon-block:before { content: '\e863'; } /* '?' */
498 +.crycon-search:before { content: '\e816'; }
499 +.crycon-down-dir:before { content: '\e803'; }
500 +.crycon-right-dir:before { content: '\e806'; }
501 +.crycon-angle-left:before { content: '\e807'; }
502 +.crycon-angle-right:before { content: '\e808'; }
503 +.crycon-angle-up:before { content: '\e809'; }
504 +.crycon-angle-down:before { content: '\e80a'; }
505 +.crycon-minus:before { content: '\e80b'; }
506 +.crycon-left-open:before { content: '\e80c'; }
507 +.crycon-up:before { content: '\e80e'; }
508 +.crycon-left-dir:before { content: '\e811'; }
509 +.crycon-up-open:before { content: '\e812'; }
510 +.crycon-ok:before { content: '\e813'; }
511 +.crycon-cancel:before { content: '\e814'; }
512 +.crycon-up-dir:before { content: '\e819'; }
513 +.crycon-right-open:before { content: '\e81e'; }
514 +.crycon-home:before { content: '\e81f'; }
515 +.crycon-menu:before { content: '\e820'; }
516 +.crycon-plus:before { content: '\e821'; }
517 +.crycon-down-open:before { content: '\e822'; }
518 +.crycon-down:before { content: '\e826'; }
519 +.crycon-left:before { content: '\e827'; }
520 +.crycon-right:before { content: '\e828'; }
521 +.crycon-star-empty:before { content: '\e82c'; }
522 +.crycon-star:before { content: '\e82d'; }
523 +.crycon-mail:before { content: '\e82e'; }
524 +.crycon-home-1:before { content: '\e82f'; }
525 +.crycon-attach:before { content: '\e830'; }
526 +.crycon-eye:before { content: '\e831'; }
527 +.crycon-eye-off:before { content: '\e832'; }
528 +.crycon-tags:before { content: '\e833'; }
529 +.crycon-flag:before { content: '\e834'; }
530 +.crycon-warning:before { content: '\e835'; }
531 +.crycon-location:before { content: '\e836'; }
532 +.crycon-trash:before { content: '\e837'; }
533 +.crycon-doc:before { content: '\e838'; }
534 +.crycon-phone:before { content: '\e839'; }
535 +.crycon-cog:before { content: '\e83a'; }
536 +.crycon-basket:before { content: '\e83b'; }
537 +.crycon-basket-circled:before { content: '\e83c'; }
538 +.crycon-wrench:before { content: '\e83d'; }
539 +.crycon-wrench-circled:before { content: '\e83e'; }
540 +.crycon-mic:before { content: '\e83f'; }
541 +.crycon-volume:before { content: '\e840'; }
542 +.crycon-volume-down:before { content: '\e841'; }
543 +.crycon-volume-off:before { content: '\e842'; }
544 +.crycon-headphones:before { content: '\e843'; }
545 +.crycon-lightbulb:before { content: '\e844'; }
546 +.crycon-resize-full:before { content: '\e845'; }
547 +.crycon-resize-full-alt:before { content: '\e846'; }
548 +.crycon-resize-small:before { content: '\e847'; }
549 +.crycon-resize-vertical:before { content: '\e848'; }
550 +.crycon-resize-horizontal:before { content: '\e849'; }
551 +.crycon-move:before { content: '\e84a'; }
552 +.crycon-zoom-in:before { content: '\e84b'; }
553 +.crycon-zoom-out:before { content: '\e84c'; }
554 +.crycon-arrows-cw:before { content: '\e84d'; }
555 +.crycon-desktop:before { content: '\e84e'; }
556 +.crycon-inbox:before { content: '\e84f'; }
557 +.crycon-cloud:before { content: '\e850'; }
558 +.crycon-book:before { content: '\e851'; }
559 +.crycon-certificate:before { content: '\e852'; }
560 +.crycon-tasks:before { content: '\e853'; }
561 +.crycon-thumbs-up:before { content: '\e854'; }
562 +.crycon-thumbs-down:before { content: '\e855'; }
563 +.crycon-help-circled:before { content: '\e856'; }
564 +.crycon-star-circled:before { content: '\e857'; }
565 +.crycon-bell:before { content: '\e858'; }
566 +.crycon-rss:before { content: '\e859'; }
567 +.crycon-trash-circled:before { content: '\e85a'; }
568 +.crycon-cogs:before { content: '\e85b'; }
569 +.crycon-cog-circled:before { content: '\e85c'; }
570 +.crycon-calendar-circled:before { content: '\e85d'; }
571 +.crycon-mic-circled:before { content: '\e85e'; }
572 +.crycon-volume-up:before { content: '\e85f'; }
573 +.crycon-print:before { content: '\e860'; }
574 +.crycon-edit-alt:before { content: '\e861'; }
575 +.crycon-edit-2:before { content: '\e862'; }
576 +.crycon-block:before { content: '\e863'; }
577 +
578 +/* = Gutenberg
579 +-------------------------------------------------------------- */
580 +
581 +.entry-content .wp-block-archives,
582 +.entry-content .wp-block-categories,
583 +.entry-content .wp-block-latest-posts {
584 + padding: 0;
585 + list-style: none;
586 +}
587 +
588 +.wp-block-quote.is-large, .wp-block-quote.is-style-large {
589 + padding: 2em;
590 + margin-left: auto;
591 + margin-right: auto;
592 + font-size: 1.2em;
593 +}
594 +
595 +.aligncenter[class^='wp-block']:not([class^='wp-block-cover']) {
596 + display: table;
597 +}
598 +
599 +.wp-block-separator {
600 + max-width: 25%;
601 +}
602 +.wp-block-separator.is-style-wide {
603 + max-width: 100%;
604 +}
605 +.wp-block-separator.is-style-dots::before {
606 + color: inherit;
607 +}
608 +
609 +.wp-block-button {
610 + transition: .2s opacity;
611 +}
612 +
613 +.wp-block-button:hover {
614 + opacity: 0.85;
615 +}
616 +
617 +#content p.has-regular-font-size,
618 +#content p.has-large-font-size,
619 +#content p.has-larger-font-size {
620 + margin-bottom: 0.5em;
621 + line-height: 1;
622 +}
623 +
624 +.alignwide {
625 + max-width: 115%;
626 + margin-left: -6%;
627 + margin-right: -6%;
628 +}
629
630 /* =Layout
631 -------------------------------------------------------------- */
632 @@ -439,15 +491,16 @@ hr {
633 color: #333;
634 }
635
636 -#content p:not(:last-child) {
637 +.entry-content p:not(:last-child) {
638 margin-bottom: 1em;
639 }
640
641 -.entry-content ul, .entry-summary ul {
642 +.entry-content ul,
643 +.entry-summary ul {
644 margin-left: 1.5em;
645 }
646
647 -.entry-content ul, .entry-summary ul ,
648 +.entry-content ul, .entry-summary ul,
649 .entry-content ol, .entry-summary ol {
650 margin-bottom: 1.5em;
651 }
652 @@ -457,23 +510,32 @@ hr {
653 padding-left: 20px;
654 }
655
656 -.entry-content li li {
657 +.entry-content li li {
658 margin-left: 15px;
659 }
660
661 +.entry-content ul[class^='wp-block'],
662 +.entry-content ul[class^='wp-block'] > li,
663 +.entry-content [class^='wp-block'] ul,
664 +.entry-content [class^='wp-block'] ul > li {
665 + margin-left: 0;
666 + padding-left: 0;
667 + background-image: none;
668 +}
669 +
670 ol {
671 - list-style: decimal;
672 + list-style-type: decimal;
673 margin-left: 1.5em;
674
675 }
676 ol ol {
677 - list-style: upper-alpha;
678 + list-style-type: upper-alpha;
679 }
680 ol ol ol {
681 - list-style: lower-roman;
682 + list-style-type: lower-roman;
683 }
684 ol ol ol ol {
685 - list-style: lower-alpha;
686 + list-style-type: lower-alpha;
687 }
688 ul ul,
689 ol ol,
690 @@ -1469,49 +1531,49 @@ article.format-aside h3.entry-format {
691 /* =Images
692 -------------------------------------------------------------- */
693
694 -#content img {
695 +.entry-content img {
696 margin: 0;
697 height: auto;
698 max-width: 100%;
699 }
700
701 -#content table img {
702 +.entry-content table img {
703 max-width: initial;
704 }
705
706 -#content img:hover {}
707 +img:hover {}
708
709 -#content .alignleft,
710 -#content img.alignleft {
711 - display: inline;
712 +.alignleft,
713 +img.alignleft {
714 float: left;
715 margin-right: 24px;
716 margin-top: 4px;
717 }
718
719 -#content .alignright,
720 -#content img.alignright {
721 - display: inline;
722 +.alignright,
723 +img.alignright {
724 float: right;
725 margin-top: 4px;
726 margin-left: 24px;
727 }
728
729 -#content .aligncenter,
730 -#content img.aligncenter {
731 - display: block;
732 +.aligncenter,
733 +img.aligncenter {
734 clear: both;
735 margin-right: auto;
736 margin-left: auto;
737 }
738 +img.aligncenter {
739 + display: block;
740 +}
741
742 -#content img.alignleft,
743 -#content img.alignright,
744 -#content img.aligncenter {
745 +img.alignleft,
746 +img.alignright,
747 +img.aligncenter {
748 margin-bottom: 12px;
749 }
750
751 -#content .wp-caption {
752 +.wp-caption {
753 max-width: 100%;
754 margin-bottom: 20px;
755 padding: 34px 0 4px;
756 @@ -1520,7 +1582,7 @@ article.format-aside h3.entry-format {
757 border-radius: 2px;
758 }
759
760 -#content .wp-caption img {
761 +.wp-caption img {
762 width: 100%;
763 margin: 0 auto;
764 padding: 0;
765 @@ -1528,14 +1590,14 @@ article.format-aside h3.entry-format {
766 box-shadow: none;
767 }
768
769 -#content .wp-caption p.wp-caption-text {
770 +.wp-caption p.wp-caption-text {
771 padding: 10px;
772 font-size: .9em;
773 text-align: center;
774 text-indent: 0;
775 }
776
777 -#content .wp-smiley {
778 +.wp-smiley {
779 width:auto !important;
780 margin: 0;
781 border: 0 !important;
782 @@ -2051,9 +2113,16 @@ h3#reply-title {
783 }
784
785 .widget-container {
786 + position: relative;
787 margin: 0 0 40px 0;
788 }
789
790 +.widget-container::after {
791 + content: "";
792 + display: block;
793 + clear: both;
794 +}
795 +
796 .widget-title {
797 position: relative;
798 width: 100%;
799
800 diff --git a/themes/twentyfifteen/archive.php b/themes/twentyfifteen/archive.php
801 index bb6021e3..26a9a4b4 100644
802 --- a/themes/twentyfifteen/archive.php
803 +++ b/themes/twentyfifteen/archive.php
804 @@ -9,7 +9,7 @@
805 * new template file for each one. For example, tag.php (Tag archives),
806 * category.php (Category archives), author.php (Author archives), etc.
807 *
808 - * @link https://codex.wordpress.org/Template_Hierarchy
809 + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
810 *
811 * @package WordPress
812 * @subpackage Twenty_Fifteen
813 @@ -32,7 +32,8 @@ get_header(); ?>
814
815 <?php
816 // Start the Loop.
817 - while ( have_posts() ) : the_post();
818 + while ( have_posts() ) :
819 + the_post();
820
821 /*
822 * Include the Post-Format-specific template for the content.
823 @@ -41,17 +42,19 @@ get_header(); ?>
824 */
825 get_template_part( 'content', get_post_format() );
826
827 - // End the loop.
828 + // End the loop.
829 endwhile;
830
831 // Previous/next page navigation.
832 - the_posts_pagination( array(
833 - 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
834 - 'next_text' => __( 'Next page', 'twentyfifteen' ),
835 - 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
836 - ) );
837 + the_posts_pagination(
838 + array(
839 + 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
840 + 'next_text' => __( 'Next page', 'twentyfifteen' ),
841 + 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
842 + )
843 + );
844
845 - // If no content, include the "No posts found" template.
846 + // If no content, include the "No posts found" template.
847 else :
848 get_template_part( 'content', 'none' );
849
850
851 diff --git a/themes/twentyfifteen/comments.php b/themes/twentyfifteen/comments.php
852 index 6b97ec39..b7ab478a 100644
853 --- a/themes/twentyfifteen/comments.php
854 +++ b/themes/twentyfifteen/comments.php
855 @@ -26,23 +26,23 @@ if ( post_password_required() ) {
856 <h2 class="comments-title">
857 <?php
858 $comments_number = get_comments_number();
859 - if ( '1' === $comments_number ) {
860 - /* translators: %s: post title */
861 - printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentyfifteen' ), get_the_title() );
862 - } else {
863 - printf(
864 - /* translators: 1: number of comments, 2: post title */
865 - _nx(
866 - '%1$s thought on &ldquo;%2$s&rdquo;',
867 - '%1$s thoughts on &ldquo;%2$s&rdquo;',
868 - $comments_number,
869 - 'comments title',
870 - 'twentyfifteen'
871 - ),
872 - number_format_i18n( $comments_number ),
873 - get_the_title()
874 - );
875 - }
876 + if ( '1' === $comments_number ) {
877 + /* translators: %s: post title */
878 + printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentyfifteen' ), get_the_title() );
879 + } else {
880 + printf(
881 + /* translators: 1: number of comments, 2: post title */
882 + _nx(
883 + '%1$s thought on &ldquo;%2$s&rdquo;',
884 + '%1$s thoughts on &ldquo;%2$s&rdquo;',
885 + $comments_number,
886 + 'comments title',
887 + 'twentyfifteen'
888 + ),
889 + number_format_i18n( $comments_number ),
890 + get_the_title()
891 + );
892 + }
893 ?>
894 </h2>
895
896 @@ -50,11 +50,13 @@ if ( post_password_required() ) {
897
898 <ol class="comment-list">
899 <?php
900 - wp_list_comments( array(
901 - 'style' => 'ol',
902 - 'short_ping' => true,
903 - 'avatar_size' => 56,
904 - ) );
905 + wp_list_comments(
906 + array(
907 + 'style' => 'ol',
908 + 'short_ping' => true,
909 + 'avatar_size' => 56,
910 + )
911 + );
912 ?>
913 </ol><!-- .comment-list -->
914
915 @@ -64,9 +66,9 @@ if ( post_password_required() ) {
916
917 <?php
918 // If comments are closed and there are comments, let's leave a little note, shall we?
919 - if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
920 - ?>
921 - <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfifteen' ); ?></p>
922 + if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
923 + ?>
924 + <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfifteen' ); ?></p>
925 <?php endif; ?>
926
927 <?php comment_form(); ?>
928
929 diff --git a/themes/twentyfifteen/content-link.php b/themes/twentyfifteen/content-link.php
930 index 2beb1f78..f9a31997 100644
931 --- a/themes/twentyfifteen/content-link.php
932 +++ b/themes/twentyfifteen/content-link.php
933 @@ -15,39 +15,43 @@
934
935 <header class="entry-header">
936 <?php
937 - if ( is_single() ) :
938 - the_title( sprintf( '<h1 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h1>' );
939 + if ( is_single() ) :
940 + the_title( sprintf( '<h1 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h1>' );
941 else :
942 the_title( sprintf( '<h2 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h2>' );
943 endif;
944 - ?>
945 + ?>
946 </header>
947 <!-- .entry-header -->
948
949 <div class="entry-content">
950 <?php
951 /* translators: %s: Name of current post */
952 - the_content( sprintf(
953 - __( 'Continue reading %s', 'twentyfifteen' ),
954 - the_title( '<span class="screen-reader-text">', '</span>', false )
955 - ) );
956 + the_content(
957 + sprintf(
958 + __( 'Continue reading %s', 'twentyfifteen' ),
959 + the_title( '<span class="screen-reader-text">', '</span>', false )
960 + )
961 + );
962
963 - wp_link_pages( array(
964 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
965 - 'after' => '</div>',
966 - 'link_before' => '<span>',
967 - 'link_after' => '</span>',
968 - 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
969 - 'separator' => '<span class="screen-reader-text">, </span>',
970 - ) );
971 - ?>
972 + wp_link_pages(
973 + array(
974 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
975 + 'after' => '</div>',
976 + 'link_before' => '<span>',
977 + 'link_after' => '</span>',
978 + 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
979 + 'separator' => '<span class="screen-reader-text">, </span>',
980 + )
981 + );
982 + ?>
983 </div>
984 <!-- .entry-content -->
985
986 <?php
987 // Author bio.
988 - if ( is_single() && get_the_author_meta( 'description' ) ) :
989 - get_template_part( 'author-bio' );
990 + if ( is_single() && get_the_author_meta( 'description' ) ) :
991 + get_template_part( 'author-bio' );
992 endif;
993 ?>
994
995
996 diff --git a/themes/twentyfifteen/content-none.php b/themes/twentyfifteen/content-none.php
997 index f1d59be4..cf118d21 100644
998 --- a/themes/twentyfifteen/content-none.php
999 +++ b/themes/twentyfifteen/content-none.php
1000 @@ -2,7 +2,7 @@
1001 /**
1002 * The template part for displaying a message that posts cannot be found
1003 *
1004 - * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
1005 + * Learn more: {@link https://developer.wordpress.org/themes/basics/template-hierarchy/}
1006 *
1007 * @package WordPress
1008 * @subpackage Twenty_Fifteen
1009
1010 diff --git a/themes/twentyfifteen/content-page.php b/themes/twentyfifteen/content-page.php
1011 index 7d37daa7..5b9e796c 100644
1012 --- a/themes/twentyfifteen/content-page.php
1013 +++ b/themes/twentyfifteen/content-page.php
1014 @@ -21,15 +21,17 @@
1015 <div class="entry-content">
1016 <?php the_content(); ?>
1017 <?php
1018 - wp_link_pages( array(
1019 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
1020 - 'after' => '</div>',
1021 - 'link_before' => '<span>',
1022 - 'link_after' => '</span>',
1023 - 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
1024 - 'separator' => '<span class="screen-reader-text">, </span>',
1025 - ) );
1026 - ?>
1027 + wp_link_pages(
1028 + array(
1029 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
1030 + 'after' => '</div>',
1031 + 'link_before' => '<span>',
1032 + 'link_after' => '</span>',
1033 + 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
1034 + 'separator' => '<span class="screen-reader-text">, </span>',
1035 + )
1036 + );
1037 + ?>
1038 </div><!-- .entry-content -->
1039
1040 <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
1041
1042 diff --git a/themes/twentyfifteen/content-search.php b/themes/twentyfifteen/content-search.php
1043 index 33e2d993..faa79f50 100644
1044 --- a/themes/twentyfifteen/content-search.php
1045 +++ b/themes/twentyfifteen/content-search.php
1046 @@ -2,7 +2,7 @@
1047 /**
1048 * The template part for displaying results in search pages
1049 *
1050 - * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
1051 + * Learn more: {@link https://developer.wordpress.org/themes/basics/template-hierarchy/}
1052 *
1053 * @package WordPress
1054 * @subpackage Twenty_Fifteen
1055
1056 diff --git a/themes/twentyfifteen/content.php b/themes/twentyfifteen/content.php
1057 index 24756007..1ac377af 100644
1058 --- a/themes/twentyfifteen/content.php
1059 +++ b/themes/twentyfifteen/content.php
1060 @@ -18,37 +18,41 @@
1061
1062 <header class="entry-header">
1063 <?php
1064 - if ( is_single() ) :
1065 - the_title( '<h1 class="entry-title">', '</h1>' );
1066 + if ( is_single() ) :
1067 + the_title( '<h1 class="entry-title">', '</h1>' );
1068 else :
1069 the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
1070 endif;
1071 - ?>
1072 + ?>
1073 </header><!-- .entry-header -->
1074
1075 <div class="entry-content">
1076 <?php
1077 /* translators: %s: Name of current post */
1078 - the_content( sprintf(
1079 - __( 'Continue reading %s', 'twentyfifteen' ),
1080 - the_title( '<span class="screen-reader-text">', '</span>', false )
1081 - ) );
1082 + the_content(
1083 + sprintf(
1084 + __( 'Continue reading %s', 'twentyfifteen' ),
1085 + the_title( '<span class="screen-reader-text">', '</span>', false )
1086 + )
1087 + );
1088
1089 - wp_link_pages( array(
1090 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
1091 - 'after' => '</div>',
1092 - 'link_before' => '<span>',
1093 - 'link_after' => '</span>',
1094 - 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
1095 - 'separator' => '<span class="screen-reader-text">, </span>',
1096 - ) );
1097 - ?>
1098 + wp_link_pages(
1099 + array(
1100 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
1101 + 'after' => '</div>',
1102 + 'link_before' => '<span>',
1103 + 'link_after' => '</span>',
1104 + 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
1105 + 'separator' => '<span class="screen-reader-text">, </span>',
1106 + )
1107 + );
1108 + ?>
1109 </div><!-- .entry-content -->
1110
1111 <?php
1112 // Author bio.
1113 - if ( is_single() && get_the_author_meta( 'description' ) ) :
1114 - get_template_part( 'author-bio' );
1115 + if ( is_single() && get_the_author_meta( 'description' ) ) :
1116 + get_template_part( 'author-bio' );
1117 endif;
1118 ?>
1119
1120
1121 diff --git a/themes/twentyfifteen/css/blocks.css b/themes/twentyfifteen/css/blocks.css
1122 index 82563902..fa9d935a 100644
1123 --- a/themes/twentyfifteen/css/blocks.css
1124 +++ b/themes/twentyfifteen/css/blocks.css
1125 @@ -384,8 +384,6 @@ p.has-drop-cap:not(:focus)::first-letter {
1126 /* Button */
1127
1128 .wp-block-button .wp-block-button__link {
1129 - border: 0;
1130 - border-radius: 0;
1131 cursor: pointer;
1132 font-family: "Noto Sans", sans-serif;
1133 font-size: 12px;
1134 @@ -397,13 +395,27 @@ p.has-drop-cap:not(:focus)::first-letter {
1135 vertical-align: baseline;
1136 }
1137
1138 +.entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link {
1139 + border: 0;
1140 +}
1141 +
1142 +.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
1143 + border-bottom: 2px solid;
1144 +}
1145 +
1146 .wp-block-button__link {
1147 background-color: #333;
1148 color: #fff;
1149 }
1150
1151 +.is-style-outline .wp-block-button__link:not(.has-text-color) {
1152 + color: #333;
1153 +}
1154 +
1155 .wp-block-button__link:hover,
1156 -.wp-block-button__link:focus {
1157 +.wp-block-button__link:focus,
1158 +.is-style-outline .wp-block-button__link:hover,
1159 +.is-style-outline .wp-block-button__link:focus {
1160 background-color: #707070;
1161 background-color: rgba(51, 51, 51, 0.7);
1162 color: #fff;
1163
1164 diff --git a/themes/twentyfifteen/css/editor-blocks.css b/themes/twentyfifteen/css/editor-blocks.css
1165 index 6076cab6..5b1e90c9 100644
1166 --- a/themes/twentyfifteen/css/editor-blocks.css
1167 +++ b/themes/twentyfifteen/css/editor-blocks.css
1168 @@ -708,10 +708,6 @@ p.has-drop-cap:not(:focus)::first-letter {
1169 /* Button */
1170
1171 .wp-block-button .wp-block-button__link {
1172 - background-color: #333;
1173 - border: 0;
1174 - border-radius: 0;
1175 - color: #fff;
1176 cursor: pointer;
1177 font-family: "Noto Sans", sans-serif;
1178 font-size: 12px;
1179 @@ -722,6 +718,15 @@ p.has-drop-cap:not(:focus)::first-letter {
1180 vertical-align: baseline;
1181 }
1182
1183 +.wp-block-button__link {
1184 + background-color: #333;
1185 + color: #fff;
1186 +}
1187 +
1188 +.is-style-outline .wp-block-button__link {
1189 + color: #333;
1190 +}
1191 +
1192 @media screen and (min-width: 46.25em) {
1193 .wp-block-button .wp-block-button__link {
1194 font-size: 14px;
1195
1196 diff --git a/themes/twentyfifteen/functions.php b/themes/twentyfifteen/functions.php
1197 index 168bedd9..2713ba2c 100644
1198 --- a/themes/twentyfifteen/functions.php
1199 +++ b/themes/twentyfifteen/functions.php
1200 @@ -42,182 +42,214 @@ if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) {
1201 }
1202
1203 if ( ! function_exists( 'twentyfifteen_setup' ) ) :
1204 -/**
1205 - * Sets up theme defaults and registers support for various WordPress features.
1206 - *
1207 - * Note that this function is hooked into the after_setup_theme hook, which
1208 - * runs before the init hook. The init hook is too late for some features, such
1209 - * as indicating support for post thumbnails.
1210 - *
1211 - * @since Twenty Fifteen 1.0
1212 - */
1213 -function twentyfifteen_setup() {
1214 -
1215 - /*
1216 - * Make theme available for translation.
1217 - * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfifteen
1218 - * If you're building a theme based on twentyfifteen, use a find and replace
1219 - * to change 'twentyfifteen' to the name of your theme in all the template files
1220 - */
1221 - load_theme_textdomain( 'twentyfifteen' );
1222 -
1223 - // Add default posts and comments RSS feed links to head.
1224 - add_theme_support( 'automatic-feed-links' );
1225 -
1226 - /*
1227 - * Let WordPress manage the document title.
1228 - * By adding theme support, we declare that this theme does not use a
1229 - * hard-coded <title> tag in the document head, and expect WordPress to
1230 - * provide it for us.
1231 - */
1232 - add_theme_support( 'title-tag' );
1233 -
1234 - /*
1235 - * Enable support for Post Thumbnails on posts and pages.
1236 - *
1237 - * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
1238 - */
1239 - add_theme_support( 'post-thumbnails' );
1240 - set_post_thumbnail_size( 825, 510, true );
1241 -
1242 - // This theme uses wp_nav_menu() in two locations.
1243 - register_nav_menus( array(
1244 - 'primary' => __( 'Primary Menu', 'twentyfifteen' ),
1245 - 'social' => __( 'Social Links Menu', 'twentyfifteen' ),
1246 - ) );
1247 -
1248 - /*
1249 - * Switch default core markup for search form, comment form, and comments
1250 - * to output valid HTML5.
1251 - */
1252 - add_theme_support( 'html5', array(
1253 - 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
1254 - ) );
1255 -
1256 - /*
1257 - * Enable support for Post Formats.
1258 - *
1259 - * See: https://codex.wordpress.org/Post_Formats
1260 - */
1261 - add_theme_support( 'post-formats', array(
1262 - 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
1263 - ) );
1264 -
1265 - /*
1266 - * Enable support for custom logo.
1267 - *
1268 - * @since Twenty Fifteen 1.5
1269 - */
1270 - add_theme_support( 'custom-logo', array(
1271 - 'height' => 248,
1272 - 'width' => 248,
1273 - 'flex-height' => true,
1274 - ) );
1275 -
1276 - $color_scheme = twentyfifteen_get_color_scheme();
1277 - $default_color = trim( $color_scheme[0], '#' );
1278 -
1279 - // Setup the WordPress core custom background feature.
1280 -
1281 /**
1282 - * Filter Twenty Fifteen custom-header support arguments.
1283 + * Sets up theme defaults and registers support for various WordPress features.
1284 *
1285 - * @since Twenty Fifteen 1.0
1286 - *
1287 - * @param array $args {
1288 - * An array of custom-header support arguments.
1289 + * Note that this function is hooked into the after_setup_theme hook, which
1290 + * runs before the init hook. The init hook is too late for some features, such
1291 + * as indicating support for post thumbnails.
1292 *
1293 - * @type string $default-color Default color of the header.
1294 - * @type string $default-attachment Default attachment of the header.
1295 - * }
1296 - */
1297 - add_theme_support( 'custom-background', apply_filters( 'twentyfifteen_custom_background_args', array(
1298 - 'default-color' => $default_color,
1299 - 'default-attachment' => 'fixed',
1300 - ) ) );
1301 -
1302 - /*
1303 - * This theme styles the visual editor to resemble the theme style,
1304 - * specifically font, colors, icons, and column width.
1305 + * @since Twenty Fifteen 1.0
1306 */
1307 - add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url() ) );
1308 -
1309 - // Load regular editor styles into the new block-based editor.
1310 - add_theme_support( 'editor-styles' );
1311 -
1312 - // Load default block styles.
1313 - add_theme_support( 'wp-block-styles' );
1314 -
1315 - // Add support for responsive embeds.
1316 - add_theme_support( 'responsive-embeds' );
1317 -
1318 - // Add support for custom color scheme.
1319 - add_theme_support( 'editor-color-palette', array(
1320 - array(
1321 - 'name' => __( 'Dark Gray', 'twentyfifteen' ),
1322 - 'slug' => 'dark-gray',
1323 - 'color' => '#111',
1324 - ),
1325 - array(
1326 - 'name' => __( 'Light Gray', 'twentyfifteen' ),
1327 - 'slug' => 'light-gray',
1328 - 'color' => '#f1f1f1',
1329 - ),
1330 - array(
1331 - 'name' => __( 'White', 'twentyfifteen' ),
1332 - 'slug' => 'white',
1333 - 'color' => '#fff',
1334 - ),
1335 - array(
1336 - 'name' => __( 'Yellow', 'twentyfifteen' ),
1337 - 'slug' => 'yellow',
1338 - 'color' => '#f4ca16',
1339 - ),
1340 - array(
1341 - 'name' => __( 'Dark Brown', 'twentyfifteen' ),
1342 - 'slug' => 'dark-brown',
1343 - 'color' => '#352712',
1344 - ),
1345 - array(
1346 - 'name' => __( 'Medium Pink', 'twentyfifteen' ),
1347 - 'slug' => 'medium-pink',
1348 - 'color' => '#e53b51',
1349 - ),
1350 - array(
1351 - 'name' => __( 'Light Pink', 'twentyfifteen' ),
1352 - 'slug' => 'light-pink',
1353 - 'color' => '#ffe5d1',
1354 - ),
1355 - array(
1356 - 'name' => __( 'Dark Purple', 'twentyfifteen' ),
1357 - 'slug' => 'dark-purple',
1358 - 'color' => '#2e2256',
1359 - ),
1360 - array(
1361 - 'name' => __( 'Purple', 'twentyfifteen' ),
1362 - 'slug' => 'purple',
1363 - 'color' => '#674970',
1364 - ),
1365 - array(
1366 - 'name' => __( 'Blue Gray', 'twentyfifteen' ),
1367 - 'slug' => 'blue-gray',
1368 - 'color' => '#22313f',
1369 - ),
1370 - array(
1371 - 'name' => __( 'Bright Blue', 'twentyfifteen' ),
1372 - 'slug' => 'bright-blue',
1373 - 'color' => '#55c3dc',
1374 - ),
1375 - array(
1376 - 'name' => __( 'Light Blue', 'twentyfifteen' ),
1377 - 'slug' => 'light-blue',
1378 - 'color' => '#e9f2f9',
1379 - ),
1380 - ) );
1381 -
1382 - // Indicate widget sidebars can use selective refresh in the Customizer.
1383 - add_theme_support( 'customize-selective-refresh-widgets' );
1384 -}
1385 + function twentyfifteen_setup() {
1386 +
1387 + /*
1388 + * Make theme available for translation.
1389 + * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfifteen
1390 + * If you're building a theme based on twentyfifteen, use a find and replace
1391 + * to change 'twentyfifteen' to the name of your theme in all the template files
1392 + */
1393 + load_theme_textdomain( 'twentyfifteen' );
1394 +
1395 + // Add default posts and comments RSS feed links to head.
1396 + add_theme_support( 'automatic-feed-links' );
1397 +
1398 + /*
1399 + * Let WordPress manage the document title.
1400 + * By adding theme support, we declare that this theme does not use a
1401 + * hard-coded <title> tag in the document head, and expect WordPress to
1402 + * provide it for us.
1403 + */
1404 + add_theme_support( 'title-tag' );
1405 +
1406 + /*
1407 + * Enable support for Post Thumbnails on posts and pages.
1408 + *
1409 + * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
1410 + */
1411 + add_theme_support( 'post-thumbnails' );
1412 + set_post_thumbnail_size( 825, 510, true );
1413 +
1414 + // This theme uses wp_nav_menu() in two locations.
1415 + register_nav_menus(
1416 + array(
1417 + 'primary' => __( 'Primary Menu', 'twentyfifteen' ),
1418 + 'social' => __( 'Social Links Menu', 'twentyfifteen' ),
1419 + )
1420 + );
1421 +
1422 + /*
1423 + * Switch default core markup for search form, comment form, and comments
1424 + * to output valid HTML5.
1425 + */
1426 + add_theme_support(
1427 + 'html5',
1428 + array(
1429 + 'search-form',
1430 + 'comment-form',
1431 + 'comment-list',
1432 + 'gallery',
1433 + 'caption',
1434 + )
1435 + );
1436 +
1437 + /*
1438 + * Enable support for Post Formats.
1439 + *
1440 + * See: https://codex.wordpress.org/Post_Formats
1441 + */
1442 + add_theme_support(
1443 + 'post-formats',
1444 + array(
1445 + 'aside',
1446 + 'image',
1447 + 'video',
1448 + 'quote',
1449 + 'link',
1450 + 'gallery',
1451 + 'status',
1452 + 'audio',
1453 + 'chat',
1454 + )
1455 + );
1456 +
1457 + /*
1458 + * Enable support for custom logo.
1459 + *
1460 + * @since Twenty Fifteen 1.5
1461 + */
1462 + add_theme_support(
1463 + 'custom-logo',
1464 + array(
1465 + 'height' => 248,
1466 + 'width' => 248,
1467 + 'flex-height' => true,
1468 + )
1469 + );
1470 +
1471 + $color_scheme = twentyfifteen_get_color_scheme();
1472 + $default_color = trim( $color_scheme[0], '#' );
1473 +
1474 + // Setup the WordPress core custom background feature.
1475 +
1476 + /**
1477 + * Filter Twenty Fifteen custom-header support arguments.
1478 + *
1479 + * @since Twenty Fifteen 1.0
1480 + *
1481 + * @param array $args {
1482 + * An array of custom-header support arguments.
1483 + *
1484 + * @type string $default-color Default color of the header.
1485 + * @type string $default-attachment Default attachment of the header.
1486 + * }
1487 + */
1488 + add_theme_support(
1489 + 'custom-background',
1490 + apply_filters(
1491 + 'twentyfifteen_custom_background_args',
1492 + array(
1493 + 'default-color' => $default_color,
1494 + 'default-attachment' => 'fixed',
1495 + )
1496 + )
1497 + );
1498 +
1499 + /*
1500 + * This theme styles the visual editor to resemble the theme style,
1501 + * specifically font, colors, icons, and column width.
1502 + */
1503 + add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url() ) );
1504 +
1505 + // Load regular editor styles into the new block-based editor.
1506 + add_theme_support( 'editor-styles' );
1507 +
1508 + // Load default block styles.
1509 + add_theme_support( 'wp-block-styles' );
1510 +
1511 + // Add support for responsive embeds.
1512 + add_theme_support( 'responsive-embeds' );
1513 +
1514 + // Add support for custom color scheme.
1515 + add_theme_support(
1516 + 'editor-color-palette',
1517 + array(
1518 + array(
1519 + 'name' => __( 'Dark Gray', 'twentyfifteen' ),
1520 + 'slug' => 'dark-gray',
1521 + 'color' => '#111',
1522 + ),
1523 + array(
1524 + 'name' => __( 'Light Gray', 'twentyfifteen' ),
1525 + 'slug' => 'light-gray',
1526 + 'color' => '#f1f1f1',
1527 + ),
1528 + array(
1529 + 'name' => __( 'White', 'twentyfifteen' ),
1530 + 'slug' => 'white',
1531 + 'color' => '#fff',
1532 + ),
1533 + array(
1534 + 'name' => __( 'Yellow', 'twentyfifteen' ),
1535 + 'slug' => 'yellow',
1536 + 'color' => '#f4ca16',
1537 + ),
1538 + array(
1539 + 'name' => __( 'Dark Brown', 'twentyfifteen' ),
1540 + 'slug' => 'dark-brown',
1541 + 'color' => '#352712',
1542 + ),
1543 + array(
1544 + 'name' => __( 'Medium Pink', 'twentyfifteen' ),
1545 + 'slug' => 'medium-pink',
1546 + 'color' => '#e53b51',
1547 + ),
1548 + array(
1549 + 'name' => __( 'Light Pink', 'twentyfifteen' ),
1550 + 'slug' => 'light-pink',
1551 + 'color' => '#ffe5d1',
1552 + ),
1553 + array(
1554 + 'name' => __( 'Dark Purple', 'twentyfifteen' ),
1555 + 'slug' => 'dark-purple',
1556 + 'color' => '#2e2256',
1557 + ),
1558 + array(
1559 + 'name' => __( 'Purple', 'twentyfifteen' ),
1560 + 'slug' => 'purple',
1561 + 'color' => '#674970',
1562 + ),
1563 + array(
1564 + 'name' => __( 'Blue Gray', 'twentyfifteen' ),
1565 + 'slug' => 'blue-gray',
1566 + 'color' => '#22313f',
1567 + ),
1568 + array(
1569 + 'name' => __( 'Bright Blue', 'twentyfifteen' ),
1570 + 'slug' => 'bright-blue',
1571 + 'color' => '#55c3dc',
1572 + ),
1573 + array(
1574 + 'name' => __( 'Light Blue', 'twentyfifteen' ),
1575 + 'slug' => 'light-blue',
1576 + 'color' => '#e9f2f9',
1577 + ),
1578 + )
1579 + );
1580 +
1581 + // Indicate widget sidebars can use selective refresh in the Customizer.
1582 + add_theme_support( 'customize-selective-refresh-widgets' );
1583 + }
1584 endif; // twentyfifteen_setup
1585 add_action( 'after_setup_theme', 'twentyfifteen_setup' );
1586
1587 @@ -229,80 +261,85 @@ add_action( 'after_setup_theme', 'twentyfifteen_setup' );
1588 * @link https://codex.wordpress.org/Function_Reference/register_sidebar
1589 */
1590 function twentyfifteen_widgets_init() {
1591 - register_sidebar( array(
1592 - 'name' => __( 'Widget Area', 'twentyfifteen' ),
1593 - 'id' => 'sidebar-1',
1594 - 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentyfifteen' ),
1595 - 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
1596 - 'after_widget' => '</aside>',
1597 - 'before_title' => '<h2 class="widget-title">',
1598 - 'after_title' => '</h2>',
1599 - ) );
1600 + register_sidebar(
1601 + array(
1602 + 'name' => __( 'Widget Area', 'twentyfifteen' ),
1603 + 'id' => 'sidebar-1',
1604 + 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentyfifteen' ),
1605 + 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
1606 + 'after_widget' => '</aside>',
1607 + 'before_title' => '<h2 class="widget-title">',
1608 + 'after_title' => '</h2>',
1609 + )
1610 + );
1611 }
1612 add_action( 'widgets_init', 'twentyfifteen_widgets_init' );
1613
1614 if ( ! function_exists( 'twentyfifteen_fonts_url' ) ) :
1615 -/**
1616 - * Register Google fonts for Twenty Fifteen.
1617 - *
1618 - * @since Twenty Fifteen 1.0
1619 - *
1620 - * @return string Google fonts URL for the theme.
1621 - */
1622 -function twentyfifteen_fonts_url() {
1623 - $fonts_url = '';
1624 - $fonts = array();
1625 - $subsets = 'latin,latin-ext';
1626 -
1627 - /*
1628 - * Translators: If there are characters in your language that are not supported
1629 - * by Noto Sans, translate this to 'off'. Do not translate into your own language.
1630 + /**
1631 + * Register Google fonts for Twenty Fifteen.
1632 + *
1633 + * @since Twenty Fifteen 1.0
1634 + *
1635 + * @return string Google fonts URL for the theme.
1636 */
1637 - if ( 'off' !== _x( 'on', 'Noto Sans font: on or off', 'twentyfifteen' ) ) {
1638 - $fonts[] = 'Noto Sans:400italic,700italic,400,700';
1639 - }
1640 + function twentyfifteen_fonts_url() {
1641 + $fonts_url = '';
1642 + $fonts = array();
1643 + $subsets = 'latin,latin-ext';
1644 +
1645 + /*
1646 + * Translators: If there are characters in your language that are not supported
1647 + * by Noto Sans, translate this to 'off'. Do not translate into your own language.
1648 + */
1649 + if ( 'off' !== _x( 'on', 'Noto Sans font: on or off', 'twentyfifteen' ) ) {
1650 + $fonts[] = 'Noto Sans:400italic,700italic,400,700';
1651 + }
1652
1653 - /*
1654 - * Translators: If there are characters in your language that are not supported
1655 - * by Noto Serif, translate this to 'off'. Do not translate into your own language.
1656 - */
1657 - if ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'twentyfifteen' ) ) {
1658 - $fonts[] = 'Noto Serif:400italic,700italic,400,700';
1659 - }
1660 + /*
1661 + * Translators: If there are characters in your language that are not supported
1662 + * by Noto Serif, translate this to 'off'. Do not translate into your own language.
1663 + */
1664 + if ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'twentyfifteen' ) ) {
1665 + $fonts[] = 'Noto Serif:400italic,700italic,400,700';
1666 + }
1667
1668 - /*
1669 - * Translators: If there are characters in your language that are not supported
1670 - * by Inconsolata, translate this to 'off'. Do not translate into your own language.
1671 - */
1672 - if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentyfifteen' ) ) {
1673 - $fonts[] = 'Inconsolata:400,700';
1674 - }
1675 + /*
1676 + * Translators: If there are characters in your language that are not supported
1677 + * by Inconsolata, translate this to 'off'. Do not translate into your own language.
1678 + */
1679 + if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentyfifteen' ) ) {
1680 + $fonts[] = 'Inconsolata:400,700';
1681 + }
1682
1683 - /*
1684 - * Translators: To add an additional character subset specific to your language,
1685 - * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language.
1686 - */
1687 - $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'twentyfifteen' );
1688 -
1689 - if ( 'cyrillic' == $subset ) {
1690 - $subsets .= ',cyrillic,cyrillic-ext';
1691 - } elseif ( 'greek' == $subset ) {
1692 - $subsets .= ',greek,greek-ext';
1693 - } elseif ( 'devanagari' == $subset ) {
1694 - $subsets .= ',devanagari';
1695 - } elseif ( 'vietnamese' == $subset ) {
1696 - $subsets .= ',vietnamese';
1697 - }
1698 + /*
1699 + * Translators: To add an additional character subset specific to your language,
1700 + * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language.
1701 + */
1702 + $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'twentyfifteen' );
1703 +
1704 + if ( 'cyrillic' == $subset ) {
1705 + $subsets .= ',cyrillic,cyrillic-ext';
1706 + } elseif ( 'greek' == $subset ) {
1707 + $subsets .= ',greek,greek-ext';
1708 + } elseif ( 'devanagari' == $subset ) {
1709 + $subsets .= ',devanagari';
1710 + } elseif ( 'vietnamese' == $subset ) {
1711 + $subsets .= ',vietnamese';
1712 + }
1713
1714 - if ( $fonts ) {
1715 - $fonts_url = add_query_arg( array(
1716 - 'family' => urlencode( implode( '|', $fonts ) ),
1717 - 'subset' => urlencode( $subsets ),
1718 - ), 'https://fonts.googleapis.com/css' );
1719 - }
1720 + if ( $fonts ) {
1721 + $fonts_url = add_query_arg(
1722 + array(
1723 + 'family' => urlencode( implode( '|', $fonts ) ),
1724 + 'subset' => urlencode( $subsets ),
1725 + ),
1726 + 'https://fonts.googleapis.com/css'
1727 + );
1728 + }
1729
1730 - return $fonts_url;
1731 -}
1732 + return $fonts_url;
1733 + }
1734 endif;
1735
1736 /**
1737 @@ -333,7 +370,7 @@ function twentyfifteen_scripts() {
1738 wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() );
1739
1740 // Theme block stylesheet.
1741 - wp_enqueue_style( 'twentyfifteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfifteen-style' ), '20181018' );
1742 + wp_enqueue_style( 'twentyfifteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfifteen-style' ), '20181230' );
1743
1744 // Load the Internet Explorer specific stylesheet.
1745 wp_enqueue_style( 'twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfifteen-style' ), '20141010' );
1746 @@ -354,10 +391,14 @@ function twentyfifteen_scripts() {
1747 }
1748
1749 wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
1750 - wp_localize_script( 'twentyfifteen-script', 'screenReaderText', array(
1751 - 'expand' => '<span class="screen-reader-text">' . __( 'expand child menu', 'twentyfifteen' ) . '</span>',
1752 - 'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'twentyfifteen' ) . '</span>',
1753 - ) );
1754 + wp_localize_script(
1755 + 'twentyfifteen-script',
1756 + 'screenReaderText',
1757 + array(
1758 + 'expand' => '<span class="screen-reader-text">' . __( 'expand child menu', 'twentyfifteen' ) . '</span>',
1759 + 'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'twentyfifteen' ) . '</span>',
1760 + )
1761 + );
1762 }
1763 add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' );
1764
1765 @@ -368,7 +409,7 @@ add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' );
1766 */
1767 function twentyfifteen_block_editor_styles() {
1768 // Block styles.
1769 - wp_enqueue_style( 'twentyfifteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
1770 + wp_enqueue_style( 'twentyfifteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20181230' );
1771 // Add custom fonts.
1772 wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null );
1773 }
1774 @@ -420,9 +461,9 @@ function twentyfifteen_post_nav_background() {
1775 return;
1776 }
1777
1778 - if ( $previous && has_post_thumbnail( $previous->ID ) ) {
1779 + if ( $previous && has_post_thumbnail( $previous->ID ) ) {
1780 $prevthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $previous->ID ), 'post-thumbnail' );
1781 - $css .= '
1782 + $css .= '
1783 .post-navigation .nav-previous { background-image: url(' . esc_url( $prevthumb[0] ) . '); }
1784 .post-navigation .nav-previous .post-title, .post-navigation .nav-previous a:hover .post-title, .post-navigation .nav-previous .meta-nav { color: #fff; }
1785 .post-navigation .nav-previous a:before { background-color: rgba(0, 0, 0, 0.4); }
1786 @@ -431,7 +472,7 @@ function twentyfifteen_post_nav_background() {
1787
1788 if ( $next && has_post_thumbnail( $next->ID ) ) {
1789 $nextthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $next->ID ), 'post-thumbnail' );
1790 - $css .= '
1791 + $css .= '
1792 .post-navigation .nav-next { background-image: url(' . esc_url( $nextthumb[0] ) . '); border-top: 0; }
1793 .post-navigation .nav-next .post-title, .post-navigation .nav-next a:hover .post-title, .post-navigation .nav-next .meta-nav { color: #fff; }
1794 .post-navigation .nav-next a:before { background-color: rgba(0, 0, 0, 0.4); }
1795
1796 diff --git a/themes/twentyfifteen/header.php b/themes/twentyfifteen/header.php
1797 index 28de34ed..63b04377 100644
1798 --- a/themes/twentyfifteen/header.php
1799 +++ b/themes/twentyfifteen/header.php
1800 @@ -14,7 +14,7 @@
1801 <meta charset="<?php bloginfo( 'charset' ); ?>">
1802 <meta name="viewport" content="width=device-width">
1803 <link rel="profile" href="http://gmpg.org/xfn/11">
1804 - <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
1805 + <link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
1806 <!--[if lt IE 9]>
1807 <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
1808 <![endif]-->
1809 @@ -31,17 +31,21 @@
1810 <?php
1811 twentyfifteen_the_custom_logo();
1812
1813 - if ( is_front_page() && is_home() ) : ?>
1814 + if ( is_front_page() && is_home() ) :
1815 + ?>
1816 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
1817 <?php else : ?>
1818 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
1819 - <?php endif;
1820 + <?php
1821 + endif;
1822
1823 $description = get_bloginfo( 'description', 'display' );
1824 - if ( $description || is_customize_preview() ) : ?>
1825 + if ( $description || is_customize_preview() ) :
1826 + ?>
1827 <p class="site-description"><?php echo $description; ?></p>
1828 - <?php endif;
1829 - ?>
1830 + <?php
1831 + endif;
1832 + ?>
1833 <button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
1834 </div><!-- .site-branding -->
1835 </header><!-- .site-header -->
1836
1837 diff --git a/themes/twentyfifteen/image.php b/themes/twentyfifteen/image.php
1838 index 5a471d40..5afa773f 100644
1839 --- a/themes/twentyfifteen/image.php
1840 +++ b/themes/twentyfifteen/image.php
1841 @@ -14,38 +14,39 @@ get_header(); ?>
1842
1843 <?php
1844 // Start the loop.
1845 - while ( have_posts() ) : the_post();
1846 - ?>
1847 -
1848 - <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
1849 + while ( have_posts() ) :
1850 + the_post();
1851 + ?>
1852
1853 - <nav id="image-navigation" class="navigation image-navigation">
1854 - <div class="nav-links">
1855 - <div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentyfifteen' ) ); ?></div><div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentyfifteen' ) ); ?></div>
1856 - </div><!-- .nav-links -->
1857 - </nav><!-- .image-navigation -->
1858 + <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
1859
1860 - <header class="entry-header">
1861 - <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
1862 - </header><!-- .entry-header -->
1863 + <nav id="image-navigation" class="navigation image-navigation">
1864 + <div class="nav-links">
1865 + <div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentyfifteen' ) ); ?></div><div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentyfifteen' ) ); ?></div>
1866 + </div><!-- .nav-links -->
1867 + </nav><!-- .image-navigation -->
1868
1869 - <div class="entry-content">
1870 + <header class="entry-header">
1871 + <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
1872 + </header><!-- .entry-header -->
1873
1874 - <div class="entry-attachment">
1875 - <?php
1876 - /**
1877 - * Filter the default Twenty Fifteen image attachment size.
1878 - *
1879 - * @since Twenty Fifteen 1.0
1880 - *
1881 - * @param string $image_size Image size. Default 'large'.
1882 - */
1883 - $image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
1884 + <div class="entry-content">
1885
1886 - echo wp_get_attachment_image( get_the_ID(), $image_size );
1887 - ?>
1888 + <div class="entry-attachment">
1889 + <?php
1890 + /**
1891 + * Filter the default Twenty Fifteen image attachment size.
1892 + *
1893 + * @since Twenty Fifteen 1.0
1894 + *
1895 + * @param string $image_size Image size. Default 'large'.
1896 + */
1897 + $image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
1898 +
1899 + echo wp_get_attachment_image( get_the_ID(), $image_size );
1900 + ?>
1901
1902 - <?php if ( has_excerpt() ) : ?>
1903 + <?php if ( has_excerpt() ) : ?>
1904 <div class="entry-caption">
1905 <?php the_excerpt(); ?>
1906 </div><!-- .entry-caption -->
1907 @@ -54,35 +55,39 @@ get_header(); ?>
1908 </div><!-- .entry-attachment -->
1909
1910 <?php
1911 - the_content();
1912 - wp_link_pages( array(
1913 + the_content();
1914 + wp_link_pages(
1915 + array(
1916 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
1917 'after' => '</div>',
1918 'link_before' => '<span>',
1919 'link_after' => '</span>',
1920 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
1921 'separator' => '<span class="screen-reader-text">, </span>',
1922 - ) );
1923 + )
1924 + );
1925 ?>
1926 </div><!-- .entry-content -->
1927
1928 <footer class="entry-footer">
1929 - <?php twentyfifteen_entry_meta(); ?>
1930 + <?php twentyfifteen_entry_meta(); ?>
1931 <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
1932 </footer><!-- .entry-footer -->
1933
1934 </article><!-- #post-## -->
1935
1936 <?php
1937 - // If comments are open or we have at least one comment, load up the comment template
1938 - if ( comments_open() || get_comments_number() ) :
1939 - comments_template();
1940 + // If comments are open or we have at least one comment, load up the comment template
1941 + if ( comments_open() || get_comments_number() ) :
1942 + comments_template();
1943 endif;
1944
1945 - // Previous/next post navigation.
1946 - the_post_navigation( array(
1947 + // Previous/next post navigation.
1948 + the_post_navigation(
1949 + array(
1950 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentyfifteen' ),
1951 - ) );
1952 + )
1953 + );
1954
1955 // End the loop.
1956 endwhile;
1957
1958 diff --git a/themes/twentyfifteen/inc/back-compat.php b/themes/twentyfifteen/inc/back-compat.php
1959 index 73cd44d1..a4f03e3a 100644
1960 --- a/themes/twentyfifteen/inc/back-compat.php
1961 +++ b/themes/twentyfifteen/inc/back-compat.php
1962 @@ -44,9 +44,13 @@ function twentyfifteen_upgrade_notice() {
1963 * @since Twenty Fifteen 1.0
1964 */
1965 function twentyfifteen_customize() {
1966 - wp_die( sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] ), '', array(
1967 - 'back_link' => true,
1968 - ) );
1969 + wp_die(
1970 + sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] ),
1971 + '',
1972 + array(
1973 + 'back_link' => true,
1974 + )
1975 + );
1976 }
1977 add_action( 'load-customize.php', 'twentyfifteen_customize' );
1978
1979
1980 diff --git a/themes/twentyfifteen/inc/custom-header.php b/themes/twentyfifteen/inc/custom-header.php
1981 index 10d0ef1a..763ef00d 100644
1982 --- a/themes/twentyfifteen/inc/custom-header.php
1983 +++ b/themes/twentyfifteen/inc/custom-header.php
1984 @@ -13,8 +13,8 @@
1985 * @uses twentyfifteen_header_style()
1986 */
1987 function twentyfifteen_custom_header_setup() {
1988 - $color_scheme = twentyfifteen_get_color_scheme();
1989 - $default_text_color = trim( $color_scheme[4], '#' );
1990 + $color_scheme = twentyfifteen_get_color_scheme();
1991 + $default_text_color = trim( $color_scheme[4], '#' );
1992
1993 /**
1994 * Filter Twenty Fifteen custom-header support arguments.
1995 @@ -31,12 +31,18 @@ function twentyfifteen_custom_header_setup() {
1996 * displayed on the blog.
1997 * }
1998 */
1999 - add_theme_support( 'custom-header', apply_filters( 'twentyfifteen_custom_header_args', array(
2000 - 'default-text-color' => $default_text_color,
2001 - 'width' => 954,
2002 - 'height' => 1300,
2003 - 'wp-head-callback' => 'twentyfifteen_header_style',
2004 - ) ) );
2005 + add_theme_support(
2006 + 'custom-header',
2007 + apply_filters(
2008 + 'twentyfifteen_custom_header_args',
2009 + array(
2010 + 'default-text-color' => $default_text_color,
2011 + 'width' => 954,
2012 + 'height' => 1300,
2013 + 'wp-head-callback' => 'twentyfifteen_header_style',
2014 + )
2015 + )
2016 + );
2017 }
2018 add_action( 'after_setup_theme', 'twentyfifteen_custom_header_setup' );
2019
2020 @@ -53,10 +59,10 @@ function twentyfifteen_hex2rgb( $color ) {
2021 $color = trim( $color, '#' );
2022
2023 if ( strlen( $color ) == 3 ) {
2024 - $r = hexdec( substr( $color, 0, 1 ).substr( $color, 0, 1 ) );
2025 - $g = hexdec( substr( $color, 1, 1 ).substr( $color, 1, 1 ) );
2026 - $b = hexdec( substr( $color, 2, 1 ).substr( $color, 2, 1 ) );
2027 - } else if ( strlen( $color ) == 6 ) {
2028 + $r = hexdec( substr( $color, 0, 1 ) . substr( $color, 0, 1 ) );
2029 + $g = hexdec( substr( $color, 1, 1 ) . substr( $color, 1, 1 ) );
2030 + $b = hexdec( substr( $color, 2, 1 ) . substr( $color, 2, 1 ) );
2031 + } elseif ( strlen( $color ) == 6 ) {
2032 $r = hexdec( substr( $color, 0, 2 ) );
2033 $g = hexdec( substr( $color, 2, 2 ) );
2034 $b = hexdec( substr( $color, 4, 2 ) );
2035 @@ -64,32 +70,36 @@ function twentyfifteen_hex2rgb( $color ) {
2036 return array();
2037 }
2038
2039 - return array( 'red' => $r, 'green' => $g, 'blue' => $b );
2040 + return array(
2041 + 'red' => $r,
2042 + 'green' => $g,
2043 + 'blue' => $b,
2044 + );
2045 }
2046
2047 if ( ! function_exists( 'twentyfifteen_header_style' ) ) :
2048 -/**
2049 - * Styles the header image and text displayed on the blog.
2050 - *
2051 - * @since Twenty Fifteen 1.0
2052 - *
2053 - * @see twentyfifteen_custom_header_setup()
2054 - */
2055 -function twentyfifteen_header_style() {
2056 - $header_image = get_header_image();
2057 + /**
2058 + * Styles the header image and text displayed on the blog.
2059 + *
2060 + * @since Twenty Fifteen 1.0
2061 + *
2062 + * @see twentyfifteen_custom_header_setup()
2063 + */
2064 + function twentyfifteen_header_style() {
2065 + $header_image = get_header_image();
2066
2067 - // If no custom options for text are set, let's bail.
2068 - if ( empty( $header_image ) && display_header_text() ) {
2069 - return;
2070 - }
2071 + // If no custom options for text are set, let's bail.
2072 + if ( empty( $header_image ) && display_header_text() ) {
2073 + return;
2074 + }
2075
2076 - // If we get this far, we have custom styles. Let's do this.
2077 - ?>
2078 - <style type="text/css" id="twentyfifteen-header-css">
2079 - <?php
2080 + // If we get this far, we have custom styles. Let's do this.
2081 + ?>
2082 + <style type="text/css" id="twentyfifteen-header-css">
2083 + <?php
2084 // Short header for when there is no Custom Header and Header Text is hidden.
2085 if ( empty( $header_image ) && ! display_header_text() ) :
2086 - ?>
2087 + ?>
2088 .site-header {
2089 padding-top: 14px;
2090 padding-bottom: 14px;
2091 @@ -126,12 +136,12 @@ function twentyfifteen_header_style() {
2092 min-height: 0;
2093 }
2094 }
2095 - <?php
2096 + <?php
2097 endif;
2098
2099 // Has a Custom Header been added?
2100 if ( ! empty( $header_image ) ) :
2101 - ?>
2102 + ?>
2103 .site-header {
2104
2105 /*
2106 @@ -168,12 +178,12 @@ function twentyfifteen_header_style() {
2107 background: transparent;
2108 }
2109 }
2110 - <?php
2111 + <?php
2112 endif;
2113
2114 // Has the text been hidden?
2115 if ( ! display_header_text() ) :
2116 - ?>
2117 + ?>
2118 .site-title,
2119 .site-description {
2120 clip: rect(1px, 1px, 1px, 1px);
2121 @@ -181,8 +191,8 @@ function twentyfifteen_header_style() {
2122 }
2123 <?php endif; ?>
2124 </style>
2125 - <?php
2126 -}
2127 + <?php
2128 + }
2129 endif; // twentyfifteen_header_style
2130
2131 /**
2132
2133 diff --git a/themes/twentyfifteen/inc/customizer.php b/themes/twentyfifteen/inc/customizer.php
2134 index c31c57e8..3b74f243 100644
2135 --- a/themes/twentyfifteen/inc/customizer.php
2136 +++ b/themes/twentyfifteen/inc/customizer.php
2137 @@ -21,61 +21,91 @@ function twentyfifteen_customize_register( $wp_customize ) {
2138 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
2139
2140 if ( isset( $wp_customize->selective_refresh ) ) {
2141 - $wp_customize->selective_refresh->add_partial( 'blogname', array(
2142 - 'selector' => '.site-title a',
2143 - 'container_inclusive' => false,
2144 - 'render_callback' => 'twentyfifteen_customize_partial_blogname',
2145 - ) );
2146 - $wp_customize->selective_refresh->add_partial( 'blogdescription', array(
2147 - 'selector' => '.site-description',
2148 - 'container_inclusive' => false,
2149 - 'render_callback' => 'twentyfifteen_customize_partial_blogdescription',
2150 - ) );
2151 + $wp_customize->selective_refresh->add_partial(
2152 + 'blogname',
2153 + array(
2154 + 'selector' => '.site-title a',
2155 + 'container_inclusive' => false,
2156 + 'render_callback' => 'twentyfifteen_customize_partial_blogname',
2157 + )
2158 + );
2159 + $wp_customize->selective_refresh->add_partial(
2160 + 'blogdescription',
2161 + array(
2162 + 'selector' => '.site-description',
2163 + 'container_inclusive' => false,
2164 + 'render_callback' => 'twentyfifteen_customize_partial_blogdescription',
2165 + )
2166 + );
2167 }
2168
2169 // Add color scheme setting and control.
2170 - $wp_customize->add_setting( 'color_scheme', array(
2171 - 'default' => 'default',
2172 - 'sanitize_callback' => 'twentyfifteen_sanitize_color_scheme',
2173 - 'transport' => 'postMessage',
2174 - ) );
2175 -
2176 - $wp_customize->add_control( 'color_scheme', array(
2177 - 'label' => __( 'Base Color Scheme', 'twentyfifteen' ),
2178 - 'section' => 'colors',
2179 - 'type' => 'select',
2180 - 'choices' => twentyfifteen_get_color_scheme_choices(),
2181 - 'priority' => 1,
2182 - ) );
2183 + $wp_customize->add_setting(
2184 + 'color_scheme',
2185 + array(
2186 + 'default' => 'default',
2187 + 'sanitize_callback' => 'twentyfifteen_sanitize_color_scheme',
2188 + 'transport' => 'postMessage',
2189 + )
2190 + );
2191 +
2192 + $wp_customize->add_control(
2193 + 'color_scheme',
2194 + array(
2195 + 'label' => __( 'Base Color Scheme', 'twentyfifteen' ),
2196 + 'section' => 'colors',
2197 + 'type' => 'select',
2198 + 'choices' => twentyfifteen_get_color_scheme_choices(),
2199 + 'priority' => 1,
2200 + )
2201 + );
2202
2203 // Add custom header and sidebar text color setting and control.
2204 - $wp_customize->add_setting( 'sidebar_textcolor', array(
2205 - 'default' => $color_scheme[4],
2206 - 'sanitize_callback' => 'sanitize_hex_color',
2207 - 'transport' => 'postMessage',
2208 - ) );
2209 -
2210 - $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sidebar_textcolor', array(
2211 - 'label' => __( 'Header and Sidebar Text Color', 'twentyfifteen' ),
2212 - 'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
2213 - 'section' => 'colors',
2214 - ) ) );
2215 + $wp_customize->add_setting(
2216 + 'sidebar_textcolor',
2217 + array(
2218 + 'default' => $color_scheme[4],
2219 + 'sanitize_callback' => 'sanitize_hex_color',
2220 + 'transport' => 'postMessage',
2221 + )
2222 + );
2223 +
2224 + $wp_customize->add_control(
2225 + new WP_Customize_Color_Control(
2226 + $wp_customize,
2227 + 'sidebar_textcolor',
2228 + array(
2229 + 'label' => __( 'Header and Sidebar Text Color', 'twentyfifteen' ),
2230 + 'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
2231 + 'section' => 'colors',
2232 + )
2233 + )
2234 + );
2235
2236 // Remove the core header textcolor control, as it shares the sidebar text color.
2237 $wp_customize->remove_control( 'header_textcolor' );
2238
2239 // Add custom header and sidebar background color setting and control.
2240 - $wp_customize->add_setting( 'header_background_color', array(
2241 - 'default' => $color_scheme[1],
2242 - 'sanitize_callback' => 'sanitize_hex_color',
2243 - 'transport' => 'postMessage',
2244 - ) );
2245 -
2246 - $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_background_color', array(
2247 - 'label' => __( 'Header and Sidebar Background Color', 'twentyfifteen' ),
2248 - 'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
2249 - 'section' => 'colors',
2250 - ) ) );
2251 + $wp_customize->add_setting(
2252 + 'header_background_color',
2253 + array(
2254 + 'default' => $color_scheme[1],
2255 + 'sanitize_callback' => 'sanitize_hex_color',
2256 + 'transport' => 'postMessage',
2257 + )
2258 + );
2259 +
2260 + $wp_customize->add_control(
2261 + new WP_Customize_Color_Control(
2262 + $wp_customize,
2263 + 'header_background_color',
2264 + array(
2265 + 'label' => __( 'Header and Sidebar Background Color', 'twentyfifteen' ),
2266 + 'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
2267 + 'section' => 'colors',
2268 + )
2269 + )
2270 + );
2271
2272 // Add an additional description to the header image section.
2273 $wp_customize->get_section( 'header_image' )->description = __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' );
2274 @@ -145,134 +175,137 @@ function twentyfifteen_get_color_schemes() {
2275 * }
2276 * }
2277 */
2278 - return apply_filters( 'twentyfifteen_color_schemes', array(
2279 - 'default' => array(
2280 - 'label' => __( 'Default', 'twentyfifteen' ),
2281 - 'colors' => array(
2282 - '#f1f1f1',
2283 - '#ffffff',
2284 - '#ffffff',
2285 - '#333333',
2286 - '#333333',
2287 - '#f7f7f7',
2288 + return apply_filters(
2289 + 'twentyfifteen_color_schemes',
2290 + array(
2291 + 'default' => array(
2292 + 'label' => __( 'Default', 'twentyfifteen' ),
2293 + 'colors' => array(
2294 + '#f1f1f1',
2295 + '#ffffff',
2296 + '#ffffff',
2297 + '#333333',
2298 + '#333333',
2299 + '#f7f7f7',
2300 + ),
2301 ),
2302 - ),
2303 - 'dark' => array(
2304 - 'label' => __( 'Dark', 'twentyfifteen' ),
2305 - 'colors' => array(
2306 - '#111111',
2307 - '#202020',
2308 - '#202020',
2309 - '#bebebe',
2310 - '#bebebe',
2311 - '#1b1b1b',
2312 + 'dark' => array(
2313 + 'label' => __( 'Dark', 'twentyfifteen' ),
2314 + 'colors' => array(
2315 + '#111111',
2316 + '#202020',
2317 + '#202020',
2318 + '#bebebe',
2319 + '#bebebe',
2320 + '#1b1b1b',
2321 + ),
2322 ),
2323 - ),
2324 - 'yellow' => array(
2325 - 'label' => __( 'Yellow', 'twentyfifteen' ),
2326 - 'colors' => array(
2327 - '#f4ca16',
2328 - '#ffdf00',
2329 - '#ffffff',
2330 - '#111111',
2331 - '#111111',
2332 - '#f1f1f1',
2333 + 'yellow' => array(
2334 + 'label' => __( 'Yellow', 'twentyfifteen' ),
2335 + 'colors' => array(
2336 + '#f4ca16',
2337 + '#ffdf00',
2338 + '#ffffff',
2339 + '#111111',
2340 + '#111111',
2341 + '#f1f1f1',
2342 + ),
2343 ),
2344 - ),
2345 - 'pink' => array(
2346 - 'label' => __( 'Pink', 'twentyfifteen' ),
2347 - 'colors' => array(
2348 - '#ffe5d1',
2349 - '#e53b51',
2350 - '#ffffff',
2351 - '#352712',
2352 - '#ffffff',
2353 - '#f1f1f1',
2354 + 'pink' => array(
2355 + 'label' => __( 'Pink', 'twentyfifteen' ),
2356 + 'colors' => array(
2357 + '#ffe5d1',
2358 + '#e53b51',
2359 + '#ffffff',
2360 + '#352712',
2361 + '#ffffff',
2362 + '#f1f1f1',
2363 + ),
2364 ),
2365 - ),
2366 - 'purple' => array(
2367 - 'label' => __( 'Purple', 'twentyfifteen' ),
2368 - 'colors' => array(
2369 - '#674970',
2370 - '#2e2256',
2371 - '#ffffff',
2372 - '#2e2256',
2373 - '#ffffff',
2374 - '#f1f1f1',
2375 + 'purple' => array(
2376 + 'label' => __( 'Purple', 'twentyfifteen' ),
2377 + 'colors' => array(
2378 + '#674970',
2379 + '#2e2256',
2380 + '#ffffff',
2381 + '#2e2256',
2382 + '#ffffff',
2383 + '#f1f1f1',
2384 + ),
2385 ),
2386 - ),
2387 - 'blue' => array(
2388 - 'label' => __( 'Blue', 'twentyfifteen' ),
2389 - 'colors' => array(
2390 - '#e9f2f9',
2391 - '#55c3dc',
2392 - '#ffffff',
2393 - '#22313f',
2394 - '#ffffff',
2395 - '#f1f1f1',
2396 + 'blue' => array(
2397 + 'label' => __( 'Blue', 'twentyfifteen' ),
2398 + 'colors' => array(
2399 + '#e9f2f9',
2400 + '#55c3dc',
2401 + '#ffffff',
2402 + '#22313f',
2403 + '#ffffff',
2404 + '#f1f1f1',
2405 + ),
2406 ),
2407 - ),
2408 - ) );
2409 + )
2410 + );
2411 }
2412
2413 if ( ! function_exists( 'twentyfifteen_get_color_scheme' ) ) :
2414 -/**
2415 - * Get the current Twenty Fifteen color scheme.
2416 - *
2417 - * @since Twenty Fifteen 1.0
2418 - *
2419 - * @return array An associative array of either the current or default color scheme hex values.
2420 - */
2421 -function twentyfifteen_get_color_scheme() {
2422 - $color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
2423 - $color_schemes = twentyfifteen_get_color_schemes();
2424 + /**
2425 + * Get the current Twenty Fifteen color scheme.
2426 + *
2427 + * @since Twenty Fifteen 1.0
2428 + *
2429 + * @return array An associative array of either the current or default color scheme hex values.
2430 + */
2431 + function twentyfifteen_get_color_scheme() {
2432 + $color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
2433 + $color_schemes = twentyfifteen_get_color_schemes();
2434
2435 - if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
2436 - return $color_schemes[ $color_scheme_option ]['colors'];
2437 - }
2438 + if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
2439 + return $color_schemes[ $color_scheme_option ]['colors'];
2440 + }
2441
2442 - return $color_schemes['default']['colors'];
2443 -}
2444 + return $color_schemes['default']['colors'];
2445 + }
2446 endif; // twentyfifteen_get_color_scheme
2447
2448 if ( ! function_exists( 'twentyfifteen_get_color_scheme_choices' ) ) :
2449 -/**
2450 - * Returns an array of color scheme choices registered for Twenty Fifteen.
2451 - *
2452 - * @since Twenty Fifteen 1.0
2453 - *
2454 - * @return array Array of color schemes.
2455 - */
2456 -function twentyfifteen_get_color_scheme_choices() {
2457 - $color_schemes = twentyfifteen_get_color_schemes();
2458 - $color_scheme_control_options = array();
2459 + /**
2460 + * Returns an array of color scheme choices registered for Twenty Fifteen.
2461 + *
2462 + * @since Twenty Fifteen 1.0
2463 + *
2464 + * @return array Array of color schemes.
2465 + */
2466 + function twentyfifteen_get_color_scheme_choices() {
2467 + $color_schemes = twentyfifteen_get_color_schemes();
2468 + $color_scheme_control_options = array();
2469
2470 - foreach ( $color_schemes as $color_scheme => $value ) {
2471 - $color_scheme_control_options[ $color_scheme ] = $value['label'];
2472 - }
2473 + foreach ( $color_schemes as $color_scheme => $value ) {
2474 + $color_scheme_control_options[ $color_scheme ] = $value['label'];
2475 + }
2476
2477 - return $color_scheme_control_options;
2478 -}
2479 + return $color_scheme_control_options;
2480 + }
2481 endif; // twentyfifteen_get_color_scheme_choices
2482
2483 if ( ! function_exists( 'twentyfifteen_sanitize_color_scheme' ) ) :
2484 -/**
2485 - * Sanitization callback for color schemes.
2486 - *
2487 - * @since Twenty Fifteen 1.0
2488 - *
2489 - * @param string $value Color scheme name value.
2490 - * @return string Color scheme name.
2491 - */
2492 -function twentyfifteen_sanitize_color_scheme( $value ) {
2493 - $color_schemes = twentyfifteen_get_color_scheme_choices();
2494 + /**
2495 + * Sanitization callback for color schemes.
2496 + *
2497 + * @since Twenty Fifteen 1.0
2498 + *
2499 + * @param string $value Color scheme name value.
2500 + * @return string Color scheme name.
2501 + */
2502 + function twentyfifteen_sanitize_color_scheme( $value ) {
2503 + $color_schemes = twentyfifteen_get_color_scheme_choices();
2504
2505 - if ( ! array_key_exists( $value, $color_schemes ) ) {
2506 - $value = 'default';
2507 - }
2508 + if ( ! array_key_exists( $value, $color_schemes ) ) {
2509 + $value = 'default';
2510 + }
2511
2512 - return $value;
2513 -}
2514 + return $value;
2515 + }
2516 endif; // twentyfifteen_sanitize_color_scheme
2517
2518 /**
2519 @@ -295,7 +328,7 @@ function twentyfifteen_color_scheme_css() {
2520 // Convert main and sidebar text hex color to rgba.
2521 $color_textcolor_rgb = twentyfifteen_hex2rgb( $color_scheme[3] );
2522 $color_sidebar_textcolor_rgb = twentyfifteen_hex2rgb( $color_scheme[4] );
2523 - $colors = array(
2524 + $colors = array(
2525 'background_color' => $color_scheme[0],
2526 'header_background_color' => $color_scheme[1],
2527 'box_background_color' => $color_scheme[2],
2528 @@ -348,20 +381,23 @@ add_action( 'customize_preview_init', 'twentyfifteen_customize_preview_js' );
2529 * @return string Color scheme CSS.
2530 */
2531 function twentyfifteen_get_color_scheme_css( $colors ) {
2532 - $colors = wp_parse_args( $colors, array(
2533 - 'background_color' => '',
2534 - 'header_background_color' => '',
2535 - 'box_background_color' => '',
2536 - 'textcolor' => '',
2537 - 'secondary_textcolor' => '',
2538 - 'border_color' => '',
2539 - 'border_focus_color' => '',
2540 - 'sidebar_textcolor' => '',
2541 - 'sidebar_border_color' => '',
2542 - 'sidebar_border_focus_color' => '',
2543 - 'secondary_sidebar_textcolor' => '',
2544 - 'meta_box_background_color' => '',
2545 - ) );
2546 + $colors = wp_parse_args(
2547 + $colors,
2548 + array(
2549 + 'background_color' => '',
2550 + 'header_background_color' => '',
2551 + 'box_background_color' => '',
2552 + 'textcolor' => '',
2553 + 'secondary_textcolor' => '',
2554 + 'border_color' => '',
2555 + 'border_focus_color' => '',
2556 + 'sidebar_textcolor' => '',
2557 + 'sidebar_border_color' => '',
2558 + 'sidebar_border_focus_color' => '',
2559 + 'secondary_sidebar_textcolor' => '',
2560 + 'meta_box_background_color' => '',
2561 + )
2562 + );
2563
2564 $css = <<<CSS
2565 /* Color Scheme */
2566
2567 diff --git a/themes/twentyfifteen/inc/template-tags.php b/themes/twentyfifteen/inc/template-tags.php
2568 index 7b4ffeb7..056d1941 100644
2569 --- a/themes/twentyfifteen/inc/template-tags.php
2570 +++ b/themes/twentyfifteen/inc/template-tags.php
2571 @@ -10,120 +10,127 @@
2572 */
2573
2574 if ( ! function_exists( 'twentyfifteen_comment_nav' ) ) :
2575 -/**
2576 - * Display navigation to next/previous comments when applicable.
2577 - *
2578 - * @since Twenty Fifteen 1.0
2579 - */
2580 -function twentyfifteen_comment_nav() {
2581 - // Are there comments to navigate through?
2582 - if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
2583 - ?>
2584 - <nav class="navigation comment-navigation" role="navigation">
2585 + /**
2586 + * Display navigation to next/previous comments when applicable.
2587 + *
2588 + * @since Twenty Fifteen 1.0
2589 + */
2590 + function twentyfifteen_comment_nav() {
2591 + // Are there comments to navigate through?
2592 + if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
2593 + ?>
2594 + <nav class="navigation comment-navigation" role="navigation">
2595 <h2 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfifteen' ); ?></h2>
2596 <div class="nav-links">
2597 <?php
2598 - if ( $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) ) ) :
2599 - printf( '<div class="nav-previous">%s</div>', $prev_link );
2600 + if ( $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) ) ) :
2601 + printf( '<div class="nav-previous">%s</div>', $prev_link );
2602 endif;
2603
2604 - if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) :
2605 - printf( '<div class="nav-next">%s</div>', $next_link );
2606 + if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) :
2607 + printf( '<div class="nav-next">%s</div>', $next_link );
2608 endif;
2609 ?>
2610 - </div><!-- .nav-links -->
2611 - </nav><!-- .comment-navigation -->
2612 - <?php
2613 - endif;
2614 -}
2615 + </div><!-- .nav-links -->
2616 + </nav><!-- .comment-navigation -->
2617 + <?php
2618 + endif;
2619 + }
2620 endif;
2621
2622 if ( ! function_exists( 'twentyfifteen_entry_meta' ) ) :
2623 -/**
2624 - * Prints HTML with meta information for the categories, tags.
2625 - *
2626 - * @since Twenty Fifteen 1.0
2627 - */
2628 -function twentyfifteen_entry_meta() {
2629 - if ( is_sticky() && is_home() && ! is_paged() ) {
2630 - printf( '<span class="sticky-post">%s</span>', __( 'Featured', 'twentyfifteen' ) );
2631 - }
2632 -
2633 - $format = get_post_format();
2634 - if ( current_theme_supports( 'post-formats', $format ) ) {
2635 - printf( '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
2636 - sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
2637 - esc_url( get_post_format_link( $format ) ),
2638 - get_post_format_string( $format )
2639 - );
2640 - }
2641 -
2642 - if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
2643 - $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
2644 + /**
2645 + * Prints HTML with meta information for the categories, tags.
2646 + *
2647 + * @since Twenty Fifteen 1.0
2648 + */
2649 + function twentyfifteen_entry_meta() {
2650 + if ( is_sticky() && is_home() && ! is_paged() ) {
2651 + printf( '<span class="sticky-post">%s</span>', __( 'Featured', 'twentyfifteen' ) );
2652 + }
2653
2654 - if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
2655 - $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
2656 + $format = get_post_format();
2657 + if ( current_theme_supports( 'post-formats', $format ) ) {
2658 + printf(
2659 + '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
2660 + sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
2661 + esc_url( get_post_format_link( $format ) ),
2662 + get_post_format_string( $format )
2663 + );
2664 }
2665
2666 - $time_string = sprintf( $time_string,
2667 - esc_attr( get_the_date( 'c' ) ),
2668 - get_the_date(),
2669 - esc_attr( get_the_modified_date( 'c' ) ),
2670 - get_the_modified_date()
2671 - );
2672 + if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
2673 + $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
2674
2675 - printf( '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
2676 - _x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),
2677 - esc_url( get_permalink() ),
2678 - $time_string
2679 - );
2680 - }
2681 + if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
2682 + $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
2683 + }
2684
2685 - if ( 'post' == get_post_type() ) {
2686 - if ( is_singular() || is_multi_author() ) {
2687 - printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>',
2688 - _x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
2689 - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
2690 - get_the_author()
2691 + $time_string = sprintf(
2692 + $time_string,
2693 + esc_attr( get_the_date( 'c' ) ),
2694 + get_the_date(),
2695 + esc_attr( get_the_modified_date( 'c' ) ),
2696 + get_the_modified_date()
2697 );
2698 - }
2699
2700 - $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
2701 - if ( $categories_list && twentyfifteen_categorized_blog() ) {
2702 - printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
2703 - _x( 'Categories', 'Used before category names.', 'twentyfifteen' ),
2704 - $categories_list
2705 + printf(
2706 + '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
2707 + _x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),
2708 + esc_url( get_permalink() ),
2709 + $time_string
2710 );
2711 }
2712
2713 - $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
2714 - if ( $tags_list && ! is_wp_error( $tags_list ) ) {
2715 - printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
2716 - _x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
2717 - $tags_list
2718 - );
2719 + if ( 'post' == get_post_type() ) {
2720 + if ( is_singular() || is_multi_author() ) {
2721 + printf(
2722 + '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>',
2723 + _x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
2724 + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
2725 + get_the_author()
2726 + );
2727 + }
2728 +
2729 + $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
2730 + if ( $categories_list && twentyfifteen_categorized_blog() ) {
2731 + printf(
2732 + '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
2733 + _x( 'Categories', 'Used before category names.', 'twentyfifteen' ),
2734 + $categories_list
2735 + );
2736 + }
2737 +
2738 + $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
2739 + if ( $tags_list && ! is_wp_error( $tags_list ) ) {
2740 + printf(
2741 + '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
2742 + _x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
2743 + $tags_list
2744 + );
2745 + }
2746 }
2747 - }
2748
2749 - if ( is_attachment() && wp_attachment_is_image() ) {
2750 - // Retrieve attachment metadata.
2751 - $metadata = wp_get_attachment_metadata();
2752 + if ( is_attachment() && wp_attachment_is_image() ) {
2753 + // Retrieve attachment metadata.
2754 + $metadata = wp_get_attachment_metadata();
2755
2756 - printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>',
2757 - _x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),
2758 - esc_url( wp_get_attachment_url() ),
2759 - $metadata['width'],
2760 - $metadata['height']
2761 - );
2762 - }
2763 + printf(
2764 + '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>',
2765 + _x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),
2766 + esc_url( wp_get_attachment_url() ),
2767 + $metadata['width'],
2768 + $metadata['height']
2769 + );
2770 + }
2771
2772 - if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
2773 - echo '<span class="comments-link">';
2774 - /* translators: %s: post title */
2775 - comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentyfifteen' ), get_the_title() ) );
2776 - echo '</span>';
2777 + if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
2778 + echo '<span class="comments-link">';
2779 + /* translators: %s: post title */
2780 + comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentyfifteen' ), get_the_title() ) );
2781 + echo '</span>';
2782 + }
2783 }
2784 -}
2785 endif;
2786
2787 /**
2788 @@ -136,13 +143,15 @@ endif;
2789 function twentyfifteen_categorized_blog() {
2790 if ( false === ( $all_the_cool_cats = get_transient( 'twentyfifteen_categories' ) ) ) {
2791 // Create an array of all the categories that are attached to posts.
2792 - $all_the_cool_cats = get_categories( array(
2793 - 'fields' => 'ids',
2794 - 'hide_empty' => 1,
2795 + $all_the_cool_cats = get_categories(
2796 + array(
2797 + 'fields' => 'ids',
2798 + 'hide_empty' => 1,
2799
2800 - // We only need to know if there is more than one category.
2801 - 'number' => 2,
2802 - ) );
2803 + // We only need to know if there is more than one category.
2804 + 'number' => 2,
2805 + )
2806 + );
2807
2808 // Count the number of categories that are attached to the posts.
2809 $all_the_cool_cats = count( $all_the_cool_cats );
2810 @@ -169,27 +178,27 @@ function twentyfifteen_category_transient_flusher() {
2811 delete_transient( 'twentyfifteen_categories' );
2812 }
2813 add_action( 'edit_category', 'twentyfifteen_category_transient_flusher' );
2814 -add_action( 'save_post', 'twentyfifteen_category_transient_flusher' );
2815 +add_action( 'save_post', 'twentyfifteen_category_transient_flusher' );
2816
2817 if ( ! function_exists( 'twentyfifteen_post_thumbnail' ) ) :
2818 -/**
2819 - * Display an optional post thumbnail.
2820 - *
2821 - * Wraps the post thumbnail in an anchor element on index views, or a div
2822 - * element when on single views.
2823 - *
2824 - * @since Twenty Fifteen 1.0
2825 - */
2826 -function twentyfifteen_post_thumbnail() {
2827 - if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
2828 - return;
2829 - }
2830 + /**
2831 + * Display an optional post thumbnail.
2832 + *
2833 + * Wraps the post thumbnail in an anchor element on index views, or a div
2834 + * element when on single views.
2835 + *
2836 + * @since Twenty Fifteen 1.0
2837 + */
2838 + function twentyfifteen_post_thumbnail() {
2839 + if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
2840 + return;
2841 + }
2842
2843 - if ( is_singular() ) :
2844 - ?>
2845 + if ( is_singular() ) :
2846 + ?>
2847
2848 - <div class="post-thumbnail">
2849 - <?php the_post_thumbnail(); ?>
2850 + <div class="post-thumbnail">
2851 + <?php the_post_thumbnail(); ?>
2852 </div><!-- .post-thumbnail -->
2853
2854 <?php else : ?>
2855 @@ -200,59 +209,61 @@ function twentyfifteen_post_thumbnail() {
2856 ?>
2857 </a>
2858
2859 - <?php endif; // End is_singular()
2860 -}
2861 + <?php
2862 + endif; // End is_singular()
2863 + }
2864 endif;
2865
2866 if ( ! function_exists( 'twentyfifteen_get_link_url' ) ) :
2867 -/**
2868 - * Return the post URL.
2869 - *
2870 - * Falls back to the post permalink if no URL is found in the post.
2871 - *
2872 - * @since Twenty Fifteen 1.0
2873 - *
2874 - * @see get_url_in_content()
2875 - *
2876 - * @return string The Link format URL.
2877 - */
2878 -function twentyfifteen_get_link_url() {
2879 - $has_url = get_url_in_content( get_the_content() );
2880 + /**
2881 + * Return the post URL.
2882 + *
2883 + * Falls back to the post permalink if no URL is found in the post.
2884 + *
2885 + * @since Twenty Fifteen 1.0
2886 + *
2887 + * @see get_url_in_content()
2888 + *
2889 + * @return string The Link format URL.
2890 + */
2891 + function twentyfifteen_get_link_url() {
2892 + $has_url = get_url_in_content( get_the_content() );
2893
2894 - return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() );
2895 -}
2896 + return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() );
2897 + }
2898 endif;
2899
2900 if ( ! function_exists( 'twentyfifteen_excerpt_more' ) && ! is_admin() ) :
2901 -/**
2902 - * Replaces "[...]" (appended to automatically generated excerpts) with ... and a 'Continue reading' link.
2903 - *
2904 - * @since Twenty Fifteen 1.0
2905 - *
2906 - * @return string 'Continue reading' link prepended with an ellipsis.
2907 - */
2908 -function twentyfifteen_excerpt_more( $more ) {
2909 - $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
2910 - esc_url( get_permalink( get_the_ID() ) ),
2911 - /* translators: %s: Name of current post */
2912 - sprintf( __( 'Continue reading %s', 'twentyfifteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
2913 + /**
2914 + * Replaces "[...]" (appended to automatically generated excerpts) with ... and a 'Continue reading' link.
2915 + *
2916 + * @since Twenty Fifteen 1.0
2917 + *
2918 + * @return string 'Continue reading' link prepended with an ellipsis.
2919 + */
2920 + function twentyfifteen_excerpt_more( $more ) {
2921 + $link = sprintf(
2922 + '<a href="%1$s" class="more-link">%2$s</a>',
2923 + esc_url( get_permalink( get_the_ID() ) ),
2924 + /* translators: %s: Name of current post */
2925 + sprintf( __( 'Continue reading %s', 'twentyfifteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
2926 );
2927 - return ' &hellip; ' . $link;
2928 -}
2929 -add_filter( 'excerpt_more', 'twentyfifteen_excerpt_more' );
2930 + return ' &hellip; ' . $link;
2931 + }
2932 + add_filter( 'excerpt_more', 'twentyfifteen_excerpt_more' );
2933 endif;
2934
2935 if ( ! function_exists( 'twentyfifteen_the_custom_logo' ) ) :
2936 -/**
2937 - * Displays the optional custom logo.
2938 - *
2939 - * Does nothing if the custom logo is not available.
2940 - *
2941 - * @since Twenty Fifteen 1.5
2942 - */
2943 -function twentyfifteen_the_custom_logo() {
2944 - if ( function_exists( 'the_custom_logo' ) ) {
2945 - the_custom_logo();
2946 + /**
2947 + * Displays the optional custom logo.
2948 + *
2949 + * Does nothing if the custom logo is not available.
2950 + *
2951 + * @since Twenty Fifteen 1.5
2952 + */
2953 + function twentyfifteen_the_custom_logo() {
2954 + if ( function_exists( 'the_custom_logo' ) ) {
2955 + the_custom_logo();
2956 + }
2957 }
2958 -}
2959 endif;
2960
2961 diff --git a/themes/twentyfifteen/index.php b/themes/twentyfifteen/index.php
2962 index db77651e..4abac6a1 100644
2963 --- a/themes/twentyfifteen/index.php
2964 +++ b/themes/twentyfifteen/index.php
2965 @@ -7,7 +7,7 @@
2966 * It is used to display a page when nothing more specific matches a query.
2967 * e.g., it puts together the home page when no home.php file exists.
2968 *
2969 - * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
2970 + * Learn more: {@link https://developer.wordpress.org/themes/basics/template-hierarchy/}
2971 *
2972 * @package WordPress
2973 * @subpackage Twenty_Fifteen
2974 @@ -29,7 +29,8 @@ get_header(); ?>
2975
2976 <?php
2977 // Start the loop.
2978 - while ( have_posts() ) : the_post();
2979 + while ( have_posts() ) :
2980 + the_post();
2981
2982 /*
2983 * Include the Post-Format-specific template for the content.
2984 @@ -38,17 +39,19 @@ get_header(); ?>
2985 */
2986 get_template_part( 'content', get_post_format() );
2987
2988 - // End the loop.
2989 + // End the loop.
2990 endwhile;
2991
2992 // Previous/next page navigation.
2993 - the_posts_pagination( array(
2994 - 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
2995 - 'next_text' => __( 'Next page', 'twentyfifteen' ),
2996 - 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
2997 - ) );
2998 + the_posts_pagination(
2999 + array(
3000 + 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
3001 + 'next_text' => __( 'Next page', 'twentyfifteen' ),
3002 + 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
3003 + )
3004 + );
3005
3006 - // If no content, include the "No posts found" template.
3007 + // If no content, include the "No posts found" template.
3008 else :
3009 get_template_part( 'content', 'none' );
3010
3011
3012 diff --git a/themes/twentyfifteen/js/functions.js b/themes/twentyfifteen/js/functions.js
3013 index 2da5cbc3..b9dddc85 100644
3014 --- a/themes/twentyfifteen/js/functions.js
3015 +++ b/themes/twentyfifteen/js/functions.js
3016 @@ -77,7 +77,8 @@
3017 } )();
3018
3019 /**
3020 - * @summary Add or remove ARIA attributes.
3021 + * Add or remove ARIA attributes.
3022 + *
3023 * Uses jQuery's width() function to determine the size of the window and add
3024 * the default ARIA attributes for the menu toggle if it's visible.
3025 * @since Twenty Fifteen 1.1
3026
3027 diff --git a/themes/twentyfifteen/page.php b/themes/twentyfifteen/page.php
3028 index 5c7a0b07..50d0bf1c 100644
3029 --- a/themes/twentyfifteen/page.php
3030 +++ b/themes/twentyfifteen/page.php
3031 @@ -18,7 +18,8 @@ get_header(); ?>
3032
3033 <?php
3034 // Start the loop.
3035 - while ( have_posts() ) : the_post();
3036 + while ( have_posts() ) :
3037 + the_post();
3038
3039 // Include the page content template.
3040 get_template_part( 'content', 'page' );
3041 @@ -28,7 +29,7 @@ get_header(); ?>
3042 comments_template();
3043 endif;
3044
3045 - // End the loop.
3046 + // End the loop.
3047 endwhile;
3048 ?>
3049
3050
3051 diff --git a/themes/twentyfifteen/readme.txt b/themes/twentyfifteen/readme.txt
3052 index 7bc7d625..a28aa0cf 100644
3053 --- a/themes/twentyfifteen/readme.txt
3054 +++ b/themes/twentyfifteen/readme.txt
3055 @@ -2,7 +2,7 @@
3056 Contributors: the WordPress team
3057 Requires at least: WordPress 4.1
3058 Tested up to: WordPress 5.0
3059 -Version: 2.2
3060 +Version: 2.4
3061 License: GPLv2 or later
3062 License URI: http://www.gnu.org/licenses/gpl-2.0.html
3063 Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
3064 @@ -55,6 +55,16 @@ Source: http://www.genericons.com
3065
3066 == Changelog ==
3067
3068 += 2.4 =
3069 +* Released: February 21, 2019
3070 +
3071 +https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_2.4
3072 +
3073 += 2.3 =
3074 +* Released: January 9, 2019
3075 +
3076 +https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_2.3
3077 +
3078 = 2.2 =
3079 * Released: December 19, 2018
3080
3081
3082 diff --git a/themes/twentyfifteen/search.php b/themes/twentyfifteen/search.php
3083 index 33528415..f3778f34 100644
3084 --- a/themes/twentyfifteen/search.php
3085 +++ b/themes/twentyfifteen/search.php
3086 @@ -20,7 +20,9 @@ get_header(); ?>
3087
3088 <?php
3089 // Start the loop.
3090 - while ( have_posts() ) : the_post(); ?>
3091 + while ( have_posts() ) :
3092 + the_post();
3093 + ?>
3094
3095 <?php
3096 /*
3097 @@ -30,17 +32,19 @@ get_header(); ?>
3098 */
3099 get_template_part( 'content', 'search' );
3100
3101 - // End the loop.
3102 + // End the loop.
3103 endwhile;
3104
3105 // Previous/next page navigation.
3106 - the_posts_pagination( array(
3107 - 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
3108 - 'next_text' => __( 'Next page', 'twentyfifteen' ),
3109 - 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
3110 - ) );
3111 -
3112 - // If no content, include the "No posts found" template.
3113 + the_posts_pagination(
3114 + array(
3115 + 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
3116 + 'next_text' => __( 'Next page', 'twentyfifteen' ),
3117 + 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
3118 + )
3119 + );
3120 +
3121 + // If no content, include the "No posts found" template.
3122 else :
3123 get_template_part( 'content', 'none' );
3124
3125
3126 diff --git a/themes/twentyfifteen/sidebar.php b/themes/twentyfifteen/sidebar.php
3127 index 02308efc..f2326a8c 100644
3128 --- a/themes/twentyfifteen/sidebar.php
3129 +++ b/themes/twentyfifteen/sidebar.php
3130 @@ -7,17 +7,19 @@
3131 * @since Twenty Fifteen 1.0
3132 */
3133
3134 -if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 'sidebar-1' ) ) : ?>
3135 +if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 'sidebar-1' ) ) : ?>
3136 <div id="secondary" class="secondary">
3137
3138 <?php if ( has_nav_menu( 'primary' ) ) : ?>
3139 <nav id="site-navigation" class="main-navigation" role="navigation">
3140 <?php
3141 // Primary navigation menu.
3142 - wp_nav_menu( array(
3143 - 'menu_class' => 'nav-menu',
3144 - 'theme_location' => 'primary',
3145 - ) );
3146 + wp_nav_menu(
3147 + array(
3148 + 'menu_class' => 'nav-menu',
3149 + 'theme_location' => 'primary',
3150 + )
3151 + );
3152 ?>
3153 </nav><!-- .main-navigation -->
3154 <?php endif; ?>
3155 @@ -26,12 +28,14 @@ if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar(
3156 <nav id="social-navigation" class="social-navigation" role="navigation">
3157 <?php
3158 // Social links navigation menu.
3159 - wp_nav_menu( array(
3160 - 'theme_location' => 'social',
3161 - 'depth' => 1,
3162 - 'link_before' => '<span class="screen-reader-text">',
3163 - 'link_after' => '</span>',
3164 - ) );
3165 + wp_nav_menu(
3166 + array(
3167 + 'theme_location' => 'social',
3168 + 'depth' => 1,
3169 + 'link_before' => '<span class="screen-reader-text">',
3170 + 'link_after' => '</span>',
3171 + )
3172 + );
3173 ?>
3174 </nav><!-- .social-navigation -->
3175 <?php endif; ?>
3176
3177 diff --git a/themes/twentyfifteen/single.php b/themes/twentyfifteen/single.php
3178 index fda8b5ec..4de3a493 100644
3179 --- a/themes/twentyfifteen/single.php
3180 +++ b/themes/twentyfifteen/single.php
3181 @@ -14,7 +14,8 @@ get_header(); ?>
3182
3183 <?php
3184 // Start the loop.
3185 - while ( have_posts() ) : the_post();
3186 + while ( have_posts() ) :
3187 + the_post();
3188
3189 /*
3190 * Include the post format-specific template for the content. If you want to
3191 @@ -29,16 +30,18 @@ get_header(); ?>
3192 endif;
3193
3194 // Previous/next post navigation.
3195 - the_post_navigation( array(
3196 - 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentyfifteen' ) . '</span> ' .
3197 - '<span class="screen-reader-text">' . __( 'Next post:', 'twentyfifteen' ) . '</span> ' .
3198 - '<span class="post-title">%title</span>',
3199 - 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentyfifteen' ) . '</span> ' .
3200 - '<span class="screen-reader-text">' . __( 'Previous post:', 'twentyfifteen' ) . '</span> ' .
3201 - '<span class="post-title">%title</span>',
3202 - ) );
3203 -
3204 - // End the loop.
3205 + the_post_navigation(
3206 + array(
3207 + 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentyfifteen' ) . '</span> ' .
3208 + '<span class="screen-reader-text">' . __( 'Next post:', 'twentyfifteen' ) . '</span> ' .
3209 + '<span class="post-title">%title</span>',
3210 + 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentyfifteen' ) . '</span> ' .
3211 + '<span class="screen-reader-text">' . __( 'Previous post:', 'twentyfifteen' ) . '</span> ' .
3212 + '<span class="post-title">%title</span>',
3213 + )
3214 + );
3215 +
3216 + // End the loop.
3217 endwhile;
3218 ?>
3219
3220
3221 diff --git a/themes/twentyfifteen/style.css b/themes/twentyfifteen/style.css
3222 index d53b3eb2..49631ce0 100644
3223 --- a/themes/twentyfifteen/style.css
3224 +++ b/themes/twentyfifteen/style.css
3225 @@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyfifteen/
3226 Author: the WordPress team
3227 Author URI: https://wordpress.org/
3228 Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer.
3229 -Version: 2.2
3230 +Version: 2.4
3231 License: GNU General Public License v2 or later
3232 License URI: http://www.gnu.org/licenses/gpl-2.0.html
3233 Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
3234
3235 diff --git a/themes/twentyfourteen/archive.php b/themes/twentyfourteen/archive.php
3236 index 6a4deed0..9d2ba95f 100644
3237 --- a/themes/twentyfourteen/archive.php
3238 +++ b/themes/twentyfourteen/archive.php
3239 @@ -10,7 +10,7 @@
3240 * already has tag.php for Tag archives, category.php for Category archives,
3241 * and author.php for Author archives.
3242 *
3243 - * @link https://codex.wordpress.org/Template_Hierarchy
3244 + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
3245 *
3246 * @package WordPress
3247 * @subpackage Twenty_Fourteen
3248 @@ -27,8 +27,8 @@ get_header(); ?>
3249 <header class="page-header">
3250 <h1 class="page-title">
3251 <?php
3252 - if ( is_day() ) :
3253 - printf( __( 'Daily Archives: %s', 'twentyfourteen' ), get_the_date() );
3254 + if ( is_day() ) :
3255 + printf( __( 'Daily Archives: %s', 'twentyfourteen' ), get_the_date() );
3256
3257 elseif ( is_month() ) :
3258 printf( __( 'Monthly Archives: %s', 'twentyfourteen' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyfourteen' ) ) );
3259 @@ -40,20 +40,21 @@ get_header(); ?>
3260 _e( 'Archives', 'twentyfourteen' );
3261
3262 endif;
3263 - ?>
3264 + ?>
3265 </h1>
3266 </header><!-- .page-header -->
3267
3268 - <?php
3269 + <?php
3270 // Start the Loop.
3271 - while ( have_posts() ) : the_post();
3272 + while ( have_posts() ) :
3273 + the_post();
3274
3275 - /*
3276 - * Include the post format-specific template for the content. If you want to
3277 - * use this in a child theme, then include a file called content-___.php
3278 - * (where ___ is the post format) and that will be used instead.
3279 - */
3280 - get_template_part( 'content', get_post_format() );
3281 + /*
3282 + * Include the post format-specific template for the content. If you want to
3283 + * use this in a child theme, then include a file called content-___.php
3284 + * (where ___ is the post format) and that will be used instead.
3285 + */
3286 + get_template_part( 'content', get_post_format() );
3287
3288 endwhile;
3289 // Previous/next page navigation.
3290 @@ -64,7 +65,7 @@ get_header(); ?>
3291 get_template_part( 'content', 'none' );
3292
3293 endif;
3294 - ?>
3295 + ?>
3296 </div><!-- #content -->
3297 </section><!-- #primary -->
3298
3299
3300 diff --git a/themes/twentyfourteen/author.php b/themes/twentyfourteen/author.php
3301 index a40f2090..2f1d47fb 100644
3302 --- a/themes/twentyfourteen/author.php
3303 +++ b/themes/twentyfourteen/author.php
3304 @@ -2,7 +2,7 @@
3305 /**
3306 * The template for displaying Author archive pages
3307 *
3308 - * @link https://codex.wordpress.org/Template_Hierarchy
3309 + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
3310 *
3311 * @package WordPress
3312 * @subpackage Twenty_Fourteen
3313 @@ -36,7 +36,7 @@ get_header(); ?>
3314 <?php endif; ?>
3315 </header><!-- .archive-header -->
3316
3317 - <?php
3318 + <?php
3319 /*
3320 * Since we called the_post() above, we need to rewind
3321 * the loop back to the beginning that way we can run
3322 @@ -45,14 +45,15 @@ get_header(); ?>
3323 rewind_posts();
3324
3325 // Start the Loop.
3326 - while ( have_posts() ) : the_post();
3327 + while ( have_posts() ) :
3328 + the_post();
3329
3330 - /*
3331 - * Include the post format-specific template for the content. If you want to
3332 - * use this in a child theme, then include a file called content-___.php
3333 - * (where ___ is the post format) and that will be used instead.
3334 - */
3335 - get_template_part( 'content', get_post_format() );
3336 + /*
3337 + * Include the post format-specific template for the content. If you want to
3338 + * use this in a child theme, then include a file called content-___.php
3339 + * (where ___ is the post format) and that will be used instead.
3340 + */
3341 + get_template_part( 'content', get_post_format() );
3342
3343 endwhile;
3344 // Previous/next page navigation.
3345 @@ -63,7 +64,7 @@ get_header(); ?>
3346 get_template_part( 'content', 'none' );
3347
3348 endif;
3349 - ?>
3350 + ?>
3351
3352 </div><!-- #content -->
3353 </section><!-- #primary -->
3354
3355 diff --git a/themes/twentyfourteen/category.php b/themes/twentyfourteen/category.php
3356 index 97745ff1..c193cc7b 100644
3357 --- a/themes/twentyfourteen/category.php
3358 +++ b/themes/twentyfourteen/category.php
3359 @@ -2,7 +2,7 @@
3360 /**
3361 * The template for displaying Category pages
3362 *
3363 - * @link https://codex.wordpress.org/Template_Hierarchy
3364 + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
3365 *
3366 * @package WordPress
3367 * @subpackage Twenty_Fourteen
3368 @@ -22,21 +22,22 @@ get_header(); ?>
3369 <?php
3370 // Show an optional term description.
3371 $term_description = term_description();
3372 - if ( ! empty( $term_description ) ) :
3373 - printf( '<div class="taxonomy-description">%s</div>', $term_description );
3374 + if ( ! empty( $term_description ) ) :
3375 + printf( '<div class="taxonomy-description">%s</div>', $term_description );
3376 endif;
3377 ?>
3378 </header><!-- .archive-header -->
3379
3380 - <?php
3381 + <?php
3382 // Start the Loop.
3383 - while ( have_posts() ) : the_post();
3384 + while ( have_posts() ) :
3385 + the_post();
3386
3387 /*
3388 - * Include the post format-specific template for the content. If you want to
3389 - * use this in a child theme, then include a file called content-___.php
3390 - * (where ___ is the post format) and that will be used instead.
3391 - */
3392 + * Include the post format-specific template for the content. If you want to
3393 + * use this in a child theme, then include a file called content-___.php
3394 + * (where ___ is the post format) and that will be used instead.
3395 + */
3396 get_template_part( 'content', get_post_format() );
3397
3398 endwhile;
3399 @@ -48,7 +49,7 @@ get_header(); ?>
3400 get_template_part( 'content', 'none' );
3401
3402 endif;
3403 - ?>
3404 + ?>
3405 </div><!-- #content -->
3406 </section><!-- #primary -->
3407
3408
3409 diff --git a/themes/twentyfourteen/comments.php b/themes/twentyfourteen/comments.php
3410 index d62e91a7..0b81703f 100644
3411 --- a/themes/twentyfourteen/comments.php
3412 +++ b/themes/twentyfourteen/comments.php
3413 @@ -25,27 +25,27 @@ if ( post_password_required() ) {
3414 <h2 class="comments-title">
3415 <?php
3416 $comments_number = get_comments_number();
3417 - if ( '1' === $comments_number ) {
3418 - /* translators: %s: post title */
3419 - printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentyfourteen' ), get_the_title() );
3420 - } else {
3421 - printf(
3422 - /* translators: 1: number of comments, 2: post title */
3423 - _nx(
3424 - '%1$s thought on &ldquo;%2$s&rdquo;',
3425 - '%1$s thoughts on &ldquo;%2$s&rdquo;',
3426 - $comments_number,
3427 - 'comments title',
3428 - 'twentyfourteen'
3429 - ),
3430 - number_format_i18n( $comments_number ),
3431 - get_the_title()
3432 - );
3433 - }
3434 + if ( '1' === $comments_number ) {
3435 + /* translators: %s: post title */
3436 + printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentyfourteen' ), get_the_title() );
3437 + } else {
3438 + printf(
3439 + /* translators: 1: number of comments, 2: post title */
3440 + _nx(
3441 + '%1$s thought on &ldquo;%2$s&rdquo;',
3442 + '%1$s thoughts on &ldquo;%2$s&rdquo;',
3443 + $comments_number,
3444 + 'comments title',
3445 + 'twentyfourteen'
3446 + ),
3447 + number_format_i18n( $comments_number ),
3448 + get_the_title()
3449 + );
3450 + }
3451 ?>
3452 </h2>
3453
3454 - <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
3455 + <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
3456 <nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
3457 <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
3458 <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
3459 @@ -55,15 +55,17 @@ if ( post_password_required() ) {
3460
3461 <ol class="comment-list">
3462 <?php
3463 - wp_list_comments( array(
3464 - 'style' => 'ol',
3465 - 'short_ping' => true,
3466 - 'avatar_size' => 34,
3467 - ) );
3468 + wp_list_comments(
3469 + array(
3470 + 'style' => 'ol',
3471 + 'short_ping' => true,
3472 + 'avatar_size' => 34,
3473 + )
3474 + );
3475 ?>
3476 </ol><!-- .comment-list -->
3477
3478 - <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
3479 + <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
3480 <nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
3481 <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
3482 <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
3483 @@ -71,7 +73,7 @@ if ( post_password_required() ) {
3484 </nav><!-- #comment-nav-below -->
3485 <?php endif; // Check for comment navigation. ?>
3486
3487 - <?php if ( ! comments_open() ) : ?>
3488 + <?php if ( ! comments_open() ) : ?>
3489 <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
3490 <?php endif; ?>
3491
3492
3493 diff --git a/themes/twentyfourteen/content-aside.php b/themes/twentyfourteen/content-aside.php
3494 index 0401579d..3fd3acda 100644
3495 --- a/themes/twentyfourteen/content-aside.php
3496 +++ b/themes/twentyfourteen/content-aside.php
3497 @@ -16,15 +16,15 @@
3498 <div class="entry-meta">
3499 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
3500 </div><!-- .entry-meta -->
3501 - <?php
3502 + <?php
3503 endif;
3504
3505 - if ( is_single() ) :
3506 - the_title( '<h1 class="entry-title">', '</h1>' );
3507 + if ( is_single() ) :
3508 + the_title( '<h1 class="entry-title">', '</h1>' );
3509 else :
3510 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
3511 endif;
3512 - ?>
3513 + ?>
3514
3515 <div class="entry-meta">
3516 <span class="post-format">
3517 @@ -44,18 +44,22 @@
3518 <div class="entry-content">
3519 <?php
3520 /* translators: %s: Name of current post */
3521 - the_content( sprintf(
3522 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3523 - the_title( '<span class="screen-reader-text">', '</span>', false )
3524 - ) );
3525 -
3526 - wp_link_pages( array(
3527 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3528 - 'after' => '</div>',
3529 - 'link_before' => '<span>',
3530 - 'link_after' => '</span>',
3531 - ) );
3532 - ?>
3533 + the_content(
3534 + sprintf(
3535 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3536 + the_title( '<span class="screen-reader-text">', '</span>', false )
3537 + )
3538 + );
3539 +
3540 + wp_link_pages(
3541 + array(
3542 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3543 + 'after' => '</div>',
3544 + 'link_before' => '<span>',
3545 + 'link_after' => '</span>',
3546 + )
3547 + );
3548 + ?>
3549 </div><!-- .entry-content -->
3550
3551 <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
3552
3553 diff --git a/themes/twentyfourteen/content-audio.php b/themes/twentyfourteen/content-audio.php
3554 index 9fa9df41..4dba002a 100644
3555 --- a/themes/twentyfourteen/content-audio.php
3556 +++ b/themes/twentyfourteen/content-audio.php
3557 @@ -16,15 +16,15 @@
3558 <div class="entry-meta">
3559 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
3560 </div><!-- .entry-meta -->
3561 - <?php
3562 + <?php
3563 endif;
3564
3565 - if ( is_single() ) :
3566 - the_title( '<h1 class="entry-title">', '</h1>' );
3567 + if ( is_single() ) :
3568 + the_title( '<h1 class="entry-title">', '</h1>' );
3569 else :
3570 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
3571 endif;
3572 - ?>
3573 + ?>
3574
3575 <div class="entry-meta">
3576 <span class="post-format">
3577 @@ -44,18 +44,22 @@
3578 <div class="entry-content">
3579 <?php
3580 /* translators: %s: Name of current post */
3581 - the_content( sprintf(
3582 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3583 - the_title( '<span class="screen-reader-text">', '</span>', false )
3584 - ) );
3585 -
3586 - wp_link_pages( array(
3587 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3588 - 'after' => '</div>',
3589 - 'link_before' => '<span>',
3590 - 'link_after' => '</span>',
3591 - ) );
3592 - ?>
3593 + the_content(
3594 + sprintf(
3595 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3596 + the_title( '<span class="screen-reader-text">', '</span>', false )
3597 + )
3598 + );
3599 +
3600 + wp_link_pages(
3601 + array(
3602 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3603 + 'after' => '</div>',
3604 + 'link_before' => '<span>',
3605 + 'link_after' => '</span>',
3606 + )
3607 + );
3608 + ?>
3609 </div><!-- .entry-content -->
3610
3611 <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
3612
3613 diff --git a/themes/twentyfourteen/content-featured-post.php b/themes/twentyfourteen/content-featured-post.php
3614 index 6cc88224..d5a16fef 100644
3615 --- a/themes/twentyfourteen/content-featured-post.php
3616 +++ b/themes/twentyfourteen/content-featured-post.php
3617 @@ -12,12 +12,12 @@
3618 <a class="post-thumbnail" href="<?php the_permalink(); ?>">
3619 <?php
3620 // Output the featured image.
3621 - if ( has_post_thumbnail() ) :
3622 - if ( 'grid' == get_theme_mod( 'featured_content_layout' ) ) {
3623 - the_post_thumbnail();
3624 - } else {
3625 - the_post_thumbnail( 'twentyfourteen-full-width' );
3626 - }
3627 + if ( has_post_thumbnail() ) :
3628 + if ( 'grid' == get_theme_mod( 'featured_content_layout' ) ) {
3629 + the_post_thumbnail();
3630 + } else {
3631 + the_post_thumbnail( 'twentyfourteen-full-width' );
3632 + }
3633 endif;
3634 ?>
3635 </a>
3636 @@ -29,6 +29,6 @@
3637 </div><!-- .entry-meta -->
3638 <?php endif; ?>
3639
3640 - <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">','</a></h1>' ); ?>
3641 + <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
3642 </header><!-- .entry-header -->
3643 </article><!-- #post-## -->
3644
3645 diff --git a/themes/twentyfourteen/content-gallery.php b/themes/twentyfourteen/content-gallery.php
3646 index 6e3fe832..9ecdfbf9 100644
3647 --- a/themes/twentyfourteen/content-gallery.php
3648 +++ b/themes/twentyfourteen/content-gallery.php
3649 @@ -16,15 +16,15 @@
3650 <div class="entry-meta">
3651 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
3652 </div><!-- .entry-meta -->
3653 - <?php
3654 + <?php
3655 endif;
3656
3657 - if ( is_single() ) :
3658 - the_title( '<h1 class="entry-title">', '</h1>' );
3659 + if ( is_single() ) :
3660 + the_title( '<h1 class="entry-title">', '</h1>' );
3661 else :
3662 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
3663 endif;
3664 - ?>
3665 + ?>
3666
3667 <div class="entry-meta">
3668 <span class="post-format">
3669 @@ -44,18 +44,22 @@
3670 <div class="entry-content">
3671 <?php
3672 /* translators: %s: Name of current post */
3673 - the_content( sprintf(
3674 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3675 - the_title( '<span class="screen-reader-text">', '</span>', false )
3676 - ) );
3677 -
3678 - wp_link_pages( array(
3679 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3680 - 'after' => '</div>',
3681 - 'link_before' => '<span>',
3682 - 'link_after' => '</span>',
3683 - ) );
3684 - ?>
3685 + the_content(
3686 + sprintf(
3687 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3688 + the_title( '<span class="screen-reader-text">', '</span>', false )
3689 + )
3690 + );
3691 +
3692 + wp_link_pages(
3693 + array(
3694 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3695 + 'after' => '</div>',
3696 + 'link_before' => '<span>',
3697 + 'link_after' => '</span>',
3698 + )
3699 + );
3700 + ?>
3701 </div><!-- .entry-content -->
3702
3703 <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
3704
3705 diff --git a/themes/twentyfourteen/content-image.php b/themes/twentyfourteen/content-image.php
3706 index a81e493d..911ef239 100644
3707 --- a/themes/twentyfourteen/content-image.php
3708 +++ b/themes/twentyfourteen/content-image.php
3709 @@ -16,15 +16,15 @@
3710 <div class="entry-meta">
3711 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
3712 </div><!-- .entry-meta -->
3713 - <?php
3714 + <?php
3715 endif;
3716
3717 - if ( is_single() ) :
3718 - the_title( '<h1 class="entry-title">', '</h1>' );
3719 + if ( is_single() ) :
3720 + the_title( '<h1 class="entry-title">', '</h1>' );
3721 else :
3722 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
3723 endif;
3724 - ?>
3725 + ?>
3726
3727 <div class="entry-meta">
3728 <span class="post-format">
3729 @@ -44,18 +44,22 @@
3730 <div class="entry-content">
3731 <?php
3732 /* translators: %s: Name of current post */
3733 - the_content( sprintf(
3734 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3735 - the_title( '<span class="screen-reader-text">', '</span>', false )
3736 - ) );
3737 -
3738 - wp_link_pages( array(
3739 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3740 - 'after' => '</div>',
3741 - 'link_before' => '<span>',
3742 - 'link_after' => '</span>',
3743 - ) );
3744 - ?>
3745 + the_content(
3746 + sprintf(
3747 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3748 + the_title( '<span class="screen-reader-text">', '</span>', false )
3749 + )
3750 + );
3751 +
3752 + wp_link_pages(
3753 + array(
3754 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3755 + 'after' => '</div>',
3756 + 'link_before' => '<span>',
3757 + 'link_after' => '</span>',
3758 + )
3759 + );
3760 + ?>
3761 </div><!-- .entry-content -->
3762
3763 <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
3764
3765 diff --git a/themes/twentyfourteen/content-link.php b/themes/twentyfourteen/content-link.php
3766 index 858301ef..9ad08102 100644
3767 --- a/themes/twentyfourteen/content-link.php
3768 +++ b/themes/twentyfourteen/content-link.php
3769 @@ -16,15 +16,15 @@
3770 <div class="entry-meta">
3771 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
3772 </div><!-- .entry-meta -->
3773 - <?php
3774 + <?php
3775 endif;
3776
3777 - if ( is_single() ) :
3778 - the_title( '<h1 class="entry-title">', '</h1>' );
3779 + if ( is_single() ) :
3780 + the_title( '<h1 class="entry-title">', '</h1>' );
3781 else :
3782 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
3783 endif;
3784 - ?>
3785 + ?>
3786
3787 <div class="entry-meta">
3788 <span class="post-format">
3789 @@ -44,18 +44,22 @@
3790 <div class="entry-content">
3791 <?php
3792 /* translators: %s: Name of current post */
3793 - the_content( sprintf(
3794 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3795 - the_title( '<span class="screen-reader-text">', '</span>', false )
3796 - ) );
3797 -
3798 - wp_link_pages( array(
3799 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3800 - 'after' => '</div>',
3801 - 'link_before' => '<span>',
3802 - 'link_after' => '</span>',
3803 - ) );
3804 - ?>
3805 + the_content(
3806 + sprintf(
3807 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3808 + the_title( '<span class="screen-reader-text">', '</span>', false )
3809 + )
3810 + );
3811 +
3812 + wp_link_pages(
3813 + array(
3814 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3815 + 'after' => '</div>',
3816 + 'link_before' => '<span>',
3817 + 'link_after' => '</span>',
3818 + )
3819 + );
3820 + ?>
3821 </div><!-- .entry-content -->
3822
3823 <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
3824
3825 diff --git a/themes/twentyfourteen/content-none.php b/themes/twentyfourteen/content-none.php
3826 index a83e06ee..a97f84c8 100644
3827 --- a/themes/twentyfourteen/content-none.php
3828 +++ b/themes/twentyfourteen/content-none.php
3829 @@ -20,12 +20,12 @@
3830 <?php elseif ( is_search() ) : ?>
3831
3832 <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p>
3833 - <?php get_search_form(); ?>
3834 + <?php get_search_form(); ?>
3835
3836 <?php else : ?>
3837
3838 <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
3839 - <?php get_search_form(); ?>
3840 + <?php get_search_form(); ?>
3841
3842 <?php endif; ?>
3843 </div><!-- .page-content -->
3844
3845 diff --git a/themes/twentyfourteen/content-page.php b/themes/twentyfourteen/content-page.php
3846 index 98394190..ca8ebd9b 100644
3847 --- a/themes/twentyfourteen/content-page.php
3848 +++ b/themes/twentyfourteen/content-page.php
3849 @@ -18,14 +18,16 @@
3850 <div class="entry-content">
3851 <?php
3852 the_content();
3853 - wp_link_pages( array(
3854 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3855 - 'after' => '</div>',
3856 - 'link_before' => '<span>',
3857 - 'link_after' => '</span>',
3858 - ) );
3859 + wp_link_pages(
3860 + array(
3861 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3862 + 'after' => '</div>',
3863 + 'link_before' => '<span>',
3864 + 'link_after' => '</span>',
3865 + )
3866 + );
3867
3868 edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
3869 - ?>
3870 + ?>
3871 </div><!-- .entry-content -->
3872 </article><!-- #post-## -->
3873
3874 diff --git a/themes/twentyfourteen/content-quote.php b/themes/twentyfourteen/content-quote.php
3875 index 10a5d112..70319087 100644
3876 --- a/themes/twentyfourteen/content-quote.php
3877 +++ b/themes/twentyfourteen/content-quote.php
3878 @@ -16,15 +16,15 @@
3879 <div class="entry-meta">
3880 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
3881 </div><!-- .entry-meta -->
3882 - <?php
3883 + <?php
3884 endif;
3885
3886 - if ( is_single() ) :
3887 - the_title( '<h1 class="entry-title">', '</h1>' );
3888 + if ( is_single() ) :
3889 + the_title( '<h1 class="entry-title">', '</h1>' );
3890 else :
3891 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
3892 endif;
3893 - ?>
3894 + ?>
3895
3896 <div class="entry-meta">
3897 <span class="post-format">
3898 @@ -44,18 +44,22 @@
3899 <div class="entry-content">
3900 <?php
3901 /* translators: %s: Name of current post */
3902 - the_content( sprintf(
3903 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3904 - the_title( '<span class="screen-reader-text">', '</span>', false )
3905 - ) );
3906 -
3907 - wp_link_pages( array(
3908 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3909 - 'after' => '</div>',
3910 - 'link_before' => '<span>',
3911 - 'link_after' => '</span>',
3912 - ) );
3913 - ?>
3914 + the_content(
3915 + sprintf(
3916 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3917 + the_title( '<span class="screen-reader-text">', '</span>', false )
3918 + )
3919 + );
3920 +
3921 + wp_link_pages(
3922 + array(
3923 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3924 + 'after' => '</div>',
3925 + 'link_before' => '<span>',
3926 + 'link_after' => '</span>',
3927 + )
3928 + );
3929 + ?>
3930 </div><!-- .entry-content -->
3931
3932 <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
3933
3934 diff --git a/themes/twentyfourteen/content-video.php b/themes/twentyfourteen/content-video.php
3935 index 4c49aaa1..c13d6700 100644
3936 --- a/themes/twentyfourteen/content-video.php
3937 +++ b/themes/twentyfourteen/content-video.php
3938 @@ -16,15 +16,15 @@
3939 <div class="entry-meta">
3940 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
3941 </div><!-- .entry-meta -->
3942 - <?php
3943 + <?php
3944 endif;
3945
3946 - if ( is_single() ) :
3947 - the_title( '<h1 class="entry-title">', '</h1>' );
3948 + if ( is_single() ) :
3949 + the_title( '<h1 class="entry-title">', '</h1>' );
3950 else :
3951 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
3952 endif;
3953 - ?>
3954 + ?>
3955
3956 <div class="entry-meta">
3957 <span class="post-format">
3958 @@ -44,18 +44,22 @@
3959 <div class="entry-content">
3960 <?php
3961 /* translators: %s: Name of current post */
3962 - the_content( sprintf(
3963 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3964 - the_title( '<span class="screen-reader-text">', '</span>', false )
3965 - ) );
3966 -
3967 - wp_link_pages( array(
3968 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3969 - 'after' => '</div>',
3970 - 'link_before' => '<span>',
3971 - 'link_after' => '</span>',
3972 - ) );
3973 - ?>
3974 + the_content(
3975 + sprintf(
3976 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
3977 + the_title( '<span class="screen-reader-text">', '</span>', false )
3978 + )
3979 + );
3980 +
3981 + wp_link_pages(
3982 + array(
3983 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
3984 + 'after' => '</div>',
3985 + 'link_before' => '<span>',
3986 + 'link_after' => '</span>',
3987 + )
3988 + );
3989 + ?>
3990 </div><!-- .entry-content -->
3991
3992 <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
3993
3994 diff --git a/themes/twentyfourteen/content.php b/themes/twentyfourteen/content.php
3995 index e571d8b3..367cf337 100644
3996 --- a/themes/twentyfourteen/content.php
3997 +++ b/themes/twentyfourteen/content.php
3998 @@ -18,25 +18,26 @@
3999 <div class="entry-meta">
4000 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
4001 </div>
4002 - <?php
4003 + <?php
4004 endif;
4005
4006 - if ( is_single() ) :
4007 - the_title( '<h1 class="entry-title">', '</h1>' );
4008 + if ( is_single() ) :
4009 + the_title( '<h1 class="entry-title">', '</h1>' );
4010 else :
4011 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
4012 endif;
4013 - ?>
4014 + ?>
4015
4016 <div class="entry-meta">
4017 <?php
4018 - if ( 'post' == get_post_type() )
4019 - twentyfourteen_posted_on();
4020 + if ( 'post' == get_post_type() ) {
4021 + twentyfourteen_posted_on();
4022 + }
4023
4024 - if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
4025 - ?>
4026 + if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
4027 + ?>
4028 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
4029 - <?php
4030 + <?php
4031 endif;
4032
4033 edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
4034 @@ -52,17 +53,21 @@
4035 <div class="entry-content">
4036 <?php
4037 /* translators: %s: Name of current post */
4038 - the_content( sprintf(
4039 - __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
4040 - the_title( '<span class="screen-reader-text">', '</span>', false )
4041 - ) );
4042 + the_content(
4043 + sprintf(
4044 + __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
4045 + the_title( '<span class="screen-reader-text">', '</span>', false )
4046 + )
4047 + );
4048
4049 - wp_link_pages( array(
4050 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
4051 - 'after' => '</div>',
4052 - 'link_before' => '<span>',
4053 - 'link_after' => '</span>',
4054 - ) );
4055 + wp_link_pages(
4056 + array(
4057 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
4058 + 'after' => '</div>',
4059 + 'link_before' => '<span>',
4060 + 'link_after' => '</span>',
4061 + )
4062 + );
4063 ?>
4064 </div><!-- .entry-content -->
4065 <?php endif; ?>
4066
4067 diff --git a/themes/twentyfourteen/css/blocks.css b/themes/twentyfourteen/css/blocks.css
4068 index 425c8dbc..e0f0e231 100644
4069 --- a/themes/twentyfourteen/css/blocks.css
4070 +++ b/themes/twentyfourteen/css/blocks.css
4071 @@ -139,7 +139,6 @@ p.has-drop-cap:not(:focus)::first-letter {
4072 .wp-block-file .wp-block-file__button {
4073 background-color: #24890d;
4074 border: 0;
4075 - border-radius: 2px;
4076 color: #fff;
4077 font-size: 12px;
4078 font-weight: 700;
4079 @@ -221,12 +220,11 @@ p.has-drop-cap:not(:focus)::first-letter {
4080 /* Buttons */
4081
4082 .wp-block-button .wp-block-button__link {
4083 - border: 0;
4084 - border-radius: 2px;
4085 font-size: 12px;
4086 font-weight: 700;
4087 line-height: 15px;
4088 padding: 10px 30px 11px;
4089 + text-decoration: none;
4090 text-transform: uppercase;
4091 vertical-align: bottom;
4092 }
4093 @@ -236,8 +234,14 @@ p.has-drop-cap:not(:focus)::first-letter {
4094 color: #fff;
4095 }
4096
4097 +.is-style-outline .wp-block-button__link:not(.has-text-color) {
4098 + color: #24890d;
4099 +}
4100 +
4101 .wp-block-button__link:hover,
4102 -.wp-block-button__link:focus {
4103 +.wp-block-button__link:focus,
4104 +.is-style-outline .wp-block-button__link:not(.has-text-color):hover,
4105 +.is-style-outline .wp-block-button__link:not(.has-text-color):focus {
4106 background-color: #41a62a;
4107 color: #fff;
4108 }
4109
4110 diff --git a/themes/twentyfourteen/css/editor-blocks.css b/themes/twentyfourteen/css/editor-blocks.css
4111 index e8fba395..079896cb 100644
4112 --- a/themes/twentyfourteen/css/editor-blocks.css
4113 +++ b/themes/twentyfourteen/css/editor-blocks.css
4114 @@ -389,10 +389,6 @@ p.has-drop-cap:not(:focus)::first-letter {
4115 /* Buttons */
4116
4117 .wp-block-button .wp-block-button__link {
4118 - background-color: #24890d;
4119 - border: 0;
4120 - border-radius: 2px;
4121 - color: #fff;
4122 font-size: 12px;
4123 font-weight: 700;
4124 padding: 10px 30px 11px;
4125 @@ -400,6 +396,15 @@ p.has-drop-cap:not(:focus)::first-letter {
4126 vertical-align: bottom;
4127 }
4128
4129 +.wp-block-button__link {
4130 + background-color: #24890d;
4131 + color: #fff;
4132 +}
4133 +
4134 +.is-style-outline .wp-block-button__link {
4135 + color: #24890d;
4136 +}
4137 +
4138 .editor-block-list__block .wp-block-button .mce-content-body {
4139 line-height: normal;
4140 }
4141
4142 diff --git a/themes/twentyfourteen/css/editor-style.css b/themes/twentyfourteen/css/editor-style.css
4143 index 6bd5ac0f..4c5482ad 100644
4144 --- a/themes/twentyfourteen/css/editor-style.css
4145 +++ b/themes/twentyfourteen/css/editor-style.css
4146 @@ -628,7 +628,6 @@ img {
4147 box-shadow: 1px 1px 1px rgba(0,0,0,.8);
4148 color: #000;
4149 height: 36px;
4150 - margin-left: -24px;
4151 width: 48px;
4152 }
4153
4154 @@ -637,7 +636,7 @@ img {
4155 content: '\f452';
4156 display: inline-block;
4157 font: normal 32px/1.125 Genericons;
4158 - position: absolute;
4159 + position: relative;
4160 top: 1px;
4161 left: 10px;
4162 }
4163
4164 diff --git a/themes/twentyfourteen/featured-content.php b/themes/twentyfourteen/featured-content.php
4165 index c56edf3e..f9f32dd3 100644
4166 --- a/themes/twentyfourteen/featured-content.php
4167 +++ b/themes/twentyfourteen/featured-content.php
4168 @@ -19,11 +19,11 @@
4169 do_action( 'twentyfourteen_featured_posts_before' );
4170
4171 $featured_posts = twentyfourteen_get_featured_posts();
4172 - foreach ( (array) $featured_posts as $order => $post ) :
4173 - setup_postdata( $post );
4174 + foreach ( (array) $featured_posts as $order => $post ) :
4175 + setup_postdata( $post );
4176
4177 - // Include the featured content template.
4178 - get_template_part( 'content', 'featured-post' );
4179 + // Include the featured content template.
4180 + get_template_part( 'content', 'featured-post' );
4181 endforeach;
4182
4183 /**
4184
4185 diff --git a/themes/twentyfourteen/footer.php b/themes/twentyfourteen/footer.php
4186 index 066fa385..d1016eb9 100644
4187 --- a/themes/twentyfourteen/footer.php
4188 +++ b/themes/twentyfourteen/footer.php
4189 @@ -32,4 +32,4 @@
4190
4191 <?php wp_footer(); ?>
4192 </body>
4193 -</html>
4194 \ No newline at end of file
4195 +</html>
4196
4197 diff --git a/themes/twentyfourteen/functions.php b/themes/twentyfourteen/functions.php
4198 index 3babfeb1..e705a546 100644
4199 --- a/themes/twentyfourteen/functions.php
4200 +++ b/themes/twentyfourteen/functions.php
4201 @@ -44,122 +44,152 @@ if ( version_compare( $GLOBALS['wp_version'], '3.6', '<' ) ) {
4202 }
4203
4204 if ( ! function_exists( 'twentyfourteen_setup' ) ) :
4205 -/**
4206 - * Twenty Fourteen setup.
4207 - *
4208 - * Set up theme defaults and registers support for various WordPress features.
4209 - *
4210 - * Note that this function is hooked into the after_setup_theme hook, which
4211 - * runs before the init hook. The init hook is too late for some features, such
4212 - * as indicating support post thumbnails.
4213 - *
4214 - * @since Twenty Fourteen 1.0
4215 - */
4216 -function twentyfourteen_setup() {
4217 -
4218 - /*
4219 - * Make Twenty Fourteen available for translation.
4220 + /**
4221 + * Twenty Fourteen setup.
4222 *
4223 - * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfourteen
4224 - * If you're building a theme based on Twenty Fourteen, use a find and
4225 - * replace to change 'twentyfourteen' to the name of your theme in all
4226 - * template files.
4227 + * Set up theme defaults and registers support for various WordPress features.
4228 + *
4229 + * Note that this function is hooked into the after_setup_theme hook, which
4230 + * runs before the init hook. The init hook is too late for some features, such
4231 + * as indicating support post thumbnails.
4232 + *
4233 + * @since Twenty Fourteen 1.0
4234 */
4235 - load_theme_textdomain( 'twentyfourteen' );
4236 + function twentyfourteen_setup() {
4237 +
4238 + /*
4239 + * Make Twenty Fourteen available for translation.
4240 + *
4241 + * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfourteen
4242 + * If you're building a theme based on Twenty Fourteen, use a find and
4243 + * replace to change 'twentyfourteen' to the name of your theme in all
4244 + * template files.
4245 + */
4246 + load_theme_textdomain( 'twentyfourteen' );
4247 +
4248 + // This theme styles the visual editor to resemble the theme style.
4249 + add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) );
4250 +
4251 + // Load regular editor styles into the new block-based editor.
4252 + add_theme_support( 'editor-styles' );
4253 +
4254 + // Load default block styles.
4255 + add_theme_support( 'wp-block-styles' );
4256 +
4257 + // Add support for responsive embeds.
4258 + add_theme_support( 'responsive-embeds' );
4259 +
4260 + // Add support for custom color scheme.
4261 + add_theme_support(
4262 + 'editor-color-palette',
4263 + array(
4264 + array(
4265 + 'name' => __( 'Green', 'twentyfourteen' ),
4266 + 'slug' => 'green',
4267 + 'color' => '#24890d',
4268 + ),
4269 + array(
4270 + 'name' => __( 'Black', 'twentyfourteen' ),
4271 + 'slug' => 'black',
4272 + 'color' => '#000',
4273 + ),
4274 + array(
4275 + 'name' => __( 'Dark Gray', 'twentyfourteen' ),
4276 + 'slug' => 'dark-gray',
4277 + 'color' => '#2b2b2b',
4278 + ),
4279 + array(
4280 + 'name' => __( 'Medium Gray', 'twentyfourteen' ),
4281 + 'slug' => 'medium-gray',
4282 + 'color' => '#767676',
4283 + ),
4284 + array(
4285 + 'name' => __( 'Light Gray', 'twentyfourteen' ),
4286 + 'slug' => 'light-gray',
4287 + 'color' => '#f5f5f5',
4288 + ),
4289 + array(
4290 + 'name' => __( 'White', 'twentyfourteen' ),
4291 + 'slug' => 'white',
4292 + 'color' => '#fff',
4293 + ),
4294 + )
4295 + );
4296
4297 - // This theme styles the visual editor to resemble the theme style.
4298 - add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) );
4299 + // Add RSS feed links to <head> for posts and comments.
4300 + add_theme_support( 'automatic-feed-links' );
4301
4302 - // Load regular editor styles into the new block-based editor.
4303 - add_theme_support( 'editor-styles' );
4304 + // Enable support for Post Thumbnails, and declare two sizes.
4305 + add_theme_support( 'post-thumbnails' );
4306 + set_post_thumbnail_size( 672, 372, true );
4307 + add_image_size( 'twentyfourteen-full-width', 1038, 576, true );
4308
4309 - // Load default block styles.
4310 - add_theme_support( 'wp-block-styles' );
4311 + // This theme uses wp_nav_menu() in two locations.
4312 + register_nav_menus(
4313 + array(
4314 + 'primary' => __( 'Top primary menu', 'twentyfourteen' ),
4315 + 'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ),
4316 + )
4317 + );
4318
4319 - // Add support for responsive embeds.
4320 - add_theme_support( 'responsive-embeds' );
4321 + /*
4322 + * Switch default core markup for search form, comment form, and comments
4323 + * to output valid HTML5.
4324 + */
4325 + add_theme_support(
4326 + 'html5',
4327 + array(
4328 + 'search-form',
4329 + 'comment-form',
4330 + 'comment-list',
4331 + 'gallery',
4332 + 'caption',
4333 + )
4334 + );
4335
4336 - // Add support for custom color scheme.
4337 - add_theme_support( 'editor-color-palette', array(
4338 - array(
4339 - 'name' => __( 'Green', 'twentyfourteen' ),
4340 - 'slug' => 'green',
4341 - 'color' => '#24890d',
4342 - ),
4343 - array(
4344 - 'name' => __( 'Black', 'twentyfourteen' ),
4345 - 'slug' => 'black',
4346 - 'color' => '#000',
4347 - ),
4348 - array(
4349 - 'name' => __( 'Dark Gray', 'twentyfourteen' ),
4350 - 'slug' => 'dark-gray',
4351 - 'color' => '#2b2b2b',
4352 - ),
4353 - array(
4354 - 'name' => __( 'Medium Gray', 'twentyfourteen' ),
4355 - 'slug' => 'medium-gray',
4356 - 'color' => '#767676',
4357 - ),
4358 - array(
4359 - 'name' => __( 'Light Gray', 'twentyfourteen' ),
4360 - 'slug' => 'light-gray',
4361 - 'color' => '#f5f5f5',
4362 - ),
4363 - array(
4364 - 'name' => __( 'White', 'twentyfourteen' ),
4365 - 'slug' => 'white',
4366 - 'color' => '#fff',
4367 - ),
4368 - ) );
4369 -
4370 - // Add RSS feed links to <head> for posts and comments.
4371 - add_theme_support( 'automatic-feed-links' );
4372 -
4373 - // Enable support for Post Thumbnails, and declare two sizes.
4374 - add_theme_support( 'post-thumbnails' );
4375 - set_post_thumbnail_size( 672, 372, true );
4376 - add_image_size( 'twentyfourteen-full-width', 1038, 576, true );
4377 -
4378 - // This theme uses wp_nav_menu() in two locations.
4379 - register_nav_menus( array(
4380 - 'primary' => __( 'Top primary menu', 'twentyfourteen' ),
4381 - 'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ),
4382 - ) );
4383 + /*
4384 + * Enable support for Post Formats.
4385 + * See https://codex.wordpress.org/Post_Formats
4386 + */
4387 + add_theme_support(
4388 + 'post-formats',
4389 + array(
4390 + 'aside',
4391 + 'image',
4392 + 'video',
4393 + 'audio',
4394 + 'quote',
4395 + 'link',
4396 + 'gallery',
4397 + )
4398 + );
4399
4400 - /*
4401 - * Switch default core markup for search form, comment form, and comments
4402 - * to output valid HTML5.
4403 - */
4404 - add_theme_support( 'html5', array(
4405 - 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
4406 - ) );
4407 + // This theme allows users to set a custom background.
4408 + add_theme_support(
4409 + 'custom-background',
4410 + apply_filters(
4411 + 'twentyfourteen_custom_background_args',
4412 + array(
4413 + 'default-color' => 'f5f5f5',
4414 + )
4415 + )
4416 + );
4417
4418 - /*
4419 - * Enable support for Post Formats.
4420 - * See https://codex.wordpress.org/Post_Formats
4421 - */
4422 - add_theme_support( 'post-formats', array(
4423 - 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery',
4424 - ) );
4425 -
4426 - // This theme allows users to set a custom background.
4427 - add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array(
4428 - 'default-color' => 'f5f5f5',
4429 - ) ) );
4430 -
4431 - // Add support for featured content.
4432 - add_theme_support( 'featured-content', array(
4433 - 'featured_content_filter' => 'twentyfourteen_get_featured_posts',
4434 - 'max_posts' => 6,
4435 - ) );
4436 -
4437 - // This theme uses its own gallery styles.
4438 - add_filter( 'use_default_gallery_style', '__return_false' );
4439 -
4440 - // Indicate widget sidebars can use selective refresh in the Customizer.
4441 - add_theme_support( 'customize-selective-refresh-widgets' );
4442 -}
4443 + // Add support for featured content.
4444 + add_theme_support(
4445 + 'featured-content',
4446 + array(
4447 + 'featured_content_filter' => 'twentyfourteen_get_featured_posts',
4448 + 'max_posts' => 6,
4449 + )
4450 + );
4451 +
4452 + // This theme uses its own gallery styles.
4453 + add_filter( 'use_default_gallery_style', '__return_false' );
4454 +
4455 + // Indicate widget sidebars can use selective refresh in the Customizer.
4456 + add_theme_support( 'customize-selective-refresh-widgets' );
4457 + }
4458 endif; // twentyfourteen_setup
4459 add_action( 'after_setup_theme', 'twentyfourteen_setup' );
4460
4461 @@ -213,33 +243,39 @@ function twentyfourteen_widgets_init() {
4462 require get_template_directory() . '/inc/widgets.php';
4463 register_widget( 'Twenty_Fourteen_Ephemera_Widget' );
4464
4465 - register_sidebar( array(
4466 - 'name' => __( 'Primary Sidebar', 'twentyfourteen' ),
4467 - 'id' => 'sidebar-1',
4468 - 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
4469 - 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
4470 - 'after_widget' => '</aside>',
4471 - 'before_title' => '<h1 class="widget-title">',
4472 - 'after_title' => '</h1>',
4473 - ) );
4474 - register_sidebar( array(
4475 - 'name' => __( 'Content Sidebar', 'twentyfourteen' ),
4476 - 'id' => 'sidebar-2',
4477 - 'description' => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ),
4478 - 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
4479 - 'after_widget' => '</aside>',
4480 - 'before_title' => '<h1 class="widget-title">',
4481 - 'after_title' => '</h1>',
4482 - ) );
4483 - register_sidebar( array(
4484 - 'name' => __( 'Footer Widget Area', 'twentyfourteen' ),
4485 - 'id' => 'sidebar-3',
4486 - 'description' => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),
4487 - 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
4488 - 'after_widget' => '</aside>',
4489 - 'before_title' => '<h1 class="widget-title">',
4490 - 'after_title' => '</h1>',
4491 - ) );
4492 + register_sidebar(
4493 + array(
4494 + 'name' => __( 'Primary Sidebar', 'twentyfourteen' ),
4495 + 'id' => 'sidebar-1',
4496 + 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
4497 + 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
4498 + 'after_widget' => '</aside>',
4499 + 'before_title' => '<h1 class="widget-title">',
4500 + 'after_title' => '</h1>',
4501 + )
4502 + );
4503 + register_sidebar(
4504 + array(
4505 + 'name' => __( 'Content Sidebar', 'twentyfourteen' ),
4506 + 'id' => 'sidebar-2',
4507 + 'description' => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ),
4508 + 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
4509 + 'after_widget' => '</aside>',
4510 + 'before_title' => '<h1 class="widget-title">',
4511 + 'after_title' => '</h1>',
4512 + )
4513 + );
4514 + register_sidebar(
4515 + array(
4516 + 'name' => __( 'Footer Widget Area', 'twentyfourteen' ),
4517 + 'id' => 'sidebar-3',
4518 + 'description' => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),
4519 + 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
4520 + 'after_widget' => '</aside>',
4521 + 'before_title' => '<h1 class="widget-title">',
4522 + 'after_title' => '</h1>',
4523 + )
4524 + );
4525 }
4526 add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
4527
4528 @@ -261,7 +297,7 @@ function twentyfourteen_font_url() {
4529 'family' => urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ),
4530 'subset' => urlencode( 'latin,latin-ext' ),
4531 );
4532 - $font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
4533 + $font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
4534 }
4535
4536 return $font_url;
4537 @@ -283,7 +319,7 @@ function twentyfourteen_scripts() {
4538 wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri() );
4539
4540 // Theme block stylesheet.
4541 - wp_enqueue_style( 'twentyfourteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfourteen-style' ), '20181018' );
4542 + wp_enqueue_style( 'twentyfourteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfourteen-style' ), '20181230' );
4543
4544 // Load the Internet Explorer specific stylesheet.
4545 wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131205' );
4546 @@ -303,10 +339,14 @@ function twentyfourteen_scripts() {
4547
4548 if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) {
4549 wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131205', true );
4550 - wp_localize_script( 'twentyfourteen-slider', 'featuredSliderDefaults', array(
4551 - 'prevText' => __( 'Previous', 'twentyfourteen' ),
4552 - 'nextText' => __( 'Next', 'twentyfourteen' )
4553 - ) );
4554 + wp_localize_script(
4555 + 'twentyfourteen-slider',
4556 + 'featuredSliderDefaults',
4557 + array(
4558 + 'prevText' => __( 'Previous', 'twentyfourteen' ),
4559 + 'nextText' => __( 'Next', 'twentyfourteen' ),
4560 + )
4561 + );
4562 }
4563
4564 wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150315', true );
4565 @@ -355,103 +395,106 @@ add_filter( 'wp_resource_hints', 'twentyfourteen_resource_hints', 10, 2 );
4566 */
4567 function twentyfourteen_block_editor_styles() {
4568 // Block styles.
4569 - wp_enqueue_style( 'twentyfourteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
4570 + wp_enqueue_style( 'twentyfourteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20181230' );
4571 // Add custom fonts.
4572 wp_enqueue_style( 'twentyfourteen-fonts', twentyfourteen_font_url(), array(), null );
4573 }
4574 add_action( 'enqueue_block_editor_assets', 'twentyfourteen_block_editor_styles' );
4575
4576 if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) :
4577 -/**
4578 - * Print the attached image with a link to the next attached image.
4579 - *
4580 - * @since Twenty Fourteen 1.0
4581 - */
4582 -function twentyfourteen_the_attached_image() {
4583 - $post = get_post();
4584 /**
4585 - * Filter the default Twenty Fourteen attachment size.
4586 + * Print the attached image with a link to the next attached image.
4587 *
4588 * @since Twenty Fourteen 1.0
4589 - *
4590 - * @param array $dimensions {
4591 - * An array of height and width dimensions.
4592 - *
4593 - * @type int $height Height of the image in pixels. Default 810.
4594 - * @type int $width Width of the image in pixels. Default 810.
4595 - * }
4596 */
4597 - $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 810, 810 ) );
4598 - $next_attachment_url = wp_get_attachment_url();
4599 + function twentyfourteen_the_attached_image() {
4600 + $post = get_post();
4601 + /**
4602 + * Filter the default Twenty Fourteen attachment size.
4603 + *
4604 + * @since Twenty Fourteen 1.0
4605 + *
4606 + * @param array $dimensions {
4607 + * An array of height and width dimensions.
4608 + *
4609 + * @type int $height Height of the image in pixels. Default 810.
4610 + * @type int $width Width of the image in pixels. Default 810.
4611 + * }
4612 + */
4613 + $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 810, 810 ) );
4614 + $next_attachment_url = wp_get_attachment_url();
4615 +
4616 + /*
4617 + * Grab the IDs of all the image attachments in a gallery so we can get the URL
4618 + * of the next adjacent image in a gallery, or the first image (if we're
4619 + * looking at the last image in a gallery), or, in a gallery of one, just the
4620 + * link to that image file.
4621 + */
4622 + $attachment_ids = get_posts(
4623 + array(
4624 + 'post_parent' => $post->post_parent,
4625 + 'fields' => 'ids',
4626 + 'numberposts' => -1,
4627 + 'post_status' => 'inherit',
4628 + 'post_type' => 'attachment',
4629 + 'post_mime_type' => 'image',
4630 + 'order' => 'ASC',
4631 + 'orderby' => 'menu_order ID',
4632 + )
4633 + );
4634
4635 - /*
4636 - * Grab the IDs of all the image attachments in a gallery so we can get the URL
4637 - * of the next adjacent image in a gallery, or the first image (if we're
4638 - * looking at the last image in a gallery), or, in a gallery of one, just the
4639 - * link to that image file.
4640 - */
4641 - $attachment_ids = get_posts( array(
4642 - 'post_parent' => $post->post_parent,
4643 - 'fields' => 'ids',
4644 - 'numberposts' => -1,
4645 - 'post_status' => 'inherit',
4646 - 'post_type' => 'attachment',
4647 - 'post_mime_type' => 'image',
4648 - 'order' => 'ASC',
4649 - 'orderby' => 'menu_order ID',
4650 - ) );
4651 -
4652 - // If there is more than 1 attachment in a gallery...
4653 - if ( count( $attachment_ids ) > 1 ) {
4654 - foreach ( $attachment_ids as $idx => $attachment_id ) {
4655 - if ( $attachment_id == $post->ID ) {
4656 - $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ];
4657 - break;
4658 + // If there is more than 1 attachment in a gallery...
4659 + if ( count( $attachment_ids ) > 1 ) {
4660 + foreach ( $attachment_ids as $idx => $attachment_id ) {
4661 + if ( $attachment_id == $post->ID ) {
4662 + $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ];
4663 + break;
4664 + }
4665 }
4666 - }
4667
4668 - // get the URL of the next image attachment...
4669 - if ( $next_id ) {
4670 - $next_attachment_url = get_attachment_link( $next_id );
4671 + // get the URL of the next image attachment...
4672 + if ( $next_id ) {
4673 + $next_attachment_url = get_attachment_link( $next_id );
4674 + } else {
4675 + // or get the URL of the first image attachment.
4676 + $next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
4677 + }
4678 }
4679
4680 - // or get the URL of the first image attachment.
4681 - else {
4682 - $next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
4683 - }
4684 + printf(
4685 + '<a href="%1$s" rel="attachment">%2$s</a>',
4686 + esc_url( $next_attachment_url ),
4687 + wp_get_attachment_image( $post->ID, $attachment_size )
4688 + );
4689 }
4690 -
4691 - printf( '<a href="%1$s" rel="attachment">%2$s</a>',
4692 - esc_url( $next_attachment_url ),
4693 - wp_get_attachment_image( $post->ID, $attachment_size )
4694 - );
4695 -}
4696 endif;
4697
4698 if ( ! function_exists( 'twentyfourteen_list_authors' ) ) :
4699 -/**
4700 - * Print a list of all site contributors who published at least one post.
4701 - *
4702 - * @since Twenty Fourteen 1.0
4703 - */
4704 -function twentyfourteen_list_authors() {
4705 - $contributor_ids = get_users( array(
4706 - 'fields' => 'ID',
4707 - 'orderby' => 'post_count',
4708 - 'order' => 'DESC',
4709 - 'who' => 'authors',
4710 - ) );
4711 -
4712 - foreach ( $contributor_ids as $contributor_id ) :
4713 - $post_count = count_user_posts( $contributor_id );
4714 -
4715 - // Move on if user has not published a post (yet).
4716 - if ( ! $post_count ) {
4717 - continue;
4718 - }
4719 - ?>
4720 + /**
4721 + * Print a list of all site contributors who published at least one post.
4722 + *
4723 + * @since Twenty Fourteen 1.0
4724 + */
4725 + function twentyfourteen_list_authors() {
4726 + $contributor_ids = get_users(
4727 + array(
4728 + 'fields' => 'ID',
4729 + 'orderby' => 'post_count',
4730 + 'order' => 'DESC',
4731 + 'who' => 'authors',
4732 + )
4733 + );
4734 +
4735 + foreach ( $contributor_ids as $contributor_id ) :
4736 + $post_count = count_user_posts( $contributor_id );
4737 +
4738 + // Move on if user has not published a post (yet).
4739 + if ( ! $post_count ) {
4740 + continue;
4741 + }
4742 + ?>
4743
4744 - <div class="contributor">
4745 + <div class="contributor">
4746 <div class="contributor-info">
4747 <div class="contributor-avatar"><?php echo get_avatar( $contributor_id, 132 ); ?></div>
4748 <div class="contributor-summary">
4749 @@ -466,9 +509,9 @@ function twentyfourteen_list_authors() {
4750 </div><!-- .contributor-info -->
4751 </div><!-- .contributor -->
4752
4753 - <?php
4754 + <?php
4755 endforeach;
4756 -}
4757 + }
4758 endif;
4759
4760 /**
4761 @@ -633,9 +676,9 @@ if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow
4762 * `is_customize_preview` function was introduced.
4763 */
4764 if ( ! function_exists( 'is_customize_preview' ) ) :
4765 -function is_customize_preview() {
4766 - global $wp_customize;
4767 + function is_customize_preview() {
4768 + global $wp_customize;
4769
4770 - return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview();
4771 -}
4772 + return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview();
4773 + }
4774 endif;
4775
4776 diff --git a/themes/twentyfourteen/header.php b/themes/twentyfourteen/header.php
4777 index 7286d889..1de76b34 100644
4778 --- a/themes/twentyfourteen/header.php
4779 +++ b/themes/twentyfourteen/header.php
4780 @@ -23,7 +23,7 @@
4781 <meta name="viewport" content="width=device-width">
4782 <title><?php wp_title( '|', true, 'right' ); ?></title>
4783 <link rel="profile" href="http://gmpg.org/xfn/11">
4784 - <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
4785 + <link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
4786 <!--[if lt IE 9]>
4787 <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
4788 <![endif]-->
4789 @@ -51,7 +51,15 @@
4790 <nav id="primary-navigation" class="site-navigation primary-navigation" role="navigation">
4791 <button class="menu-toggle"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></button>
4792 <a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a>
4793 - <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu' ) ); ?>
4794 + <?php
4795 + wp_nav_menu(
4796 + array(
4797 + 'theme_location' => 'primary',
4798 + 'menu_class' => 'nav-menu',
4799 + 'menu_id' => 'primary-menu',
4800 + )
4801 + );
4802 + ?>
4803 </nav>
4804 </div>
4805
4806
4807 diff --git a/themes/twentyfourteen/image.php b/themes/twentyfourteen/image.php
4808 index 83ac67f6..f0af8b83 100644
4809 --- a/themes/twentyfourteen/image.php
4810 +++ b/themes/twentyfourteen/image.php
4811 @@ -18,45 +18,48 @@ get_header();
4812
4813 <?php
4814 // Start the Loop.
4815 - while ( have_posts() ) : the_post();
4816 - ?>
4817 - <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
4818 - <header class="entry-header">
4819 - <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
4820 + while ( have_posts() ) :
4821 + the_post();
4822 + ?>
4823 + <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
4824 + <header class="entry-header">
4825 + <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
4826
4827 - <div class="entry-meta">
4828 + <div class="entry-meta">
4829
4830 - <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>
4831 + <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>
4832
4833 - <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>
4834 + <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>
4835
4836 - <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>
4837 - <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
4838 - </div><!-- .entry-meta -->
4839 - </header><!-- .entry-header -->
4840 + <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>
4841 + <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
4842 + </div><!-- .entry-meta -->
4843 + </header><!-- .entry-header -->
4844
4845 - <div class="entry-content">
4846 - <div class="entry-attachment">
4847 - <div class="attachment">
4848 - <?php twentyfourteen_the_attached_image(); ?>
4849 - </div><!-- .attachment -->
4850 + <div class="entry-content">
4851 + <div class="entry-attachment">
4852 + <div class="attachment">
4853 + <?php twentyfourteen_the_attached_image(); ?>
4854 + </div><!-- .attachment -->
4855
4856 - <?php if ( has_excerpt() ) : ?>
4857 + <?php if ( has_excerpt() ) : ?>
4858 <div class="entry-caption">
4859 <?php the_excerpt(); ?>
4860 </div><!-- .entry-caption -->
4861 <?php endif; ?>
4862 - </div><!-- .entry-attachment -->
4863 + </div><!-- .entry-attachment -->
4864
4865 - <?php
4866 - the_content();
4867 - wp_link_pages( array(
4868 + <?php
4869 + the_content();
4870 + wp_link_pages(
4871 + array(
4872 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
4873 'after' => '</div>',
4874 'link_before' => '<span>',
4875 'link_after' => '</span>',
4876 - ) );
4877 - ?>
4878 + )
4879 + );
4880 + ?>
4881 </div><!-- .entry-content -->
4882 </article><!-- #post-## -->
4883
4884
4885 diff --git a/themes/twentyfourteen/inc/back-compat.php b/themes/twentyfourteen/inc/back-compat.php
4886 index c184d912..0e8f34b5 100644
4887 --- a/themes/twentyfourteen/inc/back-compat.php
4888 +++ b/themes/twentyfourteen/inc/back-compat.php
4889 @@ -44,9 +44,13 @@ function twentyfourteen_upgrade_notice() {
4890 * @since Twenty Fourteen 1.0
4891 */
4892 function twentyfourteen_customize() {
4893 - 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(
4894 - 'back_link' => true,
4895 - ) );
4896 + wp_die(
4897 + sprintf( __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), $GLOBALS['wp_version'] ),
4898 + '',
4899 + array(
4900 + 'back_link' => true,
4901 + )
4902 + );
4903 }
4904 add_action( 'load-customize.php', 'twentyfourteen_customize' );
4905
4906
4907 diff --git a/themes/twentyfourteen/inc/custom-header.php b/themes/twentyfourteen/inc/custom-header.php
4908 index 287b1068..92382eaa 100644
4909 --- a/themes/twentyfourteen/inc/custom-header.php
4910 +++ b/themes/twentyfourteen/inc/custom-header.php
4911 @@ -35,69 +35,75 @@ function twentyfourteen_custom_header_setup() {
4912 * the Appearance > Header screen.
4913 * }
4914 */
4915 - add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array(
4916 - 'default-text-color' => 'fff',
4917 - 'width' => 1260,
4918 - 'height' => 240,
4919 - 'flex-height' => true,
4920 - 'wp-head-callback' => 'twentyfourteen_header_style',
4921 - 'admin-head-callback' => 'twentyfourteen_admin_header_style',
4922 - 'admin-preview-callback' => 'twentyfourteen_admin_header_image',
4923 - ) ) );
4924 + add_theme_support(
4925 + 'custom-header',
4926 + apply_filters(
4927 + 'twentyfourteen_custom_header_args',
4928 + array(
4929 + 'default-text-color' => 'fff',
4930 + 'width' => 1260,
4931 + 'height' => 240,
4932 + 'flex-height' => true,
4933 + 'wp-head-callback' => 'twentyfourteen_header_style',
4934 + 'admin-head-callback' => 'twentyfourteen_admin_header_style',
4935 + 'admin-preview-callback' => 'twentyfourteen_admin_header_image',
4936 + )
4937 + )
4938 + );
4939 }
4940 add_action( 'after_setup_theme', 'twentyfourteen_custom_header_setup' );
4941
4942 if ( ! function_exists( 'twentyfourteen_header_style' ) ) :
4943 -/**
4944 - * Styles the header image and text displayed on the blog
4945 - *
4946 - * @see twentyfourteen_custom_header_setup().
4947 - *
4948 - */
4949 -function twentyfourteen_header_style() {
4950 - $text_color = get_header_textcolor();
4951 + /**
4952 + * Styles the header image and text displayed on the blog
4953 + *
4954 + * @see twentyfourteen_custom_header_setup().
4955 + */
4956 + function twentyfourteen_header_style() {
4957 + $text_color = get_header_textcolor();
4958
4959 - // If no custom color for text is set, let's bail.
4960 - if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) )
4961 - return;
4962 + // If no custom color for text is set, let's bail.
4963 + if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) ) {
4964 + return;
4965 + }
4966
4967 - // If we get this far, we have custom styles.
4968 - ?>
4969 - <style type="text/css" id="twentyfourteen-header-css">
4970 - <?php
4971 + // If we get this far, we have custom styles.
4972 + ?>
4973 + <style type="text/css" id="twentyfourteen-header-css">
4974 + <?php
4975 // Has the text been hidden?
4976 if ( ! display_header_text() ) :
4977 - ?>
4978 + ?>
4979 .site-title,
4980 .site-description {
4981 clip: rect(1px 1px 1px 1px); /* IE7 */
4982 clip: rect(1px, 1px, 1px, 1px);
4983 position: absolute;
4984 }
4985 - <?php
4986 - // If the user has set a custom color for the text, use that.
4987 + <?php
4988 + // If the user has set a custom color for the text, use that.
4989 elseif ( $text_color != get_theme_support( 'custom-header', 'default-text-color' ) ) :
4990 - ?>
4991 + ?>
4992 .site-title a {
4993 color: #<?php echo esc_attr( $text_color ); ?>;
4994 }
4995 <?php endif; ?>
4996 </style>
4997 - <?php
4998 -}
4999 + <?php
5000 + }
5001 endif; // twentyfourteen_header_style
5002
5003
5004 if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) :
5005 -/**
5006 - * Style the header image displayed on the Appearance > Header screen.
5007 - *
5008 - * @see twentyfourteen_custom_header_setup()
5009 - *
5010 - * @since Twenty Fourteen 1.0
5011 - */
5012 -function twentyfourteen_admin_header_style() {
5013 -?>
5014 + /**
5015 + * Style the header image displayed on the Appearance > Header screen.
5016 + *
5017 + * @see twentyfourteen_custom_header_setup()
5018 + *
5019 + * @since Twenty Fourteen 1.0
5020 + */
5021 + function twentyfourteen_admin_header_style() {
5022 + ?>
5023 <style type="text/css" id="twentyfourteen-admin-header-css">
5024 .appearance_page_custom-header #headimg {
5025 background-color: #000;
5026 @@ -122,26 +128,26 @@ function twentyfourteen_admin_header_style() {
5027 vertical-align: middle;
5028 }
5029 </style>
5030 -<?php
5031 -}
5032 + <?php
5033 + }
5034 endif; // twentyfourteen_admin_header_style
5035
5036 if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :
5037 -/**
5038 - * Create the custom header image markup displayed on the Appearance > Header screen.
5039 - *
5040 - * @see twentyfourteen_custom_header_setup()
5041 - *
5042 - * @since Twenty Fourteen 1.0
5043 - */
5044 -function twentyfourteen_admin_header_image() {
5045 -?>
5046 + /**
5047 + * Create the custom header image markup displayed on the Appearance > Header screen.
5048 + *
5049 + * @see twentyfourteen_custom_header_setup()
5050 + *
5051 + * @since Twenty Fourteen 1.0
5052 + */
5053 + function twentyfourteen_admin_header_image() {
5054 + ?>
5055 <div id="headimg">
5056 <?php if ( get_header_image() ) : ?>
5057 <img src="<?php header_image(); ?>" alt="">
5058 <?php endif; ?>
5059 <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>
5060 </div>
5061 -<?php
5062 -}
5063 + <?php
5064 + }
5065 endif; // twentyfourteen_admin_header_image
5066
5067 diff --git a/themes/twentyfourteen/inc/customizer.php b/themes/twentyfourteen/inc/customizer.php
5068 index 39289159..15314093 100644
5069 --- a/themes/twentyfourteen/inc/customizer.php
5070 +++ b/themes/twentyfourteen/inc/customizer.php
5071 @@ -16,21 +16,27 @@
5072 */
5073 function twentyfourteen_customize_register( $wp_customize ) {
5074 // Add postMessage support for site title and description.
5075 - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
5076 - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
5077 - $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
5078 + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
5079 + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
5080 + $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
5081
5082 if ( isset( $wp_customize->selective_refresh ) ) {
5083 - $wp_customize->selective_refresh->add_partial( 'blogname', array(
5084 - 'selector' => '.site-title a',
5085 - 'container_inclusive' => false,
5086 - 'render_callback' => 'twentyfourteen_customize_partial_blogname',
5087 - ) );
5088 - $wp_customize->selective_refresh->add_partial( 'blogdescription', array(
5089 - 'selector' => '.site-description',
5090 - 'container_inclusive' => false,
5091 - 'render_callback' => 'twentyfourteen_customize_partial_blogdescription',
5092 - ) );
5093 + $wp_customize->selective_refresh->add_partial(
5094 + 'blogname',
5095 + array(
5096 + 'selector' => '.site-title a',
5097 + 'container_inclusive' => false,
5098 + 'render_callback' => 'twentyfourteen_customize_partial_blogname',
5099 + )
5100 + );
5101 + $wp_customize->selective_refresh->add_partial(
5102 + 'blogdescription',
5103 + array(
5104 + 'selector' => '.site-description',
5105 + 'container_inclusive' => false,
5106 + 'render_callback' => 'twentyfourteen_customize_partial_blogdescription',
5107 + )
5108 + );
5109 }
5110
5111 // Rename the label to "Site Title Color" because this only affects the site title in this theme.
5112 @@ -49,31 +55,41 @@ function twentyfourteen_customize_register( $wp_customize ) {
5113 }
5114
5115 // Add the featured content section in case it's not already there.
5116 - $wp_customize->add_section( 'featured_content', array(
5117 - 'title' => __( 'Featured Content', 'twentyfourteen' ),
5118 - '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' ),
5119 - esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
5120 - admin_url( 'edit.php?show_sticky=1' )
5121 - ),
5122 - 'priority' => 130,
5123 - 'active_callback' => 'is_front_page',
5124 - ) );
5125 + $wp_customize->add_section(
5126 + 'featured_content',
5127 + array(
5128 + 'title' => __( 'Featured Content', 'twentyfourteen' ),
5129 + 'description' => sprintf(
5130 + __( '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' ),
5131 + esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
5132 + admin_url( 'edit.php?show_sticky=1' )
5133 + ),
5134 + 'priority' => 130,
5135 + 'active_callback' => 'is_front_page',
5136 + )
5137 + );
5138
5139 // Add the featured content layout setting and control.
5140 - $wp_customize->add_setting( 'featured_content_layout', array(
5141 - 'default' => 'grid',
5142 - 'sanitize_callback' => 'twentyfourteen_sanitize_layout',
5143 - ) );
5144 + $wp_customize->add_setting(
5145 + 'featured_content_layout',
5146 + array(
5147 + 'default' => 'grid',
5148 + 'sanitize_callback' => 'twentyfourteen_sanitize_layout',
5149 + )
5150 + );
5151
5152 - $wp_customize->add_control( 'featured_content_layout', array(
5153 - 'label' => __( 'Layout', 'twentyfourteen' ),
5154 - 'section' => 'featured_content',
5155 - 'type' => 'select',
5156 - 'choices' => array(
5157 - 'grid' => __( 'Grid', 'twentyfourteen' ),
5158 - 'slider' => __( 'Slider', 'twentyfourteen' ),
5159 - ),
5160 - ) );
5161 + $wp_customize->add_control(
5162 + 'featured_content_layout',
5163 + array(
5164 + 'label' => __( 'Layout', 'twentyfourteen' ),
5165 + 'section' => 'featured_content',
5166 + 'type' => 'select',
5167 + 'choices' => array(
5168 + 'grid' => __( 'Grid', 'twentyfourteen' ),
5169 + 'slider' => __( 'Slider', 'twentyfourteen' ),
5170 + ),
5171 + )
5172 + );
5173 }
5174 add_action( 'customize_register', 'twentyfourteen_customize_register' );
5175
5176 @@ -137,16 +153,18 @@ function twentyfourteen_contextual_help() {
5177 return;
5178 }
5179
5180 - get_current_screen()->add_help_tab( array(
5181 - 'id' => 'twentyfourteen',
5182 - 'title' => __( 'Twenty Fourteen', 'twentyfourteen' ),
5183 - 'content' =>
5184 - '<ul>' .
5185 - '<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>' .
5186 - '<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>' .
5187 - '<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>' .
5188 - '</ul>',
5189 - ) );
5190 + get_current_screen()->add_help_tab(
5191 + array(
5192 + 'id' => 'twentyfourteen',
5193 + 'title' => __( 'Twenty Fourteen', 'twentyfourteen' ),
5194 + 'content' =>
5195 + '<ul>' .
5196 + '<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>' .
5197 + '<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>' .
5198 + '<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>' .
5199 + '</ul>',
5200 + )
5201 + );
5202 }
5203 add_action( 'admin_head-themes.php', 'twentyfourteen_contextual_help' );
5204 -add_action( 'admin_head-edit.php', 'twentyfourteen_contextual_help' );
5205 +add_action( 'admin_head-edit.php', 'twentyfourteen_contextual_help' );
5206
5207 diff --git a/themes/twentyfourteen/inc/featured-content.php b/themes/twentyfourteen/inc/featured-content.php
5208 index ffeb993d..23fb38d7 100644
5209 --- a/themes/twentyfourteen/inc/featured-content.php
5210 +++ b/themes/twentyfourteen/inc/featured-content.php
5211 @@ -23,8 +23,6 @@ class Featured_Content {
5212 *
5213 * @since Twenty Fourteen 1.0
5214 *
5215 - * @static
5216 - * @access public
5217 * @var int
5218 */
5219 public static $max_posts = 15;
5220 @@ -34,8 +32,6 @@ class Featured_Content {
5221 *
5222 * All custom functionality will be hooked into the "init" action.
5223 *
5224 - * @static
5225 - * @access public
5226 * @since Twenty Fourteen 1.0
5227 */
5228 public static function setup() {
5229 @@ -51,8 +47,6 @@ class Featured_Content {
5230 * If no theme support is found there is no need to hook into WordPress.
5231 * We'll just return early instead.
5232 *
5233 - * @static
5234 - * @access public
5235 * @since Twenty Fourteen 1.0
5236 */
5237 public static function init() {
5238 @@ -83,15 +77,15 @@ class Featured_Content {
5239 self::$max_posts = absint( $theme_support[0]['max_posts'] );
5240 }
5241
5242 - add_filter( $filter, array( __CLASS__, 'get_featured_posts' ) );
5243 - add_action( 'customize_register', array( __CLASS__, 'customize_register' ), 9 );
5244 - add_action( 'admin_init', array( __CLASS__, 'register_setting' ) );
5245 - add_action( 'switch_theme', array( __CLASS__, 'delete_transient' ) );
5246 - add_action( 'save_post', array( __CLASS__, 'delete_transient' ) );
5247 - add_action( 'delete_post_tag', array( __CLASS__, 'delete_post_tag' ) );
5248 - add_action( 'customize_controls_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
5249 - add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ) );
5250 - add_action( 'wp_loaded', array( __CLASS__, 'wp_loaded' ) );
5251 + add_filter( $filter, array( __CLASS__, 'get_featured_posts' ) );
5252 + add_action( 'customize_register', array( __CLASS__, 'customize_register' ), 9 );
5253 + add_action( 'admin_init', array( __CLASS__, 'register_setting' ) );
5254 + add_action( 'switch_theme', array( __CLASS__, 'delete_transient' ) );
5255 + add_action( 'save_post', array( __CLASS__, 'delete_transient' ) );
5256 + add_action( 'delete_post_tag', array( __CLASS__, 'delete_post_tag' ) );
5257 + add_action( 'customize_controls_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
5258 + add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ) );
5259 + add_action( 'wp_loaded', array( __CLASS__, 'wp_loaded' ) );
5260 }
5261
5262 /**
5263 @@ -100,13 +94,11 @@ class Featured_Content {
5264 * Has to run on wp_loaded so that the preview filters of the Customizer
5265 * have a chance to alter the value.
5266 *
5267 - * @static
5268 - * @access public
5269 * @since Twenty Fourteen 1.0
5270 */
5271 public static function wp_loaded() {
5272 if ( self::get_setting( 'hide-tag' ) ) {
5273 - add_filter( 'get_terms', array( __CLASS__, 'hide_featured_term' ), 10, 3 );
5274 + add_filter( 'get_terms', array( __CLASS__, 'hide_featured_term' ), 10, 3 );
5275 add_filter( 'get_the_terms', array( __CLASS__, 'hide_the_featured_term' ), 10, 3 );
5276 }
5277 }
5278 @@ -114,8 +106,6 @@ class Featured_Content {
5279 /**
5280 * Get featured posts.
5281 *
5282 - * @static
5283 - * @access public
5284 * @since Twenty Fourteen 1.0
5285 *
5286 * @return array Array of featured posts.
5287 @@ -128,10 +118,12 @@ class Featured_Content {
5288 return array();
5289 }
5290
5291 - $featured_posts = get_posts( array(
5292 - 'include' => $post_ids,
5293 - 'posts_per_page' => count( $post_ids ),
5294 - ) );
5295 + $featured_posts = get_posts(
5296 + array(
5297 + 'include' => $post_ids,
5298 + 'posts_per_page' => count( $post_ids ),
5299 + )
5300 + );
5301
5302 return $featured_posts;
5303 }
5304 @@ -144,8 +136,6 @@ class Featured_Content {
5305 *
5306 * Sets the "featured_content_ids" transient.
5307 *
5308 - * @static
5309 - * @access public
5310 * @since Twenty Fourteen 1.0
5311 *
5312 * @return array Array of post IDs.
5313 @@ -160,18 +150,20 @@ class Featured_Content {
5314
5315 if ( $term ) {
5316 // Query for featured posts.
5317 - $featured_ids = get_posts( array(
5318 - 'fields' => 'ids',
5319 - 'numberposts' => self::$max_posts,
5320 - 'suppress_filters' => false,
5321 - 'tax_query' => array(
5322 - array(
5323 - 'field' => 'term_id',
5324 - 'taxonomy' => 'post_tag',
5325 - 'terms' => $term->term_id,
5326 + $featured_ids = get_posts(
5327 + array(
5328 + 'fields' => 'ids',
5329 + 'numberposts' => self::$max_posts,
5330 + 'suppress_filters' => false,
5331 + 'tax_query' => array(
5332 + array(
5333 + 'field' => 'term_id',
5334 + 'taxonomy' => 'post_tag',
5335 + 'terms' => $term->term_id,
5336 + ),
5337 ),
5338 - ),
5339 - ) );
5340 + )
5341 + );
5342 }
5343
5344 // Get sticky posts if no Featured Content exists.
5345 @@ -189,8 +181,6 @@ class Featured_Content {
5346 /**
5347 * Return an array with IDs of posts maked as sticky.
5348 *
5349 - * @static
5350 - * @access public
5351 * @since Twenty Fourteen 1.0
5352 *
5353 * @return array Array of sticky posts.
5354 @@ -206,8 +196,6 @@ class Featured_Content {
5355 *
5356 * @see Featured_Content::validate_settings().
5357 *
5358 - * @static
5359 - * @access public
5360 * @since Twenty Fourteen 1.0
5361 */
5362 public static function delete_transient() {
5363 @@ -221,8 +209,6 @@ class Featured_Content {
5364 * Hooked onto the 'pre_get_posts' action, this changes the parameters of
5365 * the query before it gets any posts.
5366 *
5367 - * @static
5368 - * @access public
5369 * @since Twenty Fourteen 1.0
5370 *
5371 * @param WP_Query $query WP_Query object.
5372 @@ -269,8 +255,6 @@ class Featured_Content {
5373 *
5374 * @see Featured_Content::validate_settings().
5375 *
5376 - * @static
5377 - * @access public
5378 * @since Twenty Fourteen 1.0
5379 *
5380 * @param int $tag_id The term_id of the tag that has been deleted.
5381 @@ -283,7 +267,7 @@ class Featured_Content {
5382 }
5383
5384 $settings['tag-id'] = 0;
5385 - $settings = self::validate_settings( $settings );
5386 + $settings = self::validate_settings( $settings );
5387 update_option( 'featured-content', $settings );
5388 }
5389
5390 @@ -292,8 +276,6 @@ class Featured_Content {
5391 *
5392 * Hooks into the "get_terms" filter.
5393 *
5394 - * @static
5395 - * @access public
5396 * @since Twenty Fourteen 1.0
5397 *
5398 * @param array $terms List of term objects. This is the return value of get_terms().
5399 @@ -340,8 +322,6 @@ class Featured_Content {
5400 *
5401 * Hooks into the "get_the_terms" filter.
5402 *
5403 - * @static
5404 - * @access public
5405 * @since Twenty Fourteen 1.0
5406 *
5407 * @param array $terms A list of term objects. This is the return value of get_the_terms().
5408 @@ -381,8 +361,6 @@ class Featured_Content {
5409 /**
5410 * Register custom setting on the Settings -> Reading screen.
5411 *
5412 - * @static
5413 - * @access public
5414 * @since Twenty Fourteen 1.0
5415 */
5416 public static function register_setting() {
5417 @@ -392,54 +370,66 @@ class Featured_Content {
5418 /**
5419 * Add settings to the Customizer.
5420 *
5421 - * @static
5422 - * @access public
5423 * @since Twenty Fourteen 1.0
5424 *
5425 * @param WP_Customize_Manager $wp_customize Customizer object.
5426 */
5427 public static function customize_register( $wp_customize ) {
5428 - $wp_customize->add_section( 'featured_content', array(
5429 - 'title' => __( 'Featured Content', 'twentyfourteen' ),
5430 - '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' ),
5431 - esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
5432 - admin_url( 'edit.php?show_sticky=1' )
5433 - ),
5434 - 'priority' => 130,
5435 - 'theme_supports' => 'featured-content',
5436 - ) );
5437 + $wp_customize->add_section(
5438 + 'featured_content',
5439 + array(
5440 + 'title' => __( 'Featured Content', 'twentyfourteen' ),
5441 + 'description' => sprintf(
5442 + __( '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' ),
5443 + esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
5444 + admin_url( 'edit.php?show_sticky=1' )
5445 + ),
5446 + 'priority' => 130,
5447 + 'theme_supports' => 'featured-content',
5448 + )
5449 + );
5450
5451 // Add Featured Content settings.
5452 - $wp_customize->add_setting( 'featured-content[tag-name]', array(
5453 - 'default' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ),
5454 - 'type' => 'option',
5455 - 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ),
5456 - ) );
5457 - $wp_customize->add_setting( 'featured-content[hide-tag]', array(
5458 - 'default' => true,
5459 - 'type' => 'option',
5460 - 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ),
5461 - ) );
5462 + $wp_customize->add_setting(
5463 + 'featured-content[tag-name]',
5464 + array(
5465 + 'default' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ),
5466 + 'type' => 'option',
5467 + 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ),
5468 + )
5469 + );
5470 + $wp_customize->add_setting(
5471 + 'featured-content[hide-tag]',
5472 + array(
5473 + 'default' => true,
5474 + 'type' => 'option',
5475 + 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ),
5476 + )
5477 + );
5478
5479 // Add Featured Content controls.
5480 - $wp_customize->add_control( 'featured-content[tag-name]', array(
5481 - 'label' => __( 'Tag Name', 'twentyfourteen' ),
5482 - 'section' => 'featured_content',
5483 - 'priority' => 20,
5484 - ) );
5485 - $wp_customize->add_control( 'featured-content[hide-tag]', array(
5486 - 'label' => __( 'Don&rsquo;t display tag on front end.', 'twentyfourteen' ),
5487 - 'section' => 'featured_content',
5488 - 'type' => 'checkbox',
5489 - 'priority' => 30,
5490 - ) );
5491 + $wp_customize->add_control(
5492 + 'featured-content[tag-name]',
5493 + array(
5494 + 'label' => __( 'Tag Name', 'twentyfourteen' ),
5495 + 'section' => 'featured_content',
5496 + 'priority' => 20,
5497 + )
5498 + );
5499 + $wp_customize->add_control(
5500 + 'featured-content[hide-tag]',
5501 + array(
5502 + 'label' => __( 'Don&rsquo;t display tag on front end.', 'twentyfourteen' ),
5503 + 'section' => 'featured_content',
5504 + 'type' => 'checkbox',
5505 + 'priority' => 30,
5506 + )
5507 + );
5508 }
5509
5510 /**
5511 * Enqueue the tag suggestion script.
5512 *
5513 - * @static
5514 - * @access public
5515 * @since Twenty Fourteen 1.0
5516 */
5517 public static function enqueue_scripts() {
5518 @@ -458,8 +448,6 @@ class Featured_Content {
5519 * its name as the first parameter to the function and only that
5520 * value will be returned.
5521 *
5522 - * @static
5523 - * @access public
5524 * @since Twenty Fourteen 1.0
5525 *
5526 * @param string $key The key of a recognized setting.
5527 @@ -491,8 +479,6 @@ class Featured_Content {
5528 * format before saving to the database. This function will also
5529 * delete the transient set in Featured_Content::get_featured_content().
5530 *
5531 - * @static
5532 - * @access public
5533 * @since Twenty Fourteen 1.0
5534 *
5535 * @param array $input Array of settings input.
5536
5537 diff --git a/themes/twentyfourteen/inc/template-tags.php b/themes/twentyfourteen/inc/template-tags.php
5538 index 1d35d0d5..15003864 100644
5539 --- a/themes/twentyfourteen/inc/template-tags.php
5540 +++ b/themes/twentyfourteen/inc/template-tags.php
5541 @@ -8,116 +8,119 @@
5542 */
5543
5544 if ( ! function_exists( 'twentyfourteen_paging_nav' ) ) :
5545 -/**
5546 - * Display navigation to next/previous set of posts when applicable.
5547 - *
5548 - * @since Twenty Fourteen 1.0
5549 - *
5550 - * @global WP_Query $wp_query WordPress Query object.
5551 - * @global WP_Rewrite $wp_rewrite WordPress Rewrite object.
5552 - */
5553 -function twentyfourteen_paging_nav() {
5554 - global $wp_query, $wp_rewrite;
5555 -
5556 - // Don't print empty markup if there's only one page.
5557 - if ( $wp_query->max_num_pages < 2 ) {
5558 - return;
5559 - }
5560 -
5561 - $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
5562 - $pagenum_link = html_entity_decode( get_pagenum_link() );
5563 - $query_args = array();
5564 - $url_parts = explode( '?', $pagenum_link );
5565 -
5566 - if ( isset( $url_parts[1] ) ) {
5567 - wp_parse_str( $url_parts[1], $query_args );
5568 - }
5569 + /**
5570 + * Display navigation to next/previous set of posts when applicable.
5571 + *
5572 + * @since Twenty Fourteen 1.0
5573 + *
5574 + * @global WP_Query $wp_query WordPress Query object.
5575 + * @global WP_Rewrite $wp_rewrite WordPress Rewrite object.
5576 + */
5577 + function twentyfourteen_paging_nav() {
5578 + global $wp_query, $wp_rewrite;
5579 +
5580 + // Don't print empty markup if there's only one page.
5581 + if ( $wp_query->max_num_pages < 2 ) {
5582 + return;
5583 + }
5584
5585 - $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
5586 - $pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
5587 + $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
5588 + $pagenum_link = html_entity_decode( get_pagenum_link() );
5589 + $query_args = array();
5590 + $url_parts = explode( '?', $pagenum_link );
5591
5592 - $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
5593 - $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
5594 + if ( isset( $url_parts[1] ) ) {
5595 + wp_parse_str( $url_parts[1], $query_args );
5596 + }
5597
5598 - // Set up paginated links.
5599 - $links = paginate_links( array(
5600 - 'base' => $pagenum_link,
5601 - 'format' => $format,
5602 - 'total' => $wp_query->max_num_pages,
5603 - 'current' => $paged,
5604 - 'mid_size' => 1,
5605 - 'add_args' => array_map( 'urlencode', $query_args ),
5606 - 'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
5607 - 'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
5608 - ) );
5609 + $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
5610 + $pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
5611 +
5612 + $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
5613 + $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
5614 +
5615 + // Set up paginated links.
5616 + $links = paginate_links(
5617 + array(
5618 + 'base' => $pagenum_link,
5619 + 'format' => $format,
5620 + 'total' => $wp_query->max_num_pages,
5621 + 'current' => $paged,
5622 + 'mid_size' => 1,
5623 + 'add_args' => array_map( 'urlencode', $query_args ),
5624 + 'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
5625 + 'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
5626 + )
5627 + );
5628
5629 - if ( $links ) :
5630 + if ( $links ) :
5631
5632 - ?>
5633 - <nav class="navigation paging-navigation" role="navigation">
5634 + ?>
5635 + <nav class="navigation paging-navigation" role="navigation">
5636 <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentyfourteen' ); ?></h1>
5637 <div class="pagination loop-pagination">
5638 <?php echo $links; ?>
5639 </div><!-- .pagination -->
5640 </nav><!-- .navigation -->
5641 - <?php
5642 + <?php
5643 endif;
5644 -}
5645 + }
5646 endif;
5647
5648 if ( ! function_exists( 'twentyfourteen_post_nav' ) ) :
5649 -/**
5650 - * Display navigation to next/previous post when applicable.
5651 - *
5652 - * @since Twenty Fourteen 1.0
5653 - */
5654 -function twentyfourteen_post_nav() {
5655 - // Don't print empty markup if there's nowhere to navigate.
5656 - $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
5657 - $next = get_adjacent_post( false, '', false );
5658 -
5659 - if ( ! $next && ! $previous ) {
5660 - return;
5661 - }
5662 + /**
5663 + * Display navigation to next/previous post when applicable.
5664 + *
5665 + * @since Twenty Fourteen 1.0
5666 + */
5667 + function twentyfourteen_post_nav() {
5668 + // Don't print empty markup if there's nowhere to navigate.
5669 + $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
5670 + $next = get_adjacent_post( false, '', false );
5671 +
5672 + if ( ! $next && ! $previous ) {
5673 + return;
5674 + }
5675
5676 - ?>
5677 - <nav class="navigation post-navigation" role="navigation">
5678 + ?>
5679 + <nav class="navigation post-navigation" role="navigation">
5680 <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
5681 <div class="nav-links">
5682 <?php
5683 if ( is_attachment() ) :
5684 previous_post_link( '%link', __( '<span class="meta-nav">Published In</span>%title', 'twentyfourteen' ) );
5685 - else :
5686 - previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) );
5687 - next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) );
5688 - endif;
5689 - ?>
5690 - </div><!-- .nav-links -->
5691 - </nav><!-- .navigation -->
5692 - <?php
5693 -}
5694 + else :
5695 + previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) );
5696 + next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) );
5697 + endif;
5698 + ?>
5699 + </div><!-- .nav-links -->
5700 + </nav><!-- .navigation -->
5701 + <?php
5702 + }
5703 endif;
5704
5705 if ( ! function_exists( 'twentyfourteen_posted_on' ) ) :
5706 -/**
5707 - * Print HTML with meta information for the current post-date/time and author.
5708 - *
5709 - * @since Twenty Fourteen 1.0
5710 - */
5711 -function twentyfourteen_posted_on() {
5712 - if ( is_sticky() && is_home() && ! is_paged() ) {
5713 - echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>';
5714 - }
5715 + /**
5716 + * Print HTML with meta information for the current post-date/time and author.
5717 + *
5718 + * @since Twenty Fourteen 1.0
5719 + */
5720 + function twentyfourteen_posted_on() {
5721 + if ( is_sticky() && is_home() && ! is_paged() ) {
5722 + echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>';
5723 + }
5724
5725 - // Set up and print post meta information.
5726 - 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>',
5727 - esc_url( get_permalink() ),
5728 - esc_attr( get_the_date( 'c' ) ),
5729 - esc_html( get_the_date() ),
5730 - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
5731 - get_the_author()
5732 - );
5733 -}
5734 + // Set up and print post meta information.
5735 + printf(
5736 + '<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>',
5737 + esc_url( get_permalink() ),
5738 + esc_attr( get_the_date( 'c' ) ),
5739 + esc_html( get_the_date() ),
5740 + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
5741 + get_the_author()
5742 + );
5743 + }
5744 endif;
5745
5746 /**
5747 @@ -130,9 +133,11 @@ endif;
5748 function twentyfourteen_categorized_blog() {
5749 if ( false === ( $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ) ) ) {
5750 // Create an array of all the categories that are attached to posts
5751 - $all_the_cool_cats = get_categories( array(
5752 - 'hide_empty' => 1,
5753 - ) );
5754 + $all_the_cool_cats = get_categories(
5755 + array(
5756 + 'hide_empty' => 1,
5757 + )
5758 + );
5759
5760 // Count the number of categories that are attached to the posts
5761 $all_the_cool_cats = count( $all_the_cool_cats );
5762 @@ -159,69 +164,71 @@ function twentyfourteen_category_transient_flusher() {
5763 delete_transient( 'twentyfourteen_category_count' );
5764 }
5765 add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' );
5766 -add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
5767 +add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
5768
5769 if ( ! function_exists( 'twentyfourteen_post_thumbnail' ) ) :
5770 -/**
5771 - * Display an optional post thumbnail.
5772 - *
5773 - * Wraps the post thumbnail in an anchor element on index
5774 - * views, or a div element when on single views.
5775 - *
5776 - * @since Twenty Fourteen 1.0
5777 - * @since Twenty Fourteen 1.4 Was made 'pluggable', or overridable.
5778 - */
5779 -function twentyfourteen_post_thumbnail() {
5780 - if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
5781 - return;
5782 - }
5783 + /**
5784 + * Display an optional post thumbnail.
5785 + *
5786 + * Wraps the post thumbnail in an anchor element on index
5787 + * views, or a div element when on single views.
5788 + *
5789 + * @since Twenty Fourteen 1.0
5790 + * @since Twenty Fourteen 1.4 Was made 'pluggable', or overridable.
5791 + */
5792 + function twentyfourteen_post_thumbnail() {
5793 + if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
5794 + return;
5795 + }
5796
5797 - if ( is_singular() ) :
5798 - ?>
5799 + if ( is_singular() ) :
5800 + ?>
5801
5802 - <div class="post-thumbnail">
5803 - <?php
5804 - if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
5805 - the_post_thumbnail( 'twentyfourteen-full-width' );
5806 - } else {
5807 - the_post_thumbnail();
5808 - }
5809 - ?>
5810 - </div>
5811 + <div class="post-thumbnail">
5812 + <?php
5813 + if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
5814 + the_post_thumbnail( 'twentyfourteen-full-width' );
5815 + } else {
5816 + the_post_thumbnail();
5817 + }
5818 + ?>
5819 + </div>
5820
5821 - <?php else : ?>
5822 + <?php else : ?>
5823
5824 <a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
5825 - <?php
5826 - if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
5827 - the_post_thumbnail( 'twentyfourteen-full-width' );
5828 - } else {
5829 - the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
5830 - }
5831 - ?>
5832 + <?php
5833 + if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
5834 + the_post_thumbnail( 'twentyfourteen-full-width' );
5835 + } else {
5836 + the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
5837 + }
5838 + ?>
5839 </a>
5840
5841 - <?php endif; // End is_singular()
5842 -}
5843 + <?php
5844 + endif; // End is_singular()
5845 + }
5846 endif;
5847
5848 if ( ! function_exists( 'twentyfourteen_excerpt_more' ) && ! is_admin() ) :
5849 -/**
5850 - * Replaces "[...]" (appended to automatically generated excerpts) with ...
5851 - * and a Continue reading link.
5852 - *
5853 - * @since Twenty Fourteen 1.3
5854 - *
5855 - * @param string $more Default Read More excerpt link.
5856 - * @return string Filtered Read More excerpt link.
5857 - */
5858 -function twentyfourteen_excerpt_more( $more ) {
5859 - $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
5860 - esc_url( get_permalink( get_the_ID() ) ),
5861 + /**
5862 + * Replaces "[...]" (appended to automatically generated excerpts) with ...
5863 + * and a Continue reading link.
5864 + *
5865 + * @since Twenty Fourteen 1.3
5866 + *
5867 + * @param string $more Default Read More excerpt link.
5868 + * @return string Filtered Read More excerpt link.
5869 + */
5870 + function twentyfourteen_excerpt_more( $more ) {
5871 + $link = sprintf(
5872 + '<a href="%1$s" class="more-link">%2$s</a>',
5873 + esc_url( get_permalink( get_the_ID() ) ),
5874 /* translators: %s: Name of current post */
5875 sprintf( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
5876 );
5877 - return ' &hellip; ' . $link;
5878 -}
5879 -add_filter( 'excerpt_more', 'twentyfourteen_excerpt_more' );
5880 + return ' &hellip; ' . $link;
5881 + }
5882 + add_filter( 'excerpt_more', 'twentyfourteen_excerpt_more' );
5883 endif;
5884
5885 diff --git a/themes/twentyfourteen/inc/widgets.php b/themes/twentyfourteen/inc/widgets.php
5886 index 533f34a5..7ddabec3 100644
5887 --- a/themes/twentyfourteen/inc/widgets.php
5888 +++ b/themes/twentyfourteen/inc/widgets.php
5889 @@ -16,7 +16,6 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
5890 /**
5891 * The supported post formats.
5892 *
5893 - * @access private
5894 * @since Twenty Fourteen 1.0
5895 *
5896 * @var array
5897 @@ -31,11 +30,15 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
5898 * @return Twenty_Fourteen_Ephemera_Widget
5899 */
5900 public function __construct() {
5901 - parent::__construct( 'widget_twentyfourteen_ephemera', __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ), array(
5902 - 'classname' => 'widget_twentyfourteen_ephemera',
5903 - 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen' ),
5904 - 'customize_selective_refresh' => true,
5905 - ) );
5906 + parent::__construct(
5907 + 'widget_twentyfourteen_ephemera',
5908 + __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ),
5909 + array(
5910 + 'classname' => 'widget_twentyfourteen_ephemera',
5911 + 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen' ),
5912 + 'customize_selective_refresh' => true,
5913 + )
5914 + );
5915
5916 if ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) {
5917 add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
5918 @@ -62,7 +65,6 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
5919 /**
5920 * Output the HTML for this widget.
5921 *
5922 - * @access public
5923 * @since Twenty Fourteen 1.0
5924 *
5925 * @param array $args An array of standard parameters for widgets in this theme.
5926 @@ -106,24 +108,26 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
5927 $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
5928 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? $format_string : $instance['title'], $instance, $this->id_base );
5929
5930 - $ephemera = new WP_Query( array(
5931 - 'order' => 'DESC',
5932 - 'posts_per_page' => $number,
5933 - 'no_found_rows' => true,
5934 - 'post_status' => 'publish',
5935 - 'post__not_in' => get_option( 'sticky_posts' ),
5936 - 'tax_query' => array(
5937 - array(
5938 - 'taxonomy' => 'post_format',
5939 - 'terms' => array( "post-format-$format" ),
5940 - 'field' => 'slug',
5941 - 'operator' => 'IN',
5942 + $ephemera = new WP_Query(
5943 + array(
5944 + 'order' => 'DESC',
5945 + 'posts_per_page' => $number,
5946 + 'no_found_rows' => true,
5947 + 'post_status' => 'publish',
5948 + 'post__not_in' => get_option( 'sticky_posts' ),
5949 + 'tax_query' => array(
5950 + array(
5951 + 'taxonomy' => 'post_format',
5952 + 'terms' => array( "post-format-$format" ),
5953 + 'field' => 'slug',
5954 + 'operator' => 'IN',
5955 + ),
5956 ),
5957 - ),
5958 - ) );
5959 + )
5960 + );
5961
5962 if ( $ephemera->have_posts() ) :
5963 - $tmp_content_width = $GLOBALS['content_width'];
5964 + $tmp_content_width = $GLOBALS['content_width'];
5965 $GLOBALS['content_width'] = 306;
5966
5967 echo $args['before_widget'];
5968 @@ -134,84 +138,89 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
5969 <ol>
5970
5971 <?php
5972 - while ( $ephemera->have_posts() ) :
5973 - $ephemera->the_post();
5974 - $tmp_more = $GLOBALS['more'];
5975 - $GLOBALS['more'] = 0;
5976 - ?>
5977 + while ( $ephemera->have_posts() ) :
5978 + $ephemera->the_post();
5979 + $tmp_more = $GLOBALS['more'];
5980 + $GLOBALS['more'] = 0;
5981 + ?>
5982 <li>
5983 <article <?php post_class(); ?>>
5984 - <div class="entry-content">
5985 - <?php
5986 - if ( has_post_format( 'gallery' ) ) :
5987 -
5988 - if ( post_password_required() ) :
5989 - the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
5990 - else :
5991 - $images = array();
5992 -
5993 - $galleries = get_post_galleries( get_the_ID(), false );
5994 - if ( isset( $galleries[0]['ids'] ) )
5995 - $images = explode( ',', $galleries[0]['ids'] );
5996 -
5997 - if ( ! $images ) :
5998 - $images = get_posts( array(
5999 - 'fields' => 'ids',
6000 - 'numberposts' => -1,
6001 - 'order' => 'ASC',
6002 - 'orderby' => 'menu_order',
6003 + <div class="entry-content">
6004 + <?php
6005 + if ( has_post_format( 'gallery' ) ) :
6006 +
6007 + if ( post_password_required() ) :
6008 + the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
6009 + else :
6010 + $images = array();
6011 +
6012 + $galleries = get_post_galleries( get_the_ID(), false );
6013 + if ( isset( $galleries[0]['ids'] ) ) {
6014 + $images = explode( ',', $galleries[0]['ids'] );
6015 + }
6016 +
6017 + if ( ! $images ) :
6018 + $images = get_posts(
6019 + array(
6020 + 'fields' => 'ids',
6021 + 'numberposts' => -1,
6022 + 'order' => 'ASC',
6023 + 'orderby' => 'menu_order',
6024 'post_mime_type' => 'image',
6025 - 'post_parent' => get_the_ID(),
6026 - 'post_type' => 'attachment',
6027 - ) );
6028 - endif;
6029 + 'post_parent' => get_the_ID(),
6030 + 'post_type' => 'attachment',
6031 + )
6032 + );
6033 + endif;
6034
6035 - $total_images = count( $images );
6036 + $total_images = count( $images );
6037
6038 - if ( has_post_thumbnail() ) :
6039 - $post_thumbnail = get_the_post_thumbnail();
6040 + if ( has_post_thumbnail() ) :
6041 + $post_thumbnail = get_the_post_thumbnail();
6042 elseif ( $total_images > 0 ) :
6043 $image = reset( $images );
6044 $post_thumbnail = wp_get_attachment_image( $image, 'post-thumbnail' );
6045 endif;
6046
6047 - if ( ! empty ( $post_thumbnail ) ) :
6048 - ?>
6049 + if ( ! empty( $post_thumbnail ) ) :
6050 + ?>
6051 <a href="<?php the_permalink(); ?>"><?php echo $post_thumbnail; ?></a>
6052 <?php endif; ?>
6053 <p class="wp-caption-text">
6054 - <?php
6055 - 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' ),
6056 + <?php
6057 + printf(
6058 + _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' ),
6059 esc_url( get_permalink() ),
6060 number_format_i18n( $total_images )
6061 );
6062 - ?>
6063 + ?>
6064 </p>
6065 - <?php
6066 - endif;
6067 + <?php
6068 + endif;
6069
6070 else :
6071 the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
6072 endif;
6073 - ?>
6074 + ?>
6075 </div><!-- .entry-content -->
6076
6077 <header class="entry-header">
6078 <div class="entry-meta">
6079 - <?php
6080 - if ( ! has_post_format( 'link' ) ) :
6081 - the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
6082 - endif;
6083 + <?php
6084 + if ( ! has_post_format( 'link' ) ) :
6085 + the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
6086 + endif;
6087
6088 - 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>',
6089 - esc_url( get_permalink() ),
6090 - esc_attr( get_the_date( 'c' ) ),
6091 - esc_html( get_the_date() ),
6092 - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
6093 - get_the_author()
6094 - );
6095 + printf(
6096 + '<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>',
6097 + esc_url( get_permalink() ),
6098 + esc_attr( get_the_date( 'c' ) ),
6099 + esc_html( get_the_date() ),
6100 + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
6101 + get_the_author()
6102 + );
6103
6104 - if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
6105 + if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
6106 ?>
6107 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
6108 <?php endif; ?>
6109
6110 diff --git a/themes/twentyfourteen/index.php b/themes/twentyfourteen/index.php
6111 index 3f46be21..7f6d04a0 100644
6112 --- a/themes/twentyfourteen/index.php
6113 +++ b/themes/twentyfourteen/index.php
6114 @@ -7,7 +7,7 @@
6115 * It is used to display a page when nothing more specific matches a query,
6116 * e.g., it puts together the home page when no home.php file exists.
6117 *
6118 - * @link https://codex.wordpress.org/Template_Hierarchy
6119 + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
6120 *
6121 * @package WordPress
6122 * @subpackage Twenty_Fourteen
6123 @@ -19,37 +19,38 @@ get_header(); ?>
6124 <div id="main-content" class="main-content">
6125
6126 <?php
6127 - if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
6128 - // Include the featured content template.
6129 - get_template_part( 'featured-content' );
6130 - }
6131 +if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
6132 + // Include the featured content template.
6133 + get_template_part( 'featured-content' );
6134 +}
6135 ?>
6136
6137 <div id="primary" class="content-area">
6138 <div id="content" class="site-content" role="main">
6139
6140 <?php
6141 - if ( have_posts() ) :
6142 - // Start the Loop.
6143 - while ( have_posts() ) : the_post();
6144 -
6145 - /*
6146 - * Include the post format-specific template for the content. If you want to
6147 - * use this in a child theme, then include a file called content-___.php
6148 - * (where ___ is the post format) and that will be used instead.
6149 - */
6150 - get_template_part( 'content', get_post_format() );
6151 + if ( have_posts() ) :
6152 + // Start the Loop.
6153 + while ( have_posts() ) :
6154 + the_post();
6155 +
6156 + /*
6157 + * Include the post format-specific template for the content. If you want to
6158 + * use this in a child theme, then include a file called content-___.php
6159 + * (where ___ is the post format) and that will be used instead.
6160 + */
6161 + get_template_part( 'content', get_post_format() );
6162
6163 endwhile;
6164 - // Previous/next post navigation.
6165 - twentyfourteen_paging_nav();
6166 + // Previous/next post navigation.
6167 + twentyfourteen_paging_nav();
6168
6169 else :
6170 // If no content, include the "No posts found" template.
6171 get_template_part( 'content', 'none' );
6172
6173 endif;
6174 - ?>
6175 + ?>
6176
6177 </div><!-- #content -->
6178 </div><!-- #primary -->
6179
6180 diff --git a/themes/twentyfourteen/js/functions.js b/themes/twentyfourteen/js/functions.js
6181 index a21849ec..ac4629d7 100644
6182 --- a/themes/twentyfourteen/js/functions.js
6183 +++ b/themes/twentyfourteen/js/functions.js
6184 @@ -122,7 +122,8 @@
6185 } );
6186
6187 /**
6188 - * @summary Add or remove ARIA attributes.
6189 + * Add or remove ARIA attributes.
6190 + *
6191 * Uses jQuery's width() function to determine the size of the window and add
6192 * the default ARIA attributes for the menu toggle if it's visible.
6193 * @since Twenty Fourteen 1.4
6194
6195 diff --git a/themes/twentyfourteen/page-templates/contributors.php b/themes/twentyfourteen/page-templates/contributors.php
6196 index 92602ab1..6b1d19db 100644
6197 --- a/themes/twentyfourteen/page-templates/contributors.php
6198 +++ b/themes/twentyfourteen/page-templates/contributors.php
6199 @@ -12,35 +12,36 @@ get_header(); ?>
6200 <div id="main-content" class="main-content">
6201
6202 <?php
6203 - if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
6204 - // Include the featured content template.
6205 - get_template_part( 'featured-content' );
6206 - }
6207 +if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
6208 + // Include the featured content template.
6209 + get_template_part( 'featured-content' );
6210 +}
6211 ?>
6212
6213 <div id="primary" class="content-area">
6214 <div id="content" class="site-content" role="main">
6215 <?php
6216 // Start the Loop.
6217 - while ( have_posts() ) : the_post();
6218 - ?>
6219 + while ( have_posts() ) :
6220 + the_post();
6221 + ?>
6222
6223 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
6224 <?php
6225 - the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' );
6226 + the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' );
6227
6228 - // Output the authors list.
6229 - twentyfourteen_list_authors();
6230 + // Output the authors list.
6231 + twentyfourteen_list_authors();
6232
6233 - edit_post_link( __( 'Edit', 'twentyfourteen' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' );
6234 + edit_post_link( __( 'Edit', 'twentyfourteen' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' );
6235 ?>
6236 </article><!-- #post-## -->
6237
6238 - <?php
6239 - // If comments are open or we have at least one comment, load up the comment template.
6240 - if ( comments_open() || get_comments_number() ) {
6241 - comments_template();
6242 - }
6243 + <?php
6244 + // If comments are open or we have at least one comment, load up the comment template.
6245 + if ( comments_open() || get_comments_number() ) {
6246 + comments_template();
6247 + }
6248 endwhile;
6249 ?>
6250 </div><!-- #content -->
6251
6252 diff --git a/themes/twentyfourteen/page-templates/full-width.php b/themes/twentyfourteen/page-templates/full-width.php
6253 index 8830c870..ea5fa588 100644
6254 --- a/themes/twentyfourteen/page-templates/full-width.php
6255 +++ b/themes/twentyfourteen/page-templates/full-width.php
6256 @@ -12,25 +12,26 @@ get_header(); ?>
6257 <div id="main-content" class="main-content">
6258
6259 <?php
6260 - if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
6261 - // Include the featured content template.
6262 - get_template_part( 'featured-content' );
6263 - }
6264 +if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
6265 + // Include the featured content template.
6266 + get_template_part( 'featured-content' );
6267 +}
6268 ?>
6269
6270 <div id="primary" class="content-area">
6271 <div id="content" class="site-content" role="main">
6272 <?php
6273 // Start the Loop.
6274 - while ( have_posts() ) : the_post();
6275 + while ( have_posts() ) :
6276 + the_post();
6277
6278 - // Include the page content template.
6279 - get_template_part( 'content', 'page' );
6280 + // Include the page content template.
6281 + get_template_part( 'content', 'page' );
6282
6283 - // If comments are open or we have at least one comment, load up the comment template.
6284 - if ( comments_open() || get_comments_number() ) {
6285 - comments_template();
6286 - }
6287 + // If comments are open or we have at least one comment, load up the comment template.
6288 + if ( comments_open() || get_comments_number() ) {
6289 + comments_template();
6290 + }
6291 endwhile;
6292 ?>
6293 </div><!-- #content -->
6294
6295 diff --git a/themes/twentyfourteen/page.php b/themes/twentyfourteen/page.php
6296 index 44724e94..bd033aeb 100644
6297 --- a/themes/twentyfourteen/page.php
6298 +++ b/themes/twentyfourteen/page.php
6299 @@ -16,25 +16,26 @@ get_header(); ?>
6300 <div id="main-content" class="main-content">
6301
6302 <?php
6303 - if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
6304 - // Include the featured content template.
6305 - get_template_part( 'featured-content' );
6306 - }
6307 +if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
6308 + // Include the featured content template.
6309 + get_template_part( 'featured-content' );
6310 +}
6311 ?>
6312 <div id="primary" class="content-area">
6313 <div id="content" class="site-content" role="main">
6314
6315 <?php
6316 // Start the Loop.
6317 - while ( have_posts() ) : the_post();
6318 + while ( have_posts() ) :
6319 + the_post();
6320
6321 - // Include the page content template.
6322 - get_template_part( 'content', 'page' );
6323 + // Include the page content template.
6324 + get_template_part( 'content', 'page' );
6325
6326 - // If comments are open or we have at least one comment, load up the comment template.
6327 - if ( comments_open() || get_comments_number() ) {
6328 - comments_template();
6329 - }
6330 + // If comments are open or we have at least one comment, load up the comment template.
6331 + if ( comments_open() || get_comments_number() ) {
6332 + comments_template();
6333 + }
6334 endwhile;
6335 ?>
6336
6337
6338 diff --git a/themes/twentyfourteen/readme.txt b/themes/twentyfourteen/readme.txt
6339 index 69d4e653..6f1010d2 100644
6340 --- a/themes/twentyfourteen/readme.txt
6341 +++ b/themes/twentyfourteen/readme.txt
6342 @@ -2,7 +2,7 @@
6343 Contributors: the WordPress team
6344 Requires at least: WordPress 3.6
6345 Tested up to: WordPress 5.0
6346 -Stable tag: 2.4
6347 +Stable tag: 2.6
6348 License: GPLv2 or later
6349 License URI: http://www.gnu.org/licenses/gpl-2.0.html
6350 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
6351 @@ -50,6 +50,16 @@ Source: http://www.genericons.com
6352
6353 == Changelog ==
6354
6355 += 2.6 =
6356 +* Released: February 21, 2019
6357 +
6358 +https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_2.6
6359 +
6360 += 2.5 =
6361 +* Released: January 9, 2019
6362 +
6363 +https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_2.5
6364 +
6365 = 2.4 =
6366 * Released: December 19, 2018
6367
6368
6369 diff --git a/themes/twentyfourteen/search.php b/themes/twentyfourteen/search.php
6370 index d90d88a1..6b20315a 100644
6371 --- a/themes/twentyfourteen/search.php
6372 +++ b/themes/twentyfourteen/search.php
6373 @@ -20,14 +20,15 @@ get_header(); ?>
6374
6375 <?php
6376 // Start the Loop.
6377 - while ( have_posts() ) : the_post();
6378 + while ( have_posts() ) :
6379 + the_post();
6380
6381 - /*
6382 - * Include the post format-specific template for the content. If you want to
6383 - * use this in a child theme, then include a file called content-___.php
6384 - * (where ___ is the post format) and that will be used instead.
6385 - */
6386 - get_template_part( 'content', get_post_format() );
6387 + /*
6388 + * Include the post format-specific template for the content. If you want to
6389 + * use this in a child theme, then include a file called content-___.php
6390 + * (where ___ is the post format) and that will be used instead.
6391 + */
6392 + get_template_part( 'content', get_post_format() );
6393
6394 endwhile;
6395 // Previous/next post navigation.
6396 @@ -38,7 +39,7 @@ get_header(); ?>
6397 get_template_part( 'content', 'none' );
6398
6399 endif;
6400 - ?>
6401 + ?>
6402
6403 </div><!-- #content -->
6404 </section><!-- #primary -->
6405
6406 diff --git a/themes/twentyfourteen/sidebar.php b/themes/twentyfourteen/sidebar.php
6407 index be3c8e02..60800ffe 100644
6408 --- a/themes/twentyfourteen/sidebar.php
6409 +++ b/themes/twentyfourteen/sidebar.php
6410 @@ -10,8 +10,8 @@
6411 <div id="secondary">
6412 <?php
6413 $description = get_bloginfo( 'description', 'display' );
6414 - if ( ! empty ( $description ) ) :
6415 - ?>
6416 + if ( ! empty( $description ) ) :
6417 + ?>
6418 <h2 class="site-description"><?php echo esc_html( $description ); ?></h2>
6419 <?php endif; ?>
6420
6421
6422 diff --git a/themes/twentyfourteen/single.php b/themes/twentyfourteen/single.php
6423 index e089165e..1940c732 100644
6424 --- a/themes/twentyfourteen/single.php
6425 +++ b/themes/twentyfourteen/single.php
6426 @@ -13,22 +13,23 @@ get_header(); ?>
6427 <div id="content" class="site-content" role="main">
6428 <?php
6429 // Start the Loop.
6430 - while ( have_posts() ) : the_post();
6431 + while ( have_posts() ) :
6432 + the_post();
6433
6434 - /*
6435 - * Include the post format-specific template for the content. If you want to
6436 - * use this in a child theme, then include a file called content-___.php
6437 - * (where ___ is the post format) and that will be used instead.
6438 - */
6439 - get_template_part( 'content', get_post_format() );
6440 + /*
6441 + * Include the post format-specific template for the content. If you want to
6442 + * use this in a child theme, then include a file called content-___.php
6443 + * (where ___ is the post format) and that will be used instead.
6444 + */
6445 + get_template_part( 'content', get_post_format() );
6446
6447 - // Previous/next post navigation.
6448 - twentyfourteen_post_nav();
6449 + // Previous/next post navigation.
6450 + twentyfourteen_post_nav();
6451
6452 - // If comments are open or we have at least one comment, load up the comment template.
6453 - if ( comments_open() || get_comments_number() ) {
6454 - comments_template();
6455 - }
6456 + // If comments are open or we have at least one comment, load up the comment template.
6457 + if ( comments_open() || get_comments_number() ) {
6458 + comments_template();
6459 + }
6460 endwhile;
6461 ?>
6462 </div><!-- #content -->
6463
6464 diff --git a/themes/twentyfourteen/style.css b/themes/twentyfourteen/style.css
6465 index 162d2375..94ce71b3 100644
6466 --- a/themes/twentyfourteen/style.css
6467 +++ b/themes/twentyfourteen/style.css
6468 @@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyfourteen/
6469 Author: the WordPress team
6470 Author URI: https://wordpress.org/
6471 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.
6472 -Version: 2.4
6473 +Version: 2.6
6474 License: GNU General Public License v2 or later
6475 License URI: http://www.gnu.org/licenses/gpl-2.0.html
6476 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
6477 @@ -1405,7 +1405,6 @@ a.post-thumbnail:hover {
6478 box-shadow: 1px 1px 1px rgba(0,0,0,.8);
6479 color: #000;
6480 height: 36px;
6481 - margin: -28px 0 0 -24px; /* Keep centered on video (container includes visible controls bar) */
6482 width: 48px;
6483 }
6484
6485 @@ -1415,7 +1414,7 @@ a.post-thumbnail:hover {
6486 content: '\f452';
6487 display: inline-block;
6488 font: normal 32px/1.125 Genericons;
6489 - position: absolute;
6490 + position: relative;
6491 top: 1px;
6492 left: 10px;
6493 }
6494
6495 diff --git a/themes/twentyfourteen/tag.php b/themes/twentyfourteen/tag.php
6496 index 5930d2cf..3a3a3c5e 100644
6497 --- a/themes/twentyfourteen/tag.php
6498 +++ b/themes/twentyfourteen/tag.php
6499 @@ -4,7 +4,7 @@
6500 *
6501 * Used to display archive-type pages for posts in a tag.
6502 *
6503 - * @link https://codex.wordpress.org/Template_Hierarchy
6504 + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
6505 *
6506 * @package WordPress
6507 * @subpackage Twenty_Fourteen
6508 @@ -24,22 +24,23 @@ get_header(); ?>
6509 <?php
6510 // Show an optional term description.
6511 $term_description = term_description();
6512 - if ( ! empty( $term_description ) ) :
6513 - printf( '<div class="taxonomy-description">%s</div>', $term_description );
6514 + if ( ! empty( $term_description ) ) :
6515 + printf( '<div class="taxonomy-description">%s</div>', $term_description );
6516 endif;
6517 ?>
6518 </header><!-- .archive-header -->
6519
6520 - <?php
6521 + <?php
6522 // Start the Loop.
6523 - while ( have_posts() ) : the_post();
6524 + while ( have_posts() ) :
6525 + the_post();
6526
6527 - /*
6528 - * Include the post format-specific template for the content. If you want to
6529 - * use this in a child theme, then include a file called content-___.php
6530 - * (where ___ is the post format) and that will be used instead.
6531 - */
6532 - get_template_part( 'content', get_post_format() );
6533 + /*
6534 + * Include the post format-specific template for the content. If you want to
6535 + * use this in a child theme, then include a file called content-___.php
6536 + * (where ___ is the post format) and that will be used instead.
6537 + */
6538 + get_template_part( 'content', get_post_format() );
6539
6540 endwhile;
6541 // Previous/next page navigation.
6542 @@ -50,7 +51,7 @@ get_header(); ?>
6543 get_template_part( 'content', 'none' );
6544
6545 endif;
6546 - ?>
6547 + ?>
6548 </div><!-- #content -->
6549 </section><!-- #primary -->
6550
6551
6552 diff --git a/themes/twentyfourteen/taxonomy-post_format.php b/themes/twentyfourteen/taxonomy-post_format.php
6553 index f7cee9f7..243e8f0c 100644
6554 --- a/themes/twentyfourteen/taxonomy-post_format.php
6555 +++ b/themes/twentyfourteen/taxonomy-post_format.php
6556 @@ -9,7 +9,7 @@
6557 * @todo https://core.trac.wordpress.org/ticket/23257: Add plural versions of Post Format strings
6558 * and remove plurals below.
6559 *
6560 - * @link https://codex.wordpress.org/Template_Hierarchy
6561 + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
6562 *
6563 * @package WordPress
6564 * @subpackage Twenty_Fourteen
6565 @@ -26,8 +26,8 @@ get_header(); ?>
6566 <header class="archive-header">
6567 <h1 class="archive-title">
6568 <?php
6569 - if ( is_tax( 'post_format', 'post-format-aside' ) ) :
6570 - _e( 'Asides', 'twentyfourteen' );
6571 + if ( is_tax( 'post_format', 'post-format-aside' ) ) :
6572 + _e( 'Asides', 'twentyfourteen' );
6573
6574 elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
6575 _e( 'Images', 'twentyfourteen' );
6576 @@ -51,20 +51,21 @@ get_header(); ?>
6577 _e( 'Archives', 'twentyfourteen' );
6578
6579 endif;
6580 - ?>
6581 + ?>
6582 </h1>
6583 </header><!-- .archive-header -->
6584
6585 - <?php
6586 + <?php
6587 // Start the Loop.
6588 - while ( have_posts() ) : the_post();
6589 + while ( have_posts() ) :
6590 + the_post();
6591
6592 - /*
6593 - * Include the post format-specific template for the content. If you want to
6594 - * use this in a child theme, then include a file called content-___.php
6595 - * (where ___ is the post format) and that will be used instead.
6596 - */
6597 - get_template_part( 'content', get_post_format() );
6598 + /*
6599 + * Include the post format-specific template for the content. If you want to
6600 + * use this in a child theme, then include a file called content-___.php
6601 + * (where ___ is the post format) and that will be used instead.
6602 + */
6603 + get_template_part( 'content', get_post_format() );
6604
6605 endwhile;
6606 // Previous/next page navigation.
6607 @@ -75,7 +76,7 @@ get_header(); ?>
6608 get_template_part( 'content', 'none' );
6609
6610 endif;
6611 - ?>
6612 + ?>
6613 </div><!-- #content -->
6614 </section><!-- #primary -->
6615
6616
6617 diff --git a/themes/twentysixteen/archive.php b/themes/twentysixteen/archive.php
6618 index bdd2967e..079730f3 100644
6619 --- a/themes/twentysixteen/archive.php
6620 +++ b/themes/twentysixteen/archive.php
6621 @@ -9,7 +9,7 @@
6622 * new template file for each one. For example, tag.php (Tag archives),
6623 * category.php (Category archives), author.php (Author archives), etc.
6624 *
6625 - * @link https://codex.wordpress.org/Template_Hierarchy
6626 + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
6627 *
6628 * @package WordPress
6629 * @subpackage Twenty_Sixteen
6630 @@ -32,7 +32,8 @@ get_header(); ?>
6631
6632 <?php
6633 // Start the Loop.
6634 - while ( have_posts() ) : the_post();
6635 + while ( have_posts() ) :
6636 + the_post();
6637
6638 /*
6639 * Include the Post-Format-specific template for the content.
6640 @@ -41,17 +42,19 @@ get_header(); ?>
6641 */
6642 get_template_part( 'template-parts/content', get_post_format() );
6643
6644 - // End the loop.
6645 + // End the loop.
6646 endwhile;
6647
6648 // Previous/next page navigation.
6649 - the_posts_pagination( array(
6650 - 'prev_text' => __( 'Previous page', 'twentysixteen' ),
6651 - 'next_text' => __( 'Next page', 'twentysixteen' ),
6652 - 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
6653 - ) );
6654 + the_posts_pagination(
6655 + array(
6656 + 'prev_text' => __( 'Previous page', 'twentysixteen' ),
6657 + 'next_text' => __( 'Next page', 'twentysixteen' ),
6658 + 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
6659 + )
6660 + );
6661
6662 - // If no content, include the "No posts found" template.
6663 + // If no content, include the "No posts found" template.
6664 else :
6665 get_template_part( 'template-parts/content', 'none' );
6666
6667
6668 diff --git a/themes/twentysixteen/comments.php b/themes/twentysixteen/comments.php
6669 index 7ff5b32d..a0a29d57 100644
6670 --- a/themes/twentysixteen/comments.php
6671 +++ b/themes/twentysixteen/comments.php
6672 @@ -26,23 +26,23 @@ if ( post_password_required() ) {
6673 <h2 class="comments-title">
6674 <?php
6675 $comments_number = get_comments_number();
6676 - if ( '1' === $comments_number ) {
6677 - /* translators: %s: post title */
6678 - printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentysixteen' ), get_the_title() );
6679 - } else {
6680 - printf(
6681 - /* translators: 1: number of comments, 2: post title */
6682 - _nx(
6683 - '%1$s thought on &ldquo;%2$s&rdquo;',
6684 - '%1$s thoughts on &ldquo;%2$s&rdquo;',
6685 - $comments_number,
6686 - 'comments title',
6687 - 'twentysixteen'
6688 - ),
6689 - number_format_i18n( $comments_number ),
6690 - get_the_title()
6691 - );
6692 - }
6693 + if ( '1' === $comments_number ) {
6694 + /* translators: %s: post title */
6695 + printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentysixteen' ), get_the_title() );
6696 + } else {
6697 + printf(
6698 + /* translators: 1: number of comments, 2: post title */
6699 + _nx(
6700 + '%1$s thought on &ldquo;%2$s&rdquo;',
6701 + '%1$s thoughts on &ldquo;%2$s&rdquo;',
6702 + $comments_number,
6703 + 'comments title',
6704 + 'twentysixteen'
6705 + ),
6706 + number_format_i18n( $comments_number ),
6707 + get_the_title()
6708 + );
6709 + }
6710 ?>
6711 </h2>
6712
6713 @@ -50,11 +50,13 @@ if ( post_password_required() ) {
6714
6715 <ol class="comment-list">
6716 <?php
6717 - wp_list_comments( array(
6718 - 'style' => 'ol',
6719 - 'short_ping' => true,
6720 - 'avatar_size' => 42,
6721 - ) );
6722 + wp_list_comments(
6723 + array(
6724 + 'style' => 'ol',
6725 + 'short_ping' => true,
6726 + 'avatar_size' => 42,
6727 + )
6728 + );
6729 ?>
6730 </ol><!-- .comment-list -->
6731
6732 @@ -64,16 +66,18 @@ if ( post_password_required() ) {
6733
6734 <?php
6735 // If comments are closed and there are comments, let's leave a little note, shall we?
6736 - if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
6737 - ?>
6738 - <p class="no-comments"><?php _e( 'Comments are closed.', 'twentysixteen' ); ?></p>
6739 + if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
6740 + ?>
6741 + <p class="no-comments"><?php _e( 'Comments are closed.', 'twentysixteen' ); ?></p>
6742 <?php endif; ?>
6743
6744 <?php
6745 - comment_form( array(
6746 - 'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
6747 - 'title_reply_after' => '</h2>',
6748 - ) );
6749 - ?>
6750 + comment_form(
6751 + array(
6752 + 'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
6753 + 'title_reply_after' => '</h2>',
6754 + )
6755 + );
6756 + ?>
6757
6758 </div><!-- .comments-area -->
6759
6760 diff --git a/themes/twentysixteen/css/blocks.css b/themes/twentysixteen/css/blocks.css
6761 index ae742241..9ddea807 100644
6762 --- a/themes/twentysixteen/css/blocks.css
6763 +++ b/themes/twentysixteen/css/blocks.css
6764 @@ -232,13 +232,12 @@ p.has-drop-cap:not(:focus)::first-letter {
6765 /* Buttons */
6766
6767 .wp-block-button .wp-block-button__link {
6768 - border: 0;
6769 - border-radius: 2px;
6770 + box-shadow: none;
6771 font-family: Montserrat, "Helvetica Neue", sans-serif;
6772 font-weight: 700;
6773 letter-spacing: 0.046875em;
6774 line-height: 1;
6775 - padding: 0.84375em 0.875em 0.78125em;
6776 + padding: 0.84375em 1.3125em 0.78125em;
6777 text-transform: uppercase;
6778 }
6779
6780 @@ -247,8 +246,20 @@ p.has-drop-cap:not(:focus)::first-letter {
6781 color: #fff;
6782 }
6783
6784 +.entry-content .is-style-outline .wp-block-button__link:not(.has-background) {
6785 + background: transparent;
6786 +}
6787 +
6788 +.entry-content .is-style-outline .wp-block-button__link:not(.has-text-color) {
6789 + color: #1a1a1a;
6790 +}
6791 +
6792 .entry-content .wp-block-button__link:hover,
6793 -.entry-content .wp-block-button__link:focus {
6794 +.entry-content .wp-block-button__link:focus,
6795 +.entry-content .is-style-outline .wp-block-button__link:not(.has-background):hover,
6796 +.entry-content .is-style-outline .wp-block-button__link:not(.has-background):focus,
6797 +.entry-content .is-style-outline .wp-block-button__link:not(.has-text-color):hover,
6798 +.entry-content .is-style-outline .wp-block-button__link:not(.has-text-color):focus {
6799 background: #007acc;
6800 color: #fff;
6801 }
6802
6803 diff --git a/themes/twentysixteen/css/editor-blocks.css b/themes/twentysixteen/css/editor-blocks.css
6804 index 802353bf..4bf8cbf5 100644
6805 --- a/themes/twentysixteen/css/editor-blocks.css
6806 +++ b/themes/twentysixteen/css/editor-blocks.css
6807 @@ -543,18 +543,23 @@ Description: Used to style blocks in the editor.
6808 /* Buttons */
6809
6810 .wp-block-button .wp-block-button__link {
6811 - background: #1a1a1a;
6812 - border: 0;
6813 - border-radius: 2px;
6814 - color: #fff;
6815 font-family: Montserrat, "Helvetica Neue", sans-serif;
6816 font-weight: 700;
6817 letter-spacing: 0.046875em;
6818 line-height: 1;
6819 - padding: 0.84375em 0.875em 0.78125em;
6820 + padding: 0.84375em 1.3125em 0.78125em;
6821 text-transform: uppercase;
6822 }
6823
6824 +.wp-block-button__link {
6825 + background: #1a1a1a;
6826 + color: #fff;
6827 +}
6828 +
6829 +.is-style-outline .wp-block-button__link {
6830 + color: #1a1a1a;
6831 +}
6832 +
6833 /* Media & Text */
6834
6835 .wp-block-media-text *:last-child {
6836
6837 diff --git a/themes/twentysixteen/footer.php b/themes/twentysixteen/footer.php
6838 index baa82092..5fff3bd9 100644
6839 --- a/themes/twentysixteen/footer.php
6840 +++ b/themes/twentysixteen/footer.php
6841 @@ -16,10 +16,12 @@
6842 <?php if ( has_nav_menu( 'primary' ) ) : ?>
6843 <nav class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Primary Menu', 'twentysixteen' ); ?>">
6844 <?php
6845 - wp_nav_menu( array(
6846 - 'theme_location' => 'primary',
6847 - 'menu_class' => 'primary-menu',
6848 - ) );
6849 + wp_nav_menu(
6850 + array(
6851 + 'theme_location' => 'primary',
6852 + 'menu_class' => 'primary-menu',
6853 + )
6854 + );
6855 ?>
6856 </nav><!-- .main-navigation -->
6857 <?php endif; ?>
6858 @@ -27,13 +29,15 @@
6859 <?php if ( has_nav_menu( 'social' ) ) : ?>
6860 <nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Social Links Menu', 'twentysixteen' ); ?>">
6861 <?php
6862 - wp_nav_menu( array(
6863 - 'theme_location' => 'social',
6864 - 'menu_class' => 'social-links-menu',
6865 - 'depth' => 1,
6866 - 'link_before' => '<span class="screen-reader-text">',
6867 - 'link_after' => '</span>',
6868 - ) );
6869 + wp_nav_menu(
6870 + array(
6871 + 'theme_location' => 'social',
6872 + 'menu_class' => 'social-links-menu',
6873 + 'depth' => 1,
6874 + 'link_before' => '<span class="screen-reader-text">',
6875 + 'link_after' => '</span>',
6876 + )
6877 + );
6878 ?>
6879 </nav><!-- .social-navigation -->
6880 <?php endif; ?>
6881
6882 diff --git a/themes/twentysixteen/functions.php b/themes/twentysixteen/functions.php
6883 index 1bade4ca..2c47a2d2 100644
6884 --- a/themes/twentysixteen/functions.php
6885 +++ b/themes/twentysixteen/functions.php
6886 @@ -33,173 +33,187 @@ if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) {
6887 }
6888
6889 if ( ! function_exists( 'twentysixteen_setup' ) ) :
6890 -/**
6891 - * Sets up theme defaults and registers support for various WordPress features.
6892 - *
6893 - * Note that this function is hooked into the after_setup_theme hook, which
6894 - * runs before the init hook. The init hook is too late for some features, such
6895 - * as indicating support for post thumbnails.
6896 - *
6897 - * Create your own twentysixteen_setup() function to override in a child theme.
6898 - *
6899 - * @since Twenty Sixteen 1.0
6900 - */
6901 -function twentysixteen_setup() {
6902 - /*
6903 - * Make theme available for translation.
6904 - * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentysixteen
6905 - * If you're building a theme based on Twenty Sixteen, use a find and replace
6906 - * to change 'twentysixteen' to the name of your theme in all the template files
6907 - */
6908 - load_theme_textdomain( 'twentysixteen' );
6909 -
6910 - // Add default posts and comments RSS feed links to head.
6911 - add_theme_support( 'automatic-feed-links' );
6912 -
6913 - /*
6914 - * Let WordPress manage the document title.
6915 - * By adding theme support, we declare that this theme does not use a
6916 - * hard-coded <title> tag in the document head, and expect WordPress to
6917 - * provide it for us.
6918 - */
6919 - add_theme_support( 'title-tag' );
6920 -
6921 - /*
6922 - * Enable support for custom logo.
6923 + /**
6924 + * Sets up theme defaults and registers support for various WordPress features.
6925 *
6926 - * @since Twenty Sixteen 1.2
6927 - */
6928 - add_theme_support( 'custom-logo', array(
6929 - 'height' => 240,
6930 - 'width' => 240,
6931 - 'flex-height' => true,
6932 - ) );
6933 -
6934 - /*
6935 - * Enable support for Post Thumbnails on posts and pages.
6936 + * Note that this function is hooked into the after_setup_theme hook, which
6937 + * runs before the init hook. The init hook is too late for some features, such
6938 + * as indicating support for post thumbnails.
6939 *
6940 - * @link https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
6941 - */
6942 - add_theme_support( 'post-thumbnails' );
6943 - set_post_thumbnail_size( 1200, 9999 );
6944 -
6945 - // This theme uses wp_nav_menu() in two locations.
6946 - register_nav_menus( array(
6947 - 'primary' => __( 'Primary Menu', 'twentysixteen' ),
6948 - 'social' => __( 'Social Links Menu', 'twentysixteen' ),
6949 - ) );
6950 -
6951 - /*
6952 - * Switch default core markup for search form, comment form, and comments
6953 - * to output valid HTML5.
6954 - */
6955 - add_theme_support( 'html5', array(
6956 - 'search-form',
6957 - 'comment-form',
6958 - 'comment-list',
6959 - 'gallery',
6960 - 'caption',
6961 - ) );
6962 -
6963 - /*
6964 - * Enable support for Post Formats.
6965 + * Create your own twentysixteen_setup() function to override in a child theme.
6966 *
6967 - * See: https://codex.wordpress.org/Post_Formats
6968 - */
6969 - add_theme_support( 'post-formats', array(
6970 - 'aside',
6971 - 'image',
6972 - 'video',
6973 - 'quote',
6974 - 'link',
6975 - 'gallery',
6976 - 'status',
6977 - 'audio',
6978 - 'chat',
6979 - ) );
6980 -
6981 - /*
6982 - * This theme styles the visual editor to resemble the theme style,
6983 - * specifically font, colors, icons, and column width.
6984 + * @since Twenty Sixteen 1.0
6985 */
6986 - add_editor_style( array( 'css/editor-style.css', twentysixteen_fonts_url() ) );
6987 -
6988 - // Load regular editor styles into the new block-based editor.
6989 - add_theme_support( 'editor-styles' );
6990 -
6991 - // Load default block styles.
6992 - add_theme_support( 'wp-block-styles' );
6993 -
6994 - // Add support for responsive embeds.
6995 - add_theme_support( 'responsive-embeds' );
6996 -
6997 - // Add support for custom color scheme.
6998 - add_theme_support( 'editor-color-palette', array(
6999 - array(
7000 - 'name' => __( 'Dark Gray', 'twentysixteen' ),
7001 - 'slug' => 'dark-gray',
7002 - 'color' => '#1a1a1a',
7003 - ),
7004 - array(
7005 - 'name' => __( 'Medium Gray', 'twentysixteen' ),
7006 - 'slug' => 'medium-gray',
7007 - 'color' => '#686868',
7008 - ),
7009 - array(
7010 - 'name' => __( 'Light Gray', 'twentysixteen' ),
7011 - 'slug' => 'light-gray',
7012 - 'color' => '#e5e5e5',
7013 - ),
7014 - array(
7015 - 'name' => __( 'White', 'twentysixteen' ),
7016 - 'slug' => 'white',
7017 - 'color' => '#fff',
7018 - ),
7019 - array(
7020 - 'name' => __( 'Blue Gray', 'twentysixteen' ),
7021 - 'slug' => 'blue-gray',
7022 - 'color' => '#4d545c',
7023 - ),
7024 - array(
7025 - 'name' => __( 'Bright Blue', 'twentysixteen' ),
7026 - 'slug' => 'bright-blue',
7027 - 'color' => '#007acc',
7028 - ),
7029 - array(
7030 - 'name' => __( 'Light Blue', 'twentysixteen' ),
7031 - 'slug' => 'light-blue',
7032 - 'color' => '#9adffd',
7033 - ),
7034 - array(
7035 - 'name' => __( 'Dark Brown', 'twentysixteen' ),
7036 - 'slug' => 'dark-brown',
7037 - 'color' => '#402b30',
7038 - ),
7039 - array(
7040 - 'name' => __( 'Medium Brown', 'twentysixteen' ),
7041 - 'slug' => 'medium-brown',
7042 - 'color' => '#774e24',
7043 - ),
7044 - array(
7045 - 'name' => __( 'Dark Red', 'twentysixteen' ),
7046 - 'slug' => 'dark-red',
7047 - 'color' => '#640c1f',
7048 - ),
7049 - array(
7050 - 'name' => __( 'Bright Red', 'twentysixteen' ),
7051 - 'slug' => 'bright-red',
7052 - 'color' => '#ff675f',
7053 - ),
7054 - array(
7055 - 'name' => __( 'Yellow', 'twentysixteen' ),
7056 - 'slug' => 'yellow',
7057 - 'color' => '#ffef8e',
7058 - ),
7059 - ) );
7060 -
7061 - // Indicate widget sidebars can use selective refresh in the Customizer.
7062 - add_theme_support( 'customize-selective-refresh-widgets' );
7063 -}
7064 + function twentysixteen_setup() {
7065 + /*
7066 + * Make theme available for translation.
7067 + * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentysixteen
7068 + * If you're building a theme based on Twenty Sixteen, use a find and replace
7069 + * to change 'twentysixteen' to the name of your theme in all the template files
7070 + */
7071 + load_theme_textdomain( 'twentysixteen' );
7072 +
7073 + // Add default posts and comments RSS feed links to head.
7074 + add_theme_support( 'automatic-feed-links' );
7075 +
7076 + /*
7077 + * Let WordPress manage the document title.
7078 + * By adding theme support, we declare that this theme does not use a
7079 + * hard-coded <title> tag in the document head, and expect WordPress to
7080 + * provide it for us.
7081 + */
7082 + add_theme_support( 'title-tag' );
7083 +
7084 + /*
7085 + * Enable support for custom logo.
7086 + *
7087 + * @since Twenty Sixteen 1.2
7088 + */
7089 + add_theme_support(
7090 + 'custom-logo',
7091 + array(
7092 + 'height' => 240,
7093 + 'width' => 240,
7094 + 'flex-height' => true,
7095 + )
7096 + );
7097 +
7098 + /*
7099 + * Enable support for Post Thumbnails on posts and pages.
7100 + *
7101 + * @link https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
7102 + */
7103 + add_theme_support( 'post-thumbnails' );
7104 + set_post_thumbnail_size( 1200, 9999 );
7105 +
7106 + // This theme uses wp_nav_menu() in two locations.
7107 + register_nav_menus(
7108 + array(
7109 + 'primary' => __( 'Primary Menu', 'twentysixteen' ),
7110 + 'social' => __( 'Social Links Menu', 'twentysixteen' ),
7111 + )
7112 + );
7113 +
7114 + /*
7115 + * Switch default core markup for search form, comment form, and comments
7116 + * to output valid HTML5.
7117 + */
7118 + add_theme_support(
7119 + 'html5',
7120 + array(
7121 + 'search-form',
7122 + 'comment-form',
7123 + 'comment-list',
7124 + 'gallery',
7125 + 'caption',
7126 + )
7127 + );
7128 +
7129 + /*
7130 + * Enable support for Post Formats.
7131 + *
7132 + * See: https://codex.wordpress.org/Post_Formats
7133 + */
7134 + add_theme_support(
7135 + 'post-formats',
7136 + array(
7137 + 'aside',
7138 + 'image',
7139 + 'video',
7140 + 'quote',
7141 + 'link',
7142 + 'gallery',
7143 + 'status',
7144 + 'audio',
7145 + 'chat',
7146 + )
7147 + );
7148 +
7149 + /*
7150 + * This theme styles the visual editor to resemble the theme style,
7151 + * specifically font, colors, icons, and column width.
7152 + */
7153 + add_editor_style( array( 'css/editor-style.css', twentysixteen_fonts_url() ) );
7154 +
7155 + // Load regular editor styles into the new block-based editor.
7156 + add_theme_support( 'editor-styles' );
7157 +
7158 + // Load default block styles.
7159 + add_theme_support( 'wp-block-styles' );
7160 +
7161 + // Add support for responsive embeds.
7162 + add_theme_support( 'responsive-embeds' );
7163 +
7164 + // Add support for custom color scheme.
7165 + add_theme_support(
7166 + 'editor-color-palette',
7167 + array(
7168 + array(
7169 + 'name' => __( 'Dark Gray', 'twentysixteen' ),
7170 + 'slug' => 'dark-gray',
7171 + 'color' => '#1a1a1a',
7172 + ),
7173 + array(
7174 + 'name' => __( 'Medium Gray', 'twentysixteen' ),
7175 + 'slug' => 'medium-gray',
7176 + 'color' => '#686868',
7177 + ),
7178 + array(
7179 + 'name' => __( 'Light Gray', 'twentysixteen' ),
7180 + 'slug' => 'light-gray',
7181 + 'color' => '#e5e5e5',
7182 + ),
7183 + array(
7184 + 'name' => __( 'White', 'twentysixteen' ),
7185 + 'slug' => 'white',
7186 + 'color' => '#fff',
7187 + ),
7188 + array(
7189 + 'name' => __( 'Blue Gray', 'twentysixteen' ),
7190 + 'slug' => 'blue-gray',
7191 + 'color' => '#4d545c',
7192 + ),
7193 + array(
7194 + 'name' => __( 'Bright Blue', 'twentysixteen' ),
7195 + 'slug' => 'bright-blue',
7196 + 'color' => '#007acc',
7197 + ),
7198 + array(
7199 + 'name' => __( 'Light Blue', 'twentysixteen' ),
7200 + 'slug' => 'light-blue',
7201 + 'color' => '#9adffd',
7202 + ),
7203 + array(
7204 + 'name' => __( 'Dark Brown', 'twentysixteen' ),
7205 + 'slug' => 'dark-brown',
7206 + 'color' => '#402b30',
7207 + ),
7208 + array(
7209 + 'name' => __( 'Medium Brown', 'twentysixteen' ),
7210 + 'slug' => 'medium-brown',
7211 + 'color' => '#774e24',
7212 + ),
7213 + array(
7214 + 'name' => __( 'Dark Red', 'twentysixteen' ),
7215 + 'slug' => 'dark-red',
7216 + 'color' => '#640c1f',
7217 + ),
7218 + array(
7219 + 'name' => __( 'Bright Red', 'twentysixteen' ),
7220 + 'slug' => 'bright-red',
7221 + 'color' => '#ff675f',
7222 + ),
7223 + array(
7224 + 'name' => __( 'Yellow', 'twentysixteen' ),
7225 + 'slug' => 'yellow',
7226 + 'color' => '#ffef8e',
7227 + ),
7228 + )
7229 + );
7230 +
7231 + // Indicate widget sidebars can use selective refresh in the Customizer.
7232 + add_theme_support( 'customize-selective-refresh-widgets' );
7233 + }
7234 endif; // twentysixteen_setup
7235 add_action( 'after_setup_theme', 'twentysixteen_setup' );
7236
7237 @@ -217,6 +231,27 @@ function twentysixteen_content_width() {
7238 }
7239 add_action( 'after_setup_theme', 'twentysixteen_content_width', 0 );
7240
7241 +/**
7242 + * Add preconnect for Google Fonts.
7243 + *
7244 + * @since Twenty Sixteen 1.6
7245 + *
7246 + * @param array $urls URLs to print for resource hints.
7247 + * @param string $relation_type The relation type the URLs are printed.
7248 + * @return array $urls URLs to print for resource hints.
7249 + */
7250 +function twentysixteen_resource_hints( $urls, $relation_type ) {
7251 + if ( wp_style_is( 'twentysixteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) {
7252 + $urls[] = array(
7253 + 'href' => 'https://fonts.gstatic.com',
7254 + 'crossorigin',
7255 + );
7256 + }
7257 +
7258 + return $urls;
7259 +}
7260 +add_filter( 'wp_resource_hints', 'twentysixteen_resource_hints', 10, 2 );
7261 +
7262 /**
7263 * Registers a widget area.
7264 *
7265 @@ -225,77 +260,86 @@ add_action( 'after_setup_theme', 'twentysixteen_content_width', 0 );
7266 * @since Twenty Sixteen 1.0
7267 */
7268 function twentysixteen_widgets_init() {
7269 - register_sidebar( array(
7270 - 'name' => __( 'Sidebar', 'twentysixteen' ),
7271 - 'id' => 'sidebar-1',
7272 - 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentysixteen' ),
7273 - 'before_widget' => '<section id="%1$s" class="widget %2$s">',
7274 - 'after_widget' => '</section>',
7275 - 'before_title' => '<h2 class="widget-title">',
7276 - 'after_title' => '</h2>',
7277 - ) );
7278 -
7279 - register_sidebar( array(
7280 - 'name' => __( 'Content Bottom 1', 'twentysixteen' ),
7281 - 'id' => 'sidebar-2',
7282 - 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
7283 - 'before_widget' => '<section id="%1$s" class="widget %2$s">',
7284 - 'after_widget' => '</section>',
7285 - 'before_title' => '<h2 class="widget-title">',
7286 - 'after_title' => '</h2>',
7287 - ) );
7288 -
7289 - register_sidebar( array(
7290 - 'name' => __( 'Content Bottom 2', 'twentysixteen' ),
7291 - 'id' => 'sidebar-3',
7292 - 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
7293 - 'before_widget' => '<section id="%1$s" class="widget %2$s">',
7294 - 'after_widget' => '</section>',
7295 - 'before_title' => '<h2 class="widget-title">',
7296 - 'after_title' => '</h2>',
7297 - ) );
7298 + register_sidebar(
7299 + array(
7300 + 'name' => __( 'Sidebar', 'twentysixteen' ),
7301 + 'id' => 'sidebar-1',
7302 + 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentysixteen' ),
7303 + 'before_widget' => '<section id="%1$s" class="widget %2$s">',
7304 + 'after_widget' => '</section>',
7305 + 'before_title' => '<h2 class="widget-title">',
7306 + 'after_title' => '</h2>',
7307 + )
7308 + );
7309 +
7310 + register_sidebar(
7311 + array(
7312 + 'name' => __( 'Content Bottom 1', 'twentysixteen' ),
7313 + 'id' => 'sidebar-2',
7314 + 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
7315 + 'before_widget' => '<section id="%1$s" class="widget %2$s">',
7316 + 'after_widget' => '</section>',
7317 + 'before_title' => '<h2 class="widget-title">',
7318 + 'after_title' => '</h2>',
7319 + )
7320 + );
7321 +
7322 + register_sidebar(
7323 + array(
7324 + 'name' => __( 'Content Bottom 2', 'twentysixteen' ),
7325 + 'id' => 'sidebar-3',
7326 + 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
7327 + 'before_widget' => '<section id="%1$s" class="widget %2$s">',
7328 + 'after_widget' => '</section>',
7329 + 'before_title' => '<h2 class="widget-title">',
7330 + 'after_title' => '</h2>',
7331 + )
7332 + );
7333 }
7334 add_action( 'widgets_init', 'twentysixteen_widgets_init' );
7335
7336 if ( ! function_exists( 'twentysixteen_fonts_url' ) ) :
7337 -/**
7338 - * Register Google fonts for Twenty Sixteen.
7339 - *
7340 - * Create your own twentysixteen_fonts_url() function to override in a child theme.
7341 - *
7342 - * @since Twenty Sixteen 1.0
7343 - *
7344 - * @return string Google fonts URL for the theme.
7345 - */
7346 -function twentysixteen_fonts_url() {
7347 - $fonts_url = '';
7348 - $fonts = array();
7349 - $subsets = 'latin,latin-ext';
7350 -
7351 - /* translators: If there are characters in your language that are not supported by Merriweather, translate this to 'off'. Do not translate into your own language. */
7352 - if ( 'off' !== _x( 'on', 'Merriweather font: on or off', 'twentysixteen' ) ) {
7353 - $fonts[] = 'Merriweather:400,700,900,400italic,700italic,900italic';
7354 - }
7355 + /**
7356 + * Register Google fonts for Twenty Sixteen.
7357 + *
7358 + * Create your own twentysixteen_fonts_url() function to override in a child theme.
7359 + *
7360 + * @since Twenty Sixteen 1.0
7361 + *
7362 + * @return string Google fonts URL for the theme.
7363 + */
7364 + function twentysixteen_fonts_url() {
7365 + $fonts_url = '';
7366 + $fonts = array();
7367 + $subsets = 'latin,latin-ext';
7368 +
7369 + /* translators: If there are characters in your language that are not supported by Merriweather, translate this to 'off'. Do not translate into your own language. */
7370 + if ( 'off' !== _x( 'on', 'Merriweather font: on or off', 'twentysixteen' ) ) {
7371 + $fonts[] = 'Merriweather:400,700,900,400italic,700italic,900italic';
7372 + }
7373
7374 - /* translators: If there are characters in your language that are not supported by Montserrat, translate this to 'off'. Do not translate into your own language. */
7375 - if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'twentysixteen' ) ) {
7376 - $fonts[] = 'Montserrat:400,700';
7377 - }
7378 + /* translators: If there are characters in your language that are not supported by Montserrat, translate this to 'off'. Do not translate into your own language. */
7379 + if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'twentysixteen' ) ) {
7380 + $fonts[] = 'Montserrat:400,700';
7381 + }
7382
7383 - /* translators: If there are characters in your language that are not supported by Inconsolata, translate this to 'off'. Do not translate into your own language. */
7384 - if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentysixteen' ) ) {
7385 - $fonts[] = 'Inconsolata:400';
7386 - }
7387 + /* translators: If there are characters in your language that are not supported by Inconsolata, translate this to 'off'. Do not translate into your own language. */
7388 + if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentysixteen' ) ) {
7389 + $fonts[] = 'Inconsolata:400';
7390 + }
7391
7392 - if ( $fonts ) {
7393 - $fonts_url = add_query_arg( array(
7394 - 'family' => urlencode( implode( '|', $fonts ) ),
7395 - 'subset' => urlencode( $subsets ),
7396 - ), 'https://fonts.googleapis.com/css' );
7397 - }
7398 + if ( $fonts ) {
7399 + $fonts_url = add_query_arg(
7400 + array(
7401 + 'family' => urlencode( implode( '|', $fonts ) ),
7402 + 'subset' => urlencode( $subsets ),
7403 + ),
7404 + 'https://fonts.googleapis.com/css'
7405 + );
7406 + }
7407
7408 - return $fonts_url;
7409 -}
7410 + return $fonts_url;
7411 + }
7412 endif;
7413
7414 /**
7415 @@ -326,7 +370,7 @@ function twentysixteen_scripts() {
7416 wp_enqueue_style( 'twentysixteen-style', get_stylesheet_uri() );
7417
7418 // Theme block stylesheet.
7419 - wp_enqueue_style( 'twentysixteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentysixteen-style' ), '20181018' );
7420 + wp_enqueue_style( 'twentysixteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentysixteen-style' ), '20181230' );
7421
7422 // Load the Internet Explorer specific stylesheet.
7423 wp_enqueue_style( 'twentysixteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentysixteen-style' ), '20160816' );
7424 @@ -354,12 +398,16 @@ function twentysixteen_scripts() {
7425 wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20160816' );
7426 }
7427
7428 - wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160816', true );
7429 + wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20181230', true );
7430
7431 - wp_localize_script( 'twentysixteen-script', 'screenReaderText', array(
7432 - 'expand' => __( 'expand child menu', 'twentysixteen' ),
7433 - 'collapse' => __( 'collapse child menu', 'twentysixteen' ),
7434 - ) );
7435 + wp_localize_script(
7436 + 'twentysixteen-script',
7437 + 'screenReaderText',
7438 + array(
7439 + 'expand' => __( 'expand child menu', 'twentysixteen' ),
7440 + 'collapse' => __( 'collapse child menu', 'twentysixteen' ),
7441 + )
7442 + );
7443 }
7444 add_action( 'wp_enqueue_scripts', 'twentysixteen_scripts' );
7445
7446 @@ -370,7 +418,7 @@ add_action( 'wp_enqueue_scripts', 'twentysixteen_scripts' );
7447 */
7448 function twentysixteen_block_editor_styles() {
7449 // Block styles.
7450 - wp_enqueue_style( 'twentysixteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
7451 + wp_enqueue_style( 'twentysixteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20181230' );
7452 // Add custom fonts.
7453 wp_enqueue_style( 'twentysixteen-fonts', twentysixteen_fonts_url(), array(), null );
7454 }
7455 @@ -422,10 +470,10 @@ function twentysixteen_hex2rgb( $color ) {
7456 $color = trim( $color, '#' );
7457
7458 if ( strlen( $color ) === 3 ) {
7459 - $r = hexdec( substr( $color, 0, 1 ).substr( $color, 0, 1 ) );
7460 - $g = hexdec( substr( $color, 1, 1 ).substr( $color, 1, 1 ) );
7461 - $b = hexdec( substr( $color, 2, 1 ).substr( $color, 2, 1 ) );
7462 - } else if ( strlen( $color ) === 6 ) {
7463 + $r = hexdec( substr( $color, 0, 1 ) . substr( $color, 0, 1 ) );
7464 + $g = hexdec( substr( $color, 1, 1 ) . substr( $color, 1, 1 ) );
7465 + $b = hexdec( substr( $color, 2, 1 ) . substr( $color, 2, 1 ) );
7466 + } elseif ( strlen( $color ) === 6 ) {
7467 $r = hexdec( substr( $color, 0, 2 ) );
7468 $g = hexdec( substr( $color, 2, 2 ) );
7469 $b = hexdec( substr( $color, 4, 2 ) );
7470 @@ -433,7 +481,11 @@ function twentysixteen_hex2rgb( $color ) {
7471 return array();
7472 }
7473
7474 - return array( 'red' => $r, 'green' => $g, 'blue' => $b );
7475 + return array(
7476 + 'red' => $r,
7477 + 'green' => $g,
7478 + 'blue' => $b,
7479 + );
7480 }
7481
7482 /**
7483 @@ -478,7 +530,7 @@ function twentysixteen_content_image_sizes_attr( $sizes, $size ) {
7484
7485 return $sizes;
7486 }
7487 -add_filter( 'wp_calculate_image_sizes', 'twentysixteen_content_image_sizes_attr', 10 , 2 );
7488 +add_filter( 'wp_calculate_image_sizes', 'twentysixteen_content_image_sizes_attr', 10, 2 );
7489
7490 /**
7491 * Add custom image sizes attribute to enhance responsive image functionality
7492 @@ -501,7 +553,7 @@ function twentysixteen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) {
7493 }
7494 return $attr;
7495 }
7496 -add_filter( 'wp_get_attachment_image_attributes', 'twentysixteen_post_thumbnail_sizes_attr', 10 , 3 );
7497 +add_filter( 'wp_get_attachment_image_attributes', 'twentysixteen_post_thumbnail_sizes_attr', 10, 3 );
7498
7499 /**
7500 * Modifies tag cloud widget arguments to display all tags in the same font size
7501
7502 diff --git a/themes/twentysixteen/header.php b/themes/twentysixteen/header.php
7503 index d230c4f8..f264ac2c 100644
7504 --- a/themes/twentysixteen/header.php
7505 +++ b/themes/twentysixteen/header.php
7506 @@ -16,7 +16,7 @@
7507 <meta name="viewport" content="width=device-width, initial-scale=1">
7508 <link rel="profile" href="http://gmpg.org/xfn/11">
7509 <?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
7510 - <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
7511 + <link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
7512 <?php endif; ?>
7513 <?php wp_head(); ?>
7514 </head>
7515 @@ -35,10 +35,12 @@
7516 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
7517 <?php else : ?>
7518 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
7519 - <?php endif;
7520 + <?php
7521 + endif;
7522
7523 $description = get_bloginfo( 'description', 'display' );
7524 - if ( $description || is_customize_preview() ) : ?>
7525 + if ( $description || is_customize_preview() ) :
7526 + ?>
7527 <p class="site-description"><?php echo $description; ?></p>
7528 <?php endif; ?>
7529 </div><!-- .site-branding -->
7530 @@ -50,10 +52,12 @@
7531 <?php if ( has_nav_menu( 'primary' ) ) : ?>
7532 <nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'twentysixteen' ); ?>">
7533 <?php
7534 - wp_nav_menu( array(
7535 - 'theme_location' => 'primary',
7536 - 'menu_class' => 'primary-menu',
7537 - ) );
7538 + wp_nav_menu(
7539 + array(
7540 + 'theme_location' => 'primary',
7541 + 'menu_class' => 'primary-menu',
7542 + )
7543 + );
7544 ?>
7545 </nav><!-- .main-navigation -->
7546 <?php endif; ?>
7547 @@ -61,13 +65,15 @@
7548 <?php if ( has_nav_menu( 'social' ) ) : ?>
7549 <nav id="social-navigation" class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'twentysixteen' ); ?>">
7550 <?php
7551 - wp_nav_menu( array(
7552 - 'theme_location' => 'social',
7553 - 'menu_class' => 'social-links-menu',
7554 - 'depth' => 1,
7555 - 'link_before' => '<span class="screen-reader-text">',
7556 - 'link_after' => '</span>',
7557 - ) );
7558 + wp_nav_menu(
7559 + array(
7560 + 'theme_location' => 'social',
7561 + 'menu_class' => 'social-links-menu',
7562 + 'depth' => 1,
7563 + 'link_before' => '<span class="screen-reader-text">',
7564 + 'link_after' => '</span>',
7565 + )
7566 + );
7567 ?>
7568 </nav><!-- .social-navigation -->
7569 <?php endif; ?>
7570
7571 diff --git a/themes/twentysixteen/image.php b/themes/twentysixteen/image.php
7572 index 434b0b02..5fcbb901 100644
7573 --- a/themes/twentysixteen/image.php
7574 +++ b/themes/twentysixteen/image.php
7575 @@ -14,93 +14,99 @@ get_header(); ?>
7576
7577 <?php
7578 // Start the loop.
7579 - while ( have_posts() ) : the_post();
7580 - ?>
7581 -
7582 - <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
7583 + while ( have_posts() ) :
7584 + the_post();
7585 + ?>
7586
7587 - <nav id="image-navigation" class="navigation image-navigation">
7588 - <div class="nav-links">
7589 - <div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentysixteen' ) ); ?></div>
7590 - <div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentysixteen' ) ); ?></div>
7591 - </div><!-- .nav-links -->
7592 - </nav><!-- .image-navigation -->
7593 + <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
7594
7595 - <header class="entry-header">
7596 - <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
7597 - </header><!-- .entry-header -->
7598 + <nav id="image-navigation" class="navigation image-navigation">
7599 + <div class="nav-links">
7600 + <div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentysixteen' ) ); ?></div>
7601 + <div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentysixteen' ) ); ?></div>
7602 + </div><!-- .nav-links -->
7603 + </nav><!-- .image-navigation -->
7604
7605 - <div class="entry-content">
7606 + <header class="entry-header">
7607 + <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
7608 + </header><!-- .entry-header -->
7609
7610 - <div class="entry-attachment">
7611 - <?php
7612 - /**
7613 - * Filter the default twentysixteen image attachment size.
7614 - *
7615 - * @since Twenty Sixteen 1.0
7616 - *
7617 - * @param string $image_size Image size. Default 'large'.
7618 - */
7619 - $image_size = apply_filters( 'twentysixteen_attachment_size', 'large' );
7620 + <div class="entry-content">
7621
7622 - echo wp_get_attachment_image( get_the_ID(), $image_size );
7623 - ?>
7624 + <div class="entry-attachment">
7625 + <?php
7626 + /**
7627 + * Filter the default twentysixteen image attachment size.
7628 + *
7629 + * @since Twenty Sixteen 1.0
7630 + *
7631 + * @param string $image_size Image size. Default 'large'.
7632 + */
7633 + $image_size = apply_filters( 'twentysixteen_attachment_size', 'large' );
7634 +
7635 + echo wp_get_attachment_image( get_the_ID(), $image_size );
7636 + ?>
7637
7638 - <?php twentysixteen_excerpt( 'entry-caption' ); ?>
7639 + <?php twentysixteen_excerpt( 'entry-caption' ); ?>
7640
7641 </div><!-- .entry-attachment -->
7642
7643 <?php
7644 - the_content();
7645 - wp_link_pages( array(
7646 + the_content();
7647 + wp_link_pages(
7648 + array(
7649 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
7650 'after' => '</div>',
7651 'link_before' => '<span>',
7652 'link_after' => '</span>',
7653 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
7654 'separator' => '<span class="screen-reader-text">, </span>',
7655 - ) );
7656 + )
7657 + );
7658 ?>
7659 </div><!-- .entry-content -->
7660
7661 <footer class="entry-footer">
7662 - <?php twentysixteen_entry_meta(); ?>
7663 + <?php twentysixteen_entry_meta(); ?>
7664 <?php
7665 - // Retrieve attachment metadata.
7666 - $metadata = wp_get_attachment_metadata();
7667 - if ( $metadata ) {
7668 - printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>',
7669 - esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentysixteen' ),
7670 - esc_url( wp_get_attachment_url() ),
7671 - absint( $metadata['width'] ),
7672 - absint( $metadata['height'] )
7673 - );
7674 - }
7675 + // Retrieve attachment metadata.
7676 + $metadata = wp_get_attachment_metadata();
7677 + if ( $metadata ) {
7678 + printf(
7679 + '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>',
7680 + esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentysixteen' ),
7681 + esc_url( wp_get_attachment_url() ),
7682 + absint( $metadata['width'] ),
7683 + absint( $metadata['height'] )
7684 + );
7685 + }
7686 ?>
7687 <?php
7688 - edit_post_link(
7689 - sprintf(
7690 - /* translators: %s: Name of current post */
7691 - __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
7692 - get_the_title()
7693 - ),
7694 - '<span class="edit-link">',
7695 - '</span>'
7696 - );
7697 + edit_post_link(
7698 + sprintf(
7699 + /* translators: %s: Name of current post */
7700 + __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
7701 + get_the_title()
7702 + ),
7703 + '<span class="edit-link">',
7704 + '</span>'
7705 + );
7706 ?>
7707 </footer><!-- .entry-footer -->
7708 </article><!-- #post-## -->
7709
7710 <?php
7711 - // If comments are open or we have at least one comment, load up the comment template.
7712 - if ( comments_open() || get_comments_number() ) {
7713 - comments_template();
7714 - }
7715 -
7716 - // Parent post navigation.
7717 - the_post_navigation( array(
7718 + // If comments are open or we have at least one comment, load up the comment template.
7719 + if ( comments_open() || get_comments_number() ) {
7720 + comments_template();
7721 + }
7722 +
7723 + // Parent post navigation.
7724 + the_post_navigation(
7725 + array(
7726 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ),
7727 - ) );
7728 + )
7729 + );
7730 // End the loop.
7731 endwhile;
7732 ?>
7733
7734 diff --git a/themes/twentysixteen/inc/back-compat.php b/themes/twentysixteen/inc/back-compat.php
7735 index 7ed4240c..c97940e0 100644
7736 --- a/themes/twentysixteen/inc/back-compat.php
7737 +++ b/themes/twentysixteen/inc/back-compat.php
7738 @@ -50,9 +50,13 @@ function twentysixteen_upgrade_notice() {
7739 * @global string $wp_version WordPress version.
7740 */
7741 function twentysixteen_customize() {
7742 - wp_die( sprintf( __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ), $GLOBALS['wp_version'] ), '', array(
7743 - 'back_link' => true,
7744 - ) );
7745 + wp_die(
7746 + sprintf( __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ), $GLOBALS['wp_version'] ),
7747 + '',
7748 + array(
7749 + 'back_link' => true,
7750 + )
7751 + );
7752 }
7753 add_action( 'load-customize.php', 'twentysixteen_customize' );
7754
7755
7756 diff --git a/themes/twentysixteen/inc/customizer.php b/themes/twentysixteen/inc/customizer.php
7757 index 62eb1b0b..9867d3d9 100644
7758 --- a/themes/twentysixteen/inc/customizer.php
7759 +++ b/themes/twentysixteen/inc/customizer.php
7760 @@ -30,9 +30,15 @@ function twentysixteen_custom_header_and_background() {
7761 * @type string $default-color Default color of the background.
7762 * }
7763 */
7764 - add_theme_support( 'custom-background', apply_filters( 'twentysixteen_custom_background_args', array(
7765 - 'default-color' => $default_background_color,
7766 - ) ) );
7767 + add_theme_support(
7768 + 'custom-background',
7769 + apply_filters(
7770 + 'twentysixteen_custom_background_args',
7771 + array(
7772 + 'default-color' => $default_background_color,
7773 + )
7774 + )
7775 + );
7776
7777 /**
7778 * Filter the arguments used when adding 'custom-header' support in Twenty Sixteen.
7779 @@ -50,35 +56,41 @@ function twentysixteen_custom_header_and_background() {
7780 * displayed on the blog.
7781 * }
7782 */
7783 - add_theme_support( 'custom-header', apply_filters( 'twentysixteen_custom_header_args', array(
7784 - 'default-text-color' => $default_text_color,
7785 - 'width' => 1200,
7786 - 'height' => 280,
7787 - 'flex-height' => true,
7788 - 'wp-head-callback' => 'twentysixteen_header_style',
7789 - ) ) );
7790 + add_theme_support(
7791 + 'custom-header',
7792 + apply_filters(
7793 + 'twentysixteen_custom_header_args',
7794 + array(
7795 + 'default-text-color' => $default_text_color,
7796 + 'width' => 1200,
7797 + 'height' => 280,
7798 + 'flex-height' => true,
7799 + 'wp-head-callback' => 'twentysixteen_header_style',
7800 + )
7801 + )
7802 + );
7803 }
7804 add_action( 'after_setup_theme', 'twentysixteen_custom_header_and_background' );
7805
7806 if ( ! function_exists( 'twentysixteen_header_style' ) ) :
7807 -/**
7808 - * Styles the header text displayed on the site.
7809 - *
7810 - * Create your own twentysixteen_header_style() function to override in a child theme.
7811 - *
7812 - * @since Twenty Sixteen 1.0
7813 - *
7814 - * @see twentysixteen_custom_header_and_background().
7815 - */
7816 -function twentysixteen_header_style() {
7817 - // If the header text option is untouched, let's bail.
7818 - if ( display_header_text() ) {
7819 - return;
7820 - }
7821 + /**
7822 + * Styles the header text displayed on the site.
7823 + *
7824 + * Create your own twentysixteen_header_style() function to override in a child theme.
7825 + *
7826 + * @since Twenty Sixteen 1.0
7827 + *
7828 + * @see twentysixteen_custom_header_and_background().
7829 + */
7830 + function twentysixteen_header_style() {
7831 + // If the header text option is untouched, let's bail.
7832 + if ( display_header_text() ) {
7833 + return;
7834 + }
7835
7836 - // If the header text has been hidden.
7837 - ?>
7838 - <style type="text/css" id="twentysixteen-header-css">
7839 + // If the header text has been hidden.
7840 + ?>
7841 + <style type="text/css" id="twentysixteen-header-css">
7842 .site-branding {
7843 margin: 0 auto 0 0;
7844 }
7845 @@ -88,9 +100,9 @@ function twentysixteen_header_style() {
7846 clip: rect(1px, 1px, 1px, 1px);
7847 position: absolute;
7848 }
7849 - </style>
7850 - <?php
7851 -}
7852 + </style>
7853 + <?php
7854 + }
7855 endif; // twentysixteen_header_style
7856
7857 /**
7858 @@ -103,87 +115,135 @@ endif; // twentysixteen_header_style
7859 function twentysixteen_customize_register( $wp_customize ) {
7860 $color_scheme = twentysixteen_get_color_scheme();
7861
7862 - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
7863 - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
7864 + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
7865 + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
7866
7867 if ( isset( $wp_customize->selective_refresh ) ) {
7868 - $wp_customize->selective_refresh->add_partial( 'blogname', array(
7869 - 'selector' => '.site-title a',
7870 - 'container_inclusive' => false,
7871 - 'render_callback' => 'twentysixteen_customize_partial_blogname',
7872 - ) );
7873 - $wp_customize->selective_refresh->add_partial( 'blogdescription', array(
7874 - 'selector' => '.site-description',
7875 - 'container_inclusive' => false,
7876 - 'render_callback' => 'twentysixteen_customize_partial_blogdescription',
7877 - ) );
7878 + $wp_customize->selective_refresh->add_partial(
7879 + 'blogname',
7880 + array(
7881 + 'selector' => '.site-title a',
7882 + 'container_inclusive' => false,
7883 + 'render_callback' => 'twentysixteen_customize_partial_blogname',
7884 + )
7885 + );
7886 + $wp_customize->selective_refresh->add_partial(
7887 + 'blogdescription',
7888 + array(
7889 + 'selector' => '.site-description',
7890 + 'container_inclusive' => false,
7891 + 'render_callback' => 'twentysixteen_customize_partial_blogdescription',
7892 + )
7893 + );
7894 }
7895
7896 // Add color scheme setting and control.
7897 - $wp_customize->add_setting( 'color_scheme', array(
7898 - 'default' => 'default',
7899 - 'sanitize_callback' => 'twentysixteen_sanitize_color_scheme',
7900 - 'transport' => 'postMessage',
7901 - ) );
7902 -
7903 - $wp_customize->add_control( 'color_scheme', array(
7904 - 'label' => __( 'Base Color Scheme', 'twentysixteen' ),
7905 - 'section' => 'colors',
7906 - 'type' => 'select',
7907 - 'choices' => twentysixteen_get_color_scheme_choices(),
7908 - 'priority' => 1,
7909 - ) );
7910 + $wp_customize->add_setting(
7911 + 'color_scheme',
7912 + array(
7913 + 'default' => 'default',
7914 + 'sanitize_callback' => 'twentysixteen_sanitize_color_scheme',
7915 + 'transport' => 'postMessage',
7916 + )
7917 + );
7918 +
7919 + $wp_customize->add_control(
7920 + 'color_scheme',
7921 + array(
7922 + 'label' => __( 'Base Color Scheme', 'twentysixteen' ),
7923 + 'section' => 'colors',
7924 + 'type' => 'select',
7925 + 'choices' => twentysixteen_get_color_scheme_choices(),
7926 + 'priority' => 1,
7927 + )
7928 + );
7929
7930 // Add page background color setting and control.
7931 - $wp_customize->add_setting( 'page_background_color', array(
7932 - 'default' => $color_scheme[1],
7933 - 'sanitize_callback' => 'sanitize_hex_color',
7934 - 'transport' => 'postMessage',
7935 - ) );
7936 + $wp_customize->add_setting(
7937 + 'page_background_color',
7938 + array(
7939 + 'default' => $color_scheme[1],
7940 + 'sanitize_callback' => 'sanitize_hex_color',
7941 + 'transport' => 'postMessage',
7942 + )
7943 + );
7944
7945 - $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'page_background_color', array(
7946 - 'label' => __( 'Page Background Color', 'twentysixteen' ),
7947 - 'section' => 'colors',
7948 - ) ) );
7949 + $wp_customize->add_control(
7950 + new WP_Customize_Color_Control(
7951 + $wp_customize,
7952 + 'page_background_color',
7953 + array(
7954 + 'label' => __( 'Page Background Color', 'twentysixteen' ),
7955 + 'section' => 'colors',
7956 + )
7957 + )
7958 + );
7959
7960 // Remove the core header textcolor control, as it shares the main text color.
7961 $wp_customize->remove_control( 'header_textcolor' );
7962
7963 // Add link color setting and control.
7964 - $wp_customize->add_setting( 'link_color', array(
7965 - 'default' => $color_scheme[2],
7966 - 'sanitize_callback' => 'sanitize_hex_color',
7967 - 'transport' => 'postMessage',
7968 - ) );
7969 + $wp_customize->add_setting(
7970 + 'link_color',
7971 + array(
7972 + 'default' => $color_scheme[2],
7973 + 'sanitize_callback' => 'sanitize_hex_color',
7974 + 'transport' => 'postMessage',
7975 + )
7976 + );
7977
7978 - $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(
7979 - 'label' => __( 'Link Color', 'twentysixteen' ),
7980 - 'section' => 'colors',
7981 - ) ) );
7982 + $wp_customize->add_control(
7983 + new WP_Customize_Color_Control(
7984 + $wp_customize,
7985 + 'link_color',
7986 + array(
7987 + 'label' => __( 'Link Color', 'twentysixteen' ),
7988 + 'section' => 'colors',
7989 + )
7990 + )
7991 + );
7992
7993 // Add main text color setting and control.
7994 - $wp_customize->add_setting( 'main_text_color', array(
7995 - 'default' => $color_scheme[3],
7996 - 'sanitize_callback' => 'sanitize_hex_color',
7997 - 'transport' => 'postMessage',
7998 - ) );
7999 + $wp_customize->add_setting(
8000 + 'main_text_color',
8001 + array(
8002 + 'default' => $color_scheme[3],
8003 + 'sanitize_callback' => 'sanitize_hex_color',
8004 + 'transport' => 'postMessage',
8005 + )
8006 + );
8007
8008 - $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'main_text_color', array(
8009 - 'label' => __( 'Main Text Color', 'twentysixteen' ),
8010 - 'section' => 'colors',
8011 - ) ) );
8012 + $wp_customize->add_control(
8013 + new WP_Customize_Color_Control(
8014 + $wp_customize,
8015 + 'main_text_color',
8016 + array(
8017 + 'label' => __( 'Main Text Color', 'twentysixteen' ),
8018 + 'section' => 'colors',
8019 + )
8020 + )
8021 + );
8022
8023 // Add secondary text color setting and control.
8024 - $wp_customize->add_setting( 'secondary_text_color', array(
8025 - 'default' => $color_scheme[4],
8026 - 'sanitize_callback' => 'sanitize_hex_color',
8027 - 'transport' => 'postMessage',
8028 - ) );
8029 -
8030 - $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary_text_color', array(
8031 - 'label' => __( 'Secondary Text Color', 'twentysixteen' ),
8032 - 'section' => 'colors',
8033 - ) ) );
8034 + $wp_customize->add_setting(
8035 + 'secondary_text_color',
8036 + array(
8037 + 'default' => $color_scheme[4],
8038 + 'sanitize_callback' => 'sanitize_hex_color',
8039 + 'transport' => 'postMessage',
8040 + )
8041 + );
8042 +
8043 + $wp_customize->add_control(
8044 + new WP_Customize_Color_Control(
8045 + $wp_customize,
8046 + 'secondary_text_color',
8047 + array(
8048 + 'label' => __( 'Secondary Text Color', 'twentysixteen' ),
8049 + 'section' => 'colors',
8050 + )
8051 + )
8052 + );
8053 }
8054 add_action( 'customize_register', 'twentysixteen_customize_register', 11 );
8055
8056 @@ -248,127 +308,130 @@ function twentysixteen_get_color_schemes() {
8057 * }
8058 * }
8059 */
8060 - return apply_filters( 'twentysixteen_color_schemes', array(
8061 - 'default' => array(
8062 - 'label' => __( 'Default', 'twentysixteen' ),
8063 - 'colors' => array(
8064 - '#1a1a1a',
8065 - '#ffffff',
8066 - '#007acc',
8067 - '#1a1a1a',
8068 - '#686868',
8069 + return apply_filters(
8070 + 'twentysixteen_color_schemes',
8071 + array(
8072 + 'default' => array(
8073 + 'label' => __( 'Default', 'twentysixteen' ),
8074 + 'colors' => array(
8075 + '#1a1a1a',
8076 + '#ffffff',
8077 + '#007acc',
8078 + '#1a1a1a',
8079 + '#686868',
8080 + ),
8081 ),
8082 - ),
8083 - 'dark' => array(
8084 - 'label' => __( 'Dark', 'twentysixteen' ),
8085 - 'colors' => array(
8086 - '#262626',
8087 - '#1a1a1a',
8088 - '#9adffd',
8089 - '#e5e5e5',
8090 - '#c1c1c1',
8091 + 'dark' => array(
8092 + 'label' => __( 'Dark', 'twentysixteen' ),
8093 + 'colors' => array(
8094 + '#262626',
8095 + '#1a1a1a',
8096 + '#9adffd',
8097 + '#e5e5e5',
8098 + '#c1c1c1',
8099 + ),
8100 ),
8101 - ),
8102 - 'gray' => array(
8103 - 'label' => __( 'Gray', 'twentysixteen' ),
8104 - 'colors' => array(
8105 - '#616a73',
8106 - '#4d545c',
8107 - '#c7c7c7',
8108 - '#f2f2f2',
8109 - '#f2f2f2',
8110 + 'gray' => array(
8111 + 'label' => __( 'Gray', 'twentysixteen' ),
8112 + 'colors' => array(
8113 + '#616a73',
8114 + '#4d545c',
8115 + '#c7c7c7',
8116 + '#f2f2f2',
8117 + '#f2f2f2',
8118 + ),
8119 ),
8120 - ),
8121 - 'red' => array(
8122 - 'label' => __( 'Red', 'twentysixteen' ),
8123 - 'colors' => array(
8124 - '#ffffff',
8125 - '#ff675f',
8126 - '#640c1f',
8127 - '#402b30',
8128 - '#402b30',
8129 + 'red' => array(
8130 + 'label' => __( 'Red', 'twentysixteen' ),
8131 + 'colors' => array(
8132 + '#ffffff',
8133 + '#ff675f',
8134 + '#640c1f',
8135 + '#402b30',
8136 + '#402b30',
8137 + ),
8138 ),
8139 - ),
8140 - 'yellow' => array(
8141 - 'label' => __( 'Yellow', 'twentysixteen' ),
8142 - 'colors' => array(
8143 - '#3b3721',
8144 - '#ffef8e',
8145 - '#774e24',
8146 - '#3b3721',
8147 - '#5b4d3e',
8148 + 'yellow' => array(
8149 + 'label' => __( 'Yellow', 'twentysixteen' ),
8150 + 'colors' => array(
8151 + '#3b3721',
8152 + '#ffef8e',
8153 + '#774e24',
8154 + '#3b3721',
8155 + '#5b4d3e',
8156 + ),
8157 ),
8158 - ),
8159 - ) );
8160 + )
8161 + );
8162 }
8163
8164 if ( ! function_exists( 'twentysixteen_get_color_scheme' ) ) :
8165 -/**
8166 - * Retrieves the current Twenty Sixteen color scheme.
8167 - *
8168 - * Create your own twentysixteen_get_color_scheme() function to override in a child theme.
8169 - *
8170 - * @since Twenty Sixteen 1.0
8171 - *
8172 - * @return array An associative array of either the current or default color scheme HEX values.
8173 - */
8174 -function twentysixteen_get_color_scheme() {
8175 - $color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
8176 - $color_schemes = twentysixteen_get_color_schemes();
8177 + /**
8178 + * Retrieves the current Twenty Sixteen color scheme.
8179 + *
8180 + * Create your own twentysixteen_get_color_scheme() function to override in a child theme.
8181 + *
8182 + * @since Twenty Sixteen 1.0
8183 + *
8184 + * @return array An associative array of either the current or default color scheme HEX values.
8185 + */
8186 + function twentysixteen_get_color_scheme() {
8187 + $color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
8188 + $color_schemes = twentysixteen_get_color_schemes();
8189
8190 - if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
8191 - return $color_schemes[ $color_scheme_option ]['colors'];
8192 - }
8193 + if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
8194 + return $color_schemes[ $color_scheme_option ]['colors'];
8195 + }
8196
8197 - return $color_schemes['default']['colors'];
8198 -}
8199 + return $color_schemes['default']['colors'];
8200 + }
8201 endif; // twentysixteen_get_color_scheme
8202
8203 if ( ! function_exists( 'twentysixteen_get_color_scheme_choices' ) ) :
8204 -/**
8205 - * Retrieves an array of color scheme choices registered for Twenty Sixteen.
8206 - *
8207 - * Create your own twentysixteen_get_color_scheme_choices() function to override
8208 - * in a child theme.
8209 - *
8210 - * @since Twenty Sixteen 1.0
8211 - *
8212 - * @return array Array of color schemes.
8213 - */
8214 -function twentysixteen_get_color_scheme_choices() {
8215 - $color_schemes = twentysixteen_get_color_schemes();
8216 - $color_scheme_control_options = array();
8217 + /**
8218 + * Retrieves an array of color scheme choices registered for Twenty Sixteen.
8219 + *
8220 + * Create your own twentysixteen_get_color_scheme_choices() function to override
8221 + * in a child theme.
8222 + *
8223 + * @since Twenty Sixteen 1.0
8224 + *
8225 + * @return array Array of color schemes.
8226 + */
8227 + function twentysixteen_get_color_scheme_choices() {
8228 + $color_schemes = twentysixteen_get_color_schemes();
8229 + $color_scheme_control_options = array();
8230
8231 - foreach ( $color_schemes as $color_scheme => $value ) {
8232 - $color_scheme_control_options[ $color_scheme ] = $value['label'];
8233 - }
8234 + foreach ( $color_schemes as $color_scheme => $value ) {
8235 + $color_scheme_control_options[ $color_scheme ] = $value['label'];
8236 + }
8237
8238 - return $color_scheme_control_options;
8239 -}
8240 + return $color_scheme_control_options;
8241 + }
8242 endif; // twentysixteen_get_color_scheme_choices
8243
8244
8245 if ( ! function_exists( 'twentysixteen_sanitize_color_scheme' ) ) :
8246 -/**
8247 - * Handles sanitization for Twenty Sixteen color schemes.
8248 - *
8249 - * Create your own twentysixteen_sanitize_color_scheme() function to override
8250 - * in a child theme.
8251 - *
8252 - * @since Twenty Sixteen 1.0
8253 - *
8254 - * @param string $value Color scheme name value.
8255 - * @return string Color scheme name.
8256 - */
8257 -function twentysixteen_sanitize_color_scheme( $value ) {
8258 - $color_schemes = twentysixteen_get_color_scheme_choices();
8259 + /**
8260 + * Handles sanitization for Twenty Sixteen color schemes.
8261 + *
8262 + * Create your own twentysixteen_sanitize_color_scheme() function to override
8263 + * in a child theme.
8264 + *
8265 + * @since Twenty Sixteen 1.0
8266 + *
8267 + * @param string $value Color scheme name value.
8268 + * @return string Color scheme name.
8269 + */
8270 + function twentysixteen_sanitize_color_scheme( $value ) {
8271 + $color_schemes = twentysixteen_get_color_scheme_choices();
8272
8273 - if ( ! array_key_exists( $value, $color_schemes ) ) {
8274 - return 'default';
8275 - }
8276 + if ( ! array_key_exists( $value, $color_schemes ) ) {
8277 + return 'default';
8278 + }
8279
8280 - return $value;
8281 -}
8282 + return $value;
8283 + }
8284 endif; // twentysixteen_sanitize_color_scheme
8285
8286 /**
8287 @@ -445,14 +508,17 @@ add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' );
8288 * @return string Color scheme CSS.
8289 */
8290 function twentysixteen_get_color_scheme_css( $colors ) {
8291 - $colors = wp_parse_args( $colors, array(
8292 - 'background_color' => '',
8293 - 'page_background_color' => '',
8294 - 'link_color' => '',
8295 - 'main_text_color' => '',
8296 - 'secondary_text_color' => '',
8297 - 'border_color' => '',
8298 - ) );
8299 + $colors = wp_parse_args(
8300 + $colors,
8301 + array(
8302 + 'background_color' => '',
8303 + 'page_background_color' => '',
8304 + 'link_color' => '',
8305 + 'main_text_color' => '',
8306 + 'secondary_text_color' => '',
8307 + 'border_color' => '',
8308 + )
8309 + );
8310
8311 return <<<CSS
8312 /* Color Scheme */
8313 @@ -869,9 +935,9 @@ add_action( 'wp_enqueue_scripts', 'twentysixteen_page_background_color_css', 11
8314 * @see wp_add_inline_style()
8315 */
8316 function twentysixteen_link_color_css() {
8317 - $color_scheme = twentysixteen_get_color_scheme();
8318 - $default_color = $color_scheme[2];
8319 - $link_color = get_theme_mod( 'link_color', $default_color );
8320 + $color_scheme = twentysixteen_get_color_scheme();
8321 + $default_color = $color_scheme[2];
8322 + $link_color = get_theme_mod( 'link_color', $default_color );
8323
8324 // Don't do anything if the current color is the default.
8325 if ( $link_color === $default_color ) {
8326 @@ -1126,8 +1192,8 @@ add_action( 'wp_enqueue_scripts', 'twentysixteen_main_text_color_css', 11 );
8327 * @see wp_add_inline_style()
8328 */
8329 function twentysixteen_secondary_text_color_css() {
8330 - $color_scheme = twentysixteen_get_color_scheme();
8331 - $default_color = $color_scheme[4];
8332 + $color_scheme = twentysixteen_get_color_scheme();
8333 + $default_color = $color_scheme[4];
8334 $secondary_text_color = get_theme_mod( 'secondary_text_color', $default_color );
8335
8336 // Don't do anything if the current color is the default.
8337
8338 diff --git a/themes/twentysixteen/inc/template-tags.php b/themes/twentysixteen/inc/template-tags.php
8339 index 9b8f1f39..caeed1c5 100644
8340 --- a/themes/twentysixteen/inc/template-tags.php
8341 +++ b/themes/twentysixteen/inc/template-tags.php
8342 @@ -10,127 +10,133 @@
8343 */
8344
8345 if ( ! function_exists( 'twentysixteen_entry_meta' ) ) :
8346 -/**
8347 - * Prints HTML with meta information for the categories, tags.
8348 - *
8349 - * Create your own twentysixteen_entry_meta() function to override in a child theme.
8350 - *
8351 - * @since Twenty Sixteen 1.0
8352 - */
8353 -function twentysixteen_entry_meta() {
8354 - if ( 'post' === get_post_type() ) {
8355 - $author_avatar_size = apply_filters( 'twentysixteen_author_avatar_size', 49 );
8356 - printf( '<span class="byline"><span class="author vcard">%1$s<span class="screen-reader-text">%2$s </span> <a class="url fn n" href="%3$s">%4$s</a></span></span>',
8357 - get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ),
8358 - _x( 'Author', 'Used before post author name.', 'twentysixteen' ),
8359 - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
8360 - get_the_author()
8361 - );
8362 - }
8363 + /**
8364 + * Prints HTML with meta information for the categories, tags.
8365 + *
8366 + * Create your own twentysixteen_entry_meta() function to override in a child theme.
8367 + *
8368 + * @since Twenty Sixteen 1.0
8369 + */
8370 + function twentysixteen_entry_meta() {
8371 + if ( 'post' === get_post_type() ) {
8372 + $author_avatar_size = apply_filters( 'twentysixteen_author_avatar_size', 49 );
8373 + printf(
8374 + '<span class="byline"><span class="author vcard">%1$s<span class="screen-reader-text">%2$s </span> <a class="url fn n" href="%3$s">%4$s</a></span></span>',
8375 + get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ),
8376 + _x( 'Author', 'Used before post author name.', 'twentysixteen' ),
8377 + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
8378 + get_the_author()
8379 + );
8380 + }
8381
8382 - if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
8383 - twentysixteen_entry_date();
8384 - }
8385 + if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
8386 + twentysixteen_entry_date();
8387 + }
8388
8389 - $format = get_post_format();
8390 - if ( current_theme_supports( 'post-formats', $format ) ) {
8391 - printf( '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
8392 - sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentysixteen' ) ),
8393 - esc_url( get_post_format_link( $format ) ),
8394 - get_post_format_string( $format )
8395 - );
8396 - }
8397 + $format = get_post_format();
8398 + if ( current_theme_supports( 'post-formats', $format ) ) {
8399 + printf(
8400 + '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
8401 + sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentysixteen' ) ),
8402 + esc_url( get_post_format_link( $format ) ),
8403 + get_post_format_string( $format )
8404 + );
8405 + }
8406
8407 - if ( 'post' === get_post_type() ) {
8408 - twentysixteen_entry_taxonomies();
8409 - }
8410 + if ( 'post' === get_post_type() ) {
8411 + twentysixteen_entry_taxonomies();
8412 + }
8413
8414 - if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
8415 - echo '<span class="comments-link">';
8416 - comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen' ), get_the_title() ) );
8417 - echo '</span>';
8418 + if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
8419 + echo '<span class="comments-link">';
8420 + comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen' ), get_the_title() ) );
8421 + echo '</span>';
8422 + }
8423 }
8424 -}
8425 endif;
8426
8427 if ( ! function_exists( 'twentysixteen_entry_date' ) ) :
8428 -/**
8429 - * Prints HTML with date information for current post.
8430 - *
8431 - * Create your own twentysixteen_entry_date() function to override in a child theme.
8432 - *
8433 - * @since Twenty Sixteen 1.0
8434 - */
8435 -function twentysixteen_entry_date() {
8436 - $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
8437 + /**
8438 + * Prints HTML with date information for current post.
8439 + *
8440 + * Create your own twentysixteen_entry_date() function to override in a child theme.
8441 + *
8442 + * @since Twenty Sixteen 1.0
8443 + */
8444 + function twentysixteen_entry_date() {
8445 + $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
8446
8447 - if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
8448 - $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
8449 - }
8450 + if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
8451 + $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
8452 + }
8453
8454 - $time_string = sprintf( $time_string,
8455 - esc_attr( get_the_date( 'c' ) ),
8456 - get_the_date(),
8457 - esc_attr( get_the_modified_date( 'c' ) ),
8458 - get_the_modified_date()
8459 - );
8460 -
8461 - printf( '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
8462 - _x( 'Posted on', 'Used before publish date.', 'twentysixteen' ),
8463 - esc_url( get_permalink() ),
8464 - $time_string
8465 - );
8466 -}
8467 -endif;
8468 + $time_string = sprintf(
8469 + $time_string,
8470 + esc_attr( get_the_date( 'c' ) ),
8471 + get_the_date(),
8472 + esc_attr( get_the_modified_date( 'c' ) ),
8473 + get_the_modified_date()
8474 + );
8475
8476 -if ( ! function_exists( 'twentysixteen_entry_taxonomies' ) ) :
8477 -/**
8478 - * Prints HTML with category and tags for current post.
8479 - *
8480 - * Create your own twentysixteen_entry_taxonomies() function to override in a child theme.
8481 - *
8482 - * @since Twenty Sixteen 1.0
8483 - */
8484 -function twentysixteen_entry_taxonomies() {
8485 - $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
8486 - if ( $categories_list && twentysixteen_categorized_blog() ) {
8487 - printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
8488 - _x( 'Categories', 'Used before category names.', 'twentysixteen' ),
8489 - $categories_list
8490 + printf(
8491 + '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
8492 + _x( 'Posted on', 'Used before publish date.', 'twentysixteen' ),
8493 + esc_url( get_permalink() ),
8494 + $time_string
8495 );
8496 }
8497 +endif;
8498
8499 - $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
8500 - if ( $tags_list && ! is_wp_error( $tags_list ) ) {
8501 - printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
8502 - _x( 'Tags', 'Used before tag names.', 'twentysixteen' ),
8503 - $tags_list
8504 - );
8505 +if ( ! function_exists( 'twentysixteen_entry_taxonomies' ) ) :
8506 + /**
8507 + * Prints HTML with category and tags for current post.
8508 + *
8509 + * Create your own twentysixteen_entry_taxonomies() function to override in a child theme.
8510 + *
8511 + * @since Twenty Sixteen 1.0
8512 + */
8513 + function twentysixteen_entry_taxonomies() {
8514 + $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
8515 + if ( $categories_list && twentysixteen_categorized_blog() ) {
8516 + printf(
8517 + '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
8518 + _x( 'Categories', 'Used before category names.', 'twentysixteen' ),
8519 + $categories_list
8520 + );
8521 + }
8522 +
8523 + $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
8524 + if ( $tags_list && ! is_wp_error( $tags_list ) ) {
8525 + printf(
8526 + '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
8527 + _x( 'Tags', 'Used before tag names.', 'twentysixteen' ),
8528 + $tags_list
8529 + );
8530 + }
8531 }
8532 -}
8533 endif;
8534
8535 if ( ! function_exists( 'twentysixteen_post_thumbnail' ) ) :
8536 -/**
8537 - * Displays an optional post thumbnail.
8538 - *
8539 - * Wraps the post thumbnail in an anchor element on index views, or a div
8540 - * element when on single views.
8541 - *
8542 - * Create your own twentysixteen_post_thumbnail() function to override in a child theme.
8543 - *
8544 - * @since Twenty Sixteen 1.0
8545 - */
8546 -function twentysixteen_post_thumbnail() {
8547 - if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
8548 - return;
8549 - }
8550 + /**
8551 + * Displays an optional post thumbnail.
8552 + *
8553 + * Wraps the post thumbnail in an anchor element on index views, or a div
8554 + * element when on single views.
8555 + *
8556 + * Create your own twentysixteen_post_thumbnail() function to override in a child theme.
8557 + *
8558 + * @since Twenty Sixteen 1.0
8559 + */
8560 + function twentysixteen_post_thumbnail() {
8561 + if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
8562 + return;
8563 + }
8564
8565 - if ( is_singular() ) :
8566 - ?>
8567 + if ( is_singular() ) :
8568 + ?>
8569
8570 - <div class="post-thumbnail">
8571 - <?php the_post_thumbnail(); ?>
8572 + <div class="post-thumbnail">
8573 + <?php the_post_thumbnail(); ?>
8574 </div><!-- .post-thumbnail -->
8575
8576 <?php else : ?>
8577 @@ -139,8 +145,9 @@ function twentysixteen_post_thumbnail() {
8578 <?php the_post_thumbnail( 'post-thumbnail', array( 'alt' => the_title_attribute( 'echo=0' ) ) ); ?>
8579 </a>
8580
8581 - <?php endif; // End is_singular()
8582 -}
8583 + <?php
8584 + endif; // End is_singular()
8585 + }
8586 endif;
8587
8588 if ( ! function_exists( 'twentysixteen_excerpt' ) ) :
8589 @@ -158,69 +165,74 @@ if ( ! function_exists( 'twentysixteen_excerpt' ) ) :
8590 function twentysixteen_excerpt( $class = 'entry-summary' ) {
8591 $class = esc_attr( $class );
8592
8593 - if ( has_excerpt() || is_search() ) : ?>
8594 + if ( has_excerpt() || is_search() ) :
8595 + ?>
8596 <div class="<?php echo $class; ?>">
8597 <?php the_excerpt(); ?>
8598 </div><!-- .<?php echo $class; ?> -->
8599 - <?php endif;
8600 + <?php
8601 + endif;
8602 }
8603 endif;
8604
8605 if ( ! function_exists( 'twentysixteen_excerpt_more' ) && ! is_admin() ) :
8606 -/**
8607 - * Replaces "[...]" (appended to automatically generated excerpts) with ... and
8608 - * a 'Continue reading' link.
8609 - *
8610 - * Create your own twentysixteen_excerpt_more() function to override in a child theme.
8611 - *
8612 - * @since Twenty Sixteen 1.0
8613 - *
8614 - * @return string 'Continue reading' link prepended with an ellipsis.
8615 - */
8616 -function twentysixteen_excerpt_more() {
8617 - $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
8618 - esc_url( get_permalink( get_the_ID() ) ),
8619 - /* translators: %s: Name of current post */
8620 - sprintf( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), get_the_title( get_the_ID() ) )
8621 - );
8622 - return ' &hellip; ' . $link;
8623 -}
8624 -add_filter( 'excerpt_more', 'twentysixteen_excerpt_more' );
8625 + /**
8626 + * Replaces "[...]" (appended to automatically generated excerpts) with ... and
8627 + * a 'Continue reading' link.
8628 + *
8629 + * Create your own twentysixteen_excerpt_more() function to override in a child theme.
8630 + *
8631 + * @since Twenty Sixteen 1.0
8632 + *
8633 + * @return string 'Continue reading' link prepended with an ellipsis.
8634 + */
8635 + function twentysixteen_excerpt_more() {
8636 + $link = sprintf(
8637 + '<a href="%1$s" class="more-link">%2$s</a>',
8638 + esc_url( get_permalink( get_the_ID() ) ),
8639 + /* translators: %s: Name of current post */
8640 + sprintf( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), get_the_title( get_the_ID() ) )
8641 + );
8642 + return ' &hellip; ' . $link;
8643 + }
8644 + add_filter( 'excerpt_more', 'twentysixteen_excerpt_more' );
8645 endif;
8646
8647 if ( ! function_exists( 'twentysixteen_categorized_blog' ) ) :
8648 -/**
8649 - * Determines whether blog/site has more than one category.
8650 - *
8651 - * Create your own twentysixteen_categorized_blog() function to override in a child theme.
8652 - *
8653 - * @since Twenty Sixteen 1.0
8654 - *
8655 - * @return bool True if there is more than one category, false otherwise.
8656 - */
8657 -function twentysixteen_categorized_blog() {
8658 - if ( false === ( $all_the_cool_cats = get_transient( 'twentysixteen_categories' ) ) ) {
8659 - // Create an array of all the categories that are attached to posts.
8660 - $all_the_cool_cats = get_categories( array(
8661 - 'fields' => 'ids',
8662 - // We only need to know if there is more than one category.
8663 - 'number' => 2,
8664 - ) );
8665 -
8666 - // Count the number of categories that are attached to the posts.
8667 - $all_the_cool_cats = count( $all_the_cool_cats );
8668 -
8669 - set_transient( 'twentysixteen_categories', $all_the_cool_cats );
8670 - }
8671 + /**
8672 + * Determines whether blog/site has more than one category.
8673 + *
8674 + * Create your own twentysixteen_categorized_blog() function to override in a child theme.
8675 + *
8676 + * @since Twenty Sixteen 1.0
8677 + *
8678 + * @return bool True if there is more than one category, false otherwise.
8679 + */
8680 + function twentysixteen_categorized_blog() {
8681 + if ( false === ( $all_the_cool_cats = get_transient( 'twentysixteen_categories' ) ) ) {
8682 + // Create an array of all the categories that are attached to posts.
8683 + $all_the_cool_cats = get_categories(
8684 + array(
8685 + 'fields' => 'ids',
8686 + // We only need to know if there is more than one category.
8687 + 'number' => 2,
8688 + )
8689 + );
8690
8691 - if ( $all_the_cool_cats > 1 || is_preview() ) {
8692 - // This blog has more than 1 category so twentysixteen_categorized_blog should return true.
8693 - return true;
8694 - } else {
8695 - // This blog has only 1 category so twentysixteen_categorized_blog should return false.
8696 - return false;
8697 + // Count the number of categories that are attached to the posts.
8698 + $all_the_cool_cats = count( $all_the_cool_cats );
8699 +
8700 + set_transient( 'twentysixteen_categories', $all_the_cool_cats );
8701 + }
8702 +
8703 + if ( $all_the_cool_cats > 1 || is_preview() ) {
8704 + // This blog has more than 1 category so twentysixteen_categorized_blog should return true.
8705 + return true;
8706 + } else {
8707 + // This blog has only 1 category so twentysixteen_categorized_blog should return false.
8708 + return false;
8709 + }
8710 }
8711 -}
8712 endif;
8713
8714 /**
8715 @@ -236,19 +248,19 @@ function twentysixteen_category_transient_flusher() {
8716 delete_transient( 'twentysixteen_categories' );
8717 }
8718 add_action( 'edit_category', 'twentysixteen_category_transient_flusher' );
8719 -add_action( 'save_post', 'twentysixteen_category_transient_flusher' );
8720 +add_action( 'save_post', 'twentysixteen_category_transient_flusher' );
8721
8722 if ( ! function_exists( 'twentysixteen_the_custom_logo' ) ) :
8723 -/**
8724 - * Displays the optional custom logo.
8725 - *
8726 - * Does nothing if the custom logo is not available.
8727 - *
8728 - * @since Twenty Sixteen 1.2
8729 - */
8730 -function twentysixteen_the_custom_logo() {
8731 - if ( function_exists( 'the_custom_logo' ) ) {
8732 - the_custom_logo();
8733 + /**
8734 + * Displays the optional custom logo.
8735 + *
8736 + * Does nothing if the custom logo is not available.
8737 + *
8738 + * @since Twenty Sixteen 1.2
8739 + */
8740 + function twentysixteen_the_custom_logo() {
8741 + if ( function_exists( 'the_custom_logo' ) ) {
8742 + the_custom_logo();
8743 + }
8744 }
8745 -}
8746 endif;
8747
8748 diff --git a/themes/twentysixteen/index.php b/themes/twentysixteen/index.php
8749 index 3f621abe..f6ec56c1 100644
8750 --- a/themes/twentysixteen/index.php
8751 +++ b/themes/twentysixteen/index.php
8752 @@ -7,7 +7,7 @@
8753 * It is used to display a page when nothing more specific matches a query.
8754 * E.g., it puts together the home page when no home.php file exists.
8755 *
8756 - * @link https://codex.wordpress.org/Template_Hierarchy
8757 + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
8758 *
8759 * @package WordPress
8760 * @subpackage Twenty_Sixteen
8761 @@ -29,7 +29,8 @@ get_header(); ?>
8762
8763 <?php
8764 // Start the loop.
8765 - while ( have_posts() ) : the_post();
8766 + while ( have_posts() ) :
8767 + the_post();
8768
8769 /*
8770 * Include the Post-Format-specific template for the content.
8771 @@ -38,17 +39,19 @@ get_header(); ?>
8772 */
8773 get_template_part( 'template-parts/content', get_post_format() );
8774
8775 - // End the loop.
8776 + // End the loop.
8777 endwhile;
8778
8779 // Previous/next page navigation.
8780 - the_posts_pagination( array(
8781 - 'prev_text' => __( 'Previous page', 'twentysixteen' ),
8782 - 'next_text' => __( 'Next page', 'twentysixteen' ),
8783 - 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
8784 - ) );
8785 + the_posts_pagination(
8786 + array(
8787 + 'prev_text' => __( 'Previous page', 'twentysixteen' ),
8788 + 'next_text' => __( 'Next page', 'twentysixteen' ),
8789 + 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
8790 + )
8791 + );
8792
8793 - // If no content, include the "No posts found" template.
8794 + // If no content, include the "No posts found" template.
8795 else :
8796 get_template_part( 'template-parts/content', 'none' );
8797
8798
8799 diff --git a/themes/twentysixteen/page.php b/themes/twentysixteen/page.php
8800 index 315a3da7..a232c9fc 100644
8801 --- a/themes/twentysixteen/page.php
8802 +++ b/themes/twentysixteen/page.php
8803 @@ -17,7 +17,8 @@ get_header(); ?>
8804 <main id="main" class="site-main" role="main">
8805 <?php
8806 // Start the loop.
8807 - while ( have_posts() ) : the_post();
8808 + while ( have_posts() ) :
8809 + the_post();
8810
8811 // Include the page content template.
8812 get_template_part( 'template-parts/content', 'page' );
8813
8814 diff --git a/themes/twentysixteen/readme.txt b/themes/twentysixteen/readme.txt
8815 index e1741beb..dcc28905 100644
8816 --- a/themes/twentysixteen/readme.txt
8817 +++ b/themes/twentysixteen/readme.txt
8818 @@ -2,7 +2,7 @@
8819 Contributors: the WordPress team
8820 Requires at least: WordPress 4.4
8821 Tested up to: WordPress 5.0
8822 -Version: 1.7
8823 +Version: 1.9
8824 License: GPLv2 or later
8825 License URI: http://www.gnu.org/licenses/gpl-2.0.html
8826 Tags: one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog
8827 @@ -56,6 +56,16 @@ Image used in screenshot.png: A photo by Austin Schmid (https://unsplash.com/sch
8828
8829 == Changelog ==
8830
8831 += 1.9 =
8832 +* Released: February 21, 2019
8833 +
8834 +https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.9
8835 +
8836 += 1.8 =
8837 +* Released: January 9, 2019
8838 +
8839 +https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.8
8840 +
8841 = 1.7 =
8842 * Released: December 19, 2018
8843
8844
8845 diff --git a/themes/twentysixteen/search.php b/themes/twentysixteen/search.php
8846 index 4180b5f9..0f893636 100644
8847 --- a/themes/twentysixteen/search.php
8848 +++ b/themes/twentysixteen/search.php
8849 @@ -20,7 +20,8 @@ get_header(); ?>
8850
8851 <?php
8852 // Start the loop.
8853 - while ( have_posts() ) : the_post();
8854 + while ( have_posts() ) :
8855 + the_post();
8856
8857 /**
8858 * Run the loop for the search to output the results.
8859 @@ -29,17 +30,19 @@ get_header(); ?>
8860 */
8861 get_template_part( 'template-parts/content', 'search' );
8862
8863 - // End the loop.
8864 + // End the loop.
8865 endwhile;
8866
8867 // Previous/next page navigation.
8868 - the_posts_pagination( array(
8869 - 'prev_text' => __( 'Previous page', 'twentysixteen' ),
8870 - 'next_text' => __( 'Next page', 'twentysixteen' ),
8871 - 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
8872 - ) );
8873 -
8874 - // If no content, include the "No posts found" template.
8875 + the_posts_pagination(
8876 + array(
8877 + 'prev_text' => __( 'Previous page', 'twentysixteen' ),
8878 + 'next_text' => __( 'Next page', 'twentysixteen' ),
8879 + 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
8880 + )
8881 + );
8882 +
8883 + // If no content, include the "No posts found" template.
8884 else :
8885 get_template_part( 'template-parts/content', 'none' );
8886
8887
8888 diff --git a/themes/twentysixteen/sidebar.php b/themes/twentysixteen/sidebar.php
8889 index d4d893eb..45aff971 100644
8890 --- a/themes/twentysixteen/sidebar.php
8891 +++ b/themes/twentysixteen/sidebar.php
8892 @@ -8,7 +8,7 @@
8893 */
8894 ?>
8895
8896 -<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
8897 +<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
8898 <aside id="secondary" class="sidebar widget-area" role="complementary">
8899 <?php dynamic_sidebar( 'sidebar-1' ); ?>
8900 </aside><!-- .sidebar .widget-area -->
8901
8902 diff --git a/themes/twentysixteen/single.php b/themes/twentysixteen/single.php
8903 index 07e0df29..34541703 100644
8904 --- a/themes/twentysixteen/single.php
8905 +++ b/themes/twentysixteen/single.php
8906 @@ -13,7 +13,8 @@ get_header(); ?>
8907 <main id="main" class="site-main" role="main">
8908 <?php
8909 // Start the loop.
8910 - while ( have_posts() ) : the_post();
8911 + while ( have_posts() ) :
8912 + the_post();
8913
8914 // Include the single post content template.
8915 get_template_part( 'template-parts/content', 'single' );
8916 @@ -25,19 +26,23 @@ get_header(); ?>
8917
8918 if ( is_singular( 'attachment' ) ) {
8919 // Parent post navigation.
8920 - the_post_navigation( array(
8921 - 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ),
8922 - ) );
8923 + the_post_navigation(
8924 + array(
8925 + 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ),
8926 + )
8927 + );
8928 } elseif ( is_singular( 'post' ) ) {
8929 // Previous/next post navigation.
8930 - the_post_navigation( array(
8931 - 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentysixteen' ) . '</span> ' .
8932 - '<span class="screen-reader-text">' . __( 'Next post:', 'twentysixteen' ) . '</span> ' .
8933 - '<span class="post-title">%title</span>',
8934 - 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentysixteen' ) . '</span> ' .
8935 - '<span class="screen-reader-text">' . __( 'Previous post:', 'twentysixteen' ) . '</span> ' .
8936 - '<span class="post-title">%title</span>',
8937 - ) );
8938 + the_post_navigation(
8939 + array(
8940 + 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentysixteen' ) . '</span> ' .
8941 + '<span class="screen-reader-text">' . __( 'Next post:', 'twentysixteen' ) . '</span> ' .
8942 + '<span class="post-title">%title</span>',
8943 + 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentysixteen' ) . '</span> ' .
8944 + '<span class="screen-reader-text">' . __( 'Previous post:', 'twentysixteen' ) . '</span> ' .
8945 + '<span class="post-title">%title</span>',
8946 + )
8947 + );
8948 }
8949
8950 // End of the loop.
8951
8952 diff --git a/themes/twentysixteen/style.css b/themes/twentysixteen/style.css
8953 index f5a854ea..90c8b4c4 100644
8954 --- a/themes/twentysixteen/style.css
8955 +++ b/themes/twentysixteen/style.css
8956 @@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentysixteen/
8957 Author: the WordPress team
8958 Author URI: https://wordpress.org/
8959 Description: Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere.
8960 -Version: 1.7
8961 +Version: 1.9
8962 License: GNU General Public License v2 or later
8963 License URI: http://www.gnu.org/licenses/gpl-2.0.html
8964 Tags: one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog
8965
8966 diff --git a/themes/twentysixteen/template-parts/content-page.php b/themes/twentysixteen/template-parts/content-page.php
8967 index 2b57d2b5..d1ee87c6 100644
8968 --- a/themes/twentysixteen/template-parts/content-page.php
8969 +++ b/themes/twentysixteen/template-parts/content-page.php
8970 @@ -19,14 +19,16 @@
8971 <?php
8972 the_content();
8973
8974 - wp_link_pages( array(
8975 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
8976 - 'after' => '</div>',
8977 - 'link_before' => '<span>',
8978 - 'link_after' => '</span>',
8979 - 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
8980 - 'separator' => '<span class="screen-reader-text">, </span>',
8981 - ) );
8982 + wp_link_pages(
8983 + array(
8984 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
8985 + 'after' => '</div>',
8986 + 'link_before' => '<span>',
8987 + 'link_after' => '</span>',
8988 + 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
8989 + 'separator' => '<span class="screen-reader-text">, </span>',
8990 + )
8991 + );
8992 ?>
8993 </div><!-- .entry-content -->
8994
8995 @@ -40,6 +42,6 @@
8996 '<footer class="entry-footer"><span class="edit-link">',
8997 '</span></footer><!-- .entry-footer -->'
8998 );
8999 - ?>
9000 + ?>
9001
9002 </article><!-- #post-## -->
9003
9004 diff --git a/themes/twentysixteen/template-parts/content-single.php b/themes/twentysixteen/template-parts/content-single.php
9005 index 241f5285..d1061b27 100644
9006 --- a/themes/twentysixteen/template-parts/content-single.php
9007 +++ b/themes/twentysixteen/template-parts/content-single.php
9008 @@ -21,19 +21,21 @@
9009 <?php
9010 the_content();
9011
9012 - wp_link_pages( array(
9013 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
9014 - 'after' => '</div>',
9015 - 'link_before' => '<span>',
9016 - 'link_after' => '</span>',
9017 - 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
9018 - 'separator' => '<span class="screen-reader-text">, </span>',
9019 - ) );
9020 + wp_link_pages(
9021 + array(
9022 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
9023 + 'after' => '</div>',
9024 + 'link_before' => '<span>',
9025 + 'link_after' => '</span>',
9026 + 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
9027 + 'separator' => '<span class="screen-reader-text">, </span>',
9028 + )
9029 + );
9030
9031 if ( '' !== get_the_author_meta( 'description' ) ) {
9032 get_template_part( 'template-parts/biography' );
9033 }
9034 - ?>
9035 + ?>
9036 </div><!-- .entry-content -->
9037
9038 <footer class="entry-footer">
9039 @@ -48,6 +50,6 @@
9040 '<span class="edit-link">',
9041 '</span>'
9042 );
9043 - ?>
9044 + ?>
9045 </footer><!-- .entry-footer -->
9046 </article><!-- #post-## -->
9047
9048 diff --git a/themes/twentysixteen/template-parts/content.php b/themes/twentysixteen/template-parts/content.php
9049 index 22b0ea41..cf88417f 100644
9050 --- a/themes/twentysixteen/template-parts/content.php
9051 +++ b/themes/twentysixteen/template-parts/content.php
9052 @@ -24,20 +24,24 @@
9053 <div class="entry-content">
9054 <?php
9055 /* translators: %s: Name of current post */
9056 - the_content( sprintf(
9057 - __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
9058 - get_the_title()
9059 - ) );
9060 + the_content(
9061 + sprintf(
9062 + __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
9063 + get_the_title()
9064 + )
9065 + );
9066
9067 - wp_link_pages( array(
9068 - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
9069 - 'after' => '</div>',
9070 - 'link_before' => '<span>',
9071 - 'link_after' => '</span>',
9072 - 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
9073 - 'separator' => '<span class="screen-reader-text">, </span>',
9074 - ) );
9075 - ?>
9076 + wp_link_pages(
9077 + array(
9078 + 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
9079 + 'after' => '</div>',
9080 + 'link_before' => '<span>',
9081 + 'link_after' => '</span>',
9082 + 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
9083 + 'separator' => '<span class="screen-reader-text">, </span>',
9084 + )
9085 + );
9086 + ?>
9087 </div><!-- .entry-content -->
9088
9089 <footer class="entry-footer">
9090 @@ -52,6 +56,6 @@
9091 '<span class="edit-link">',
9092 '</span>'
9093 );
9094 - ?>
9095 + ?>
9096 </footer><!-- .entry-footer -->
9097 </article><!-- #post-## -->