WP_List_Table::current_action() WordPress Method

WP_List_Table::current_action() is a method used to get the current action being performed on a list table. This is typically done by checking the $_REQUEST global for the 'action' parameter.

WP_List_Table::current_action() #

Gets the current action selected from the bulk actions dropdown.


Return

(string|false) The action name. False if no action was selected.


Top ↑

Source

File: wp-admin/includes/class-wp-list-table.php

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


Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.