<?php

require_once get_template_directory() . '/lib/class-tgm-plugin-activation.php';

add_action( 'tgmpa_register', 'hostix_register_required_plugins' );

function hostix_register_required_plugins() {

    $plugins = array(
        array(
			'name'               => esc_html__('Hostix Tools', 'hostix'),
			'slug'               => 'hostix-tools',
			'source'             => ( 'https://themexriver.com/wp/hostix/tools/plugin/hostix-tools.zip' ),
			'required'           => true,
			'force_activation'   => false,
			'force_deactivation' => false,
		),
        array(
			'name'               => esc_html__('Envato Market', 'hostix'),
			'slug'               => 'envato-market',
			'source'             => esc_url( 'https://goo.gl/pkJS33' ),
            'external_url'       => esc_url( 'https://goo.gl/pkJS33' ),
			'required'           => true,
		), 
        array(
            'name'     => 'Elementor Website Builder',
            'slug'     => 'elementor',
            'required' => true,
        ),
       
        array(
            'name'     => esc_html__('Contact Form 7', 'hostix'),
            'slug'     => 'contact-form-7',
            'required' => false,
        ),

        array(
            'name'     => esc_html__('MC4WP: Mailchimp for WordPress', 'hostix'),
            'slug'     => 'mailchimp-for-wp',
            'required' => false,
        ),

        array(
            'name'     => esc_html__( 'One Click Demo Import', 'hostix' ),
            'slug'     => 'one-click-demo-import',
            'required' => false,
        ),
        array(
            'name'     => esc_html__( 'WooCommerce', 'hostix' ),
            'slug'     => 'woocommerce',
            'required' => false,
        ),

    );

    $config = array(
        'id'           => 'hostix',
        'default_path' => '',
        'menu'         => 'tgmpa-install-plugins',
        'dismissable'  => true,
        'dismiss_msg'  => '',
        'is_automatic' => false,
        'message'      => '',

    );

    tgmpa( $plugins, $config );
}
