tgmpa

Helper function to register a collection of required plugins.

Description

tgmpa( (array) $plugins, (array) $config = array() ); 

Parameters (2)

0. $plugins (array)
An array of plugin arrays
1. $config — Optional. (array) => array()
An array of configuration values

Usage

  1. if ( !function_exists( 'tgmpa' ) ) { 
  2. require_once '/includes/class-tgm-plugin-activation.php'; 
  3.  
  4. // An array of plugin arrays 
  5. $plugins = array(); 
  6.  
  7. // Optional. An array of configuration values 
  8. $config = array(); 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = tgmpa($plugins, $config); 
  12.  

Defined (1)

The function is defined in the following location(s).

/includes/class-tgm-plugin-activation.php  
  1. function tgmpa( $plugins, $config = array() ) { 
  2.  
  3. foreach ( $plugins as $plugin ) 
  4. TGM_Plugin_Activation::$instance->register( $plugin ); 
  5.  
  6. if ( $config ) 
  7. TGM_Plugin_Activation::$instance->config( $config ); 
  8.