Created
March 8, 2025 08:14
-
-
Save arfinmilondev/9341dd4c6804bcb305292b2af0b96092 to your computer and use it in GitHub Desktop.
Import Elementor kit data in OCDI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Function to perform setup after importing data. | |
| * This function assigns the front page and the posts page (blog page) based on the imported demo. | |
| * @param array $selected_import The selected import data. | |
| * @link https://www.codeixer.com/addressing-the-issue-of-one-click-demo-import-not-add-elementor-global-options/ | |
| */ | |
| function cdx_after_import_setup( $selected_import ) { | |
| // Import Elementor kit data. | |
| $cdx_kit_zip = get_parent_theme_file_path() . '/demo-content/elementor-kit.zip'; | |
| $import_export_module = \Elementor\Plugin::$instance->app->get_component( 'import-export' ); | |
| $import_settings['referrer'] = 'remote'; | |
| $import_export_module->import_kit( $cdx_kit_zip, $import_settings ); | |
| } | |
| add_action( 'ocdi/after_import', 'cdx_after_import_setup' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment