wp_admin_notice
Fires before an admin notice is output.
Usage
add_action( 'wp_admin_notice', 'wp_kama_admin_notice_action', 10, 2 );
/**
* Function for `wp_admin_notice` action-hook.
*
* @param string $message The message for the admin notice.
* @param array $args The arguments for the admin notice.
*
* @return void
*/
function wp_kama_admin_notice_action( $message, $args ){
// action...
}
- $message(string)
- The message for the admin notice.
- $args(array)
- The arguments for the admin notice.
Changelog
| Since 6.4.0 | Introduced. |
Where the hook is called
wp_admin_notice
wp-includes/functions.php 9198
do_action( 'wp_admin_notice', $message, $args );