I recently got one of my wp themes disabled because of this reason, and one of my features is heavily based on OptionTree, basically all it’s fields belong to it. Even SQL file does not work properly.
I really appreciate any help from OT developers and / or Themeforest authors.
As far as I know, XML import is deprecated. You should use a php file for importing settings and theme-options.txt to import theme options.
Maybe this could help too:https://github.com/valendesigns/option-tree/issues/122
I forgot to mention that this method is not the best solution as well. You should write a function to import options once theme is being activated…
I have no idea what function.. is it the one on the link you’ve sent?
Is there anyone out there using OT and has a solution for this issue please?
Come on, nobody?
Just try to export your theme options in text format in a file named theme-options.txt and put it in option-tree in your theme root directory.
If you upgrade to OT v2.1.3, This will automatically import your theme options once someone installs your theme. The function that I told is something that you should upgrade in the future. I guess this will help you to get your theme approve again for now…
I just update to the latest OT version, the post types that contain metaboxes from OT don’t import anything that I HAVE CUSTOM FIELDS. I updated to latest WP, OT, exported and then imported into another testing environment.
Maybe a solution is try something like this:
- Create a function that will run when theme is activated or when a Import Options button is used - Inside this, create a var that has your theme options array (try use get_option to get the array and a PHP debug function to get the values, for example) - Then, use the function update_option to change these values automatically.
It works with Options Framework, but don’t know about OptionTree. Probably the concept is the same.