Last active
November 3, 2017 10:36
-
-
Save pinalj/b3215e63c0a2dc0d90ab3f8983c095e6 to your computer and use it in GitHub Desktop.
Adding multiple Notices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'admin_notices', 'my_info_notice' ); | |
function my_info_notice() { | |
?> | |
<div class="notice notice-info"> | |
<p><?php _e( 'You have successfully completed the setup.', 'my-text-domain' ); ?></p> | |
</div> | |
<?php | |
} | |
add_action( 'admin_notices', 'my_error_notice' ); | |
function my_error_notice() { | |
?> | |
<div class="notice notice-error"> | |
<p><?php _e( 'There has been an error.', 'my-text-domain' );?></p> | |
</div> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment