bulk_actions-{$this->screen->id}
Filter HookDescription
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.Hook Information
File Location |
wp-admin/includes/class-wp-list-table.php
View on GitHub
|
Hook Type | Filter |
Line Number | 591 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$actions
|
An array of the available bulk actions. |
Usage Examples
Basic Usage
<?php
// Hook into bulk_actions-{$this->screen->id}
add_filter('bulk_actions-{$this->screen->id}', 'my_custom_filter', 10, 1);
function my_custom_filter($actions) {
// Your custom filtering logic here
return $actions;
}
Source Code Context
wp-admin/includes/class-wp-list-table.php:591
- How this hook is used in WordPress core
<?php
586 * @since 3.1.0
587 * @since 5.6.0 A bulk action can now contain an array of options in order to create an optgroup.
588 *
589 * @param array $actions An array of the available bulk actions.
590 */
591 $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
592
593 $two = '';
594 } else {
595 $two = '2';
596 }
PHP Documentation
<?php
/**
* 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.
*
* @since 3.1.0
* @since 5.6.0 A bulk action can now contain an array of options in order to create an optgroup.
*
* @param array $actions An array of the available bulk actions.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/class-wp-list-table.php
Related Hooks
Related hooks will be displayed here in future updates.