How to add the wordpress settings saved message to plugins

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

Good luck.

1 Comment

  1. Escha - January 25, 2016

    Thank you! I’ve been looking for this little snippet for hours. Perfect.

Leave a reply

0
Connecting
Please wait...
Send a message

Sorry, we aren't online at the moment. Leave a message.

Your name
* Email
* Describe your issue
Chat now

Need more help? Save time by starting your support request online.

Your name
* Email
* Describe your issue
We're online! Ask us anything!
Feedback

Help us help you better! Feel free to leave us any additional feedback.

How do you rate our support?