wp_admin_notice_args
Filter HookDescription
Filters the arguments for an admin notice.Hook Information
File Location |
wp-includes/functions.php
View on GitHub
|
Hook Type | Filter |
Line Number | 8994 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$args
|
The arguments for the admin notice. |
string
|
$message
|
The message for the admin notice. |
Usage Examples
Basic Usage
<?php
// Hook into wp_admin_notice_args
add_filter('wp_admin_notice_args', 'my_custom_filter', 10, 2);
function my_custom_filter($args, $message) {
// Your custom filtering logic here
return $args;
}
Source Code Context
wp-includes/functions.php:8994
- How this hook is used in WordPress core
<?php
8989 * @since 6.4.0
8990 *
8991 * @param array $args The arguments for the admin notice.
8992 * @param string $message The message for the admin notice.
8993 */
8994 $args = apply_filters( 'wp_admin_notice_args', $args, $message );
8995 $id = '';
8996 $classes = 'notice';
8997 $attributes = '';
8998
8999 if ( is_string( $args['id'] ) ) {
PHP Documentation
<?php
/**
* Filters the arguments for an admin notice.
*
* @since 6.4.0
*
* @param array $args The arguments for the admin notice.
* @param string $message The message for the admin notice.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/functions.php
Related Hooks
Related hooks will be displayed here in future updates.