/**
* Loads the MailChimp for WP plugin files
*
* @return boolean True if the plugin files were loaded, false otherwise.
*/
function mc4wp_load_plugin()
{
global $mc4wp;
// don't load plugin if user has the premium version installed and activated
if (defined('MC4WP_VERSION')) {
return false;
}
// load autoloader
require_once dirname(__FILE__) . '/vendor/autoload_52.php';
// define some constants
require dirname(__FILE__) . '/bootstrap.php';
// Initialize the plugin and store an instance in the global scope
$mc4wp = mc4wp();
$mc4wp->init();
if (is_admin() && (!defined('DOING_AJAX') || !DOING_AJAX)) {
// load admin class
$admin = new MC4WP_Admin(__FILE__);
$admin->add_hooks();
$admin->load_translations();
// load promotional elements
$promotional_elements = new MC4WP_Admin_Ads();
$promotional_elements->add_hooks();
}
return true;
}