芝麻web文件管理V1.00
编辑当前文件:/home/elegucvf/public_html/elementor/app/modules/import-export/runners/import/site-settings.php
kits_manager->get_active_kit(); $this->active_kit_id = (int) $active_kit->get_id(); $this->previous_kit_id = (int) Plugin::$instance->kits_manager->get_previous_id(); $result = []; $old_settings = $active_kit->get_meta( PageManager::META_KEY ); if ( ! $old_settings ) { $old_settings = []; } if ( ! empty( $old_settings['custom_colors'] ) ) { $new_site_settings['custom_colors'] = array_merge( $old_settings['custom_colors'], $new_site_settings['custom_colors'] ); } if ( ! empty( $old_settings['custom_typography'] ) ) { $new_site_settings['custom_typography'] = array_merge( $old_settings['custom_typography'], $new_site_settings['custom_typography'] ); } if ( ! empty( $new_site_settings['space_between_widgets'] ) ) { $new_site_settings['space_between_widgets'] = Utils::update_space_between_widgets_values( $new_site_settings['space_between_widgets'] ); } $new_site_settings = array_replace_recursive( $old_settings, $new_site_settings ); $new_kit = Plugin::$instance->kits_manager->create_new_kit( $title, $new_site_settings ); $this->imported_kit_id = (int) $new_kit; $result['site-settings'] = (bool) $new_kit; return $result; } public function get_import_session_metadata() : array { return [ 'previous_kit_id' => $this->previous_kit_id, 'active_kit_id' => $this->active_kit_id, 'imported_kit_id' => $this->imported_kit_id, ]; } }