diff --git a/src/wp-content/themes/twentyfourteen/fonts/font-lato.css b/src/wp-content/themes/twentyfourteen/fonts/font-lato.css new file mode 100644 index 0000000000..5aa20d742a --- /dev/null +++ b/src/wp-content/themes/twentyfourteen/fonts/font-lato.css @@ -0,0 +1,174 @@ +/* +Lato +Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". +Licensed under the SIL Open Font License, Version 1.1. +https://opensource.org/licenses/OFL-1.1 +*/ + +/* lato-latin-ext-300-normal */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-display: fallback; + font-weight: 300; + src: + url('./lato/lato-latin-ext-300-normal.woff2?ver=23') format('woff2'), + url('./lato/lato-all-300-normal.woff?ver=23') format('woff'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* lato-latin-300-normal */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-display: fallback; + font-weight: 300; + src: + url('./lato/lato-latin-300-normal.woff2?ver=23') format('woff2'), + url('./lato/lato-all-300-normal.woff?ver=23') format('woff'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* lato-latin-ext-300-italic */ +@font-face { + font-family: 'Lato'; + font-style: italic; + font-display: fallback; + font-weight: 300; + src: + url('./lato/lato-latin-ext-300-italic.woff2?ver=23') format('woff2'), + url('./lato/lato-all-300-italic.woff?ver=23') format('woff'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* lato-latin-300-italic */ +@font-face { + font-family: 'Lato'; + font-style: italic; + font-display: fallback; + font-weight: 300; + src: + url('./lato/lato-latin-300-italic.woff2?ver=23') format('woff2'), + url('./lato/lato-all-300-italic.woff?ver=23') format('woff'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* lato-latin-ext-400-normal */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-display: fallback; + font-weight: 400; + src: + url('./lato/lato-latin-ext-400-normal.woff2?ver=23') format('woff2'), + url('./lato/lato-all-400-normal.woff?ver=23') format('woff'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* lato-latin-400-normal */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-display: fallback; + font-weight: 400; + src: + url('./lato/lato-latin-400-normal.woff2?ver=23') format('woff2'), + url('./lato/lato-all-400-normal.woff?ver=23') format('woff'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* lato-latin-ext-400-italic */ +@font-face { + font-family: 'Lato'; + font-style: italic; + font-display: fallback; + font-weight: 400; + src: + url('./lato/lato-latin-ext-400-italic.woff2?ver=23') format('woff2'), + url('./lato/lato-all-400-italic.woff?ver=23') format('woff'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* lato-latin-400-italic */ +@font-face { + font-family: 'Lato'; + font-style: italic; + font-display: fallback; + font-weight: 400; + src: + url('./lato/lato-latin-400-italic.woff2?ver=23') format('woff2'), + url('./lato/lato-all-400-italic.woff?ver=23') format('woff'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* lato-latin-ext-700-normal */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-display: fallback; + font-weight: 700; + src: + url('./lato/lato-latin-ext-700-normal.woff2?ver=23') format('woff2'), + url('./lato/lato-all-700-normal.woff?ver=23') format('woff'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* lato-latin-700-normal */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-display: fallback; + font-weight: 700; + src: + url('./lato/lato-latin-700-normal.woff2?ver=23') format('woff2'), + url('./lato/lato-all-700-normal.woff?ver=23') format('woff'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* lato-latin-ext-700-italic */ +@font-face { + font-family: 'Lato'; + font-style: italic; + font-display: fallback; + font-weight: 700; + src: + url('./lato/lato-latin-ext-700-italic.woff2?ver=23') format('woff2'), + url('./lato/lato-all-700-italic.woff?ver=23') format('woff'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* lato-latin-700-italic */ +@font-face { + font-family: 'Lato'; + font-style: italic; + font-display: fallback; + font-weight: 700; + src: + url('./lato/lato-latin-700-italic.woff2?ver=23') format('woff2'), + url('./lato/lato-all-700-italic.woff?ver=23') format('woff'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* lato-latin-ext-900-normal */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-display: fallback; + font-weight: 900; + src: + url('./lato/lato-latin-ext-900-normal.woff2?ver=23') format('woff2'), + url('./lato/lato-all-900-normal.woff?ver=23') format('woff'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* lato-latin-900-normal */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-display: fallback; + font-weight: 900; + src: + url('./lato/lato-latin-900-normal.woff2?ver=23') format('woff2'), + url('./lato/lato-all-900-normal.woff?ver=23') format('woff'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/LICENSE.txt b/src/wp-content/themes/twentyfourteen/fonts/lato/LICENSE.txt new file mode 100644 index 0000000000..d0b1be0081 --- /dev/null +++ b/src/wp-content/themes/twentyfourteen/fonts/lato/LICENSE.txt @@ -0,0 +1,93 @@ +Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-300-italic.woff b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-300-italic.woff new file mode 100644 index 0000000000..3bf3c69cb4 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-300-italic.woff differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-300-normal.woff b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-300-normal.woff new file mode 100644 index 0000000000..bfbb9356f8 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-300-normal.woff differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-400-italic.woff b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-400-italic.woff new file mode 100644 index 0000000000..4761cdd43f Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-400-italic.woff differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-400-normal.woff b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-400-normal.woff new file mode 100644 index 0000000000..eac7dd1ca4 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-400-normal.woff differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-700-italic.woff b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-700-italic.woff new file mode 100644 index 0000000000..79d5a0aeb1 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-700-italic.woff differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-700-normal.woff b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-700-normal.woff new file mode 100644 index 0000000000..ac9382a811 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-700-normal.woff differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-900-normal.woff b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-900-normal.woff new file mode 100644 index 0000000000..64aeddd8d5 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-all-900-normal.woff differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-300-italic.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-300-italic.woff2 new file mode 100644 index 0000000000..394b5cf643 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-300-italic.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-300-normal.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-300-normal.woff2 new file mode 100644 index 0000000000..aad98a3390 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-300-normal.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-400-italic.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-400-italic.woff2 new file mode 100644 index 0000000000..851630ff85 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-400-italic.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-400-normal.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-400-normal.woff2 new file mode 100644 index 0000000000..ff60934dd0 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-400-normal.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-700-italic.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-700-italic.woff2 new file mode 100644 index 0000000000..38df58bff4 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-700-italic.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-700-normal.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-700-normal.woff2 new file mode 100644 index 0000000000..11de83feaf Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-700-normal.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-900-normal.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-900-normal.woff2 new file mode 100644 index 0000000000..72a9bc3041 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-900-normal.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-300-italic.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-300-italic.woff2 new file mode 100644 index 0000000000..f17999bd2f Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-300-italic.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-300-normal.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-300-normal.woff2 new file mode 100644 index 0000000000..486d3ecf0a Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-300-normal.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-400-italic.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-400-italic.woff2 new file mode 100644 index 0000000000..15be816ab2 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-400-italic.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-400-normal.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-400-normal.woff2 new file mode 100644 index 0000000000..edb9fa6f49 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-400-normal.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-700-italic.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-700-italic.woff2 new file mode 100644 index 0000000000..f59e721c38 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-700-italic.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-700-normal.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-700-normal.woff2 new file mode 100644 index 0000000000..2c8aaa866e Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-700-normal.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-900-normal.woff2 b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-900-normal.woff2 new file mode 100644 index 0000000000..6833c7f3d5 Binary files /dev/null and b/src/wp-content/themes/twentyfourteen/fonts/lato/lato-latin-ext-900-normal.woff2 differ diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 100a7f88db..44280fdc66 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -67,8 +67,16 @@ if ( ! function_exists( 'twentyfourteen_setup' ) ) : */ load_theme_textdomain( 'twentyfourteen' ); - // This theme styles the visual editor to resemble the theme style. - add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) ); + /* + * This theme styles the visual editor to resemble the theme style. + * When fonts are self-hosted, the theme directory needs to be removed first. + */ + $font_stylesheet = str_replace( + array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ), + '', + twentyfourteen_font_url() + ); + add_editor_style( array( 'css/editor-style.css', $font_stylesheet, 'genericons/genericons.css' ) ); // Load regular editor styles into the new block-based editor. add_theme_support( 'editor-styles' ); @@ -293,30 +301,28 @@ function twentyfourteen_widgets_init() { } add_action( 'widgets_init', 'twentyfourteen_widgets_init' ); -/** - * Register Lato Google font for Twenty Fourteen. - * - * @since Twenty Fourteen 1.0 - * - * @return string - */ -function twentyfourteen_font_url() { - $font_url = ''; - /* - * translators: If there are characters in your language that are not supported - * by Lato, translate this to 'off'. Do not translate into your own language. +if ( ! function_exists( 'twentyfourteen_font_url' ) ) : + /** + * Register Lato font for Twenty Fourteen. + * + * @since Twenty Fourteen 1.0 + * @since Twenty Fourteen 3.6 Replaced Google URL with self-hosted fonts. + * + * @return string */ - if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) { - $query_args = array( - 'family' => urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), - 'subset' => urlencode( 'latin,latin-ext' ), - 'display' => urlencode( 'fallback' ), - ); - $font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); - } + function twentyfourteen_font_url() { + $font_url = ''; + /* + * translators: If there are characters in your language that are not supported + * by Lato, translate this to 'off'. Do not translate into your own language. + */ + if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) { + $font_url = get_template_directory_uri() . '/fonts/font-lato.css'; + } - return $font_url; -} + return $font_url; + } +endif; /** * Enqueue scripts and styles for the front end. @@ -325,7 +331,8 @@ function twentyfourteen_font_url() { */ function twentyfourteen_scripts() { // Add Lato font, used in the main stylesheet. - wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null ); + $font_version = ( 0 === strpos( (string) twentyfourteen_font_url(), get_template_directory_uri() . '/' ) ) ? '20230328' : null; + wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), $font_version ); // Add Genericons font, used in the main stylesheet. wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.0.3' ); @@ -369,12 +376,13 @@ function twentyfourteen_scripts() { add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' ); /** - * Enqueue Google fonts style to admin screen for custom header display. + * Enqueue font stylesheet to admin screen for custom header display. * * @since Twenty Fourteen 1.0 */ function twentyfourteen_admin_fonts() { - wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null ); + $font_version = ( 0 === strpos( (string) twentyfourteen_font_url(), get_template_directory_uri() . '/' ) ) ? '20230328' : null; + wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), $font_version ); } add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen_admin_fonts' ); @@ -382,6 +390,7 @@ add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen * Add preconnect for Google Fonts. * * @since Twenty Fourteen 1.9 + * @deprecated Twenty Fourteen 3.6 Disabled filter because, by default, fonts are self-hosted. * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed. @@ -401,7 +410,7 @@ function twentyfourteen_resource_hints( $urls, $relation_type ) { return $urls; } -add_filter( 'wp_resource_hints', 'twentyfourteen_resource_hints', 10, 2 ); +// add_filter( 'wp_resource_hints', 'twentyfourteen_resource_hints', 10, 2 ); /** * Enqueue styles for the block-based editor. @@ -412,7 +421,8 @@ function twentyfourteen_block_editor_styles() { // Block styles. wp_enqueue_style( 'twentyfourteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20210216' ); // Add custom fonts. - wp_enqueue_style( 'twentyfourteen-fonts', twentyfourteen_font_url(), array(), null ); + $font_version = ( 0 === strpos( (string) twentyfourteen_font_url(), get_template_directory_uri() . '/' ) ) ? '20230328' : null; + wp_enqueue_style( 'twentyfourteen-fonts', twentyfourteen_font_url(), array(), $font_version ); } add_action( 'enqueue_block_editor_assets', 'twentyfourteen_block_editor_styles' ); diff --git a/src/wp-content/themes/twentyfourteen/readme.txt b/src/wp-content/themes/twentyfourteen/readme.txt index 7e674cf75f..99325dfb16 100644 --- a/src/wp-content/themes/twentyfourteen/readme.txt +++ b/src/wp-content/themes/twentyfourteen/readme.txt @@ -48,6 +48,11 @@ Genericons icon font, Copyright 2013-2017 Automattic.com License: GNU GPL, Version 2 (or later) Source: http://www.genericons.com +Lato Font +Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". +License: SIL Open Font License, 1.1, https://opensource.org/licenses/OFL-1.1 +Source: https://fontsource.org/fonts/lato + Photos from Stocksnap, used in block patterns. License: CC0 Source: https://stocksnap.io/photo/fog-mountain-ZKN6UKFKEO