<?php


add_action('tgmpa_register', 'goyto_register_required_plugins');

function goyto_register_required_plugins()
{

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

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

        array(
            'name' => esc_html__('One Click Demo Import', 'goyto'),
            'slug' => 'one-click-demo-import',
            'required' => true,
        )

    );

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

    tgmpa($plugins, $config);
}
