Skip to content

Commit 5ce0e86

Browse files
committed
Quick/Bulk Edit: Fix misleading error on bulk edits.
The same error message was returned whether a user attempted bulk edit without selecting an action or attempted without selecting any posts. These two situations need different messages. Return error messages appropriate to the actual user error. Props Presskopp, r1k0, pratiknawkar94, joedolson. Fixes #64659. git-svn-id: https://develop.svn.wordpress.org/trunk@61771 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6ea221b commit 5ce0e86

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/js/_enqueues/admin/common.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,9 +1350,11 @@ $( function() {
13501350
event.stopPropagation();
13511351
$( 'html, body' ).animate( { scrollTop: 0 } );
13521352

1353-
var errorMessage = __( 'Please select at least one item to perform this action on.' );
1353+
var errorMessage = value !== '-1' ?
1354+
__( 'Please select at least one item to perform this action on.' ) :
1355+
__( 'Please select a bulk action to perform.' );
13541356
addAdminNotice( {
1355-
id: 'no-items-selected',
1357+
id: value !== '-1' ? 'no-items-selected' : 'no-bulk-action-selected',
13561358
type: 'error',
13571359
message: errorMessage,
13581360
dismissible: true,

0 commit comments

Comments
 (0)