Changeset 53286
- Timestamp:
- 04/26/2022 03:25:01 PM (3 years ago)
- Location:
- trunk/src/wp-content/themes/twentytwentytwo
- Files:
-
- 29 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentytwo/functions.php
r52392 r53286 55 55 ); 56 56 57 // Add styles inline.58 wp_add_inline_style( 'twentytwentytwo-style', twentytwentytwo_get_font_face_styles() );59 60 57 // Enqueue theme stylesheet. 61 58 wp_enqueue_style( 'twentytwentytwo-style' ); … … 67 64 add_action( 'wp_enqueue_scripts', 'twentytwentytwo_styles' ); 68 65 69 if ( ! function_exists( 'twentytwentytwo_editor_styles' ) ) :70 71 /**72 * Enqueue editor styles.73 *74 * @since Twenty Twenty-Two 1.075 *76 * @return void77 */78 function twentytwentytwo_editor_styles() {79 80 // Add styles inline.81 wp_add_inline_style( 'wp-block-library', twentytwentytwo_get_font_face_styles() );82 83 }84 85 endif;86 87 add_action( 'admin_init', 'twentytwentytwo_editor_styles' );88 89 90 if ( ! function_exists( 'twentytwentytwo_get_font_face_styles' ) ) :91 92 /**93 * Get font face styles.94 * Called by functions twentytwentytwo_styles() and twentytwentytwo_editor_styles() above.95 *96 * @since Twenty Twenty-Two 1.097 *98 * @return string99 */100 function twentytwentytwo_get_font_face_styles() {101 102 return "103 @font-face{104 font-family: 'Source Serif Pro';105 font-weight: 200 900;106 font-style: normal;107 font-stretch: normal;108 font-display: swap;109 src: url('" . get_theme_file_uri( 'assets/fonts/SourceSerif4Variable-Roman.ttf.woff2' ) . "') format('woff2');110 }111 112 @font-face{113 font-family: 'Source Serif Pro';114 font-weight: 200 900;115 font-style: italic;116 font-stretch: normal;117 font-display: swap;118 src: url('" . get_theme_file_uri( 'assets/fonts/SourceSerif4Variable-Italic.ttf.woff2' ) . "') format('woff2');119 }120 ";121 122 }123 124 endif;125 126 if ( ! function_exists( 'twentytwentytwo_preload_webfonts' ) ) :127 128 /**129 * Preloads the main web font to improve performance.130 *131 * Only the main web font (font-style: normal) is preloaded here since that font is always relevant (it is used132 * on every heading, for example). The other font is only needed if there is any applicable content in italic style,133 * and therefore preloading it would in most cases regress performance when that font would otherwise not be loaded134 * at all.135 *136 * @since Twenty Twenty-Two 1.0137 *138 * @return void139 */140 function twentytwentytwo_preload_webfonts() {141 ?>142 <link rel="preload" href="<?php echo esc_url( get_theme_file_uri( 'assets/fonts/SourceSerif4Variable-Roman.ttf.woff2' ) ); ?>" as="font" type="font/woff2" crossorigin>143 <?php144 }145 146 endif;147 148 add_action( 'wp_head', 'twentytwentytwo_preload_webfonts' );149 150 66 // Add block patterns 151 67 require get_template_directory() . '/inc/block-patterns.php'; -
trunk/src/wp-content/themes/twentytwentytwo/parts/header.html
r52375 r53286 4 4 <div class="wp-block-group"><!-- wp:site-logo {"width":64} /--> 5 5 6 <!-- wp:site-title {"style":{"typography":{"fontStyle":"italic","fontWeight":"400"}}}/--></div>6 <!-- wp:site-title /--></div> 7 7 <!-- /wp:group --> 8 8 -
trunk/src/wp-content/themes/twentytwentytwo/readme.txt
r52781 r53286 2 2 Contributors: wordpressdotorg 3 3 Requires at least: 5.9 4 Tested up to: 5.94 Tested up to: 6.0 5 5 Requires PHP: 5.6 6 Stable tag: 1. 16 Stable tag: 1.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 17 17 18 18 == Changelog == 19 20 = 1.2 = 21 * Released: May 24, 2022 22 23 https://wordpress.org/support/article/twenty-twenty-two-changelog#Version_1.2 19 24 20 25 = 1.1 = … … 44 49 45 50 This theme bundles the following third-party resources: 51 52 DM Sans Font 53 Copyright 2014-2017 Indian Type Foundry (info@indiantypefoundry.com) 54 Copyright 2019 Google LLC 55 Copyright 2014-2018 Adobe (http://www.adobe.com/) 56 License: SIL Open Font License, 1.1, https://opensource.org/licenses/OFL-1.1 57 Source: https://github.com/googlefonts/dm-fonts 58 59 IBM Plex Font 60 Copyright 2017 IBM Corp. 61 License: SIL Open Font License, 1.1, https://opensource.org/licenses/OFL-1.1 62 Source: https://github.com/IBM/plex 63 64 Inter Font 65 Copyright (c) 2016-2020 The Inter Project Authors. 66 License: SIL Open Font License, 1.1, https://opensource.org/licenses/OFL-1.1 67 Source: https://github.com/rsms/inter 46 68 47 69 Source Serif Font -
trunk/src/wp-content/themes/twentytwentytwo/style.css
r52781 r53286 6 6 Description: Built on a solidly designed foundation, Twenty Twenty-Two embraces the idea that everyone deserves a truly unique website. The theme’s subtle styles are inspired by the diversity and versatility of birds: its typography is lightweight yet strong, its color palette is drawn from nature, and its layout elements sit gently on the page. The true richness of Twenty Twenty-Two lies in its opportunity for customization. The theme is built to take advantage of the Full Site Editing features introduced in WordPress 5.9, which means that colors, typography, and the layout of every single page on your site can be customized to suit your vision. It also includes dozens of block patterns, opening the door to a wide range of professionally designed layouts in just a few clicks. Whether you’re building a single-page website, a blog, a business website, or a portfolio, Twenty Twenty-Two will help you create a site that is uniquely yours. 7 7 Requires at least: 5.9 8 Tested up to: 5.98 Tested up to: 6.0 9 9 Requires PHP: 5.6 10 Version: 1. 110 Version: 1.2 11 11 License: GNU General Public License v2 or later 12 12 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
trunk/src/wp-content/themes/twentytwentytwo/theme.json
r52430 r53286 179 179 "fontFamily": "\"Source Serif Pro\", serif", 180 180 "name": "Source Serif Pro", 181 "slug": "source-serif-pro" 181 "slug": "source-serif-pro", 182 "fontFace": [ 183 { 184 "fontFamily": "Source Serif Pro", 185 "fontWeight": "200 900", 186 "fontStyle": "normal", 187 "fontStretch": "normal", 188 "src": [ "file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Roman.ttf.woff2" ] 189 }, 190 { 191 "fontFamily": "Source Serif Pro", 192 "fontWeight": "200 900", 193 "fontStyle": "italic", 194 "fontStretch": "normal", 195 "src": [ "file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Italic.ttf.woff2" ] 196 } 197 ] 182 198 } 183 199 ], … … 258 274 "lineHeight": "var(--wp--custom--typography--line-height--normal)", 259 275 "fontSize": "var(--wp--preset--font-size--medium)", 276 "fontStyle": "italic", 260 277 "fontWeight": "normal" 261 278 }
Note: See TracChangeset
for help on using the changeset viewer.