bp_admin_list_table_current_bulk_action()

When using a WP_List_Table, get the currently selected bulk action.

Description

WP_List_Tables have bulk actions at the top and at the bottom of the tables, and the inputs have different keys in the $_REQUEST array. This function reconciles the two values and returns a single action being performed.

Return

(string)

Source

File: bp-core/admin/bp-core-admin-functions.php

1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
function bp_admin_list_table_current_bulk_action() {
 
    $action = ! empty( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
 
    // If the bottom is set, let it override the action.
    if ( ! empty( $_REQUEST['action2'] ) && $_REQUEST['action2'] != "-1" ) {
        $action = $_REQUEST['action2'];
    }
 
    return $action;
}

Changelog

Changelog
Version Description
BuddyPress 1.7.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.