<?php
add_action( 'tgmpa_register', 'wpctp_register_required_plugins', 5 );
function wpctp_register_required_plugins() {
	$plugins = array(
		array(
			'name'	=> __('WordPress Importer', 'wpctp'),
			'slug'	=> 'wordpress-importer',
			'required'	=> true,
		),
		array(
			'name'	=> __('Page Builder by SiteOrigin', 'wpctp'),
			'slug'	=> 'siteorigin-panels',
			'required'	=> true,
			//'force_activation'	=> true,
			//'force_deactivation'	=> true,
		),
		array(
			'name'	=> __('SiteOrigin Widgets Bundle', 'wpctp'),
			'slug'	=> 'so-widgets-bundle',
			'required'	=> true,
			//'force_activation'	=> true,
			//'force_deactivation'	=> true,
		),
		array(
			'name'	=> __('Theme My Login', 'wpctp'),
			'slug'	=> 'theme-my-login',
			'required'	=> true,
			//'force_activation'	=> true,
			//'force_deactivation'	=> true,
		),
		array(
			'name'	=> __('WPCargo', 'wpctp'),
			'slug'	=> 'wpcargo',
			'required'	=> true,
			//'force_activation'	=> true,
			//'force_deactivation'	=> true,
		),
		array(
			'name'	=> __('Animate It!', 'wpctp'),
			'slug'	=> 'animate-it',
			'required'	=> true,
			//'force_activation'	=> true,
			//'force_deactivation'	=> true,
		),
		array(
			'name'	=> __('Contact Form 7', 'wpctp'),
			'slug'	=> 'contact-form-7',
			'required'	=> true,
			//'force_activation'	=> true,
			//'force_deactivation'	=> true,
		),
		array(
			'name'	=> __('MailPoet', 'wpctp'),
			'slug'	=> 'wysija-newsletters',
			'required'	=> true,
			//'force_activation'	=> true,
			//'force_deactivation'	=> true,
		),
		array(
			'name'        => __('WordPress SEO by Yoast', 'wpctp'),
			'slug'        => 'wordpress-seo',
			//'is_callable' => 'wpseo_init',
		),
	);
	$config = array(
		'id'           	=> 'wpctp',
		'default_path' 	=> '',
		'menu'         	=> 'wpctp-install-plugins',
		'has_notices'  	=> true,
		'dismissable'  	=> true,
		'dismiss_msg'  	=> '',
		'is_automatic' 	=> false,
		'message'      	=> sprintf( '<h4>%s</h4>', __( 'WPCargo Theme Pro requires the following plugins below. Make sure to activate the required plugins, else the front end will show some errors or missing sections.', 'wpctp' ) ),
		'parent_slug'	=> 'wpctp',
	);
	$plugins = apply_filters( 'wpctp_register_required_plugins', $plugins );
	
	tgmpa( $plugins, $config );
}