bulk_post_updated_messages
Filter HookDescription
Filters the bulk action updated messages. By default, custom post types use the messages for the 'post' post type.Hook Information
File Location |
wp-admin/edit.php
View on GitHub
|
Hook Type | Filter |
Line Number | 408 |
Hook Parameters
Type | Name | Description |
---|---|---|
array[]
|
$bulk_messages
|
Arrays of messages, each keyed by the corresponding post type. Messages are keyed with 'updated', 'locked', 'deleted', 'trashed', and 'untrashed'. |
int[]
|
$bulk_counts
|
Array of item counts for each message, used to build internationalized strings. |
Usage Examples
Basic Usage
<?php
// Hook into bulk_post_updated_messages
add_filter('bulk_post_updated_messages', 'my_custom_filter', 10, 2);
function my_custom_filter($bulk_messages, $bulk_counts) {
// Your custom filtering logic here
return $bulk_messages;
}
Source Code Context
wp-admin/edit.php:408
- How this hook is used in WordPress core
<?php
403 *
404 * @param array[] $bulk_messages Arrays of messages, each keyed by the corresponding post type. Messages are
405 * keyed with 'updated', 'locked', 'deleted', 'trashed', and 'untrashed'.
406 * @param int[] $bulk_counts Array of item counts for each message, used to build internationalized strings.
407 */
408 $bulk_messages = apply_filters( 'bulk_post_updated_messages', $bulk_messages, $bulk_counts );
409 $bulk_counts = array_filter( $bulk_counts );
410
411 require_once ABSPATH . 'wp-admin/admin-header.php';
412 ?>
413 <div class="wrap">
PHP Documentation
<?php
/**
* Filters the bulk action updated messages.
*
* By default, custom post types use the messages for the 'post' post type.
*
* @since 3.7.0
*
* @param array[] $bulk_messages Arrays of messages, each keyed by the corresponding post type. Messages are
* keyed with 'updated', 'locked', 'deleted', 'trashed', and 'untrashed'.
* @param int[] $bulk_counts Array of item counts for each message, used to build internationalized strings.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/edit.php
Related Hooks
Related hooks will be displayed here in future updates.