mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Updates: Prevent further actions if an update button is disabled.
Props adamsilverstein, afercia. Fixes #35257. Built from https://develop.svn.wordpress.org/trunk@36558 git-svn-id: http://core.svn.wordpress.org/trunk@36525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d1d90a3263
commit
8b781dfaa7
@ -461,7 +461,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
case 'update_available':
|
||||
if ( $status['url'] ) {
|
||||
/* translators: 1: Plugin name and version */
|
||||
$action_links[] = '<a class="update-now button" data-plugin="' . esc_attr( $status['file'] ) . '" data-slug="' . esc_attr( $plugin['slug'] ) . '" href="' . esc_url( $status['url'] ) . '" aria-label="' . esc_attr( sprintf( __( 'Update %s now' ), $name ) ) . '" data-name="' . esc_attr( $name ) . '">' . __( 'Update Now' ) . '</a>';
|
||||
$action_links[] = '<a class="update-now button aria-button-if-js" data-plugin="' . esc_attr( $status['file'] ) . '" data-slug="' . esc_attr( $plugin['slug'] ) . '" href="' . esc_url( $status['url'] ) . '" aria-label="' . esc_attr( sprintf( __( 'Update %s now' ), $name ) ) . '" data-name="' . esc_attr( $name ) . '">' . __( 'Update Now' ) . '</a>';
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -524,6 +524,11 @@ window.wp = window.wp || {};
|
||||
e.preventDefault();
|
||||
var $button = $( e.target );
|
||||
|
||||
// Do nothing while updating and when the button is disabled.
|
||||
if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.updateLock ) {
|
||||
wp.updates.requestFilesystemCredentials( e );
|
||||
}
|
||||
|
2
wp-admin/js/updates.min.js
vendored
2
wp-admin/js/updates.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-36557';
|
||||
$wp_version = '4.5-alpha-36558';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user