WP_Users_List_Table::current_action() WordPress Method

The WP_Users_List_Table::current_action() method is used to get the current action being performed on the user list table.

WP_Users_List_Table::current_action() #

Capture the bulk action required, and return it.


Description

Overridden from the base class implementation to capture the role change drop-down.


Top ↑

Return

(string) The bulk action required.


Top ↑

Source

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

	public function current_action() {
		if ( isset( $_REQUEST['changeit'] ) && ! empty( $_REQUEST['new_role'] ) ) {
			return 'promote';
		}

		return parent::current_action();
	}


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.