Can someone please help? I need the action hook name when WordPress updates settings. On your plugin’s options page when the user clicks the submit button to save options, WordPress actually handles updating settings for the developer (instead of the developer manually using the update_option function to update settings).
Example: When the user clicks on the submit button, I want to print a feedback message like “Settings saved” at the top of my plugin’s options page.
Please help. Unfortunately, I couldn’t find this hook in Codex. I would really appreciate your help. Thanks.
So far I didn’t find a hook for the above. But my job was done by checking the URL in my plugin’s option page.
Whenever the plugin’s settings are successfully updated , the URL is appended by settings-updated=true. So I put the following code in my plugin’s admin file.
$hook = add_menu_page('My Plugin Settings','My Plugin Settings','manage_options','my_plugin_settings','display_plugin_options');
if(isset($_GET['settings-updated']) && $_GET['settings-updated'])
//plugin settings have been saved. Here goes your code