From a32545f854dc9e7c415154dc019dbde167672880 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Thu, 17 Mar 2022 22:21:07 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-theme-install-list-table.php | 4 ++-- wp-admin/includes/theme.php | 2 +- wp-admin/theme-install.php | 4 ++-- wp-admin/themes.php | 6 +++--- wp-admin/update-core.php | 2 +- wp-includes/customize/class-wp-customize-theme-control.php | 2 +- wp-includes/version.php | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/wp-admin/includes/class-wp-theme-install-list-table.php b/wp-admin/includes/class-wp-theme-install-list-table.php index eb0ae02f18..17f8f8598c 100644 --- a/wp-admin/includes/class-wp-theme-install-list-table.php +++ b/wp-admin/includes/class-wp-theme-install-list-table.php @@ -359,7 +359,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { ?> - +

@@ -502,7 +502,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { ?> screenshot_url ) ) : ?> - +
<# if ( data.screenshot && data.screenshot[0] ) { #> -
+
<# } else { #>
<# } #> diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php index 1790af78e5..5aa5803199 100644 --- a/wp-admin/theme-install.php +++ b/wp-admin/theme-install.php @@ -282,7 +282,7 @@ if ( $tab ) {