WP_Users_List_Table::current_action

Advertisement

Summery Summery

Capture the bulk action required, and return it.

Syntax Syntax

WP_Users_List_Table::current_action()

Description Description

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

Return Return

(string) The bulk action required.

Source Source

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

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

		return parent::current_action();
	}

Advertisement

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Advertisement

Leave a Reply