WPTurbo admin notice

Home » Snippets » WPTurbo admin notice
0

Created with:

Admin Notice Generator

Visibility: 

public

Creator: Julien

Customize with WPTurbo AI
X

Add Snippet To Project

New Project
Add To Existing Project
				/**
 * Display an admin notice on the WordPress admin dashboard.
 *
 * This function puts an admin notice with a message on the WordPress admin dashboard.
 * The message can be customized by modifying the $message variable.
 * The admin notice box style can be modified by changing the 'notice-success' class in the HTML code.
 *
 * @since 1.0.0
 *
 * @return void
 */
function wpturbo_my_admin_notice() : void {
	$message = 'Hello on WPTurbo !';
	echo '<div class="notice notice-success is-dismissible">';
		echo '<p>';
			_e( $message, 'WPTurbo' );
		echo '</p>';
	echo '</div>';
}
add_action( 'admin_notices', 'wpturbo_my_admin_notice' );

			

Register an account to save your snippets or go Pro to get more features.