This hook allows you to specify custom bulk actions messages for different post types, including custom post types.
For this filter to work properly, it's necessary to receive two arguments in your function.
add_filter('bulk_post_updated_messages','function_name',10,2);
The following example adds custom bulk action updated messages for 'my_cpt' post type:
function my_bulk_post_updated_messages_filter( $bulk_messages, $bulk_counts ) { $bulk_messages['my_cpt'] = array( 'updated' => _n( '%s my_cpt updated.', '%s my_cpts updated.', $bulk_counts['updated'] ), 'locked' => _n( '%s my_cpt not updated, somebody is editing it.', '%s my_cpts not updated, somebody is editing them.', $bulk_counts['locked'] ), 'deleted' => _n( '%s my_cpt permanently deleted.', '%s my_cpts permanently deleted.', $bulk_counts['deleted'] ), 'trashed' => _n( '%s my_cpt moved to the Trash.', '%s my_cpts moved to the Trash.', $bulk_counts['trashed'] ), 'untrashed' => _n( '%s my_cpt restored from the Trash.', '%s my_cpts restored from the Trash.', $bulk_counts['untrashed'] ), ); return $bulk_messages; } add_filter( 'bulk_post_updated_messages', 'my_bulk_post_updated_messages_filter', 10, 2 );
Available in WP 3.7+. That does not mean you have to specifically check for WP version before using this filter, no errors happen when using non-existent filters.