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:
@@ -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,
|
||||
|
||||
2
wp-admin/js/common.min.js
vendored
2
wp-admin/js/common.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user