WP_List_Table::get_bulk_actions()protectedWP 3.1.0

Retrieves the list of bulk actions available for this table.

The format is an associative array where each element represents either a top level option value and label, or an array representing an optgroup and its options.

For a standard option, the array element key is the field value and the array element value is the field label.

For an optgroup, the array element key is the label and the array element value is an associative array of options as above.


	'edit'         => 'Edit',
	'delete'       => 'Delete',
	'Change State' => [
		'feature' => 'Featured',
		'sale'    => 'On Sale',

Метод класса: WP_List_Table{}

Хуков нет.




// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_bulk_actions();

Список изменений

С версии 3.1.0 Введена.
С версии 5.6.0 A bulk action can now contain an array of options in order to create an optgroup.

Код WP_List_Table::get_bulk_actions() WP 6.1.1

protected function get_bulk_actions() {
	return array();