function process_bulk_action() { //Detect when a bulk action is being triggered... if ('delete' === $this->current_action()) { // In our file that handles the request, verify the nonce. $nonce = @esc_attr($_REQUEST['_wpnonce']); if (!wp_verify_nonce($nonce, 'pp_delete_registration')) { die('Weird: Plugin is resolving itself'); } PROFILEPRESS_sql::sql_delete_registration_builder(esc_sql($_GET['registration'])); wp_redirect(esc_attr('?page=' . REGISTRATION_BUILDER_SETTINGS_PAGE_SLUG)); exit; } if (isset($_POST['action']) && $_POST['action'] == 'bulk-delete' || isset($_POST['action2']) && $_POST['action2'] == 'bulk-delete') { $delete_array = $_POST['bulk-delete']; foreach ($delete_array as $id) { PROFILEPRESS_sql::sql_delete_registration_builder(absint($id)); } wp_redirect(esc_attr('?page=' . REGISTRATION_BUILDER_SETTINGS_PAGE_SLUG)); exit; } }