File "loader.php"

Full Path: /home/cabizcok/public_html/wp-content/themes/renax/includes/loader.php
File size: 25.26 KB
MIME-type: text/x-php
Charset: utf-8

<?php
function renax_import_files() {
	return array(
		array(
			'import_file_name'             => 'Multipage Light Demo',
			'categories'                   => array( 'Multipage Light' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/multi-light/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/widgets.wie',
			//'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/multi-light/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/light.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/',
		),
		array(
			'import_file_name'             => 'Multipage Dark Demo',
			'categories'                   => array( 'Multipage Dark' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/multi-dark/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/widgets.wie',
			//'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/multi-dark/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/dark.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo2',
		),
		
		array(
			'import_file_name'             => 'One Page Light Slider',
			'categories'                   => array( 'One Page Light' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-light/slider/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/widgets.wie',
			//'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-light/slider/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/light.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo3',
		),
		
		array(
			'import_file_name'             => 'One Page Light Image',
			'categories'                   => array( 'One Page Light' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-light/image/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/widgets.wie',
			//'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-light/image/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/light.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo4',
		),
		
		array(
			'import_file_name'             => 'One Page Light Video',
			'categories'                   => array( 'One Page Light' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-light/video/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/widgets.wie',
			//'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-light/video/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/light.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo5',
		),
		
		array(
			'import_file_name'             => 'One Page Light Slideshow',
			'categories'                   => array( 'One Page Light' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-light/slideshow/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/widgets.wie',
			//'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-light/slideshow/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/light.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo6',
		),
		
		array(
			'import_file_name'             => 'One Page Dark Slider',
			'categories'                   => array( 'One Page Dark' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-dark/slider/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/widgets.wie',
			//'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-dark/slider/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/dark.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo7',
		),
		
		array(
			'import_file_name'             => 'One Page Dark Image',
			'categories'                   => array( 'One Page Dark' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-dark/image/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/widgets.wie',
			//'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-dark/image/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/dark.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo8',
		),
		
		array(
			'import_file_name'             => 'One Page Dark Video',
			'categories'                   => array( 'One Page Dark' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-dark/video/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/widgets.wie',
			//'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-dark/video/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/dark.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo9',
		),
		
		array(
			'import_file_name'             => 'One Page Dark Slideshow',
			'categories'                   => array( 'One Page Dark' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-dark/slideshow/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/widgets.wie',
			//'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/one-dark/slideshow/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/dark.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo10',
		),
		
		array(
			'import_file_name'             => 'Multipage Light WooCommerce',
			'categories'                   => array( 'WooCommerce' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/light/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/light/widgets.wie',
			'local_import_customizer_file' => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/light/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/light/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/light.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo11',
		),
		
		array(
			'import_file_name'             => 'Multipage Dark WooCommerce',
			'categories'                   => array( 'WooCommerce' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/dark/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/dark/widgets.wie',
			'local_import_customizer_file' => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/dark/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/dark/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/dark.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo12',
		),
		
		array(
			'import_file_name'             => 'One Page WooCommerce',
			'categories'                   => array( 'WooCommerce' ),
			'local_import_file'            => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/one/demo-content.xml',
			'local_import_widget_file'     => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/one/widgets.wie',
			'local_import_customizer_file' => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/one/customizer.dat',
			'local_import_redux'           => array(
				array(
					'file_path'   => trailingslashit( RENAX_THEME_PATH ) . 'includes/renax-demo/woo/one/redux.json',
					'option_name' => 'renax',
				),
			),
			'import_preview_image_url'     => 'https://duruthemes.com/demo/html/renax/images/dark.png',
			'import_notice'                => __( 'Be patient, it can take a couple of minutes.', 'renax' ),
			'preview_url'                  => 'https://webredox.net/demo/wp/renax/demo13',
		),
		
	);
}
add_filter( 'pt-ocdi/import_files', 'renax_import_files' );

function renax_after_import_setup( $selected_import ) {
	if ( 'One Page Light Slider' === $selected_import['import_file_name'] ) {
		$main_menu = get_term_by( 'name', 'One Page Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'main-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Intro' );
		$blog_page_id  = get_page_by_title( 'News' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	else if ( 'One Page Light Image' === $selected_import['import_file_name'] ) {
		$main_menu = get_term_by( 'name', 'One Page Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'main-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Intro' );
		$blog_page_id  = get_page_by_title( 'News' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	else if ( 'One Page Light Video' === $selected_import['import_file_name'] ) {
		$main_menu = get_term_by( 'name', 'One Page Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'main-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Intro' );
		$blog_page_id  = get_page_by_title( 'News' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	else if ( 'One Page Light Slideshow' === $selected_import['import_file_name'] ) {
		$main_menu = get_term_by( 'name', 'One Page Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'main-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Intro' );
		$blog_page_id  = get_page_by_title( 'News' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	else if ( 'One Page Dark Slider' === $selected_import['import_file_name'] ) {
		$main_menu = get_term_by( 'name', 'One Page Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'main-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Intro' );
		$blog_page_id  = get_page_by_title( 'News' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	else if ( 'One Page Dark Image' === $selected_import['import_file_name'] ) {
		$main_menu = get_term_by( 'name', 'One Page Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'main-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Intro' );
		$blog_page_id  = get_page_by_title( 'News' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	else if ( 'One Page Dark Video' === $selected_import['import_file_name'] ) {
		$main_menu = get_term_by( 'name', 'One Page Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'main-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Intro' );
		$blog_page_id  = get_page_by_title( 'News' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	else if ( 'One Page Dark Slideshow' === $selected_import['import_file_name'] ) {
		$main_menu = get_term_by( 'name', 'One Page Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'main-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Intro' );
		$blog_page_id  = get_page_by_title( 'News' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	else if ( 'Multipage Light Demo' === $selected_import['import_file_name'] ) {
		// Assign menus to their locations.
		$main_menu = get_term_by( 'name', 'Main Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'top-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Home Slider' );
		$blog_page_id  = get_page_by_title( 'Blog List' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	else if ( 'Multipage Dark Demo' === $selected_import['import_file_name'] ) {
		// Assign menus to their locations.
		$main_menu = get_term_by( 'name', 'Main Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'top-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Home Slider' );
		$blog_page_id  = get_page_by_title( 'Blog List' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	
	else if ( 'Multipage Light WooCommerce' === $selected_import['import_file_name'] ) {
		// Assign menus to their locations.
		$main_menu = get_term_by( 'name', 'Main Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'top-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Home Slider' );
		$blog_page_id  = get_page_by_title( 'Blog List' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	
	else if ( 'Multipage Dark WooCommerce' === $selected_import['import_file_name'] ) {
		// Assign menus to their locations.
		$main_menu = get_term_by( 'name', 'Main Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'top-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Home Slider' );
		$blog_page_id  = get_page_by_title( 'Blog List' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}
	
	else if ( 'One Page WooCommerce' === $selected_import['import_file_name'] ) {
		$main_menu = get_term_by( 'name', 'One Page Menu', 'nav_menu' );

		set_theme_mod( 'nav_menu_locations', array(
				'main-menu' => $main_menu->term_id,
			)
		);

		// Assign front page and posts page (blog page).
		$front_page_id = get_page_by_title( 'Intro' );
		$blog_page_id  = get_page_by_title( 'News' );

		update_option( 'show_on_front', 'page' );
		update_option( 'page_on_front', $front_page_id->ID );
		update_option( 'page_for_posts', $blog_page_id->ID );
	}

}
add_action( 'pt-ocdi/after_import', 'renax_after_import_setup' );
//required plugins
function renax_ocdi_register_plugins( $plugins ) {
// Required: List of plugins used by all theme demos.
  $theme_plugins = [
    [ 
	'name'     => 'Redux Framework',
      'slug'     => 'redux-framework',
      'required' => true,
    ],
	[ 
      'name'     => 'Elementor Website Builder',
      'slug'     => 'elementor',
      'required' => true,
    ],
	[
      'name'        => 'Renax Plugin',
      'slug'        => 'renax-plugin',
	  'source'      => 'http://webredox.net/plugins/renax-plugin.zip',
      'required' => true,
    ],
	[ 
      'name'     => 'Meta Box',
      'slug'     => 'meta-box',
      'required' => true,
    ],
	[ 
      'name'     => 'Contact Form 7',
      'slug'     => 'contact-form-7',
      'required' => false,
    ],
	[ 
      'name'     => 'MailChimp for WordPress',
      'slug'     => 'mailchimp-for-wp',
      'required' => false,
    ],
	
	  
  ];
  // Check if user is on the theme recommeneded plugins step and a demo was selected.
  if (
    isset( $_GET['step'] ) &&
    $_GET['step'] === 'import' &&
    isset( $_GET['import'] )
  ) {
 
    // Adding one additional plugin for the first demo import ('import' number = 0).
    if ( $_GET['import'] === '0' ) {
      $theme_plugins[] = [
        'name'     => 'Meta Box',
        'slug'     => 'meta-box',
        'required' => true,
      ];
	}
 
    // List of all plugins only used by second demo import [overwrite the list] ('import' number = 1).
    if ( $_GET['import'] === '11' ) {
      $theme_plugins = [
        [
          'name'     => 'WooCommerce',
		  'slug'     => 'woocommerce',
          'required' => true,
        ],
        [
          'name'     => 'Easy Booking for WooCommerce',
		  'slug'     => 'woocommerce-easy-booking-system',
          'required' => true,
        ],
		[ 
		'name'     => 'Redux Framework',
		  'slug'     => 'redux-framework',
		  'required' => true,
		],
		[ 
		  'name'     => 'Elementor Website Builder',
		  'slug'     => 'elementor',
		  'required' => true,
		],
		[
		  'name'        => 'Renax Plugin',
		  'slug'        => 'renax-plugin',
		  'source'      => 'http://webredox.net/plugins/renax-plugin.zip',
		  'required' => true,
		],
		[ 
		  'name'     => 'Meta Box',
		  'slug'     => 'meta-box',
		  'required' => true,
		],
		[ 
		  'name'     => 'Contact Form 7',
		  'slug'     => 'contact-form-7',
		  'required' => false,
		],
		[ 
		  'name'     => 'MailChimp for WordPress',
		  'slug'     => 'mailchimp-for-wp',
		  'required' => false,
		],
      ];
    }
	if ( $_GET['import'] === '12' ) {
      $theme_plugins = [
        [
          'name'     => 'WooCommerce',
		  'slug'     => 'woocommerce',
          'required' => true,
        ],
        [
          'name'     => 'Easy Booking for WooCommerce',
		  'slug'     => 'woocommerce-easy-booking-system',
          'required' => true,
        ],
		[ 
		'name'     => 'Redux Framework',
		  'slug'     => 'redux-framework',
		  'required' => true,
		],
		[ 
		  'name'     => 'Elementor Website Builder',
		  'slug'     => 'elementor',
		  'required' => true,
		],
		[
		  'name'        => 'Renax Plugin',
		  'slug'        => 'renax-plugin',
		  'source'      => 'http://webredox.net/plugins/renax-plugin.zip',
		  'required' => true,
		],
		[ 
		  'name'     => 'Meta Box',
		  'slug'     => 'meta-box',
		  'required' => true,
		],
		[ 
		  'name'     => 'Contact Form 7',
		  'slug'     => 'contact-form-7',
		  'required' => false,
		],
		[ 
		  'name'     => 'MailChimp for WordPress',
		  'slug'     => 'mailchimp-for-wp',
		  'required' => false,
		],
      ];
    }
	if ( $_GET['import'] === '13' ) {
      $theme_plugins = [
        [
          'name'     => 'WooCommerce',
		  'slug'     => 'woocommerce',
          'required' => true,
        ],
        [
          'name'     => 'Easy Booking for WooCommerce',
		  'slug'     => 'woocommerce-easy-booking-system',
          'required' => true,
        ],
		[ 
		'name'     => 'Redux Framework',
		  'slug'     => 'redux-framework',
		  'required' => true,
		],
		[ 
		  'name'     => 'Elementor Website Builder',
		  'slug'     => 'elementor',
		  'required' => true,
		],
		[
		  'name'        => 'Renax Plugin',
		  'slug'        => 'renax-plugin',
		  'source'      => 'http://webredox.net/plugins/renax-plugin.zip',
		  'required' => true,
		],
		[ 
		  'name'     => 'Meta Box',
		  'slug'     => 'meta-box',
		  'required' => true,
		],
		[ 
		  'name'     => 'Contact Form 7',
		  'slug'     => 'contact-form-7',
		  'required' => false,
		],
		[ 
		  'name'     => 'MailChimp for WordPress',
		  'slug'     => 'mailchimp-for-wp',
		  'required' => false,
		],
      ];
    }
  }
 
  return array_merge( $plugins, $theme_plugins );
}
add_filter( 'ocdi/register_plugins', 'renax_ocdi_register_plugins' );
function ocdi_plugin_page_setup( $default_settings ) {
	$default_settings['parent_slug'] = 'themes.php';
	$default_settings['page_title']  = esc_html__( 'Renax Demo Importer' , 'renax' );
	$default_settings['menu_title']  = esc_html__( 'Renax Demo Importer' , 'renax' );
	$default_settings['capability']  = 'import';
	$default_settings['menu_slug']   = 'renax-one-click-demo-import';

	return $default_settings;
}
add_filter( 'pt-ocdi/plugin_page_setup', 'ocdi_plugin_page_setup' );
function ocdi_change_time_of_single_ajax_call() {
    return 180;
}
//add_filter( 'ocdi/time_for_one_ajax_call', 'ocdi_change_time_of_single_ajax_call' );
//add_filter( 'ocdi/regenerate_thumbnails_in_content_import', '__return_false' );