I did something similar as an import/export facility. Essentially I created a Theme Options Import/Export page in the dashboard, then just export the theme options (using get_option()
) to a file as a JSON encoded string and post it for the user to download. Then give them an upload facility the imports said file (using update_option()
). You could do the same thing just by storing different numbered options rather than saving it to a file.
Related Posts:
- Add multiple custom fields to the general settings page
- How to pass arguments from add_settings_field() to the callback function?
- How to pass variable to add_settings_section() callback?
- Difference between Option_Group and Option_Name in Register_Settings
- How to Create a Custom WordPress Install Package?
- Settings API – creating reusable form elements?
- Settings API – changing add_settings_field() output?
- Fallback when Transient API fails
- register_setting() vs add_option()
- Settings API – save an array of options as one setting (array_push?)
- Setting ‘autoload’ to ‘no’ with Settings API
- Serialized settings in rest api
- Can’t output do_settings_sections . Can’t understand why
- Settings API erases itself?
- Settings API – how to update multiple options manually?
- Single callback with multiple setting fields
- Settings API – how to update options manually?
- how can I detect that option value has changed?
- How to display some settings for super admin user only using Settings API
- Is there a limit to the number of options you can store in one settings field of wp_options?
- Settings API get_option best practices
- Custom theme options Radio inputs not saving
- Settings API: Change position of custom setting field
- Tab from Settings API resetting all options with INSERT INTO [closed]
- Getting settings saved two times in settings page with tab
- Putting my site live
- get_option array value defaults and best practices
- The Settings API – What is the purpose of default value in register_setting?
- settings_fields doesn’t appear to be running
- Settings API – Separating PHP and HTML
- Two settings_fields in one form
- Can’t save checkbox option
- Work flow for multiple developers
- Save & Publish disabled for two dimensional array Customizer
- Cannot save using register_setting
- Move Custom Fields on General Settings Page to New Location
- Settings API validation callback
- How to save custom settings api fields with custom section fuction
- How to retrieve the options from this options page?
- Add description to custom plugin setting
- Block properties, attributes and settings
- Settings API and ‘type’ => ‘font’
- ‘delete_option()’ only deleting the value, not the key/value pair
- How to add a Reset to Defaults button with Settings API?
- Retrieve my custom settings in the settings/ API endpoint
- Is it possible to have a global parameter page which allows to configure other plugins in the same place?
- Multiple checkbox doesn’t work in wordpress settings api
- Is there a standard technique or API for getting the site header image?
- Help to create the best plugin settings!
- How to save Checkbox-Options in Plugin Options Page
- Problem with checkbox in Settings API
- Options saved and called in wrong order
- User specific settings, limited by role
- Access saved Options / Settings
- Dynamically Update Key in Associative Array When Saving Settings
- Extend WP_Customize_Control with Multiple Field Control
- Custom options – register, defaults and delete empty fields (Settings API)
- retrieve theme custom settings
- Incorporating the Settings API in WordPress Themes – by Chip Bennet
- How to add options for Pages?
- options validator input is false?
- Best place to store company address
- The issue of redirecting my site to a new domain
- Where to adjust presets for slider options “auto rotate” (3, 5, 10, 15 seconds)? [closed]
- change backend header options
- Ignore “empty” fields when saving
- What is the real purpose of the parameter $option_group in the function register_setting()?
- Are transients garbage collected?
- How to get the Date Format and Time Format settings for use in my template?
- Are all options loaded to memory on each request?
- How does object caching work?
- Settings API vs Theme Customizer
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- How to use checkbox and radio button in options page?
- how to update serialized options programatically?
- get_option() vs get_theme_mod(): Why is one slower?
- Is get_option function cached?
- New WP_Customize API – how does it work under the hood?
- Performance with autoload and the options table
- What’s the difference between Options & Settings?
- Using widget options ‘outside’ the widget
- What are the advantages to the Settings API?
- How to load WordPress on non WP page?
- Run function AFTER theme options are saved?
- Where to store plugin settings fields
- Options for CDN with WordPress Including Supporting Plugins?
- Option to set static front page disappeared from admin reading settings
- WordPress Settings API, Implementing Tabs On Custom Menu Page
- How to set up default values for a plugin?
- Add on the fly tabs to plugin options
- Why does WordPress use serialize rather than json_encode for the options table? [duplicate]
- Plugin options will not save in database
- What’s the best method for emptying an option created with the Settings API?
- Settings API – easiest way of validating checkboxes?
- Default value for add_settings_field
- Disable Visible Edit Shortcuts in the Customizer
- No option to allow search engines to index my site in WP 4.3
- How to update an ‘array’ option using wp-cli [duplicate]
- Plugin options autoloading
- Where should I use get_option in a plugin