mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 09:57:38 +01:00
In media.view.BulkSelectionActionButton.click()
, do not assume that delete
is the only possible bulk action.
Fixes #29101. Built from https://develop.svn.wordpress.org/trunk@29403 git-svn-id: http://core.svn.wordpress.org/trunk@29181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6b8ee0942c
commit
27b0d4cd20
@ -647,10 +647,12 @@
|
||||
var selection = this.controller.controller.state().get('selection');
|
||||
media.view.Button.prototype.click.apply( this, arguments );
|
||||
|
||||
// Currently assumes delete is the only action
|
||||
if ( confirm( l10n.warnBulkDelete ) ) {
|
||||
while ( selection.length > 0) {
|
||||
selection.at(0).destroy();
|
||||
if ( 'delete' === this.controller.model.get( 'currentAction' ) ) {
|
||||
// Currently assumes delete is the only action
|
||||
if ( confirm( l10n.warnBulkDelete ) ) {
|
||||
while ( selection.length > 0 ) {
|
||||
selection.at(0).destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
2
wp-includes/js/media-grid.min.js
vendored
2
wp-includes/js/media-grid.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user