Archived topic
Import settings by plugin
3 replies · Started by e-ducativa on May 7, 2018
Hi!
I would like to know if the settings can be imported in any other way than "manual". I would like, for example, to make my own plugin which imports certain settings from a file previously exported.
Thanks!
Hi there,
I'm not too sure what you mean. Are you talking about the settings you've exported in "Appearance> GeneratePress"?
Yes, that file exported from Appearance>GeneratePress.
So if you don't want to use the "Import" form in "Appearance > GeneratePress", you would have to write a function to parse the file and loop through each setting. Unfortunately it's quite complex, so I can't lay out how to do it here. However, if you look at the code for the Import / Export module, you'll see how we do it :)