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!