bulk_actions-(screen_id) хук-фильтрWP 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.

Использование

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(массив)
An array of the available 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::bulk_actions()
bulk_actions-(screen_id)
wp-admin/includes/class-wp-list-table.php 479
$this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

Где используется хук в WordPress

Использование не найдено.