Completed
Branch make-wp-users-work (368860)
by
unknown
09:47 queued 07:23
created
core/services/addon/api/IncompatibleAddonHandler.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -6,75 +6,75 @@
 block discarded – undo
6 6
 
7 7
 class IncompatibleAddonHandler
8 8
 {
9
-    /**
10
-     * @return void
11
-     */
12
-    public function deactivateIncompatibleAddons()
13
-    {
14
-        $this->deactivateIncompatibleAddon(
15
-            'Wait Lists',
16
-            'EE_WAIT_LISTS_VERSION',
17
-            '1.0.0.beta.074',
18
-            'load_espresso_wait_lists',
19
-            'EE_WAIT_LISTS_PLUGIN_FILE'
20
-        );
21
-        $this->deactivateIncompatibleAddon(
22
-            'Automated Upcoming Event Notifications',
23
-            'EE_AUTOMATED_UPCOMING_EVENT_NOTIFICATION_VERSION',
24
-            '1.0.0.beta.091',
25
-            'load_espresso_automated_upcoming_event_notification',
26
-            'EE_AUTOMATED_UPCOMING_EVENT_NOTIFICATION_PLUGIN_FILE'
27
-        );
28
-        $this->deactivateIncompatibleAddon(
29
-            'WP Users Integration',
30
-            'EE_WPUSERS_VERSION',
31
-            '2.1.0.rc.003',
32
-            'load_ee_core_wpusers',
33
-            'EE_WPUSERS_PLUGIN_FILE'
34
-        );
35
-    }
9
+	/**
10
+	 * @return void
11
+	 */
12
+	public function deactivateIncompatibleAddons()
13
+	{
14
+		$this->deactivateIncompatibleAddon(
15
+			'Wait Lists',
16
+			'EE_WAIT_LISTS_VERSION',
17
+			'1.0.0.beta.074',
18
+			'load_espresso_wait_lists',
19
+			'EE_WAIT_LISTS_PLUGIN_FILE'
20
+		);
21
+		$this->deactivateIncompatibleAddon(
22
+			'Automated Upcoming Event Notifications',
23
+			'EE_AUTOMATED_UPCOMING_EVENT_NOTIFICATION_VERSION',
24
+			'1.0.0.beta.091',
25
+			'load_espresso_automated_upcoming_event_notification',
26
+			'EE_AUTOMATED_UPCOMING_EVENT_NOTIFICATION_PLUGIN_FILE'
27
+		);
28
+		$this->deactivateIncompatibleAddon(
29
+			'WP Users Integration',
30
+			'EE_WPUSERS_VERSION',
31
+			'2.1.0.rc.003',
32
+			'load_ee_core_wpusers',
33
+			'EE_WPUSERS_PLUGIN_FILE'
34
+		);
35
+	}
36 36
 
37 37
 
38
-    /**
39
-     * @param string $addon_name
40
-     * @param string $version_constant
41
-     * @param string $min_version_required
42
-     * @param string $load_callback
43
-     * @param string $plugin_file_constant
44
-     * @return void
45
-     */
46
-    private function deactivateIncompatibleAddon(
47
-        string $addon_name,
48
-        string $version_constant,
49
-        string $min_version_required,
50
-        string $load_callback,
51
-        string $plugin_file_constant
52
-    ) {
53
-        if (! defined($version_constant)) {
54
-            return;
55
-        }
56
-        $addon_version = constant($version_constant);
57
-        if ($addon_version && version_compare($addon_version, $min_version_required, '<')) {
58
-            remove_action('AHEE__EE_System__load_espresso_addons', $load_callback);
59
-            if (! function_exists('deactivate_plugins')) {
60
-                require_once ABSPATH . 'wp-admin/includes/plugin.php';
61
-            }
62
-            deactivate_plugins(plugin_basename(constant($plugin_file_constant)));
63
-            unset($_GET['activate'], $_REQUEST['activate'], $_GET['activate-multi'], $_REQUEST['activate-multi']);
64
-            EE_Error::add_error(
65
-                sprintf(
66
-                    esc_html__(
67
-                        'We\'re sorry, but the Event Espresso %1$s addon was deactivated because version %2$s or higher is required with this version of Event Espresso core.',
68
-                        'event_espresso'
69
-                    ),
70
-                    $addon_name,
71
-                    $min_version_required
72
-                ),
73
-                __FILE__,
74
-                __FUNCTION__ . "({$addon_name})",
75
-                __LINE__
76
-            );
77
-            EE_Error::get_notices(false, true);
78
-        }
79
-    }
38
+	/**
39
+	 * @param string $addon_name
40
+	 * @param string $version_constant
41
+	 * @param string $min_version_required
42
+	 * @param string $load_callback
43
+	 * @param string $plugin_file_constant
44
+	 * @return void
45
+	 */
46
+	private function deactivateIncompatibleAddon(
47
+		string $addon_name,
48
+		string $version_constant,
49
+		string $min_version_required,
50
+		string $load_callback,
51
+		string $plugin_file_constant
52
+	) {
53
+		if (! defined($version_constant)) {
54
+			return;
55
+		}
56
+		$addon_version = constant($version_constant);
57
+		if ($addon_version && version_compare($addon_version, $min_version_required, '<')) {
58
+			remove_action('AHEE__EE_System__load_espresso_addons', $load_callback);
59
+			if (! function_exists('deactivate_plugins')) {
60
+				require_once ABSPATH . 'wp-admin/includes/plugin.php';
61
+			}
62
+			deactivate_plugins(plugin_basename(constant($plugin_file_constant)));
63
+			unset($_GET['activate'], $_REQUEST['activate'], $_GET['activate-multi'], $_REQUEST['activate-multi']);
64
+			EE_Error::add_error(
65
+				sprintf(
66
+					esc_html__(
67
+						'We\'re sorry, but the Event Espresso %1$s addon was deactivated because version %2$s or higher is required with this version of Event Espresso core.',
68
+						'event_espresso'
69
+					),
70
+					$addon_name,
71
+					$min_version_required
72
+				),
73
+				__FILE__,
74
+				__FUNCTION__ . "({$addon_name})",
75
+				__LINE__
76
+			);
77
+			EE_Error::get_notices(false, true);
78
+		}
79
+	}
80 80
 }
Please login to merge, or discard this patch.