If you make custom admin panel and save theme settings in database, are these settings included in import/export of dummy data?
- Attended a Community Meetup
- Australia
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
- Author was Featured
- Bought between 100 and 499 items
- Contributed a Blog Post
- Exclusive Author
rvision_ said
If you make custom admin panel and save theme settings in database, are these settings included in import/export of dummy data?
I’m not sure, but why not creating default values that can be stored as soon as the user activates your theme?
Makes more sense than having to have your user importing stuff that he doesn’t need to get your theme running.
I’m not sure, but why not creating default values that can be stored as soon as the user activates your theme?
+1 That’s how we did it as well.
Guys, default values issue was not my question.
If panel settings are not included with the import/export, wouldn’t be better idea to have theme settings stored locally, for example as JSON , in a file in a theme folder?
rvision_ said
Guys, default values issue was not my question. If panel settings are not included with the import/export, wouldn’t be better idea to have theme settings stored locally, for example as JSON , in a file in a theme folder?
http://en.support.wordpress.com/export/ says that an export will contain posts, pages, comments, categories, and tags. You have to export your options separately, which makes sense, because users might be exporting to a blog that uses a different theme, or maybe restoring a backup where they wouldn’t want to overwrite their saved options.
Ok, then – theme options are separated from the blog content?
What do you think about idea to have custom options framework which saves options as a file in theme /data/ folder and has a default options file set? One can, for example, set the theme locally and then upload everything on the server and have the settings he salready set.
Reading those options would be cached, offcourse.
rvision_ said
Ok, then – theme options are separated from the blog content?What do you think about idea to have custom options framework which saves options as a file in theme /data/ folder and has a default options file set? One can, for example, set the theme locally and then upload everything on the server and have the settings he salready set.
Reading those options would be cached, offcourse.
That’s what I’m doing with the theme I’m working on. I just have a giant XML with all of my default option values. Then there is the option to import that XML to set all of the options. There is also an option to export to XML for backup or for setting up another blog with the same options.
fillerspace said
rvision_ saidThat’s what I’m doing with the theme I’m working on. I just have a giant XML with all of my default option values. Then there is the option to import that XML to set all of the options. There is also an option to export to XML for backup or for setting up another blog with the same options.
Ok, then – theme options are separated from the blog content?What do you think about idea to have custom options framework which saves options as a file in theme /data/ folder and has a default options file set? One can, for example, set the theme locally and then upload everything on the server and have the settings he salready set.
Reading those options would be cached, offcourse.
But they are inserted into database after importing or you’re just reading that settings file?
fillerspace said
rvision_ saidThat’s what I’m doing with the theme I’m working on. I just have a giant XML with all of my default option values. Then there is the option to import that XML to set all of the options. There is also an option to export to XML for backup or for setting up another blog with the same options.
Ok, then – theme options are separated from the blog content?What do you think about idea to have custom options framework which saves options as a file in theme /data/ folder and has a default options file set? One can, for example, set the theme locally and then upload everything on the server and have the settings he salready set.
Reading those options would be cached, offcourse.
I work on a same framework.
I like the XML idea because it is more flexible.
rvision_ said
fillerspace saidBut they are inserted into database after importing or you’re just reading that settings file?
rvision_ saidThat’s what I’m doing with the theme I’m working on. I just have a giant XML with all of my default option values. Then there is the option to import that XML to set all of the options. There is also an option to export to XML for backup or for setting up another blog with the same options.
Ok, then – theme options are separated from the blog content?What do you think about idea to have custom options framework which saves options as a file in theme /data/ folder and has a default options file set? One can, for example, set the theme locally and then upload everything on the server and have the settings he salready set.
Reading those options would be cached, offcourse.
When the user imports, I read the XML , convert it to a PHP array, and then insert that into the database. When using the theme, I read the options from the database. When they are ready to export, I read the options from the database into an array, and then create XML from that.
