<?php

require_once BENQU_THEME_DRI . '/libs/class-tgm-plugin-activation.php';

add_action( 'tgmpa_register', 'benqu_register_required_plugins' );

function benqu_register_required_plugins() {

    $plugins = array(
        array(
					'name'								=> esc_html__('Benqu Extension', 'benqu'),
					'slug'								=> 'benqu-extension',
					'source'							=> get_template_directory() . '/libs/plugin/benqu-extension.zip', 
					'required'						=> true,
					'version'							=> '1.1.7',
					'force_activation'		=> false,
					'force_deactivation'	=> false,
				),
        array(
            'name'     => 'Elementor Website Builder',
            'slug'     => 'elementor',
            'required' => true,
        ),
        array(
            'name'     => esc_html__('WooCommerce', 'benqu'),
            'slug'     => 'woocommerce',
            'required' => false,
        ),
        array(
            'name'     => esc_html__('Safe SVG', 'benqu'),
            'slug'     => 'safe-svg',
            'required' => false,
        ),
        array(
            'name'     => esc_html__('MC4WP: Mailchimp for WordPress', 'benqu'),
            'slug'     => 'mailchimp-for-wp',
            'required' => false,
        ),

        array(
            'name'     => esc_html__('Contact Form 7', 'benqu'),
            'slug'     => 'contact-form-7',
            'required' => false,
        ),

        array(
            'name'     => esc_html__( 'One Click Demo Import', 'benqu' ),
            'slug'     => 'one-click-demo-import',
            'required' => false,
        ),
        array(
            'name'     => esc_html__('Breadcrumb NavXT', 'benqu'),
            'slug'     => 'breadcrumb-navxt',
            'required' => true,
        ),
        array(
            'name'     => esc_html__('One User Avatar | User Profile Picture', 'benqu'),
            'slug'     => 'one-user-avatar',
            'required' => true,
        ),
        array(
            'name'     => esc_html__('WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress', 'benqu'),
            'slug'     => 'wp-user-frontend',
            'required' => true,
        ),

    );

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

    );

    tgmpa( $plugins, $config );
}
