mirror of
git://develop.git.wordpress.org/
synced 2025-03-20 20:09:53 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@51236 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1de9c692f3
commit
4c302c4295
@ -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' );
|
||||
|
@ -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
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user