Ticket #16031: 16031.2.diff
File 16031.2.diff, 2.1 KB (added by , 9 years ago) |
---|
-
src/wp-admin/edit.php
162 162 } 163 163 } 164 164 break; 165 default: 166 /** 167 * Fires when a custom bulk action should be handled. 168 * 169 * @since 4.5.0 170 * 171 * @param string $doaction The action being taken. 172 * @param array $post_ids The posts to take the action on. 173 */ 174 do_action( 'handle_bulk_actions-' . get_current_screen()->id, $doaction, $post_ids ); 175 break; 165 176 } 166 177 167 178 $sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback ); 168 179 180 /** 181 * Filter the sendback link after a bulk action has been triggered. 182 * 183 * @since 4.5.0 184 * 185 * @param string $sendback The URL to redirect the user to. 186 * @param string $doaction The action performed. 187 * @param array $post_ids The posts the action was performed upon. 188 */ 189 $sendback = apply_filters( 'after_handle_bulk_actions_sendback_link-' . get_current_screen()->id, $sendback, $doaction, $post_ids ); 190 169 191 wp_redirect($sendback); 170 192 exit(); 171 193 } elseif ( ! empty($_REQUEST['_wp_http_referer']) ) { -
src/wp-admin/includes/class-wp-list-table.php
436 436 */ 437 437 protected function bulk_actions( $which = '' ) { 438 438 if ( is_null( $this->_actions ) ) { 439 $ no_new_actions = $this->_actions = $this->get_bulk_actions();439 $this->_actions = $this->get_bulk_actions(); 440 440 /** 441 441 * Filter the list table Bulk Actions drop-down. 442 442 * … … 450 450 * @param array $actions An array of the available bulk actions. 451 451 */ 452 452 $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions ); 453 $this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );454 453 $two = ''; 455 454 } else { 456 455 $two = '2';