Completed
Branch FET/reg-form-builder/main (886ddc)
by
unknown
39:47 queued 30:53
created
espresso.php 1 patch
Indentation   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -37,122 +37,122 @@
 block discarded – undo
37 37
  * @since           4.0
38 38
  */
39 39
 if (function_exists('espresso_version')) {
40
-    if (! function_exists('espresso_duplicate_plugin_error')) {
41
-        /**
42
-         *    espresso_duplicate_plugin_error
43
-         *    displays if more than one version of EE is activated at the same time
44
-         */
45
-        function espresso_duplicate_plugin_error()
46
-        {
47
-            ?>
40
+	if (! function_exists('espresso_duplicate_plugin_error')) {
41
+		/**
42
+		 *    espresso_duplicate_plugin_error
43
+		 *    displays if more than one version of EE is activated at the same time
44
+		 */
45
+		function espresso_duplicate_plugin_error()
46
+		{
47
+			?>
48 48
             <div class="error">
49 49
                 <p>
50 50
                     <?php
51
-                    echo esc_html__(
52
-                        'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.',
53
-                        'event_espresso'
54
-                    ); ?>
51
+					echo esc_html__(
52
+						'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.',
53
+						'event_espresso'
54
+					); ?>
55 55
                 </p>
56 56
             </div>
57 57
             <?php
58
-            espresso_deactivate_plugin(plugin_basename(__FILE__));
59
-        }
60
-    }
61
-    add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
58
+			espresso_deactivate_plugin(plugin_basename(__FILE__));
59
+		}
60
+	}
61
+	add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
62 62
 } else {
63
-    define('EE_MIN_PHP_VER_REQUIRED', '7.1.0');
64
-    if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
65
-        /**
66
-         * espresso_minimum_php_version_error
67
-         *
68
-         * @return void
69
-         */
70
-        function espresso_minimum_php_version_error()
71
-        {
72
-            ?>
63
+	define('EE_MIN_PHP_VER_REQUIRED', '7.1.0');
64
+	if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
65
+		/**
66
+		 * espresso_minimum_php_version_error
67
+		 *
68
+		 * @return void
69
+		 */
70
+		function espresso_minimum_php_version_error()
71
+		{
72
+			?>
73 73
             <div class="error">
74 74
                 <p>
75 75
                     <?php
76
-                    printf(
77
-                        esc_html__(
78
-                            'We\'re sorry, but Event Espresso requires PHP version %1$s or greater in order to operate. You are currently running version %2$s.%3$sIn order to update your version of PHP, you will need to contact your current hosting provider.%3$sFor information on stable PHP versions, please go to %4$s.',
79
-                            'event_espresso'
80
-                        ),
81
-                        EE_MIN_PHP_VER_REQUIRED,
82
-                        PHP_VERSION,
83
-                        '<br/>',
84
-                        '<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
85
-                    );
86
-                    ?>
76
+					printf(
77
+						esc_html__(
78
+							'We\'re sorry, but Event Espresso requires PHP version %1$s or greater in order to operate. You are currently running version %2$s.%3$sIn order to update your version of PHP, you will need to contact your current hosting provider.%3$sFor information on stable PHP versions, please go to %4$s.',
79
+							'event_espresso'
80
+						),
81
+						EE_MIN_PHP_VER_REQUIRED,
82
+						PHP_VERSION,
83
+						'<br/>',
84
+						'<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
85
+					);
86
+					?>
87 87
                 </p>
88 88
             </div>
89 89
             <?php
90
-            espresso_deactivate_plugin(plugin_basename(__FILE__));
91
-        }
90
+			espresso_deactivate_plugin(plugin_basename(__FILE__));
91
+		}
92 92
 
93
-        add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
94
-    } else {
95
-        define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
96
-        /**
97
-         * espresso_version
98
-         * Returns the plugin version
99
-         *
100
-         * @return string
101
-         */
102
-        function espresso_version()
103
-        {
104
-            return apply_filters('FHEE__espresso__espresso_version', '4.12.0.rc.001');
105
-        }
93
+		add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
94
+	} else {
95
+		define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
96
+		/**
97
+		 * espresso_version
98
+		 * Returns the plugin version
99
+		 *
100
+		 * @return string
101
+		 */
102
+		function espresso_version()
103
+		{
104
+			return apply_filters('FHEE__espresso__espresso_version', '4.12.0.rc.001');
105
+		}
106 106
 
107
-        /**
108
-         * espresso_plugin_activation
109
-         * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
110
-         */
111
-        function espresso_plugin_activation()
112
-        {
113
-            update_option('ee_espresso_activation', true);
107
+		/**
108
+		 * espresso_plugin_activation
109
+		 * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
110
+		 */
111
+		function espresso_plugin_activation()
112
+		{
113
+			update_option('ee_espresso_activation', true);
114 114
 
115
-            // Run WP GraphQL activation callback
116
-            if (! class_exists('WPGraphQL')) {
117
-                require_once EE_THIRD_PARTY . 'wp-graphql/wp-graphql.php';
118
-            }
119
-            graphql_activation_callback();
120
-        }
115
+			// Run WP GraphQL activation callback
116
+			if (! class_exists('WPGraphQL')) {
117
+				require_once EE_THIRD_PARTY . 'wp-graphql/wp-graphql.php';
118
+			}
119
+			graphql_activation_callback();
120
+		}
121 121
 
122
-        register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
122
+		register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
123 123
 
124
-        /**
125
-         * espresso_plugin_deactivation
126
-         */
127
-        function espresso_plugin_deactivation()
128
-        {
129
-            // Run WP GraphQL deactivation callback
130
-            if (! class_exists('WPGraphQL')) {
131
-                require_once EE_THIRD_PARTY . 'wp-graphql/wp-graphql.php';
132
-            }
133
-            graphql_deactivation_callback();
134
-        }
135
-        register_deactivation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_deactivation');
124
+		/**
125
+		 * espresso_plugin_deactivation
126
+		 */
127
+		function espresso_plugin_deactivation()
128
+		{
129
+			// Run WP GraphQL deactivation callback
130
+			if (! class_exists('WPGraphQL')) {
131
+				require_once EE_THIRD_PARTY . 'wp-graphql/wp-graphql.php';
132
+			}
133
+			graphql_deactivation_callback();
134
+		}
135
+		register_deactivation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_deactivation');
136 136
 
137
-        require_once __DIR__ . '/core/bootstrap_espresso.php';
138
-        bootstrap_espresso();
139
-    }
137
+		require_once __DIR__ . '/core/bootstrap_espresso.php';
138
+		bootstrap_espresso();
139
+	}
140 140
 }
141 141
 if (! function_exists('espresso_deactivate_plugin')) {
142
-    /**
143
-     *    deactivate_plugin
144
-     * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
145
-     *
146
-     * @access public
147
-     * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
148
-     * @return    void
149
-     */
150
-    function espresso_deactivate_plugin($plugin_basename = '')
151
-    {
152
-        if (! function_exists('deactivate_plugins')) {
153
-            require_once ABSPATH . 'wp-admin/includes/plugin.php';
154
-        }
155
-        unset($_GET['activate'], $_REQUEST['activate']);
156
-        deactivate_plugins($plugin_basename);
157
-    }
142
+	/**
143
+	 *    deactivate_plugin
144
+	 * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
145
+	 *
146
+	 * @access public
147
+	 * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
148
+	 * @return    void
149
+	 */
150
+	function espresso_deactivate_plugin($plugin_basename = '')
151
+	{
152
+		if (! function_exists('deactivate_plugins')) {
153
+			require_once ABSPATH . 'wp-admin/includes/plugin.php';
154
+		}
155
+		unset($_GET['activate'], $_REQUEST['activate']);
156
+		deactivate_plugins($plugin_basename);
157
+	}
158 158
 }
Please login to merge, or discard this patch.