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.
Built from https://develop.svn.wordpress.org/trunk@61771


git-svn-id: http://core.svn.wordpress.org/trunk@61077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson
2026-02-27 23:57:41 +00:00
parent 0345ce64d2
commit b5dbbdc0f5
3 changed files with 6 additions and 4 deletions

View File

@@ -1350,9 +1350,11 @@ $( function() {
event.stopPropagation();
$( 'html, body' ).animate( { scrollTop: 0 } );
var errorMessage = __( 'Please select at least one item to perform this action on.' );
var errorMessage = value !== '-1' ?
__( 'Please select at least one item to perform this action on.' ) :
__( 'Please select a bulk action to perform.' );
addAdminNotice( {
id: 'no-items-selected',
id: value !== '-1' ? 'no-items-selected' : 'no-bulk-action-selected',
type: 'error',
message: errorMessage,
dismissible: true,

File diff suppressed because one or more lines are too long

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '7.0-beta2-61770';
$wp_version = '7.0-beta2-61771';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.