芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/cepali.edu.mx/wp-content/plugins/one-click-demo-import/inc/ImportActions.php
importer->get_importer_data(); $term_ids = $content_import_data['mapping']['term_id']; // Set the new menu ID for the widget. $widget['nav_menu'] = $term_ids[ $widget['nav_menu'] ]; return $widget; } /** * Execute the widgets import. * * @param array $selected_import_files Actual selected import files (content, widgets, customizer, redux). * @param array $import_files The filtered import files defined in `ocdi/import_files` filter. * @param int $selected_index Selected index of import. */ public function widgets_import( $selected_import_files, $import_files, $selected_index ) { if ( ! empty( $selected_import_files['widgets'] ) ) { WidgetImporter::import( $selected_import_files['widgets'] ); } } /** * Execute the Redux import. * * @param array $selected_import_files Actual selected import files (content, widgets, customizer, redux). * @param array $import_files The filtered import files defined in `ocdi/import_files` filter. * @param int $selected_index Selected index of import. */ public function redux_import( $selected_import_files, $import_files, $selected_index ) { if ( ! empty( $selected_import_files['redux'] ) ) { ReduxImporter::import( $selected_import_files['redux'] ); } } /** * Execute the customizer import. * * @param array $selected_import_files Actual selected import files (content, widgets, customizer, redux). * @param array $import_files The filtered import files defined in `ocdi/import_files` filter. * @param int $selected_index Selected index of import. */ public function customizer_import( $selected_import_files ) { if ( ! empty( $selected_import_files['customizer'] ) ) { CustomizerImporter::import( $selected_import_files['customizer'] ); } } /** * Execute the action: 'ocdi/before_content_import'. * * @param array $selected_import_files Actual selected import files (content, widgets, customizer, redux). * @param array $import_files The filtered import files defined in `ocdi/import_files` filter. * @param int $selected_index Selected index of import. */ public function before_content_import_action( $selected_import_files, $import_files, $selected_index ) { $this->do_import_action( 'ocdi/before_content_import', $import_files[ $selected_index ] ); } /** * Execute the action: 'ocdi/before_widgets_import'. * * @param array $selected_import_files Actual selected import files (content, widgets, customizer, redux). * @param array $import_files The filtered import files defined in `ocdi/import_files` filter. * @param int $selected_index Selected index of import. */ public function before_widget_import_action( $selected_import_files, $import_files, $selected_index ) { $this->do_import_action( 'ocdi/before_widgets_import', $import_files[ $selected_index ] ); } /** * Execute the action: 'ocdi/after_import'. * * @param array $selected_import_files Actual selected import files (content, widgets, customizer, redux). * @param array $import_files The filtered import files defined in `ocdi/import_files` filter. * @param int $selected_index Selected index of import. */ public function after_import_action( $selected_import_files, $import_files, $selected_index ) { $this->do_import_action( 'ocdi/after_import', $import_files[ $selected_index ] ); } /** * Register the do_action hook, so users can hook to these during import. * * @param string $action The action name to be executed. * @param array $selected_import The data of selected import from `ocdi/import_files` filter. */ private function do_import_action( $action, $selected_import ) { if ( false !== Helpers::has_action( $action ) ) { $ocdi = OneClickDemoImport::get_instance(); $log_file_path = $ocdi->get_log_file_path(); ob_start(); Helpers::do_action( $action, $selected_import ); $message = ob_get_clean(); // Add this message to log file. $log_added = Helpers::append_to_file( $message, $log_file_path, $action ); } } }