1 |
commit: ef37cc6c104421b0629b6f1830bee7b4d50f6faa |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 20 21:46:53 2017 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 20 21:46:53 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/blogs-gentoo.git/commit/?id=ef37cc6c |
7 |
|
8 |
Update twentysixteen 1.4 |
9 |
|
10 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
11 |
|
12 |
themes/twentysixteen/comments.php | 2 +- |
13 |
themes/twentysixteen/functions.php | 37 ++++++++++++++++++++---------- |
14 |
themes/twentysixteen/inc/template-tags.php | 4 ++-- |
15 |
themes/twentysixteen/index.php | 2 +- |
16 |
themes/twentysixteen/readme.txt | 13 +++++++---- |
17 |
themes/twentysixteen/rtl.css | 4 ++++ |
18 |
themes/twentysixteen/style.css | 11 ++++++++- |
19 |
7 files changed, 52 insertions(+), 21 deletions(-) |
20 |
|
21 |
diff --git a/themes/twentysixteen/comments.php b/themes/twentysixteen/comments.php |
22 |
index 5352c91..7ff5b32 100644 |
23 |
--- a/themes/twentysixteen/comments.php |
24 |
+++ b/themes/twentysixteen/comments.php |
25 |
@@ -26,7 +26,7 @@ if ( post_password_required() ) { |
26 |
<h2 class="comments-title"> |
27 |
<?php |
28 |
$comments_number = get_comments_number(); |
29 |
- if ( 1 === $comments_number ) { |
30 |
+ if ( '1' === $comments_number ) { |
31 |
/* translators: %s: post title */ |
32 |
printf( _x( 'One thought on “%s”', 'comments title', 'twentysixteen' ), get_the_title() ); |
33 |
} else { |
34 |
|
35 |
diff --git a/themes/twentysixteen/functions.php b/themes/twentysixteen/functions.php |
36 |
index 3626af9..d6e58e1 100644 |
37 |
--- a/themes/twentysixteen/functions.php |
38 |
+++ b/themes/twentysixteen/functions.php |
39 |
@@ -78,7 +78,7 @@ function twentysixteen_setup() { |
40 |
/* |
41 |
* Enable support for Post Thumbnails on posts and pages. |
42 |
* |
43 |
- * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails |
44 |
+ * @link https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails |
45 |
*/ |
46 |
add_theme_support( 'post-thumbnails' ); |
47 |
set_post_thumbnail_size( 1200, 9999 ); |
48 |
@@ -371,13 +371,20 @@ require get_template_directory() . '/inc/customizer.php'; |
49 |
function twentysixteen_content_image_sizes_attr( $sizes, $size ) { |
50 |
$width = $size[0]; |
51 |
|
52 |
- 840 <= $width && $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px'; |
53 |
+ if ( 840 <= $width ) { |
54 |
+ $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px'; |
55 |
+ } |
56 |
|
57 |
if ( 'page' === get_post_type() ) { |
58 |
- 840 > $width && $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px'; |
59 |
+ if ( 840 > $width ) { |
60 |
+ $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px'; |
61 |
+ } |
62 |
} else { |
63 |
- 840 > $width && 600 <= $width && $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px'; |
64 |
- 600 > $width && $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px'; |
65 |
+ if ( 840 > $width && 600 <= $width ) { |
66 |
+ $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px'; |
67 |
+ } elseif ( 600 > $width ) { |
68 |
+ $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px'; |
69 |
+ } |
70 |
} |
71 |
|
72 |
return $sizes; |
73 |
@@ -393,29 +400,35 @@ add_filter( 'wp_calculate_image_sizes', 'twentysixteen_content_image_sizes_attr' |
74 |
* @param array $attr Attributes for the image markup. |
75 |
* @param int $attachment Image attachment ID. |
76 |
* @param array $size Registered image size or flat array of height and width dimensions. |
77 |
- * @return string A source size value for use in a post thumbnail 'sizes' attribute. |
78 |
+ * @return array The filtered attributes for the image markup. |
79 |
*/ |
80 |
function twentysixteen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) { |
81 |
if ( 'post-thumbnail' === $size ) { |
82 |
- is_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 60vw, (max-width: 1362px) 62vw, 840px'; |
83 |
- ! is_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 88vw, 1200px'; |
84 |
+ if ( is_active_sidebar( 'sidebar-1' ) ) { |
85 |
+ $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 60vw, (max-width: 1362px) 62vw, 840px'; |
86 |
+ } else { |
87 |
+ $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 88vw, 1200px'; |
88 |
+ } |
89 |
} |
90 |
return $attr; |
91 |
} |
92 |
add_filter( 'wp_get_attachment_image_attributes', 'twentysixteen_post_thumbnail_sizes_attr', 10 , 3 ); |
93 |
|
94 |
/** |
95 |
- * Modifies tag cloud widget arguments to have all tags in the widget same font size. |
96 |
+ * Modifies tag cloud widget arguments to display all tags in the same font size |
97 |
+ * and use list format for better accessibility. |
98 |
* |
99 |
* @since Twenty Sixteen 1.1 |
100 |
* |
101 |
* @param array $args Arguments for tag cloud widget. |
102 |
- * @return array A new modified arguments. |
103 |
+ * @return array The filtered arguments for tag cloud widget. |
104 |
*/ |
105 |
function twentysixteen_widget_tag_cloud_args( $args ) { |
106 |
- $args['largest'] = 1; |
107 |
+ $args['largest'] = 1; |
108 |
$args['smallest'] = 1; |
109 |
- $args['unit'] = 'em'; |
110 |
+ $args['unit'] = 'em'; |
111 |
+ $args['format'] = 'list'; |
112 |
+ |
113 |
return $args; |
114 |
} |
115 |
add_filter( 'widget_tag_cloud_args', 'twentysixteen_widget_tag_cloud_args' ); |
116 |
|
117 |
diff --git a/themes/twentysixteen/inc/template-tags.php b/themes/twentysixteen/inc/template-tags.php |
118 |
index eb87203..9b8f1f3 100644 |
119 |
--- a/themes/twentysixteen/inc/template-tags.php |
120 |
+++ b/themes/twentysixteen/inc/template-tags.php |
121 |
@@ -101,7 +101,7 @@ function twentysixteen_entry_taxonomies() { |
122 |
} |
123 |
|
124 |
$tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) ); |
125 |
- if ( $tags_list ) { |
126 |
+ if ( $tags_list && ! is_wp_error( $tags_list ) ) { |
127 |
printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', |
128 |
_x( 'Tags', 'Used before tag names.', 'twentysixteen' ), |
129 |
$tags_list |
130 |
@@ -213,7 +213,7 @@ function twentysixteen_categorized_blog() { |
131 |
set_transient( 'twentysixteen_categories', $all_the_cool_cats ); |
132 |
} |
133 |
|
134 |
- if ( $all_the_cool_cats > 1 ) { |
135 |
+ if ( $all_the_cool_cats > 1 || is_preview() ) { |
136 |
// This blog has more than 1 category so twentysixteen_categorized_blog should return true. |
137 |
return true; |
138 |
} else { |
139 |
|
140 |
diff --git a/themes/twentysixteen/index.php b/themes/twentysixteen/index.php |
141 |
index 5e3f290..3f621ab 100644 |
142 |
--- a/themes/twentysixteen/index.php |
143 |
+++ b/themes/twentysixteen/index.php |
144 |
@@ -7,7 +7,7 @@ |
145 |
* It is used to display a page when nothing more specific matches a query. |
146 |
* E.g., it puts together the home page when no home.php file exists. |
147 |
* |
148 |
- * @link http://codex.wordpress.org/Template_Hierarchy |
149 |
+ * @link https://codex.wordpress.org/Template_Hierarchy |
150 |
* |
151 |
* @package WordPress |
152 |
* @subpackage Twenty_Sixteen |
153 |
|
154 |
diff --git a/themes/twentysixteen/readme.txt b/themes/twentysixteen/readme.txt |
155 |
index d1c1311..95e0559 100644 |
156 |
--- a/themes/twentysixteen/readme.txt |
157 |
+++ b/themes/twentysixteen/readme.txt |
158 |
@@ -1,8 +1,8 @@ |
159 |
=== Twenty Sixteen === |
160 |
Contributors: the WordPress team |
161 |
Requires at least: WordPress 4.4 |
162 |
-Tested up to: WordPress 4.5 |
163 |
-Version: 1.3 |
164 |
+Tested up to: WordPress 5.0-trunk |
165 |
+Version: 1.4 |
166 |
License: GPLv2 or later |
167 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
168 |
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 |
169 |
@@ -29,7 +29,7 @@ For more information about Twenty Sixteen please go to https://codex.wordpress.o |
170 |
|
171 |
== Copyright == |
172 |
|
173 |
-Twenty Sixteen WordPress Theme, Copyright 2014-2015 WordPress.org |
174 |
+Twenty Sixteen WordPress Theme, Copyright 2014-2017 WordPress.org |
175 |
Twenty Sixteen is distributed under the terms of the GNU GPL |
176 |
|
177 |
This program is free software: you can redistribute it and/or modify |
178 |
@@ -48,7 +48,7 @@ HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas |
179 |
Licenses: MIT/GPL2 |
180 |
Source: https://github.com/aFarkas/html5shiv |
181 |
|
182 |
-Genericons icon font, Copyright 2013-2015 Automattic.com |
183 |
+Genericons icon font, Copyright 2013-2017 Automattic.com |
184 |
License: GNU GPL, Version 2 (or later) |
185 |
Source: http://www.genericons.com |
186 |
|
187 |
@@ -56,6 +56,11 @@ Image used in screenshot.png: A photo by Austin Schmid (https://unsplash.com/sch |
188 |
|
189 |
== Changelog == |
190 |
|
191 |
+= 1.4 = |
192 |
+* Released: November 14, 2017 |
193 |
+ |
194 |
+https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.4 |
195 |
+ |
196 |
= 1.3 = |
197 |
* Released: August 16, 2016 |
198 |
|
199 |
|
200 |
diff --git a/themes/twentysixteen/rtl.css b/themes/twentysixteen/rtl.css |
201 |
index 5456c70..f88041a 100644 |
202 |
--- a/themes/twentysixteen/rtl.css |
203 |
+++ b/themes/twentysixteen/rtl.css |
204 |
@@ -315,6 +315,10 @@ input[type="search"].search-field { |
205 |
margin-left: 0.1875em; |
206 |
} |
207 |
|
208 |
+.tagcloud ul { |
209 |
+ margin-right: 0; |
210 |
+} |
211 |
+ |
212 |
|
213 |
/** |
214 |
* 8.0 - Content |
215 |
|
216 |
diff --git a/themes/twentysixteen/style.css b/themes/twentysixteen/style.css |
217 |
index 7dcd14e..ed22828 100644 |
218 |
--- a/themes/twentysixteen/style.css |
219 |
+++ b/themes/twentysixteen/style.css |
220 |
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentysixteen/ |
221 |
Author: the WordPress team |
222 |
Author URI: https://wordpress.org/ |
223 |
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. |
224 |
-Version: 1.3 |
225 |
+Version: 1.4 |
226 |
License: GNU General Public License v2 or later |
227 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
228 |
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 |
229 |
@@ -1514,6 +1514,15 @@ blockquote:after, |
230 |
padding: 0.5625em 0.4375em 0.5em; |
231 |
} |
232 |
|
233 |
+.tagcloud ul { |
234 |
+ list-style-type: none; |
235 |
+ margin-left: 0; |
236 |
+} |
237 |
+ |
238 |
+.tagcloud ul li { |
239 |
+ display: inline-block; |
240 |
+} |
241 |
+ |
242 |
.tagcloud a:hover, |
243 |
.tagcloud a:focus { |
244 |
border-color: #007acc; |