bp_admin_list_table_current_bulk_action()

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


Description 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 Return

(string)


Top ↑

Source Source

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

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;
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.