WordPress.org

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/bulk actions

Description

This hook allows you to remove items from the bulk actions dropdown on any specified admin screen.

Bulk actions are a simple associative array.

Usage

The filter hook follows the format 'bulk_actions-screenid', where screenid is the id of the admin screen that you want to affect.
add_filter('bulk_actions-screenid','function_name');

Example

The following example removes an action from the Bulk Actions drop-down on the Users page:

<?php
    function my_custom_bulk_actions($actions){
        unset( $actions['delete'] );
        return $actions;
    }
    add_filter('bulk_actions-users','my_custom_bulk_actions');
?>

Pay attention to the actual option values, not just the text displayed in the dropdown, on the page you wish to modify. For example, the delete option on the Plugins list page is "delete-selected" (as of 4.2.2).

Notes

The filter doesn't currently (WP 3.3) allow you to add custom bulk actions. See http://core.trac.wordpress.org/ticket/16031

Related

Administration Screen Id Reference

External Resources

A workaround for Adding a Custom Bulk Action