wp-includes/functions.php:9189Outputs an admin notice.
$messagestring$argsarrayoptionalarray()$typestringdefault: empty string
$dismissiblebooldefault: false
$idstringdefault: empty string
$additional_classesstring[]default: empty array
$attributesstring[]default: empty array
$paragraph_wrapbooldefault: true
One hook fires while wp_admin_notice() runs, in this order:
Fires before an admin notice is output.
function wp_admin_notice( $message, $args = array() ) { /** * Fires before an admin notice is output. * * @since 6.4.0 * * @param string $message The message for the admin notice. * @param array $args The arguments for the admin notice. */ do_action( 'wp_admin_notice', $message, $args ); echo wp_kses_post( wp_get_admin_notice( $message, $args ) );}Introduced in 6.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.