mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
dc710243a3
commit
fe473ccdee
@ -113,7 +113,7 @@ class Twenty_Twenty_One_Custom_Colors {
|
|||||||
'twenty-twenty-one-custom-color-overrides',
|
'twenty-twenty-one-custom-color-overrides',
|
||||||
get_theme_file_uri( 'assets/css/custom-color-overrides.css' ),
|
get_theme_file_uri( 'assets/css/custom-color-overrides.css' ),
|
||||||
array(),
|
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' );
|
$background_color = get_theme_mod( 'background_color', 'D1E4DD' );
|
||||||
|
@ -52,7 +52,7 @@ class Twenty_Twenty_One_Customize_Color_Control extends WP_Customize_Color_Contr
|
|||||||
'twentytwentyone-control-color',
|
'twentytwentyone-control-color',
|
||||||
get_theme_file_uri( 'assets/js/palette-colorpicker.js' ),
|
get_theme_file_uri( 'assets/js/palette-colorpicker.js' ),
|
||||||
array( 'customize-controls', 'jquery', 'customize-base', 'wp-color-picker' ),
|
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
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user