[wp-trac] [WordPress Trac] #45006: On Bulk Actions either suppress until checkboxes selected or provide feedback that the action had no items to act on

WordPress Trac noreply at wordpress.org
Thu Sep 27 07:06:42 UTC 2018


#45006: On Bulk Actions either suppress until checkboxes selected or provide
feedback that the action had no items to act on
----------------------------------------------+----------------------------
 Reporter:  garrett-eclipse                   |      Owner:  (none)
     Type:  enhancement                       |     Status:  new
 Priority:  normal                            |  Milestone:  Awaiting
                                              |  Review
Component:  Administration                    |    Version:
 Severity:  normal                            |   Keywords:
  Focuses:  administration, coding-standards  |
----------------------------------------------+----------------------------
 Hello,

 It seems to be the convention in core to simply have no action response
 when you attempt to execute the Bulk Actions and have no items selected.

 In #44081 the 44081.3.2.diff provided a concept for the error;
 {{{#!php
 <?php
 if ( empty( $request_ids ) ) {
     add_settings_error(
         'bulk_action',
         'bulk_action',
         __( 'There were no requests to act on.' )
     );
     return;
 }
 }}}

 Or it may be a better queue to simply disable the button when no
 checkboxes are checked. This avoids triggering the action in the first
 place.

 Thanks

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45006>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list