summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--themes/twentysixteen/comments.php2
-rw-r--r--themes/twentysixteen/functions.php37
-rw-r--r--themes/twentysixteen/inc/template-tags.php4
-rw-r--r--themes/twentysixteen/index.php2
-rw-r--r--themes/twentysixteen/readme.txt13
-rw-r--r--themes/twentysixteen/rtl.css4
-rw-r--r--themes/twentysixteen/style.css11
7 files changed, 52 insertions, 21 deletions
diff --git a/themes/twentysixteen/comments.php b/themes/twentysixteen/comments.php
index 5352c910..7ff5b32d 100644
--- a/themes/twentysixteen/comments.php
+++ b/themes/twentysixteen/comments.php
@@ -26,7 +26,7 @@ if ( post_password_required() ) {
<h2 class="comments-title">
<?php
$comments_number = get_comments_number();
- if ( 1 === $comments_number ) {
+ if ( '1' === $comments_number ) {
/* translators: %s: post title */
printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentysixteen' ), get_the_title() );
} else {
diff --git a/themes/twentysixteen/functions.php b/themes/twentysixteen/functions.php
index 3626af96..d6e58e1a 100644
--- a/themes/twentysixteen/functions.php
+++ b/themes/twentysixteen/functions.php
@@ -78,7 +78,7 @@ function twentysixteen_setup() {
/*
* Enable support for Post Thumbnails on posts and pages.
*
- * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
+ * @link https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 1200, 9999 );
@@ -371,13 +371,20 @@ require get_template_directory() . '/inc/customizer.php';
function twentysixteen_content_image_sizes_attr( $sizes, $size ) {
$width = $size[0];
- 840 <= $width && $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px';
+ if ( 840 <= $width ) {
+ $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px';
+ }
if ( 'page' === get_post_type() ) {
- 840 > $width && $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px';
+ if ( 840 > $width ) {
+ $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px';
+ }
} else {
- 840 > $width && 600 <= $width && $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px';
- 600 > $width && $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px';
+ if ( 840 > $width && 600 <= $width ) {
+ $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px';
+ } elseif ( 600 > $width ) {
+ $sizes = '(max-width: ' . $width . 'px) 85vw, ' . $width . 'px';
+ }
}
return $sizes;
@@ -393,29 +400,35 @@ add_filter( 'wp_calculate_image_sizes', 'twentysixteen_content_image_sizes_attr'
* @param array $attr Attributes for the image markup.
* @param int $attachment Image attachment ID.
* @param array $size Registered image size or flat array of height and width dimensions.
- * @return string A source size value for use in a post thumbnail 'sizes' attribute.
+ * @return array The filtered attributes for the image markup.
*/
function twentysixteen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) {
if ( 'post-thumbnail' === $size ) {
- is_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 60vw, (max-width: 1362px) 62vw, 840px';
- ! is_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 88vw, 1200px';
+ if ( is_active_sidebar( 'sidebar-1' ) ) {
+ $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 60vw, (max-width: 1362px) 62vw, 840px';
+ } else {
+ $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 88vw, 1200px';
+ }
}
return $attr;
}
add_filter( 'wp_get_attachment_image_attributes', 'twentysixteen_post_thumbnail_sizes_attr', 10 , 3 );
/**
- * Modifies tag cloud widget arguments to have all tags in the widget same font size.
+ * Modifies tag cloud widget arguments to display all tags in the same font size
+ * and use list format for better accessibility.
*
* @since Twenty Sixteen 1.1
*
* @param array $args Arguments for tag cloud widget.
- * @return array A new modified arguments.
+ * @return array The filtered arguments for tag cloud widget.
*/
function twentysixteen_widget_tag_cloud_args( $args ) {
- $args['largest'] = 1;
+ $args['largest'] = 1;
$args['smallest'] = 1;
- $args['unit'] = 'em';
+ $args['unit'] = 'em';
+ $args['format'] = 'list';
+
return $args;
}
add_filter( 'widget_tag_cloud_args', 'twentysixteen_widget_tag_cloud_args' );
diff --git a/themes/twentysixteen/inc/template-tags.php b/themes/twentysixteen/inc/template-tags.php
index eb872030..9b8f1f39 100644
--- a/themes/twentysixteen/inc/template-tags.php
+++ b/themes/twentysixteen/inc/template-tags.php
@@ -101,7 +101,7 @@ function twentysixteen_entry_taxonomies() {
}
$tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
- if ( $tags_list ) {
+ if ( $tags_list && ! is_wp_error( $tags_list ) ) {
printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
_x( 'Tags', 'Used before tag names.', 'twentysixteen' ),
$tags_list
@@ -213,7 +213,7 @@ function twentysixteen_categorized_blog() {
set_transient( 'twentysixteen_categories', $all_the_cool_cats );
}
- if ( $all_the_cool_cats > 1 ) {
+ if ( $all_the_cool_cats > 1 || is_preview() ) {
// This blog has more than 1 category so twentysixteen_categorized_blog should return true.
return true;
} else {
diff --git a/themes/twentysixteen/index.php b/themes/twentysixteen/index.php
index 5e3f2902..3f621abe 100644
--- a/themes/twentysixteen/index.php
+++ b/themes/twentysixteen/index.php
@@ -7,7 +7,7 @@
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
- * @link http://codex.wordpress.org/Template_Hierarchy
+ * @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Sixteen
diff --git a/themes/twentysixteen/readme.txt b/themes/twentysixteen/readme.txt
index d1c13119..95e05590 100644
--- a/themes/twentysixteen/readme.txt
+++ b/themes/twentysixteen/readme.txt
@@ -1,8 +1,8 @@
=== Twenty Sixteen ===
Contributors: the WordPress team
Requires at least: WordPress 4.4
-Tested up to: WordPress 4.5
-Version: 1.3
+Tested up to: WordPress 5.0-trunk
+Version: 1.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
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
@@ -29,7 +29,7 @@ For more information about Twenty Sixteen please go to https://codex.wordpress.o
== Copyright ==
-Twenty Sixteen WordPress Theme, Copyright 2014-2015 WordPress.org
+Twenty Sixteen WordPress Theme, Copyright 2014-2017 WordPress.org
Twenty Sixteen is distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify
@@ -48,7 +48,7 @@ HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas
Licenses: MIT/GPL2
Source: https://github.com/aFarkas/html5shiv
-Genericons icon font, Copyright 2013-2015 Automattic.com
+Genericons icon font, Copyright 2013-2017 Automattic.com
License: GNU GPL, Version 2 (or later)
Source: http://www.genericons.com
@@ -56,6 +56,11 @@ Image used in screenshot.png: A photo by Austin Schmid (https://unsplash.com/sch
== Changelog ==
+= 1.4 =
+* Released: November 14, 2017
+
+https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.4
+
= 1.3 =
* Released: August 16, 2016
diff --git a/themes/twentysixteen/rtl.css b/themes/twentysixteen/rtl.css
index 5456c709..f88041a2 100644
--- a/themes/twentysixteen/rtl.css
+++ b/themes/twentysixteen/rtl.css
@@ -315,6 +315,10 @@ input[type="search"].search-field {
margin-left: 0.1875em;
}
+.tagcloud ul {
+ margin-right: 0;
+}
+
/**
* 8.0 - Content
diff --git a/themes/twentysixteen/style.css b/themes/twentysixteen/style.css
index 7dcd14e1..ed228286 100644
--- a/themes/twentysixteen/style.css
+++ b/themes/twentysixteen/style.css
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentysixteen/
Author: the WordPress team
Author URI: https://wordpress.org/
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.
-Version: 1.3
+Version: 1.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
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
@@ -1514,6 +1514,15 @@ blockquote:after,
padding: 0.5625em 0.4375em 0.5em;
}
+.tagcloud ul {
+ list-style-type: none;
+ margin-left: 0;
+}
+
+.tagcloud ul li {
+ display: inline-block;
+}
+
.tagcloud a:hover,
.tagcloud a:focus {
border-color: #007acc;