Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/js/_enqueues/admin/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1350,11 +1350,12 @@ $( function() {
event.stopPropagation();
$( 'html, body' ).animate( { scrollTop: 0 } );

var errorMessage = __( 'Please select at least one item to perform this action on.' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep the errorMessage variable assignment, as it's used later for a message passed to wp.a11y.speak(), so let's keep the logic of setting this variable here.

addAdminNotice( {
id: 'no-items-selected',
id: value !== '-1' ? 'no-items-selected' : 'no-bulk-action-selected',
type: 'error',
message: errorMessage,
message: value !== '-1'
? __( 'Please select at least one item to perform this action on.' )
: __( 'Please select a bulk action before clicking Apply.' ),
dismissible: true,
} );

Expand Down
Loading