I believe you should be able to use the update_option_{$option}
hook:
do_action( "update_option_{$option}", $oldvalue, $_newvalue );
Something like:
add_action(
"update_option_youroptionname",
function ($oldvalue, $_newvalue) {
// process your option value and update/insert options as needed
// var_dump($oldvalue, $_newvalue); // debug
// wp_die(); // debug
},
1,2
);
Be sure to replace “youroptionname” with the appropriate value.
Related Posts:
- wp_editor() fields on Theme Options Page not saving
- How can I insert some extra validation into the theme options’ validation function using add_filter?
- Getting error to display radio button value in General Settings page
- Settings API settings section not appearing
- How do I display a WP Option from an array?
- How to use checked() function with multiple check box group? How to properly sanitize that checkbox group?
- Can’t save multiple sections on one page with register_setting
- File input returns null in theme options array
- Can’t add options to db
- Theme options: Display ID of page options
- get_option() vs get_theme_mod(): Why is one slower?
- How to Use Checkbox in Custom Option Page Using The Setting API
- Adding a checkbox to the theme customizer
- Adding a description to theme customizer controls
- Theme Options Panels, What are some good examples from Frameworks or Premium Themes? [closed]
- Where are a theme’s options stored and can I export them to be imported into freshly installed themes?
- Can I install Analytics before deciding on a theme?
- Options Framework options not being output
- Using update_option() and get_option() is echoing escaped strings
- Two Ways Of Creating WordPress Options Pages
- Theme Options page with tabs
- Outputting results from select box option in options panel
- Theme option : having the ability to select among several predefined headers
- Upload multiple images via theme options [closed]
- PHP stylesheet cannot use standard WP functions
- esc_url not working within add_settings_field callback
- Need help understanding/coding with Settings API
- Setting up a members area
- How can one utilize a variable as a callback function name for add_settings_field
- Add a Custom Permalink option in the Permalink Admin Screen?
- Is it safe to post form data via Ajax to the settings api? Am I missing something?
- How to add an alternative style sheet as a theme option?
- Disable image resizing on specific upload fields
- Put standard wordpress options into a theme options panel?
- Set the checkbox as checked by default at options page
- Removing \\\ from Saved Data
- Use of check_admin_referer with theme options and options.php
- WordPress custom options storing?
- WordPress admin panel framework weird layout on server side
- Theme Customizier sanitize_callback not working
- Getting the ID of header image, even when set to random
- Only allow site url in text field using wp_kses/wp_filter_nohtml_kses?
- Additional custom header image
- How to set a default theme option after installing theme?
- How to get of_get_option() inside the inc folder file
- Retrieve uploaded image attibutes value from option tree theme options
- Category select options for plugin settings
- Consequences if using PHP include TEMPLATEPATH?
- Color Options from Theme Customizer API not returning via get_theme_mod()
- Display and hide content using checkbox in Options Framework Theme
- How do I remove the page listing menu in the header in the Twenty Ten Theme?
- Multiple options in the options_value field of the wp_options table
- Shorter admin url for options page
- not getting API setting saved confirmation message after update on option page
- How to use WP Theme Option: Custom_Backgrounds on specific element?
- How can I create a rearrangeable list of items like OptionTree offers with the Theme Customization API?
- WordPress Theme Settings Page
- Theme options are they necessary
- Blogname and Blogdescription in Pagelines DMS Options Panel
- Cannot modify headers
- How to get functions.php to talk to options.php
- WordPress Options Framework, add to main menu not appearance menu
- Tabbed theme options query about add_settings_section callback function
- WordPress karma theme shortcodes not working
- WordPress built-in Custom Background
- Weird undefined index: id,std notices. How to fix it?
- It is possible to pass $args that sent by add_settings_field() inside another function?
- How do I have my widgets in a Sidebar for my http://localhost/wordpress/
- Theme options period being replaced
- Why Settings API Options Override Customizer Settings?
- Show multiple option in URL with Redux framework in front end
- How Can I Update wp_enqueue_scripts () From WordPress Option Page Radio Buttons
- Theme options on CPT
- Echo content based on current tabbed page in theme options
- What should I use to store options for a single blog on a network site?
- Warning: call_user_func() expects parameter 1 to be a valid callback
- Build Form on Dashboard
- How to make a hyperlink conditional according to whether you are logged in or not
- Dropdown pages in Settings API
- How to give site owner the ability to change to footer text via theme options (1 post)
- Changing the layout of a custom options page
- Make Theme Options Menu item more easily / directly accessible
- Is there a better way to define options for custom fields in an admin panel?
- Cloning/replicating/copying dashboard admin settings
- Slightly modified options framework Colour picker
- Set option to show the slider in post – WP
- Cannot retrieve theme options on index.php
- Updating Style From WP Options Setting Page
- Trouble saving wp_dropdown_pages()
- Notice: Undefined index: in options-framework.php
- Notice: Trying to get property of non-object in options.php
- Is it good idea to combine Options FrameWork with Hybrid Core Framework
- wordpress theme option in other templates
- Need some PHP schoolin’! passing var to url and the old options table
- How to support special characters in text field?
- Multiple Custom Headers
- Why has my WordPress theme disappeared from my WordPress site?
- Can I call Options Framework in footer.php?
- Where to add the code for an outer container in a theme?
- Theme Options wp_editor breaks with 6.0.2 update