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
- Where to store plugin settings fields
- Add on the fly tabs to plugin options
- What’s the best method for emptying an option created with the Settings API?
- Set a Default Value for an Option?
- In the new Theme Customizer API, how to send a value from the front back to the admin panel?
- Passing array in add_option()
- Modify Javascript Configuration Options for Theme Customizer Colour Picker
- What will happen to the additional CSS when the theme is updated?
- Can we allow users to choose front page from theme options?
- Where should I update_options in a theme?
- How to add a default value to get_option if it’s used as a variable?
- Classes and functions involved in serialization and unserialization
- Customizer: active_callback and sanitize_callback incompatibility?
- Set $options reference
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Is there a WordPress boolean for “theme_customizer_active()”?
- Is it necessary to prefix theme_mod, section id and panel id in the customizer?
- 403 error on submit at the plugin options page
- add shortcode support in customizer
- Dynamic Control in customiser
- Update Specific Key Value in Complex `wp_options` object
- Tabbed theme options query about add_settings_section callback function
- How can you store your option at the permalink settings page?
- Uploading and inserting an image using a custom option panel like in the Twenty Ten theme?
- Is it possible to add custom badges to product attributes conditionally, based on custom field?
- How to make sure settings are not lost when plugin is updated?
- WP Optimization: Overwriting options to autoload=yes for often used options?
- Changing the CSS with a plugin
- how to compare update_option() after it saves to database?
- Plugin setting page – update_option problem
- Use delete_option in action link
- Customizer API way function is_customize_preview() works only in main page?
- Edit a custom admin page
- trying to figure out how to use more that one image upload in the same section in theme customizer
- illegal offset in option add