-
WIBUHAX0R1337
-
/
home
/
coludnqa
/
xtrasolutionsco.com
/
wp-content
/
plugins
/
one-click-demo-import
/
inc
/
[ Home ]
Create Folder
Create File
Nama File / Folder
Size
Action
CreateDemoContent
--
NONE
CustomizerImporter.php
7.28KB
Edit File
Delete File
Rename
CustomizerOption.php
0.478KB
Edit File
Delete File
Rename
Downloader.php
3.881KB
Edit File
Delete File
Rename
Helpers.php
27.881KB
Edit File
Delete File
Rename
ImportActions.php
6.765KB
Edit File
Delete File
Rename
Importer.php
5.425KB
Edit File
Delete File
Rename
Logger.php
1.38KB
Edit File
Delete File
Rename
OneClickDemoImport.php
31.455KB
Edit File
Delete File
Rename
PluginInstaller.php
17.085KB
Edit File
Delete File
Rename
PluginInstallerSkin.php
1.604KB
Edit File
Delete File
Rename
PluginInstallerSkinSilent.php
1.133KB
Edit File
Delete File
Rename
ReduxImporter.php
2.686KB
Edit File
Delete File
Rename
ViewHelpers.php
2.114KB
Edit File
Delete File
Rename
WPCLICommands.php
9.77KB
Edit File
Delete File
Rename
WPFormsImporter.php
2.269KB
Edit File
Delete File
Rename
WXRImporter.php
3.944KB
Edit File
Delete File
Rename
WidgetImporter.php
12.912KB
Edit File
Delete File
Rename
<?php /** * Class for the Redux importer used in the One Click Demo Import plugin. * * @see https://wordpress.org/plugins/redux-framework/ * @package ocdi */ namespace OCDI; class ReduxImporter { /** * Import Redux data from a JSON file, generated by the Redux plugin. * * @param array $import_data Array of arrays. Child array contains 'option_name' and 'file_path'. */ public static function import( $import_data ) { $ocdi = OneClickDemoImport::get_instance(); $log_file_path = $ocdi->get_log_file_path(); // Redux plugin is not active! if ( ! class_exists( 'ReduxFramework' ) ) { $error_message = esc_html__( 'The Redux plugin is not activated, so the Redux import was skipped!', 'one-click-demo-import' ); // Add any error messages to the frontend_error_messages variable in OCDI main class. $ocdi->append_to_frontend_error_messages( $error_message ); // Write error to log file. Helpers::append_to_file( $error_message, $log_file_path, esc_html__( 'Importing Redux settings' , 'one-click-demo-import' ) ); return; } foreach ( $import_data as $redux_item ) { $redux_options_raw_data = Helpers::data_from_file( $redux_item['file_path'] ); $redux_options_data = json_decode( $redux_options_raw_data, true ); $redux_framework = \ReduxFrameworkInstances::get_instance( $redux_item['option_name'] ); if ( isset( $redux_framework->args['opt_name'] ) ) { // Import Redux settings. if ( ! empty( $redux_framework->options_class ) && method_exists( $redux_framework->options_class, 'set' ) ) { $redux_framework->options_class->set( $redux_options_data ); } else { // Handle backwards compatibility. $redux_framework->set_options( $redux_options_data ); } // Add this message to log file. $log_added = Helpers::append_to_file( /* translators: %s - the name of the Redux option. */ sprintf( esc_html__( 'Redux settings import for: %s finished successfully!', 'one-click-demo-import' ), $redux_item['option_name'] ), $log_file_path, esc_html__( 'Importing Redux settings' , 'one-click-demo-import' ) ); } else { /* translators: %s - the name of the Redux option. */ $error_message = sprintf( esc_html__( 'The Redux option name: %s, was not found in this WP site, so it was not imported!', 'one-click-demo-import' ), $redux_item['option_name'] ); // Add any error messages to the frontend_error_messages variable in OCDI main class. $ocdi->append_to_frontend_error_messages( $error_message ); // Write error to log file. Helpers::append_to_file( $error_message, $log_file_path, esc_html__( 'Importing Redux settings' , 'one-click-demo-import' ) ); } } } }
© 2022 - 2023 WIBUHAXOR V1 By Lutfifakee || Padang Blackhat