Make WordPress Core

Ticket #37774: 37774.3.diff

File 37774.3.diff, 1.6 KB (added by swissspidy, 8 years ago)
  • src/wp-admin/includes/theme.php

    diff --git src/wp-admin/includes/theme.php src/wp-admin/includes/theme.php
    index b5fc980..fdd5d80 100644
    function wp_prepare_themes_for_js( $themes = null ) { 
    572572                        'parent'       => $parent,
    573573                        'active'       => $slug === $current_theme,
    574574                        'hasUpdate'    => isset( $updates[ $slug ] ),
     575                        'hasPackage'   => isset( $updates[ $slug ] ) && ! empty( $updates[ $slug ][ 'package' ] ),
    575576                        'update'       => get_theme_update_available( $theme ),
    576577                        'actions'      => array(
    577578                                'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null,
  • src/wp-admin/themes.php

    diff --git src/wp-admin/themes.php src/wp-admin/themes.php
    index fa1b25a..3be8fba 100644
    $can_install = current_user_can( 'install_themes' ); 
    378378        <# } #>
    379379
    380380        <# if ( data.hasUpdate ) { #>
    381                 <div class="update-message notice inline notice-warning notice-alt"><p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p></div>
     381                <# if ( data.hasPackage ) { #>
     382                        <div class="update-message notice inline notice-warning notice-alt"><p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p></div>
     383                <# } else { #>
     384                        <div class="update-message notice inline notice-warning notice-alt"><p><?php _e( 'New version available.' ); ?></p></div>
     385                <# } #>
    382386        <# } #>
    383387
    384388        <span class="more-details" id="{{ data.id }}-action"><?php _e( 'Theme Details' ); ?></span>