Really Simple SSL

SSL activated! message not going away

After activating SSL in Really Simple SSL, a success message will be displayed confirming that your site has been migrated to https.

SSL activated! Don’t forget to change your settings in Google Analytics en Webmaster tools. More info.

When the “x” in the top right is clicked, an ajax call is fired that sets the “success message show” variable to true. Some users report that the message keeps coming back. I haven’t been able to reproduce this yet, but my guess is that there’s a Javascript error on the dashboard caused by another plugin or theme, which breaks the ajax callback.

On the wishlist, I have added the option to dismiss the message in the traditional way, with a submit. For now, there’s a workaround you can use to remove the notice.
Add this you your theme’s functions.php:

add_action("init", "rsssl_dismiss_success_message");

function rsssl_dismiss_success_message(){

  $options = get_option('rlrsssl_options');

  $options['ssl_success_message_shown'] = true;

  update_option('rlrsssl_options',$options);

}

The message should disappear after loading your site once. You can then remove this code.

For multisite installations this would be:

add_action("init", "rsssl_dismiss_success_message");
function rsssl_dismiss_success_message(){
 $sites = get_sites();
 foreach ( $sites as $site ) {
  switch_to_blog( $site->blog_id );
  $options = get_option('rlrsssl_options');   
  $options['ssl_success_message_shown'] = true;   
  update_option('rlrsssl_options',$options);
  restore_current_blog(); //switches back to previous blog, not current, so we have to do it each loop
 }
}
Rogier

Rogier

Related articles

Join our mailing list - 8 Tips & Tricks in your inbox over the next 8 weeks!