From 574f935661dfbdb5923fe4d4be7b35af22268483 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Fri, 3 May 2019 14:48:28 -0400 Subject: [PATCH] Add success notice on settings save --- site-health-tool-manager.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site-health-tool-manager.php b/site-health-tool-manager.php index ea3c54f..f2da436 100644 --- a/site-health-tool-manager.php +++ b/site-health-tool-manager.php @@ -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( '

%2$s

', esc_attr( $classes ), esc_html( $message ) ); + } else { // Invalid or missing nonce $classes = 'notice notice-error is-dismissible';