Themes: Add version to theme screenshot URL for better browser cache handling.
This change appends the theme version number to the URL of screenshots that appear in various place of the WordPress Admin. As a result, browsers will be able to refresh the screenshot as needed when the theme is updated. Props codente, desrosj, audrasjb, SergeyBiryukov. Fixes #53370. Built from https://develop.svn.wordpress.org/trunk@52947 git-svn-id: http://core.svn.wordpress.org/trunk@52536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -74,7 +74,7 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {
|
||||
|
||||
<# if ( data.theme.screenshot && data.theme.screenshot[0] ) { #>
|
||||
<div class="theme-screenshot">
|
||||
<img data-src="{{ data.theme.screenshot[0] }}" alt="" />
|
||||
<img data-src="{{ data.theme.screenshot[0] }}?ver={{ data.theme.version }}" alt="" />
|
||||
</div>
|
||||
<# } else { #>
|
||||
<div class="theme-screenshot blank"></div>
|
||||
|
||||
Reference in New Issue
Block a user