<?php  
function ocdi_import_files() {
	return array(
		array(
			'import_file_name'           => 'Moddroid Demo',
			'categories'                 => array( 'Moddroid' ),
			'import_file_url'            => EX_THEMES_URI.'/demo/content.xml',
			'import_widget_file_url'     => EX_THEMES_URI.'/demo/demo-widget-moddroid.wie', 
			'import_customizer_file_url' => EX_THEMES_URI.'/demo/demo-data-moddroid.dat', 
			'import_redux'               => array(
				array(
					'file_url'    => EX_THEMES_URI.'/demo/demo-redux-moddroid.json', 
					'option_name' => 'opt_themes',
				),
			),
			'import_preview_image_url'   =>  'https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxNTnCRN86z0Eik94-0qu5lwqyzaKpXoh3iYRGaJJoDZnMNSasi9R53hEK_LMiYqEjmgs3TZ1WPHVTYNRb6iuiP644VVVPyEQ_j-_6LYzpWbnci1lI_A9vqmszHlHYuwrPUpNzAiuy8r0X31JF-F-mCPU-70RRWs3FeDEJGbSbLj8SQOXpF1ODxBVPudY/s1600/moddroid.jpg',
			'import_notice'              => __( 'before you import this demo, you have to install all required plugins.', THEMES_NAMES ),
			'preview_url'                => 'https://moddroid.demos.web.id',
		),
		array(
			'import_file_name'           => 'Modyolo Demo',
			'categories'                 => array( 'Modyolo' ),
			'import_file_url'            => EX_THEMES_URI.'/demo/content.xml',
			'import_widget_file_url'     => EX_THEMES_URI.'/demo/demo-widget-modyolo.wie', 
			'import_customizer_file_url' => EX_THEMES_URI.'/demo/demo-data-modyolo.dat', 
			'import_redux'               => array(
				array(
					'file_url'    => EX_THEMES_URI.'/demo/demo-redux-modyolo.json', 
					'option_name' => 'opt_themes',
				),
			),
			'import_preview_image_url'   => 'https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ3afmqTAXrmd6rQ0XaR5B1IL7mWUlXi-Krzzf4shT-bkSsfagUiPHBEIDnXZ3toyznPtvsW32QDTL15vRUBQxTIAId3G6lw3Q9ACuNFryz3M0lAIaNvSzjhG9AwczvW5Tkyh9hh_g0uMqEs5Vou2Omu5i4h_IqHZlpfkTEU8W8tQIJq5r2yGdhxp1iaE/s1600/modyolo.jpg',
			'import_notice'              => __( 'before you import this demo, you have to install all required plugins.', THEMES_NAMES ),
			'preview_url'                => 'https://modyolo.demos.web.id',
		),
		array(
			'import_file_name'           => 'Reborn Demo',
			'categories'                 => array( 'Reborn' ),
			'import_file_url'            => EX_THEMES_URI.'/demo/content.xml',
			'import_widget_file_url'     => EX_THEMES_URI.'/demo/demo-widget-reborn.wie', 
			'import_customizer_file_url' => EX_THEMES_URI.'/demo/demo-data-reborn.dat', 
			'import_redux'               => array(
				array(
					'file_url'    => EX_THEMES_URI.'/demo/demo-redux-reborn.json', 
					'option_name' => 'opt_themes',
				),
			),
			'import_preview_image_url'   => 'https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNMUZQCWxmXq23IXa532znxkroRi-w-1sMrQxV9nVsK3E0Z-U_8IPTq8Hf4pg1pDHBiPZ5qcnwhaR2j0MND5mqgCwiJHO67vEWnp4M85kGWTc5Nf1zGy5q9cvhabM8-T3N5AwwoAib4Wijv-l1_C_8ILqpMBggo8GhTNWMBR4G5JYZVciMfF3ZO842OEw/s1600/reborn-moddroid.jpg',
			'import_notice'              => __( 'before you import this demo, you have to install all required plugins.', THEMES_NAMES ),
			'preview_url'                => 'https://moddroid-reborn.demos.web.id/',
		),
		array(
			'import_file_name'           => 'Liteapks Demo',
			'categories'                 => array( 'Liteapks' ),
			'import_file_url'            => EX_THEMES_URI.'/demo/content.xml',
			'import_widget_file_url'     => EX_THEMES_URI.'/demo/demo-widget-liteapks.wie', 
			'import_customizer_file_url' => EX_THEMES_URI.'/demo/demo-data-liteapks.dat', 
			'import_redux'               => array(
				array(
					'file_url'    => EX_THEMES_URI.'/demo/demo-redux-liteapks.json', 
					'option_name' => 'opt_themes',
				),
			),
			'import_preview_image_url'   => EX_THEMES_URI.'/assets/img/liteapks.png',
			'import_notice'              => __( 'before you import this demo, you have to install all required plugins.', THEMES_NAMES ),
			'preview_url'                => 'https://liteapks.demos.web.id/',
		),
		/* 
		array(
			'import_file_name'           => 'RTL Demo',
			'categories'                 => array( 'RTL' ),
			'import_file_url'            => EX_THEMES_URI.'/demo/demo-content-rtl.xml',
			'import_widget_file_url'     => EX_THEMES_URI.'/demo/demo-widgets-rtl.wie', 
			'import_customizer_file_url' => EX_THEMES_URI.'/demo/demo-data-rtl.dat', 
			'import_redux'               => array(
				array(
					'file_url'    => EX_THEMES_URI.'/demo/demo-redux-rtl.json', 
					'option_name' => 'opt_themes',
				),
			),
			'import_preview_image_url'   => EX_THEMES_URI.'/assets/img/moddroid-rtl.jpg',
			'import_notice'              => __( 'before you import this demo, you have to install all required plugins.', THEMES_NAMES ),
			'preview_url'                => 'https://moddroid-rtl.demos.web.id/',
		),
		*/
	);
}
add_filter( 'ocdi/import_files', 'ocdi_import_files' );

if ( ! function_exists( 'ocdi_after_import' ) ) :
	/**
	 * Set action after import demo data. Plugin require is. https://wordpress.org/plugins/one-click-demo-import/
	 *
	 * @param Array $selected_import Import selected.
	 * @since v.1.0.0
	 * @link https://wordpress.org/plugins/one-click-demo-import/faq/
	 *
	 * @return void
	 */
	function ocdi_after_import( $selected_import ) {
		// Menus to Import and assign - you can remove or add as many as you want.
		$top_menu    = get_term_by( 'name', 'Top menus', 'nav_menu' );
		$second_menu = get_term_by( 'name', 'Second menus', 'nav_menu' );

		set_theme_mod(
			'nav_menu_locations',
			array(
				'primary'   => $top_menu->term_id,
				'secondary' => $second_menu->term_id,
			)
		);

	}
endif;
//add_action( 'pt-ocdi/after_import', 'ocdi_after_import' );

if ( ! function_exists( 'change_time_of_single_ajax_call' ) ) :
	/**
	 * Change ajax call timeout
	 *
	 * @link https://github.com/awesomemotive/one-click-demo-import/blob/master/docs/import-problems.md.
	 */
	function change_time_of_single_ajax_call() {
		return 60;
	}
endif;
//add_action( 'pt-ocdi/time_for_one_ajax_call', 'change_time_of_single_ajax_call' );

// disable generation of smaller images (thumbnails) during the content import.
//add_filter( 'pt-ocdi/regenerate_thumbnails_in_content_import', '__return_false' );

// disable the branding notice.
//add_filter( 'pt-ocdi/disable_pt_branding', '__return_true' );
