Add new option to import custom json file
-
I was wondering if there is a way to add an extra option to import an external JSON theme file and include it in the one-click import process. Something like this:
function ocdi_import_files() { return [ [ 'import_file_name' => 'Demo Import 1', 'import_file_url' => get_stylesheet_directory_uri() . '/demo-data/demo-content.xml', 'import_widget_file_url' => get_stylesheet_directory_uri() . '/demo-data/widget-content.wie', 'import_customizer_file_url' => get_stylesheet_directory_uri() . '/demo-data/customizer-content.dat', 'import_preview_image_url' => get_stylesheet_directory_uri() . '/screenshot.png', 'preview_url' => 'http://test.test/', 'import_json' => array( array( 'file_url' => trailingslashit( get_stylesheet_directory_uri() ) . '/demo-data/gp-export.json', 'option_name' => 'GP_option_name', ), ), ], ]; } add_filter( 'ocdi/import_files', 'ocdi_import_files' );Would that be possible? Also, would it be possible to add the extra JSON import to the manual demo file import list?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘Add new option to import custom json file’ is closed to new replies.