wp/wp-admin/includes/class-wp-theme-install-list-table.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
--- a/wp/wp-admin/includes/class-wp-theme-install-list-table.php	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-admin/includes/class-wp-theme-install-list-table.php	Tue Sep 27 16:37:53 2022 +0200
@@ -251,7 +251,7 @@
 	 *
 	 * @global array $themes_allowedtags
 	 *
-	 * @param object $theme {
+	 * @param stdClass $theme {
 	 *     An object that contains theme data returned by the WordPress.org API.
 	 *
 	 *     @type string $name           Theme name, e.g. 'Twenty Twenty-One'.
@@ -352,13 +352,14 @@
 		 *
 		 * @param string[] $actions An array of theme action links. Defaults are
 		 *                          links to Install Now, Preview, and Details.
-		 * @param WP_Theme $theme   Theme object.
+		 * @param stdClass $theme   An object that contains theme data returned by the
+		 *                          WordPress.org API.
 		 */
 		$actions = apply_filters( 'theme_install_actions', $actions, $theme );
 
 		?>
 		<a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>">
-			<img src="<?php echo esc_url( $theme->screenshot_url ); ?>" width="150" alt="" />
+			<img src="<?php echo esc_url( $theme->screenshot_url . '?ver=' . $theme->version ); ?>" width="150" alt="" />
 		</a>
 
 		<h3><?php echo $name; ?></h3>
@@ -412,7 +413,7 @@
 	 * Prints the wrapper for the theme installer with a provided theme's data.
 	 * Used to make the theme installer work for no-js.
 	 *
-	 * @param object $theme - A WordPress.org Theme API object.
+	 * @param stdClass $theme A WordPress.org Theme API object.
 	 */
 	public function theme_installer_single( $theme ) {
 		?>
@@ -432,7 +433,7 @@
 	 *
 	 * @global array $themes_allowedtags
 	 *
-	 * @param object $theme - A WordPress.org Theme API object.
+	 * @param stdClass $theme A WordPress.org Theme API object.
 	 */
 	public function install_theme_info( $theme ) {
 		global $themes_allowedtags;
@@ -501,7 +502,7 @@
 			?>
 			</span>
 			<?php if ( isset( $theme->screenshot_url ) ) : ?>
-				<img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="" />
+				<img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url . '?ver=' . $theme->version ); ?>" alt="" />
 			<?php endif; ?>
 			<div class="theme-details">
 				<?php
@@ -546,7 +547,7 @@
 	 *
 	 * @since 3.4.0
 	 *
-	 * @param object $theme - A WordPress.org Theme API object.
+	 * @param stdClass $theme A WordPress.org Theme API object.
 	 * @return string Theme status.
 	 */
 	private function _get_theme_status( $theme ) {