bulk_actions-(screen_id) filter-hookWP 3.1.0

Filters the items in the bulk actions menu of the list table.

The dynamic portion of the hook name, $this->screen->id, refers to the ID of the current screen.

Usage

add_filter( 'bulk_actions-(screen_id)', 'wp_kama_bulk_actions_screen_id_filter' );

/**
 * Function for `bulk_actions-(screen_id)` filter-hook.
 * 
 * @param array $actions An array of the available bulk actions.
 *
 * @return array
 */
function wp_kama_bulk_actions_screen_id_filter( $actions ){

	// filter...
	return $actions;
}
$actions(array)
An array of the available bulk actions.

Changelog

Since 3.1.0 Introduced.
Since 5.6.0 A bulk action can now contain an array of options in order to create an optgroup.

Where the hook is called

WP_List_Table::bulk_actions()
bulk_actions-(screen_id)
wp-admin/includes/class-wp-list-table.php 585
$this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

Where the hook is used in WordPress

Usage not found.