Last active
November 3, 2017 10:38
-
-
Save pinalj/b9502af2a2d3062d2f86db3529e2931a to your computer and use it in GitHub Desktop.
Conditional Notice
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 | |
if( ! empty( get_option( 'my_update_status' ) ) ) { | |
add_action( 'admin_notices', 'my_update_notice' ); | |
} | |
function my_update_notice() { | |
?> | |
<div class="notice notice-success"> | |
<p><?php _e( 'The update was completed successfully!', 'my-text-domain' ); ?></p> | |
</div> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment