Personally I think keeping your mods in an array is a nice solution, but transferring them shouldn’t be too difficult. Just loop through the array like this:
$all_mods = get_theme_mod('thefunk_theme_options'); // retrieve array
foreach ($all_mods as $key -> $value) {
if (!empty($value)) set_theme_mod ($key,$value); // set array element as separate mod
}
Since you have to do this only once, when the updated theme is ran first, you may want to insert an extra check upfront and delete the array afterwards.
Related Posts:
- Is it possible ( or advisable) to allow open access to the new theme customizer for potential clients?
- Add a dropdown to theme customizer
- How to deploy a new theme/theme options from staging to production site
- WordPress Customizer Typography: How to load just the unique Google Fonts?
- How to remove menus section from WordPress theme customizer
- How to hook CSS file according to theme selection in the customizer section
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- after_setup_theme, Global Variable and Theme Customizer
- For best DB performance should I serialize all theme options together or by type?
- get_option in header.php not returning value from customizer
- Internal error 500 accessing Theme > Customize
- Using an if statement in the theme customizer page
- How can I make my options in an array and store theme in WP options one DB row?
- How to disable wordpress from overload my stylesheet styles with customizer styles
- How to enqueue javascript for WP Customize options sidebar?
- Efficiency of wp_options vs a new table
- Change WordPress header color using customizer
- How to transfer one domain to another domain without losing theme options (customizer)?
- Alignment Problem [closed]
- WP Customazation API doesn’t save the default Value
- Customize Option Framework
- Related Post Category Filter
- In wordpress customizer div still showing even if I hid it with javascript
- Customizer API Multi Sections in single Panel
- Duplicate child theme incl. design changes
- How to customize the colors within a stylesheet using a WordPress setting
- Customizer_register theme options not saving
- Using Customizer value in an external PHP file inside a theme
- “No Data Received” error in Chrome every time i try to update the theme functions file
- trying to figure out how to use more that one image upload in the same section in theme customizer
- How to show associated fields if checkbox is checked in customize widget screen using wp_customize?
- How To extend WP_Customize_Control
- Get entered value of customiser field for live preview
- How To Add New Option Types To Option Tree?
- Theme Customizer : how to create multiple-level panel
- Customizer Active Callback not working
- How to export/import theme customizer settings?
- How to execute conditional script when on new customize.php (Theme Customize) screen
- Trigger Customizer saving process with Javascript only
- Adding customizer styles with wp_add_inline_style
- How to set the default value of a option in a theme?
- WordPress settings API error when checkbox unchecked
- Is it possible to display the admin bar while in the Theme Customizer?
- How do I get a parent theme modification from a child theme?
- How to Change CSS Variable value in Theme Customizer Live Preview
- How to set page template on front using starter content?
- WordPress Customizer Control with React
- How to change the customizer´s sidebar width?
- Theme Options page not showing up in admin menu
- How i can get widgets areas working in customizer?
- How can i add edit shortcut icon in wordpress customizer without using selective refresh?
- Add new panel inside parent panel in WP Customize?
- Unable to pass variable on theme cusomizer add_settings()
- How to add field customizable by the theme editor to your theme?
- Get a setting value conditionally in the Customizer api
- WP_Customize_Color_Control omitting # symbol
- How would you accomplish the following advanced settings page?
- How to change database values on theme update
- Q: How to pull data from custom table to populate zustomizer setting/control select options
- Dynamically generated wordpress customizer options?
- The ‘default’ attribute from $wp_customize->add_setting() method not in db?
- Override customizer values on a per-menu base
- Is it possible to save more than one image to an option?
- correct tags for validating input types
- What is the meaning of WordPress’s recommended css classes and where are they applied?
- Would to use AJAX to get an option from the database and use it in a jquery setup or is there an alternative to consider?
- Why in the static pages of my theme are showing these information?
- Can I make a Customizer dropdown-pages list include private pages?
- Check if( selected() )
- How do I merge 2 WordPress Themes?
- Theme logo metadata into template file
- Customizer: get_preview_url() inside customize_save_after hook
- How to get DB options format without saving? [closed]
- Twenty Twelve Author not displaying
- Sample Theme Options page for Multisite – what to consider
- help needed for suit designing tool
- Let user to upload multiple time
- How to dynamically set a background image with the customizer without putting the css as an inline-style
- Default customizer colors aren’t displayed outside of the preview
- WordPress Custom Theme : Theme Builder vs ACF vs Gutenberg
- Theme does not allow shortcodes
- fetch all post from wp multisite network and sort all the post in descending order on the basis of “Created by ” term
- What is an alternative to not using child theme to customize a WordPress theme?
- Debugging slow WordPress Theme Customizer (Any option similar to Query Monitor)?
- Create settings field on button click
- Add multiple sections, settings and controls at once to the Customizer
- how to call options on front end and add logo
- Missing hashtag with theme customizer header color
- Create new sidebars trough admin post/page metabox
- Editable screenshot.png in a custom theme developed
- get_theme_mod not pulling css colors into header using wp_head
- Theme customizer live preview JS- Trying to bind to an html image url without luck
- Theme automatically inserting “more” tag on every post
- Theme Option’s Save Button is not working
- wp_deregister_script was called incorrectly
- Undefined index: debuging error for theme option template snippet
- How do I make it super customisable?
- Theme.json: creating different sections of the color palette
- Website Developer has gone missing! How to gain full access of your code from a WordPress website?
- How to make a multilingual wordpress site to be translated one-to-one without much effort and without using translate?