1 |
commit: 906293ba64e50ebc824586cf9a171aec7ab57c43 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 2 03:29:50 2019 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 2 03:29:50 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/blogs-gentoo.git/commit/?id=906293ba |
7 |
|
8 |
Update twentysixteen 1.7 |
9 |
|
10 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
11 |
|
12 |
themes/twentysixteen/archive.php | 19 +- |
13 |
themes/twentysixteen/comments.php | 60 +- |
14 |
themes/twentysixteen/css/blocks.css | 423 ++++++++++++++ |
15 |
themes/twentysixteen/css/editor-blocks.css | 612 +++++++++++++++++++++ |
16 |
themes/twentysixteen/css/editor-style.css | 4 +- |
17 |
themes/twentysixteen/footer.php | 26 +- |
18 |
themes/twentysixteen/functions.php | 439 ++++++++------- |
19 |
themes/twentysixteen/header.php | 32 +- |
20 |
themes/twentysixteen/image.php | 124 ++--- |
21 |
themes/twentysixteen/inc/back-compat.php | 8 +- |
22 |
themes/twentysixteen/inc/customizer.php | 454 +++++++-------- |
23 |
themes/twentysixteen/inc/template-tags.php | 342 ++++++------ |
24 |
themes/twentysixteen/index.php | 19 +- |
25 |
themes/twentysixteen/js/functions.js | 17 +- |
26 |
themes/twentysixteen/page.php | 3 +- |
27 |
themes/twentysixteen/readme.txt | 14 +- |
28 |
themes/twentysixteen/search.php | 21 +- |
29 |
themes/twentysixteen/sidebar.php | 2 +- |
30 |
themes/twentysixteen/single.php | 29 +- |
31 |
themes/twentysixteen/style.css | 2 +- |
32 |
.../twentysixteen/template-parts/content-page.php | 18 +- |
33 |
.../template-parts/content-single.php | 18 +- |
34 |
themes/twentysixteen/template-parts/content.php | 28 +- |
35 |
23 files changed, 1869 insertions(+), 845 deletions(-) |
36 |
|
37 |
diff --git a/themes/twentysixteen/archive.php b/themes/twentysixteen/archive.php |
38 |
index 7f30235..bdd2967 100644 |
39 |
--- a/themes/twentysixteen/archive.php |
40 |
+++ b/themes/twentysixteen/archive.php |
41 |
@@ -32,8 +32,7 @@ get_header(); ?> |
42 |
|
43 |
<?php |
44 |
// Start the Loop. |
45 |
- while ( have_posts() ) : |
46 |
- the_post(); |
47 |
+ while ( have_posts() ) : the_post(); |
48 |
|
49 |
/* |
50 |
* Include the Post-Format-specific template for the content. |
51 |
@@ -42,19 +41,17 @@ get_header(); ?> |
52 |
*/ |
53 |
get_template_part( 'template-parts/content', get_post_format() ); |
54 |
|
55 |
- // End the loop. |
56 |
+ // End the loop. |
57 |
endwhile; |
58 |
|
59 |
// Previous/next page navigation. |
60 |
- the_posts_pagination( |
61 |
- array( |
62 |
- 'prev_text' => __( 'Previous page', 'twentysixteen' ), |
63 |
- 'next_text' => __( 'Next page', 'twentysixteen' ), |
64 |
- 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>', |
65 |
- ) |
66 |
- ); |
67 |
+ the_posts_pagination( array( |
68 |
+ 'prev_text' => __( 'Previous page', 'twentysixteen' ), |
69 |
+ 'next_text' => __( 'Next page', 'twentysixteen' ), |
70 |
+ 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>', |
71 |
+ ) ); |
72 |
|
73 |
- // If no content, include the "No posts found" template. |
74 |
+ // If no content, include the "No posts found" template. |
75 |
else : |
76 |
get_template_part( 'template-parts/content', 'none' ); |
77 |
|
78 |
|
79 |
diff --git a/themes/twentysixteen/comments.php b/themes/twentysixteen/comments.php |
80 |
index 95dd565..7ff5b32 100644 |
81 |
--- a/themes/twentysixteen/comments.php |
82 |
+++ b/themes/twentysixteen/comments.php |
83 |
@@ -26,23 +26,23 @@ if ( post_password_required() ) { |
84 |
<h2 class="comments-title"> |
85 |
<?php |
86 |
$comments_number = get_comments_number(); |
87 |
- if ( '1' === $comments_number ) { |
88 |
- /* translators: %s: post title */ |
89 |
- printf( _x( 'One thought on “%s”', 'comments title', 'twentysixteen' ), get_the_title() ); |
90 |
- } else { |
91 |
- printf( |
92 |
- /* translators: 1: number of comments, 2: post title */ |
93 |
- _nx( |
94 |
- '%1$s thought on “%2$s”', |
95 |
- '%1$s thoughts on “%2$s”', |
96 |
- $comments_number, |
97 |
- 'comments title', |
98 |
- 'twentysixteen' |
99 |
- ), |
100 |
- number_format_i18n( $comments_number ), |
101 |
- get_the_title() |
102 |
- ); |
103 |
- } |
104 |
+ if ( '1' === $comments_number ) { |
105 |
+ /* translators: %s: post title */ |
106 |
+ printf( _x( 'One thought on “%s”', 'comments title', 'twentysixteen' ), get_the_title() ); |
107 |
+ } else { |
108 |
+ printf( |
109 |
+ /* translators: 1: number of comments, 2: post title */ |
110 |
+ _nx( |
111 |
+ '%1$s thought on “%2$s”', |
112 |
+ '%1$s thoughts on “%2$s”', |
113 |
+ $comments_number, |
114 |
+ 'comments title', |
115 |
+ 'twentysixteen' |
116 |
+ ), |
117 |
+ number_format_i18n( $comments_number ), |
118 |
+ get_the_title() |
119 |
+ ); |
120 |
+ } |
121 |
?> |
122 |
</h2> |
123 |
|
124 |
@@ -50,13 +50,11 @@ if ( post_password_required() ) { |
125 |
|
126 |
<ol class="comment-list"> |
127 |
<?php |
128 |
- wp_list_comments( |
129 |
- array( |
130 |
- 'style' => 'ol', |
131 |
- 'short_ping' => true, |
132 |
- 'avatar_size' => 42, |
133 |
- ) |
134 |
- ); |
135 |
+ wp_list_comments( array( |
136 |
+ 'style' => 'ol', |
137 |
+ 'short_ping' => true, |
138 |
+ 'avatar_size' => 42, |
139 |
+ ) ); |
140 |
?> |
141 |
</ol><!-- .comment-list --> |
142 |
|
143 |
@@ -66,18 +64,16 @@ if ( post_password_required() ) { |
144 |
|
145 |
<?php |
146 |
// If comments are closed and there are comments, let's leave a little note, shall we? |
147 |
- if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : |
148 |
+ if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : |
149 |
?> |
150 |
- <p class="no-comments"><?php _e( 'Comments are closed.', 'twentysixteen' ); ?></p> |
151 |
+ <p class="no-comments"><?php _e( 'Comments are closed.', 'twentysixteen' ); ?></p> |
152 |
<?php endif; ?> |
153 |
|
154 |
<?php |
155 |
- comment_form( |
156 |
- array( |
157 |
- 'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">', |
158 |
- 'title_reply_after' => '</h2>', |
159 |
- ) |
160 |
- ); |
161 |
+ comment_form( array( |
162 |
+ 'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">', |
163 |
+ 'title_reply_after' => '</h2>', |
164 |
+ ) ); |
165 |
?> |
166 |
|
167 |
</div><!-- .comments-area --> |
168 |
|
169 |
diff --git a/themes/twentysixteen/css/blocks.css b/themes/twentysixteen/css/blocks.css |
170 |
new file mode 100644 |
171 |
index 0000000..ae74224 |
172 |
--- /dev/null |
173 |
+++ b/themes/twentysixteen/css/blocks.css |
174 |
@@ -0,0 +1,423 @@ |
175 |
+/* |
176 |
+Theme Name: Twenty Sixteen |
177 |
+Description: Used to style blocks. |
178 |
+*/ |
179 |
+ |
180 |
+/*-------------------------------------------------------------- |
181 |
+>>> TABLE OF CONTENTS: |
182 |
+---------------------------------------------------------------- |
183 |
+1.0 General Block Styles |
184 |
+2.0 Blocks - Common Blocks |
185 |
+3.0 Blocks - Formatting |
186 |
+4.0 Blocks - Layout Elements |
187 |
+5.0 Blocks - Widgets |
188 |
+6.0 Blocks - Colors |
189 |
+--------------------------------------------------------------*/ |
190 |
+ |
191 |
+/*-------------------------------------------------------------- |
192 |
+1.0 General Block Styles |
193 |
+--------------------------------------------------------------*/ |
194 |
+ |
195 |
+/* Captions */ |
196 |
+ |
197 |
+[class^="wp-block-"] figcaption { |
198 |
+ color: #686868; |
199 |
+ font-style: italic; |
200 |
+ line-height: 1.6153846154; |
201 |
+ padding-top: 0.5384615385em; |
202 |
+ text-align: left; |
203 |
+} |
204 |
+ |
205 |
+.rtl [class^="wp-block-"] figcaption { |
206 |
+ text-align: right; |
207 |
+} |
208 |
+ |
209 |
+/*-------------------------------------------------------------- |
210 |
+2.0 Blocks - Common Blocks |
211 |
+--------------------------------------------------------------*/ |
212 |
+ |
213 |
+/* Paragraph */ |
214 |
+ |
215 |
+p.has-drop-cap:not(:focus)::first-letter { |
216 |
+ font-size: 5em; |
217 |
+} |
218 |
+ |
219 |
+/* Image */ |
220 |
+ |
221 |
+@media screen and (min-width: 61.5625em) { |
222 |
+ body:not(.search-results) article:not(.type-page) .wp-block-image figcaption.below-entry-meta { |
223 |
+ clear: both; |
224 |
+ display: block; |
225 |
+ float: none; |
226 |
+ margin-right: 0; |
227 |
+ margin-left: -40%; |
228 |
+ max-width: 140%; |
229 |
+ } |
230 |
+ |
231 |
+ body.rtl:not(.search-results) article:not(.type-page) .wp-block-image figcaption.below-entry-meta { |
232 |
+ margin-left: 0; |
233 |
+ margin-right: -40%; |
234 |
+ } |
235 |
+} |
236 |
+ |
237 |
+/* Gallery */ |
238 |
+ |
239 |
+.wp-block-gallery { |
240 |
+ margin-bottom: 1.75em; |
241 |
+} |
242 |
+ |
243 |
+/* Quote */ |
244 |
+ |
245 |
+.wp-block-quote:not(.is-large):not(.is-style-large).alignleft, |
246 |
+.wp-block-quote:not(.is-large):not(.is-style-large).alignright { |
247 |
+ border-left: none; |
248 |
+ padding-left: 0; |
249 |
+} |
250 |
+ |
251 |
+.rtl .wp-block-quote:not(.is-large):not(.is-style-large).alignleft, |
252 |
+.rtl .wp-block-quote:not(.is-large):not(.is-style-large).alignright { |
253 |
+ border-right: none; |
254 |
+ padding-right: 0; |
255 |
+} |
256 |
+ |
257 |
+.wp-block-quote cite { |
258 |
+ color: #1a1a1a; |
259 |
+ display: block; |
260 |
+ font-size: 16px; |
261 |
+ font-size: 1rem; |
262 |
+ line-height: 1.75; |
263 |
+} |
264 |
+ |
265 |
+.wp-block-quote cite:before { |
266 |
+ content: "\2014\00a0"; |
267 |
+} |
268 |
+ |
269 |
+/* Audio */ |
270 |
+ |
271 |
+.wp-block-audio audio { |
272 |
+ display: block; |
273 |
+ width: 100%; |
274 |
+} |
275 |
+ |
276 |
+/* Cover */ |
277 |
+ |
278 |
+.wp-block-cover-image.aligncenter, |
279 |
+.wp-block-cover.aligncenter { |
280 |
+ display: flex; |
281 |
+} |
282 |
+ |
283 |
+/* File */ |
284 |
+ |
285 |
+.wp-block-file .wp-block-file__button { |
286 |
+ background: #1a1a1a; |
287 |
+ border: 0; |
288 |
+ border-radius: 2px; |
289 |
+ color: #fff; |
290 |
+ font-family: Montserrat, "Helvetica Neue", sans-serif; |
291 |
+ font-weight: 700; |
292 |
+ letter-spacing: 0.046875em; |
293 |
+ line-height: 1; |
294 |
+ padding: 0.84375em 0.875em 0.78125em; |
295 |
+ text-transform: uppercase; |
296 |
+} |
297 |
+ |
298 |
+.wp-block-file .wp-block-file__button:hover, |
299 |
+.wp-block-file .wp-block-file__button:focus { |
300 |
+ background: #007acc; |
301 |
+} |
302 |
+ |
303 |
+.wp-block-file .wp-block-file__button:focus { |
304 |
+ outline: thin dotted; |
305 |
+ outline-offset: -4px; |
306 |
+} |
307 |
+ |
308 |
+.rtl .wp-block-file * + .wp-block-file__button { |
309 |
+ margin-left: 0.75em; |
310 |
+ margin-right: 0; |
311 |
+} |
312 |
+ |
313 |
+/*-------------------------------------------------------------- |
314 |
+3.0 Blocks - Formatting Blocks |
315 |
+--------------------------------------------------------------*/ |
316 |
+ |
317 |
+/* Code */ |
318 |
+ |
319 |
+.wp-block-code { |
320 |
+ border: 0; |
321 |
+ font-family: Inconsolata, monospace; |
322 |
+ font-size: 16px; |
323 |
+ font-size: 1rem; |
324 |
+ line-height: 1.75; |
325 |
+ padding: 0; |
326 |
+} |
327 |
+ |
328 |
+/* Pullquote */ |
329 |
+ |
330 |
+.wp-block-pullquote { |
331 |
+ border-width: 4px; |
332 |
+} |
333 |
+ |
334 |
+.wp-block-pullquote blockquote { |
335 |
+ border-left: 0; |
336 |
+ margin: 0; |
337 |
+ padding: 0; |
338 |
+} |
339 |
+ |
340 |
+.rtl .wp-block-pullquote blockquote { |
341 |
+ border-right: 0; |
342 |
+} |
343 |
+ |
344 |
+.wp-block-pullquote p { |
345 |
+ color: #686868; |
346 |
+ font-size: 19px; |
347 |
+ font-size: 1.1875rem; |
348 |
+} |
349 |
+ |
350 |
+.wp-block-pullquote cite { |
351 |
+ color: #1a1a1a; |
352 |
+ display: block; |
353 |
+ font-size: 16px; |
354 |
+ font-size: 1rem; |
355 |
+ font-style: none; |
356 |
+ line-height: 1.75; |
357 |
+ text-transform: none; |
358 |
+} |
359 |
+ |
360 |
+.wp-block-pullquote cite:before { |
361 |
+ content: "\2014\00a0"; |
362 |
+} |
363 |
+ |
364 |
+/* Table */ |
365 |
+ |
366 |
+.wp-block-table, |
367 |
+.wp-block-table th, |
368 |
+.wp-block-table td { |
369 |
+ border: 1px solid #d1d1d1; |
370 |
+} |
371 |
+ |
372 |
+.wp-block-table { |
373 |
+ border-collapse: separate; |
374 |
+ border-spacing: 0; |
375 |
+ border-width: 1px 0 0 1px; |
376 |
+ margin: 0 0 1.75em; |
377 |
+ table-layout: fixed; |
378 |
+ width: 100%; |
379 |
+} |
380 |
+ |
381 |
+.wp-block-table th, |
382 |
+.wp-block-table td { |
383 |
+ font-weight: normal; |
384 |
+ padding: 0.4375em; |
385 |
+ text-align: left; |
386 |
+} |
387 |
+ |
388 |
+.wp-block-table th { |
389 |
+ border-width: 0 1px 1px 0; |
390 |
+ font-weight: 700; |
391 |
+} |
392 |
+ |
393 |
+.wp-block-table td { |
394 |
+ border-width: 0 1px 1px 0; |
395 |
+} |
396 |
+ |
397 |
+.rtl .wp-block-table th, |
398 |
+.rtl .wp-block-table td { |
399 |
+ text-align: right; |
400 |
+} |
401 |
+ |
402 |
+/*-------------------------------------------------------------- |
403 |
+4.0 Blocks - Layout Elements |
404 |
+--------------------------------------------------------------*/ |
405 |
+ |
406 |
+/* Buttons */ |
407 |
+ |
408 |
+.wp-block-button .wp-block-button__link { |
409 |
+ border: 0; |
410 |
+ border-radius: 2px; |
411 |
+ font-family: Montserrat, "Helvetica Neue", sans-serif; |
412 |
+ font-weight: 700; |
413 |
+ letter-spacing: 0.046875em; |
414 |
+ line-height: 1; |
415 |
+ padding: 0.84375em 0.875em 0.78125em; |
416 |
+ text-transform: uppercase; |
417 |
+} |
418 |
+ |
419 |
+.entry-content .wp-block-button__link { |
420 |
+ background: #1a1a1a; |
421 |
+ color: #fff; |
422 |
+} |
423 |
+ |
424 |
+.entry-content .wp-block-button__link:hover, |
425 |
+.entry-content .wp-block-button__link:focus { |
426 |
+ background: #007acc; |
427 |
+ color: #fff; |
428 |
+} |
429 |
+ |
430 |
+.wp-block-button .wp-block-button__link:focus { |
431 |
+ outline: thin dotted; |
432 |
+ outline-offset: -4px; |
433 |
+} |
434 |
+ |
435 |
+/* Seperator */ |
436 |
+ |
437 |
+hr.wp-block-separator { |
438 |
+ border: 0; |
439 |
+} |
440 |
+ |
441 |
+.wp-block-separator { |
442 |
+ margin-left: auto; |
443 |
+ margin-right: auto; |
444 |
+ max-width: 100px; |
445 |
+} |
446 |
+ |
447 |
+.wp-block-separator.is-style-wide { |
448 |
+ max-width: 100%; |
449 |
+} |
450 |
+ |
451 |
+/* Media & Text */ |
452 |
+ |
453 |
+.wp-block-media-text { |
454 |
+ margin-bottom: 1.75em; |
455 |
+} |
456 |
+ |
457 |
+.wp-block-media-text *:last-child { |
458 |
+ margin-bottom: 0; |
459 |
+} |
460 |
+ |
461 |
+/*-------------------------------------------------------------- |
462 |
+5.0 Blocks - Widget Blocks |
463 |
+--------------------------------------------------------------*/ |
464 |
+ |
465 |
+/* Archives, Categories & Latest Posts */ |
466 |
+ |
467 |
+.wp-block-archives.aligncenter, |
468 |
+.wp-block-categories.aligncenter, |
469 |
+.wp-block-latest-posts.aligncenter { |
470 |
+ list-style-position: inside; |
471 |
+ text-align: center; |
472 |
+} |
473 |
+ |
474 |
+/* Latest Comments */ |
475 |
+ |
476 |
+.wp-block-latest-comments__comment-meta a { |
477 |
+ box-shadow: none; |
478 |
+ font-weight: 700; |
479 |
+} |
480 |
+ |
481 |
+.wp-block-latest-comments__comment-date { |
482 |
+ color: #686868; |
483 |
+ font-family: Montserrat, "Helvetica Neue", sans-serif; |
484 |
+ font-size: 13px; |
485 |
+ font-size: 0.8125rem; |
486 |
+ line-height: 1.6153846154; |
487 |
+} |
488 |
+ |
489 |
+.wp-block-latest-comments .wp-block-latest-comments__comment { |
490 |
+ border-top: 1px solid #d1d1d1; |
491 |
+ margin-bottom: 0; |
492 |
+ padding: 1.75em 0; |
493 |
+} |
494 |
+ |
495 |
+.wp-block-latest-comments__comment-excerpt p:last-child { |
496 |
+ margin-bottom: 0; |
497 |
+} |
498 |
+ |
499 |
+/*-------------------------------------------------------------- |
500 |
+6.0 Blocks - Colors |
501 |
+--------------------------------------------------------------*/ |
502 |
+ |
503 |
+.entry-content .has-dark-gray-color { |
504 |
+ color: #1a1a1a; |
505 |
+} |
506 |
+ |
507 |
+.entry-content .has-dark-gray-background-color { |
508 |
+ background-color: #1a1a1a; |
509 |
+} |
510 |
+ |
511 |
+.entry-content .has-medium-gray-color { |
512 |
+ color: #686868; |
513 |
+} |
514 |
+ |
515 |
+.entry-content .has-medium-gray-background-color { |
516 |
+ background-color: #686868; |
517 |
+} |
518 |
+ |
519 |
+.entry-content .has-light-gray-color { |
520 |
+ color: #e5e5e5; |
521 |
+} |
522 |
+ |
523 |
+.entry-content .has-light-gray-background-color { |
524 |
+ background-color: #e5e5e5; |
525 |
+} |
526 |
+ |
527 |
+.entry-content .has-white-color { |
528 |
+ color: #fff; |
529 |
+} |
530 |
+ |
531 |
+.entry-content .has-white-background-color { |
532 |
+ background-color: #fff; |
533 |
+} |
534 |
+ |
535 |
+.entry-content .has-blue-gray-color { |
536 |
+ color: #4d545c; |
537 |
+} |
538 |
+ |
539 |
+.entry-content .has-blue-gray-background-color { |
540 |
+ background-color: #4d545c; |
541 |
+} |
542 |
+ |
543 |
+.entry-content .has-bright-blue-color { |
544 |
+ color: #007acc; |
545 |
+} |
546 |
+ |
547 |
+.entry-content .has-bright-blue-background-color { |
548 |
+ background-color: #007acc; |
549 |
+} |
550 |
+ |
551 |
+.entry-content .has-light-blue-color { |
552 |
+ color: #9adffd; |
553 |
+} |
554 |
+ |
555 |
+.entry-content .has-light-blue-background-color { |
556 |
+ background-color: #9adffd; |
557 |
+} |
558 |
+ |
559 |
+.entry-content .has-dark-brown-color { |
560 |
+ color: #402b30; |
561 |
+} |
562 |
+ |
563 |
+.entry-content .has-dark-brown-background-color { |
564 |
+ background-color: #402b30; |
565 |
+} |
566 |
+ |
567 |
+.entry-content .has-medium-brown-color { |
568 |
+ color: #774e24; |
569 |
+} |
570 |
+ |
571 |
+.entry-content .has-medium-brown-background-color { |
572 |
+ background-color: #774e24; |
573 |
+} |
574 |
+ |
575 |
+.entry-content .has-dark-red-color { |
576 |
+ color: #640c1f; |
577 |
+} |
578 |
+ |
579 |
+.entry-content .has-dark-red-background-color { |
580 |
+ background-color: #640c1f; |
581 |
+} |
582 |
+ |
583 |
+.entry-content .has-bright-red-color { |
584 |
+ color: #ff675f; |
585 |
+} |
586 |
+ |
587 |
+.entry-content .has-bright-red-background-color { |
588 |
+ background-color: #ff675f; |
589 |
+} |
590 |
+ |
591 |
+.entry-content .has-yellow-color { |
592 |
+ color: #ffef8e; |
593 |
+} |
594 |
+ |
595 |
+.entry-content .has-yellow-background-color { |
596 |
+ background-color: #ffef8e; |
597 |
+} |
598 |
|
599 |
diff --git a/themes/twentysixteen/css/editor-blocks.css b/themes/twentysixteen/css/editor-blocks.css |
600 |
new file mode 100644 |
601 |
index 0000000..802353b |
602 |
--- /dev/null |
603 |
+++ b/themes/twentysixteen/css/editor-blocks.css |
604 |
@@ -0,0 +1,612 @@ |
605 |
+/* |
606 |
+Theme Name: Twenty Sixteen |
607 |
+Description: Used to style blocks in the editor. |
608 |
+*/ |
609 |
+ |
610 |
+/*-------------------------------------------------------------- |
611 |
+>>> TABLE OF CONTENTS: |
612 |
+---------------------------------------------------------------- |
613 |
+1.0 General Typography |
614 |
+2.0 General Block Styles |
615 |
+3.0 Blocks - Common Blocks |
616 |
+4.0 Blocks - Formatting |
617 |
+5.0 Blocks - Layout Elements |
618 |
+6.0 Blocks - Widgets |
619 |
+--------------------------------------------------------------*/ |
620 |
+ |
621 |
+/*-------------------------------------------------------------- |
622 |
+1.0 General Typography |
623 |
+--------------------------------------------------------------*/ |
624 |
+ |
625 |
+.edit-post-visual-editor .editor-block-list__block, |
626 |
+.editor-default-block-appender textarea.editor-default-block-appender__content { |
627 |
+ font-family: Merriweather, Georgia, serif; |
628 |
+ font-size: 16px; |
629 |
+ font-size: 1rem; |
630 |
+ line-height: 1.75; |
631 |
+} |
632 |
+ |
633 |
+.edit-post-visual-editor .editor-block-list__block { |
634 |
+ color: #1a1a1a; |
635 |
+} |
636 |
+ |
637 |
+.editor-post-title__block .editor-post-title__input { |
638 |
+ font-family: Montserrat, "Helvetica Neue", sans-serif; |
639 |
+ font-size: 28px; |
640 |
+ font-size: 1.75rem; |
641 |
+ font-weight: 700; |
642 |
+ line-height: 1.25; |
643 |
+ margin-bottom: 1em; |
644 |
+} |
645 |
+ |
646 |
+.edit-post-visual-editor h1 { |
647 |
+ font-size: 28px; |
648 |
+ font-size: 1.75rem; |
649 |
+ line-height: 1.25; |
650 |
+ margin-top: 2em; |
651 |
+ margin-bottom: 1em; |
652 |
+} |
653 |
+ |
654 |
+.edit-post-visual-editor h2 { |
655 |
+ font-size: 23px; |
656 |
+ font-size: 1.4375rem; |
657 |
+ line-height: 1.2173913043; |
658 |
+ margin-top: 2.4347826087em; |
659 |
+ margin-bottom: 1.2173913043em; |
660 |
+} |
661 |
+ |
662 |
+.edit-post-visual-editor h3 { |
663 |
+ font-size: 19px; |
664 |
+ font-size: 1.1875rem; |
665 |
+ line-height: 1.1052631579; |
666 |
+ margin-top: 2.9473684211em; |
667 |
+ margin-bottom: 1.4736842105em; |
668 |
+} |
669 |
+ |
670 |
+.edit-post-visual-editor h4, |
671 |
+.edit-post-visual-editor h5, |
672 |
+.edit-post-visual-editor h6 { |
673 |
+ font-size: 16px; |
674 |
+ font-size: 1rem; |
675 |
+ line-height: 1.3125; |
676 |
+ margin-top: 3.5em; |
677 |
+ margin-bottom: 1.75em; |
678 |
+} |
679 |
+ |
680 |
+.edit-post-visual-editor h4 { |
681 |
+ letter-spacing: 0.140625em; |
682 |
+ text-transform: uppercase; |
683 |
+} |
684 |
+ |
685 |
+.edit-post-visual-editor h6 { |
686 |
+ font-style: italic; |
687 |
+} |
688 |
+ |
689 |
+.edit-post-visual-editor h1, |
690 |
+.edit-post-visual-editor h2, |
691 |
+.edit-post-visual-editor h3, |
692 |
+.edit-post-visual-editor h4, |
693 |
+.edit-post-visual-editor h5, |
694 |
+.edit-post-visual-editor h6 { |
695 |
+ font-weight: 900; |
696 |
+} |
697 |
+ |
698 |
+@media screen and (min-width: 61.5625em) { |
699 |
+ .edit-post-visual-editor h1 { |
700 |
+ font-size: 33px; |
701 |
+ font-size: 2.0625rem; |
702 |
+ line-height: 1.2727272727; |
703 |
+ margin-top: 1.696969697em; |
704 |
+ margin-bottom: 0.8484848485em; |
705 |
+ } |
706 |
+ |
707 |
+ .edit-post-visual-editor h2 { |
708 |
+ font-size: 28px; |
709 |
+ font-size: 1.75rem; |
710 |
+ line-height: 1.25; |
711 |
+ margin-top: 2em; |
712 |
+ margin-bottom: 1em; |
713 |
+ } |
714 |
+ |
715 |
+ .edit-post-visual-editor h3 { |
716 |
+ font-size: 23px; |
717 |
+ font-size: 1.4375rem; |
718 |
+ line-height: 1.2173913043; |
719 |
+ margin-top: 2.4347826087em; |
720 |
+ margin-bottom: 1.2173913043em; |
721 |
+ } |
722 |
+ |
723 |
+ .edit-post-visual-editor h4 { |
724 |
+ letter-spacing: 0.131578947em; |
725 |
+ } |
726 |
+ |
727 |
+ .edit-post-visual-editor h4, |
728 |
+ .edit-post-visual-editor h5, |
729 |
+ .edit-post-visual-editor h6 { |
730 |
+ font-size: 19px; |
731 |
+ font-size: 1.1875rem; |
732 |
+ line-height: 1.1052631579; |
733 |
+ margin-top: 2.9473684211em; |
734 |
+ margin-bottom: 1.473684211em; |
735 |
+ } |
736 |
+} |
737 |
+ |
738 |
+.edit-post-visual-editor h1:first-child, |
739 |
+.edit-post-visual-editor h2:first-child, |
740 |
+.edit-post-visual-editor h3:first-child, |
741 |
+.edit-post-visual-editor h4:first-child, |
742 |
+.edit-post-visual-editor h5:first-child, |
743 |
+.edit-post-visual-editor h6:first-child { |
744 |
+ margin-top: 0; |
745 |
+} |
746 |
+ |
747 |
+.edit-post-visual-editor p { |
748 |
+ margin: 0 0 1.75em; |
749 |
+} |
750 |
+ |
751 |
+.edit-post-visual-editor blockquote p { |
752 |
+ margin-bottom: 1.4736842105em; |
753 |
+} |
754 |
+ |
755 |
+@media screen and (min-width: 44.375em) { |
756 |
+ .editor-post-title__block .editor-post-title__input { |
757 |
+ font-size: 33px; |
758 |
+ font-size: 2.0625rem; |
759 |
+ line-height: 1.2727272727; |
760 |
+ margin-bottom: 0.8484848485em; |
761 |
+ } |
762 |
+} |
763 |
+ |
764 |
+@media screen and (min-width: 61.5625em) { |
765 |
+ .editor-post-title__block .editor-post-title__input { |
766 |
+ font-size: 40px; |
767 |
+ font-size: 2.5rem; |
768 |
+ line-height: 1.225; |
769 |
+ margin-bottom: 1.05em; |
770 |
+ } |
771 |
+} |
772 |
+ |
773 |
+/*-------------------------------------------------------------- |
774 |
+2.0 General Block Styles |
775 |
+--------------------------------------------------------------*/ |
776 |
+ |
777 |
+/* Main column width */ |
778 |
+ |
779 |
+.editor-styles-wrapper { |
780 |
+ max-width: 100% !important; /* Override where editor-style.css is affecting this */ |
781 |
+} |
782 |
+ |
783 |
+.wp-block { |
784 |
+ max-width: 630px; /* 600px + 30px to account for padding. */ |
785 |
+} |
786 |
+ |
787 |
+/* Link styles */ |
788 |
+ |
789 |
+.edit-post-visual-editor a, |
790 |
+.editor-block-list__block a, |
791 |
+.wp-block-freeform.block-library-rich-text__tinymce a { |
792 |
+ color: #007acc; |
793 |
+} |
794 |
+ |
795 |
+/* List styles */ |
796 |
+ |
797 |
+.edit-post-visual-editor ul:not(.wp-block-gallery), |
798 |
+.editor-block-list__block ul:not(.wp-block-gallery), |
799 |
+.block-library-list ul, |
800 |
+.edit-post-visual-editor ol, |
801 |
+.editor-block-list__block ol, |
802 |
+.block-library-list ol { |
803 |
+ margin: 0 0 1.75em 1.25em; |
804 |
+ padding: 0; |
805 |
+} |
806 |
+ |
807 |
+.edit-post-visual-editor ul:not(.wp-block-gallery), |
808 |
+.editor-block-list__block ul:not(.wp-block-gallery), |
809 |
+.block-library-list ul { |
810 |
+ list-style: disc; |
811 |
+} |
812 |
+ |
813 |
+.edit-post-visual-editor ol, |
814 |
+.editor-block-list__block ol, |
815 |
+.block-library-list ol { |
816 |
+ list-style: decimal; |
817 |
+ margin-left: 1.5em; |
818 |
+} |
819 |
+ |
820 |
+.edit-post-visual-editor ul:not(.wp-block-gallery) li, |
821 |
+.editor-block-list__block ul:not(.wp-block-gallery) li, |
822 |
+.edit-post-visual-editor ol li, |
823 |
+.editor-block-list__block ol li, |
824 |
+.block-library-list li { |
825 |
+ margin-bottom: 0; |
826 |
+} |
827 |
+ |
828 |
+.edit-post-visual-editor ul:not(.wp-block-gallery) li > ul, |
829 |
+.editor-block-list__block ul:not(.wp-block-gallery) li > ul, |
830 |
+.block-library-list li > ul, |
831 |
+.edit-post-visual-editor li > ol, |
832 |
+.editor-block-list__block li > ol, |
833 |
+.block-library-list li > ol { |
834 |
+ margin-bottom: 0; |
835 |
+} |
836 |
+ |
837 |
+.rtl .edit-post-visual-editor ul:not(.wp-block-gallery), |
838 |
+.rtl .editor-block-list__block ul:not(.wp-block-gallery), |
839 |
+.rtl .block-library-list ul, |
840 |
+.rtl .edit-post-visual-editor ol, |
841 |
+.rtl .editor-block-list__block ol, |
842 |
+.rtl .block-library-list ol { |
843 |
+ margin-left: 0; |
844 |
+ margin-right: 1.25em; |
845 |
+ padding: 0; |
846 |
+} |
847 |
+ |
848 |
+.rtl .edit-post-visual-editor ol, |
849 |
+.rtl .editor-block-list__block ol, |
850 |
+.rtl .block-library-list ol { |
851 |
+ margin-left: 1.5em; |
852 |
+ margin-right: 1.5em; |
853 |
+} |
854 |
+ |
855 |
+/* Quotes */ |
856 |
+ |
857 |
+.rtl .editor-block-list__block blockquote { |
858 |
+ border-left: 0; |
859 |
+ padding-left: 0; |
860 |
+} |
861 |
+ |
862 |
+/* Captions */ |
863 |
+ |
864 |
+[class^="wp-block-"] figcaption { |
865 |
+ color: #686868; |
866 |
+ font-style: italic; |
867 |
+ line-height: 1.6153846154; |
868 |
+ padding-top: 0.5384615385em; |
869 |
+ text-align: left; |
870 |
+} |
871 |
+ |
872 |
+.rtl [class^="wp-block-"] figcaption { |
873 |
+ text-align: right; |
874 |
+} |
875 |
+ |
876 |
+/*-------------------------------------------------------------- |
877 |
+3.0 Blocks - Common Blocks |
878 |
+--------------------------------------------------------------*/ |
879 |
+ |
880 |
+/* Paragraph */ |
881 |
+ |
882 |
+.wp-block-paragraph.has-drop-cap:not(:focus)::first-letter { |
883 |
+ font-size: 5em; |
884 |
+ line-height: 0.68; |
885 |
+ margin: 0.05em 0.1em 0 0; |
886 |
+ text-transform: uppercase; |
887 |
+ font-style: normal; |
888 |
+} |
889 |
+ |
890 |
+.rtl .wp-block-paragraph.has-drop-cap:not(:focus)::first-letter { |
891 |
+ margin: 0.05em 0 0 0.1em; |
892 |
+} |
893 |
+ |
894 |
+/* Quote */ |
895 |
+ |
896 |
+.wp-block-quote { |
897 |
+ border: 0 solid #1a1a1a; |
898 |
+ border-left-width: 4px; |
899 |
+ color: #686868; |
900 |
+ font-style: italic; |
901 |
+ line-height: 1.4736842105; |
902 |
+ margin: 0 0 1.4736842105em; |
903 |
+ overflow: hidden; |
904 |
+ padding: 0 0 0 1.263157895em; |
905 |
+} |
906 |
+ |
907 |
+.wp-block-quote:not(.is-large):not(.is-style-large).alignleft, |
908 |
+.wp-block-quote:not(.is-large):not(.is-style-large).alignright { |
909 |
+ border-left: 0; |
910 |
+ padding-left: 0; |
911 |
+} |
912 |
+ |
913 |
+.editor-block-list__block .wp-block-quote p { |
914 |
+ font-size: 19px; |
915 |
+ font-size: 1.1875rem; |
916 |
+ margin-bottom: 1.4736842105em; |
917 |
+} |
918 |
+ |
919 |
+.wp-block-quote__citation { |
920 |
+ color: #1a1a1a; |
921 |
+ display: block; |
922 |
+ font-size: 16px; |
923 |
+ font-size: 1rem; |
924 |
+ line-height: 1.75; |
925 |
+} |
926 |
+ |
927 |
+.wp-block-quote__citation:before { |
928 |
+ content: "\2014\00a0"; |
929 |
+} |
930 |
+ |
931 |
+.wp-block-quote em, |
932 |
+.wp-block-quote i, |
933 |
+.wp-block-quote__citation:before { |
934 |
+ font-style: normal; |
935 |
+} |
936 |
+ |
937 |
+.wp-block-quote strong, |
938 |
+.wp-block-quote b { |
939 |
+ font-weight: 400; |
940 |
+} |
941 |
+ |
942 |
+.wp-block-quote > :last-child { |
943 |
+ margin-bottom: 0; |
944 |
+} |
945 |
+ |
946 |
+.wp-block-quote.alignleft { |
947 |
+ margin: 0.3157894737em 1.4736842105em 1.473684211em 0; |
948 |
+} |
949 |
+ |
950 |
+.wp-block-quote.alignright { |
951 |
+ margin: 0.3157894737em 0 1.473684211em 1.4736842105em; |
952 |
+} |
953 |
+ |
954 |
+.wp-block-quote.aligncenter { |
955 |
+ margin-bottom: 1.473684211em; |
956 |
+} |
957 |
+ |
958 |
+.rtl .wp-block-quote:not(.is-large):not(.is-style-large).alignleft, |
959 |
+.rtl .wp-block-quote:not(.is-large):not(.is-style-large).alignright { |
960 |
+ border-right: 0; |
961 |
+ padding-right: 0; |
962 |
+} |
963 |
+ |
964 |
+@media screen and (min-width: 44.375em) { |
965 |
+ .wp-block-quote.alignleft, |
966 |
+ .wp-block-quote.alignright { |
967 |
+ border-width: 4px 0 0 0; |
968 |
+ padding: 0.9473684211em 0 0; |
969 |
+ width: -webkit-calc(50% - 0.736842105em); |
970 |
+ width: calc(50% - 0.736842105em); |
971 |
+ } |
972 |
+ |
973 |
+ .wp-block-quote:not(.alignleft):not(.alignright) { |
974 |
+ margin-left: -1.473684211em; |
975 |
+ } |
976 |
+ |
977 |
+ .rtl .wp-block-quote:not(.alignleft):not(.alignright) { |
978 |
+ margin-left: 0; |
979 |
+ margin-right: -1.473684211em; |
980 |
+ } |
981 |
+} |
982 |
+ |
983 |
+@media screen and (min-width: 80em) { |
984 |
+ .editor-block-list__block .wp-block-quote.alignleft { |
985 |
+ margin-left: -40%; |
986 |
+ width: -webkit-calc(60% - 1.4736842105em); |
987 |
+ width: calc(60% - 1.4736842105em); |
988 |
+ } |
989 |
+} |
990 |
+ |
991 |
+/* File */ |
992 |
+ |
993 |
+.wp-block-file__textlink { |
994 |
+ box-shadow: 0 1px 0 0 currentColor; |
995 |
+ color: #007acc; |
996 |
+} |
997 |
+ |
998 |
+.wp-block-file .wp-block-file__button { |
999 |
+ background: #1a1a1a; |
1000 |
+ border: 0; |
1001 |
+ border-radius: 2px; |
1002 |
+ color: #fff; |
1003 |
+ font-family: Montserrat, "Helvetica Neue", sans-serif; |
1004 |
+ font-weight: 700; |
1005 |
+ letter-spacing: 0.046875em; |
1006 |
+ line-height: 1; |
1007 |
+ padding: 0.84375em 0.875em 0.78125em; |
1008 |
+ text-transform: uppercase; |
1009 |
+} |
1010 |
+ |
1011 |
+/*-------------------------------------------------------------- |
1012 |
+4.0 Blocks - Formatting |
1013 |
+--------------------------------------------------------------*/ |
1014 |
+ |
1015 |
+/* Code */ |
1016 |
+ |
1017 |
+.wp-block-code { |
1018 |
+ border: 0; |
1019 |
+ padding: 0.125em 0.25em; |
1020 |
+} |
1021 |
+ |
1022 |
+/* Classic */ |
1023 |
+ |
1024 |
+.wp-block-freeform.block-library-rich-text__tinymce blockquote { |
1025 |
+ border: 0 solid #1a1a1a; |
1026 |
+ border-left-width: 4px; |
1027 |
+ color: #686868; |
1028 |
+ font-style: italic; |
1029 |
+ line-height: 1.4736842105; |
1030 |
+ margin: 0 0 1.4736842105em; |
1031 |
+ overflow: hidden; |
1032 |
+ padding: 0 0 0 1.263157895em; |
1033 |
+} |
1034 |
+ |
1035 |
+.editor-block-list__block .wp-block-freeform.block-library-rich-text__tinymce blockquote:not(.alignleft):not(.alignright) { |
1036 |
+ margin-left: 0; |
1037 |
+} |
1038 |
+ |
1039 |
+.wp-block-freeform.block-library-rich-text__tinymce blockquote p { |
1040 |
+ font-size: 19px; |
1041 |
+ font-size: 1.1875rem; |
1042 |
+} |
1043 |
+ |
1044 |
+.wp-block-freeform.block-library-rich-text__tinymce blockquote cite { |
1045 |
+ color: #1a1a1a; |
1046 |
+ display: block; |
1047 |
+ font-size: 16px; |
1048 |
+ font-size: 1rem; |
1049 |
+ font-style: normal; |
1050 |
+ line-height: 1.75; |
1051 |
+} |
1052 |
+ |
1053 |
+.wp-block-freeform.block-library-rich-text__tinymce blockquote cite:before { |
1054 |
+ content: "\2014\00a0"; |
1055 |
+} |
1056 |
+ |
1057 |
+.wp-block-freeform.block-library-rich-text__tinymce blockquote.alignleft { |
1058 |
+ margin: 0.3157894737em 1.4736842105em 1.473684211em 0; |
1059 |
+} |
1060 |
+ |
1061 |
+.wp-block-freeform.block-library-rich-text__tinymce blockquote.alignright { |
1062 |
+ margin: 0.3157894737em 0 1.473684211em 1.4736842105em; |
1063 |
+} |
1064 |
+ |
1065 |
+.wp-block-freeform.block-library-rich-text__tinymce blockquote.aligncenter { |
1066 |
+ margin-bottom: 1.473684211em; |
1067 |
+} |
1068 |
+ |
1069 |
+@media screen and (min-width: 44.375em) { |
1070 |
+ .wp-block-freeform.block-library-rich-text__tinymce blockquote.alignleft, |
1071 |
+ .wp-block-freeform.block-library-rich-text__tinymce blockquote.alignright { |
1072 |
+ border-width: 4px 0 0 0; |
1073 |
+ padding: 0.9473684211em 0 0; |
1074 |
+ width: -webkit-calc(50% - 0.736842105em); |
1075 |
+ width: calc(50% - 0.736842105em); |
1076 |
+ } |
1077 |
+} |
1078 |
+ |
1079 |
+.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote { |
1080 |
+ border-left-width: 0; |
1081 |
+ border-right-width: 4px; |
1082 |
+ overflow: hidden; |
1083 |
+ padding-left: 0; |
1084 |
+ padding-right: 1.263157895em; |
1085 |
+} |
1086 |
+ |
1087 |
+.rtl .wp-block-freeform.block-library-rich-text__tinymce .alignleft { |
1088 |
+ float: left; |
1089 |
+} |
1090 |
+ |
1091 |
+.rtl .wp-block-freeform.block-library-rich-text__tinymce .alignright { |
1092 |
+ float: right; |
1093 |
+} |
1094 |
+ |
1095 |
+.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote.alignleft { |
1096 |
+ margin: 0.3157894737em 0 1.473684211em 1.4736842105em; |
1097 |
+} |
1098 |
+ |
1099 |
+.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote.alignright { |
1100 |
+ margin: 0.3157894737em 1.4736842105em 1.473684211em 0; |
1101 |
+} |
1102 |
+ |
1103 |
+/* Pullquote */ |
1104 |
+ |
1105 |
+.editor-block-list__block .wp-block-pullquote blockquote { |
1106 |
+ border: 0; |
1107 |
+ margin: 0; |
1108 |
+ padding: 0; |
1109 |
+} |
1110 |
+ |
1111 |
+.wp-block-pullquote blockquote > .editor-rich-text p { |
1112 |
+ color: #686868; |
1113 |
+ font-size: 19px; |
1114 |
+ font-size: 1.1875rem; |
1115 |
+} |
1116 |
+ |
1117 |
+.wp-block-pullquote .wp-block-pullquote__citation { |
1118 |
+ color: #1a1a1a; |
1119 |
+ display: block; |
1120 |
+ font-size: 16px; |
1121 |
+ font-size: 1rem; |
1122 |
+ font-style: italic; |
1123 |
+ line-height: 1.75; |
1124 |
+ text-transform: none; |
1125 |
+} |
1126 |
+ |
1127 |
+.wp-block-pullquote .wp-block-pullquote__citation:before { |
1128 |
+ content: "\2014\00a0"; |
1129 |
+} |
1130 |
+ |
1131 |
+/* Table */ |
1132 |
+ |
1133 |
+.editor-block-list__block table.wp-block-table th, |
1134 |
+.editor-block-list__block table.wp-block-table td { |
1135 |
+ padding: 0; |
1136 |
+} |
1137 |
+ |
1138 |
+.rtl .wp-block-table th, |
1139 |
+.rtl .wp-block-table td { |
1140 |
+ text-align: right; |
1141 |
+} |
1142 |
+ |
1143 |
+/*-------------------------------------------------------------- |
1144 |
+5.0 Blocks - Layout Elements |
1145 |
+--------------------------------------------------------------*/ |
1146 |
+ |
1147 |
+/* Buttons */ |
1148 |
+ |
1149 |
+.wp-block-button .wp-block-button__link { |
1150 |
+ background: #1a1a1a; |
1151 |
+ border: 0; |
1152 |
+ border-radius: 2px; |
1153 |
+ color: #fff; |
1154 |
+ font-family: Montserrat, "Helvetica Neue", sans-serif; |
1155 |
+ font-weight: 700; |
1156 |
+ letter-spacing: 0.046875em; |
1157 |
+ line-height: 1; |
1158 |
+ padding: 0.84375em 0.875em 0.78125em; |
1159 |
+ text-transform: uppercase; |
1160 |
+} |
1161 |
+ |
1162 |
+/* Media & Text */ |
1163 |
+ |
1164 |
+.wp-block-media-text *:last-child { |
1165 |
+ margin-bottom: 0; |
1166 |
+} |
1167 |
+ |
1168 |
+/*-------------------------------------------------------------- |
1169 |
+6.0 Blocks - Widgets |
1170 |
+--------------------------------------------------------------*/ |
1171 |
+ |
1172 |
+/* Archives, Categories & Latest Posts */ |
1173 |
+ |
1174 |
+[data-align="center"] .wp-block-archives ul, |
1175 |
+[data-align="center"] .wp-block-categories ul, |
1176 |
+[data-align="center"] .wp-block-latest-posts ul { |
1177 |
+ list-style-position: inside; |
1178 |
+} |
1179 |
+ |
1180 |
+/* Latest Comments */ |
1181 |
+ |
1182 |
+.editor-block-list__block .wp-block-latest-comments__comment-meta a { |
1183 |
+ box-shadow: none; |
1184 |
+ font-weight: 700; |
1185 |
+ text-decoration: none; |
1186 |
+} |
1187 |
+ |
1188 |
+.wp-block-latest-comments__comment-date { |
1189 |
+ color: #686868; |
1190 |
+ font-family: Montserrat, "Helvetica Neue", sans-serif; |
1191 |
+ font-size: 13px; |
1192 |
+ font-size: 0.8125rem; |
1193 |
+ line-height: 1.6153846154; |
1194 |
+} |
1195 |
+ |
1196 |
+.wp-block-latest-comments .wp-block-latest-comments__comment { |
1197 |
+ border-top: 1px solid #d1d1d1; |
1198 |
+ margin-bottom: 0; |
1199 |
+ padding: 1.75em 0; |
1200 |
+} |
1201 |
+ |
1202 |
+.wp-block-latest-comments__comment-excerpt p:last-child { |
1203 |
+ margin-bottom: 0; |
1204 |
+} |
1205 |
+ |
1206 |
+/* Latest Posts */ |
1207 |
+ |
1208 |
+.edit-post-visual-editor .wp-block-latest-posts.is-grid { |
1209 |
+ list-style: none; |
1210 |
+ margin-left: 0; |
1211 |
+ margin-right: 0; |
1212 |
+} |
1213 |
+ |
1214 |
+.edit-post-visual-editor .wp-block-latest-posts.is-grid li { |
1215 |
+ margin-bottom: 16px; |
1216 |
+} |
1217 |
|
1218 |
diff --git a/themes/twentysixteen/css/editor-style.css b/themes/twentysixteen/css/editor-style.css |
1219 |
index 3055195..ed48ce7 100644 |
1220 |
--- a/themes/twentysixteen/css/editor-style.css |
1221 |
+++ b/themes/twentysixteen/css/editor-style.css |
1222 |
@@ -223,11 +223,11 @@ sub { |
1223 |
vertical-align: baseline; |
1224 |
} |
1225 |
|
1226 |
-sub { |
1227 |
+sup { |
1228 |
top: -6px; |
1229 |
} |
1230 |
|
1231 |
-sup { |
1232 |
+sub { |
1233 |
bottom: -3px; |
1234 |
} |
1235 |
|
1236 |
|
1237 |
diff --git a/themes/twentysixteen/footer.php b/themes/twentysixteen/footer.php |
1238 |
index 5fff3bd..baa8209 100644 |
1239 |
--- a/themes/twentysixteen/footer.php |
1240 |
+++ b/themes/twentysixteen/footer.php |
1241 |
@@ -16,12 +16,10 @@ |
1242 |
<?php if ( has_nav_menu( 'primary' ) ) : ?> |
1243 |
<nav class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Primary Menu', 'twentysixteen' ); ?>"> |
1244 |
<?php |
1245 |
- wp_nav_menu( |
1246 |
- array( |
1247 |
- 'theme_location' => 'primary', |
1248 |
- 'menu_class' => 'primary-menu', |
1249 |
- ) |
1250 |
- ); |
1251 |
+ wp_nav_menu( array( |
1252 |
+ 'theme_location' => 'primary', |
1253 |
+ 'menu_class' => 'primary-menu', |
1254 |
+ ) ); |
1255 |
?> |
1256 |
</nav><!-- .main-navigation --> |
1257 |
<?php endif; ?> |
1258 |
@@ -29,15 +27,13 @@ |
1259 |
<?php if ( has_nav_menu( 'social' ) ) : ?> |
1260 |
<nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Social Links Menu', 'twentysixteen' ); ?>"> |
1261 |
<?php |
1262 |
- wp_nav_menu( |
1263 |
- array( |
1264 |
- 'theme_location' => 'social', |
1265 |
- 'menu_class' => 'social-links-menu', |
1266 |
- 'depth' => 1, |
1267 |
- 'link_before' => '<span class="screen-reader-text">', |
1268 |
- 'link_after' => '</span>', |
1269 |
- ) |
1270 |
- ); |
1271 |
+ wp_nav_menu( array( |
1272 |
+ 'theme_location' => 'social', |
1273 |
+ 'menu_class' => 'social-links-menu', |
1274 |
+ 'depth' => 1, |
1275 |
+ 'link_before' => '<span class="screen-reader-text">', |
1276 |
+ 'link_after' => '</span>', |
1277 |
+ ) ); |
1278 |
?> |
1279 |
</nav><!-- .social-navigation --> |
1280 |
<?php endif; ?> |
1281 |
|
1282 |
diff --git a/themes/twentysixteen/functions.php b/themes/twentysixteen/functions.php |
1283 |
index 3e675ea..1bade4c 100644 |
1284 |
--- a/themes/twentysixteen/functions.php |
1285 |
+++ b/themes/twentysixteen/functions.php |
1286 |
@@ -33,108 +33,173 @@ if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) { |
1287 |
} |
1288 |
|
1289 |
if ( ! function_exists( 'twentysixteen_setup' ) ) : |
1290 |
- /** |
1291 |
- * Sets up theme defaults and registers support for various WordPress features. |
1292 |
+/** |
1293 |
+ * Sets up theme defaults and registers support for various WordPress features. |
1294 |
+ * |
1295 |
+ * Note that this function is hooked into the after_setup_theme hook, which |
1296 |
+ * runs before the init hook. The init hook is too late for some features, such |
1297 |
+ * as indicating support for post thumbnails. |
1298 |
+ * |
1299 |
+ * Create your own twentysixteen_setup() function to override in a child theme. |
1300 |
+ * |
1301 |
+ * @since Twenty Sixteen 1.0 |
1302 |
+ */ |
1303 |
+function twentysixteen_setup() { |
1304 |
+ /* |
1305 |
+ * Make theme available for translation. |
1306 |
+ * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentysixteen |
1307 |
+ * If you're building a theme based on Twenty Sixteen, use a find and replace |
1308 |
+ * to change 'twentysixteen' to the name of your theme in all the template files |
1309 |
+ */ |
1310 |
+ load_theme_textdomain( 'twentysixteen' ); |
1311 |
+ |
1312 |
+ // Add default posts and comments RSS feed links to head. |
1313 |
+ add_theme_support( 'automatic-feed-links' ); |
1314 |
+ |
1315 |
+ /* |
1316 |
+ * Let WordPress manage the document title. |
1317 |
+ * By adding theme support, we declare that this theme does not use a |
1318 |
+ * hard-coded <title> tag in the document head, and expect WordPress to |
1319 |
+ * provide it for us. |
1320 |
+ */ |
1321 |
+ add_theme_support( 'title-tag' ); |
1322 |
+ |
1323 |
+ /* |
1324 |
+ * Enable support for custom logo. |
1325 |
* |
1326 |
- * Note that this function is hooked into the after_setup_theme hook, which |
1327 |
- * runs before the init hook. The init hook is too late for some features, such |
1328 |
- * as indicating support for post thumbnails. |
1329 |
+ * @since Twenty Sixteen 1.2 |
1330 |
+ */ |
1331 |
+ add_theme_support( 'custom-logo', array( |
1332 |
+ 'height' => 240, |
1333 |
+ 'width' => 240, |
1334 |
+ 'flex-height' => true, |
1335 |
+ ) ); |
1336 |
+ |
1337 |
+ /* |
1338 |
+ * Enable support for Post Thumbnails on posts and pages. |
1339 |
* |
1340 |
- * Create your own twentysixteen_setup() function to override in a child theme. |
1341 |
+ * @link https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails |
1342 |
+ */ |
1343 |
+ add_theme_support( 'post-thumbnails' ); |
1344 |
+ set_post_thumbnail_size( 1200, 9999 ); |
1345 |
+ |
1346 |
+ // This theme uses wp_nav_menu() in two locations. |
1347 |
+ register_nav_menus( array( |
1348 |
+ 'primary' => __( 'Primary Menu', 'twentysixteen' ), |
1349 |
+ 'social' => __( 'Social Links Menu', 'twentysixteen' ), |
1350 |
+ ) ); |
1351 |
+ |
1352 |
+ /* |
1353 |
+ * Switch default core markup for search form, comment form, and comments |
1354 |
+ * to output valid HTML5. |
1355 |
+ */ |
1356 |
+ add_theme_support( 'html5', array( |
1357 |
+ 'search-form', |
1358 |
+ 'comment-form', |
1359 |
+ 'comment-list', |
1360 |
+ 'gallery', |
1361 |
+ 'caption', |
1362 |
+ ) ); |
1363 |
+ |
1364 |
+ /* |
1365 |
+ * Enable support for Post Formats. |
1366 |
* |
1367 |
- * @since Twenty Sixteen 1.0 |
1368 |
+ * See: https://codex.wordpress.org/Post_Formats |
1369 |
*/ |
1370 |
- function twentysixteen_setup() { |
1371 |
- /* |
1372 |
- * Make theme available for translation. |
1373 |
- * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentysixteen |
1374 |
- * If you're building a theme based on Twenty Sixteen, use a find and replace |
1375 |
- * to change 'twentysixteen' to the name of your theme in all the template files |
1376 |
- */ |
1377 |
- load_theme_textdomain( 'twentysixteen' ); |
1378 |
- |
1379 |
- // Add default posts and comments RSS feed links to head. |
1380 |
- add_theme_support( 'automatic-feed-links' ); |
1381 |
- |
1382 |
- /* |
1383 |
- * Let WordPress manage the document title. |
1384 |
- * By adding theme support, we declare that this theme does not use a |
1385 |
- * hard-coded <title> tag in the document head, and expect WordPress to |
1386 |
- * provide it for us. |
1387 |
- */ |
1388 |
- add_theme_support( 'title-tag' ); |
1389 |
- |
1390 |
- /* |
1391 |
- * Enable support for custom logo. |
1392 |
- * |
1393 |
- * @since Twenty Sixteen 1.2 |
1394 |
- */ |
1395 |
- add_theme_support( |
1396 |
- 'custom-logo', array( |
1397 |
- 'height' => 240, |
1398 |
- 'width' => 240, |
1399 |
- 'flex-height' => true, |
1400 |
- ) |
1401 |
- ); |
1402 |
- |
1403 |
- /* |
1404 |
- * Enable support for Post Thumbnails on posts and pages. |
1405 |
- * |
1406 |
- * @link https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails |
1407 |
- */ |
1408 |
- add_theme_support( 'post-thumbnails' ); |
1409 |
- set_post_thumbnail_size( 1200, 9999 ); |
1410 |
- |
1411 |
- // This theme uses wp_nav_menu() in two locations. |
1412 |
- register_nav_menus( |
1413 |
- array( |
1414 |
- 'primary' => __( 'Primary Menu', 'twentysixteen' ), |
1415 |
- 'social' => __( 'Social Links Menu', 'twentysixteen' ), |
1416 |
- ) |
1417 |
- ); |
1418 |
- |
1419 |
- /* |
1420 |
- * Switch default core markup for search form, comment form, and comments |
1421 |
- * to output valid HTML5. |
1422 |
- */ |
1423 |
- add_theme_support( |
1424 |
- 'html5', array( |
1425 |
- 'search-form', |
1426 |
- 'comment-form', |
1427 |
- 'comment-list', |
1428 |
- 'gallery', |
1429 |
- 'caption', |
1430 |
- ) |
1431 |
- ); |
1432 |
- |
1433 |
- /* |
1434 |
- * Enable support for Post Formats. |
1435 |
- * |
1436 |
- * See: https://codex.wordpress.org/Post_Formats |
1437 |
- */ |
1438 |
- add_theme_support( |
1439 |
- 'post-formats', array( |
1440 |
- 'aside', |
1441 |
- 'image', |
1442 |
- 'video', |
1443 |
- 'quote', |
1444 |
- 'link', |
1445 |
- 'gallery', |
1446 |
- 'status', |
1447 |
- 'audio', |
1448 |
- 'chat', |
1449 |
- ) |
1450 |
- ); |
1451 |
- |
1452 |
- /* |
1453 |
- * This theme styles the visual editor to resemble the theme style, |
1454 |
- * specifically font, colors, icons, and column width. |
1455 |
- */ |
1456 |
- add_editor_style( array( 'css/editor-style.css', twentysixteen_fonts_url() ) ); |
1457 |
- |
1458 |
- // Indicate widget sidebars can use selective refresh in the Customizer. |
1459 |
- add_theme_support( 'customize-selective-refresh-widgets' ); |
1460 |
- } |
1461 |
+ add_theme_support( 'post-formats', array( |
1462 |
+ 'aside', |
1463 |
+ 'image', |
1464 |
+ 'video', |
1465 |
+ 'quote', |
1466 |
+ 'link', |
1467 |
+ 'gallery', |
1468 |
+ 'status', |
1469 |
+ 'audio', |
1470 |
+ 'chat', |
1471 |
+ ) ); |
1472 |
+ |
1473 |
+ /* |
1474 |
+ * This theme styles the visual editor to resemble the theme style, |
1475 |
+ * specifically font, colors, icons, and column width. |
1476 |
+ */ |
1477 |
+ add_editor_style( array( 'css/editor-style.css', twentysixteen_fonts_url() ) ); |
1478 |
+ |
1479 |
+ // Load regular editor styles into the new block-based editor. |
1480 |
+ add_theme_support( 'editor-styles' ); |
1481 |
+ |
1482 |
+ // Load default block styles. |
1483 |
+ add_theme_support( 'wp-block-styles' ); |
1484 |
+ |
1485 |
+ // Add support for responsive embeds. |
1486 |
+ add_theme_support( 'responsive-embeds' ); |
1487 |
+ |
1488 |
+ // Add support for custom color scheme. |
1489 |
+ add_theme_support( 'editor-color-palette', array( |
1490 |
+ array( |
1491 |
+ 'name' => __( 'Dark Gray', 'twentysixteen' ), |
1492 |
+ 'slug' => 'dark-gray', |
1493 |
+ 'color' => '#1a1a1a', |
1494 |
+ ), |
1495 |
+ array( |
1496 |
+ 'name' => __( 'Medium Gray', 'twentysixteen' ), |
1497 |
+ 'slug' => 'medium-gray', |
1498 |
+ 'color' => '#686868', |
1499 |
+ ), |
1500 |
+ array( |
1501 |
+ 'name' => __( 'Light Gray', 'twentysixteen' ), |
1502 |
+ 'slug' => 'light-gray', |
1503 |
+ 'color' => '#e5e5e5', |
1504 |
+ ), |
1505 |
+ array( |
1506 |
+ 'name' => __( 'White', 'twentysixteen' ), |
1507 |
+ 'slug' => 'white', |
1508 |
+ 'color' => '#fff', |
1509 |
+ ), |
1510 |
+ array( |
1511 |
+ 'name' => __( 'Blue Gray', 'twentysixteen' ), |
1512 |
+ 'slug' => 'blue-gray', |
1513 |
+ 'color' => '#4d545c', |
1514 |
+ ), |
1515 |
+ array( |
1516 |
+ 'name' => __( 'Bright Blue', 'twentysixteen' ), |
1517 |
+ 'slug' => 'bright-blue', |
1518 |
+ 'color' => '#007acc', |
1519 |
+ ), |
1520 |
+ array( |
1521 |
+ 'name' => __( 'Light Blue', 'twentysixteen' ), |
1522 |
+ 'slug' => 'light-blue', |
1523 |
+ 'color' => '#9adffd', |
1524 |
+ ), |
1525 |
+ array( |
1526 |
+ 'name' => __( 'Dark Brown', 'twentysixteen' ), |
1527 |
+ 'slug' => 'dark-brown', |
1528 |
+ 'color' => '#402b30', |
1529 |
+ ), |
1530 |
+ array( |
1531 |
+ 'name' => __( 'Medium Brown', 'twentysixteen' ), |
1532 |
+ 'slug' => 'medium-brown', |
1533 |
+ 'color' => '#774e24', |
1534 |
+ ), |
1535 |
+ array( |
1536 |
+ 'name' => __( 'Dark Red', 'twentysixteen' ), |
1537 |
+ 'slug' => 'dark-red', |
1538 |
+ 'color' => '#640c1f', |
1539 |
+ ), |
1540 |
+ array( |
1541 |
+ 'name' => __( 'Bright Red', 'twentysixteen' ), |
1542 |
+ 'slug' => 'bright-red', |
1543 |
+ 'color' => '#ff675f', |
1544 |
+ ), |
1545 |
+ array( |
1546 |
+ 'name' => __( 'Yellow', 'twentysixteen' ), |
1547 |
+ 'slug' => 'yellow', |
1548 |
+ 'color' => '#ffef8e', |
1549 |
+ ), |
1550 |
+ ) ); |
1551 |
+ |
1552 |
+ // Indicate widget sidebars can use selective refresh in the Customizer. |
1553 |
+ add_theme_support( 'customize-selective-refresh-widgets' ); |
1554 |
+} |
1555 |
endif; // twentysixteen_setup |
1556 |
add_action( 'after_setup_theme', 'twentysixteen_setup' ); |
1557 |
|
1558 |
@@ -160,85 +225,77 @@ add_action( 'after_setup_theme', 'twentysixteen_content_width', 0 ); |
1559 |
* @since Twenty Sixteen 1.0 |
1560 |
*/ |
1561 |
function twentysixteen_widgets_init() { |
1562 |
- register_sidebar( |
1563 |
- array( |
1564 |
- 'name' => __( 'Sidebar', 'twentysixteen' ), |
1565 |
- 'id' => 'sidebar-1', |
1566 |
- 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentysixteen' ), |
1567 |
- 'before_widget' => '<section id="%1$s" class="widget %2$s">', |
1568 |
- 'after_widget' => '</section>', |
1569 |
- 'before_title' => '<h2 class="widget-title">', |
1570 |
- 'after_title' => '</h2>', |
1571 |
- ) |
1572 |
- ); |
1573 |
- |
1574 |
- register_sidebar( |
1575 |
- array( |
1576 |
- 'name' => __( 'Content Bottom 1', 'twentysixteen' ), |
1577 |
- 'id' => 'sidebar-2', |
1578 |
- 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ), |
1579 |
- 'before_widget' => '<section id="%1$s" class="widget %2$s">', |
1580 |
- 'after_widget' => '</section>', |
1581 |
- 'before_title' => '<h2 class="widget-title">', |
1582 |
- 'after_title' => '</h2>', |
1583 |
- ) |
1584 |
- ); |
1585 |
- |
1586 |
- register_sidebar( |
1587 |
- array( |
1588 |
- 'name' => __( 'Content Bottom 2', 'twentysixteen' ), |
1589 |
- 'id' => 'sidebar-3', |
1590 |
- 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ), |
1591 |
- 'before_widget' => '<section id="%1$s" class="widget %2$s">', |
1592 |
- 'after_widget' => '</section>', |
1593 |
- 'before_title' => '<h2 class="widget-title">', |
1594 |
- 'after_title' => '</h2>', |
1595 |
- ) |
1596 |
- ); |
1597 |
+ register_sidebar( array( |
1598 |
+ 'name' => __( 'Sidebar', 'twentysixteen' ), |
1599 |
+ 'id' => 'sidebar-1', |
1600 |
+ 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentysixteen' ), |
1601 |
+ 'before_widget' => '<section id="%1$s" class="widget %2$s">', |
1602 |
+ 'after_widget' => '</section>', |
1603 |
+ 'before_title' => '<h2 class="widget-title">', |
1604 |
+ 'after_title' => '</h2>', |
1605 |
+ ) ); |
1606 |
+ |
1607 |
+ register_sidebar( array( |
1608 |
+ 'name' => __( 'Content Bottom 1', 'twentysixteen' ), |
1609 |
+ 'id' => 'sidebar-2', |
1610 |
+ 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ), |
1611 |
+ 'before_widget' => '<section id="%1$s" class="widget %2$s">', |
1612 |
+ 'after_widget' => '</section>', |
1613 |
+ 'before_title' => '<h2 class="widget-title">', |
1614 |
+ 'after_title' => '</h2>', |
1615 |
+ ) ); |
1616 |
+ |
1617 |
+ register_sidebar( array( |
1618 |
+ 'name' => __( 'Content Bottom 2', 'twentysixteen' ), |
1619 |
+ 'id' => 'sidebar-3', |
1620 |
+ 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ), |
1621 |
+ 'before_widget' => '<section id="%1$s" class="widget %2$s">', |
1622 |
+ 'after_widget' => '</section>', |
1623 |
+ 'before_title' => '<h2 class="widget-title">', |
1624 |
+ 'after_title' => '</h2>', |
1625 |
+ ) ); |
1626 |
} |
1627 |
add_action( 'widgets_init', 'twentysixteen_widgets_init' ); |
1628 |
|
1629 |
if ( ! function_exists( 'twentysixteen_fonts_url' ) ) : |
1630 |
- /** |
1631 |
- * Register Google fonts for Twenty Sixteen. |
1632 |
- * |
1633 |
- * Create your own twentysixteen_fonts_url() function to override in a child theme. |
1634 |
- * |
1635 |
- * @since Twenty Sixteen 1.0 |
1636 |
- * |
1637 |
- * @return string Google fonts URL for the theme. |
1638 |
- */ |
1639 |
- function twentysixteen_fonts_url() { |
1640 |
- $fonts_url = ''; |
1641 |
- $fonts = array(); |
1642 |
- $subsets = 'latin,latin-ext'; |
1643 |
- |
1644 |
- /* 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. */ |
1645 |
- if ( 'off' !== _x( 'on', 'Merriweather font: on or off', 'twentysixteen' ) ) { |
1646 |
- $fonts[] = 'Merriweather:400,700,900,400italic,700italic,900italic'; |
1647 |
- } |
1648 |
- |
1649 |
- /* 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. */ |
1650 |
- if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'twentysixteen' ) ) { |
1651 |
- $fonts[] = 'Montserrat:400,700'; |
1652 |
- } |
1653 |
+/** |
1654 |
+ * Register Google fonts for Twenty Sixteen. |
1655 |
+ * |
1656 |
+ * Create your own twentysixteen_fonts_url() function to override in a child theme. |
1657 |
+ * |
1658 |
+ * @since Twenty Sixteen 1.0 |
1659 |
+ * |
1660 |
+ * @return string Google fonts URL for the theme. |
1661 |
+ */ |
1662 |
+function twentysixteen_fonts_url() { |
1663 |
+ $fonts_url = ''; |
1664 |
+ $fonts = array(); |
1665 |
+ $subsets = 'latin,latin-ext'; |
1666 |
+ |
1667 |
+ /* 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. */ |
1668 |
+ if ( 'off' !== _x( 'on', 'Merriweather font: on or off', 'twentysixteen' ) ) { |
1669 |
+ $fonts[] = 'Merriweather:400,700,900,400italic,700italic,900italic'; |
1670 |
+ } |
1671 |
|
1672 |
- /* 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. */ |
1673 |
- if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentysixteen' ) ) { |
1674 |
- $fonts[] = 'Inconsolata:400'; |
1675 |
- } |
1676 |
+ /* 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. */ |
1677 |
+ if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'twentysixteen' ) ) { |
1678 |
+ $fonts[] = 'Montserrat:400,700'; |
1679 |
+ } |
1680 |
|
1681 |
- if ( $fonts ) { |
1682 |
- $fonts_url = add_query_arg( |
1683 |
- array( |
1684 |
- 'family' => urlencode( implode( '|', $fonts ) ), |
1685 |
- 'subset' => urlencode( $subsets ), |
1686 |
- ), 'https://fonts.googleapis.com/css' |
1687 |
- ); |
1688 |
- } |
1689 |
+ /* 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. */ |
1690 |
+ if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentysixteen' ) ) { |
1691 |
+ $fonts[] = 'Inconsolata:400'; |
1692 |
+ } |
1693 |
|
1694 |
- return $fonts_url; |
1695 |
+ if ( $fonts ) { |
1696 |
+ $fonts_url = add_query_arg( array( |
1697 |
+ 'family' => urlencode( implode( '|', $fonts ) ), |
1698 |
+ 'subset' => urlencode( $subsets ), |
1699 |
+ ), 'https://fonts.googleapis.com/css' ); |
1700 |
} |
1701 |
+ |
1702 |
+ return $fonts_url; |
1703 |
+} |
1704 |
endif; |
1705 |
|
1706 |
/** |
1707 |
@@ -268,6 +325,9 @@ function twentysixteen_scripts() { |
1708 |
// Theme stylesheet. |
1709 |
wp_enqueue_style( 'twentysixteen-style', get_stylesheet_uri() ); |
1710 |
|
1711 |
+ // Theme block stylesheet. |
1712 |
+ wp_enqueue_style( 'twentysixteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentysixteen-style' ), '20181018' ); |
1713 |
+ |
1714 |
// Load the Internet Explorer specific stylesheet. |
1715 |
wp_enqueue_style( 'twentysixteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentysixteen-style' ), '20160816' ); |
1716 |
wp_style_add_data( 'twentysixteen-ie', 'conditional', 'lt IE 10' ); |
1717 |
@@ -296,15 +356,26 @@ function twentysixteen_scripts() { |
1718 |
|
1719 |
wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160816', true ); |
1720 |
|
1721 |
- wp_localize_script( |
1722 |
- 'twentysixteen-script', 'screenReaderText', array( |
1723 |
- 'expand' => __( 'expand child menu', 'twentysixteen' ), |
1724 |
- 'collapse' => __( 'collapse child menu', 'twentysixteen' ), |
1725 |
- ) |
1726 |
- ); |
1727 |
+ wp_localize_script( 'twentysixteen-script', 'screenReaderText', array( |
1728 |
+ 'expand' => __( 'expand child menu', 'twentysixteen' ), |
1729 |
+ 'collapse' => __( 'collapse child menu', 'twentysixteen' ), |
1730 |
+ ) ); |
1731 |
} |
1732 |
add_action( 'wp_enqueue_scripts', 'twentysixteen_scripts' ); |
1733 |
|
1734 |
+/** |
1735 |
+ * Enqueue styles for the block-based editor. |
1736 |
+ * |
1737 |
+ * @since Twenty Sixteen 1.6 |
1738 |
+ */ |
1739 |
+function twentysixteen_block_editor_styles() { |
1740 |
+ // Block styles. |
1741 |
+ wp_enqueue_style( 'twentysixteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' ); |
1742 |
+ // Add custom fonts. |
1743 |
+ wp_enqueue_style( 'twentysixteen-fonts', twentysixteen_fonts_url(), array(), null ); |
1744 |
+} |
1745 |
+add_action( 'enqueue_block_editor_assets', 'twentysixteen_block_editor_styles' ); |
1746 |
+ |
1747 |
/** |
1748 |
* Adds custom classes to the array of body classes. |
1749 |
* |
1750 |
@@ -351,10 +422,10 @@ function twentysixteen_hex2rgb( $color ) { |
1751 |
$color = trim( $color, '#' ); |
1752 |
|
1753 |
if ( strlen( $color ) === 3 ) { |
1754 |
- $r = hexdec( substr( $color, 0, 1 ) . substr( $color, 0, 1 ) ); |
1755 |
- $g = hexdec( substr( $color, 1, 1 ) . substr( $color, 1, 1 ) ); |
1756 |
- $b = hexdec( substr( $color, 2, 1 ) . substr( $color, 2, 1 ) ); |
1757 |
- } elseif ( strlen( $color ) === 6 ) { |
1758 |
+ $r = hexdec( substr( $color, 0, 1 ).substr( $color, 0, 1 ) ); |
1759 |
+ $g = hexdec( substr( $color, 1, 1 ).substr( $color, 1, 1 ) ); |
1760 |
+ $b = hexdec( substr( $color, 2, 1 ).substr( $color, 2, 1 ) ); |
1761 |
+ } else if ( strlen( $color ) === 6 ) { |
1762 |
$r = hexdec( substr( $color, 0, 2 ) ); |
1763 |
$g = hexdec( substr( $color, 2, 2 ) ); |
1764 |
$b = hexdec( substr( $color, 4, 2 ) ); |
1765 |
@@ -362,11 +433,7 @@ function twentysixteen_hex2rgb( $color ) { |
1766 |
return array(); |
1767 |
} |
1768 |
|
1769 |
- return array( |
1770 |
- 'red' => $r, |
1771 |
- 'green' => $g, |
1772 |
- 'blue' => $b, |
1773 |
- ); |
1774 |
+ return array( 'red' => $r, 'green' => $g, 'blue' => $b ); |
1775 |
} |
1776 |
|
1777 |
/** |
1778 |
@@ -411,7 +478,7 @@ function twentysixteen_content_image_sizes_attr( $sizes, $size ) { |
1779 |
|
1780 |
return $sizes; |
1781 |
} |
1782 |
-add_filter( 'wp_calculate_image_sizes', 'twentysixteen_content_image_sizes_attr', 10, 2 ); |
1783 |
+add_filter( 'wp_calculate_image_sizes', 'twentysixteen_content_image_sizes_attr', 10 , 2 ); |
1784 |
|
1785 |
/** |
1786 |
* Add custom image sizes attribute to enhance responsive image functionality |
1787 |
@@ -434,7 +501,7 @@ function twentysixteen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) { |
1788 |
} |
1789 |
return $attr; |
1790 |
} |
1791 |
-add_filter( 'wp_get_attachment_image_attributes', 'twentysixteen_post_thumbnail_sizes_attr', 10, 3 ); |
1792 |
+add_filter( 'wp_get_attachment_image_attributes', 'twentysixteen_post_thumbnail_sizes_attr', 10 , 3 ); |
1793 |
|
1794 |
/** |
1795 |
* Modifies tag cloud widget arguments to display all tags in the same font size |
1796 |
|
1797 |
diff --git a/themes/twentysixteen/header.php b/themes/twentysixteen/header.php |
1798 |
index 9bc0d3e..d230c4f 100644 |
1799 |
--- a/themes/twentysixteen/header.php |
1800 |
+++ b/themes/twentysixteen/header.php |
1801 |
@@ -35,12 +35,10 @@ |
1802 |
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> |
1803 |
<?php else : ?> |
1804 |
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> |
1805 |
- <?php |
1806 |
- endif; |
1807 |
+ <?php endif; |
1808 |
|
1809 |
$description = get_bloginfo( 'description', 'display' ); |
1810 |
-if ( $description || is_customize_preview() ) : |
1811 |
- ?> |
1812 |
+ if ( $description || is_customize_preview() ) : ?> |
1813 |
<p class="site-description"><?php echo $description; ?></p> |
1814 |
<?php endif; ?> |
1815 |
</div><!-- .site-branding --> |
1816 |
@@ -52,12 +50,10 @@ if ( $description || is_customize_preview() ) : |
1817 |
<?php if ( has_nav_menu( 'primary' ) ) : ?> |
1818 |
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'twentysixteen' ); ?>"> |
1819 |
<?php |
1820 |
- wp_nav_menu( |
1821 |
- array( |
1822 |
- 'theme_location' => 'primary', |
1823 |
- 'menu_class' => 'primary-menu', |
1824 |
- ) |
1825 |
- ); |
1826 |
+ wp_nav_menu( array( |
1827 |
+ 'theme_location' => 'primary', |
1828 |
+ 'menu_class' => 'primary-menu', |
1829 |
+ ) ); |
1830 |
?> |
1831 |
</nav><!-- .main-navigation --> |
1832 |
<?php endif; ?> |
1833 |
@@ -65,15 +61,13 @@ if ( $description || is_customize_preview() ) : |
1834 |
<?php if ( has_nav_menu( 'social' ) ) : ?> |
1835 |
<nav id="social-navigation" class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'twentysixteen' ); ?>"> |
1836 |
<?php |
1837 |
- wp_nav_menu( |
1838 |
- array( |
1839 |
- 'theme_location' => 'social', |
1840 |
- 'menu_class' => 'social-links-menu', |
1841 |
- 'depth' => 1, |
1842 |
- 'link_before' => '<span class="screen-reader-text">', |
1843 |
- 'link_after' => '</span>', |
1844 |
- ) |
1845 |
- ); |
1846 |
+ wp_nav_menu( array( |
1847 |
+ 'theme_location' => 'social', |
1848 |
+ 'menu_class' => 'social-links-menu', |
1849 |
+ 'depth' => 1, |
1850 |
+ 'link_before' => '<span class="screen-reader-text">', |
1851 |
+ 'link_after' => '</span>', |
1852 |
+ ) ); |
1853 |
?> |
1854 |
</nav><!-- .social-navigation --> |
1855 |
<?php endif; ?> |
1856 |
|
1857 |
diff --git a/themes/twentysixteen/image.php b/themes/twentysixteen/image.php |
1858 |
index f67048b..434b0b0 100644 |
1859 |
--- a/themes/twentysixteen/image.php |
1860 |
+++ b/themes/twentysixteen/image.php |
1861 |
@@ -14,99 +14,93 @@ get_header(); ?> |
1862 |
|
1863 |
<?php |
1864 |
// Start the loop. |
1865 |
- while ( have_posts() ) : |
1866 |
- the_post(); |
1867 |
+ while ( have_posts() ) : the_post(); |
1868 |
?> |
1869 |
|
1870 |
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
1871 |
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
1872 |
|
1873 |
- <nav id="image-navigation" class="navigation image-navigation"> |
1874 |
- <div class="nav-links"> |
1875 |
- <div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentysixteen' ) ); ?></div> |
1876 |
- <div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentysixteen' ) ); ?></div> |
1877 |
- </div><!-- .nav-links --> |
1878 |
- </nav><!-- .image-navigation --> |
1879 |
+ <nav id="image-navigation" class="navigation image-navigation"> |
1880 |
+ <div class="nav-links"> |
1881 |
+ <div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentysixteen' ) ); ?></div> |
1882 |
+ <div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentysixteen' ) ); ?></div> |
1883 |
+ </div><!-- .nav-links --> |
1884 |
+ </nav><!-- .image-navigation --> |
1885 |
|
1886 |
- <header class="entry-header"> |
1887 |
- <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> |
1888 |
- </header><!-- .entry-header --> |
1889 |
+ <header class="entry-header"> |
1890 |
+ <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> |
1891 |
+ </header><!-- .entry-header --> |
1892 |
|
1893 |
- <div class="entry-content"> |
1894 |
+ <div class="entry-content"> |
1895 |
|
1896 |
- <div class="entry-attachment"> |
1897 |
- <?php |
1898 |
- /** |
1899 |
- * Filter the default twentysixteen image attachment size. |
1900 |
- * |
1901 |
- * @since Twenty Sixteen 1.0 |
1902 |
- * |
1903 |
- * @param string $image_size Image size. Default 'large'. |
1904 |
- */ |
1905 |
- $image_size = apply_filters( 'twentysixteen_attachment_size', 'large' ); |
1906 |
- |
1907 |
- echo wp_get_attachment_image( get_the_ID(), $image_size ); |
1908 |
- ?> |
1909 |
+ <div class="entry-attachment"> |
1910 |
+ <?php |
1911 |
+ /** |
1912 |
+ * Filter the default twentysixteen image attachment size. |
1913 |
+ * |
1914 |
+ * @since Twenty Sixteen 1.0 |
1915 |
+ * |
1916 |
+ * @param string $image_size Image size. Default 'large'. |
1917 |
+ */ |
1918 |
+ $image_size = apply_filters( 'twentysixteen_attachment_size', 'large' ); |
1919 |
|
1920 |
- <?php twentysixteen_excerpt( 'entry-caption' ); ?> |
1921 |
+ echo wp_get_attachment_image( get_the_ID(), $image_size ); |
1922 |
+ ?> |
1923 |
+ |
1924 |
+ <?php twentysixteen_excerpt( 'entry-caption' ); ?> |
1925 |
|
1926 |
</div><!-- .entry-attachment --> |
1927 |
|
1928 |
<?php |
1929 |
- the_content(); |
1930 |
- wp_link_pages( |
1931 |
- array( |
1932 |
+ the_content(); |
1933 |
+ wp_link_pages( array( |
1934 |
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>', |
1935 |
'after' => '</div>', |
1936 |
'link_before' => '<span>', |
1937 |
'link_after' => '</span>', |
1938 |
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%', |
1939 |
'separator' => '<span class="screen-reader-text">, </span>', |
1940 |
- ) |
1941 |
- ); |
1942 |
- ?> |
1943 |
+ ) ); |
1944 |
+ ?> |
1945 |
</div><!-- .entry-content --> |
1946 |
|
1947 |
<footer class="entry-footer"> |
1948 |
- <?php twentysixteen_entry_meta(); ?> |
1949 |
+ <?php twentysixteen_entry_meta(); ?> |
1950 |
<?php |
1951 |
- // Retrieve attachment metadata. |
1952 |
- $metadata = wp_get_attachment_metadata(); |
1953 |
- if ( $metadata ) { |
1954 |
- printf( |
1955 |
- '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', |
1956 |
- esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentysixteen' ), |
1957 |
- esc_url( wp_get_attachment_url() ), |
1958 |
- absint( $metadata['width'] ), |
1959 |
- absint( $metadata['height'] ) |
1960 |
- ); |
1961 |
- } |
1962 |
+ // Retrieve attachment metadata. |
1963 |
+ $metadata = wp_get_attachment_metadata(); |
1964 |
+ if ( $metadata ) { |
1965 |
+ printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', |
1966 |
+ esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentysixteen' ), |
1967 |
+ esc_url( wp_get_attachment_url() ), |
1968 |
+ absint( $metadata['width'] ), |
1969 |
+ absint( $metadata['height'] ) |
1970 |
+ ); |
1971 |
+ } |
1972 |
?> |
1973 |
<?php |
1974 |
- edit_post_link( |
1975 |
- sprintf( |
1976 |
- /* translators: %s: Name of current post */ |
1977 |
- __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), |
1978 |
- get_the_title() |
1979 |
- ), |
1980 |
- '<span class="edit-link">', |
1981 |
- '</span>' |
1982 |
- ); |
1983 |
- ?> |
1984 |
+ edit_post_link( |
1985 |
+ sprintf( |
1986 |
+ /* translators: %s: Name of current post */ |
1987 |
+ __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), |
1988 |
+ get_the_title() |
1989 |
+ ), |
1990 |
+ '<span class="edit-link">', |
1991 |
+ '</span>' |
1992 |
+ ); |
1993 |
+ ?> |
1994 |
</footer><!-- .entry-footer --> |
1995 |
</article><!-- #post-## --> |
1996 |
|
1997 |
<?php |
1998 |
- // If comments are open or we have at least one comment, load up the comment template. |
1999 |
- if ( comments_open() || get_comments_number() ) { |
2000 |
- comments_template(); |
2001 |
- } |
2002 |
- |
2003 |
- // Parent post navigation. |
2004 |
- the_post_navigation( |
2005 |
- array( |
2006 |
+ // If comments are open or we have at least one comment, load up the comment template. |
2007 |
+ if ( comments_open() || get_comments_number() ) { |
2008 |
+ comments_template(); |
2009 |
+ } |
2010 |
+ |
2011 |
+ // Parent post navigation. |
2012 |
+ the_post_navigation( array( |
2013 |
'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ), |
2014 |
- ) |
2015 |
- ); |
2016 |
+ ) ); |
2017 |
// End the loop. |
2018 |
endwhile; |
2019 |
?> |
2020 |
|
2021 |
diff --git a/themes/twentysixteen/inc/back-compat.php b/themes/twentysixteen/inc/back-compat.php |
2022 |
index ed0f86d..7ed4240 100644 |
2023 |
--- a/themes/twentysixteen/inc/back-compat.php |
2024 |
+++ b/themes/twentysixteen/inc/back-compat.php |
2025 |
@@ -50,11 +50,9 @@ function twentysixteen_upgrade_notice() { |
2026 |
* @global string $wp_version WordPress version. |
2027 |
*/ |
2028 |
function twentysixteen_customize() { |
2029 |
- wp_die( |
2030 |
- 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( |
2031 |
- 'back_link' => true, |
2032 |
- ) |
2033 |
- ); |
2034 |
+ 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( |
2035 |
+ 'back_link' => true, |
2036 |
+ ) ); |
2037 |
} |
2038 |
add_action( 'load-customize.php', 'twentysixteen_customize' ); |
2039 |
|
2040 |
|
2041 |
diff --git a/themes/twentysixteen/inc/customizer.php b/themes/twentysixteen/inc/customizer.php |
2042 |
index 0cc2fb5..62eb1b0 100644 |
2043 |
--- a/themes/twentysixteen/inc/customizer.php |
2044 |
+++ b/themes/twentysixteen/inc/customizer.php |
2045 |
@@ -30,13 +30,9 @@ function twentysixteen_custom_header_and_background() { |
2046 |
* @type string $default-color Default color of the background. |
2047 |
* } |
2048 |
*/ |
2049 |
- add_theme_support( |
2050 |
- 'custom-background', apply_filters( |
2051 |
- 'twentysixteen_custom_background_args', array( |
2052 |
- 'default-color' => $default_background_color, |
2053 |
- ) |
2054 |
- ) |
2055 |
- ); |
2056 |
+ add_theme_support( 'custom-background', apply_filters( 'twentysixteen_custom_background_args', array( |
2057 |
+ 'default-color' => $default_background_color, |
2058 |
+ ) ) ); |
2059 |
|
2060 |
/** |
2061 |
* Filter the arguments used when adding 'custom-header' support in Twenty Sixteen. |
2062 |
@@ -54,39 +50,35 @@ function twentysixteen_custom_header_and_background() { |
2063 |
* displayed on the blog. |
2064 |
* } |
2065 |
*/ |
2066 |
- add_theme_support( |
2067 |
- 'custom-header', apply_filters( |
2068 |
- 'twentysixteen_custom_header_args', array( |
2069 |
- 'default-text-color' => $default_text_color, |
2070 |
- 'width' => 1200, |
2071 |
- 'height' => 280, |
2072 |
- 'flex-height' => true, |
2073 |
- 'wp-head-callback' => 'twentysixteen_header_style', |
2074 |
- ) |
2075 |
- ) |
2076 |
- ); |
2077 |
+ add_theme_support( 'custom-header', apply_filters( 'twentysixteen_custom_header_args', array( |
2078 |
+ 'default-text-color' => $default_text_color, |
2079 |
+ 'width' => 1200, |
2080 |
+ 'height' => 280, |
2081 |
+ 'flex-height' => true, |
2082 |
+ 'wp-head-callback' => 'twentysixteen_header_style', |
2083 |
+ ) ) ); |
2084 |
} |
2085 |
add_action( 'after_setup_theme', 'twentysixteen_custom_header_and_background' ); |
2086 |
|
2087 |
if ( ! function_exists( 'twentysixteen_header_style' ) ) : |
2088 |
- /** |
2089 |
- * Styles the header text displayed on the site. |
2090 |
- * |
2091 |
- * Create your own twentysixteen_header_style() function to override in a child theme. |
2092 |
- * |
2093 |
- * @since Twenty Sixteen 1.0 |
2094 |
- * |
2095 |
- * @see twentysixteen_custom_header_and_background(). |
2096 |
- */ |
2097 |
- function twentysixteen_header_style() { |
2098 |
- // If the header text option is untouched, let's bail. |
2099 |
- if ( display_header_text() ) { |
2100 |
- return; |
2101 |
- } |
2102 |
+/** |
2103 |
+ * Styles the header text displayed on the site. |
2104 |
+ * |
2105 |
+ * Create your own twentysixteen_header_style() function to override in a child theme. |
2106 |
+ * |
2107 |
+ * @since Twenty Sixteen 1.0 |
2108 |
+ * |
2109 |
+ * @see twentysixteen_custom_header_and_background(). |
2110 |
+ */ |
2111 |
+function twentysixteen_header_style() { |
2112 |
+ // If the header text option is untouched, let's bail. |
2113 |
+ if ( display_header_text() ) { |
2114 |
+ return; |
2115 |
+ } |
2116 |
|
2117 |
- // If the header text has been hidden. |
2118 |
- ?> |
2119 |
- <style type="text/css" id="twentysixteen-header-css"> |
2120 |
+ // If the header text has been hidden. |
2121 |
+ ?> |
2122 |
+ <style type="text/css" id="twentysixteen-header-css"> |
2123 |
.site-branding { |
2124 |
margin: 0 auto 0 0; |
2125 |
} |
2126 |
@@ -96,9 +88,9 @@ if ( ! function_exists( 'twentysixteen_header_style' ) ) : |
2127 |
clip: rect(1px, 1px, 1px, 1px); |
2128 |
position: absolute; |
2129 |
} |
2130 |
- </style> |
2131 |
- <?php |
2132 |
- } |
2133 |
+ </style> |
2134 |
+ <?php |
2135 |
+} |
2136 |
endif; // twentysixteen_header_style |
2137 |
|
2138 |
/** |
2139 |
@@ -111,119 +103,87 @@ endif; // twentysixteen_header_style |
2140 |
function twentysixteen_customize_register( $wp_customize ) { |
2141 |
$color_scheme = twentysixteen_get_color_scheme(); |
2142 |
|
2143 |
- $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; |
2144 |
- $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; |
2145 |
+ $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; |
2146 |
+ $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; |
2147 |
|
2148 |
if ( isset( $wp_customize->selective_refresh ) ) { |
2149 |
- $wp_customize->selective_refresh->add_partial( |
2150 |
- 'blogname', array( |
2151 |
- 'selector' => '.site-title a', |
2152 |
- 'container_inclusive' => false, |
2153 |
- 'render_callback' => 'twentysixteen_customize_partial_blogname', |
2154 |
- ) |
2155 |
- ); |
2156 |
- $wp_customize->selective_refresh->add_partial( |
2157 |
- 'blogdescription', array( |
2158 |
- 'selector' => '.site-description', |
2159 |
- 'container_inclusive' => false, |
2160 |
- 'render_callback' => 'twentysixteen_customize_partial_blogdescription', |
2161 |
- ) |
2162 |
- ); |
2163 |
+ $wp_customize->selective_refresh->add_partial( 'blogname', array( |
2164 |
+ 'selector' => '.site-title a', |
2165 |
+ 'container_inclusive' => false, |
2166 |
+ 'render_callback' => 'twentysixteen_customize_partial_blogname', |
2167 |
+ ) ); |
2168 |
+ $wp_customize->selective_refresh->add_partial( 'blogdescription', array( |
2169 |
+ 'selector' => '.site-description', |
2170 |
+ 'container_inclusive' => false, |
2171 |
+ 'render_callback' => 'twentysixteen_customize_partial_blogdescription', |
2172 |
+ ) ); |
2173 |
} |
2174 |
|
2175 |
// Add color scheme setting and control. |
2176 |
- $wp_customize->add_setting( |
2177 |
- 'color_scheme', array( |
2178 |
- 'default' => 'default', |
2179 |
- 'sanitize_callback' => 'twentysixteen_sanitize_color_scheme', |
2180 |
- 'transport' => 'postMessage', |
2181 |
- ) |
2182 |
- ); |
2183 |
- |
2184 |
- $wp_customize->add_control( |
2185 |
- 'color_scheme', array( |
2186 |
- 'label' => __( 'Base Color Scheme', 'twentysixteen' ), |
2187 |
- 'section' => 'colors', |
2188 |
- 'type' => 'select', |
2189 |
- 'choices' => twentysixteen_get_color_scheme_choices(), |
2190 |
- 'priority' => 1, |
2191 |
- ) |
2192 |
- ); |
2193 |
+ $wp_customize->add_setting( 'color_scheme', array( |
2194 |
+ 'default' => 'default', |
2195 |
+ 'sanitize_callback' => 'twentysixteen_sanitize_color_scheme', |
2196 |
+ 'transport' => 'postMessage', |
2197 |
+ ) ); |
2198 |
+ |
2199 |
+ $wp_customize->add_control( 'color_scheme', array( |
2200 |
+ 'label' => __( 'Base Color Scheme', 'twentysixteen' ), |
2201 |
+ 'section' => 'colors', |
2202 |
+ 'type' => 'select', |
2203 |
+ 'choices' => twentysixteen_get_color_scheme_choices(), |
2204 |
+ 'priority' => 1, |
2205 |
+ ) ); |
2206 |
|
2207 |
// Add page background color setting and control. |
2208 |
- $wp_customize->add_setting( |
2209 |
- 'page_background_color', array( |
2210 |
- 'default' => $color_scheme[1], |
2211 |
- 'sanitize_callback' => 'sanitize_hex_color', |
2212 |
- 'transport' => 'postMessage', |
2213 |
- ) |
2214 |
- ); |
2215 |
+ $wp_customize->add_setting( 'page_background_color', array( |
2216 |
+ 'default' => $color_scheme[1], |
2217 |
+ 'sanitize_callback' => 'sanitize_hex_color', |
2218 |
+ 'transport' => 'postMessage', |
2219 |
+ ) ); |
2220 |
|
2221 |
- $wp_customize->add_control( |
2222 |
- new WP_Customize_Color_Control( |
2223 |
- $wp_customize, 'page_background_color', array( |
2224 |
- 'label' => __( 'Page Background Color', 'twentysixteen' ), |
2225 |
- 'section' => 'colors', |
2226 |
- ) |
2227 |
- ) |
2228 |
- ); |
2229 |
+ $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'page_background_color', array( |
2230 |
+ 'label' => __( 'Page Background Color', 'twentysixteen' ), |
2231 |
+ 'section' => 'colors', |
2232 |
+ ) ) ); |
2233 |
|
2234 |
// Remove the core header textcolor control, as it shares the main text color. |
2235 |
$wp_customize->remove_control( 'header_textcolor' ); |
2236 |
|
2237 |
// Add link color setting and control. |
2238 |
- $wp_customize->add_setting( |
2239 |
- 'link_color', array( |
2240 |
- 'default' => $color_scheme[2], |
2241 |
- 'sanitize_callback' => 'sanitize_hex_color', |
2242 |
- 'transport' => 'postMessage', |
2243 |
- ) |
2244 |
- ); |
2245 |
+ $wp_customize->add_setting( 'link_color', array( |
2246 |
+ 'default' => $color_scheme[2], |
2247 |
+ 'sanitize_callback' => 'sanitize_hex_color', |
2248 |
+ 'transport' => 'postMessage', |
2249 |
+ ) ); |
2250 |
|
2251 |
- $wp_customize->add_control( |
2252 |
- new WP_Customize_Color_Control( |
2253 |
- $wp_customize, 'link_color', array( |
2254 |
- 'label' => __( 'Link Color', 'twentysixteen' ), |
2255 |
- 'section' => 'colors', |
2256 |
- ) |
2257 |
- ) |
2258 |
- ); |
2259 |
+ $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array( |
2260 |
+ 'label' => __( 'Link Color', 'twentysixteen' ), |
2261 |
+ 'section' => 'colors', |
2262 |
+ ) ) ); |
2263 |
|
2264 |
// Add main text color setting and control. |
2265 |
- $wp_customize->add_setting( |
2266 |
- 'main_text_color', array( |
2267 |
- 'default' => $color_scheme[3], |
2268 |
- 'sanitize_callback' => 'sanitize_hex_color', |
2269 |
- 'transport' => 'postMessage', |
2270 |
- ) |
2271 |
- ); |
2272 |
+ $wp_customize->add_setting( 'main_text_color', array( |
2273 |
+ 'default' => $color_scheme[3], |
2274 |
+ 'sanitize_callback' => 'sanitize_hex_color', |
2275 |
+ 'transport' => 'postMessage', |
2276 |
+ ) ); |
2277 |
|
2278 |
- $wp_customize->add_control( |
2279 |
- new WP_Customize_Color_Control( |
2280 |
- $wp_customize, 'main_text_color', array( |
2281 |
- 'label' => __( 'Main Text Color', 'twentysixteen' ), |
2282 |
- 'section' => 'colors', |
2283 |
- ) |
2284 |
- ) |
2285 |
- ); |
2286 |
+ $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'main_text_color', array( |
2287 |
+ 'label' => __( 'Main Text Color', 'twentysixteen' ), |
2288 |
+ 'section' => 'colors', |
2289 |
+ ) ) ); |
2290 |
|
2291 |
// Add secondary text color setting and control. |
2292 |
- $wp_customize->add_setting( |
2293 |
- 'secondary_text_color', array( |
2294 |
- 'default' => $color_scheme[4], |
2295 |
- 'sanitize_callback' => 'sanitize_hex_color', |
2296 |
- 'transport' => 'postMessage', |
2297 |
- ) |
2298 |
- ); |
2299 |
- |
2300 |
- $wp_customize->add_control( |
2301 |
- new WP_Customize_Color_Control( |
2302 |
- $wp_customize, 'secondary_text_color', array( |
2303 |
- 'label' => __( 'Secondary Text Color', 'twentysixteen' ), |
2304 |
- 'section' => 'colors', |
2305 |
- ) |
2306 |
- ) |
2307 |
- ); |
2308 |
+ $wp_customize->add_setting( 'secondary_text_color', array( |
2309 |
+ 'default' => $color_scheme[4], |
2310 |
+ 'sanitize_callback' => 'sanitize_hex_color', |
2311 |
+ 'transport' => 'postMessage', |
2312 |
+ ) ); |
2313 |
+ |
2314 |
+ $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary_text_color', array( |
2315 |
+ 'label' => __( 'Secondary Text Color', 'twentysixteen' ), |
2316 |
+ 'section' => 'colors', |
2317 |
+ ) ) ); |
2318 |
} |
2319 |
add_action( 'customize_register', 'twentysixteen_customize_register', 11 ); |
2320 |
|
2321 |
@@ -288,129 +248,127 @@ function twentysixteen_get_color_schemes() { |
2322 |
* } |
2323 |
* } |
2324 |
*/ |
2325 |
- return apply_filters( |
2326 |
- 'twentysixteen_color_schemes', array( |
2327 |
- 'default' => array( |
2328 |
- 'label' => __( 'Default', 'twentysixteen' ), |
2329 |
- 'colors' => array( |
2330 |
- '#1a1a1a', |
2331 |
- '#ffffff', |
2332 |
- '#007acc', |
2333 |
- '#1a1a1a', |
2334 |
- '#686868', |
2335 |
- ), |
2336 |
+ return apply_filters( 'twentysixteen_color_schemes', array( |
2337 |
+ 'default' => array( |
2338 |
+ 'label' => __( 'Default', 'twentysixteen' ), |
2339 |
+ 'colors' => array( |
2340 |
+ '#1a1a1a', |
2341 |
+ '#ffffff', |
2342 |
+ '#007acc', |
2343 |
+ '#1a1a1a', |
2344 |
+ '#686868', |
2345 |
), |
2346 |
- 'dark' => array( |
2347 |
- 'label' => __( 'Dark', 'twentysixteen' ), |
2348 |
- 'colors' => array( |
2349 |
- '#262626', |
2350 |
- '#1a1a1a', |
2351 |
- '#9adffd', |
2352 |
- '#e5e5e5', |
2353 |
- '#c1c1c1', |
2354 |
- ), |
2355 |
+ ), |
2356 |
+ 'dark' => array( |
2357 |
+ 'label' => __( 'Dark', 'twentysixteen' ), |
2358 |
+ 'colors' => array( |
2359 |
+ '#262626', |
2360 |
+ '#1a1a1a', |
2361 |
+ '#9adffd', |
2362 |
+ '#e5e5e5', |
2363 |
+ '#c1c1c1', |
2364 |
), |
2365 |
- 'gray' => array( |
2366 |
- 'label' => __( 'Gray', 'twentysixteen' ), |
2367 |
- 'colors' => array( |
2368 |
- '#616a73', |
2369 |
- '#4d545c', |
2370 |
- '#c7c7c7', |
2371 |
- '#f2f2f2', |
2372 |
- '#f2f2f2', |
2373 |
- ), |
2374 |
+ ), |
2375 |
+ 'gray' => array( |
2376 |
+ 'label' => __( 'Gray', 'twentysixteen' ), |
2377 |
+ 'colors' => array( |
2378 |
+ '#616a73', |
2379 |
+ '#4d545c', |
2380 |
+ '#c7c7c7', |
2381 |
+ '#f2f2f2', |
2382 |
+ '#f2f2f2', |
2383 |
), |
2384 |
- 'red' => array( |
2385 |
- 'label' => __( 'Red', 'twentysixteen' ), |
2386 |
- 'colors' => array( |
2387 |
- '#ffffff', |
2388 |
- '#ff675f', |
2389 |
- '#640c1f', |
2390 |
- '#402b30', |
2391 |
- '#402b30', |
2392 |
- ), |
2393 |
+ ), |
2394 |
+ 'red' => array( |
2395 |
+ 'label' => __( 'Red', 'twentysixteen' ), |
2396 |
+ 'colors' => array( |
2397 |
+ '#ffffff', |
2398 |
+ '#ff675f', |
2399 |
+ '#640c1f', |
2400 |
+ '#402b30', |
2401 |
+ '#402b30', |
2402 |
), |
2403 |
- 'yellow' => array( |
2404 |
- 'label' => __( 'Yellow', 'twentysixteen' ), |
2405 |
- 'colors' => array( |
2406 |
- '#3b3721', |
2407 |
- '#ffef8e', |
2408 |
- '#774e24', |
2409 |
- '#3b3721', |
2410 |
- '#5b4d3e', |
2411 |
- ), |
2412 |
+ ), |
2413 |
+ 'yellow' => array( |
2414 |
+ 'label' => __( 'Yellow', 'twentysixteen' ), |
2415 |
+ 'colors' => array( |
2416 |
+ '#3b3721', |
2417 |
+ '#ffef8e', |
2418 |
+ '#774e24', |
2419 |
+ '#3b3721', |
2420 |
+ '#5b4d3e', |
2421 |
), |
2422 |
- ) |
2423 |
- ); |
2424 |
+ ), |
2425 |
+ ) ); |
2426 |
} |
2427 |
|
2428 |
if ( ! function_exists( 'twentysixteen_get_color_scheme' ) ) : |
2429 |
- /** |
2430 |
- * Retrieves the current Twenty Sixteen color scheme. |
2431 |
- * |
2432 |
- * Create your own twentysixteen_get_color_scheme() function to override in a child theme. |
2433 |
- * |
2434 |
- * @since Twenty Sixteen 1.0 |
2435 |
- * |
2436 |
- * @return array An associative array of either the current or default color scheme HEX values. |
2437 |
- */ |
2438 |
- function twentysixteen_get_color_scheme() { |
2439 |
- $color_scheme_option = get_theme_mod( 'color_scheme', 'default' ); |
2440 |
- $color_schemes = twentysixteen_get_color_schemes(); |
2441 |
- |
2442 |
- if ( array_key_exists( $color_scheme_option, $color_schemes ) ) { |
2443 |
- return $color_schemes[ $color_scheme_option ]['colors']; |
2444 |
- } |
2445 |
+/** |
2446 |
+ * Retrieves the current Twenty Sixteen color scheme. |
2447 |
+ * |
2448 |
+ * Create your own twentysixteen_get_color_scheme() function to override in a child theme. |
2449 |
+ * |
2450 |
+ * @since Twenty Sixteen 1.0 |
2451 |
+ * |
2452 |
+ * @return array An associative array of either the current or default color scheme HEX values. |
2453 |
+ */ |
2454 |
+function twentysixteen_get_color_scheme() { |
2455 |
+ $color_scheme_option = get_theme_mod( 'color_scheme', 'default' ); |
2456 |
+ $color_schemes = twentysixteen_get_color_schemes(); |
2457 |
|
2458 |
- return $color_schemes['default']['colors']; |
2459 |
+ if ( array_key_exists( $color_scheme_option, $color_schemes ) ) { |
2460 |
+ return $color_schemes[ $color_scheme_option ]['colors']; |
2461 |
} |
2462 |
+ |
2463 |
+ return $color_schemes['default']['colors']; |
2464 |
+} |
2465 |
endif; // twentysixteen_get_color_scheme |
2466 |
|
2467 |
if ( ! function_exists( 'twentysixteen_get_color_scheme_choices' ) ) : |
2468 |
- /** |
2469 |
- * Retrieves an array of color scheme choices registered for Twenty Sixteen. |
2470 |
- * |
2471 |
- * Create your own twentysixteen_get_color_scheme_choices() function to override |
2472 |
- * in a child theme. |
2473 |
- * |
2474 |
- * @since Twenty Sixteen 1.0 |
2475 |
- * |
2476 |
- * @return array Array of color schemes. |
2477 |
- */ |
2478 |
- function twentysixteen_get_color_scheme_choices() { |
2479 |
- $color_schemes = twentysixteen_get_color_schemes(); |
2480 |
- $color_scheme_control_options = array(); |
2481 |
- |
2482 |
- foreach ( $color_schemes as $color_scheme => $value ) { |
2483 |
- $color_scheme_control_options[ $color_scheme ] = $value['label']; |
2484 |
- } |
2485 |
+/** |
2486 |
+ * Retrieves an array of color scheme choices registered for Twenty Sixteen. |
2487 |
+ * |
2488 |
+ * Create your own twentysixteen_get_color_scheme_choices() function to override |
2489 |
+ * in a child theme. |
2490 |
+ * |
2491 |
+ * @since Twenty Sixteen 1.0 |
2492 |
+ * |
2493 |
+ * @return array Array of color schemes. |
2494 |
+ */ |
2495 |
+function twentysixteen_get_color_scheme_choices() { |
2496 |
+ $color_schemes = twentysixteen_get_color_schemes(); |
2497 |
+ $color_scheme_control_options = array(); |
2498 |
|
2499 |
- return $color_scheme_control_options; |
2500 |
+ foreach ( $color_schemes as $color_scheme => $value ) { |
2501 |
+ $color_scheme_control_options[ $color_scheme ] = $value['label']; |
2502 |
} |
2503 |
+ |
2504 |
+ return $color_scheme_control_options; |
2505 |
+} |
2506 |
endif; // twentysixteen_get_color_scheme_choices |
2507 |
|
2508 |
|
2509 |
if ( ! function_exists( 'twentysixteen_sanitize_color_scheme' ) ) : |
2510 |
- /** |
2511 |
- * Handles sanitization for Twenty Sixteen color schemes. |
2512 |
- * |
2513 |
- * Create your own twentysixteen_sanitize_color_scheme() function to override |
2514 |
- * in a child theme. |
2515 |
- * |
2516 |
- * @since Twenty Sixteen 1.0 |
2517 |
- * |
2518 |
- * @param string $value Color scheme name value. |
2519 |
- * @return string Color scheme name. |
2520 |
- */ |
2521 |
- function twentysixteen_sanitize_color_scheme( $value ) { |
2522 |
- $color_schemes = twentysixteen_get_color_scheme_choices(); |
2523 |
- |
2524 |
- if ( ! array_key_exists( $value, $color_schemes ) ) { |
2525 |
- return 'default'; |
2526 |
- } |
2527 |
+/** |
2528 |
+ * Handles sanitization for Twenty Sixteen color schemes. |
2529 |
+ * |
2530 |
+ * Create your own twentysixteen_sanitize_color_scheme() function to override |
2531 |
+ * in a child theme. |
2532 |
+ * |
2533 |
+ * @since Twenty Sixteen 1.0 |
2534 |
+ * |
2535 |
+ * @param string $value Color scheme name value. |
2536 |
+ * @return string Color scheme name. |
2537 |
+ */ |
2538 |
+function twentysixteen_sanitize_color_scheme( $value ) { |
2539 |
+ $color_schemes = twentysixteen_get_color_scheme_choices(); |
2540 |
|
2541 |
- return $value; |
2542 |
+ if ( ! array_key_exists( $value, $color_schemes ) ) { |
2543 |
+ return 'default'; |
2544 |
} |
2545 |
+ |
2546 |
+ return $value; |
2547 |
+} |
2548 |
endif; // twentysixteen_sanitize_color_scheme |
2549 |
|
2550 |
/** |
2551 |
@@ -487,16 +445,14 @@ add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' ); |
2552 |
* @return string Color scheme CSS. |
2553 |
*/ |
2554 |
function twentysixteen_get_color_scheme_css( $colors ) { |
2555 |
- $colors = wp_parse_args( |
2556 |
- $colors, array( |
2557 |
- 'background_color' => '', |
2558 |
- 'page_background_color' => '', |
2559 |
- 'link_color' => '', |
2560 |
- 'main_text_color' => '', |
2561 |
- 'secondary_text_color' => '', |
2562 |
- 'border_color' => '', |
2563 |
- ) |
2564 |
- ); |
2565 |
+ $colors = wp_parse_args( $colors, array( |
2566 |
+ 'background_color' => '', |
2567 |
+ 'page_background_color' => '', |
2568 |
+ 'link_color' => '', |
2569 |
+ 'main_text_color' => '', |
2570 |
+ 'secondary_text_color' => '', |
2571 |
+ 'border_color' => '', |
2572 |
+ ) ); |
2573 |
|
2574 |
return <<<CSS |
2575 |
/* Color Scheme */ |
2576 |
@@ -913,9 +869,9 @@ add_action( 'wp_enqueue_scripts', 'twentysixteen_page_background_color_css', 11 |
2577 |
* @see wp_add_inline_style() |
2578 |
*/ |
2579 |
function twentysixteen_link_color_css() { |
2580 |
- $color_scheme = twentysixteen_get_color_scheme(); |
2581 |
- $default_color = $color_scheme[2]; |
2582 |
- $link_color = get_theme_mod( 'link_color', $default_color ); |
2583 |
+ $color_scheme = twentysixteen_get_color_scheme(); |
2584 |
+ $default_color = $color_scheme[2]; |
2585 |
+ $link_color = get_theme_mod( 'link_color', $default_color ); |
2586 |
|
2587 |
// Don't do anything if the current color is the default. |
2588 |
if ( $link_color === $default_color ) { |
2589 |
@@ -1170,8 +1126,8 @@ add_action( 'wp_enqueue_scripts', 'twentysixteen_main_text_color_css', 11 ); |
2590 |
* @see wp_add_inline_style() |
2591 |
*/ |
2592 |
function twentysixteen_secondary_text_color_css() { |
2593 |
- $color_scheme = twentysixteen_get_color_scheme(); |
2594 |
- $default_color = $color_scheme[4]; |
2595 |
+ $color_scheme = twentysixteen_get_color_scheme(); |
2596 |
+ $default_color = $color_scheme[4]; |
2597 |
$secondary_text_color = get_theme_mod( 'secondary_text_color', $default_color ); |
2598 |
|
2599 |
// Don't do anything if the current color is the default. |
2600 |
|
2601 |
diff --git a/themes/twentysixteen/inc/template-tags.php b/themes/twentysixteen/inc/template-tags.php |
2602 |
index ce5190a..9b8f1f3 100644 |
2603 |
--- a/themes/twentysixteen/inc/template-tags.php |
2604 |
+++ b/themes/twentysixteen/inc/template-tags.php |
2605 |
@@ -10,132 +10,126 @@ |
2606 |
*/ |
2607 |
|
2608 |
if ( ! function_exists( 'twentysixteen_entry_meta' ) ) : |
2609 |
- /** |
2610 |
- * Prints HTML with meta information for the categories, tags. |
2611 |
- * |
2612 |
- * Create your own twentysixteen_entry_meta() function to override in a child theme. |
2613 |
- * |
2614 |
- * @since Twenty Sixteen 1.0 |
2615 |
- */ |
2616 |
- function twentysixteen_entry_meta() { |
2617 |
- if ( 'post' === get_post_type() ) { |
2618 |
- $author_avatar_size = apply_filters( 'twentysixteen_author_avatar_size', 49 ); |
2619 |
- printf( |
2620 |
- '<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>', |
2621 |
- get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ), |
2622 |
- _x( 'Author', 'Used before post author name.', 'twentysixteen' ), |
2623 |
- esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), |
2624 |
- get_the_author() |
2625 |
- ); |
2626 |
- } |
2627 |
+/** |
2628 |
+ * Prints HTML with meta information for the categories, tags. |
2629 |
+ * |
2630 |
+ * Create your own twentysixteen_entry_meta() function to override in a child theme. |
2631 |
+ * |
2632 |
+ * @since Twenty Sixteen 1.0 |
2633 |
+ */ |
2634 |
+function twentysixteen_entry_meta() { |
2635 |
+ if ( 'post' === get_post_type() ) { |
2636 |
+ $author_avatar_size = apply_filters( 'twentysixteen_author_avatar_size', 49 ); |
2637 |
+ 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>', |
2638 |
+ get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ), |
2639 |
+ _x( 'Author', 'Used before post author name.', 'twentysixteen' ), |
2640 |
+ esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), |
2641 |
+ get_the_author() |
2642 |
+ ); |
2643 |
+ } |
2644 |
|
2645 |
- if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) { |
2646 |
- twentysixteen_entry_date(); |
2647 |
- } |
2648 |
+ if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) { |
2649 |
+ twentysixteen_entry_date(); |
2650 |
+ } |
2651 |
|
2652 |
- $format = get_post_format(); |
2653 |
- if ( current_theme_supports( 'post-formats', $format ) ) { |
2654 |
- printf( |
2655 |
- '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', |
2656 |
- sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentysixteen' ) ), |
2657 |
- esc_url( get_post_format_link( $format ) ), |
2658 |
- get_post_format_string( $format ) |
2659 |
- ); |
2660 |
- } |
2661 |
+ $format = get_post_format(); |
2662 |
+ if ( current_theme_supports( 'post-formats', $format ) ) { |
2663 |
+ printf( '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', |
2664 |
+ sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentysixteen' ) ), |
2665 |
+ esc_url( get_post_format_link( $format ) ), |
2666 |
+ get_post_format_string( $format ) |
2667 |
+ ); |
2668 |
+ } |
2669 |
|
2670 |
- if ( 'post' === get_post_type() ) { |
2671 |
- twentysixteen_entry_taxonomies(); |
2672 |
- } |
2673 |
+ if ( 'post' === get_post_type() ) { |
2674 |
+ twentysixteen_entry_taxonomies(); |
2675 |
+ } |
2676 |
|
2677 |
- if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { |
2678 |
- echo '<span class="comments-link">'; |
2679 |
- comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen' ), get_the_title() ) ); |
2680 |
- echo '</span>'; |
2681 |
- } |
2682 |
+ if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { |
2683 |
+ echo '<span class="comments-link">'; |
2684 |
+ comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen' ), get_the_title() ) ); |
2685 |
+ echo '</span>'; |
2686 |
} |
2687 |
+} |
2688 |
endif; |
2689 |
|
2690 |
if ( ! function_exists( 'twentysixteen_entry_date' ) ) : |
2691 |
- /** |
2692 |
- * Prints HTML with date information for current post. |
2693 |
- * |
2694 |
- * Create your own twentysixteen_entry_date() function to override in a child theme. |
2695 |
- * |
2696 |
- * @since Twenty Sixteen 1.0 |
2697 |
- */ |
2698 |
- function twentysixteen_entry_date() { |
2699 |
- $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; |
2700 |
- |
2701 |
- if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { |
2702 |
- $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; |
2703 |
- } |
2704 |
- |
2705 |
- $time_string = sprintf( |
2706 |
- $time_string, |
2707 |
- esc_attr( get_the_date( 'c' ) ), |
2708 |
- get_the_date(), |
2709 |
- esc_attr( get_the_modified_date( 'c' ) ), |
2710 |
- get_the_modified_date() |
2711 |
- ); |
2712 |
+/** |
2713 |
+ * Prints HTML with date information for current post. |
2714 |
+ * |
2715 |
+ * Create your own twentysixteen_entry_date() function to override in a child theme. |
2716 |
+ * |
2717 |
+ * @since Twenty Sixteen 1.0 |
2718 |
+ */ |
2719 |
+function twentysixteen_entry_date() { |
2720 |
+ $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; |
2721 |
|
2722 |
- printf( |
2723 |
- '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', |
2724 |
- _x( 'Posted on', 'Used before publish date.', 'twentysixteen' ), |
2725 |
- esc_url( get_permalink() ), |
2726 |
- $time_string |
2727 |
- ); |
2728 |
+ if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { |
2729 |
+ $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; |
2730 |
} |
2731 |
+ |
2732 |
+ $time_string = sprintf( $time_string, |
2733 |
+ esc_attr( get_the_date( 'c' ) ), |
2734 |
+ get_the_date(), |
2735 |
+ esc_attr( get_the_modified_date( 'c' ) ), |
2736 |
+ get_the_modified_date() |
2737 |
+ ); |
2738 |
+ |
2739 |
+ printf( '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', |
2740 |
+ _x( 'Posted on', 'Used before publish date.', 'twentysixteen' ), |
2741 |
+ esc_url( get_permalink() ), |
2742 |
+ $time_string |
2743 |
+ ); |
2744 |
+} |
2745 |
endif; |
2746 |
|
2747 |
if ( ! function_exists( 'twentysixteen_entry_taxonomies' ) ) : |
2748 |
- /** |
2749 |
- * Prints HTML with category and tags for current post. |
2750 |
- * |
2751 |
- * Create your own twentysixteen_entry_taxonomies() function to override in a child theme. |
2752 |
- * |
2753 |
- * @since Twenty Sixteen 1.0 |
2754 |
- */ |
2755 |
- function twentysixteen_entry_taxonomies() { |
2756 |
- $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) ); |
2757 |
- if ( $categories_list && twentysixteen_categorized_blog() ) { |
2758 |
- printf( |
2759 |
- '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', |
2760 |
- _x( 'Categories', 'Used before category names.', 'twentysixteen' ), |
2761 |
- $categories_list |
2762 |
- ); |
2763 |
- } |
2764 |
+/** |
2765 |
+ * Prints HTML with category and tags for current post. |
2766 |
+ * |
2767 |
+ * Create your own twentysixteen_entry_taxonomies() function to override in a child theme. |
2768 |
+ * |
2769 |
+ * @since Twenty Sixteen 1.0 |
2770 |
+ */ |
2771 |
+function twentysixteen_entry_taxonomies() { |
2772 |
+ $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) ); |
2773 |
+ if ( $categories_list && twentysixteen_categorized_blog() ) { |
2774 |
+ printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', |
2775 |
+ _x( 'Categories', 'Used before category names.', 'twentysixteen' ), |
2776 |
+ $categories_list |
2777 |
+ ); |
2778 |
+ } |
2779 |
|
2780 |
- $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) ); |
2781 |
- if ( $tags_list && ! is_wp_error( $tags_list ) ) { |
2782 |
- printf( |
2783 |
- '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', |
2784 |
- _x( 'Tags', 'Used before tag names.', 'twentysixteen' ), |
2785 |
- $tags_list |
2786 |
- ); |
2787 |
- } |
2788 |
+ $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) ); |
2789 |
+ if ( $tags_list && ! is_wp_error( $tags_list ) ) { |
2790 |
+ printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', |
2791 |
+ _x( 'Tags', 'Used before tag names.', 'twentysixteen' ), |
2792 |
+ $tags_list |
2793 |
+ ); |
2794 |
} |
2795 |
+} |
2796 |
endif; |
2797 |
|
2798 |
if ( ! function_exists( 'twentysixteen_post_thumbnail' ) ) : |
2799 |
- /** |
2800 |
- * Displays an optional post thumbnail. |
2801 |
- * |
2802 |
- * Wraps the post thumbnail in an anchor element on index views, or a div |
2803 |
- * element when on single views. |
2804 |
- * |
2805 |
- * Create your own twentysixteen_post_thumbnail() function to override in a child theme. |
2806 |
- * |
2807 |
- * @since Twenty Sixteen 1.0 |
2808 |
- */ |
2809 |
- function twentysixteen_post_thumbnail() { |
2810 |
- if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { |
2811 |
- return; |
2812 |
- } |
2813 |
+/** |
2814 |
+ * Displays an optional post thumbnail. |
2815 |
+ * |
2816 |
+ * Wraps the post thumbnail in an anchor element on index views, or a div |
2817 |
+ * element when on single views. |
2818 |
+ * |
2819 |
+ * Create your own twentysixteen_post_thumbnail() function to override in a child theme. |
2820 |
+ * |
2821 |
+ * @since Twenty Sixteen 1.0 |
2822 |
+ */ |
2823 |
+function twentysixteen_post_thumbnail() { |
2824 |
+ if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { |
2825 |
+ return; |
2826 |
+ } |
2827 |
|
2828 |
- if ( is_singular() ) : |
2829 |
- ?> |
2830 |
+ if ( is_singular() ) : |
2831 |
+ ?> |
2832 |
|
2833 |
- <div class="post-thumbnail"> |
2834 |
+ <div class="post-thumbnail"> |
2835 |
<?php the_post_thumbnail(); ?> |
2836 |
</div><!-- .post-thumbnail --> |
2837 |
|
2838 |
@@ -145,9 +139,8 @@ if ( ! function_exists( 'twentysixteen_post_thumbnail' ) ) : |
2839 |
<?php the_post_thumbnail( 'post-thumbnail', array( 'alt' => the_title_attribute( 'echo=0' ) ) ); ?> |
2840 |
</a> |
2841 |
|
2842 |
- <?php |
2843 |
- endif; // End is_singular() |
2844 |
- } |
2845 |
+ <?php endif; // End is_singular() |
2846 |
+} |
2847 |
endif; |
2848 |
|
2849 |
if ( ! function_exists( 'twentysixteen_excerpt' ) ) : |
2850 |
@@ -165,74 +158,69 @@ if ( ! function_exists( 'twentysixteen_excerpt' ) ) : |
2851 |
function twentysixteen_excerpt( $class = 'entry-summary' ) { |
2852 |
$class = esc_attr( $class ); |
2853 |
|
2854 |
- if ( has_excerpt() || is_search() ) : |
2855 |
- ?> |
2856 |
+ if ( has_excerpt() || is_search() ) : ?> |
2857 |
<div class="<?php echo $class; ?>"> |
2858 |
<?php the_excerpt(); ?> |
2859 |
</div><!-- .<?php echo $class; ?> --> |
2860 |
- <?php |
2861 |
- endif; |
2862 |
+ <?php endif; |
2863 |
} |
2864 |
endif; |
2865 |
|
2866 |
if ( ! function_exists( 'twentysixteen_excerpt_more' ) && ! is_admin() ) : |
2867 |
- /** |
2868 |
- * Replaces "[...]" (appended to automatically generated excerpts) with ... and |
2869 |
- * a 'Continue reading' link. |
2870 |
- * |
2871 |
- * Create your own twentysixteen_excerpt_more() function to override in a child theme. |
2872 |
- * |
2873 |
- * @since Twenty Sixteen 1.0 |
2874 |
- * |
2875 |
- * @return string 'Continue reading' link prepended with an ellipsis. |
2876 |
- */ |
2877 |
- function twentysixteen_excerpt_more() { |
2878 |
- $link = sprintf( |
2879 |
- '<a href="%1$s" class="more-link">%2$s</a>', |
2880 |
- esc_url( get_permalink( get_the_ID() ) ), |
2881 |
- /* translators: %s: Name of current post */ |
2882 |
- sprintf( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), get_the_title( get_the_ID() ) ) |
2883 |
- ); |
2884 |
- return ' … ' . $link; |
2885 |
- } |
2886 |
- add_filter( 'excerpt_more', 'twentysixteen_excerpt_more' ); |
2887 |
+/** |
2888 |
+ * Replaces "[...]" (appended to automatically generated excerpts) with ... and |
2889 |
+ * a 'Continue reading' link. |
2890 |
+ * |
2891 |
+ * Create your own twentysixteen_excerpt_more() function to override in a child theme. |
2892 |
+ * |
2893 |
+ * @since Twenty Sixteen 1.0 |
2894 |
+ * |
2895 |
+ * @return string 'Continue reading' link prepended with an ellipsis. |
2896 |
+ */ |
2897 |
+function twentysixteen_excerpt_more() { |
2898 |
+ $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>', |
2899 |
+ esc_url( get_permalink( get_the_ID() ) ), |
2900 |
+ /* translators: %s: Name of current post */ |
2901 |
+ sprintf( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), get_the_title( get_the_ID() ) ) |
2902 |
+ ); |
2903 |
+ return ' … ' . $link; |
2904 |
+} |
2905 |
+add_filter( 'excerpt_more', 'twentysixteen_excerpt_more' ); |
2906 |
endif; |
2907 |
|
2908 |
if ( ! function_exists( 'twentysixteen_categorized_blog' ) ) : |
2909 |
- /** |
2910 |
- * Determines whether blog/site has more than one category. |
2911 |
- * |
2912 |
- * Create your own twentysixteen_categorized_blog() function to override in a child theme. |
2913 |
- * |
2914 |
- * @since Twenty Sixteen 1.0 |
2915 |
- * |
2916 |
- * @return bool True if there is more than one category, false otherwise. |
2917 |
- */ |
2918 |
- function twentysixteen_categorized_blog() { |
2919 |
- if ( false === ( $all_the_cool_cats = get_transient( 'twentysixteen_categories' ) ) ) { |
2920 |
- // Create an array of all the categories that are attached to posts. |
2921 |
- $all_the_cool_cats = get_categories( |
2922 |
- array( |
2923 |
- 'fields' => 'ids', |
2924 |
- // We only need to know if there is more than one category. |
2925 |
- 'number' => 2, |
2926 |
- ) |
2927 |
- ); |
2928 |
- |
2929 |
- // Count the number of categories that are attached to the posts. |
2930 |
- $all_the_cool_cats = count( $all_the_cool_cats ); |
2931 |
- |
2932 |
- set_transient( 'twentysixteen_categories', $all_the_cool_cats ); |
2933 |
- } |
2934 |
+/** |
2935 |
+ * Determines whether blog/site has more than one category. |
2936 |
+ * |
2937 |
+ * Create your own twentysixteen_categorized_blog() function to override in a child theme. |
2938 |
+ * |
2939 |
+ * @since Twenty Sixteen 1.0 |
2940 |
+ * |
2941 |
+ * @return bool True if there is more than one category, false otherwise. |
2942 |
+ */ |
2943 |
+function twentysixteen_categorized_blog() { |
2944 |
+ if ( false === ( $all_the_cool_cats = get_transient( 'twentysixteen_categories' ) ) ) { |
2945 |
+ // Create an array of all the categories that are attached to posts. |
2946 |
+ $all_the_cool_cats = get_categories( array( |
2947 |
+ 'fields' => 'ids', |
2948 |
+ // We only need to know if there is more than one category. |
2949 |
+ 'number' => 2, |
2950 |
+ ) ); |
2951 |
+ |
2952 |
+ // Count the number of categories that are attached to the posts. |
2953 |
+ $all_the_cool_cats = count( $all_the_cool_cats ); |
2954 |
+ |
2955 |
+ set_transient( 'twentysixteen_categories', $all_the_cool_cats ); |
2956 |
+ } |
2957 |
|
2958 |
- if ( $all_the_cool_cats > 1 || is_preview() ) { |
2959 |
- // This blog has more than 1 category so twentysixteen_categorized_blog should return true. |
2960 |
- return true; |
2961 |
- } else { |
2962 |
- // This blog has only 1 category so twentysixteen_categorized_blog should return false. |
2963 |
- return false; |
2964 |
- } |
2965 |
+ if ( $all_the_cool_cats > 1 || is_preview() ) { |
2966 |
+ // This blog has more than 1 category so twentysixteen_categorized_blog should return true. |
2967 |
+ return true; |
2968 |
+ } else { |
2969 |
+ // This blog has only 1 category so twentysixteen_categorized_blog should return false. |
2970 |
+ return false; |
2971 |
} |
2972 |
+} |
2973 |
endif; |
2974 |
|
2975 |
/** |
2976 |
@@ -248,19 +236,19 @@ function twentysixteen_category_transient_flusher() { |
2977 |
delete_transient( 'twentysixteen_categories' ); |
2978 |
} |
2979 |
add_action( 'edit_category', 'twentysixteen_category_transient_flusher' ); |
2980 |
-add_action( 'save_post', 'twentysixteen_category_transient_flusher' ); |
2981 |
+add_action( 'save_post', 'twentysixteen_category_transient_flusher' ); |
2982 |
|
2983 |
if ( ! function_exists( 'twentysixteen_the_custom_logo' ) ) : |
2984 |
- /** |
2985 |
- * Displays the optional custom logo. |
2986 |
- * |
2987 |
- * Does nothing if the custom logo is not available. |
2988 |
- * |
2989 |
- * @since Twenty Sixteen 1.2 |
2990 |
- */ |
2991 |
- function twentysixteen_the_custom_logo() { |
2992 |
- if ( function_exists( 'the_custom_logo' ) ) { |
2993 |
- the_custom_logo(); |
2994 |
- } |
2995 |
+/** |
2996 |
+ * Displays the optional custom logo. |
2997 |
+ * |
2998 |
+ * Does nothing if the custom logo is not available. |
2999 |
+ * |
3000 |
+ * @since Twenty Sixteen 1.2 |
3001 |
+ */ |
3002 |
+function twentysixteen_the_custom_logo() { |
3003 |
+ if ( function_exists( 'the_custom_logo' ) ) { |
3004 |
+ the_custom_logo(); |
3005 |
} |
3006 |
+} |
3007 |
endif; |
3008 |
|
3009 |
diff --git a/themes/twentysixteen/index.php b/themes/twentysixteen/index.php |
3010 |
index d31ef2f..3f621ab 100644 |
3011 |
--- a/themes/twentysixteen/index.php |
3012 |
+++ b/themes/twentysixteen/index.php |
3013 |
@@ -29,8 +29,7 @@ get_header(); ?> |
3014 |
|
3015 |
<?php |
3016 |
// Start the loop. |
3017 |
- while ( have_posts() ) : |
3018 |
- the_post(); |
3019 |
+ while ( have_posts() ) : the_post(); |
3020 |
|
3021 |
/* |
3022 |
* Include the Post-Format-specific template for the content. |
3023 |
@@ -39,19 +38,17 @@ get_header(); ?> |
3024 |
*/ |
3025 |
get_template_part( 'template-parts/content', get_post_format() ); |
3026 |
|
3027 |
- // End the loop. |
3028 |
+ // End the loop. |
3029 |
endwhile; |
3030 |
|
3031 |
// Previous/next page navigation. |
3032 |
- the_posts_pagination( |
3033 |
- array( |
3034 |
- 'prev_text' => __( 'Previous page', 'twentysixteen' ), |
3035 |
- 'next_text' => __( 'Next page', 'twentysixteen' ), |
3036 |
- 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>', |
3037 |
- ) |
3038 |
- ); |
3039 |
+ the_posts_pagination( array( |
3040 |
+ 'prev_text' => __( 'Previous page', 'twentysixteen' ), |
3041 |
+ 'next_text' => __( 'Next page', 'twentysixteen' ), |
3042 |
+ 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>', |
3043 |
+ ) ); |
3044 |
|
3045 |
- // If no content, include the "No posts found" template. |
3046 |
+ // If no content, include the "No posts found" template. |
3047 |
else : |
3048 |
get_template_part( 'template-parts/content', 'none' ); |
3049 |
|
3050 |
|
3051 |
diff --git a/themes/twentysixteen/js/functions.js b/themes/twentysixteen/js/functions.js |
3052 |
index 8610561..a15af11 100644 |
3053 |
--- a/themes/twentysixteen/js/functions.js |
3054 |
+++ b/themes/twentysixteen/js/functions.js |
3055 |
@@ -148,26 +148,37 @@ |
3056 |
entryFooterPos = entryFooter.offset(), |
3057 |
entryFooterPosBottom = entryFooterPos.top + ( entryFooter.height() + 28 ), |
3058 |
caption = element.closest( 'figure' ), |
3059 |
+ figcaption = element.next( 'figcaption' ), |
3060 |
newImg; |
3061 |
|
3062 |
// Add 'below-entry-meta' to elements below the entry meta. |
3063 |
if ( elementPosTop > entryFooterPosBottom ) { |
3064 |
|
3065 |
// Check if full-size images and captions are larger than or equal to 840px. |
3066 |
- if ( 'img.size-full' === param ) { |
3067 |
+ if ( 'img.size-full' === param || '.wp-block-image img' === param ) { |
3068 |
|
3069 |
// Create an image to find native image width of resized images (i.e. max-width: 100%). |
3070 |
newImg = new Image(); |
3071 |
newImg.src = element.attr( 'src' ); |
3072 |
|
3073 |
$( newImg ).on( 'load.twentysixteen', function() { |
3074 |
- if ( newImg.width >= 840 ) { |
3075 |
+ if ( newImg.width >= 840 ) { |
3076 |
+ |
3077 |
+ // Check if an image in an image block has a width attribute; if its value is less than 840, return. |
3078 |
+ if ( '.wp-block-image img' === param && element.is( '[width]' ) && element.attr( 'width' ) < 840 ) { |
3079 |
+ return; |
3080 |
+ } |
3081 |
+ |
3082 |
element.addClass( 'below-entry-meta' ); |
3083 |
|
3084 |
if ( caption.hasClass( 'wp-caption' ) ) { |
3085 |
caption.addClass( 'below-entry-meta' ); |
3086 |
caption.removeAttr( 'style' ); |
3087 |
} |
3088 |
+ |
3089 |
+ if ( figcaption ) { |
3090 |
+ figcaption.addClass( 'below-entry-meta' ); |
3091 |
+ } |
3092 |
} |
3093 |
} ); |
3094 |
} else { |
3095 |
@@ -190,11 +201,13 @@ |
3096 |
resizeTimer = setTimeout( function() { |
3097 |
belowEntryMetaClass( 'img.size-full' ); |
3098 |
belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' ); |
3099 |
+ belowEntryMetaClass( '.wp-block-image img' ); |
3100 |
}, 300 ); |
3101 |
onResizeARIA(); |
3102 |
} ); |
3103 |
|
3104 |
belowEntryMetaClass( 'img.size-full' ); |
3105 |
belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' ); |
3106 |
+ belowEntryMetaClass( '.wp-block-image img' ); |
3107 |
} ); |
3108 |
} )( jQuery ); |
3109 |
|
3110 |
diff --git a/themes/twentysixteen/page.php b/themes/twentysixteen/page.php |
3111 |
index a232c9f..315a3da 100644 |
3112 |
--- a/themes/twentysixteen/page.php |
3113 |
+++ b/themes/twentysixteen/page.php |
3114 |
@@ -17,8 +17,7 @@ get_header(); ?> |
3115 |
<main id="main" class="site-main" role="main"> |
3116 |
<?php |
3117 |
// Start the loop. |
3118 |
- while ( have_posts() ) : |
3119 |
- the_post(); |
3120 |
+ while ( have_posts() ) : the_post(); |
3121 |
|
3122 |
// Include the page content template. |
3123 |
get_template_part( 'template-parts/content', 'page' ); |
3124 |
|
3125 |
diff --git a/themes/twentysixteen/readme.txt b/themes/twentysixteen/readme.txt |
3126 |
index 9c0cf09..e1741be 100644 |
3127 |
--- a/themes/twentysixteen/readme.txt |
3128 |
+++ b/themes/twentysixteen/readme.txt |
3129 |
@@ -1,8 +1,8 @@ |
3130 |
=== Twenty Sixteen === |
3131 |
Contributors: the WordPress team |
3132 |
Requires at least: WordPress 4.4 |
3133 |
-Tested up to: WordPress 5.0-trunk |
3134 |
-Version: 1.5 |
3135 |
+Tested up to: WordPress 5.0 |
3136 |
+Version: 1.7 |
3137 |
License: GPLv2 or later |
3138 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
3139 |
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 |
3140 |
@@ -56,6 +56,16 @@ Image used in screenshot.png: A photo by Austin Schmid (https://unsplash.com/sch |
3141 |
|
3142 |
== Changelog == |
3143 |
|
3144 |
+= 1.7 = |
3145 |
+* Released: December 19, 2018 |
3146 |
+ |
3147 |
+https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.7 |
3148 |
+ |
3149 |
+= 1.6 = |
3150 |
+* Released: December 6, 2018 |
3151 |
+ |
3152 |
+https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.6 |
3153 |
+ |
3154 |
= 1.5 = |
3155 |
* Released: May 17, 2018 |
3156 |
|
3157 |
|
3158 |
diff --git a/themes/twentysixteen/search.php b/themes/twentysixteen/search.php |
3159 |
index 0f89363..4180b5f 100644 |
3160 |
--- a/themes/twentysixteen/search.php |
3161 |
+++ b/themes/twentysixteen/search.php |
3162 |
@@ -20,8 +20,7 @@ get_header(); ?> |
3163 |
|
3164 |
<?php |
3165 |
// Start the loop. |
3166 |
- while ( have_posts() ) : |
3167 |
- the_post(); |
3168 |
+ while ( have_posts() ) : the_post(); |
3169 |
|
3170 |
/** |
3171 |
* Run the loop for the search to output the results. |
3172 |
@@ -30,19 +29,17 @@ get_header(); ?> |
3173 |
*/ |
3174 |
get_template_part( 'template-parts/content', 'search' ); |
3175 |
|
3176 |
- // End the loop. |
3177 |
+ // End the loop. |
3178 |
endwhile; |
3179 |
|
3180 |
// Previous/next page navigation. |
3181 |
- the_posts_pagination( |
3182 |
- array( |
3183 |
- 'prev_text' => __( 'Previous page', 'twentysixteen' ), |
3184 |
- 'next_text' => __( 'Next page', 'twentysixteen' ), |
3185 |
- 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>', |
3186 |
- ) |
3187 |
- ); |
3188 |
- |
3189 |
- // If no content, include the "No posts found" template. |
3190 |
+ the_posts_pagination( array( |
3191 |
+ 'prev_text' => __( 'Previous page', 'twentysixteen' ), |
3192 |
+ 'next_text' => __( 'Next page', 'twentysixteen' ), |
3193 |
+ 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>', |
3194 |
+ ) ); |
3195 |
+ |
3196 |
+ // If no content, include the "No posts found" template. |
3197 |
else : |
3198 |
get_template_part( 'template-parts/content', 'none' ); |
3199 |
|
3200 |
|
3201 |
diff --git a/themes/twentysixteen/sidebar.php b/themes/twentysixteen/sidebar.php |
3202 |
index 45aff97..d4d893e 100644 |
3203 |
--- a/themes/twentysixteen/sidebar.php |
3204 |
+++ b/themes/twentysixteen/sidebar.php |
3205 |
@@ -8,7 +8,7 @@ |
3206 |
*/ |
3207 |
?> |
3208 |
|
3209 |
-<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?> |
3210 |
+<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?> |
3211 |
<aside id="secondary" class="sidebar widget-area" role="complementary"> |
3212 |
<?php dynamic_sidebar( 'sidebar-1' ); ?> |
3213 |
</aside><!-- .sidebar .widget-area --> |
3214 |
|
3215 |
diff --git a/themes/twentysixteen/single.php b/themes/twentysixteen/single.php |
3216 |
index 3454170..07e0df2 100644 |
3217 |
--- a/themes/twentysixteen/single.php |
3218 |
+++ b/themes/twentysixteen/single.php |
3219 |
@@ -13,8 +13,7 @@ get_header(); ?> |
3220 |
<main id="main" class="site-main" role="main"> |
3221 |
<?php |
3222 |
// Start the loop. |
3223 |
- while ( have_posts() ) : |
3224 |
- the_post(); |
3225 |
+ while ( have_posts() ) : the_post(); |
3226 |
|
3227 |
// Include the single post content template. |
3228 |
get_template_part( 'template-parts/content', 'single' ); |
3229 |
@@ -26,23 +25,19 @@ get_header(); ?> |
3230 |
|
3231 |
if ( is_singular( 'attachment' ) ) { |
3232 |
// Parent post navigation. |
3233 |
- the_post_navigation( |
3234 |
- array( |
3235 |
- 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ), |
3236 |
- ) |
3237 |
- ); |
3238 |
+ the_post_navigation( array( |
3239 |
+ 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ), |
3240 |
+ ) ); |
3241 |
} elseif ( is_singular( 'post' ) ) { |
3242 |
// Previous/next post navigation. |
3243 |
- the_post_navigation( |
3244 |
- array( |
3245 |
- 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentysixteen' ) . '</span> ' . |
3246 |
- '<span class="screen-reader-text">' . __( 'Next post:', 'twentysixteen' ) . '</span> ' . |
3247 |
- '<span class="post-title">%title</span>', |
3248 |
- 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentysixteen' ) . '</span> ' . |
3249 |
- '<span class="screen-reader-text">' . __( 'Previous post:', 'twentysixteen' ) . '</span> ' . |
3250 |
- '<span class="post-title">%title</span>', |
3251 |
- ) |
3252 |
- ); |
3253 |
+ the_post_navigation( array( |
3254 |
+ 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentysixteen' ) . '</span> ' . |
3255 |
+ '<span class="screen-reader-text">' . __( 'Next post:', 'twentysixteen' ) . '</span> ' . |
3256 |
+ '<span class="post-title">%title</span>', |
3257 |
+ 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentysixteen' ) . '</span> ' . |
3258 |
+ '<span class="screen-reader-text">' . __( 'Previous post:', 'twentysixteen' ) . '</span> ' . |
3259 |
+ '<span class="post-title">%title</span>', |
3260 |
+ ) ); |
3261 |
} |
3262 |
|
3263 |
// End of the loop. |
3264 |
|
3265 |
diff --git a/themes/twentysixteen/style.css b/themes/twentysixteen/style.css |
3266 |
index aacb880..f5a854e 100644 |
3267 |
--- a/themes/twentysixteen/style.css |
3268 |
+++ b/themes/twentysixteen/style.css |
3269 |
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentysixteen/ |
3270 |
Author: the WordPress team |
3271 |
Author URI: https://wordpress.org/ |
3272 |
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. |
3273 |
-Version: 1.5 |
3274 |
+Version: 1.7 |
3275 |
License: GNU General Public License v2 or later |
3276 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
3277 |
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 |
3278 |
|
3279 |
diff --git a/themes/twentysixteen/template-parts/content-page.php b/themes/twentysixteen/template-parts/content-page.php |
3280 |
index 470776b..2b57d2b 100644 |
3281 |
--- a/themes/twentysixteen/template-parts/content-page.php |
3282 |
+++ b/themes/twentysixteen/template-parts/content-page.php |
3283 |
@@ -19,16 +19,14 @@ |
3284 |
<?php |
3285 |
the_content(); |
3286 |
|
3287 |
- wp_link_pages( |
3288 |
- array( |
3289 |
- 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>', |
3290 |
- 'after' => '</div>', |
3291 |
- 'link_before' => '<span>', |
3292 |
- 'link_after' => '</span>', |
3293 |
- 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%', |
3294 |
- 'separator' => '<span class="screen-reader-text">, </span>', |
3295 |
- ) |
3296 |
- ); |
3297 |
+ wp_link_pages( array( |
3298 |
+ 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>', |
3299 |
+ 'after' => '</div>', |
3300 |
+ 'link_before' => '<span>', |
3301 |
+ 'link_after' => '</span>', |
3302 |
+ 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%', |
3303 |
+ 'separator' => '<span class="screen-reader-text">, </span>', |
3304 |
+ ) ); |
3305 |
?> |
3306 |
</div><!-- .entry-content --> |
3307 |
|
3308 |
|
3309 |
diff --git a/themes/twentysixteen/template-parts/content-single.php b/themes/twentysixteen/template-parts/content-single.php |
3310 |
index 58f829b..241f528 100644 |
3311 |
--- a/themes/twentysixteen/template-parts/content-single.php |
3312 |
+++ b/themes/twentysixteen/template-parts/content-single.php |
3313 |
@@ -21,16 +21,14 @@ |
3314 |
<?php |
3315 |
the_content(); |
3316 |
|
3317 |
- wp_link_pages( |
3318 |
- array( |
3319 |
- 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>', |
3320 |
- 'after' => '</div>', |
3321 |
- 'link_before' => '<span>', |
3322 |
- 'link_after' => '</span>', |
3323 |
- 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%', |
3324 |
- 'separator' => '<span class="screen-reader-text">, </span>', |
3325 |
- ) |
3326 |
- ); |
3327 |
+ wp_link_pages( array( |
3328 |
+ 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>', |
3329 |
+ 'after' => '</div>', |
3330 |
+ 'link_before' => '<span>', |
3331 |
+ 'link_after' => '</span>', |
3332 |
+ 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%', |
3333 |
+ 'separator' => '<span class="screen-reader-text">, </span>', |
3334 |
+ ) ); |
3335 |
|
3336 |
if ( '' !== get_the_author_meta( 'description' ) ) { |
3337 |
get_template_part( 'template-parts/biography' ); |
3338 |
|
3339 |
diff --git a/themes/twentysixteen/template-parts/content.php b/themes/twentysixteen/template-parts/content.php |
3340 |
index 703487d..22b0ea4 100644 |
3341 |
--- a/themes/twentysixteen/template-parts/content.php |
3342 |
+++ b/themes/twentysixteen/template-parts/content.php |
3343 |
@@ -24,23 +24,19 @@ |
3344 |
<div class="entry-content"> |
3345 |
<?php |
3346 |
/* translators: %s: Name of current post */ |
3347 |
- the_content( |
3348 |
- sprintf( |
3349 |
- __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), |
3350 |
- get_the_title() |
3351 |
- ) |
3352 |
- ); |
3353 |
+ the_content( sprintf( |
3354 |
+ __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), |
3355 |
+ get_the_title() |
3356 |
+ ) ); |
3357 |
|
3358 |
- wp_link_pages( |
3359 |
- array( |
3360 |
- 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>', |
3361 |
- 'after' => '</div>', |
3362 |
- 'link_before' => '<span>', |
3363 |
- 'link_after' => '</span>', |
3364 |
- 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%', |
3365 |
- 'separator' => '<span class="screen-reader-text">, </span>', |
3366 |
- ) |
3367 |
- ); |
3368 |
+ wp_link_pages( array( |
3369 |
+ 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>', |
3370 |
+ 'after' => '</div>', |
3371 |
+ 'link_before' => '<span>', |
3372 |
+ 'link_after' => '</span>', |
3373 |
+ 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%', |
3374 |
+ 'separator' => '<span class="screen-reader-text">, </span>', |
3375 |
+ ) ); |
3376 |
?> |
3377 |
</div><!-- .entry-content --> |