Themes: Add filter on bulk action fields.
Because validation was added in [59134] to prevent submitting bulk actions with no selected action, sites that remove or change the default bulk actions can fail due to the missing required inputs. Add a filter (bulk_action_observer_ids) that allows modifying the actions accepted to fulfill validation rules. Reviewed by Jorbin. Merges [60186] to the 6.8 branch. Props ethitter, kabir93, jorbin, davidbaumwald, joedolson. Fixes #63005. Built from https://develop.svn.wordpress.org/branches/6.8@60188 git-svn-id: http://core.svn.wordpress.org/branches/6.8@59524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1327,8 +1327,8 @@ $( function() {
|
||||
|
||||
// Observe submissions from posts lists for 'bulk_action' or users lists for 'new_role'.
|
||||
var bulkFieldRelations = {
|
||||
'bulk_action' : 'action',
|
||||
'changeit' : 'new_role'
|
||||
'bulk_action' : window.bulkActionObserverIds.bulk_action,
|
||||
'changeit' : window.bulkActionObserverIds.changeit
|
||||
};
|
||||
if ( ! Object.keys( bulkFieldRelations ).includes( submitterName ) ) {
|
||||
return;
|
||||
|
||||
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
Reference in New Issue
Block a user