From 0fb4f900304c712cf7a7626cd069ea1b90bda99e Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Thu, 17 Mar 2022 22:19:58 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@52947 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-theme-install-list-table.php | 4 ++-- src/wp-admin/includes/theme.php | 2 +- src/wp-admin/theme-install.php | 4 ++-- src/wp-admin/themes.php | 6 +++--- src/wp-admin/update-core.php | 2 +- .../customize/class-wp-customize-theme-control.php | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/wp-admin/includes/class-wp-theme-install-list-table.php b/src/wp-admin/includes/class-wp-theme-install-list-table.php index eb0ae02f18..17f8f8598c 100644 --- a/src/wp-admin/includes/class-wp-theme-install-list-table.php +++ b/src/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/src/wp-admin/theme-install.php b/src/wp-admin/theme-install.php index 1790af78e5..5aa5803199 100644 --- a/src/wp-admin/theme-install.php +++ b/src/wp-admin/theme-install.php @@ -282,7 +282,7 @@ if ( $tab ) {