WordPress.org

Make WordPress Core

Changeset 38855


Ignore:
Timestamp:
10/21/2016 10:35:51 AM (4 years ago)
Author:
swissspidy
Message:

Themes: After [38788], further improve the update button when there's no update package.

Prevents running shiny install when no package exists.

Fixes #37774.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/theme.js

    r38640 r38855  
    611611    updateTheme: function( event ) {
    612612        var _this = this;
     613
     614        if ( ! this.model.get( 'hasPackage' ) ) {
     615            return;
     616        }
     617
    613618        event.preventDefault();
    614619
  • trunk/src/wp-admin/themes.php

    r38827 r38855  
    253253    <?php if ( $theme['hasUpdate'] ) : ?>
    254254        <div class="update-message notice inline notice-warning notice-alt">
     255        <?php if ( $theme['hasPackage'] ) : ?>
    255256            <p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p>
     257        <?php else : ?>
     258            <p><?php _e( 'New version available.' ); ?></p>
     259        <?php endif; ?>
    256260        </div>
    257261    <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.