WordPress.org

Make WordPress Core

Ticket #53370: theme-screenshot-version.patch

File theme-screenshot-version.patch, 1.6 KB (added by codente, 4 months ago)
  • wp-admin/themes.php

    diff --git a/wp-admin/themes.php b/wp-admin/themes.php
    index f671d54e22..1e184033d6 100644
    a b foreach ( $themes as $theme ) : 
    373373<div class="theme<?php echo $active_class; ?>">
    374374        <?php if ( ! empty( $theme['screenshot'][0] ) ) { ?>
    375375                <div class="theme-screenshot">
    376                         <img src="<?php echo $theme['screenshot'][0]; ?>" alt="" />
     376                        <img src="<?php echo $theme['screenshot'][0] . '?ver=' . $theme['version']; ?>" alt="" />
    377377                </div>
    378378        <?php } else { ?>
    379379                <div class="theme-screenshot blank"></div>
    function wp_theme_auto_update_setting_template() { 
    724724<script id="tmpl-theme" type="text/template">
    725725        <# if ( data.screenshot[0] ) { #>
    726726                <div class="theme-screenshot">
    727                         <img src="{{ data.screenshot[0] }}" alt="" />
     727                        <img src="{{ data.screenshot[0] }}?ver={{ data.version }}" alt="" />
    728728                </div>
    729729        <# } else { #>
    730730                <div class="theme-screenshot blank"></div>
  • wp-includes/customize/class-wp-customize-theme-control.php

    diff --git a/wp-includes/customize/class-wp-customize-theme-control.php b/wp-includes/customize/class-wp-customize-theme-control.php
    index a0a705d545..baca767286 100644
    a b class WP_Customize_Theme_Control extends WP_Customize_Control { 
    7474
    7575                        <# if ( data.theme.screenshot && data.theme.screenshot[0] ) { #>
    7676                                <div class="theme-screenshot">
    77                                         <img data-src="{{ data.theme.screenshot[0] }}" alt="" />
     77                                        <img data-src="{{ data.theme.screenshot[0] }}?ver={{ data.theme.version }}" alt="" />
    7878                                </div>
    7979                        <# } else { #>
    8080                                <div class="theme-screenshot blank"></div>