Last active
February 19, 2025 15:16
-
-
Save Niloys7/4f7117f91488d8dda56aa73e18914496 to your computer and use it in GitHub Desktop.
one click demo import (OCDI) is not adding elementor global options
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