WP_List_Table::current_action()publicWP 3.1.0

Gets the current action selected from the bulk actions dropdown.

Method of the class: WP_List_Table{}

No Hooks.

Return

String|false. The action name. False if no action was selected.

Usage

$WP_List_Table = new WP_List_Table();
$WP_List_Table->current_action();

Changelog

Since 3.1.0 Introduced.

WP_List_Table::current_action() code WP 6.7.2

public function current_action() {
	if ( isset( $_REQUEST['filter_action'] ) && ! empty( $_REQUEST['filter_action'] ) ) {
		return false;
	}

	if ( isset( $_REQUEST['action'] ) && '-1' !== $_REQUEST['action'] ) {
		return $_REQUEST['action'];
	}

	return false;
}