File: /home/jairicem/basalehglobal.ng/wp-content/themes/mitech/framework/class-plugins.php
<?php
defined( 'ABSPATH' ) || exit;
/**
* Plugin installation and activation for WordPress themes
*/
if ( ! class_exists( 'Mitech_Register_Plugins' ) ) {
class Mitech_Register_Plugins {
const GOOGLE_DRIVER_API = 'AIzaSyDXOs0Bxx-uBEA4fH4fzgoHtl64g0RWv-g';
public function __construct() {
add_filter( 'insight_core_tgm_plugins', array( $this, 'register_required_plugins' ) );
}
public function register_required_plugins( $plugins ) {
/*
* Array of plugin arrays. Required keys are name and slug.
* If the source is NOT from the .org repo, then source is also required.
*/
$new_plugins = array(
array(
'name' => esc_html__( 'Insight Core', 'mitech' ),
'slug' => 'insight-core',
'source' => $this->get_plugin_google_driver_url( '18Ed9yJ6c8uh70wokhdZg4rxBxFw3osKR' ),
'version' => '2.7.4',
'required' => true,
),
array(
'name' => esc_html__( 'Mitech Extension', 'mitech' ),
'slug' => 'mitech-extension',
'source' => $this->get_plugin_google_driver_url( '194UI6OXhfbsnbXiNyAJ-o0mQJmJuHytG' ),
'version' => '1.1.0',
'required' => true,
),
array(
'name' => esc_html__( 'WPBakery Page Builder', 'mitech' ),
'slug' => 'js_composer',
'source' => $this->get_plugin_google_driver_url( '1PIn948Dv0Cfo1F0FMXFCZM9zp2g7-Aep' ),
'version' => '8.6.1',
'required' => true,
),
array(
'name' => esc_html__( 'WPBakery Page Builder (Visual Composer) Clipboard', 'mitech' ),
'slug' => 'vc_clipboard',
'source' => $this->get_plugin_google_driver_url( '1Ut4Y4ZsOl9xBXp-bFzVLWTlbpuELhFKy' ),
'version' => '5.0.6',
),
array(
'name' => esc_html__( 'Contact Form 7', 'mitech' ),
'slug' => 'contact-form-7',
),
array(
'name' => esc_html__( 'MailChimp for WordPress', 'mitech' ),
'slug' => 'mailchimp-for-wp',
),
array(
'name' => esc_html__( 'Image Hotspot by DevVN', 'mitech' ),
'slug' => 'devvn-image-hotspot',
),
array(
'name' => esc_html__( 'WP-PostViews', 'mitech' ),
'slug' => 'wp-postviews',
),
array(
'name' => esc_html__( 'Revolution Slider', 'mitech' ),
'slug' => 'revslider',
'source' => $this->get_plugin_google_driver_url( '1DPN6nGClTXtxTji8VYcwkyP4WCAOhoHX' ),
'version' => '6.7.35',
'required' => true,
),
array(
'name' => esc_html__( 'WooCommerce', 'mitech' ),
'slug' => 'woocommerce',
),
array(
'name' => esc_html__( 'WooCommerce Smart Quick View', 'mitech' ),
'slug' => 'woo-smart-quick-view',
'required' => false,
),
array(
'name' => esc_html__( 'WPC Smart Compare for WooCommerce', 'mitech' ),
'slug' => 'woo-smart-compare',
),
array(
'name' => esc_html__( 'WPC Smart Wishlist for WooCommerce', 'mitech' ),
'slug' => 'woo-smart-wishlist',
),
);
$plugins = array_merge( $plugins, $new_plugins );
return $plugins;
}
public function get_plugin_google_driver_url( $file_id ) {
return "https://www.googleapis.com/drive/v3/files/{$file_id}?alt=media&key=" . self::GOOGLE_DRIVER_API;
}
}
new Mitech_Register_Plugins();
}