Completed
Branch FET-6462-shortcodes-support-ta... (162921)
by
unknown
59:10 queued 48:13
created
espresso.php 1 patch
Indentation   +161 added lines, -161 removed lines patch added patch discarded remove patch
@@ -38,192 +38,192 @@
 block discarded – undo
38 38
  * @since            4.0
39 39
  */
40 40
 if (function_exists('espresso_version')) {
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
-        ?>
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 echo esc_html__(
51
-                        '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.',
52
-                        'event_espresso'
53
-                ); ?>
51
+						'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.',
52
+						'event_espresso'
53
+				); ?>
54 54
             </p>
55 55
         </div>
56 56
         <?php
57
-        espresso_deactivate_plugin(plugin_basename(__FILE__));
58
-    }
57
+		espresso_deactivate_plugin(plugin_basename(__FILE__));
58
+	}
59 59
 
60
-    add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
60
+	add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
61 61
 } else {
62
-    define('EE_MIN_PHP_VER_REQUIRED', '5.3.9');
63
-    if ( ! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
64
-        /**
65
-         * espresso_minimum_php_version_error
66
-         *
67
-         * @return void
68
-         */
69
-        function espresso_minimum_php_version_error()
70
-        {
71
-            ?>
62
+	define('EE_MIN_PHP_VER_REQUIRED', '5.3.9');
63
+	if ( ! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
64
+		/**
65
+		 * espresso_minimum_php_version_error
66
+		 *
67
+		 * @return void
68
+		 */
69
+		function espresso_minimum_php_version_error()
70
+		{
71
+			?>
72 72
             <div class="error">
73 73
                 <p>
74 74
                     <?php
75
-                    printf(
76
-                            esc_html__(
77
-                                    '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.',
78
-                                    'event_espresso'
79
-                            ),
80
-                            EE_MIN_PHP_VER_REQUIRED,
81
-                            PHP_VERSION,
82
-                            '<br/>',
83
-                            '<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
84
-                    );
85
-                    ?>
75
+					printf(
76
+							esc_html__(
77
+									'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.',
78
+									'event_espresso'
79
+							),
80
+							EE_MIN_PHP_VER_REQUIRED,
81
+							PHP_VERSION,
82
+							'<br/>',
83
+							'<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
84
+					);
85
+					?>
86 86
                 </p>
87 87
             </div>
88 88
             <?php
89
-            espresso_deactivate_plugin(plugin_basename(__FILE__));
90
-        }
89
+			espresso_deactivate_plugin(plugin_basename(__FILE__));
90
+		}
91 91
 
92
-        add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
92
+		add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
93 93
 
94
-    } else {
94
+	} else {
95 95
 
96
-        define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
96
+		define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
97 97
 
98
-        /**
99
-         * espresso_version
100
-         * Returns the plugin version
101
-         *
102
-         * @return string
103
-         */
104
-        function espresso_version()
105
-        {
106
-            return apply_filters('FHEE__espresso__espresso_version', '4.9.36.rc.002');
107
-        }
98
+		/**
99
+		 * espresso_version
100
+		 * Returns the plugin version
101
+		 *
102
+		 * @return string
103
+		 */
104
+		function espresso_version()
105
+		{
106
+			return apply_filters('FHEE__espresso__espresso_version', '4.9.36.rc.002');
107
+		}
108 108
 
109
-        /**
110
-         * espresso_plugin_activation
111
-         * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
112
-         */
113
-        function espresso_plugin_activation()
114
-        {
115
-            update_option('ee_espresso_activation', true);
116
-        }
117
-        register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
109
+		/**
110
+		 * espresso_plugin_activation
111
+		 * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
112
+		 */
113
+		function espresso_plugin_activation()
114
+		{
115
+			update_option('ee_espresso_activation', true);
116
+		}
117
+		register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
118 118
 
119
-        /**
120
-         *    espresso_load_error_handling
121
-         *    this function loads EE's class for handling exceptions and errors
122
-         */
123
-        function espresso_load_error_handling()
124
-        {
125
-            static $error_handling_loaded = false;
126
-            if ($error_handling_loaded) {
127
-                return;
128
-            }
129
-            // load debugging tools
130
-            if (WP_DEBUG === true && is_readable(EE_HELPERS . 'EEH_Debug_Tools.helper.php')) {
131
-                require_once(EE_HELPERS . 'EEH_Debug_Tools.helper.php');
132
-                \EEH_Debug_Tools::instance();
133
-            }
134
-            // load error handling
135
-            if (is_readable(EE_CORE . 'EE_Error.core.php')) {
136
-                require_once(EE_CORE . 'EE_Error.core.php');
137
-            } else {
138
-                wp_die(esc_html__('The EE_Error core class could not be loaded.', 'event_espresso'));
139
-            }
140
-            $error_handling_loaded = true;
141
-        }
119
+		/**
120
+		 *    espresso_load_error_handling
121
+		 *    this function loads EE's class for handling exceptions and errors
122
+		 */
123
+		function espresso_load_error_handling()
124
+		{
125
+			static $error_handling_loaded = false;
126
+			if ($error_handling_loaded) {
127
+				return;
128
+			}
129
+			// load debugging tools
130
+			if (WP_DEBUG === true && is_readable(EE_HELPERS . 'EEH_Debug_Tools.helper.php')) {
131
+				require_once(EE_HELPERS . 'EEH_Debug_Tools.helper.php');
132
+				\EEH_Debug_Tools::instance();
133
+			}
134
+			// load error handling
135
+			if (is_readable(EE_CORE . 'EE_Error.core.php')) {
136
+				require_once(EE_CORE . 'EE_Error.core.php');
137
+			} else {
138
+				wp_die(esc_html__('The EE_Error core class could not be loaded.', 'event_espresso'));
139
+			}
140
+			$error_handling_loaded = true;
141
+		}
142 142
 
143
-        /**
144
-         *    espresso_load_required
145
-         *    given a class name and path, this function will load that file or throw an exception
146
-         *
147
-         * @param    string $classname
148
-         * @param    string $full_path_to_file
149
-         * @throws    EE_Error
150
-         */
151
-        function espresso_load_required($classname, $full_path_to_file)
152
-        {
153
-            if (is_readable($full_path_to_file)) {
154
-                require_once($full_path_to_file);
155
-            } else {
156
-                throw new \EE_Error (
157
-                    sprintf(
158
-                        esc_html__(
159
-                            'The %s class file could not be located or is not readable due to file permissions.',
160
-                            'event_espresso'
161
-                        ),
162
-                        $classname
163
-                    )
164
-                );
165
-            }
166
-        }
143
+		/**
144
+		 *    espresso_load_required
145
+		 *    given a class name and path, this function will load that file or throw an exception
146
+		 *
147
+		 * @param    string $classname
148
+		 * @param    string $full_path_to_file
149
+		 * @throws    EE_Error
150
+		 */
151
+		function espresso_load_required($classname, $full_path_to_file)
152
+		{
153
+			if (is_readable($full_path_to_file)) {
154
+				require_once($full_path_to_file);
155
+			} else {
156
+				throw new \EE_Error (
157
+					sprintf(
158
+						esc_html__(
159
+							'The %s class file could not be located or is not readable due to file permissions.',
160
+							'event_espresso'
161
+						),
162
+						$classname
163
+					)
164
+				);
165
+			}
166
+		}
167 167
 
168
-        /**
169
-         * @since 4.9.27
170
-         * @throws \EE_Error
171
-         * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
172
-         * @throws \EventEspresso\core\exceptions\InvalidEntityException
173
-         * @throws \EventEspresso\core\exceptions\InvalidIdentifierException
174
-         * @throws \EventEspresso\core\exceptions\InvalidClassException
175
-         * @throws \EventEspresso\core\exceptions\InvalidDataTypeException
176
-         * @throws \EventEspresso\core\services\container\exceptions\ServiceExistsException
177
-         * @throws \EventEspresso\core\services\container\exceptions\ServiceNotFoundException
178
-         * @throws \OutOfBoundsException
179
-         */
180
-        function bootstrap_espresso()
181
-        {
182
-            try {
183
-                require_once(plugin_dir_path(EVENT_ESPRESSO_MAIN_FILE) . 'core/espresso_definitions.php');
184
-                espresso_load_error_handling();
185
-                espresso_load_required('EEH_Base', EE_CORE . 'helpers' . DS . 'EEH_Base.helper.php');
186
-                espresso_load_required('EEH_File', EE_CORE . 'interfaces' . DS . 'EEHI_File.interface.php');
187
-                espresso_load_required('EEH_File', EE_CORE . 'helpers' . DS . 'EEH_File.helper.php');
188
-                espresso_load_required('EEH_Array', EE_CORE . 'helpers' . DS . 'EEH_Array.helper.php');
189
-                // instantiate and configure PSR4 autoloader
190
-                espresso_load_required('Psr4Autoloader', EE_CORE . 'Psr4Autoloader.php');
191
-                espresso_load_required('EE_Psr4AutoloaderInit', EE_CORE . 'EE_Psr4AutoloaderInit.core.php');
192
-                $AutoloaderInit = new \EE_Psr4AutoloaderInit();
193
-                $AutoloaderInit->initializeAutoloader();
194
-                espresso_load_required('EE_Request', EE_CORE . 'request_stack' . DS . 'EE_Request.core.php');
195
-                espresso_load_required('EE_Response', EE_CORE . 'request_stack' . DS . 'EE_Response.core.php');
196
-                espresso_load_required('EE_Bootstrap', EE_CORE . 'EE_Bootstrap.core.php');
197
-                // bootstrap EE and the request stack
198
-                new EE_Bootstrap(
199
-                    new EE_Request($_GET, $_POST, $_COOKIE),
200
-                    new EE_Response()
201
-                );
202
-            } catch (Exception $e) {
203
-                new EventEspresso\core\exceptions\ExceptionStackTraceDisplay($e);
204
-            }
205
-        }
168
+		/**
169
+		 * @since 4.9.27
170
+		 * @throws \EE_Error
171
+		 * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
172
+		 * @throws \EventEspresso\core\exceptions\InvalidEntityException
173
+		 * @throws \EventEspresso\core\exceptions\InvalidIdentifierException
174
+		 * @throws \EventEspresso\core\exceptions\InvalidClassException
175
+		 * @throws \EventEspresso\core\exceptions\InvalidDataTypeException
176
+		 * @throws \EventEspresso\core\services\container\exceptions\ServiceExistsException
177
+		 * @throws \EventEspresso\core\services\container\exceptions\ServiceNotFoundException
178
+		 * @throws \OutOfBoundsException
179
+		 */
180
+		function bootstrap_espresso()
181
+		{
182
+			try {
183
+				require_once(plugin_dir_path(EVENT_ESPRESSO_MAIN_FILE) . 'core/espresso_definitions.php');
184
+				espresso_load_error_handling();
185
+				espresso_load_required('EEH_Base', EE_CORE . 'helpers' . DS . 'EEH_Base.helper.php');
186
+				espresso_load_required('EEH_File', EE_CORE . 'interfaces' . DS . 'EEHI_File.interface.php');
187
+				espresso_load_required('EEH_File', EE_CORE . 'helpers' . DS . 'EEH_File.helper.php');
188
+				espresso_load_required('EEH_Array', EE_CORE . 'helpers' . DS . 'EEH_Array.helper.php');
189
+				// instantiate and configure PSR4 autoloader
190
+				espresso_load_required('Psr4Autoloader', EE_CORE . 'Psr4Autoloader.php');
191
+				espresso_load_required('EE_Psr4AutoloaderInit', EE_CORE . 'EE_Psr4AutoloaderInit.core.php');
192
+				$AutoloaderInit = new \EE_Psr4AutoloaderInit();
193
+				$AutoloaderInit->initializeAutoloader();
194
+				espresso_load_required('EE_Request', EE_CORE . 'request_stack' . DS . 'EE_Request.core.php');
195
+				espresso_load_required('EE_Response', EE_CORE . 'request_stack' . DS . 'EE_Response.core.php');
196
+				espresso_load_required('EE_Bootstrap', EE_CORE . 'EE_Bootstrap.core.php');
197
+				// bootstrap EE and the request stack
198
+				new EE_Bootstrap(
199
+					new EE_Request($_GET, $_POST, $_COOKIE),
200
+					new EE_Response()
201
+				);
202
+			} catch (Exception $e) {
203
+				new EventEspresso\core\exceptions\ExceptionStackTraceDisplay($e);
204
+			}
205
+		}
206 206
 
207
-        bootstrap_espresso();
207
+		bootstrap_espresso();
208 208
 
209
-    }
209
+	}
210 210
 }
211 211
 
212 212
 if ( ! function_exists('espresso_deactivate_plugin')) {
213
-    /**
214
-     *    deactivate_plugin
215
-     * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
216
-     *
217
-     * @access public
218
-     * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
219
-     * @return    void
220
-     */
221
-    function espresso_deactivate_plugin($plugin_basename = '')
222
-    {
223
-        if ( ! function_exists('deactivate_plugins')) {
224
-            require_once(ABSPATH . 'wp-admin/includes/plugin.php');
225
-        }
226
-        unset($_GET['activate'], $_REQUEST['activate']);
227
-        deactivate_plugins($plugin_basename);
228
-    }
213
+	/**
214
+	 *    deactivate_plugin
215
+	 * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
216
+	 *
217
+	 * @access public
218
+	 * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
219
+	 * @return    void
220
+	 */
221
+	function espresso_deactivate_plugin($plugin_basename = '')
222
+	{
223
+		if ( ! function_exists('deactivate_plugins')) {
224
+			require_once(ABSPATH . 'wp-admin/includes/plugin.php');
225
+		}
226
+		unset($_GET['activate'], $_REQUEST['activate']);
227
+		deactivate_plugins($plugin_basename);
228
+	}
229 229
 }
230 230
\ No newline at end of file
Please login to merge, or discard this patch.