I have a Wordpress plugin in which I added a menu that allows a user to set various options. I used the "add_menu_page" function described here - http://codex.wordpress.org/Function_Reference/add_menu_page . I now need to do some actions AFTER the options on this page have been saved, but I'm not sure if I can do that or, if I can, what hooks to use.
I can't post exactly the code I'm using to create this options page, but I'll try and put together something similar to get the message across
function my_menu_page() {
add_menu_page('My Menu', 'My Menu', 'edit_posts', "my_menu_settings", "my_menu_settings");
}
function my_menu_settings() {
echo "
<h1>My Menu Settings</h1>
<div>
<form action='options.php' method='post' name='options'>
" . wp_nonce_field('update-options') . "
<input type='text' name='my_option_1' value='" . get_option('my_option_1') . "' /><br />
<input type='hidden' name='action' value='update' />
<input type='hidden' name='page_options' value='my_option_1' />
<input type='submit' name='Submit' value='Update' />
</form>
</div>
";
}
add_action('admin_menu', 'my_menu_settings');