Themes: After [38788], further improve the update button when there's no update package.
Prevents running shiny install when no package exists. Fixes #37774. Built from https://develop.svn.wordpress.org/trunk@38855 git-svn-id: http://core.svn.wordpress.org/trunk@38798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
11a13f147b
commit
f88c248a52
|
@ -610,6 +610,11 @@ themes.view.Theme = wp.Backbone.View.extend({
|
|||
|
||||
updateTheme: function( event ) {
|
||||
var _this = this;
|
||||
|
||||
if ( ! this.model.get( 'hasPackage' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
wp.updates.maybeRequestFilesystemCredentials( event );
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -252,7 +252,11 @@ foreach ( $themes as $theme ) :
|
|||
|
||||
<?php if ( $theme['hasUpdate'] ) : ?>
|
||||
<div class="update-message notice inline notice-warning notice-alt">
|
||||
<?php if ( $theme['hasPackage'] ) : ?>
|
||||
<p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p>
|
||||
<?php else : ?>
|
||||
<p><?php _e( 'New version available.' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38854';
|
||||
$wp_version = '4.7-alpha-38855';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue