Import file json redux framework
-
Hi
Redux framework I use for my themes. How t can import files of Redux theme-config.json behalf customizer.dat file?
Thanks!
-
Hi,
Redux framework import is not yet supported in this plugin.
Some of the users already asked for it (redux framework), so if more people will show interest in it, then we might integrate it in the plugin.
I will close this ticket for now, but I would invite others to leave a comment here, if they want the redux import in this plugin.
Have a nice day!
@capuderg, great work on the plugin!! I just started testing with it yesterday and really like what I have seen so far.
I am using Redux Framework in the theme I am developing and would love to see this plugin support it.
@trungjayce, for now I am using the “pt-ocdi/after_import” hook to make this work. Just use the code below in your functions.php…
function your_prefix_after_import() { $json = get_template_directory().'/includes/demo-data/redux_options_your_file.json'; $json_data = file_get_contents( $json ); $result = json_decode($json_data, true); $redux_framework = ReduxFrameworkInstances::get_instance('your_opt_name'); $redux_framework->set_options($result); } add_action('pt-ocdi/after_import', 'your_prefix_after_import');
Obviously change the file name and Redux Framework option name to your own.
I haven’t tested much, but seems to work well.
Hope this helps.
- This reply was modified 8 years, 1 month ago by Shawn Hayes. Reason: Didn't want to create confusion
Hi @sharewebdesign,
thanks for sharing this with others!
There is still no short-term plan for Redux Framework support, but we will add it eventually…
Take care!
Hello!
I would love to see a Redux Framework support for this plugin where it allows us to import the Redux options (.Json) file.
Thank you very much.
Hi,
yeah, I think we will add it in the next version of the plugin.
Thank you all, for letting us know about this feature request.
Take care!
Waiting for this feature…
Hi,
working on the new version… Should be out in a week or two.
Take care!
Hi everyone!
We are close to the release of version 2.0.0, where we also add the support for Redux framework.
Before we release it, I would like to get some feedback/testing from you. Please test this release candidate for the version 2.0.0: https://dl.dropboxusercontent.com/u/14641788/OCDI/one-click-demo-import-2.0.0-RC.zip
To add predefined import files and option name for Redux, you have to use the
pt-ocdi/import_files
filter with the following data structure:function ocdi_import_files() { return array( array( 'import_file_name' => 'Demo Import 2', 'import_file_url' => 'https://www.your_domain.com/ocdi/demo-content2.xml', 'import_widget_file_url' => 'https://www.your_domain.com/ocdi/widgets2.json', 'import_customizer_file_url' => 'https://www.your_domain.com/ocdi/customizer2.dat', 'import_redux' => array( array( 'file_url' => 'https://www.your_domain.com/ocdi/redux.json', 'option_name' => 'redux_option_name', ), array( 'file_url' => 'https://www.your_domain.com/ocdi/redux2.json', 'option_name' => 'redux_option_name_2', ), ), 'import_preview_image_url' => 'https://www.your_domain.com/ocdi/preview_import_image2.jpg', 'import_notice' => __( 'A special note for this import.', 'your-textdomain' ), ), ); } add_filter( 'pt-ocdi/import_files', 'ocdi_import_files' );
If you are using local files (inside the theme), use this example:
function ocdi_import_files() { return array( array( 'import_file_name' => 'Demo Import 2', 'local_import_file' => trailingslashit( get_template_directory() ) . 'ocdi/demo-content2.xml', 'local_import_widget_file' => trailingslashit( get_template_directory() ) . 'ocdi/widgets2.json', 'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer2.dat', 'local_import_redux' => array( array( 'file_path' => trailingslashit( get_template_directory() ) . 'ocdi/redux.json', 'option_name' => 'redux_option_name', ), array( 'file_path' => trailingslashit( get_template_directory() ) . 'ocdi/redux2.json', 'option_name' => 'redux_option_name_2', ), ), 'import_preview_image_url' => 'https://www.your_domain.com/ocdi/preview_import_image2.jpg', 'import_notice' => __( 'A special note for this import.', 'your-textdomain' ), ), ); } add_filter( 'pt-ocdi/import_files', 'ocdi_import_files' );
There are also some other changes and improvements, but most notable one is the different layout for multiple predefined demo imports (we replaced the dropdown select, with a nice grid layout).
Please test it out and let me know how it goes! Thanks!
Take care!
Hi,
Thank yor for this plugin!!
I tested version 2.0.0 but I get this error :—Importing Redux settings—
The Redux plugin is not activated, so the Redux import was skipped!Info:
1.I have Redux Framework included in my Theme.
2.I changed option_name with my theme option_name.Thanks,
BekeHi,
thanks for this bug report!
We do not use Redux framework, so this testing is much appreciated! ??
The check for active Redux is currently only a check for this class “ReduxFrameworkPlugin”. I didn’t know, you can integrate it into the theme :S
I’ll fix this by the end of this week and I’ll send you a new zip file to test, if you will be so kind of course ??
Take care!
Hi,
Here is the latest release candidate: https://dl.dropboxusercontent.com/u/14641788/OCDI/OCDI-v2.0.0-RC3.zip
@beke_ro Could you please test it again and let me know, if it works ok? I’m planning to make the official update tomorrow.
Thanks!
Hi,
Perfect! Everything is OK!!!
Thanks,
BekeGreat, @beke_ro thanks for the test!
The update is out! Version 2.0.0 is available for download! ??
@capuderg, You da Man, Man!! ??
Thank you for all your hard work on this. Really appreciate it!!
Best regards,
Shawn
- The topic ‘Import file json redux framework’ is closed to new replies.