1 |
commit: 5a5a2ac939284acf832579200da9003c48e83597 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 4 00:40:30 2017 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 4 00:40:30 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/blogs-gentoo.git/commit/?id=5a5a2ac9 |
7 |
|
8 |
Update theme twentyfifteen to 1.7 |
9 |
|
10 |
themes/twentyfifteen/functions.php | 38 ++++++++++++++++++++++++++++++++++++++ |
11 |
themes/twentyfifteen/readme.txt | 9 +++++++-- |
12 |
themes/twentyfifteen/style.css | 2 +- |
13 |
3 files changed, 46 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/themes/twentyfifteen/functions.php b/themes/twentyfifteen/functions.php |
16 |
index 056a361..8ae7e1d 100644 |
17 |
--- a/themes/twentyfifteen/functions.php |
18 |
+++ b/themes/twentyfifteen/functions.php |
19 |
@@ -118,6 +118,19 @@ function twentyfifteen_setup() { |
20 |
$default_color = trim( $color_scheme[0], '#' ); |
21 |
|
22 |
// Setup the WordPress core custom background feature. |
23 |
+ |
24 |
+ /** |
25 |
+ * Filter Twenty Fifteen custom-header support arguments. |
26 |
+ * |
27 |
+ * @since Twenty Fifteen 1.0 |
28 |
+ * |
29 |
+ * @param array $args { |
30 |
+ * An array of custom-header support arguments. |
31 |
+ * |
32 |
+ * @type string $default-color Default color of the header. |
33 |
+ * @type string $default-attachment Default attachment of the header. |
34 |
+ * } |
35 |
+ */ |
36 |
add_theme_support( 'custom-background', apply_filters( 'twentyfifteen_custom_background_args', array( |
37 |
'default-color' => $default_color, |
38 |
'default-attachment' => 'fixed', |
39 |
@@ -273,6 +286,31 @@ function twentyfifteen_scripts() { |
40 |
add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' ); |
41 |
|
42 |
/** |
43 |
+ * Add preconnect for Google Fonts. |
44 |
+ * |
45 |
+ * @since Twenty Fifteen 1.7 |
46 |
+ * |
47 |
+ * @param array $urls URLs to print for resource hints. |
48 |
+ * @param string $relation_type The relation type the URLs are printed. |
49 |
+ * @return array URLs to print for resource hints. |
50 |
+ */ |
51 |
+function twentyfifteen_resource_hints( $urls, $relation_type ) { |
52 |
+ if ( wp_style_is( 'twentyfifteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) { |
53 |
+ if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { |
54 |
+ $urls[] = array( |
55 |
+ 'href' => 'https://fonts.gstatic.com', |
56 |
+ 'crossorigin', |
57 |
+ ); |
58 |
+ } else { |
59 |
+ $urls[] = 'https://fonts.gstatic.com'; |
60 |
+ } |
61 |
+ } |
62 |
+ |
63 |
+ return $urls; |
64 |
+} |
65 |
+add_filter( 'wp_resource_hints', 'twentyfifteen_resource_hints', 10, 2 ); |
66 |
+ |
67 |
+/** |
68 |
* Add featured image as background image to post navigation elements. |
69 |
* |
70 |
* @since Twenty Fifteen 1.0 |
71 |
|
72 |
diff --git a/themes/twentyfifteen/readme.txt b/themes/twentyfifteen/readme.txt |
73 |
index 36ef940..8ca8280 100644 |
74 |
--- a/themes/twentyfifteen/readme.txt |
75 |
+++ b/themes/twentyfifteen/readme.txt |
76 |
@@ -1,8 +1,8 @@ |
77 |
=== Twenty Fifteen === |
78 |
Contributors: the WordPress team |
79 |
Requires at least: WordPress 4.1 |
80 |
-Tested up to: WordPress 4.7-trunk |
81 |
-Version: 1.6 |
82 |
+Tested up to: WordPress 4.8-trunk |
83 |
+Version: 1.7 |
84 |
License: GPLv2 or later |
85 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
86 |
Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready |
87 |
@@ -55,6 +55,11 @@ Source: http://www.genericons.com |
88 |
|
89 |
== Changelog == |
90 |
|
91 |
+= 1.7 = |
92 |
+* Released: December 6, 2016 |
93 |
+ |
94 |
+https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_1.7 |
95 |
+ |
96 |
= 1.6 = |
97 |
* Released: August 15, 2016 |
98 |
|
99 |
|
100 |
diff --git a/themes/twentyfifteen/style.css b/themes/twentyfifteen/style.css |
101 |
index 56e46b6..13048ba 100644 |
102 |
--- a/themes/twentyfifteen/style.css |
103 |
+++ b/themes/twentyfifteen/style.css |
104 |
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyfifteen/ |
105 |
Author: the WordPress team |
106 |
Author URI: https://wordpress.org/ |
107 |
Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer. |
108 |
-Version: 1.6 |
109 |
+Version: 1.7 |
110 |
License: GNU General Public License v2 or later |
111 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
112 |
Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready |