mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@52947 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -282,7 +282,7 @@ if ( $tab ) {
|
||||
<script id="tmpl-theme" type="text/template">
|
||||
<# if ( data.screenshot_url ) { #>
|
||||
<div class="theme-screenshot">
|
||||
<img src="{{ data.screenshot_url }}" alt="" />
|
||||
<img src="{{ data.screenshot_url }}?ver={{ data.version }}" alt="" />
|
||||
</div>
|
||||
<# } else { #>
|
||||
<div class="theme-screenshot blank"></div>
|
||||
@@ -456,7 +456,7 @@ if ( $tab ) {
|
||||
?>
|
||||
</span>
|
||||
|
||||
<img class="theme-screenshot" src="{{ data.screenshot_url }}" alt="" />
|
||||
<img class="theme-screenshot" src="{{ data.screenshot_url }}?ver={{ data.version }}" alt="" />
|
||||
|
||||
<div class="theme-details">
|
||||
<# if ( data.rating ) { #>
|
||||
|
||||
Reference in New Issue
Block a user