From 5a59a56abc91df76b4576160ebb7a87042fff96e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 15 Mar 2024 13:40:12 +0000 Subject: [PATCH] Twenty Twenty: Use the `$theme_version` variable for font stylesheet. This aims to bring more consistency with the other `wp_enqueue_style()` calls in the theme's functions. Follow-up to [57311]. Props sabernhardt. Fixes #60779. Built from https://develop.svn.wordpress.org/trunk@57842 git-svn-id: http://core.svn.wordpress.org/trunk@57343 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentytwenty/functions.php | 8 +++++--- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-content/themes/twentytwenty/functions.php b/wp-content/themes/twentytwenty/functions.php index ded96095eb..515cdb1314 100644 --- a/wp-content/themes/twentytwenty/functions.php +++ b/wp-content/themes/twentytwenty/functions.php @@ -192,7 +192,7 @@ function twentytwenty_register_styles() { wp_style_add_data( 'twentytwenty-style', 'rtl', 'replace' ); // Enqueue the CSS file for the variable font, Inter. - wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), wp_get_theme()->get( 'Version' ), 'all' ); + wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), $theme_version, 'all' ); // Add output of Customizer settings as inline style. $customizer_css = twentytwenty_get_customizer_css( 'front-end' ); @@ -425,8 +425,10 @@ add_action( 'widgets_init', 'twentytwenty_sidebar_registration' ); */ function twentytwenty_block_editor_styles() { + $theme_version = wp_get_theme()->get( 'Version' ); + // Enqueue the editor styles. - wp_enqueue_style( 'twentytwenty-block-editor-styles', get_theme_file_uri( '/assets/css/editor-style-block.css' ), array(), wp_get_theme()->get( 'Version' ), 'all' ); + wp_enqueue_style( 'twentytwenty-block-editor-styles', get_theme_file_uri( '/assets/css/editor-style-block.css' ), array(), $theme_version, 'all' ); wp_style_add_data( 'twentytwenty-block-editor-styles', 'rtl', 'replace' ); // Add inline style from the Customizer. @@ -436,7 +438,7 @@ function twentytwenty_block_editor_styles() { } // Enqueue the CSS file for the variable font, Inter. - wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), wp_get_theme()->get( 'Version' ), 'all' ); + wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), $theme_version, 'all' ); // Add inline style for non-latin fonts. $custom_css = TwentyTwenty_Non_Latin_Languages::get_non_latin_css( 'block-editor' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index f5db149896..7dcd9f8969 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-57841'; +$wp_version = '6.6-alpha-57842'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.