How to add the wordpress settings saved message to plugins

If you are a wordpress developer and you code plugins that have variable settings inserted with register_setting() function into the database, then you must also add a notice to inform users when specific options or settings are saved. In order to do that, you’ll just need to add the following code snippet, anywhere in your form:

<?php if( isset($_GET[‘settings-updated’]) ) { ?>
<div id=”message” class=”updated”>
<p><strong><?php _e(‘Settings saved.’) ?></strong></p>
<?php } ?>

Good luck.

, ,