View file StuffPost/stuffpost/functions/tgm-required.php

File size: 1.06Kb
<?php

function weart_require_plugins() {
 
    $plugins = array( 
      array(
        'name'               => 'Lazy Load for Comments',
        'slug'               => 'lazy-load-for-comments',
        'required'           => true, // required for the faster page-load
      ),
      array(
        'name'               => 'Simple Share Buttons Adder',
        'slug'               => 'simple-share-buttons-adder',
        'required'           => true, // required for share buttons
      ),
    );
    $config = array( 
      'id'           => 'weart-tgmpa', // your unique TGMPA ID
      'default_path' => get_stylesheet_directory() . '/tgm/plugins/', // default absolute path
      'menu'         => 'weart-install-required-plugins', // menu slug
      'has_notices'  => true, // Show admin notices
      'dismissable'  => false, // the notices are NOT dismissable
      'is_automatic' => true, // automatically activate plugins after installation
    );
 
    tgmpa( $plugins, $config );
 
}
add_action( 'tgmpa_register', 'weart_require_plugins' );