Created
February 5, 2021 13:30
-
-
Save wpmu-authors/564265f84f1ab7c6705a49462862f10f to your computer and use it in GitHub Desktop.
two-notices.php
This file contains hidden or 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
function my_error_notice() { | |
?> | |
<div class="error notice"> | |
<p><?php _e( 'There has been an error. Bummer!', 'my_plugin_textdomain' ); ?></p> | |
</div> | |
<?php | |
} | |
add_action( 'admin_notices', 'my_error_notice' ); | |
function my_update_notice() { | |
?> | |
<div class="updated notice"> | |
<p><?php _e( 'The plugin has been updated, excellent!', 'my_plugin_textdomain' ); ?></p> | |
</div> | |
<?php | |
} | |
add_action( 'admin_notices', 'my_update_notice' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment