Last active
September 20, 2022 06:29
-
-
Save humayunahmed8/98919e0c699ea95d2a12e6dc13f48a18 to your computer and use it in GitHub Desktop.
Required plugin activation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once get_template_directory() . '/inc/class-tgm-plugin-activation.php'; | |
add_action( 'tgmpa_register', 'stock_humayunbd_register_required_plugins' ); | |
function stock_humayunbd_register_required_plugins() { | |
$plugins = array( | |
array( | |
'name' => esc_html__('WPBakery Visual Composer','stock-humayunbd'), | |
'slug' => 'js_composer', | |
'source' => get_template_directory() . '/inc/plugins/js_composer.zip', | |
'required' => true, | |
'version' => '5.2', | |
'force_activation' => false, | |
'force_deactivation' => false, | |
), | |
array( | |
'name' => esc_html__('One click demo import','stock-humayunbd'), | |
'slug' => 'one-click-demo-import', | |
'required' => false, | |
), | |
array( | |
'name' => esc_html__('Contact Form 7','stock-humayunbd'), | |
'slug' => 'contact-form-7', | |
'required' => false, | |
), | |
); | |
$config = array( | |
'id' => 'stock-humayunbd', | |
'default_path' => '', | |
'menu' => 'stock-install-plugins', | |
'has_notices' => true, | |
'dismissable' => true, | |
'dismiss_msg' => '', | |
'is_automatic' => false, | |
'message' => '', | |
); | |
tgmpa( $plugins, $config ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment