_mc4wp_load_plugin

Bootstrap the MailChimp for WordPress plugin.

Description

(boolean) mc4wp_load_plugin(); 

Returns (boolean)

True if the plugin files were loaded, false otherwise.


Usage

  1. if ( !function_exists( 'mc4wp_load_plugin' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'mailchimp-for-wordpress-lite/mailchimp-for-wp.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = mc4wp_load_plugin(); 
  7.  

Defined (1)

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

/mailchimp-for-wp.php  
  1. function mc4wp_load_plugin() { 
  2.  
  3. // don't load plugin if user has the premium version installed and activated 
  4. if( defined( 'MC4WP_VERSION' ) ) { 
  5. return false; 
  6.  
  7. // bootstrap the lite plugin 
  8. define( 'MC4WP_LITE_VERSION', '2.3.8' ); 
  9. define( 'MC4WP_LITE_PLUGIN_DIR', dirname( __FILE__ ) . '/' ); 
  10. define( 'MC4WP_LITE_PLUGIN_URL', plugins_url( '/' , __FILE__ ) ); 
  11. define( 'MC4WP_LITE_PLUGIN_FILE', __FILE__ ); 
  12.  
  13. require_once MC4WP_LITE_PLUGIN_DIR . 'vendor/autoload_52.php'; 
  14. require_once MC4WP_LITE_PLUGIN_DIR . 'includes/functions/general.php'; 
  15. require_once MC4WP_LITE_PLUGIN_DIR . 'includes/functions/template.php'; 
  16.  
  17. // Initialize admin section of plugin 
  18. if( is_admin() 
  19. && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { 
  20.  
  21. // Initialize the plugin and store an instance in the global scope 
  22. MC4WP_Lite::init(); 
  23. $GLOBALS['mc4wp'] = MC4WP_Lite::instance(); 
  24.  
  25. return true;