bulk_post_updated_messages

Filters the bulk action updated messages.

Description

apply_filters( 'bulk_post_updated_messages', (array) $bulk_messages, (number) $bulk_counts ); 

By default, custom post types use the messages for the post post type.

Parameters (2)

0. $bulk_messages (array)
Arrays of messages, each keyed by the corresponding post type. Messages are keyed with updated,, locked., deleted, trashed, and untrashed.
1. $bulk_counts (number)
Array of item counts for each message, used to build internationalized strings.

Usage

To run the hook, copy the example below.
  1. $bulk_messages = apply_filters( 'bulk_post_updated_messages', $bulk_messages, $bulk_counts ); 
  2.  
  3. if ( !empty( $bulk_messages ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bulk_post_updated_messages callback 
  2. function filter_bulk_post_updated_messages( $bulk_messages, $bulk_counts ) { 
  3. // make filter magic happen here... 
  4. return $bulk_messages
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bulk_post_updated_messages', 'filter_bulk_post_updated_messages', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bulk_post_updated_messages', 'filter_bulk_post_updated_messages', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/edit.php  
  1. $bulk_messages = apply_filters( 'bulk_post_updated_messages', $bulk_messages, $bulk_counts );