-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
86 additions
and
93 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?php | ||
/** | ||
* Register the required plugins for this theme. | ||
* | ||
* @link http://tgmpluginactivation.com/configuration/ | ||
* | ||
* @package _xe | ||
*/ | ||
|
||
namespace Xe_Theme\Helpers; | ||
|
||
class Plugins_Activator { | ||
|
||
function __construct() { | ||
|
||
require_once get_template_directory() . '/helpers/class-tgm-plugin-activation.php'; | ||
|
||
add_action( 'tgmpa_register', [ $this, 'register_required_plugins' ] ); | ||
|
||
} | ||
|
||
public function register_required_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. | ||
*/ | ||
$plugins = array( | ||
|
||
// Include a plugin from the WordPress Plugin Repository. | ||
array( | ||
'name' => 'Elementor Website Builder', | ||
'slug' => 'elementor', | ||
'required' => false, | ||
), | ||
array( | ||
'name' => 'Kirki Customizer Framework', | ||
'slug' => 'kirki', | ||
'required' => true, | ||
), | ||
array( | ||
'name' => 'Meta Box', | ||
'slug' => 'meta-box', | ||
'required' => true, | ||
), | ||
array( | ||
'name' => 'Max Mega Menu', | ||
'slug' => 'megamenu', | ||
'required' => true, | ||
), | ||
array( | ||
'name' => 'WooCommerce', | ||
'slug' => 'woocommerce', | ||
'required' => false, | ||
), | ||
array( | ||
'name' => 'Contact Form 7', | ||
'slug' => 'contact-form-7', | ||
'required' => false, | ||
) | ||
|
||
); | ||
|
||
/** | ||
* Array of configuration settings. Amend each line as needed. | ||
*/ | ||
$config = array( | ||
'id' => 'tgmpa', | ||
'default_path' => '', | ||
'menu' => 'install-plugins', | ||
'parent_slug' => 'themes.php', | ||
'capability' => 'edit_theme_options', | ||
'has_notices' => true, | ||
'dismissable' => true, | ||
'dismiss_msg' => '', | ||
'is_automatic' => false, | ||
'message' => '', | ||
); | ||
|
||
tgmpa( $plugins, $config ); | ||
|
||
} | ||
|
||
} | ||
new Plugins_Activator(); |
This file was deleted.
Oops, something went wrong.