Support » Plugins » Hacks » Option page: how to change value after form submit, but before option are saved.

  • Hi,

    I’m building this option page for a plugin and i need to play around with the data submitted by the option page before it get saved.

    i’ve been trying to find a hook (or anything) that would let me play with the value of the fields submitted by the option page before they are saved.

    the code for my option page look like this:

    function my_plugin_menu_option_page() {
    	add_options_page('My Plugin', 'My Plug in', 'manage_options', 'manage_options_id', 'my_plugin_options');
    	add_action( 'admin_init', 'my_plugin_options_register_settings' );
    }
    
    function my_plugin_options_register_settings() { // whitelist options
           register_setting( 'my_plugin_option_group', 'some_option' );
    }
    
    function my_plugin_options() {
        // Option form goes here
    
    }

    i didn’t find much on google so far, so if any of you have an idea, let me know.

    Thanx

  • The topic ‘Option page: how to change value after form submit, but before option are saved.’ is closed to new replies.