7 Comments

  1. Sebastien Dumont

    I’m just a little curious, what plugin settings does this version of customizer import/export plugin migrate?

    Report

  2. Justin Busa

    Hey Sebastien. Thanks for asking! Right now, the only settings it will export are those stored in the database as theme mods. For a plugin’s settings to be exported it would need to be creating customizer controls and settings that aren’t defined as options. I’m not opposed to looking at other ways it can export settings that aren’t stored as theme mods, so if you any suggestions, I’d love to hear them!

    Report

  3. Vladimir Prelovac

    Transferring plugin/themes settings in WordPress is a hard problem to solve as there is no widely used standard. We were actually thinking of developing a two hook API for getting and setting the settings, but that would still need to have adoption with developers. Good effort Justin.

    Report

    • Justin Busa

      Thanks, Vladimir! That’s why theme mods really spurred my interest. They are one of the few things in that arena that are standardized. I like your idea for hooks and was actually thinking of working something like that into the plugin, but as you mentioned that would still need to be adopted by developers to make a difference. At the very least, I’m hoping this plugin can spark some awareness/conversation about moving in that direction.

      Report

  4. Justin

    I love the idea of the plugin but dislike the name. It is a bit misleading. This will not work with all themes that use the customizer. It will probably only work with a handful of plugins because most plugins wouldn’t save their options as theme mods. It would’ve been more accurately named Theme Mods Import/Export.

    See, the Customizer is not an API for storing/retrieving options, so there’s really nothing to import or export. It’s an API for displaying a settings screen. Plugins and themes can store settings in 1 of 4 ways: theme mods, single options, array of options, or something custom. A theme can even use a combination of those methods, depending on the circumstances. The only method that is standardized for figuring out settings is theme mods. With that method, you can grab the correct option from the database.

    Report

    • Justin Busa

      Thanks for the input, Justin! You make a good point about the name, although it is an export/import experience that lives in the Customizer, so I think the name still works. One idea that I’ve had to make it more than just a theme mod export/import is to add hooks that developers could tap into for any settings that are stored in a different way. If that were to catch on then I think the current name would be more appropriate.

      Report

  5. Derek

    It would be nice if there was a php function that we could drop into the functions.php file of a child theme so that it would use the theme mods of the parent theme, and be overwritten by changes in the child theme customizer.

    Kind of the way you enqueue a parent stylesheet then a child stylesheet.

    So use theme mods from parent theme, then theme mods from child theme.

    Report

Comments are closed.

%d bloggers like this: