Twenty Twenty-One: Use the theme version when enqueueing theme assets.

This avoids having to interact with the filesystem and ensures browser and proxy caches are only cleared when the file is actually updated.

Props peterwilsoncc, ryelle, aristath, SergeyBiryukov.
Fixes #53502.
Built from https://develop.svn.wordpress.org/trunk@51236


git-svn-id: http://core.svn.wordpress.org/trunk@50845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2021-06-25 13:37:57 +00:00
parent dc710243a3
commit fe473ccdee
3 changed files with 3 additions and 3 deletions

View File

@ -113,7 +113,7 @@ class Twenty_Twenty_One_Custom_Colors {
'twenty-twenty-one-custom-color-overrides',
get_theme_file_uri( 'assets/css/custom-color-overrides.css' ),
array(),
(string) filemtime( get_theme_file_path( 'assets/css/custom-color-overrides.css' ) )
wp_get_theme()->get( 'Version' )
);
$background_color = get_theme_mod( 'background_color', 'D1E4DD' );

View File

@ -52,7 +52,7 @@ class Twenty_Twenty_One_Customize_Color_Control extends WP_Customize_Color_Contr
'twentytwentyone-control-color',
get_theme_file_uri( 'assets/js/palette-colorpicker.js' ),
array( 'customize-controls', 'jquery', 'customize-base', 'wp-color-picker' ),
(string) filemtime( get_theme_file_path( 'assets/js/palette-colorpicker.js' ) ),
wp_get_theme()->get( 'Version' ),
false
);
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-beta3-51235';
$wp_version = '5.8-beta3-51236';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.