Last active
November 3, 2017 10:38
-
-
Save pinalj/55dcafac2d5014da5366a31dee3b82ed to your computer and use it in GitHub Desktop.
Adding a dismissible 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( get_option( 'my_dismiss_notice' ) != true ) { | |
add_action( 'admin_notices', 'add_dismissible' ); | |
} | |
function add_dismissible() { | |
?> | |
<div class='notice notice-error my-dismiss-notice is-dismissible'> | |
<p>This is a dismissble notice.</p> | |
</div> | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment