-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump required PHP version to 5.6 and get rid of dependency on Compose…
…r autoloader
- Loading branch information
1 parent
357a023
commit 50573b3
Showing
4 changed files
with
89 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?php | ||
|
||
spl_autoload_register(function($class) { | ||
static $classmap = array( | ||
'MC4WP_API_Connection_Exception' => __DIR__ . '/includes/api/class-connection-exception.php', | ||
'MC4WP_API_Exception' => __DIR__ . '/includes/api/class-exception.php', | ||
'MC4WP_API_Resource_Not_Found_Exception' => __DIR__ . '/includes/api/class-resource-not-found-exception.php', | ||
'MC4WP_API_V3' => __DIR__ . '/includes/api/class-api-v3.php', | ||
'MC4WP_API_V3_Client' => __DIR__ . '/includes/api/class-api-v3-client.php', | ||
'MC4WP_Admin' => __DIR__ . '/includes/admin/class-admin.php', | ||
'MC4WP_Admin_Ads' => __DIR__ . '/includes/admin/class-ads.php', | ||
'MC4WP_Admin_Ajax' => __DIR__ . '/includes/admin/class-admin-ajax.php', | ||
'MC4WP_Admin_Messages' => __DIR__ . '/includes/admin/class-admin-messages.php', | ||
'MC4WP_Admin_Review_Notice' => __DIR__ . '/includes/admin/class-review-notice.php', | ||
'MC4WP_Admin_Texts' => __DIR__ . '/includes/admin/class-admin-texts.php', | ||
'MC4WP_Admin_Tools' => __DIR__ . '/includes/admin/class-admin-tools.php', | ||
'MC4WP_AffiliateWP_Integration' => __DIR__ . '/integrations/affiliatewp/class-affiliatewp.php', | ||
'MC4WP_BuddyPress_Integration' => __DIR__ . '/integrations/buddypress/class-buddypress.php', | ||
'MC4WP_Comment_Form_Integration' => __DIR__ . '/integrations/wp-comment-form/class-comment-form.php', | ||
'MC4WP_Contact_Form_7_Integration' => __DIR__ . '/integrations/contact-form-7/class-contact-form-7.php', | ||
'MC4WP_Container' => __DIR__ . '/includes/class-container.php', | ||
'MC4WP_Custom_Integration' => __DIR__ . '/integrations/custom/class-custom.php', | ||
'MC4WP_Debug_Log' => __DIR__ . '/includes/class-debug-log.php', | ||
'MC4WP_Debug_Log_Reader' => __DIR__ . '/includes/class-debug-log-reader.php', | ||
'MC4WP_Dynamic_Content_Tags' => __DIR__ . '/includes/class-dynamic-content-tags.php', | ||
'MC4WP_Easy_Digital_Downloads_Integration' => __DIR__ . '/integrations/easy-digital-downloads/class-easy-digital-downloads.php', | ||
'MC4WP_Events_Manager_Integration' => __DIR__ . '/integrations/events-manager/class-events-manager.php', | ||
'MC4WP_Field_Formatter' => __DIR__ . '/includes/class-field-formatter.php', | ||
'MC4WP_Field_Guesser' => __DIR__ . '/includes/class-field-guesser.php', | ||
'MC4WP_Form' => __DIR__ . '/includes/forms/class-form.php', | ||
'MC4WP_Form_AMP' => __DIR__ . '/includes/forms/class-form-amp.php', | ||
'MC4WP_Form_Asset_Manager' => __DIR__ . '/includes/forms/class-asset-manager.php', | ||
'MC4WP_Form_Element' => __DIR__ . '/includes/forms/class-form-element.php', | ||
'MC4WP_Form_Listener' => __DIR__ . '/includes/forms/class-form-listener.php', | ||
'MC4WP_Form_Manager' => __DIR__ . '/includes/forms/class-form-manager.php', | ||
'MC4WP_Form_Notice' => __DIR__ . '/includes/forms/class-form-message.php', | ||
'MC4WP_Form_Output_Manager' => __DIR__ . '/includes/forms/class-output-manager.php', | ||
'MC4WP_Form_Previewer' => __DIR__ . '/includes/forms/class-form-previewer.php', | ||
'MC4WP_Form_Tags' => __DIR__ . '/includes/forms/class-form-tags.php', | ||
'MC4WP_Form_Widget' => __DIR__ . '/includes/forms/class-widget.php', | ||
'MC4WP_Forms_Admin' => __DIR__ . '/includes/forms/class-admin.php', | ||
'MC4WP_Give_Integration' => __DIR__ . '/integrations/give/class-give.php', | ||
'MC4WP_Gravity_Forms_Field' => __DIR__ . '/integrations/gravity-forms/class-field.php', | ||
'MC4WP_Gravity_Forms_Integration' => __DIR__ . '/integrations/gravity-forms/class-gravity-forms.php', | ||
'MC4WP_Integration' => __DIR__ . '/includes/integrations/class-integration.php', | ||
'MC4WP_Integration_Admin' => __DIR__ . '/includes/integrations/class-admin.php', | ||
'MC4WP_Integration_Fixture' => __DIR__ . '/includes/integrations/class-integration-fixture.php', | ||
'MC4WP_Integration_Manager' => __DIR__ . '/includes/integrations/class-integration-manager.php', | ||
'MC4WP_Integration_Tags' => __DIR__ . '/includes/integrations/class-integration-tags.php', | ||
'MC4WP_List_Data_Mapper' => __DIR__ . '/includes/class-list-data-mapper.php', | ||
'MC4WP_MailChimp' => __DIR__ . '/includes/class-mailchimp.php', | ||
'MC4WP_MailChimp_Subscriber' => __DIR__ . '/includes/class-mailchimp-subscriber.php', | ||
'MC4WP_MemberPress_Integration' => __DIR__ . '/integrations/memberpress/class-memberpress.php', | ||
'MC4WP_Ninja_Forms_Action' => __DIR__ . '/integrations/ninja-forms/class-action.php', | ||
'MC4WP_Ninja_Forms_Field' => __DIR__ . '/integrations/ninja-forms/class-field.php', | ||
'MC4WP_Ninja_Forms_Integration' => __DIR__ . '/integrations/ninja-forms/class-ninja-forms.php', | ||
'MC4WP_Ninja_Forms_V2_Integration' => __DIR__ . '/integrations/ninja-forms-2/class-ninja-forms.php', | ||
'MC4WP_Plugin' => __DIR__ . '/includes/class-plugin.php', | ||
'MC4WP_Queue' => __DIR__ . '/includes/class-queue.php', | ||
'MC4WP_Queue_Job' => __DIR__ . '/includes/class-queue-job.php', | ||
'MC4WP_Registration_Form_Integration' => __DIR__ . '/integrations/wp-registration-form/class-registration-form.php', | ||
'MC4WP_Tools' => __DIR__ . '/includes/class-tools.php', | ||
'MC4WP_Upgrade_Routines' => __DIR__ . '/includes/admin/class-upgrade-routines.php', | ||
'MC4WP_User_Integration' => __DIR__ . '/includes/integrations/class-user-integration.php', | ||
'MC4WP_WPForms_Field' => __DIR__ . '/integrations/wpforms/class-field.php', | ||
'MC4WP_WPForms_Integration' => __DIR__ . '/integrations/wpforms/class-wpforms.php', | ||
'MC4WP_WooCommerce_Integration' => __DIR__ . '/integrations/woocommerce/class-woocommerce.php', | ||
); | ||
|
||
if (isset($classmap[$class])) { | ||
require $classmap[$class]; | ||
} | ||
|
||
}); |
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
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
License: GPL v3 | ||
Mailchimp for WordPress | ||
Copyright (C) 2012-2024, Danny van Kooten, [email protected] | ||
Copyright (C) 2012 - 2024, Danny van Kooten, [email protected] | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
@@ -41,27 +41,27 @@ function _mc4wp_load_plugin() | |
return; | ||
} | ||
|
||
// don't run if PHP version is lower than 5.3 | ||
if (! function_exists('array_replace')) { | ||
return; | ||
// don't run if PHP version is lower than 5.6 | ||
if (PHP_VERSION_ID < 50600) { | ||
return; | ||
} | ||
|
||
// bootstrap the core plugin | ||
define('MC4WP_VERSION', '4.9.13'); | ||
define('MC4WP_PLUGIN_DIR', __DIR__); | ||
define('MC4WP_PLUGIN_FILE', __FILE__); | ||
|
||
// load autoloader if function not yet exists (for compat with sitewide autoloader) | ||
if (! function_exists('mc4wp')) { | ||
require_once MC4WP_PLUGIN_DIR . '/vendor/autoload.php'; | ||
} | ||
|
||
require MC4WP_PLUGIN_DIR . '/includes/default-actions.php'; | ||
require MC4WP_PLUGIN_DIR . '/includes/default-filters.php'; | ||
require __DIR__ . '/autoload.php'; | ||
require __DIR__ . '/includes/functions.php'; | ||
require __DIR__ . '/includes/deprecated-functions.php'; | ||
require __DIR__ . '/includes/forms/functions.php'; | ||
require __DIR__ . '/includes/forms/admin-functions.php'; | ||
require __DIR__ . '/includes/integrations/functions.php'; | ||
require __DIR__ . '/includes/default-actions.php'; | ||
require __DIR__ . '/includes/default-filters.php'; | ||
|
||
// require API class manually because Composer's classloader is case-sensitive | ||
// but we need it to pass class_exists condition | ||
require MC4WP_PLUGIN_DIR . '/includes/api/class-api-v3.php'; | ||
require __DIR__ . '/includes/api/class-api-v3.php'; | ||
|
||
/** | ||
* @global MC4WP_Container $GLOBALS['mc4wp'] | ||
|
@@ -98,7 +98,7 @@ function _mc4wp_load_plugin() | |
$forms_admin = new MC4WP_Forms_Admin($messages); | ||
$forms_admin->add_hooks(); | ||
|
||
$integrations_admin = new MC4WP_Integration_Admin($mc4wp['integrations'], $messages); | ||
$integrations_admin = new MC4WP_Integration_Admin($integration_manager, $messages); | ||
$integrations_admin->add_hooks(); | ||
} | ||
} | ||
|