Ticket #16031: 16031-no-new.diff

File 16031-no-new.diff, 751 bytes (added by nacin, 2 years ago)
Line 
1Index: wp-admin/includes/class-wp-list-table.php
2===================================================================
3--- wp-admin/includes/class-wp-list-table.php   (revision 17280)
4+++ wp-admin/includes/class-wp-list-table.php   (working copy)
5@@ -264,11 +264,12 @@
6                $screen = get_current_screen();
7 
8                if ( is_null( $this->_actions ) ) {
9-                       $this->_actions = $this->get_bulk_actions();
10+                       $no_new_actions = $this->_actions = $this->get_bulk_actions();
11+                       // This filter can currently only be used to remove actions.
12                        $this->_actions = apply_filters( 'bulk_actions-' . $screen->id, $this->_actions );
13+                       $this->_actions = array_intersect_key( $this->_actions, $no_new_actions );
14                        $two = '';
15-               }
16-               else {
17+               } else {
18                        $two = '2';
19                }
20