File "recommended-plugin.php"

Full Path: /home/flipjqml/onlinebetsolution.com/next_old/wp-content/themes/cyarb/lib/recommended-plugin.php
File size: 2.04 KB
MIME-type: text/x-php
Charset: utf-8

<?php
/**
 * Include the TGM_Plugin_Activation class.
 */


require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php';

add_action( 'tgmpa_register', 'cyarb_register_required_plugins' );

if ( ! function_exists( 'cyarb_register_required_plugins' ) ) {
	function cyarb_register_required_plugins() {

		$plugins = array(
			
			// Cyarb Toolkit
			array(
				'name'               => esc_html__('Cyarb Toolkit', 'cyarb'),
				'slug'               => 'cyarb-toolkit',
				'source'             => get_stylesheet_directory() . '/lib/plugins/cyarb-toolkit.zip', 
				'required'           => true,
			),

			// Elemantor Page Builder
			array(
				'name'               => esc_html__('Elementor Page Builder', 'cyarb'),
				'slug'               => 'elementor',
				'required'           => true,
			),

			// Cyarb Plugins
			array(
				'name'      => esc_html__('Contact Form 7', 'cyarb'),
				'slug'      => 'contact-form-7',
				'required'  => false,
			),

			array(
				'name'      => esc_html__('WooCommerce', 'cyarb'),
				'slug'      => 'woocommerce',
				'required'  => false,
			),

			// Advanced Custom Fields Pro
			array(
				'name'               => esc_html__('Advanced Custom Fields Pro', 'cyarb'),
				'slug'               => 'advanced-custom-fields-pro',
				'source'             => 'https://themes.envytheme.com/tools/advanced-custom-fields-pro.zip', 
				'required'           => true,
			),

			// Envy Demo Importer
			array(
				'name'               => esc_html__('Envy Demo Importer', 'cyarb'),
				'slug'               => 'envy-demo-importer',
				'source'			=> 'https://themes.envytheme.com/tools/envy-demo-importer.zip',
				'required'           => false,
			),

		);

		$config = array(
			'id'           => 'tgmpa',
			'default_path' => '',
			'menu'         => 'tgmpa-install-plugins',
			'parent_slug'  => 'themes.php',
			'capability'   => 'edit_theme_options',
			'has_notices'  => true, 
			'dismissable'  => true, 
			'dismiss_msg'  => '',   
			'is_automatic' => false, 
			'message'      => '',                      
		);
		tgmpa( $plugins, $config );
	}
}