xxxxxxxxxx
// Add admin notice
function my_custom_admin_notice() {
$message = 'This is my custom admin notice.';
?>
<div class="notice notice-success is-dismissible">
<p><?php echo $message; ?></p>
</div>
<?php
}
add_action( 'admin_notices', 'my_custom_admin_notice' );