Skip to content

Instantly share code, notes, and snippets.

@pinalj
Last active November 3, 2017 10:38
Show Gist options
  • Save pinalj/55dcafac2d5014da5366a31dee3b82ed to your computer and use it in GitHub Desktop.
Save pinalj/55dcafac2d5014da5366a31dee3b82ed to your computer and use it in GitHub Desktop.
Adding a dismissible notice
<?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