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)', 'filter_function_name_8800' ); function filter_function_name_8800( $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. |
Где вызывается хук
bulk_actions-(screen_id)
wp-admin/includes/class-wp-list-table.php 475
$this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores