Skip to content

Commit

Permalink
Add success notice on settings save
Browse files Browse the repository at this point in the history
  • Loading branch information
earnjam committed May 3, 2019
1 parent 6ee48eb commit 574f935
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions site-health-tool-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ function shtm_settings_page() { ?>
update_option( 'shtm_hidden_tests', $new_disabled );
$disabled = $new_disabled;

$classes = 'notice notice-success is-dismissible';
$message = __( 'Settings saved.', 'site-health-tool-manager' );
printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $classes ), esc_html( $message ) );

} else {
// Invalid or missing nonce
$classes = 'notice notice-error is-dismissible';
Expand Down

0 comments on commit 574f935

Please sign in to comment.