<?php
/**
 * Register plugins
 *
 * @package wpstream-theme
 */

// Require class file.
require_once get_template_directory() . '/framework/class-tgm-plugin-activation.php';

add_action( 'tgmpa_register', 'wpstream_theme_register_required_plugins' );
/**
 * Register required plugins using TGM Plugin Activation library.
 */
function wpstream_theme_register_required_plugins() {
	$plugins = array(
		array(
			'name'               => 'WpStream',
			'slug'               => 'wpstream',
			'required'           => false,
			'version'            => '4.6.6.3',
			'force_activation'   => false,
			'force_deactivation' => false,
			'external_url'       => '',
		),

		array(
			'name'               => 'WooCommerce',
			'slug'               => 'woocommerce',
			'required'           => false,
			'version'            => '9.7.1',
			'force_activation'   => false,
			'force_deactivation' => false,
			'external_url'       => '',
		),

		array(
			'name'               => 'Elementor',
			'slug'               => 'elementor',
			'required'           => false,
			'version'            => '3.27.6',
			'force_activation'   => false,
			'force_deactivation' => false,
			'external_url'       => '',
		),
		array(
			'name'               => 'One Click Demo Import',
			'slug'               => 'one-click-demo-import',
			'required'           => false,
			'version'            => '3.3.0',
			'force_activation'   => false,
			'force_deactivation' => false,
			'external_url'       => '',
		),
		array(
			'name'               => 'Meta Box',
			'slug'               => 'meta-box',
			'required'           => false,
			'version'            => '5.10.7',
			'force_activation'   => false,
			'force_deactivation' => false,
			'external_url'       => '',
		),
		array(
			'name'               => 'Better Messages - Live Chat for WordPress',
			'slug'               => 'bp-better-messages',
			'required'           => false,
			'version'            => '2.7.11',
			'force_activation'   => false,
			'force_deactivation' => false,
			'external_url'       => '',
		),
	);

	$config = array(
		'id'           => 'hello-wpstream',        // Unique ID for hashing notices for multiple instances of TGMPA.
		'default_path' => '',                      // Default absolute path to bundled plugins.
		'menu'         => 'tgmpa-install-plugins', // Menu slug.
		'has_notices'  => true,                    // Show admin notices or not.
		'dismissable'  => true,                    // If false, a user cannot dismiss the nag message.
		'dismiss_msg'  => '',                      // If 'dismissable' is false, this message will be output at top of nag.
		'is_automatic' => false,                   // Automatically activate plugins after installation or not.
		'message'      => '',                      // Message to output right before the plugins table.
	);

	tgmpa( $plugins, $config );
}