wordpress/wp-content/themes/basic/themify/themify-wpajax.php
/**
 * Imports sample contents to replicate the demo site.
 *
 * @since 1.7.6
 */
Imports sample contents to replicate the demo site.
Imports sample contents to replicate the demo site .
function themify_import_sample_content() {
	$file = themify_get_sample_content_file();
	if ( is_wp_error( $file ) ) {
		wp_send_json_error( array(
			'error' => sprintf( __( 'Failed to get the sample file. Error: %s', 'themify' ), $file->get_error_message() ),
		) );
	}
	define( 'ERASEDEMO', false );
	define( 'IMPORT_IMAGES', isset( $_POST['import_images'] ) && sanitize_text_field( $_POST['import_images'] ) === 'yes' );
	do_action( 'themify_before_demo_import' );
	include THEMIFY_DIR . '/themify-import-functions.php';
	if ( file_exists( $file ) ) {
		include_once( $file );
		themify_do_demo_import();
	}
	do_action( 'themify_after_demo_import' );
	wp_send_json_success( array(
		'actions' => Themify_Import_Helper::get_import_actions(),
	) );
}
function themify_import_sample_content ( ) { $ file = themify_get_sample_content_file ( ) ; if ( is_wp_error ( $ file ) ) { wp_send_json_error ( array ( 'error' => sprintf ( __ ( 'Failed to get the sample file. Error: %s' , 'themify' ) , $ file -> get_error_message ( ) ) , ) ) ; } define ( 'ERASEDEMO' , false ) ; define ( 'IMPORT_IMAGES' , isset ( $ _POST [ 'import_images' ] ) && sanitize_text_field ( $ _POST [ 'import_images' ] ) === 'yes' ) ; do_action ( 'themify_before_demo_import' ) ; include THEMIFY_DIR . '/themify-import-functions.php' ; if ( file_exists ( $ file ) ) { include_once ( $ file ) ; themify_do_demo_import ( ) ; } do_action ( 'themify_after_demo_import' ) ; wp_send_json_success ( array ( 'actions' => Themify_Import_Helper :: get_import_actions ( ) , ) ) ; }
Imports sample contents to replicate the demo site.
Imports sample contents to replicate the demo site .
/* these constants are used in the import.php file */