Completed
Branch FET-9643-checkin-system-docume... (5f5a9c)
by
unknown
228:39 queued 218:41
created
core/CPTs/EE_CPT_Attendee_Strategy.core.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 	 * @param 	array 	$arguments
40 40
 	 * @return \EE_CPT_Attendee_Strategy
41 41
 	 */
42
-	public function __construct( $arguments = array() ) {
43
-		$this->CPT = isset( $arguments['CPT'] ) ? $arguments['CPT'] : NULL;
44
-		$WP_Query = isset( $arguments['WP_Query'] ) ? $arguments['WP_Query'] : NULL;
42
+	public function __construct($arguments = array()) {
43
+		$this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : NULL;
44
+		$WP_Query = isset($arguments['WP_Query']) ? $arguments['WP_Query'] : NULL;
45 45
 //		add_filter( 'the_posts', array( $this, 'the_posts' ), 1, 2 );
46 46
 	}
47 47
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * @param WP_Query $wp_query
56 56
 	 * @return    void
57 57
 	 */
58
-	public function the_posts( $posts, WP_Query $wp_query) {
58
+	public function the_posts($posts, WP_Query $wp_query) {
59 59
 		//$EVT = EE_Registry::instance()->load_model( 'Event' );
60 60
 //		EEH_Debug_Tools::printr( $EVT, '$EVT  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
61 61
 //		$EVT_IDs = array();
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
core/CPTs/EE_CPT_Strategy.core.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
24 24
 class EE_CPT_Strategy extends EE_BASE {
25 25
 
26 26
    /**
27
-     * 	EE_CPT_Strategy Object
28
-     * 	@private _instance
29
-	 * 	@private 	protected
30
-     */
27
+    * 	EE_CPT_Strategy Object
28
+    * 	@private _instance
29
+    * 	@private 	protected
30
+    */
31 31
 	private static $_instance = NULL;
32 32
 
33 33
 
Please login to merge, or discard this patch.
Spacing   +105 added lines, -105 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public static function instance() {
80 80
 		// check if class object is instantiated
81
-		if ( ! self::$_instance instanceof EE_CPT_Strategy ) {
81
+		if ( ! self::$_instance instanceof EE_CPT_Strategy) {
82 82
 			self::$_instance = new self();
83 83
 		}
84 84
 		return self::$_instance;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 //		d( $this->_CPT_endpoints );
102 102
 //		d( $this->_CPT_taxonomies );
103 103
 
104
-		add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ), 5 );
104
+		add_action('pre_get_posts', array($this, 'pre_get_posts'), 5);
105 105
 	}
106 106
 
107 107
 
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	private function _set_CPT_endpoints() {
116 116
 		$_CPT_endpoints = array();
117
-		if ( is_array( $this->_CPTs )) {
118
-			foreach ( $this->_CPTs as $CPT_type => $CPT ) {
119
-				$_CPT_endpoints [ $CPT['plural_slug'] ] = $CPT_type;
117
+		if (is_array($this->_CPTs)) {
118
+			foreach ($this->_CPTs as $CPT_type => $CPT) {
119
+				$_CPT_endpoints [$CPT['plural_slug']] = $CPT_type;
120 120
 			}
121 121
 		}
122 122
 		return $_CPT_endpoints;
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	 * @param WP_Query $WP_Query
132 132
 	 * @return void
133 133
 	 */
134
-	private function _set_EE_tags_on_WP_Query( WP_Query $WP_Query) {
134
+	private function _set_EE_tags_on_WP_Query(WP_Query $WP_Query) {
135 135
 		$WP_Query->is_espresso_event_single = FALSE;
136 136
 		$WP_Query->is_espresso_event_archive = FALSE;
137 137
 		$WP_Query->is_espresso_event_taxonomy = FALSE;
@@ -158,16 +158,16 @@  discard block
 block discarded – undo
158 158
 	 */
159 159
 	private function _set_CPT_taxonomies() {
160 160
 		// check if taxonomies have already been set
161
-		if ( empty( $this->_CPT_taxonomies )) {
161
+		if (empty($this->_CPT_taxonomies)) {
162 162
 			// and that this CPT has taxonomies registered for it
163
-			if ( isset( $this->CPT['args'] ) && isset( $this->CPT['args']['taxonomies'] )) {
163
+			if (isset($this->CPT['args']) && isset($this->CPT['args']['taxonomies'])) {
164 164
 				// if so then grab them, but we want the taxonomy name as the key
165
-				$taxonomies = array_flip( $this->CPT['args']['taxonomies'] );
165
+				$taxonomies = array_flip($this->CPT['args']['taxonomies']);
166 166
 				// then grab the list of ALL taxonomies
167 167
 				$all_taxonomies = EE_Register_CPTs::get_taxonomies();
168
-				foreach ( $taxonomies as $taxonomy => $details ) {
168
+				foreach ($taxonomies as $taxonomy => $details) {
169 169
 					// add details to our taxonomies if they exist
170
-					$taxonomies[ $taxonomy ] = isset( $all_taxonomies[ $taxonomy ] ) ? $all_taxonomies[ $taxonomy ] : NULL;
170
+					$taxonomies[$taxonomy] = isset($all_taxonomies[$taxonomy]) ? $all_taxonomies[$taxonomy] : NULL;
171 171
 				}
172 172
 				$this->_CPT_taxonomies = $taxonomies;
173 173
 			}
@@ -192,11 +192,11 @@  discard block
 block discarded – undo
192 192
 	 * @return void
193 193
 	 */
194 194
 	private function _set_CPT_terms() {
195
-		if ( empty( $this->_CPT_terms )) {
195
+		if (empty($this->_CPT_terms)) {
196 196
 			$terms = EEM_Term::instance()->get_all_CPT_post_tags();
197
-			foreach ( $terms as $term ) {
198
-				if ( $term instanceof EE_Term ) {
199
-					$this->_CPT_terms[ $term->slug() ] = $term;
197
+			foreach ($terms as $term) {
198
+				if ($term instanceof EE_Term) {
199
+					$this->_CPT_terms[$term->slug()] = $term;
200 200
 				}
201 201
 			}
202 202
 		}
@@ -211,24 +211,24 @@  discard block
 block discarded – undo
211 211
 	 * @param $WP_Query
212 212
 	 * @return void
213 213
 	 */
214
-	private function _set_post_type_for_terms( WP_Query $WP_Query ) {
214
+	private function _set_post_type_for_terms(WP_Query $WP_Query) {
215 215
 		// is a tag set ?
216
-		if ( isset( $WP_Query->query['tag'] )) {
216
+		if (isset($WP_Query->query['tag'])) {
217 217
 			// set post_tags
218 218
 			$this->_set_CPT_terms();
219 219
 			// is this tag archive term in the list of terms used by our CPTs ?
220
-			$term = isset ( $this->_CPT_terms[ $WP_Query->query['tag'] ] ) ? $this->_CPT_terms[ $WP_Query->query['tag'] ] : NULL;
220
+			$term = isset ($this->_CPT_terms[$WP_Query->query['tag']]) ? $this->_CPT_terms[$WP_Query->query['tag']] : NULL;
221 221
 			// verify the term
222
-			if ( $term instanceof EE_Term ) {
223
-				$term->post_type  = array_merge( array( 'post', 'page' ), (array)$term->post_type );
224
-				$term->post_type = apply_filters( 'FHEE__EE_CPT_Strategy___set_post_type_for_terms__term_post_type', $term->post_type, $term );
222
+			if ($term instanceof EE_Term) {
223
+				$term->post_type = array_merge(array('post', 'page'), (array) $term->post_type);
224
+				$term->post_type = apply_filters('FHEE__EE_CPT_Strategy___set_post_type_for_terms__term_post_type', $term->post_type, $term);
225 225
 				// if a post type is already set
226
-				if ( isset( $WP_Query->query_vars['post_type'] )) {
226
+				if (isset($WP_Query->query_vars['post_type'])) {
227 227
 						// add to existing array
228
-						$term->post_type = array_merge ( (array)$WP_Query->query_vars['post_type'], $term->post_type );
228
+						$term->post_type = array_merge((array) $WP_Query->query_vars['post_type'], $term->post_type);
229 229
 				}
230 230
 				// just set post_type to our CPT
231
-				$WP_Query->set( 'post_type', $term->post_type );
231
+				$WP_Query->set('post_type', $term->post_type);
232 232
 			}
233 233
 		}
234 234
 	}
@@ -243,17 +243,17 @@  discard block
 block discarded – undo
243 243
 	 * in order for is_archive() and is_single() methods to work properly.
244 244
 	 * @return void
245 245
 	 */
246
-	public function _possibly_set_ee_request_var(){
246
+	public function _possibly_set_ee_request_var() {
247 247
 		// check if ee action var has been set
248
-		if ( ! EE_Registry::instance()->REQ->is_set( 'ee' )) {
248
+		if ( ! EE_Registry::instance()->REQ->is_set('ee')) {
249 249
 			// check that route exists for CPT archive slug
250
-			if ( is_archive() && EE_Config::get_route( $this->CPT['plural_slug'] )) {
250
+			if (is_archive() && EE_Config::get_route($this->CPT['plural_slug'])) {
251 251
 				// ie: set "ee" to "events"
252
-				EE_Registry::instance()->REQ->set( 'ee', $this->CPT['plural_slug'] );
252
+				EE_Registry::instance()->REQ->set('ee', $this->CPT['plural_slug']);
253 253
 			// or does it match a single page CPT like /event/
254
-			} else if ( is_single() && EE_Config::get_route( $this->CPT['singular_slug'] )) {
254
+			} else if (is_single() && EE_Config::get_route($this->CPT['singular_slug'])) {
255 255
 				// ie: set "ee" to "event"
256
-				EE_Registry::instance()->REQ->set( 'ee', $this->CPT['singular_slug'] );
256
+				EE_Registry::instance()->REQ->set('ee', $this->CPT['singular_slug']);
257 257
 			}
258 258
 		}
259 259
 	}
@@ -267,11 +267,11 @@  discard block
 block discarded – undo
267 267
 	 * @param WP_Query $WP_Query
268 268
 	 * @return void
269 269
 	 */
270
-	public function _set_paging( $WP_Query ) {
271
-		if ( $WP_Query->is_main_query() && apply_filters( 'FHEE__EE_CPT_Strategy___set_paging', TRUE )) {
272
-			$page = ( get_query_var('page') ) ? get_query_var('page') : NULL;
273
-			$paged = ( get_query_var('paged') ) ? get_query_var('paged') : $page;
274
-			$WP_Query->set( 'paged', $paged );
270
+	public function _set_paging($WP_Query) {
271
+		if ($WP_Query->is_main_query() && apply_filters('FHEE__EE_CPT_Strategy___set_paging', TRUE)) {
272
+			$page = (get_query_var('page')) ? get_query_var('page') : NULL;
273
+			$paged = (get_query_var('paged')) ? get_query_var('paged') : $page;
274
+			$WP_Query->set('paged', $paged);
275 275
 		}
276 276
 	}
277 277
 
@@ -288,35 +288,35 @@  discard block
 block discarded – undo
288 288
 	 * @param WP_Query $WP_Query
289 289
 	 * @return void
290 290
 	 */
291
-	public function pre_get_posts( $WP_Query ) {
291
+	public function pre_get_posts($WP_Query) {
292 292
 		// check that post-type is set
293
-		if ( ! $WP_Query instanceof WP_Query ) {
293
+		if ( ! $WP_Query instanceof WP_Query) {
294 294
 			return;
295 295
 		}
296 296
 
297 297
 		// add our conditionals
298
-		$this->_set_EE_tags_on_WP_Query( $WP_Query );
298
+		$this->_set_EE_tags_on_WP_Query($WP_Query);
299 299
 		// check for terms
300
-		$this->_set_post_type_for_terms( $WP_Query );
300
+		$this->_set_post_type_for_terms($WP_Query);
301 301
 		// make sure paging is always set
302
-		$this->_set_paging( $WP_Query );
302
+		$this->_set_paging($WP_Query);
303 303
 
304 304
 		// is a taxonomy set ?
305
-		if ( $WP_Query->is_tax ) {
305
+		if ($WP_Query->is_tax) {
306 306
 			// loop thru our taxonomies
307
-			foreach ( $this->_CPT_taxonomies as $CPT_taxonomy => $CPT_taxonomy_details ) {
307
+			foreach ($this->_CPT_taxonomies as $CPT_taxonomy => $CPT_taxonomy_details) {
308 308
 				// check if one of our taxonomies is set as a query var
309
-				if ( isset( $WP_Query->query[ $CPT_taxonomy ] )) {
309
+				if (isset($WP_Query->query[$CPT_taxonomy])) {
310 310
 					// but which CPT does that correspond to??? hmmm... guess we gotta go looping
311
-					foreach ( $this->_CPTs as $post_type => $CPT ) {
311
+					foreach ($this->_CPTs as $post_type => $CPT) {
312 312
 						// verify our CPT has args, is public and has taxonomies set
313
-						if ( isset( $CPT['args'] ) && $CPT['args']['public'] && ! empty( $CPT['args']['taxonomies'] )) {
313
+						if (isset($CPT['args']) && $CPT['args']['public'] && ! empty($CPT['args']['taxonomies'])) {
314 314
 							// does the captured taxonomy belong to this CPT ?
315
-							if ( in_array( $CPT_taxonomy, $CPT['args']['taxonomies'] )) {
315
+							if (in_array($CPT_taxonomy, $CPT['args']['taxonomies'])) {
316 316
 								// if so, then add this CPT post_type to the current query's array of post_types'
317
-								$WP_Query->query_vars['post_type'] = isset( $WP_Query->query_vars['post_type'] ) ? (array)$WP_Query->query_vars['post_type'] : array();
317
+								$WP_Query->query_vars['post_type'] = isset($WP_Query->query_vars['post_type']) ? (array) $WP_Query->query_vars['post_type'] : array();
318 318
 								$WP_Query->query_vars['post_type'][] = $post_type;
319
-								switch( $post_type ) {
319
+								switch ($post_type) {
320 320
 									case 'espresso_events' :
321 321
 										$WP_Query->is_espresso_event_taxonomy = TRUE;
322 322
 										break;
@@ -337,27 +337,27 @@  discard block
 block discarded – undo
337 337
 //		d( $CPT_taxonomy );
338 338
 //		d( $WP_Query );
339 339
 
340
-		if ( isset( $WP_Query->query_vars['post_type'] )) {
340
+		if (isset($WP_Query->query_vars['post_type'])) {
341 341
 			// loop thru post_types as array
342
-			foreach ( (array)$WP_Query->query_vars['post_type'] as $post_type ) {
342
+			foreach ((array) $WP_Query->query_vars['post_type'] as $post_type) {
343 343
 
344 344
 				// is current query for an EE CPT ?
345
-				if ( isset( $this->_CPTs[ $post_type ] )) {
345
+				if (isset($this->_CPTs[$post_type])) {
346 346
 					// is EE on or off ?
347
-					if ( EE_Maintenance_Mode::instance()->level() ) {
347
+					if (EE_Maintenance_Mode::instance()->level()) {
348 348
 						// reroute CPT template view to maintenance_mode.template.php
349
-						if( ! has_filter( 'template_include',array( 'EE_Maintenance_Mode', 'template_include' ))){
350
-							add_filter( 'template_include', array( 'EE_Maintenance_Mode', 'template_include' ), 99999 );
349
+						if ( ! has_filter('template_include', array('EE_Maintenance_Mode', 'template_include'))) {
350
+							add_filter('template_include', array('EE_Maintenance_Mode', 'template_include'), 99999);
351 351
 						}
352
-						if( has_filter( 'the_content',array( EE_Maintenance_Mode::instance(), 'the_content' ) ) ) {
353
-							add_filter( 'the_content', array( $this, 'inject_EE_shortcode_placeholder' ), 1 );
352
+						if (has_filter('the_content', array(EE_Maintenance_Mode::instance(), 'the_content'))) {
353
+							add_filter('the_content', array($this, 'inject_EE_shortcode_placeholder'), 1);
354 354
 						}
355 355
 						return;
356 356
 					}
357 357
 					// load EE_Request_Handler (this was added as a result of https://events.codebasehq.com/projects/event-espresso/tickets/9037
358
-					EE_Registry::instance()->load_core( 'Request_Handler' );
358
+					EE_Registry::instance()->load_core('Request_Handler');
359 359
 					// grab details for the CPT the current query is for
360
-					$this->CPT = $this->_CPTs[ $post_type ];
360
+					$this->CPT = $this->_CPTs[$post_type];
361 361
 					// set post type
362 362
 					$this->CPT['post_type'] = $post_type;
363 363
 					// set taxonomies
@@ -365,27 +365,27 @@  discard block
 block discarded – undo
365 365
 					// the post or category or term that is triggering EE
366 366
 					$this->CPT['espresso_page'] = EE_Registry::instance()->REQ->is_espresso_page();
367 367
 					// requested post name
368
-					$this->CPT['post_name'] = EE_Registry::instance()->REQ->get( 'post_name' );
368
+					$this->CPT['post_name'] = EE_Registry::instance()->REQ->get('post_name');
369 369
 					//d( $this->CPT );
370 370
 					// add support for viewing 'private', 'draft', or 'pending' posts
371
-					if ( is_user_logged_in() && isset( $WP_Query->query_vars['p'] ) && $WP_Query->query_vars['p'] != 0 && current_user_can( 'edit_post', $WP_Query->query_vars['p'] )) {
371
+					if (is_user_logged_in() && isset($WP_Query->query_vars['p']) && $WP_Query->query_vars['p'] != 0 && current_user_can('edit_post', $WP_Query->query_vars['p'])) {
372 372
 						// we can just inject directly into the WP_Query object
373
-						$WP_Query->query['post_status'] = array( 'publish', 'private', 'draft', 'pending' );
373
+						$WP_Query->query['post_status'] = array('publish', 'private', 'draft', 'pending');
374 374
 						// now set the main 'ee' request var so that the appropriate module can load the appropriate template(s)
375
-						EE_Registry::instance()->REQ->set( 'ee', $this->CPT['singular_slug'] );
375
+						EE_Registry::instance()->REQ->set('ee', $this->CPT['singular_slug']);
376 376
 					}
377 377
 					$this->_possibly_set_ee_request_var();
378 378
 					// convert post_type to model name
379
-					$model_name = str_replace( 'EE_', '', $this->CPT['class_name'] );
379
+					$model_name = str_replace('EE_', '', $this->CPT['class_name']);
380 380
 					// get CPT table data via CPT Model
381
-					$this->CPT_model = EE_Registry::instance()->load_model( $model_name );
381
+					$this->CPT_model = EE_Registry::instance()->load_model($model_name);
382 382
 					$this->CPT['tables'] = $this->CPT_model->get_tables();
383 383
 					// is there a Meta Table for this CPT?
384
-					$this->CPT['meta_table'] = isset( $this->CPT['tables'][ $model_name . '_Meta' ] ) ? $this->CPT['tables'][ $model_name . '_Meta' ] : FALSE;
384
+					$this->CPT['meta_table'] = isset($this->CPT['tables'][$model_name.'_Meta']) ? $this->CPT['tables'][$model_name.'_Meta'] : FALSE;
385 385
 					// creates classname like:  CPT_Event_Strategy
386
-					$CPT_Strategy_class_name = 'CPT_' . $model_name . '_Strategy';
386
+					$CPT_Strategy_class_name = 'CPT_'.$model_name.'_Strategy';
387 387
 					// load and instantiate
388
-					 $CPT_Strategy = EE_Registry::instance()->load_core ( $CPT_Strategy_class_name, array( 'WP_Query' => $WP_Query, 'CPT' => $this->CPT ));
388
+					 $CPT_Strategy = EE_Registry::instance()->load_core($CPT_Strategy_class_name, array('WP_Query' => $WP_Query, 'CPT' => $this->CPT));
389 389
 
390 390
 					// !!!!!!!!!!  IMPORTANT !!!!!!!!!!!!
391 391
 					// here's the list of available filters in the WP_Query object
@@ -397,13 +397,13 @@  discard block
 block discarded – undo
397 397
 					// 'post_limits'
398 398
 					// 'posts_fields'
399 399
 					// 'posts_join'
400
-					add_filter( 'posts_fields', array( $this, 'posts_fields' ));
401
-					add_filter( 'posts_join',	array( $this, 'posts_join' ));
402
-					add_filter( 'get_' . $this->CPT['post_type'] . '_metadata', array( $CPT_Strategy, 'get_EE_post_type_metadata' ), 1, 4 );
403
-					add_filter( 'the_posts',	array( $this, 'the_posts' ), 1, 1 );
404
-					add_filter( 'get_edit_post_link', array( $this, 'get_edit_post_link' ), 10, 2 );
400
+					add_filter('posts_fields', array($this, 'posts_fields'));
401
+					add_filter('posts_join', array($this, 'posts_join'));
402
+					add_filter('get_'.$this->CPT['post_type'].'_metadata', array($CPT_Strategy, 'get_EE_post_type_metadata'), 1, 4);
403
+					add_filter('the_posts', array($this, 'the_posts'), 1, 1);
404
+					add_filter('get_edit_post_link', array($this, 'get_edit_post_link'), 10, 2);
405 405
 
406
-					$this->_do_template_filters( $WP_Query );
406
+					$this->_do_template_filters($WP_Query);
407 407
 				}
408 408
 			}
409 409
 		}
@@ -418,13 +418,13 @@  discard block
 block discarded – undo
418 418
 	 * @param $SQL
419 419
 	 * @return    string
420 420
 	 */
421
-	public function posts_fields( $SQL ) {
421
+	public function posts_fields($SQL) {
422 422
 		// does this CPT have a meta table ?
423
-		if ( ! empty( $this->CPT['meta_table'] )) {
423
+		if ( ! empty($this->CPT['meta_table'])) {
424 424
 			// adds something like ", wp_esp_event_meta.* " to WP Query SELECT statement
425
-			$SQL .= ', ' . $this->CPT['meta_table']->get_table_name() . '.* ' ;
425
+			$SQL .= ', '.$this->CPT['meta_table']->get_table_name().'.* ';
426 426
 		}
427
-		remove_filter( 'posts_fields', array( $this, 'posts_fields' ));
427
+		remove_filter('posts_fields', array($this, 'posts_fields'));
428 428
 		return $SQL;
429 429
 	}
430 430
 
@@ -452,14 +452,14 @@  discard block
 block discarded – undo
452 452
 	 * @param $SQL
453 453
 	 * @return    string
454 454
 	 */
455
-	public function posts_join( $SQL ) {
455
+	public function posts_join($SQL) {
456 456
 		// does this CPT have a meta table ?
457
-		if ( ! empty( $this->CPT['meta_table'] )) {
457
+		if ( ! empty($this->CPT['meta_table'])) {
458 458
 			global $wpdb;
459 459
 			// adds something like " LEFT JOIN wp_esp_event_meta ON ( wp_esp_event_meta.EVT_ID = wp_posts.ID ) " to WP Query JOIN statement
460
-			$SQL .= ' LEFT JOIN ' . $this->CPT['meta_table']->get_table_name() . ' ON ( ' . $this->CPT['meta_table']->get_table_name() . '.' . $this->CPT['meta_table']->get_fk_on_table() . ' = ' . $wpdb->posts . '.ID ) ';
460
+			$SQL .= ' LEFT JOIN '.$this->CPT['meta_table']->get_table_name().' ON ( '.$this->CPT['meta_table']->get_table_name().'.'.$this->CPT['meta_table']->get_fk_on_table().' = '.$wpdb->posts.'.ID ) ';
461 461
 		}
462
-		remove_filter( 'posts_join',	array( $this, 'posts_join' ));
462
+		remove_filter('posts_join', array($this, 'posts_join'));
463 463
 		return $SQL;
464 464
 	}
465 465
 
@@ -472,18 +472,18 @@  discard block
 block discarded – undo
472 472
 	 * @param 	\WP_Post[] 	$posts
473 473
 	 * @return 	\WP_Post[]
474 474
 	 */
475
-	public function the_posts( $posts ) {
475
+	public function the_posts($posts) {
476 476
 //		d( $posts );
477 477
 		$CPT_class = $this->CPT['class_name'];
478 478
 		// loop thru posts
479
-		if ( is_array( $posts )) {
480
-			foreach( $posts as $key => $post ) {
481
-				if ( isset( $this->_CPTs[ $post->post_type ] )) {
482
-					$post->{$CPT_class} = $this->CPT_model->instantiate_class_from_post_object( $post );
479
+		if (is_array($posts)) {
480
+			foreach ($posts as $key => $post) {
481
+				if (isset($this->_CPTs[$post->post_type])) {
482
+					$post->{$CPT_class} = $this->CPT_model->instantiate_class_from_post_object($post);
483 483
 				}
484 484
 			}
485 485
 		}
486
-		remove_filter( 'the_posts',	array( $this, 'the_posts' ), 1 );
486
+		remove_filter('the_posts', array($this, 'the_posts'), 1);
487 487
 		return $posts;
488 488
 	}
489 489
 
@@ -494,17 +494,17 @@  discard block
 block discarded – undo
494 494
 	 * @param $ID
495 495
 	 * @return string
496 496
 	 */
497
-	function get_edit_post_link( $url, $ID ) {
497
+	function get_edit_post_link($url, $ID) {
498 498
 		//need to make sure we only edit links if our cpt
499 499
 		global $post;
500
-		if ( ! isset( $this->_CPTs[ $post->post_type ] )) {
500
+		if ( ! isset($this->_CPTs[$post->post_type])) {
501 501
 			return $url;
502 502
 		}
503 503
 		//k made it here so all is good.
504 504
 		$scheme = is_ssl() ? 'https' : 'http';
505
-		$url = get_admin_url( EE_Config::instance()->core->current_blog_id, 'admin.php', $scheme );
505
+		$url = get_admin_url(EE_Config::instance()->core->current_blog_id, 'admin.php', $scheme);
506 506
 		// http://example.com/wp-admin/admin.php?page=espresso_events&action=edit&post=205&edit_nonce=0d403530d6
507
-		return wp_nonce_url( add_query_arg( array( 'page' => $this->CPT['post_type'], 'post' =>$ID, 'action' =>'edit' ), $url ), 'edit', 'edit_nonce' );
507
+		return wp_nonce_url(add_query_arg(array('page' => $this->CPT['post_type'], 'post' =>$ID, 'action' =>'edit'), $url), 'edit', 'edit_nonce');
508 508
 	}
509 509
 
510 510
 
@@ -518,11 +518,11 @@  discard block
 block discarded – undo
518 518
 	 * @param WP_Query $WP_Query
519 519
 	 * @return void
520 520
 	 */
521
-	protected function _do_template_filters( WP_Query $WP_Query ) {
521
+	protected function _do_template_filters(WP_Query $WP_Query) {
522 522
 		// if it's the main query  and requested cpt supports page_templates,
523
-		if ( $WP_Query->is_main_query() && ! empty( $this->CPT['args']['page_templates'] ) ) {
523
+		if ($WP_Query->is_main_query() && ! empty($this->CPT['args']['page_templates'])) {
524 524
 			// then let's hook into the appropriate query_template hook
525
-			add_filter( 'single_template', array( $this, 'single_cpt_template' ) );
525
+			add_filter('single_template', array($this, 'single_cpt_template'));
526 526
 		}
527 527
 	}
528 528
 
@@ -536,17 +536,17 @@  discard block
 block discarded – undo
536 536
 	 * @param string $current_template Existing default template path derived for this page call.
537 537
 	 * @return string the path to the full template file.
538 538
 	 */
539
-	public function single_cpt_template( $current_template ) {
539
+	public function single_cpt_template($current_template) {
540 540
 		$object = get_queried_object();
541 541
 		//does this called object HAVE a page template set that is something other than the default.
542
-		$template = get_post_meta( $object->ID, '_wp_page_template', true );
542
+		$template = get_post_meta($object->ID, '_wp_page_template', true);
543 543
 
544 544
 		//exit early if default or not set or invalid path (accounts for theme changes)
545
-		if ( $template == 'default' || empty( $template ) || ! is_readable( get_stylesheet_directory() . '/' . $template ) ) {
545
+		if ($template == 'default' || empty($template) || ! is_readable(get_stylesheet_directory().'/'.$template)) {
546 546
 			return $current_template;
547 547
 		}
548 548
 		//made it here so we SHOULD be able to just locate the template and then return it.
549
-		$template = locate_template( array($template)  );
549
+		$template = locate_template(array($template));
550 550
 
551 551
 		return $template;
552 552
 	}
@@ -594,9 +594,9 @@  discard block
 block discarded – undo
594 594
 	 * @param 	array 	$arguments
595 595
 	 * @return 	\EE_CPT_Default_Strategy
596 596
 	 */
597
-	public function __construct( $arguments = array() ) {
598
-		$this->CPT = isset( $arguments['CPT'] ) ? $arguments['CPT'] : NULL;
599
-		$WP_Query = isset( $arguments['WP_Query'] ) ? $arguments['WP_Query'] : NULL;
597
+	public function __construct($arguments = array()) {
598
+		$this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : NULL;
599
+		$WP_Query = isset($arguments['WP_Query']) ? $arguments['WP_Query'] : NULL;
600 600
 		//EEH_Debug_Tools::printr( $this->CPT, '$this->CPT  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
601 601
 //		add_filter( 'pre_get_posts', array( $this, 'pre_get_posts' ), 999 );
602 602
 //		add_filter( 'the_posts', array( $this, 'the_posts' ), 1, 2 );
@@ -611,9 +611,9 @@  discard block
 block discarded – undo
611 611
 	 * @param 	\WP_Query $WP_Query
612 612
 	 * @return 	\WP_Query
613 613
 	 */
614
-	public function pre_get_posts(  WP_Query $WP_Query  ) {
614
+	public function pre_get_posts(WP_Query $WP_Query) {
615 615
 		//EEH_Debug_Tools::printr( $WP_Query, '$WP_Query  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
616
-		if ( ! $WP_Query->is_main_query() && ! $WP_Query->is_archive() ) {
616
+		if ( ! $WP_Query->is_main_query() && ! $WP_Query->is_archive()) {
617 617
 			return $WP_Query;
618 618
 		}
619 619
 //		$WP_Query->set( 'post_type', array( $this->CPT['post_type'] ));
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
 	 * @param 	\WP_Query $WP_Query
632 632
 	 * @return 	\WP_Post[]
633 633
 	 */
634
-	public function the_posts(  $posts, WP_Query $WP_Query ) {
634
+	public function the_posts($posts, WP_Query $WP_Query) {
635 635
 		return $posts;
636 636
 	}
637 637
 
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
 	 * @param 	string 	$single
648 648
 	 * @return 	mixed
649 649
 	 */
650
-	public function get_EE_post_type_metadata( $meta_value = NULL, $post_id, $meta_key, $single ) {
650
+	public function get_EE_post_type_metadata($meta_value = NULL, $post_id, $meta_key, $single) {
651 651
 		return $meta_value;
652 652
 	}
653 653
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
core/CPTs/EE_CPT_Venue_Strategy.core.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,15 +39,15 @@  discard block
 block discarded – undo
39 39
 	 * @param 	array 	$arguments
40 40
 	 * @return \EE_CPT_Venue_Strategy
41 41
 	 */
42
-	public function __construct( $arguments = array() ) {
43
-		$this->CPT = isset( $arguments['CPT'] ) ? $arguments['CPT'] : NULL;
44
-		$WP_Query = isset( $arguments['WP_Query'] ) ? $arguments['WP_Query'] : NULL;
45
-		if ( $WP_Query instanceof WP_Query && ! $WP_Query->is_tag ) {
46
-			$WP_Query->is_espresso_venue_single = is_singular() && isset( $WP_Query->query->post_type ) && $WP_Query->query->post_type == 'espresso_venues' ? TRUE : FALSE;
42
+	public function __construct($arguments = array()) {
43
+		$this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : NULL;
44
+		$WP_Query = isset($arguments['WP_Query']) ? $arguments['WP_Query'] : NULL;
45
+		if ($WP_Query instanceof WP_Query && ! $WP_Query->is_tag) {
46
+			$WP_Query->is_espresso_venue_single = is_singular() && isset($WP_Query->query->post_type) && $WP_Query->query->post_type == 'espresso_venues' ? TRUE : FALSE;
47 47
 			$WP_Query->is_espresso_venue_archive = is_post_type_archive('espresso_venues') ? TRUE : FALSE;
48
-			$WP_Query->is_espresso_venue_taxonomy = is_tax( 'espresso_venue_categories' ) ? TRUE : FALSE;
48
+			$WP_Query->is_espresso_venue_taxonomy = is_tax('espresso_venue_categories') ? TRUE : FALSE;
49 49
 		}
50
-		add_filter( 'the_posts', array( $this, 'the_posts' ), 1, 2 );
50
+		add_filter('the_posts', array($this, 'the_posts'), 1, 2);
51 51
 	}
52 52
 
53 53
 
@@ -60,14 +60,14 @@  discard block
 block discarded – undo
60 60
 	 * @param WP_Query $wp_query
61 61
 	 * @return    void
62 62
 	 */
63
-	public function the_posts( $posts, WP_Query $wp_query) {
63
+	public function the_posts($posts, WP_Query $wp_query) {
64 64
 		// automagically load the EEH_Venue_View helper so that it's functions are available
65 65
 		EE_Registry::instance()->load_helper('Venue_View');
66
-		if ( isset( EE_Registry::instance()->CFG->map_settings->use_google_maps ) && EE_Registry::instance()->CFG->map_settings->use_google_maps ) {
67
-			EE_Registry::instance()->load_helper( 'Maps' );
66
+		if (isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) && EE_Registry::instance()->CFG->map_settings->use_google_maps) {
67
+			EE_Registry::instance()->load_helper('Maps');
68 68
 			EEH_Maps::espresso_google_map_js();
69 69
 		}
70
-		remove_filter( 'the_posts', array( $this, 'the_posts' ), 1, 2 );
70
+		remove_filter('the_posts', array($this, 'the_posts'), 1, 2);
71 71
 		return $posts;
72 72
 	}
73 73
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
core/CPTs/EE_Register_CPTs.core.php 2 patches
Spacing   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -23,37 +23,37 @@  discard block
 block discarded – undo
23 23
 	 * 	constructor
24 24
 	 * instantiated at init priority 5
25 25
 	 */
26
-	function __construct(){
26
+	function __construct() {
27 27
 		// register taxonomies
28 28
 		$taxonomies = self::get_taxonomies();
29
-		foreach ( $taxonomies as $taxonomy =>  $tax ) {
30
-			$this->register_taxonomy( $taxonomy, $tax['singular_name'], $tax['plural_name'], $tax['args'] );
29
+		foreach ($taxonomies as $taxonomy =>  $tax) {
30
+			$this->register_taxonomy($taxonomy, $tax['singular_name'], $tax['plural_name'], $tax['args']);
31 31
 		}
32 32
 		// register CPTs
33
-		$CPTs =self::get_CPTs();
34
-		foreach ( $CPTs as $CPT_name =>  $CPT ) {
35
-			$this->register_CPT( $CPT_name, $CPT['singular_name'], $CPT['plural_name'], $CPT['args'], $CPT['singular_slug'], $CPT['plural_slug'] );
33
+		$CPTs = self::get_CPTs();
34
+		foreach ($CPTs as $CPT_name =>  $CPT) {
35
+			$this->register_CPT($CPT_name, $CPT['singular_name'], $CPT['plural_name'], $CPT['args'], $CPT['singular_slug'], $CPT['plural_slug']);
36 36
 		}
37 37
 		// setup default terms in any of our taxonomies (but only if we're in admin).
38 38
 		// Why not added via register_activation_hook?
39 39
 		// Because it's possible that in future iterations of EE we may add new defaults for specialized taxonomies (think event_types) and register_activation_hook only reliably runs when a user manually activates the plugin.
40 40
 		// Keep in mind that this will READ these terms if they are deleted by the user.  Hence MUST use terms.
41
-		if ( is_admin() ) {
41
+		if (is_admin()) {
42 42
 			$this->set_must_use_event_types();
43 43
 		}
44 44
 		//set default terms
45
-		$this->set_default_term( 'espresso_event_type', 'single-event', array('espresso_events') );
45
+		$this->set_default_term('espresso_event_type', 'single-event', array('espresso_events'));
46 46
 
47 47
 
48
-		add_action( 'AHEE__EE_System__initialize_last', array( __CLASS__,  'maybe_flush_rewrite_rules' ), 10 );
48
+		add_action('AHEE__EE_System__initialize_last', array(__CLASS__, 'maybe_flush_rewrite_rules'), 10);
49 49
 
50 50
 		//hook into save_post so that we can make sure that the default terms get saved on publish of registered cpts IF they don't have a term for that taxonomy set.
51
-		add_action('save_post', array( $this, 'save_default_term' ), 100, 2 );
51
+		add_action('save_post', array($this, 'save_default_term'), 100, 2);
52 52
 
53 53
 		//remove no html restrictions from core wp saving of term descriptions.  Note. this will affect only registered EE taxonomies.
54 54
 		$this->_allow_html_descriptions_for_ee_taxonomies();
55 55
 
56
-		do_action( 'AHEE__EE_Register_CPTs__construct_end', $this );
56
+		do_action('AHEE__EE_Register_CPTs__construct_end', $this);
57 57
 	}
58 58
 
59 59
 
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 	 * @return void
67 67
 	 */
68 68
 	public static function  maybe_flush_rewrite_rules() {
69
-		if ( get_option( 'ee_flush_rewrite_rules', TRUE )) {
69
+		if (get_option('ee_flush_rewrite_rules', TRUE)) {
70 70
 			flush_rewrite_rules();
71
-			update_option( 'ee_flush_rewrite_rules', FALSE );
71
+			update_option('ee_flush_rewrite_rules', FALSE);
72 72
 		}
73 73
 	}
74 74
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	protected function _allow_html_descriptions_for_ee_taxonomies() {
84 84
 		//first remove default filter for term description but we have to do this earlier before wp sets their own filter
85 85
 		//because they just set a global filter on all term descriptions before the custom term description filter. Really sux.
86
-		add_filter( 'pre_term_description', array( $this, 'ee_filter_ee_term_description_not_wp' ), 1, 2 );
86
+		add_filter('pre_term_description', array($this, 'ee_filter_ee_term_description_not_wp'), 1, 2);
87 87
 	}
88 88
 
89 89
 
@@ -93,16 +93,16 @@  discard block
 block discarded – undo
93 93
 	 * @param string $taxonomy      The taxonomy name for the taxonomy being filtered.
94 94
 	 * @return string
95 95
 	 */
96
-	public function ee_filter_ee_term_description_not_wp( $description, $taxonomy ) {
96
+	public function ee_filter_ee_term_description_not_wp($description, $taxonomy) {
97 97
 		//get a list of EE taxonomies
98
-		$ee_taxonomies = array_keys( self::get_taxonomies() );
98
+		$ee_taxonomies = array_keys(self::get_taxonomies());
99 99
 
100 100
 		//only do our own thing if the taxonomy listed is an ee taxonomy.
101
-		if ( in_array( $taxonomy, $ee_taxonomies ) ) {
101
+		if (in_array($taxonomy, $ee_taxonomies)) {
102 102
 			//remove default wp filter
103
-			remove_filter( 'pre_term_description', 'wp_filter_kses' );
103
+			remove_filter('pre_term_description', 'wp_filter_kses');
104 104
 			//sanitize THIS content.
105
-			$description = wp_kses( $description, wp_kses_allowed_html( 'post' ) );
105
+			$description = wp_kses($description, wp_kses_allowed_html('post'));
106 106
 		}
107 107
 		return $description;
108 108
 	}
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 	 *  @access 	public
117 117
 	 *  @return 	array
118 118
 	 */
119
-	public static function get_taxonomies(){
119
+	public static function get_taxonomies() {
120 120
 		// define taxonomies
121
-		return apply_filters( 'FHEE__EE_Register_CPTs__get_taxonomies__taxonomies', array(
121
+		return apply_filters('FHEE__EE_Register_CPTs__get_taxonomies__taxonomies', array(
122 122
 			'espresso_event_categories' => array(
123 123
 				'singular_name' => __("Event Category", "event_espresso"),
124 124
 				'plural_name' => __("Event Categories", "event_espresso"),
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 						'delete_terms' => 'ee_delete_event_category',
132 132
 						'assign_terms' => 'ee_assign_event_category'
133 133
 						),
134
-					'rewrite' => array( 'slug' => __( 'event-category', 'event_espresso' ))
134
+					'rewrite' => array('slug' => __('event-category', 'event_espresso'))
135 135
 				)),
136 136
 			'espresso_venue_categories' => array(
137 137
 				'singular_name' => __("Venue Category", "event_espresso"),
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 						'delete_terms' => 'ee_delete_venue_category',
146 146
 						'assign_terms' => 'ee_assign_venue_category'
147 147
 						),
148
-					'rewrite' => array( 'slug' => __( 'venue-category', 'event_espresso' ))
148
+					'rewrite' => array('slug' => __('venue-category', 'event_espresso'))
149 149
 				)),
150 150
 			'espresso_event_type' => array(
151 151
 				'singular_name' => __("Event Type", "event_espresso"),
@@ -159,10 +159,10 @@  discard block
 block discarded – undo
159 159
 						'delete_terms' => 'ee_delete_event_type',
160 160
 						'assign_terms' => 'ee_assign_event_type'
161 161
 						),
162
-					'rewrite' => array( 'slug' => __( 'event-type', 'event_espresso' )),
162
+					'rewrite' => array('slug' => __('event-type', 'event_espresso')),
163 163
 					'hierarchical'=>true
164 164
 				))
165
-			) );
165
+			));
166 166
 	}
167 167
 
168 168
 
@@ -180,26 +180,26 @@  discard block
 block discarded – undo
180 180
 	 * @return array 	       Empty array if no matching model names for the given slug or an array of model
181 181
 	 *                                         names indexed by post type slug.
182 182
 	 */
183
-	public static function get_cpt_model_names( $post_type_slug = '' ) {
183
+	public static function get_cpt_model_names($post_type_slug = '') {
184 184
 		$cpts = self::get_CPTs();
185 185
 
186 186
 		//first if slug passed in...
187
-		if ( ! empty( $post_type_slug )  ) {
187
+		if ( ! empty($post_type_slug)) {
188 188
 			//match?
189
-			if ( ! isset( $cpts[$post_type_slug] ) || ( isset( $cpts[$post_type_slug] ) && empty( $cpts[$post_type_slug]['class_name'] ) ) ) {
189
+			if ( ! isset($cpts[$post_type_slug]) || (isset($cpts[$post_type_slug]) && empty($cpts[$post_type_slug]['class_name']))) {
190 190
 				return array();
191 191
 			}
192 192
 
193 193
 			//k let's get the model name for this cpt.
194
-			return array( $post_type_slug => str_replace( 'EE', 'EEM', $cpts[$post_type_slug]['class_name'] ) );
194
+			return array($post_type_slug => str_replace('EE', 'EEM', $cpts[$post_type_slug]['class_name']));
195 195
 		}
196 196
 
197 197
 
198 198
 		//if we made it here then we're returning an array of cpt model names indexed by post_type_slug.
199 199
 		$cpt_models = array();
200
-		foreach ( $cpts as $slug => $args ) {
201
-			if ( ! empty( $args['class_name'] ) ) {
202
-				$cpt_models[$slug] = str_replace( 'EE', 'EEM', $args['class_name'] );
200
+		foreach ($cpts as $slug => $args) {
201
+			if ( ! empty($args['class_name'])) {
202
+				$cpt_models[$slug] = str_replace('EE', 'EEM', $args['class_name']);
203 203
 			}
204 204
 		}
205 205
 		return $cpt_models;
@@ -220,12 +220,12 @@  discard block
 block discarded – undo
220 220
 	 * @return EEM_CPT_Base[]   successful instantiation will return an array of successfully instantiated EEM
221 221
 	 *                                     	  models  indexed by post slug.
222 222
 	 */
223
-	public static function instantiate_cpt_models( $post_type_slug = '' ) {
224
-		$cpt_model_names = self::get_cpt_model_names( $post_type_slug );
223
+	public static function instantiate_cpt_models($post_type_slug = '') {
224
+		$cpt_model_names = self::get_cpt_model_names($post_type_slug);
225 225
 		$instantiated = array();
226
-		foreach ( $cpt_model_names as $slug => $model_name ) {
227
-			$instance = EE_Registry::instance()->load_model( str_replace( 'EEM_', '', $model_name ) );
228
-			if ( $instance instanceof EEM_CPT_Base ) {
226
+		foreach ($cpt_model_names as $slug => $model_name) {
227
+			$instance = EE_Registry::instance()->load_model(str_replace('EEM_', '', $model_name));
228
+			if ($instance instanceof EEM_CPT_Base) {
229 229
 				$instantiated[$slug] = $instance;
230 230
 			}
231 231
 		}
@@ -242,10 +242,10 @@  discard block
 block discarded – undo
242 242
 	 *  @access 	public
243 243
 	 *  @return 	array
244 244
 	 */
245
-	public static function get_CPTs(){
245
+	public static function get_CPTs() {
246 246
 		// define CPTs
247 247
 		// NOTE the ['args']['page_templates'] array index is something specific to our CPTs and not part of the WP custom post type api.
248
-		return apply_filters( 'FHEE__EE_Register_CPTs__get_CPTs__cpts', array(
248
+		return apply_filters('FHEE__EE_Register_CPTs__get_CPTs__cpts', array(
249 249
 			'espresso_events' => array(
250 250
 				'singular_name' => __("Event", "event_espresso"),
251 251
 				'plural_name' => __("Events", "event_espresso"),
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 					'publicly_queryable'=> FALSE,
321 321
 					'hierarchical'=> FALSE,
322 322
 					'has_archive' => FALSE,
323
-					'taxonomies' => array( 'post_tag' ),
323
+					'taxonomies' => array('post_tag'),
324 324
 					'capability_type' => 'contact',
325 325
 					'capabilities' => array(
326 326
 						'edit_post' => 'ee_edit_contact',
@@ -337,9 +337,9 @@  discard block
 block discarded – undo
337 337
 						'edit_private_posts' => 'ee_edit_contacts',
338 338
 						'edit_published_posts' => 'ee_edit_contacts'
339 339
 						),
340
-					'supports' => array( 'editor', 'thumbnail', 'excerpt', 'custom-fields', 'comments' ),
340
+					'supports' => array('editor', 'thumbnail', 'excerpt', 'custom-fields', 'comments'),
341 341
 				))
342
-			) );
342
+			));
343 343
 	}
344 344
 
345 345
 
@@ -352,9 +352,9 @@  discard block
 block discarded – undo
352 352
 	public static function get_private_CPTs() {
353 353
 		$CPTs = self::get_CPTs();
354 354
 		$private_CPTs = array();
355
-		foreach ( $CPTs as $CPT => $details ) {
356
-			if ( empty( $details['args']['public'] ) )
357
-				$private_CPTs[ $CPT ] = $details;
355
+		foreach ($CPTs as $CPT => $details) {
356
+			if (empty($details['args']['public']))
357
+				$private_CPTs[$CPT] = $details;
358 358
 		}
359 359
 		return $private_CPTs;
360 360
 	}
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 	 * @param string $plural_name internationalized plural name
373 373
 	 * @param array $override_args like $args on http://codex.wordpress.org/Function_Reference/register_taxonomy
374 374
 	 */
375
-	function register_taxonomy( $taxonomy_name, $singular_name, $plural_name, $override_args = array() ){
375
+	function register_taxonomy($taxonomy_name, $singular_name, $plural_name, $override_args = array()) {
376 376
 
377 377
 		$args = array(
378 378
 		'hierarchical'      => true,
@@ -388,15 +388,15 @@  discard block
 block discarded – undo
388 388
 		//'rewrite'           => array( 'slug' => 'genre' ),
389 389
 	);
390 390
 
391
-	  if($override_args){
392
-		  if(isset($override_args['labels'])){
393
-			  $labels = array_merge($args['labels'],$override_args['labels']);
391
+	  if ($override_args) {
392
+		  if (isset($override_args['labels'])) {
393
+			  $labels = array_merge($args['labels'], $override_args['labels']);
394 394
 			  $args['labels'] = $labels;
395 395
 		  }
396
-		  $args = array_merge($args,$override_args);
396
+		  $args = array_merge($args, $override_args);
397 397
 
398 398
 	  }
399
-		register_taxonomy($taxonomy_name,null, $args);
399
+		register_taxonomy($taxonomy_name, null, $args);
400 400
 	}
401 401
 
402 402
 
@@ -410,27 +410,27 @@  discard block
 block discarded – undo
410 410
 	 * The default values set in this function will be overridden by whatever you set in $override_args
411 411
 	 * @return void, but registers the custom post type
412 412
 	 */
413
-	function register_CPT($post_type, $singular_name,$plural_name,$override_args = array(), $singular_slug = '', $plural_slug = '' ) {
413
+	function register_CPT($post_type, $singular_name, $plural_name, $override_args = array(), $singular_slug = '', $plural_slug = '') {
414 414
 
415 415
 	  $labels = array(
416 416
 		'name' => $plural_name,
417 417
 		'singular_name' => $singular_name,
418
-		'add_new' => sprintf(__("Add %s", "event_espresso"),$singular_name),
419
-		'add_new_item' => sprintf(__("Add New %s", "event_espresso"),$singular_name),
420
-		'edit_item' => sprintf(__("Edit %s", "event_espresso"),$singular_name),
421
-		'new_item' => sprintf(__("New %s", "event_espresso"),$singular_name),
422
-		'all_items' => sprintf(__("All %s", "event_espresso"),$plural_name),
423
-		'view_item' => sprintf(__("View %s", "event_espresso"),$singular_name),
424
-		'search_items' => sprintf(__("Search %s", "event_espresso"),$plural_name),
425
-		'not_found' => sprintf(__("No %s found", "event_espresso"),$plural_name),
426
-		'not_found_in_trash' => sprintf(__("No %s found in Trash", "event_espresso"),$plural_name),
418
+		'add_new' => sprintf(__("Add %s", "event_espresso"), $singular_name),
419
+		'add_new_item' => sprintf(__("Add New %s", "event_espresso"), $singular_name),
420
+		'edit_item' => sprintf(__("Edit %s", "event_espresso"), $singular_name),
421
+		'new_item' => sprintf(__("New %s", "event_espresso"), $singular_name),
422
+		'all_items' => sprintf(__("All %s", "event_espresso"), $plural_name),
423
+		'view_item' => sprintf(__("View %s", "event_espresso"), $singular_name),
424
+		'search_items' => sprintf(__("Search %s", "event_espresso"), $plural_name),
425
+		'not_found' => sprintf(__("No %s found", "event_espresso"), $plural_name),
426
+		'not_found_in_trash' => sprintf(__("No %s found in Trash", "event_espresso"), $plural_name),
427 427
 		'parent_item_colon' => '',
428
-		'menu_name' => sprintf(__("%s", "event_espresso"),$plural_name)
428
+		'menu_name' => sprintf(__("%s", "event_espresso"), $plural_name)
429 429
 	  );
430 430
 
431 431
 	  //verify plural slug and singular slug, if they aren't we'll use $singular_name and $plural_name
432
-	  $singular_slug = ! empty( $singular_slug ) ? $singular_slug : $singular_name;
433
-	  $plural_slug = ! empty( $plural_slug ) ? $plural_slug : $plural_name;
432
+	  $singular_slug = ! empty($singular_slug) ? $singular_slug : $singular_name;
433
+	  $plural_slug = ! empty($plural_slug) ? $plural_slug : $plural_name;
434 434
 
435 435
 
436 436
 	  //note the page_templates arg in the supports index is something specific to EE.  WordPress doesn't actually have that in their register_post_type api.
@@ -442,24 +442,24 @@  discard block
 block discarded – undo
442 442
 		'show_in_menu' => false,
443 443
 		'show_in_nav_menus' => false,
444 444
 		'query_var' => true,
445
-		'rewrite' => apply_filters( 'FHEE__EE_Register_CPTs__register_CPT__rewrite', array( 'slug' => $plural_slug ), $post_type ),
445
+		'rewrite' => apply_filters('FHEE__EE_Register_CPTs__register_CPT__rewrite', array('slug' => $plural_slug), $post_type),
446 446
 		'capability_type' => 'post',
447 447
 		'map_meta_cap' => true,
448 448
 		'has_archive' => true,
449 449
 		'hierarchical' => true,
450 450
 		'menu_position' => null,
451
-		'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'custom-fields', 'comments' )
451
+		'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'custom-fields', 'comments')
452 452
 	  );
453 453
 
454
-	  if($override_args){
455
-		  if(isset($override_args['labels'])){
456
-			  $labels = array_merge($args['labels'],$override_args['labels']);
454
+	  if ($override_args) {
455
+		  if (isset($override_args['labels'])) {
456
+			  $labels = array_merge($args['labels'], $override_args['labels']);
457 457
 		  }
458
-		  $args = array_merge($args,$override_args);
458
+		  $args = array_merge($args, $override_args);
459 459
 		  $args['labels'] = $labels;
460 460
 	  }
461 461
 
462
-	  register_post_type( $post_type, $args );
462
+	  register_post_type($post_type, $args);
463 463
 	}
464 464
 
465 465
 
@@ -467,15 +467,15 @@  discard block
 block discarded – undo
467 467
 
468 468
 	function set_must_use_event_types() {
469 469
 		$term_details = array(
470
-			'single-event' => array( __('Single Event', 'event_espresso'), __('A single event that spans one or more consecutive days. Attendee\'s register for the first date-time only', 'event_espresso') ), //example: a party or two-day long workshop
470
+			'single-event' => array(__('Single Event', 'event_espresso'), __('A single event that spans one or more consecutive days. Attendee\'s register for the first date-time only', 'event_espresso')), //example: a party or two-day long workshop
471 471
 
472
-			'multi-event' => array( __('Multi Event', 'event_espresso'), __('Multiple, separate, but related events that occur on consecutive days. Attendee\'s can register for any of the date-times', 'event_espresso') ), //example: a three day music festival or week long conference
472
+			'multi-event' => array(__('Multi Event', 'event_espresso'), __('Multiple, separate, but related events that occur on consecutive days. Attendee\'s can register for any of the date-times', 'event_espresso')), //example: a three day music festival or week long conference
473 473
 
474
-			'event-series' => array( __('Event Series', 'event_espresso'), __(' Multiple events that occur over multiple non-consecutive days. Attendee\'s register for the first date-time only', 'event_espresso') ), //example: an 8 week introduction to basket weaving course
474
+			'event-series' => array(__('Event Series', 'event_espresso'), __(' Multiple events that occur over multiple non-consecutive days. Attendee\'s register for the first date-time only', 'event_espresso')), //example: an 8 week introduction to basket weaving course
475 475
 
476
-			'recurring-event' => array( __('Recurring Event', 'event_espresso'), __('Multiple events that occur over multiple non-consecutive days. Attendee\'s can register for any of the date-times.', 'event_espresso') ), //example: a yoga class
476
+			'recurring-event' => array(__('Recurring Event', 'event_espresso'), __('Multiple events that occur over multiple non-consecutive days. Attendee\'s can register for any of the date-times.', 'event_espresso')), //example: a yoga class
477 477
 
478
-			'ongoing' => array( __('Ongoing Event', 'event_espresso'), __('An "event" that people can purchase tickets to gain access for anytime for this event regardless of date times on the event', 'event_espresso') ) //example: access to a museum
478
+			'ongoing' => array(__('Ongoing Event', 'event_espresso'), __('An "event" that people can purchase tickets to gain access for anytime for this event regardless of date times on the event', 'event_espresso')) //example: access to a museum
479 479
 
480 480
 			//'walk-in' => array( __('Walk In', 'event_espresso'), __('Single datetime and single entry recurring events. Attendees register for one or multiple datetimes individually.', 'event_espresso') ),
481 481
 			//'reservation' => array( __('Reservation', 'event_espresso'), __('Reservations are created by specifying available datetimes and quantities. Attendees choose from the available datetimes and specify the quantity available (if the maximum is greater than 1)') ), //@TODO to avoid confusion we'll implement this in a later iteration > EE4.1
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 			//'appointment' => array( __('Appointments', 'event_espresso'), __('Time slotted events where datetimes are generally in hours or minutes. For example, attendees can register for a single 15 minute or 1 hour time slot and this type of availability frequently reoccurs.', 'event_espresso') )
484 484
 
485 485
 			);
486
-		$this->set_must_use_terms( 'espresso_event_type', $term_details );
486
+		$this->set_must_use_terms('espresso_event_type', $term_details);
487 487
 	}
488 488
 
489 489
 
@@ -497,16 +497,16 @@  discard block
 block discarded – undo
497 497
 	 *
498 498
 	 * @return void
499 499
 	 */
500
-	function set_must_use_terms( $taxonomy, $term_details ) {
500
+	function set_must_use_terms($taxonomy, $term_details) {
501 501
 		$term_details = (array) $term_details;
502 502
 
503
-		foreach ( $term_details as $slug => $details ) {
504
-			if ( !term_exists( $slug, $taxonomy ) ) {
503
+		foreach ($term_details as $slug => $details) {
504
+			if ( ! term_exists($slug, $taxonomy)) {
505 505
 				$insert_arr = array(
506 506
 					'slug' => $slug,
507 507
 					'description' => $details[1]
508 508
 					);
509
-				wp_insert_term( $details[0], $taxonomy, $insert_arr );
509
+				wp_insert_term($details[0], $taxonomy, $insert_arr);
510 510
 			}
511 511
 		}
512 512
 	}
@@ -520,8 +520,8 @@  discard block
 block discarded – undo
520 520
 	 * @param string $term_slug The slug of the term that will be the default.
521 521
 	 * @param array $cpt_slugs  An array of custom post types we want the default assigned to
522 522
 	 */
523
-	function set_default_term( $taxonomy, $term_slug, $cpt_slugs = array() ) {
524
-		$this->_default_terms[][$term_slug] = new EE_Default_Term( $taxonomy, $term_slug, $cpt_slugs );
523
+	function set_default_term($taxonomy, $term_slug, $cpt_slugs = array()) {
524
+		$this->_default_terms[][$term_slug] = new EE_Default_Term($taxonomy, $term_slug, $cpt_slugs);
525 525
 	}
526 526
 
527 527
 
@@ -533,20 +533,20 @@  discard block
 block discarded – undo
533 533
 	 * @param  object $post    Post object
534 534
 	 * @return void
535 535
 	 */
536
-	function save_default_term( $post_id, $post ) {
537
-		if ( empty( $this->_default_terms ) )
536
+	function save_default_term($post_id, $post) {
537
+		if (empty($this->_default_terms))
538 538
 			return; //no default terms set so lets just exit.
539 539
 
540
-		foreach ( $this->_default_terms as $defaults ) {
541
-			foreach ( $defaults as $default_obj ) {
542
-				if ( $post->post_status == 'publish' && in_array( $post->post_type, $default_obj->cpt_slugs ) ) {
540
+		foreach ($this->_default_terms as $defaults) {
541
+			foreach ($defaults as $default_obj) {
542
+				if ($post->post_status == 'publish' && in_array($post->post_type, $default_obj->cpt_slugs)) {
543 543
 
544 544
 					//note some error proofing going on here to save unnecessary db queries
545
-					$taxonomies = get_object_taxonomies( $post->post_type );
546
-					foreach ( (array) $taxonomies as $taxonomy ) {
547
-						$terms = wp_get_post_terms( $post_id, $taxonomy);
548
-						if ( empty( $terms ) && $taxonomy == $default_obj->taxonomy ) {
549
-							wp_set_object_terms( $post_id, array( $default_obj->term_slug ), $taxonomy );
545
+					$taxonomies = get_object_taxonomies($post->post_type);
546
+					foreach ((array) $taxonomies as $taxonomy) {
547
+						$terms = wp_get_post_terms($post_id, $taxonomy);
548
+						if (empty($terms) && $taxonomy == $default_obj->taxonomy) {
549
+							wp_set_object_terms($post_id, array($default_obj->term_slug), $taxonomy);
550 550
 						}
551 551
 					}
552 552
 				}
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 	 * @param string $term_slug The slug of the term that will be the default.
579 579
 	 * @param array $cpt_slugs  The custom post type the default term gets saved with
580 580
 	 */
581
-	public function __construct( $taxonomy, $term_slug, $cpt_slugs = array() ) {
581
+	public function __construct($taxonomy, $term_slug, $cpt_slugs = array()) {
582 582
 		$this->taxonomy = $taxonomy;
583 583
 		$this->cpt_slugs = (array) $cpt_slugs;
584 584
 		$this->term_slug = $term_slug;
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  *
4 6
  * EE_Register_CPTs
@@ -353,8 +355,9 @@  discard block
 block discarded – undo
353 355
 		$CPTs = self::get_CPTs();
354 356
 		$private_CPTs = array();
355 357
 		foreach ( $CPTs as $CPT => $details ) {
356
-			if ( empty( $details['args']['public'] ) )
357
-				$private_CPTs[ $CPT ] = $details;
358
+			if ( empty( $details['args']['public'] ) ) {
359
+							$private_CPTs[ $CPT ] = $details;
360
+			}
358 361
 		}
359 362
 		return $private_CPTs;
360 363
 	}
@@ -534,8 +537,10 @@  discard block
 block discarded – undo
534 537
 	 * @return void
535 538
 	 */
536 539
 	function save_default_term( $post_id, $post ) {
537
-		if ( empty( $this->_default_terms ) )
538
-			return; //no default terms set so lets just exit.
540
+		if ( empty( $this->_default_terms ) ) {
541
+					return;
542
+		}
543
+		//no default terms set so lets just exit.
539 544
 
540 545
 		foreach ( $this->_default_terms as $defaults ) {
541 546
 			foreach ( $defaults as $default_obj ) {
Please login to merge, or discard this patch.
core/EED_Module.module.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 *  @var 			WP $WP
74 74
 	 *  @return 	void
75 75
 	 */
76
-	public abstract function run( $WP );
76
+	public abstract function run($WP);
77 77
 
78 78
 
79 79
 
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
 	 * @param $module_name
97 97
 	 * @return EED_Module
98 98
 	 */
99
-	protected static function get_instance( $module_name = '' ) {
100
-		$module_name = ! empty( $module_name ) ? $module_name : get_called_class();
101
-		if ( ! isset(  EE_Registry::instance()->modules->{$module_name} ) || ! EE_Registry::instance()->modules->{$module_name} instanceof EED_Module ) {
102
-			EE_Registry::instance()->add_module( $module_name );
99
+	protected static function get_instance($module_name = '') {
100
+		$module_name = ! empty($module_name) ? $module_name : get_called_class();
101
+		if ( ! isset(EE_Registry::instance()->modules->{$module_name} ) || ! EE_Registry::instance()->modules->{$module_name} instanceof EED_Module) {
102
+			EE_Registry::instance()->add_module($module_name);
103 103
 		}
104
-		return EE_Registry::instance()->get_module( $module_name );
104
+		return EE_Registry::instance()->get_module($module_name);
105 105
 	}
106 106
 
107 107
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	 * @return    string
114 114
 	 */
115 115
 	public function module_name() {
116
-		return get_class( $this );
116
+		return get_class($this);
117 117
 	}
118 118
 
119 119
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
core/EE_Base.core.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	 *		@ return void
29 29
 	 */	
30 30
 	public function __get($a) { return FALSE; }
31
-	public function __set($a,$b) { return FALSE; }
31
+	public function __set($a, $b) { return FALSE; }
32 32
 	public function __isset($a) { return FALSE; }
33 33
 	public function __unset($a) { return FALSE; }
34 34
 	public function __clone() { return FALSE; }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
core/EE_Base_Class_Repository.core.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /**
5 5
  * Class EE_Base_Class_Repository
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 	 * @param array $arguments	arrays of arguments that will be passed to the object's save method
40 40
 	 * @return bool | int
41 41
 	 */
42
-	public function save( $arguments = array() ) {
43
-		return $this->persist( 'save', $arguments );
42
+	public function save($arguments = array()) {
43
+		return $this->persist('save', $arguments);
44 44
 	}
45 45
 
46 46
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 * @return bool | int
55 55
 	 */
56 56
 	public function save_all() {
57
-		return $this->persist_all( 'save' );
57
+		return $this->persist_all('save');
58 58
 	}
59 59
 
60 60
 
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
 	 * @return bool
69 69
 	 */
70 70
 	public function delete() {
71
-		$success = $this->_call_user_func_array_on_current( 'delete' );
72
-		$this->remove( $this->current() );
71
+		$success = $this->_call_user_func_array_on_current('delete');
72
+		$this->remove($this->current());
73 73
 		return $success;
74 74
 	}
75 75
 
@@ -86,16 +86,16 @@  discard block
 block discarded – undo
86 86
 	public function delete_all() {
87 87
 		$success = true;
88 88
 		$this->rewind();
89
-		while ( $this->valid() ) {
89
+		while ($this->valid()) {
90 90
 			// any db error will result in false being returned
91
-			$success = $this->_call_user_func_array_on_current( 'delete' ) !== false ? $success : false;
91
+			$success = $this->_call_user_func_array_on_current('delete') !== false ? $success : false;
92 92
 			// can't remove current object because valid() requires it
93 93
 			// so just capture current object temporarily
94 94
 			$object = $this->current();
95 95
 			// advance the pointer
96 96
 			$this->next();
97 97
 			// THEN remove the object from the repository
98
-			$this->remove( $object );
98
+			$this->remove($object);
99 99
 		}
100 100
 		return $success;
101 101
 	}
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
 	 * @param string $previous_value
114 114
 	 * @return bool | int
115 115
 	 */
116
-	public function update_extra_meta( $meta_key, $meta_value, $previous_value = null ) {
117
-		return $this->_call_user_func_array_on_current( 'update_extra_meta', array( $meta_key, $meta_value, $previous_value ) );
116
+	public function update_extra_meta($meta_key, $meta_value, $previous_value = null) {
117
+		return $this->_call_user_func_array_on_current('update_extra_meta', array($meta_key, $meta_value, $previous_value));
118 118
 	}
119 119
 
120 120
 
Please login to merge, or discard this patch.
core/EE_Config.core.php 4 patches
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
@@ -160,7 +162,7 @@  discard block
 block discarded – undo
160 162
 		//support removing a module during a request when it previously existed
161 163
 		if( $reinstantiate ){
162 164
 			return self::instance();
163
-		}else{
165
+		} else{
164 166
 			return NULL;
165 167
 		}
166 168
 	}
@@ -1492,7 +1494,7 @@  discard block
 block discarded – undo
1492 1494
 		}
1493 1495
 		if($query_args){
1494 1496
 			return add_query_arg($query_args,$this->txn_page_url);
1495
-		}else{
1497
+		} else{
1496 1498
 			return $this->txn_page_url;
1497 1499
 		}
1498 1500
 	}
@@ -1509,7 +1511,7 @@  discard block
 block discarded – undo
1509 1511
 		}
1510 1512
 		if($query_args){
1511 1513
 			return add_query_arg($query_args,$this->thank_you_page_url);
1512
-		}else{
1514
+		} else{
1513 1515
 			return $this->thank_you_page_url;
1514 1516
 		}
1515 1517
 	}
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 	 *    update_espresso_config
364 364
 	 *
365 365
 	 * @access   public
366
-	 * @return   bool
366
+	 * @return   boolean|null
367 367
 	 */
368 368
 	protected function  _reset_espresso_addon_config() {
369 369
 		$this->_config_option_names = array();
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 	 * @param    string                $name
444 444
 	 * @param    string                $config_class
445 445
 	 * @param    EE_Config_Base 	$config_obj
446
-	 * @param    array                 $tests_to_run
446
+	 * @param    integer[]                 $tests_to_run
447 447
 	 * @param    bool                  $display_errors
448 448
 	 * @return    bool    TRUE on success, FALSE on fail
449 449
 	 */
@@ -1592,7 +1592,7 @@  discard block
 block discarded – undo
1592 1592
 
1593 1593
 
1594 1594
 	/**
1595
-	 * @return array
1595
+	 * @return integer[]
1596 1596
 	 */
1597 1597
 	public function get_critical_pages_array() {
1598 1598
 		return array(
@@ -1605,7 +1605,7 @@  discard block
 block discarded – undo
1605 1605
 
1606 1606
 
1607 1607
 	/**
1608
-	 * @return array
1608
+	 * @return string[]
1609 1609
 	 */
1610 1610
 	public function get_critical_pages_shortcodes_array() {
1611 1611
 		return array(
@@ -1928,7 +1928,7 @@  discard block
 block discarded – undo
1928 1928
 	 *    class constructor
1929 1929
 	 *
1930 1930
 	 * @access    public
1931
-	 * @param null $CNT_ISO
1931
+	 * @param string $CNT_ISO
1932 1932
 	 * @return \EE_Currency_Config
1933 1933
 	 */
1934 1934
 	public function __construct( $CNT_ISO = NULL ) {
@@ -2567,7 +2567,7 @@  discard block
 block discarded – undo
2567 2567
 	 *
2568 2568
 	 * @param int $input_count the count of input vars.
2569 2569
 	 *
2570
-	 * @return array {
2570
+	 * @return string {
2571 2571
 	 *         An array that represents whether available space and if no available space the error message.
2572 2572
 	 *         @type bool $has_space		whether more inputs can be added.
2573 2573
 	 *         @type string $msg 		Any message to be displayed.
Please login to merge, or discard this patch.
Spacing   +383 added lines, -383 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	 */
129 129
 	public static function instance() {
130 130
 		// check if class object is instantiated, and instantiated properly
131
-		if ( ! self::$_instance instanceof EE_Config ) {
131
+		if ( ! self::$_instance instanceof EE_Config) {
132 132
 			self::$_instance = new self();
133 133
 		}
134 134
 		return self::$_instance;
@@ -145,22 +145,22 @@  discard block
 block discarded – undo
145 145
 	 * not be ready to instantiate EE_Config currently (eg if the site was put into maintenance mode)
146 146
 	 * @return EE_Config
147 147
 	 */
148
-	public static function reset( $hard_reset = FALSE, $reinstantiate = TRUE ){
149
-		if ( $hard_reset ) {
148
+	public static function reset($hard_reset = FALSE, $reinstantiate = TRUE) {
149
+		if ($hard_reset) {
150 150
 			self::$_instance->_config_option_names = array();
151 151
 			self::$_instance->_initialize_config();
152 152
 			self::$_instance->update_espresso_config();
153 153
 		}
154
-		if( self::$_instance instanceof EE_Config ){
154
+		if (self::$_instance instanceof EE_Config) {
155 155
 			self::$_instance->shutdown();
156 156
 		}
157 157
 		self::$_instance = NULL;
158 158
 		//we don't need to reset the static properties imo because those should
159 159
 		//only change when a module is added or removed. Currently we don't
160 160
 		//support removing a module during a request when it previously existed
161
-		if( $reinstantiate ){
161
+		if ($reinstantiate) {
162 162
 			return self::instance();
163
-		}else{
163
+		} else {
164 164
 			return NULL;
165 165
 		}
166 166
 	}
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
 	 * @return \EE_Config
175 175
 	 */
176 176
 	private function __construct() {
177
-		do_action( 'AHEE__EE_Config__construct__begin',$this );
178
-		$this->_config_option_names = get_option( 'ee_config_option_names', array() );
177
+		do_action('AHEE__EE_Config__construct__begin', $this);
178
+		$this->_config_option_names = get_option('ee_config_option_names', array());
179 179
 		// setup empty config classes
180 180
 		$this->_initialize_config();
181 181
 		// load existing EE site settings
@@ -183,15 +183,15 @@  discard block
 block discarded – undo
183 183
 		// confirm everything loaded correctly and set filtered defaults if not
184 184
 		$this->_verify_config();
185 185
 		//  register shortcodes and modules
186
-		add_action( 'AHEE__EE_System__register_shortcodes_modules_and_widgets', array( $this, 'register_shortcodes_and_modules' ), 999 );
186
+		add_action('AHEE__EE_System__register_shortcodes_modules_and_widgets', array($this, 'register_shortcodes_and_modules'), 999);
187 187
 		//  initialize shortcodes and modules
188
-		add_action( 'AHEE__EE_System__core_loaded_and_ready', array( $this, 'initialize_shortcodes_and_modules' ));
188
+		add_action('AHEE__EE_System__core_loaded_and_ready', array($this, 'initialize_shortcodes_and_modules'));
189 189
 		// register widgets
190
-		add_action( 'widgets_init', array( $this, 'widgets_init' ), 10 );
190
+		add_action('widgets_init', array($this, 'widgets_init'), 10);
191 191
 		// shutdown
192
-		add_action( 'shutdown', array( $this, 'shutdown' ), 10 );
192
+		add_action('shutdown', array($this, 'shutdown'), 10);
193 193
 		// construct__end hook
194
-		do_action( 'AHEE__EE_Config__construct__end',$this );
194
+		do_action('AHEE__EE_Config__construct__end', $this);
195 195
 		// hardcoded hack
196 196
 		$this->template_settings->current_espresso_theme = 'Espresso_Arabica_2014';
197 197
 	}
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	 * @return string current theme set.
205 205
 	 */
206 206
 	public static function get_current_theme() {
207
-		return isset( self::$_instance->template_settings->current_espresso_theme ) ? self::$_instance->template_settings->current_espresso_theme : 'Espresso_Arabica_2014';
207
+		return isset(self::$_instance->template_settings->current_espresso_theme) ? self::$_instance->template_settings->current_espresso_theme : 'Espresso_Arabica_2014';
208 208
 	}
209 209
 
210 210
 
@@ -238,27 +238,27 @@  discard block
 block discarded – undo
238 238
 	 */
239 239
 	private function _load_core_config() {
240 240
 		// load_core_config__start hook
241
-		do_action( 'AHEE__EE_Config___load_core_config__start', $this );
241
+		do_action('AHEE__EE_Config___load_core_config__start', $this);
242 242
 		$espresso_config = $this->get_espresso_config();
243
-		foreach ( $espresso_config as $config => $settings ) {
243
+		foreach ($espresso_config as $config => $settings) {
244 244
 			// load_core_config__start hook
245
-			$settings = apply_filters( 'FHEE__EE_Config___load_core_config__config_settings', $settings, $config, $this );
246
-			if ( is_object( $settings ) && property_exists( $this, $config ) ) {
247
-				$this->{$config} = apply_filters( 'FHEE__EE_Config___load_core_config__' . $config, $settings );
245
+			$settings = apply_filters('FHEE__EE_Config___load_core_config__config_settings', $settings, $config, $this);
246
+			if (is_object($settings) && property_exists($this, $config)) {
247
+				$this->{$config} = apply_filters('FHEE__EE_Config___load_core_config__'.$config, $settings);
248 248
 				//call configs populate method to ensure any defaults are set for empty values.
249
-				if ( method_exists( $settings, 'populate' ) ) {
249
+				if (method_exists($settings, 'populate')) {
250 250
 					$this->{$config}->populate();
251 251
 				}
252
-				if ( method_exists( $settings, 'do_hooks' ) ) {
252
+				if (method_exists($settings, 'do_hooks')) {
253 253
 					$this->{$config}->do_hooks();
254 254
 				}
255 255
 			}
256 256
 		}
257
-		if ( apply_filters( 'FHEE__EE_Config___load_core_config__update_espresso_config', FALSE ) ) {
257
+		if (apply_filters('FHEE__EE_Config___load_core_config__update_espresso_config', FALSE)) {
258 258
 			$this->update_espresso_config();
259 259
 		}
260 260
 		// load_core_config__end hook
261
-		do_action( 'AHEE__EE_Config___load_core_config__end', $this );
261
+		do_action('AHEE__EE_Config___load_core_config__end', $this);
262 262
 	}
263 263
 
264 264
 
@@ -272,40 +272,40 @@  discard block
 block discarded – undo
272 272
 	protected function _verify_config() {
273 273
 
274 274
 		$this->core = $this->core instanceof EE_Core_Config
275
-			? $this->core  : new EE_Core_Config();
276
-		$this->core = apply_filters( 'FHEE__EE_Config___initialize_config__core', $this->core );
275
+			? $this->core : new EE_Core_Config();
276
+		$this->core = apply_filters('FHEE__EE_Config___initialize_config__core', $this->core);
277 277
 
278 278
 		$this->organization = $this->organization instanceof EE_Organization_Config
279
-			? $this->organization  : new EE_Organization_Config();
280
-		$this->organization = apply_filters( 'FHEE__EE_Config___initialize_config__organization', $this->organization );
279
+			? $this->organization : new EE_Organization_Config();
280
+		$this->organization = apply_filters('FHEE__EE_Config___initialize_config__organization', $this->organization);
281 281
 
282 282
 		$this->currency = $this->currency instanceof EE_Currency_Config
283 283
 			? $this->currency : new EE_Currency_Config();
284
-		$this->currency = apply_filters( 'FHEE__EE_Config___initialize_config__currency', $this->currency );
284
+		$this->currency = apply_filters('FHEE__EE_Config___initialize_config__currency', $this->currency);
285 285
 
286 286
 		$this->registration = $this->registration instanceof EE_Registration_Config
287 287
 			? $this->registration : new EE_Registration_Config();
288
-		$this->registration = apply_filters( 'FHEE__EE_Config___initialize_config__registration', $this->registration );
288
+		$this->registration = apply_filters('FHEE__EE_Config___initialize_config__registration', $this->registration);
289 289
 
290 290
 		$this->admin = $this->admin instanceof EE_Admin_Config
291 291
 			? $this->admin : new EE_Admin_Config();
292
-		$this->admin = apply_filters( 'FHEE__EE_Config___initialize_config__admin', $this->admin );
292
+		$this->admin = apply_filters('FHEE__EE_Config___initialize_config__admin', $this->admin);
293 293
 
294 294
 		$this->template_settings = $this->template_settings instanceof EE_Template_Config
295 295
 			? $this->template_settings : new EE_Template_Config();
296
-		$this->template_settings = apply_filters( 'FHEE__EE_Config___initialize_config__template_settings', $this->template_settings );
296
+		$this->template_settings = apply_filters('FHEE__EE_Config___initialize_config__template_settings', $this->template_settings);
297 297
 
298 298
 		$this->map_settings = $this->map_settings instanceof EE_Map_Config
299 299
 			? $this->map_settings : new EE_Map_Config();
300
-		$this->map_settings = apply_filters( 'FHEE__EE_Config___initialize_config__map_settings', $this->map_settings );
300
+		$this->map_settings = apply_filters('FHEE__EE_Config___initialize_config__map_settings', $this->map_settings);
301 301
 
302 302
 		$this->environment = $this->environment instanceof EE_Environment_Config
303 303
 			? $this->environment : new EE_Environment_Config();
304
-		$this->environment = apply_filters( 'FHEE__EE_Config___initialize_config__environment', $this->environment );
304
+		$this->environment = apply_filters('FHEE__EE_Config___initialize_config__environment', $this->environment);
305 305
 
306 306
 		$this->gateway = $this->gateway instanceof EE_Gateway_Config
307 307
 			? $this->gateway : new EE_Gateway_Config();
308
-		$this->gateway = apply_filters( 'FHEE__EE_Config___initialize_config__gateway', $this->gateway );
308
+		$this->gateway = apply_filters('FHEE__EE_Config___initialize_config__gateway', $this->gateway);
309 309
 
310 310
 	}
311 311
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 	 */
320 320
 	public function get_espresso_config() {
321 321
 		// grab espresso configuration
322
-		return apply_filters( 'FHEE__EE_Config__get_espresso_config__CFG', get_option( 'ee_config', array() ));
322
+		return apply_filters('FHEE__EE_Config__get_espresso_config__CFG', get_option('ee_config', array()));
323 323
 	}
324 324
 
325 325
 
@@ -332,12 +332,12 @@  discard block
 block discarded – undo
332 332
 	 * @param        $old_value
333 333
 	 * @param        $value
334 334
 	 */
335
-	public function double_check_config_comparison( $option = '', $old_value, $value ) {
335
+	public function double_check_config_comparison($option = '', $old_value, $value) {
336 336
 		// make sure we're checking the ee config
337
-		if ( $option == 'ee_config' ) {
337
+		if ($option == 'ee_config') {
338 338
 			// run a loose comparison of the old value against the new value for type and properties,
339 339
 			// but NOT exact instance like WP update_option does
340
-			if ( $value != $old_value ) {
340
+			if ($value != $old_value) {
341 341
 				// if they are NOT the same, then remove the hook,
342 342
 				// which means the subsequent update results will be based solely on the update query results
343 343
 				// the reason we do this is because, as stated above,
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 				// the string it sees in the db looks the same as the new one it has been passed!!!
353 353
 				// This results in the query returning an "affected rows" value of ZERO,
354 354
 				// which gets returned immediately by WP update_option and looks like an error.
355
-				remove_action( 'update_option', array( $this, 'check_config_updated' ));
355
+				remove_action('update_option', array($this, 'check_config_updated'));
356 356
 			}
357 357
 		}
358 358
 	}
@@ -367,11 +367,11 @@  discard block
 block discarded – undo
367 367
 	 */
368 368
 	protected function  _reset_espresso_addon_config() {
369 369
 		$this->_config_option_names = array();
370
-		foreach( $this->addons as $addon_name => $addon_config_obj ) {
371
-			$addon_config_obj = maybe_unserialize( $addon_config_obj );
372
-			$config_class = get_class( $addon_config_obj );
373
-			if ( $addon_config_obj instanceof $config_class && ! $addon_config_obj instanceof __PHP_Incomplete_Class ) {
374
-				$this->update_config( 'addons', $addon_name, $addon_config_obj, FALSE );
370
+		foreach ($this->addons as $addon_name => $addon_config_obj) {
371
+			$addon_config_obj = maybe_unserialize($addon_config_obj);
372
+			$config_class = get_class($addon_config_obj);
373
+			if ($addon_config_obj instanceof $config_class && ! $addon_config_obj instanceof __PHP_Incomplete_Class) {
374
+				$this->update_config('addons', $addon_name, $addon_config_obj, FALSE);
375 375
 			}
376 376
 			$this->addons->{$addon_name} = NULL;
377 377
 		}
@@ -387,17 +387,17 @@  discard block
 block discarded – undo
387 387
 	 * @param   bool $add_error
388 388
 	 * @return   bool
389 389
 	 */
390
-	public function  update_espresso_config( $add_success = FALSE, $add_error = TRUE ) {
390
+	public function  update_espresso_config($add_success = FALSE, $add_error = TRUE) {
391 391
 		// commented out the following re: https://events.codebasehq.com/projects/event-espresso/tickets/8197
392 392
 		//$clone = clone( self::$_instance );
393 393
 		//self::$_instance = NULL;
394
-		do_action( 'AHEE__EE_Config__update_espresso_config__begin',$this );
394
+		do_action('AHEE__EE_Config__update_espresso_config__begin', $this);
395 395
 		$this->_reset_espresso_addon_config();
396 396
 		// hook into update_option because that happens AFTER the ( $value === $old_value ) conditional
397 397
 		// but BEFORE the actual update occurs
398
-		add_action( 'update_option', array( $this, 'double_check_config_comparison' ), 1, 3 );
398
+		add_action('update_option', array($this, 'double_check_config_comparison'), 1, 3);
399 399
 		// now update "ee_config"
400
-		$saved = update_option( 'ee_config', $this );
400
+		$saved = update_option('ee_config', $this);
401 401
 		// if not saved... check if the hook we just added still exists;
402 402
 		// if it does, it means one of two things:
403 403
 		// 		that update_option bailed at the ( $value === $old_value ) conditional,
@@ -408,25 +408,25 @@  discard block
 block discarded – undo
408 408
 		// but just means no update occurred, so don't display an error to the user.
409 409
 		// BUT... if update_option returns FALSE, AND the hook is missing,
410 410
 		// then it means that something truly went wrong
411
-		$saved = ! $saved ? has_action( 'update_option', array( $this, 'double_check_config_comparison' )) : $saved;
411
+		$saved = ! $saved ? has_action('update_option', array($this, 'double_check_config_comparison')) : $saved;
412 412
 		// remove our action since we don't want it in the system anymore
413
-		remove_action( 'update_option', array( $this, 'double_check_config_comparison' ), 1 );
414
-		do_action( 'AHEE__EE_Config__update_espresso_config__end', $this, $saved );
413
+		remove_action('update_option', array($this, 'double_check_config_comparison'), 1);
414
+		do_action('AHEE__EE_Config__update_espresso_config__end', $this, $saved);
415 415
 		//self::$_instance = $clone;
416 416
 		//unset( $clone );
417 417
 		// if config remains the same or was updated successfully
418
-		if ( $saved ) {
419
-			if ( $add_success ) {
418
+		if ($saved) {
419
+			if ($add_success) {
420 420
 				EE_Error::add_success(
421
-					__( 'The Event Espresso Configuration Settings have been successfully updated.', 'event_espresso' ),
421
+					__('The Event Espresso Configuration Settings have been successfully updated.', 'event_espresso'),
422 422
 					__FILE__, __FUNCTION__, __LINE__
423 423
 				);
424 424
 			}
425 425
 			return TRUE;
426 426
 		} else {
427
-			if ( $add_error ) {
427
+			if ($add_error) {
428 428
 				EE_Error::add_error(
429
-					__( 'The Event Espresso Configuration Settings were not updated.', 'event_espresso' ),
429
+					__('The Event Espresso Configuration Settings were not updated.', 'event_espresso'),
430 430
 					__FILE__, __FUNCTION__, __LINE__
431 431
 				);
432 432
 			}
@@ -452,20 +452,20 @@  discard block
 block discarded – undo
452 452
 		$name = '',
453 453
 		$config_class = '',
454 454
 		$config_obj = NULL,
455
-		$tests_to_run = array( 1, 2, 3, 4, 5, 6, 7, 8 ),
455
+		$tests_to_run = array(1, 2, 3, 4, 5, 6, 7, 8),
456 456
 		$display_errors = TRUE
457 457
 	) {
458 458
 		try {
459
-			foreach ( $tests_to_run as $test ) {
460
-				switch ( $test ) {
459
+			foreach ($tests_to_run as $test) {
460
+				switch ($test) {
461 461
 
462 462
 					// TEST #1 : check that section was set
463 463
 					case 1 :
464
-						if ( empty( $section ) ) {
465
-							if ( $display_errors ) {
464
+						if (empty($section)) {
465
+							if ($display_errors) {
466 466
 								throw new EE_Error(
467 467
 									sprintf(
468
-										__( 'No configuration section has been provided while attempting to save "%s".', 'event_espresso' ),
468
+										__('No configuration section has been provided while attempting to save "%s".', 'event_espresso'),
469 469
 										$config_class
470 470
 									)
471 471
 								);
@@ -476,11 +476,11 @@  discard block
 block discarded – undo
476 476
 
477 477
 					// TEST #2 : check that settings section exists
478 478
 					case 2 :
479
-						if ( ! isset( $this->{$section} ) ) {
480
-							if ( $display_errors ) {
479
+						if ( ! isset($this->{$section} )) {
480
+							if ($display_errors) {
481 481
 								throw new EE_Error(
482
-									sprintf( __( 'The "%s" configuration section does not exist.', 'event_espresso' ),
483
-											 $section )
482
+									sprintf(__('The "%s" configuration section does not exist.', 'event_espresso'),
483
+											 $section)
484 484
 								);
485 485
 							}
486 486
 							return false;
@@ -490,12 +490,12 @@  discard block
 block discarded – undo
490 490
 					// TEST #3 : check that section is the proper format
491 491
 					case 3 :
492 492
 						if (
493
-							! ( $this->{$section} instanceof EE_Config_Base || $this->{$section} instanceof stdClass )
493
+							! ($this->{$section} instanceof EE_Config_Base || $this->{$section} instanceof stdClass)
494 494
 						) {
495
-							if ( $display_errors ) {
495
+							if ($display_errors) {
496 496
 								throw new EE_Error(
497 497
 									sprintf(
498
-										__( 'The "%s" configuration settings have not been formatted correctly.', 'event_espresso' ),
498
+										__('The "%s" configuration settings have not been formatted correctly.', 'event_espresso'),
499 499
 										$section
500 500
 									)
501 501
 								);
@@ -506,10 +506,10 @@  discard block
 block discarded – undo
506 506
 
507 507
 					// TEST #4 : check that config section name has been set
508 508
 					case 4 :
509
-						if ( empty( $name ) ) {
510
-							if ( $display_errors ) {
509
+						if (empty($name)) {
510
+							if ($display_errors) {
511 511
 								throw new EE_Error(
512
-									__( 'No name has been provided for the specific configuration section.', 'event_espresso' )
512
+									__('No name has been provided for the specific configuration section.', 'event_espresso')
513 513
 								);
514 514
 							}
515 515
 							return false;
@@ -518,10 +518,10 @@  discard block
 block discarded – undo
518 518
 
519 519
 					// TEST #5 : check that a config class name has been set
520 520
 					case 5 :
521
-						if ( empty( $config_class ) ) {
522
-							if ( $display_errors ) {
521
+						if (empty($config_class)) {
522
+							if ($display_errors) {
523 523
 								throw new EE_Error(
524
-									__( 'No class name has been provided for the specific configuration section.', 'event_espresso' )
524
+									__('No class name has been provided for the specific configuration section.', 'event_espresso')
525 525
 								);
526 526
 							}
527 527
 							return false;
@@ -530,11 +530,11 @@  discard block
 block discarded – undo
530 530
 
531 531
 					// TEST #6 : verify config class is accessible
532 532
 					case 6 :
533
-						if ( ! class_exists( $config_class ) ) {
534
-							if ( $display_errors ) {
533
+						if ( ! class_exists($config_class)) {
534
+							if ($display_errors) {
535 535
 								throw new EE_Error(
536 536
 									sprintf(
537
-										__( 'The "%s" class does not exist. Please ensure that an autoloader has been set for it.', 'event_espresso' ),
537
+										__('The "%s" class does not exist. Please ensure that an autoloader has been set for it.', 'event_espresso'),
538 538
 										$config_class
539 539
 									)
540 540
 								);
@@ -545,11 +545,11 @@  discard block
 block discarded – undo
545 545
 
546 546
 					// TEST #7 : check that config has even been set
547 547
 					case 7 :
548
-						if ( ! isset( $this->{$section}->{$name} ) ) {
549
-							if ( $display_errors ) {
548
+						if ( ! isset($this->{$section}->{$name} )) {
549
+							if ($display_errors) {
550 550
 								throw new EE_Error(
551 551
 									sprintf(
552
-										__( 'No configuration has been set for "%1$s->%2$s".', 'event_espresso' ),
552
+										__('No configuration has been set for "%1$s->%2$s".', 'event_espresso'),
553 553
 										$section,
554 554
 										$name
555 555
 									)
@@ -558,17 +558,17 @@  discard block
 block discarded – undo
558 558
 							return false;
559 559
 						} else {
560 560
 							// and make sure it's not serialized
561
-							$this->{$section}->{$name} = maybe_unserialize( $this->{$section}->{$name} );
561
+							$this->{$section}->{$name} = maybe_unserialize($this->{$section}->{$name} );
562 562
 						}
563 563
 						break;
564 564
 
565 565
 					// TEST #8 : check that config is the requested type
566 566
 					case 8 :
567
-						if ( ! $this->{$section}->{$name} instanceof $config_class ) {
568
-							if ( $display_errors ) {
567
+						if ( ! $this->{$section}->{$name} instanceof $config_class) {
568
+							if ($display_errors) {
569 569
 								throw new EE_Error(
570 570
 									sprintf(
571
-										__( 'The configuration for "%1$s->%2$s" is not of the "%3$s" class.', 'event_espresso' ),
571
+										__('The configuration for "%1$s->%2$s" is not of the "%3$s" class.', 'event_espresso'),
572 572
 										$section,
573 573
 										$name,
574 574
 										$config_class
@@ -581,12 +581,12 @@  discard block
 block discarded – undo
581 581
 
582 582
 					// TEST #9 : verify config object
583 583
 					case 9 :
584
-						if ( ! $config_obj instanceof EE_Config_Base ) {
585
-							if ( $display_errors ) {
584
+						if ( ! $config_obj instanceof EE_Config_Base) {
585
+							if ($display_errors) {
586 586
 								throw new EE_Error(
587 587
 									sprintf(
588
-										__( 'The "%s" class is not an instance of EE_Config_Base.', 'event_espresso' ),
589
-										print_r( $config_obj, true )
588
+										__('The "%s" class is not an instance of EE_Config_Base.', 'event_espresso'),
589
+										print_r($config_obj, true)
590 590
 									)
591 591
 								);
592 592
 							}
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 				}
598 598
 			}
599 599
 
600
-		} catch( EE_Error $e ) {
600
+		} catch (EE_Error $e) {
601 601
 			$e->get_error();
602 602
 		}
603 603
 		// you have successfully run the gauntlet
@@ -614,8 +614,8 @@  discard block
 block discarded – undo
614 614
 	 * @param        string          $name
615 615
 	 * @return        string
616 616
 	 */
617
-	private function _generate_config_option_name( $section = '', $name = '' ) {
618
-		return 'ee_config-' . strtolower( $section . '-' . str_replace( array( 'EE_', 'EED_' ), '', $name ) );
617
+	private function _generate_config_option_name($section = '', $name = '') {
618
+		return 'ee_config-'.strtolower($section.'-'.str_replace(array('EE_', 'EED_'), '', $name));
619 619
 	}
620 620
 
621 621
 
@@ -629,10 +629,10 @@  discard block
 block discarded – undo
629 629
 	 * @param 	string $name
630 630
 	 * @return 	string
631 631
 	 */
632
-	private function _set_config_class( $config_class = '', $name = '' ) {
633
-		return ! empty( $config_class )
632
+	private function _set_config_class($config_class = '', $name = '') {
633
+		return ! empty($config_class)
634 634
 			? $config_class
635
-			: str_replace( ' ', '_', ucwords( str_replace( '_', ' ', $name ) ) ) . '_Config';
635
+			: str_replace(' ', '_', ucwords(str_replace('_', ' ', $name))).'_Config';
636 636
 	}
637 637
 
638 638
 
@@ -646,34 +646,34 @@  discard block
 block discarded – undo
646 646
 	 * @param 	EE_Config_Base $config_obj
647 647
 	 * @return 	EE_Config_Base
648 648
 	 */
649
-	public function set_config( $section = '', $name = '', $config_class = '', EE_Config_Base $config_obj = null ) {
649
+	public function set_config($section = '', $name = '', $config_class = '', EE_Config_Base $config_obj = null) {
650 650
 		// ensure config class is set to something
651
-		$config_class = $this->_set_config_class( $config_class, $name );
651
+		$config_class = $this->_set_config_class($config_class, $name);
652 652
 		// run tests 1-4, 6, and 7 to verify all config params are set and valid
653
-		if ( ! $this->_verify_config_params( $section, $name, $config_class, null, array( 1, 2, 3, 4, 5, 6 ))) {
653
+		if ( ! $this->_verify_config_params($section, $name, $config_class, null, array(1, 2, 3, 4, 5, 6))) {
654 654
 			return null;
655 655
 		}
656
-		$config_option_name = $this->_generate_config_option_name( $section, $name );
656
+		$config_option_name = $this->_generate_config_option_name($section, $name);
657 657
 		// if the config option name hasn't been added yet to the list of option names we're tracking, then do so now
658
-		if ( ! isset( $this->_config_option_names[ $config_option_name ] )) {
659
-			$this->_config_option_names[ $config_option_name ] = $config_class;
658
+		if ( ! isset($this->_config_option_names[$config_option_name])) {
659
+			$this->_config_option_names[$config_option_name] = $config_class;
660 660
 		}
661 661
 		// verify the incoming config object but suppress errors
662
-		if ( ! $this->_verify_config_params( $section, $name, $config_class, $config_obj, array( 9 ), false )) {
662
+		if ( ! $this->_verify_config_params($section, $name, $config_class, $config_obj, array(9), false)) {
663 663
 			$config_obj = new $config_class();
664 664
 		}
665
-		if ( get_option( $config_option_name ) ) {
666
-			update_option( $config_option_name, $config_obj );
665
+		if (get_option($config_option_name)) {
666
+			update_option($config_option_name, $config_obj);
667 667
 			$this->{$section}->{$name} = $config_obj;
668 668
 			return $this->{$section}->{$name};
669 669
 		} else {
670 670
 			// create a wp-option for this config
671
-			if ( add_option( $config_option_name, $config_obj, '', 'no' )) {
672
-				$this->{$section}->{$name} = maybe_unserialize( $config_obj );
671
+			if (add_option($config_option_name, $config_obj, '', 'no')) {
672
+				$this->{$section}->{$name} = maybe_unserialize($config_obj);
673 673
 				return $this->{$section}->{$name};
674 674
 			} else {
675 675
 				EE_Error::add_error(
676
-					sprintf( __( 'The "%s" could not be saved to the database.', 'event_espresso' ), $config_class ),
676
+					sprintf(__('The "%s" could not be saved to the database.', 'event_espresso'), $config_class),
677 677
 					__FILE__, __FUNCTION__, __LINE__
678 678
 				);
679 679
 				return null;
@@ -694,37 +694,37 @@  discard block
 block discarded – undo
694 694
 	 * @param 	bool 					$throw_errors
695 695
 	 * @return 	bool
696 696
 	 */
697
-	public function update_config( $section = '', $name = '', $config_obj = '', $throw_errors = true ) {
698
-		$config_obj = maybe_unserialize( $config_obj );
697
+	public function update_config($section = '', $name = '', $config_obj = '', $throw_errors = true) {
698
+		$config_obj = maybe_unserialize($config_obj);
699 699
 		// get class name of the incoming object
700
-		$config_class = get_class( $config_obj );
700
+		$config_class = get_class($config_obj);
701 701
 		// run tests 1-5 and 9 to verify config
702
-		if ( ! $this->_verify_config_params( $section, $name, $config_class, $config_obj, array( 1, 2, 3, 4, 7, 9 ))) {
702
+		if ( ! $this->_verify_config_params($section, $name, $config_class, $config_obj, array(1, 2, 3, 4, 7, 9))) {
703 703
 			return false;
704 704
 		}
705
-		$config_option_name = $this->_generate_config_option_name( $section, $name );
705
+		$config_option_name = $this->_generate_config_option_name($section, $name);
706 706
 		// check if config object has been added to db by seeing if config option name is in $this->_config_option_names array
707
-		if ( ! isset( $this->_config_option_names[ $config_option_name ] )) {
707
+		if ( ! isset($this->_config_option_names[$config_option_name])) {
708 708
 			// save new config to db
709
-			return $this->set_config( $section, $name, $config_class, $config_obj );
709
+			return $this->set_config($section, $name, $config_class, $config_obj);
710 710
 		} else {
711 711
 			// first check if the record already exists
712
-			$existing_config = get_option( $config_option_name );
713
-			$config_obj = serialize( $config_obj );
712
+			$existing_config = get_option($config_option_name);
713
+			$config_obj = serialize($config_obj);
714 714
 			// just return if db record is already up to date
715
-			if ( $existing_config == $config_obj ) {
715
+			if ($existing_config == $config_obj) {
716 716
 				$this->{$section}->{$name} = $config_obj;
717 717
 				return true;
718
-			} else if ( update_option( $config_option_name, $config_obj )) {
718
+			} else if (update_option($config_option_name, $config_obj)) {
719 719
 				// update wp-option for this config class
720 720
 				$this->{$section}->{$name} = $config_obj;
721 721
 				return true;
722
-			} elseif ( $throw_errors ) {
722
+			} elseif ($throw_errors) {
723 723
 				EE_Error::add_error(
724 724
 					sprintf(
725
-						__( 'The "%1$s" object stored at"%2$s" was not successfully updated in the database.', 'event_espresso' ),
725
+						__('The "%1$s" object stored at"%2$s" was not successfully updated in the database.', 'event_espresso'),
726 726
 						$config_class,
727
-						'EE_Config->' . $section . '->' . $name
727
+						'EE_Config->'.$section.'->'.$name
728 728
 					),
729 729
 					__FILE__, __FUNCTION__, __LINE__
730 730
 				);
@@ -744,34 +744,34 @@  discard block
 block discarded – undo
744 744
 	 * @param 	string 	$config_class
745 745
 	 * @return 	mixed EE_Config_Base | NULL
746 746
 	 */
747
-	public function get_config( $section = '', $name = '', $config_class = '' ) {
747
+	public function get_config($section = '', $name = '', $config_class = '') {
748 748
 		// ensure config class is set to something
749
-		$config_class = $this->_set_config_class( $config_class, $name );
749
+		$config_class = $this->_set_config_class($config_class, $name);
750 750
 		// run tests 1-4, 6 and 7 to verify that all params have been set
751
-		if ( ! $this->_verify_config_params( $section, $name, $config_class, NULL, array( 1, 2, 3, 4, 5, 6 ))) {
751
+		if ( ! $this->_verify_config_params($section, $name, $config_class, NULL, array(1, 2, 3, 4, 5, 6))) {
752 752
 			return NULL;
753 753
 		}
754 754
 		// now test if the requested config object exists, but suppress errors
755
-		if ( $this->_verify_config_params( $section, $name, $config_class, NULL, array( 7, 8 ), FALSE )) {
755
+		if ($this->_verify_config_params($section, $name, $config_class, NULL, array(7, 8), FALSE)) {
756 756
 			// config already exists, so pass it back
757 757
 			return $this->{$section}->{$name};
758 758
 		}
759 759
 		// load config option from db if it exists
760
-		$config_obj = $this->get_config_option( $this->_generate_config_option_name( $section, $name ));
760
+		$config_obj = $this->get_config_option($this->_generate_config_option_name($section, $name));
761 761
 		// verify the newly retrieved config object, but suppress errors
762
-		if ( $this->_verify_config_params( $section, $name, $config_class, $config_obj, array( 9 ), FALSE )) {
762
+		if ($this->_verify_config_params($section, $name, $config_class, $config_obj, array(9), FALSE)) {
763 763
 			// config is good, so set it and pass it back
764 764
 			$this->{$section}->{$name} = $config_obj;
765 765
 			return $this->{$section}->{$name};
766 766
 		}
767 767
 		// oops! $config_obj is not already set and does not exist in the db, so create a new one
768
-		$config_obj =$this->set_config( $section, $name, $config_class );
768
+		$config_obj = $this->set_config($section, $name, $config_class);
769 769
 		// verify the newly created config object
770
-		if ( $this->_verify_config_params( $section, $name, $config_class, $config_obj, array( 9 ))) {
770
+		if ($this->_verify_config_params($section, $name, $config_class, $config_obj, array(9))) {
771 771
 			return $this->{$section}->{$name};
772 772
 		} else {
773 773
 			EE_Error::add_error(
774
-				sprintf( __( 'The "%s" could not be retrieved from the database.', 'event_espresso' ), $config_class ),
774
+				sprintf(__('The "%s" could not be retrieved from the database.', 'event_espresso'), $config_class),
775 775
 				__FILE__, __FUNCTION__, __LINE__
776 776
 			);
777 777
 		}
@@ -786,9 +786,9 @@  discard block
 block discarded – undo
786 786
 	 * @param 	string 	$config_option_name
787 787
 	 * @return 	mixed EE_Config_Base | FALSE
788 788
 	 */
789
-	public function get_config_option( $config_option_name = '' ) {
789
+	public function get_config_option($config_option_name = '') {
790 790
 		// retrieve the wp-option for this config class.
791
-		return maybe_unserialize( get_option( $config_option_name ));
791
+		return maybe_unserialize(get_option($config_option_name));
792 792
 	}
793 793
 
794 794
 
@@ -803,14 +803,14 @@  discard block
 block discarded – undo
803 803
 	 *  @return 	string
804 804
 	 */
805 805
 	public static function get_page_for_posts() {
806
-		$page_for_posts = get_option( 'page_for_posts' );
807
-		if ( ! $page_for_posts ) {
806
+		$page_for_posts = get_option('page_for_posts');
807
+		if ( ! $page_for_posts) {
808 808
 			return 'posts';
809 809
 		}
810 810
 		/** @type WPDB $wpdb */
811 811
 		global $wpdb;
812 812
 		$SQL = "SELECT post_name from $wpdb->posts WHERE post_type='posts' OR post_type='page' AND post_status='publish' AND ID=%d";
813
-		return $wpdb->get_var( $wpdb->prepare( $SQL, $page_for_posts ));
813
+		return $wpdb->get_var($wpdb->prepare($SQL, $page_for_posts));
814 814
 	}
815 815
 
816 816
 
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
 	 */
828 828
 	public function register_shortcodes_and_modules() {
829 829
 		// allow shortcodes to register with WP and to set hooks for the rest of the system
830
-		EE_Registry::instance()->shortcodes =$this->_register_shortcodes();
830
+		EE_Registry::instance()->shortcodes = $this->_register_shortcodes();
831 831
 		// allow modules to set hooks for the rest of the system
832 832
 		EE_Registry::instance()->modules = $this->_register_modules();
833 833
 	}
@@ -859,21 +859,21 @@  discard block
 block discarded – undo
859 859
 	public function widgets_init() {
860 860
 		//only init widgets on admin pages when not in complete maintenance, and
861 861
 		//on frontend when not in any maintenance mode
862
-		if (( is_admin() && EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance)  || ! EE_Maintenance_Mode::instance()->level() ) {
862
+		if ((is_admin() && EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance) || ! EE_Maintenance_Mode::instance()->level()) {
863 863
 			// grab list of installed widgets
864
-			$widgets_to_register = glob( EE_WIDGETS . '*', GLOB_ONLYDIR );
864
+			$widgets_to_register = glob(EE_WIDGETS.'*', GLOB_ONLYDIR);
865 865
 			// filter list of modules to register
866
-			$widgets_to_register = apply_filters( 'FHEE__EE_Config__register_widgets__widgets_to_register', $widgets_to_register );
866
+			$widgets_to_register = apply_filters('FHEE__EE_Config__register_widgets__widgets_to_register', $widgets_to_register);
867 867
 
868
-			if ( ! empty( $widgets_to_register ) ) {
868
+			if ( ! empty($widgets_to_register)) {
869 869
 				// cycle thru widget folders
870
-				foreach ( $widgets_to_register as $widget_path ) {
870
+				foreach ($widgets_to_register as $widget_path) {
871 871
 					// add to list of installed widget modules
872
-					EE_Config::register_ee_widget( $widget_path );
872
+					EE_Config::register_ee_widget($widget_path);
873 873
 				}
874 874
 			}
875 875
 			// filter list of installed modules
876
-			EE_Registry::instance()->widgets = apply_filters( 'FHEE__EE_Config__register_widgets__installed_widgets', EE_Registry::instance()->widgets );
876
+			EE_Registry::instance()->widgets = apply_filters('FHEE__EE_Config__register_widgets__installed_widgets', EE_Registry::instance()->widgets);
877 877
 		}
878 878
 	}
879 879
 
@@ -886,54 +886,54 @@  discard block
 block discarded – undo
886 886
 	 *  @param 	string 	$widget_path - full path up to and including widget folder
887 887
 	 *  @return 	void
888 888
 	 */
889
-	public static function register_ee_widget( $widget_path = NULL ) {
890
-		do_action( 'AHEE__EE_Config__register_widget__begin', $widget_path );
889
+	public static function register_ee_widget($widget_path = NULL) {
890
+		do_action('AHEE__EE_Config__register_widget__begin', $widget_path);
891 891
 		$widget_ext = '.widget.php';
892 892
 		// make all separators match
893
-		$widget_path = rtrim( str_replace( '/\\', DS, $widget_path ), DS );
893
+		$widget_path = rtrim(str_replace('/\\', DS, $widget_path), DS);
894 894
 		// does the file path INCLUDE the actual file name as part of the path ?
895
-		if ( strpos( $widget_path, $widget_ext ) !== FALSE ) {
895
+		if (strpos($widget_path, $widget_ext) !== FALSE) {
896 896
 			// grab and shortcode file name from directory name and break apart at dots
897
-			$file_name = explode( '.', basename( $widget_path ));
897
+			$file_name = explode('.', basename($widget_path));
898 898
 			// take first segment from file name pieces and remove class prefix if it exists
899
-			$widget = strpos( $file_name[0], 'EEW_' ) === 0 ? substr( $file_name[0], 4 ) : $file_name[0];
899
+			$widget = strpos($file_name[0], 'EEW_') === 0 ? substr($file_name[0], 4) : $file_name[0];
900 900
 			// sanitize shortcode directory name
901
-			$widget = sanitize_key( $widget );
901
+			$widget = sanitize_key($widget);
902 902
 			// now we need to rebuild the shortcode path
903
-			$widget_path = explode( DS, $widget_path );
903
+			$widget_path = explode(DS, $widget_path);
904 904
 			// remove last segment
905
-			array_pop( $widget_path );
905
+			array_pop($widget_path);
906 906
 			// glue it back together
907
-			$widget_path = implode( DS, $widget_path );
907
+			$widget_path = implode(DS, $widget_path);
908 908
 		} else {
909 909
 			// grab and sanitize widget directory name
910
-			$widget = sanitize_key( basename( $widget_path ));
910
+			$widget = sanitize_key(basename($widget_path));
911 911
 		}
912 912
 		// create classname from widget directory name
913
-		$widget = str_replace( ' ', '_', ucwords( str_replace( '_', ' ', $widget )));
913
+		$widget = str_replace(' ', '_', ucwords(str_replace('_', ' ', $widget)));
914 914
 		// add class prefix
915
-		$widget_class = 'EEW_' . $widget;
915
+		$widget_class = 'EEW_'.$widget;
916 916
 		// does the widget exist ?
917
-		if ( ! is_readable( $widget_path . DS . $widget_class . $widget_ext )) {
917
+		if ( ! is_readable($widget_path.DS.$widget_class.$widget_ext)) {
918 918
 			$msg = sprintf(
919
-				__( 'The requested %s widget file could not be found or is not readable due to file permissions. Please ensure the following path is correct: %s', 'event_espresso' ),
919
+				__('The requested %s widget file could not be found or is not readable due to file permissions. Please ensure the following path is correct: %s', 'event_espresso'),
920 920
 				$widget_class,
921
-				$widget_path . DS . $widget_class . $widget_ext
921
+				$widget_path.DS.$widget_class.$widget_ext
922 922
 			);
923
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
923
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
924 924
 			return;
925 925
 		}
926 926
 		// load the widget class file
927
-		require_once( $widget_path . DS . $widget_class . $widget_ext );
927
+		require_once($widget_path.DS.$widget_class.$widget_ext);
928 928
 		// verify that class exists
929
-		if ( ! class_exists( $widget_class )) {
930
-			$msg = sprintf( __( 'The requested %s widget class does not exist.', 'event_espresso' ), $widget_class );
931
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
929
+		if ( ! class_exists($widget_class)) {
930
+			$msg = sprintf(__('The requested %s widget class does not exist.', 'event_espresso'), $widget_class);
931
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
932 932
 			return;
933 933
 		}
934
-		register_widget( $widget_class );
934
+		register_widget($widget_class);
935 935
 		// add to array of registered widgets
936
-		EE_Registry::instance()->widgets->{$widget_class} = $widget_path . DS . $widget_class . $widget_ext;
936
+		EE_Registry::instance()->widgets->{$widget_class} = $widget_path.DS.$widget_class.$widget_ext;
937 937
 	}
938 938
 
939 939
 
@@ -946,18 +946,18 @@  discard block
 block discarded – undo
946 946
 	 */
947 947
 	private function _register_shortcodes() {
948 948
 		// grab list of installed shortcodes
949
-		$shortcodes_to_register = glob( EE_SHORTCODES . '*', GLOB_ONLYDIR );
949
+		$shortcodes_to_register = glob(EE_SHORTCODES.'*', GLOB_ONLYDIR);
950 950
 		// filter list of modules to register
951
-		$shortcodes_to_register = apply_filters( 'FHEE__EE_Config__register_shortcodes__shortcodes_to_register', $shortcodes_to_register );
952
-		if ( ! empty( $shortcodes_to_register ) ) {
951
+		$shortcodes_to_register = apply_filters('FHEE__EE_Config__register_shortcodes__shortcodes_to_register', $shortcodes_to_register);
952
+		if ( ! empty($shortcodes_to_register)) {
953 953
 			// cycle thru shortcode folders
954
-			foreach ( $shortcodes_to_register as $shortcode_path ) {
954
+			foreach ($shortcodes_to_register as $shortcode_path) {
955 955
 				// add to list of installed shortcode modules
956
-				EE_Config::register_shortcode( $shortcode_path );
956
+				EE_Config::register_shortcode($shortcode_path);
957 957
 			}
958 958
 		}
959 959
 		// filter list of installed modules
960
-		return apply_filters( 'FHEE__EE_Config___register_shortcodes__installed_shortcodes', EE_Registry::instance()->shortcodes );
960
+		return apply_filters('FHEE__EE_Config___register_shortcodes__installed_shortcodes', EE_Registry::instance()->shortcodes);
961 961
 	}
962 962
 
963 963
 
@@ -969,56 +969,56 @@  discard block
 block discarded – undo
969 969
 	 *  @param 	string 		$shortcode_path - full path up to and including shortcode folder
970 970
 	 *  @return 	bool
971 971
 	 */
972
-	public static function register_shortcode( $shortcode_path = NULL ) {
973
-		do_action( 'AHEE__EE_Config__register_shortcode__begin',$shortcode_path );
972
+	public static function register_shortcode($shortcode_path = NULL) {
973
+		do_action('AHEE__EE_Config__register_shortcode__begin', $shortcode_path);
974 974
 		$shortcode_ext = '.shortcode.php';
975 975
 		// make all separators match
976
-		$shortcode_path = str_replace( array( '\\', '/' ), DS, $shortcode_path );
976
+		$shortcode_path = str_replace(array('\\', '/'), DS, $shortcode_path);
977 977
 		// does the file path INCLUDE the actual file name as part of the path ?
978
-		if ( strpos( $shortcode_path, $shortcode_ext ) !== FALSE ) {
978
+		if (strpos($shortcode_path, $shortcode_ext) !== FALSE) {
979 979
 			// grab shortcode file name from directory name and break apart at dots
980
-			$shortcode_file = explode( '.', basename( $shortcode_path ));
980
+			$shortcode_file = explode('.', basename($shortcode_path));
981 981
 			// take first segment from file name pieces and remove class prefix if it exists
982
-			$shortcode = strpos( $shortcode_file[0], 'EES_' ) === 0 ? substr( $shortcode_file[0], 4 ) : $shortcode_file[0];
982
+			$shortcode = strpos($shortcode_file[0], 'EES_') === 0 ? substr($shortcode_file[0], 4) : $shortcode_file[0];
983 983
 			// sanitize shortcode directory name
984
-			$shortcode = sanitize_key( $shortcode );
984
+			$shortcode = sanitize_key($shortcode);
985 985
 			// now we need to rebuild the shortcode path
986
-			$shortcode_path = explode( DS, $shortcode_path );
986
+			$shortcode_path = explode(DS, $shortcode_path);
987 987
 			// remove last segment
988
-			array_pop( $shortcode_path );
988
+			array_pop($shortcode_path);
989 989
 			// glue it back together
990
-			$shortcode_path = implode( DS, $shortcode_path ) . DS;
990
+			$shortcode_path = implode(DS, $shortcode_path).DS;
991 991
 		} else {
992 992
 			// we need to generate the filename based off of the folder name
993 993
 			// grab and sanitize shortcode directory name
994
-			$shortcode = sanitize_key( basename( $shortcode_path ));
995
-			$shortcode_path = rtrim( $shortcode_path, DS ) . DS;
994
+			$shortcode = sanitize_key(basename($shortcode_path));
995
+			$shortcode_path = rtrim($shortcode_path, DS).DS;
996 996
 		}
997 997
 		// create classname from shortcode directory or file name
998
-		$shortcode = str_replace( ' ', '_', ucwords( str_replace( '_', ' ', $shortcode )));
998
+		$shortcode = str_replace(' ', '_', ucwords(str_replace('_', ' ', $shortcode)));
999 999
 		// add class prefix
1000
-		$shortcode_class = 'EES_' . $shortcode;
1000
+		$shortcode_class = 'EES_'.$shortcode;
1001 1001
 		// does the shortcode exist ?
1002
-		if ( ! is_readable( $shortcode_path . DS . $shortcode_class . $shortcode_ext )) {
1002
+		if ( ! is_readable($shortcode_path.DS.$shortcode_class.$shortcode_ext)) {
1003 1003
 			$msg = sprintf(
1004
-				__( 'The requested %s shortcode file could not be found or is not readable due to file permissions. It should be in %s', 'event_espresso' ),
1004
+				__('The requested %s shortcode file could not be found or is not readable due to file permissions. It should be in %s', 'event_espresso'),
1005 1005
 				$shortcode_class,
1006
-				$shortcode_path . DS . $shortcode_class . $shortcode_ext
1006
+				$shortcode_path.DS.$shortcode_class.$shortcode_ext
1007 1007
 			);
1008
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1008
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1009 1009
 			return FALSE;
1010 1010
 		}
1011 1011
 		// load the shortcode class file
1012
-		require_once( $shortcode_path . $shortcode_class . $shortcode_ext );
1012
+		require_once($shortcode_path.$shortcode_class.$shortcode_ext);
1013 1013
 		// verify that class exists
1014
-		if ( ! class_exists( $shortcode_class )) {
1015
-			$msg = sprintf( __( 'The requested %s shortcode class does not exist.', 'event_espresso' ), $shortcode_class );
1016
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1014
+		if ( ! class_exists($shortcode_class)) {
1015
+			$msg = sprintf(__('The requested %s shortcode class does not exist.', 'event_espresso'), $shortcode_class);
1016
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1017 1017
 			return FALSE;
1018 1018
 		}
1019
-		$shortcode = strtoupper( $shortcode );
1019
+		$shortcode = strtoupper($shortcode);
1020 1020
 		// add to array of registered shortcodes
1021
-		EE_Registry::instance()->shortcodes->{$shortcode} = $shortcode_path . $shortcode_class . $shortcode_ext;
1021
+		EE_Registry::instance()->shortcodes->{$shortcode} = $shortcode_path.$shortcode_class.$shortcode_ext;
1022 1022
 		return TRUE;
1023 1023
 	}
1024 1024
 
@@ -1033,23 +1033,23 @@  discard block
 block discarded – undo
1033 1033
 	 */
1034 1034
 	private function _register_modules() {
1035 1035
 		// grab list of installed modules
1036
-		$modules_to_register = glob( EE_MODULES . '*', GLOB_ONLYDIR );
1036
+		$modules_to_register = glob(EE_MODULES.'*', GLOB_ONLYDIR);
1037 1037
 		// filter list of modules to register
1038
-		$modules_to_register = apply_filters( 'FHEE__EE_Config__register_modules__modules_to_register', $modules_to_register );
1038
+		$modules_to_register = apply_filters('FHEE__EE_Config__register_modules__modules_to_register', $modules_to_register);
1039 1039
 
1040 1040
 
1041
-		if ( ! empty( $modules_to_register ) ) {
1041
+		if ( ! empty($modules_to_register)) {
1042 1042
 			// loop through folders
1043
-			foreach ( $modules_to_register as $module_path ) {
1043
+			foreach ($modules_to_register as $module_path) {
1044 1044
 				/**TEMPORARILY EXCLUDE gateways from modules for time being**/
1045
-				if ( $module_path != EE_MODULES . 'zzz-copy-this-module-template' && $module_path != EE_MODULES . 'gateways' ) {
1045
+				if ($module_path != EE_MODULES.'zzz-copy-this-module-template' && $module_path != EE_MODULES.'gateways') {
1046 1046
 					// add to list of installed modules
1047
-					EE_Config::register_module( $module_path );
1047
+					EE_Config::register_module($module_path);
1048 1048
 				}
1049 1049
 			}
1050 1050
 		}
1051 1051
 		// filter list of installed modules
1052
-		return apply_filters( 'FHEE__EE_Config___register_modules__installed_modules', EE_Registry::instance()->modules );
1052
+		return apply_filters('FHEE__EE_Config___register_modules__installed_modules', EE_Registry::instance()->modules);
1053 1053
 	}
1054 1054
 
1055 1055
 
@@ -1062,54 +1062,54 @@  discard block
 block discarded – undo
1062 1062
 	 *  @param 	string 		$module_path - full path up to and including module folder
1063 1063
 	 *  @return 	bool
1064 1064
 	 */
1065
-	public static function register_module( $module_path = NULL ) {
1066
-		do_action( 'AHEE__EE_Config__register_module__begin', $module_path );
1065
+	public static function register_module($module_path = NULL) {
1066
+		do_action('AHEE__EE_Config__register_module__begin', $module_path);
1067 1067
 		$module_ext = '.module.php';
1068 1068
 		// make all separators match
1069
-		$module_path = str_replace( array( '\\', '/' ), DS, $module_path );
1069
+		$module_path = str_replace(array('\\', '/'), DS, $module_path);
1070 1070
 		// does the file path INCLUDE the actual file name as part of the path ?
1071
-		if ( strpos( $module_path, $module_ext ) !== FALSE ) {
1071
+		if (strpos($module_path, $module_ext) !== FALSE) {
1072 1072
 			// grab and shortcode file name from directory name and break apart at dots
1073
-			$module_file = explode( '.', basename( $module_path ));
1073
+			$module_file = explode('.', basename($module_path));
1074 1074
 			// now we need to rebuild the shortcode path
1075
-			$module_path = explode( DS, $module_path );
1075
+			$module_path = explode(DS, $module_path);
1076 1076
 			// remove last segment
1077
-			array_pop( $module_path );
1077
+			array_pop($module_path);
1078 1078
 			// glue it back together
1079
-			$module_path = implode( DS, $module_path ) . DS;
1079
+			$module_path = implode(DS, $module_path).DS;
1080 1080
 			// take first segment from file name pieces and sanitize it
1081
-			$module = preg_replace( '/[^a-zA-Z0-9_\-]/', '', $module_file[0] );
1081
+			$module = preg_replace('/[^a-zA-Z0-9_\-]/', '', $module_file[0]);
1082 1082
 			// ensure class prefix is added
1083
-			$module_class = strpos( $module, 'EED_' ) !== 0 ? 'EED_' . $module : $module;
1083
+			$module_class = strpos($module, 'EED_') !== 0 ? 'EED_'.$module : $module;
1084 1084
 		} else {
1085 1085
 			// we need to generate the filename based off of the folder name
1086 1086
 			// grab and sanitize module name
1087
-			$module = strtolower( basename( $module_path ));
1088
-			$module = preg_replace( '/[^a-z0-9_\-]/', '', $module);
1087
+			$module = strtolower(basename($module_path));
1088
+			$module = preg_replace('/[^a-z0-9_\-]/', '', $module);
1089 1089
 			// like trailingslashit()
1090
-			$module_path = rtrim( $module_path, DS ) . DS;
1090
+			$module_path = rtrim($module_path, DS).DS;
1091 1091
 			// create classname from module directory name
1092
-			$module = str_replace( ' ', '_', ucwords( str_replace( '_', ' ', $module )));
1092
+			$module = str_replace(' ', '_', ucwords(str_replace('_', ' ', $module)));
1093 1093
 			// add class prefix
1094
-			$module_class = 'EED_' . $module;
1094
+			$module_class = 'EED_'.$module;
1095 1095
 		}
1096 1096
 		// does the module exist ?
1097
-		if ( ! is_readable( $module_path . DS . $module_class . $module_ext )) {
1098
-			$msg = sprintf( __( 'The requested %s module file could not be found or is not readable due to file permissions.', 'event_espresso' ), $module );
1099
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1097
+		if ( ! is_readable($module_path.DS.$module_class.$module_ext)) {
1098
+			$msg = sprintf(__('The requested %s module file could not be found or is not readable due to file permissions.', 'event_espresso'), $module);
1099
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1100 1100
 			return FALSE;
1101 1101
 		}
1102 1102
 		// load the module class file
1103
-		require_once( $module_path . $module_class . $module_ext );
1103
+		require_once($module_path.$module_class.$module_ext);
1104 1104
 		// verify that class exists
1105
-		if ( ! class_exists( $module_class )) {
1106
-			$msg = sprintf( __( 'The requested %s module class does not exist.', 'event_espresso' ), $module_class );
1107
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1105
+		if ( ! class_exists($module_class)) {
1106
+			$msg = sprintf(__('The requested %s module class does not exist.', 'event_espresso'), $module_class);
1107
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1108 1108
 			return FALSE;
1109 1109
 		}
1110 1110
 		// add to array of registered modules
1111
-		EE_Registry::instance()->modules->{$module_class} = $module_path . $module_class . $module_ext;
1112
-		do_action( 'AHEE__EE_Config__register_module__complete', $module_class, EE_Registry::instance()->modules->{$module_class} );
1111
+		EE_Registry::instance()->modules->{$module_class} = $module_path.$module_class.$module_ext;
1112
+		do_action('AHEE__EE_Config__register_module__complete', $module_class, EE_Registry::instance()->modules->{$module_class} );
1113 1113
 		return TRUE;
1114 1114
 	}
1115 1115
 
@@ -1123,23 +1123,23 @@  discard block
 block discarded – undo
1123 1123
 	 */
1124 1124
 	private function _initialize_shortcodes() {
1125 1125
 		// cycle thru shortcode folders
1126
-		foreach ( EE_Registry::instance()->shortcodes as $shortcode => $shortcode_path ) {
1126
+		foreach (EE_Registry::instance()->shortcodes as $shortcode => $shortcode_path) {
1127 1127
 			// add class prefix
1128
-			$shortcode_class = 'EES_' . $shortcode;
1128
+			$shortcode_class = 'EES_'.$shortcode;
1129 1129
 			// fire the shortcode class's set_hooks methods in case it needs to hook into other parts of the system
1130 1130
 			// which set hooks ?
1131
-			if ( is_admin() ) {
1131
+			if (is_admin()) {
1132 1132
 				// fire immediately
1133
-				call_user_func( array( $shortcode_class, 'set_hooks_admin' ));
1133
+				call_user_func(array($shortcode_class, 'set_hooks_admin'));
1134 1134
 			} else {
1135 1135
 				// delay until other systems are online
1136
-				add_action( 'AHEE__EE_System__set_hooks_for_shortcodes_modules_and_addons', array( $shortcode_class,'set_hooks' ));
1136
+				add_action('AHEE__EE_System__set_hooks_for_shortcodes_modules_and_addons', array($shortcode_class, 'set_hooks'));
1137 1137
 				// convert classname to UPPERCASE and create WP shortcode.
1138
-				$shortcode_tag = strtoupper( $shortcode );
1138
+				$shortcode_tag = strtoupper($shortcode);
1139 1139
 				// but first check if the shortcode has already been added before assigning 'fallback_shortcode_processor'
1140
-				if ( ! shortcode_exists( $shortcode_tag )) {
1140
+				if ( ! shortcode_exists($shortcode_tag)) {
1141 1141
 					// NOTE: this shortcode declaration will get overridden if the shortcode is successfully detected in the post content in EE_Front_Controller->_initialize_shortcodes()
1142
-					add_shortcode( $shortcode_tag, array( $shortcode_class, 'fallback_shortcode_processor' ));
1142
+					add_shortcode($shortcode_tag, array($shortcode_class, 'fallback_shortcode_processor'));
1143 1143
 				}
1144 1144
 			}
1145 1145
 		}
@@ -1156,15 +1156,15 @@  discard block
 block discarded – undo
1156 1156
 	 */
1157 1157
 	private function _initialize_modules() {
1158 1158
 		// cycle thru shortcode folders
1159
-		foreach ( EE_Registry::instance()->modules as $module_class => $module_path ) {
1159
+		foreach (EE_Registry::instance()->modules as $module_class => $module_path) {
1160 1160
 			// fire the shortcode class's set_hooks methods in case it needs to hook into other parts of the system
1161 1161
 			// which set hooks ?
1162
-			if ( is_admin() ) {
1162
+			if (is_admin()) {
1163 1163
 				// fire immediately
1164
-				call_user_func( array( $module_class, 'set_hooks_admin' ));
1164
+				call_user_func(array($module_class, 'set_hooks_admin'));
1165 1165
 			} else {
1166 1166
 				// delay until other systems are online
1167
-				add_action( 'AHEE__EE_System__set_hooks_for_shortcodes_modules_and_addons', array( $module_class,'set_hooks' ));
1167
+				add_action('AHEE__EE_System__set_hooks_for_shortcodes_modules_and_addons', array($module_class, 'set_hooks'));
1168 1168
 			}
1169 1169
 		}
1170 1170
 	}
@@ -1182,26 +1182,26 @@  discard block
 block discarded – undo
1182 1182
 	 *  @param 	string 		$key - url param key indicating a route is being called
1183 1183
 	 *  @return 	bool
1184 1184
 	 */
1185
-	public static function register_route( $route = NULL, $module = NULL, $method_name = NULL, $key = 'ee' ) {
1186
-		do_action( 'AHEE__EE_Config__register_route__begin', $route, $module, $method_name );
1187
-		$module = str_replace( 'EED_', '', $module );
1188
-		$module_class = 'EED_' . $module;
1189
-		if ( ! isset( EE_Registry::instance()->modules->{$module_class} )) {
1190
-			$msg = sprintf( __( 'The module %s has not been registered.', 'event_espresso' ), $module );
1191
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1185
+	public static function register_route($route = NULL, $module = NULL, $method_name = NULL, $key = 'ee') {
1186
+		do_action('AHEE__EE_Config__register_route__begin', $route, $module, $method_name);
1187
+		$module = str_replace('EED_', '', $module);
1188
+		$module_class = 'EED_'.$module;
1189
+		if ( ! isset(EE_Registry::instance()->modules->{$module_class} )) {
1190
+			$msg = sprintf(__('The module %s has not been registered.', 'event_espresso'), $module);
1191
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1192 1192
 			return FALSE;
1193 1193
 		}
1194
-		if ( empty( $route )) {
1195
-			$msg = sprintf( __( 'No route has been supplied.', 'event_espresso' ), $route );
1196
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1194
+		if (empty($route)) {
1195
+			$msg = sprintf(__('No route has been supplied.', 'event_espresso'), $route);
1196
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1197 1197
 			return FALSE;
1198 1198
 		}
1199
-		if ( ! method_exists ( 'EED_' . $module, $method_name )) {
1200
-			$msg = sprintf( __( 'A valid class method for the %s route has not been supplied.', 'event_espresso' ), $route );
1201
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1199
+		if ( ! method_exists('EED_'.$module, $method_name)) {
1200
+			$msg = sprintf(__('A valid class method for the %s route has not been supplied.', 'event_espresso'), $route);
1201
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1202 1202
 			return FALSE;
1203 1203
 		}
1204
-		EE_Config::$_module_route_map[ $key ][ $route ] = array( 'EED_' . $module, $method_name );
1204
+		EE_Config::$_module_route_map[$key][$route] = array('EED_'.$module, $method_name);
1205 1205
 		return TRUE;
1206 1206
 	}
1207 1207
 
@@ -1215,11 +1215,11 @@  discard block
 block discarded – undo
1215 1215
 	 *  @param 	string 		$key - url param key indicating a route is being called
1216 1216
 	 *  @return 	string
1217 1217
 	 */
1218
-	public static function get_route( $route = NULL, $key = 'ee' ) {
1219
-		do_action( 'AHEE__EE_Config__get_route__begin',$route );
1220
-		$route = apply_filters( 'FHEE__EE_Config__get_route',$route );
1221
-		if ( isset( EE_Config::$_module_route_map[ $key ][ $route ] )) {
1222
-			return EE_Config::$_module_route_map[ $key ][ $route ];
1218
+	public static function get_route($route = NULL, $key = 'ee') {
1219
+		do_action('AHEE__EE_Config__get_route__begin', $route);
1220
+		$route = apply_filters('FHEE__EE_Config__get_route', $route);
1221
+		if (isset(EE_Config::$_module_route_map[$key][$route])) {
1222
+			return EE_Config::$_module_route_map[$key][$route];
1223 1223
 		}
1224 1224
 		return NULL;
1225 1225
 	}
@@ -1248,35 +1248,35 @@  discard block
 block discarded – undo
1248 1248
 	 * @param    string 		$key - url param key indicating a route is being called
1249 1249
 	 * @return    bool
1250 1250
 	 */
1251
-	public static function register_forward( $route = NULL, $status = 0, $forward = NULL, $key = 'ee' ) {
1252
-		do_action( 'AHEE__EE_Config__register_forward',$route,$status,$forward );
1253
-		if ( ! isset( EE_Config::$_module_route_map[ $key ][ $route ] ) ||  empty( $route )) {
1254
-			$msg = sprintf( __( 'The module route %s for this forward has not been registered.', 'event_espresso' ), $route );
1255
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1251
+	public static function register_forward($route = NULL, $status = 0, $forward = NULL, $key = 'ee') {
1252
+		do_action('AHEE__EE_Config__register_forward', $route, $status, $forward);
1253
+		if ( ! isset(EE_Config::$_module_route_map[$key][$route]) || empty($route)) {
1254
+			$msg = sprintf(__('The module route %s for this forward has not been registered.', 'event_espresso'), $route);
1255
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1256 1256
 			return FALSE;
1257 1257
 		}
1258
-		if ( empty( $forward )) {
1259
-			$msg = sprintf( __( 'No forwarding route has been supplied.', 'event_espresso' ), $route );
1260
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1258
+		if (empty($forward)) {
1259
+			$msg = sprintf(__('No forwarding route has been supplied.', 'event_espresso'), $route);
1260
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1261 1261
 			return FALSE;
1262 1262
 		}
1263
-		if ( is_array( $forward )) {
1264
-			if ( ! isset( $forward[1] )) {
1265
-				$msg = sprintf( __( 'A class method for the %s forwarding route has not been supplied.', 'event_espresso' ), $route );
1266
-				EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1263
+		if (is_array($forward)) {
1264
+			if ( ! isset($forward[1])) {
1265
+				$msg = sprintf(__('A class method for the %s forwarding route has not been supplied.', 'event_espresso'), $route);
1266
+				EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1267 1267
 				return FALSE;
1268 1268
 			}
1269
-			if ( ! method_exists( $forward[0], $forward[1] )) {
1270
-				$msg = sprintf( __( 'The class method %s for the %s forwarding route is in invalid.', 'event_espresso' ), $forward[1], $route );
1271
-				EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1269
+			if ( ! method_exists($forward[0], $forward[1])) {
1270
+				$msg = sprintf(__('The class method %s for the %s forwarding route is in invalid.', 'event_espresso'), $forward[1], $route);
1271
+				EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1272 1272
 				return FALSE;
1273 1273
 			}
1274
-		} else if ( ! function_exists( $forward )) {
1275
-			$msg = sprintf( __( 'The function %s for the %s forwarding route is in invalid.', 'event_espresso' ), $forward, $route );
1276
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1274
+		} else if ( ! function_exists($forward)) {
1275
+			$msg = sprintf(__('The function %s for the %s forwarding route is in invalid.', 'event_espresso'), $forward, $route);
1276
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1277 1277
 			return FALSE;
1278 1278
 		}
1279
-		EE_Config::$_module_forward_map[ $key ][ $route ][ absint( $status ) ] = $forward;
1279
+		EE_Config::$_module_forward_map[$key][$route][absint($status)] = $forward;
1280 1280
 		return TRUE;
1281 1281
 	}
1282 1282
 
@@ -1291,10 +1291,10 @@  discard block
 block discarded – undo
1291 1291
 	 *  @param    string 		$key - url param key indicating a route is being called
1292 1292
 	 *  @return 	string
1293 1293
 	 */
1294
-	public static function get_forward( $route = NULL, $status = 0, $key = 'ee' ) {
1295
-		do_action( 'AHEE__EE_Config__get_forward__begin',$route,$status );
1296
-		if ( isset( EE_Config::$_module_forward_map[ $key ][ $route ][ $status ] )) {
1297
-			return apply_filters( 'FHEE__EE_Config__get_forward', EE_Config::$_module_forward_map[ $key ][ $route ][ $status ], $route,$status );
1294
+	public static function get_forward($route = NULL, $status = 0, $key = 'ee') {
1295
+		do_action('AHEE__EE_Config__get_forward__begin', $route, $status);
1296
+		if (isset(EE_Config::$_module_forward_map[$key][$route][$status])) {
1297
+			return apply_filters('FHEE__EE_Config__get_forward', EE_Config::$_module_forward_map[$key][$route][$status], $route, $status);
1298 1298
 		}
1299 1299
 		return NULL;
1300 1300
 	}
@@ -1311,19 +1311,19 @@  discard block
 block discarded – undo
1311 1311
 	 * @param    string 		$key - url param key indicating a route is being called
1312 1312
 	 * @return    bool
1313 1313
 	 */
1314
-	public static function register_view( $route = NULL, $status = 0, $view = NULL, $key = 'ee' ) {
1315
-		do_action( 'AHEE__EE_Config__register_view__begin',$route,$status,$view );
1316
-		if ( ! isset( EE_Config::$_module_route_map[ $key ][ $route ] ) ||  empty( $route )) {
1317
-			$msg = sprintf( __( 'The module route %s for this view has not been registered.', 'event_espresso' ), $route );
1318
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1314
+	public static function register_view($route = NULL, $status = 0, $view = NULL, $key = 'ee') {
1315
+		do_action('AHEE__EE_Config__register_view__begin', $route, $status, $view);
1316
+		if ( ! isset(EE_Config::$_module_route_map[$key][$route]) || empty($route)) {
1317
+			$msg = sprintf(__('The module route %s for this view has not been registered.', 'event_espresso'), $route);
1318
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1319 1319
 			return FALSE;
1320 1320
 		}
1321
-		if ( ! is_readable( $view )) {
1322
-			$msg = sprintf( __( 'The %s view file could not be found or is not readable due to file permissions.', 'event_espresso' ), $view );
1323
-			EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ );
1321
+		if ( ! is_readable($view)) {
1322
+			$msg = sprintf(__('The %s view file could not be found or is not readable due to file permissions.', 'event_espresso'), $view);
1323
+			EE_Error::add_error($msg.'||'.$msg, __FILE__, __FUNCTION__, __LINE__);
1324 1324
 			return FALSE;
1325 1325
 		}
1326
-		EE_Config::$_module_view_map[ $key ][ $route ][ absint( $status ) ] = $view;
1326
+		EE_Config::$_module_view_map[$key][$route][absint($status)] = $view;
1327 1327
 		return TRUE;
1328 1328
 	}
1329 1329
 
@@ -1340,10 +1340,10 @@  discard block
 block discarded – undo
1340 1340
 	 *  @param    string 		$key - url param key indicating a route is being called
1341 1341
 	 *  @return 	string
1342 1342
 	 */
1343
-	public static function get_view( $route = NULL, $status = 0, $key = 'ee' ) {
1344
-		do_action( 'AHEE__EE_Config__get_view__begin',$route,$status );
1345
-		if ( isset( EE_Config::$_module_view_map[ $key ][ $route ][ $status ] )) {
1346
-			return apply_filters( 'FHEE__EE_Config__get_view', EE_Config::$_module_view_map[ $key ][ $route ][ $status ], $route,$status );
1343
+	public static function get_view($route = NULL, $status = 0, $key = 'ee') {
1344
+		do_action('AHEE__EE_Config__get_view__begin', $route, $status);
1345
+		if (isset(EE_Config::$_module_view_map[$key][$route][$status])) {
1346
+			return apply_filters('FHEE__EE_Config__get_view', EE_Config::$_module_view_map[$key][$route][$status], $route, $status);
1347 1347
 		}
1348 1348
 		return NULL;
1349 1349
 	}
@@ -1351,7 +1351,7 @@  discard block
 block discarded – undo
1351 1351
 
1352 1352
 
1353 1353
 	public function shutdown() {
1354
-		update_option( 'ee_config_option_names', $this->_config_option_names );
1354
+		update_option('ee_config_option_names', $this->_config_option_names);
1355 1355
 	}
1356 1356
 
1357 1357
 
@@ -1367,7 +1367,7 @@  discard block
 block discarded – undo
1367 1367
  * magic functions in use, except we'll allow them to magically set and get stuff...
1368 1368
  * basically, they should just be well-defined stdClasses
1369 1369
  */
1370
-class EE_Config_Base{
1370
+class EE_Config_Base {
1371 1371
 
1372 1372
 	/**
1373 1373
 	 * Utility function for escaping the value of a property and returning.
@@ -1376,13 +1376,13 @@  discard block
 block discarded – undo
1376 1376
 	 * @return mixed if a detected type found return the escaped value, otherwise just the raw value is returned.
1377 1377
 	 * @throws \EE_Error
1378 1378
 	 */
1379
-	public function get_pretty( $property ) {
1380
-		if ( ! property_exists( $this, $property ) ) {
1381
-			throw new EE_Error( sprintf( __('%1$s::get_pretty() has been called with the property %2$s which does not exist on the %1$s config class.', 'event_espresso' ), get_class( $this ), $property ) );
1379
+	public function get_pretty($property) {
1380
+		if ( ! property_exists($this, $property)) {
1381
+			throw new EE_Error(sprintf(__('%1$s::get_pretty() has been called with the property %2$s which does not exist on the %1$s config class.', 'event_espresso'), get_class($this), $property));
1382 1382
 		}
1383 1383
 		//just handling escaping of strings for now.
1384
-		if ( is_string( $this->{$property} ) ) {
1385
-			return stripslashes( $this->{$property} );
1384
+		if (is_string($this->{$property} )) {
1385
+			return stripslashes($this->{$property} );
1386 1386
 		}
1387 1387
 		return $this->{$property};
1388 1388
 	}
@@ -1391,19 +1391,19 @@  discard block
 block discarded – undo
1391 1391
 
1392 1392
 	public function populate() {
1393 1393
 		//grab defaults via a new instance of this class.
1394
-		$class_name = get_class( $this );
1394
+		$class_name = get_class($this);
1395 1395
 		$defaults = new $class_name;
1396 1396
 
1397 1397
 		//loop through the properties for this class and see if they are set.  If they are NOT, then grab the
1398 1398
 		//default from our $defaults object.
1399
-		foreach ( get_object_vars( $defaults ) as $property => $value ) {
1400
-			if ( is_null( $this->{$property} ) ) {
1399
+		foreach (get_object_vars($defaults) as $property => $value) {
1400
+			if (is_null($this->{$property} )) {
1401 1401
 				$this->{$property} = $value;
1402 1402
 			}
1403 1403
 		}
1404 1404
 
1405 1405
 		//cleanup
1406
-		unset( $defaults );
1406
+		unset($defaults);
1407 1407
 	}
1408 1408
 
1409 1409
 
@@ -1495,12 +1495,12 @@  discard block
 block discarded – undo
1495 1495
 	 */
1496 1496
 	public function __construct() {
1497 1497
 		$current_network_main_site = is_multisite() ? get_current_site() : NULL;
1498
-		$current_main_site_id = !empty( $current_network_main_site ) ? $current_network_main_site->blog_id : 1;
1498
+		$current_main_site_id = ! empty($current_network_main_site) ? $current_network_main_site->blog_id : 1;
1499 1499
 		// set default organization settings
1500 1500
 		$this->current_blog_id = get_current_blog_id();
1501 1501
 		$this->current_blog_id = $this->current_blog_id === NULL ? 1 : $this->current_blog_id;
1502
-		$this->ee_ueip_optin = is_main_site() ? get_option( 'ee_ueip_optin', TRUE ) : get_blog_option( $current_main_site_id, 'ee_ueip_optin', TRUE );
1503
-		$this->ee_ueip_has_notified = is_main_site() ? get_option( 'ee_ueip_has_notified', FALSE ) : TRUE;
1502
+		$this->ee_ueip_optin = is_main_site() ? get_option('ee_ueip_optin', TRUE) : get_blog_option($current_main_site_id, 'ee_ueip_optin', TRUE);
1503
+		$this->ee_ueip_has_notified = is_main_site() ? get_option('ee_ueip_has_notified', FALSE) : TRUE;
1504 1504
 		$this->post_shortcodes = array();
1505 1505
 		$this->module_route_map = array();
1506 1506
 		$this->module_forward_map = array();
@@ -1519,7 +1519,7 @@  discard block
 block discarded – undo
1519 1519
 		$this->event_cpt_slug = __('events', 'event_espresso');
1520 1520
 
1521 1521
 		//ueip constant check
1522
-		if ( defined( 'EE_DISABLE_UXIP' ) && EE_DISABLE_UXIP ) {
1522
+		if (defined('EE_DISABLE_UXIP') && EE_DISABLE_UXIP) {
1523 1523
 			$this->ee_ueip_optin = FALSE;
1524 1524
 			$this->ee_ueip_has_notified = TRUE;
1525 1525
 		}
@@ -1559,8 +1559,8 @@  discard block
 block discarded – undo
1559 1559
 	 *  @return 	string
1560 1560
 	 */
1561 1561
 	public function reg_page_url() {
1562
-		if ( ! $this->reg_page_url ) {
1563
-			$this->reg_page_url = get_permalink( $this->reg_page_id ) . '#checkout';
1562
+		if ( ! $this->reg_page_url) {
1563
+			$this->reg_page_url = get_permalink($this->reg_page_id).'#checkout';
1564 1564
 		}
1565 1565
 		return $this->reg_page_url;
1566 1566
 	}
@@ -1573,12 +1573,12 @@  discard block
 block discarded – undo
1573 1573
 	 *  @return 	string
1574 1574
 	 */
1575 1575
 	public function txn_page_url($query_args = array()) {
1576
-		if ( ! $this->txn_page_url ) {
1577
-			$this->txn_page_url = get_permalink( $this->txn_page_id );
1576
+		if ( ! $this->txn_page_url) {
1577
+			$this->txn_page_url = get_permalink($this->txn_page_id);
1578 1578
 		}
1579
-		if($query_args){
1580
-			return add_query_arg($query_args,$this->txn_page_url);
1581
-		}else{
1579
+		if ($query_args) {
1580
+			return add_query_arg($query_args, $this->txn_page_url);
1581
+		} else {
1582 1582
 			return $this->txn_page_url;
1583 1583
 		}
1584 1584
 	}
@@ -1590,12 +1590,12 @@  discard block
 block discarded – undo
1590 1590
 	 *  @return 	string
1591 1591
 	 */
1592 1592
 	public function thank_you_page_url($query_args = array()) {
1593
-		if ( ! $this->thank_you_page_url ) {
1594
-			$this->thank_you_page_url = get_permalink( $this->thank_you_page_id );
1593
+		if ( ! $this->thank_you_page_url) {
1594
+			$this->thank_you_page_url = get_permalink($this->thank_you_page_id);
1595 1595
 		}
1596
-		if($query_args){
1597
-			return add_query_arg($query_args,$this->thank_you_page_url);
1598
-		}else{
1596
+		if ($query_args) {
1597
+			return add_query_arg($query_args, $this->thank_you_page_url);
1598
+		} else {
1599 1599
 			return $this->thank_you_page_url;
1600 1600
 		}
1601 1601
 	}
@@ -1606,8 +1606,8 @@  discard block
 block discarded – undo
1606 1606
 	 *  @return 	string
1607 1607
 	 */
1608 1608
 	public function cancel_page_url() {
1609
-		if ( ! $this->cancel_page_url ) {
1610
-			$this->cancel_page_url = get_permalink( $this->cancel_page_id );
1609
+		if ( ! $this->cancel_page_url) {
1610
+			$this->cancel_page_url = get_permalink($this->cancel_page_id);
1611 1611
 		}
1612 1612
 		return $this->cancel_page_url;
1613 1613
 	}
@@ -1635,7 +1635,7 @@  discard block
 block discarded – undo
1635 1635
 		//reset all url properties
1636 1636
 		$this->_reset_urls();
1637 1637
 		//return what to save to db
1638
-		return array_keys( get_object_vars( $this ) );
1638
+		return array_keys(get_object_vars($this));
1639 1639
 	}
1640 1640
 
1641 1641
 }
@@ -1867,39 +1867,39 @@  discard block
 block discarded – undo
1867 1867
 	 * @param null $CNT_ISO
1868 1868
 	 * @return \EE_Currency_Config
1869 1869
 	 */
1870
-	public function __construct( $CNT_ISO = NULL ) {
1870
+	public function __construct($CNT_ISO = NULL) {
1871 1871
 
1872 1872
 		// get country code from organization settings or use default
1873
-		$ORG_CNT = isset( EE_Registry::instance()->CFG->organization ) && EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config ? EE_Registry::instance()->CFG->organization->CNT_ISO : NULL;
1873
+		$ORG_CNT = isset(EE_Registry::instance()->CFG->organization) && EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config ? EE_Registry::instance()->CFG->organization->CNT_ISO : NULL;
1874 1874
 		// but override if requested
1875
-		$CNT_ISO = ! empty( $CNT_ISO ) ? $CNT_ISO : $ORG_CNT;
1876
-		EE_Registry::instance()->load_helper( 'Activation' );
1875
+		$CNT_ISO = ! empty($CNT_ISO) ? $CNT_ISO : $ORG_CNT;
1876
+		EE_Registry::instance()->load_helper('Activation');
1877 1877
 		// so if that all went well, and we are not in M-Mode (cuz you can't query the db in M-Mode) and double-check the countries table exists
1878
-		if ( ! empty( $CNT_ISO ) && EE_Maintenance_Mode::instance()->models_can_query() && EEH_Activation::table_exists( EE_Registry::instance()->load_model( 'Country' )->table() ) ) {
1878
+		if ( ! empty($CNT_ISO) && EE_Maintenance_Mode::instance()->models_can_query() && EEH_Activation::table_exists(EE_Registry::instance()->load_model('Country')->table())) {
1879 1879
 			// retrieve the country settings from the db, just in case they have been customized
1880
-			$country = EE_Registry::instance()->load_model( 'Country' )->get_one_by_ID( $CNT_ISO );
1881
-			if ( $country instanceof EE_Country ) {
1882
-				$this->code = $country->currency_code(); 	// currency code: USD, CAD, EUR
1883
-				$this->name = $country->currency_name_single();	// Dollar
1884
-				$this->plural = $country->currency_name_plural(); 	// Dollars
1885
-				$this->sign =  $country->currency_sign(); 			// currency sign: $
1886
-				$this->sign_b4 = $country->currency_sign_before(); 		// currency sign before or after: $TRUE  or  FALSE$
1887
-				$this->dec_plc = $country->currency_decimal_places();	// decimal places: 2 = 0.00  3 = 0.000
1888
-				$this->dec_mrk = $country->currency_decimal_mark();	// decimal mark: (comma) ',' = 0,01   or (decimal) '.' = 0.01
1889
-				$this->thsnds = $country->currency_thousands_separator();	// thousands separator: (comma) ',' = 1,000   or (decimal) '.' = 1.000
1880
+			$country = EE_Registry::instance()->load_model('Country')->get_one_by_ID($CNT_ISO);
1881
+			if ($country instanceof EE_Country) {
1882
+				$this->code = $country->currency_code(); // currency code: USD, CAD, EUR
1883
+				$this->name = $country->currency_name_single(); // Dollar
1884
+				$this->plural = $country->currency_name_plural(); // Dollars
1885
+				$this->sign = $country->currency_sign(); // currency sign: $
1886
+				$this->sign_b4 = $country->currency_sign_before(); // currency sign before or after: $TRUE  or  FALSE$
1887
+				$this->dec_plc = $country->currency_decimal_places(); // decimal places: 2 = 0.00  3 = 0.000
1888
+				$this->dec_mrk = $country->currency_decimal_mark(); // decimal mark: (comma) ',' = 0,01   or (decimal) '.' = 0.01
1889
+				$this->thsnds = $country->currency_thousands_separator(); // thousands separator: (comma) ',' = 1,000   or (decimal) '.' = 1.000
1890 1890
 			}
1891 1891
 		}
1892 1892
 		// fallback to hardcoded defaults, in case the above failed
1893
-		if ( empty( $this->code )) {
1893
+		if (empty($this->code)) {
1894 1894
 			// set default currency settings
1895
-			$this->code = 'USD'; 	// currency code: USD, CAD, EUR
1896
-			$this->name = __( 'Dollar', 'event_espresso' ); 	// Dollar
1897
-			$this->plural = __( 'Dollars', 'event_espresso' ); 	// Dollars
1898
-			$this->sign =  '$'; 	// currency sign: $
1899
-			$this->sign_b4 = TRUE; 	// currency sign before or after: $TRUE  or  FALSE$
1900
-			$this->dec_plc = 2; 	// decimal places: 2 = 0.00  3 = 0.000
1901
-			$this->dec_mrk = '.'; 	// decimal mark: (comma) ',' = 0,01   or (decimal) '.' = 0.01
1902
-			$this->thsnds = ','; 	// thousands separator: (comma) ',' = 1,000   or (decimal) '.' = 1.000
1895
+			$this->code = 'USD'; // currency code: USD, CAD, EUR
1896
+			$this->name = __('Dollar', 'event_espresso'); // Dollar
1897
+			$this->plural = __('Dollars', 'event_espresso'); // Dollars
1898
+			$this->sign = '$'; // currency sign: $
1899
+			$this->sign_b4 = TRUE; // currency sign before or after: $TRUE  or  FALSE$
1900
+			$this->dec_plc = 2; // decimal places: 2 = 0.00  3 = 0.000
1901
+			$this->dec_mrk = '.'; // decimal mark: (comma) ',' = 0,01   or (decimal) '.' = 0.01
1902
+			$this->thsnds = ','; // thousands separator: (comma) ',' = 1,000   or (decimal) '.' = 1.000
1903 1903
 		}
1904 1904
 	}
1905 1905
 }
@@ -2048,7 +2048,7 @@  discard block
 block discarded – undo
2048 2048
 	 * @since 4.8.8.rc.019
2049 2049
 	 */
2050 2050
 	public function do_hooks() {
2051
-		add_action( 'AHEE__EE_Config___load_core_config__end', array( $this, 'set_default_reg_status_on_EEM_Event' ));
2051
+		add_action('AHEE__EE_Config___load_core_config__end', array($this, 'set_default_reg_status_on_EEM_Event'));
2052 2052
 	}
2053 2053
 
2054 2054
 
@@ -2056,7 +2056,7 @@  discard block
 block discarded – undo
2056 2056
 	 * @return void
2057 2057
 	 */
2058 2058
 	public function set_default_reg_status_on_EEM_Event() {
2059
-		EEM_Event::set_default_reg_status( $this->default_STS_ID );
2059
+		EEM_Event::set_default_reg_status($this->default_STS_ID);
2060 2060
 	}
2061 2061
 
2062 2062
 
@@ -2161,10 +2161,10 @@  discard block
 block discarded – undo
2161 2161
 	 * @param bool $reset
2162 2162
 	 * @return string
2163 2163
 	 */
2164
-	public function log_file_name( $reset = FALSE ) {
2165
-		if ( empty( $this->log_file_name ) || $reset ) {
2166
-			$this->log_file_name = sanitize_key( 'espresso_log_' . md5( uniqid( '', TRUE ))) . '.txt';
2167
-			EE_Config::instance()->update_espresso_config( FALSE, FALSE );
2164
+	public function log_file_name($reset = FALSE) {
2165
+		if (empty($this->log_file_name) || $reset) {
2166
+			$this->log_file_name = sanitize_key('espresso_log_'.md5(uniqid('', TRUE))).'.txt';
2167
+			EE_Config::instance()->update_espresso_config(FALSE, FALSE);
2168 2168
 		}
2169 2169
 		return $this->log_file_name;
2170 2170
 	}
@@ -2176,10 +2176,10 @@  discard block
 block discarded – undo
2176 2176
 	 * @param bool $reset
2177 2177
 	 * @return string
2178 2178
 	 */
2179
-	public function debug_file_name( $reset = FALSE ) {
2180
-		if ( empty( $this->debug_file_name ) || $reset ) {
2181
-			$this->debug_file_name = sanitize_key( 'espresso_debug_' . md5( uniqid( '', TRUE ))) . '.txt';
2182
-			EE_Config::instance()->update_espresso_config( FALSE, FALSE );
2179
+	public function debug_file_name($reset = FALSE) {
2180
+		if (empty($this->debug_file_name) || $reset) {
2181
+			$this->debug_file_name = sanitize_key('espresso_debug_'.md5(uniqid('', TRUE))).'.txt';
2182
+			EE_Config::instance()->update_espresso_config(FALSE, FALSE);
2183 2183
 		}
2184 2184
 		return $this->debug_file_name;
2185 2185
 	}
@@ -2352,21 +2352,21 @@  discard block
 block discarded – undo
2352 2352
 		// set default map settings
2353 2353
 		$this->use_google_maps = TRUE;
2354 2354
 		// for event details pages (reg page)
2355
-		$this->event_details_map_width = 585; 			// ee_map_width_single
2356
-		$this->event_details_map_height = 362; 			// ee_map_height_single
2357
-		$this->event_details_map_zoom = 14; 			// ee_map_zoom_single
2358
-		$this->event_details_display_nav = TRUE; 			// ee_map_nav_display_single
2359
-		$this->event_details_nav_size = FALSE; 			// ee_map_nav_size_single
2360
-		$this->event_details_control_type = 'default'; 		// ee_map_type_control_single
2361
-		$this->event_details_map_align = 'center'; 			// ee_map_align_single
2355
+		$this->event_details_map_width = 585; // ee_map_width_single
2356
+		$this->event_details_map_height = 362; // ee_map_height_single
2357
+		$this->event_details_map_zoom = 14; // ee_map_zoom_single
2358
+		$this->event_details_display_nav = TRUE; // ee_map_nav_display_single
2359
+		$this->event_details_nav_size = FALSE; // ee_map_nav_size_single
2360
+		$this->event_details_control_type = 'default'; // ee_map_type_control_single
2361
+		$this->event_details_map_align = 'center'; // ee_map_align_single
2362 2362
 		// for event list pages
2363
-		$this->event_list_map_width = 300; 			// ee_map_width
2364
-		$this->event_list_map_height = 185; 		// ee_map_height
2365
-		$this->event_list_map_zoom = 12; 			// ee_map_zoom
2366
-		$this->event_list_display_nav = FALSE; 		// ee_map_nav_display
2367
-		$this->event_list_nav_size = TRUE; 			// ee_map_nav_size
2368
-		$this->event_list_control_type = 'dropdown'; 		// ee_map_type_control
2369
-		$this->event_list_map_align = 'center'; 			// ee_map_align
2363
+		$this->event_list_map_width = 300; // ee_map_width
2364
+		$this->event_list_map_height = 185; // ee_map_height
2365
+		$this->event_list_map_zoom = 12; // ee_map_zoom
2366
+		$this->event_list_display_nav = FALSE; // ee_map_nav_display
2367
+		$this->event_list_nav_size = TRUE; // ee_map_nav_size
2368
+		$this->event_list_control_type = 'dropdown'; // ee_map_type_control
2369
+		$this->event_list_map_align = 'center'; // ee_map_align
2370 2370
 	}
2371 2371
 
2372 2372
 }
@@ -2377,7 +2377,7 @@  discard block
 block discarded – undo
2377 2377
 /**
2378 2378
  * stores Events_Archive settings
2379 2379
  */
2380
-class EE_Events_Archive_Config extends EE_Config_Base{
2380
+class EE_Events_Archive_Config extends EE_Config_Base {
2381 2381
 
2382 2382
 	public $display_status_banner;
2383 2383
 	public $display_description;
@@ -2396,7 +2396,7 @@  discard block
 block discarded – undo
2396 2396
 	/**
2397 2397
 	 *	class constructor
2398 2398
 	 */
2399
-	public function __construct(){
2399
+	public function __construct() {
2400 2400
 		$this->display_status_banner = 0;
2401 2401
 		$this->display_description = 1;
2402 2402
 		$this->display_ticket_selector = 0;
@@ -2416,7 +2416,7 @@  discard block
 block discarded – undo
2416 2416
 /**
2417 2417
  * Stores Event_Single_Config settings
2418 2418
  */
2419
-class EE_Event_Single_Config extends EE_Config_Base{
2419
+class EE_Event_Single_Config extends EE_Config_Base {
2420 2420
 
2421 2421
 	public $display_status_banner_single;
2422 2422
 	public $display_venue;
@@ -2445,7 +2445,7 @@  discard block
 block discarded – undo
2445 2445
 /**
2446 2446
  * Stores Ticket_Selector_Config settings
2447 2447
  */
2448
-class EE_Ticket_Selector_Config extends EE_Config_Base{
2448
+class EE_Ticket_Selector_Config extends EE_Config_Base {
2449 2449
 	public $show_ticket_sale_columns;
2450 2450
 	public $show_ticket_details;
2451 2451
 	public $show_expired_tickets;
@@ -2499,7 +2499,7 @@  discard block
 block discarded – undo
2499 2499
 	 * @return void
2500 2500
 	 */
2501 2501
 	protected function _set_php_values() {
2502
-		$this->php->max_input_vars = ini_get( 'max_input_vars' );
2502
+		$this->php->max_input_vars = ini_get('max_input_vars');
2503 2503
 		$this->php->version = phpversion();
2504 2504
 	}
2505 2505
 
@@ -2518,9 +2518,9 @@  discard block
 block discarded – undo
2518 2518
 	 *         @type string $msg 		Any message to be displayed.
2519 2519
 	 * }
2520 2520
 	 */
2521
-	public function max_input_vars_limit_check( $input_count = 0 ) {
2522
-		if ( ! empty( $this->php->max_input_vars ) && ( $input_count >= $this->php->max_input_vars ) && ( PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 3 && PHP_RELEASE_VERSION >=9 ) ) {
2523
-			return  sprintf( __('The maximum number of inputs on this page has been exceeded.  You cannot add anymore items (i.e. tickets, datetimes, custom fields) on this page because of your servers PHP "max_input_vars" setting.%1$sThere are %2$d inputs and the maximum amount currently allowed by your server is %3$d.', 'event_espresso'), '<br>', $input_count, $this->php->max_input_vars);
2521
+	public function max_input_vars_limit_check($input_count = 0) {
2522
+		if ( ! empty($this->php->max_input_vars) && ($input_count >= $this->php->max_input_vars) && (PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 3 && PHP_RELEASE_VERSION >= 9)) {
2523
+			return  sprintf(__('The maximum number of inputs on this page has been exceeded.  You cannot add anymore items (i.e. tickets, datetimes, custom fields) on this page because of your servers PHP "max_input_vars" setting.%1$sThere are %2$d inputs and the maximum amount currently allowed by your server is %3$d.', 'event_espresso'), '<br>', $input_count, $this->php->max_input_vars);
2524 2524
 		} else {
2525 2525
 			return '';
2526 2526
 		}
@@ -2555,7 +2555,7 @@  discard block
 block discarded – undo
2555 2555
  * stores payment gateway info
2556 2556
  * @deprecated
2557 2557
  */
2558
-class EE_Gateway_Config extends EE_Config_Base{
2558
+class EE_Gateway_Config extends EE_Config_Base {
2559 2559
 
2560 2560
 	/**
2561 2561
 	 * Array with keys that are payment gateways slugs, and values are arrays
@@ -2577,9 +2577,9 @@  discard block
 block discarded – undo
2577 2577
 	 *	class constructor
2578 2578
 	 * @deprecated
2579 2579
 	 */
2580
-	public function __construct(){
2580
+	public function __construct() {
2581 2581
 		$this->payment_settings = array();
2582
-		$this->active_gateways = array( 'Invoice' => FALSE );
2582
+		$this->active_gateways = array('Invoice' => FALSE);
2583 2583
 	}
2584 2584
 }
2585 2585
 
Please login to merge, or discard this patch.
Indentation   +140 added lines, -140 removed lines patch added patch discarded remove patch
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
 	public $map_settings = null;
90 90
 
91 91
 	/**
92
-	*
93
-	* @deprecated
94
-	* @var EE_Gateway_Config
95
-	*/
92
+	 *
93
+	 * @deprecated
94
+	 * @var EE_Gateway_Config
95
+	 */
96 96
 	public $gateway = null;
97 97
 
98 98
 	/**
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
 
686 686
 	/**
687 687
 	 *    update_config
688
-         * Important: the config object must ALREADY be set, otherwise this will produce an error.
688
+	 * Important: the config object must ALREADY be set, otherwise this will produce an error.
689 689
 	 *
690 690
 	 * @access 	public
691 691
 	 * @param 	string 					$section
@@ -1712,51 +1712,51 @@  discard block
 block discarded – undo
1712 1712
 class EE_Organization_Config extends EE_Config_Base {
1713 1713
 
1714 1714
 	/**
1715
-	* @var string  $name
1716
-	* eg EE4.1
1717
-	*/
1715
+	 * @var string  $name
1716
+	 * eg EE4.1
1717
+	 */
1718 1718
 	public $name;
1719 1719
 
1720 1720
 	/**
1721
-	* @var string $address_1
1722
-	* eg 123 Onna Road
1723
-	*/
1721
+	 * @var string $address_1
1722
+	 * eg 123 Onna Road
1723
+	 */
1724 1724
 	public $address_1;
1725 1725
 
1726 1726
 	/**
1727
-	* @var string $address_2
1728
-	* eg PO Box 123
1729
-	*/
1727
+	 * @var string $address_2
1728
+	 * eg PO Box 123
1729
+	 */
1730 1730
 	public $address_2;
1731 1731
 
1732 1732
 	/**
1733
-	* @var string $city
1734
-	* eg Inna City
1735
-	*/
1733
+	 * @var string $city
1734
+	 * eg Inna City
1735
+	 */
1736 1736
 	public $city;
1737 1737
 
1738 1738
 	/**
1739
-	* @var int $STA_ID
1740
-	* eg 4
1741
-	*/
1739
+	 * @var int $STA_ID
1740
+	 * eg 4
1741
+	 */
1742 1742
 	public $STA_ID;
1743 1743
 
1744 1744
 	/**
1745
-	* @var string  $CNT_ISO
1746
-	* eg US
1747
-	*/
1745
+	 * @var string  $CNT_ISO
1746
+	 * eg US
1747
+	 */
1748 1748
 	public $CNT_ISO;
1749 1749
 
1750 1750
 	/**
1751
-	* @var string $zip
1752
-	* eg 12345  or V1A 2B3
1753
-	*/
1751
+	 * @var string $zip
1752
+	 * eg 12345  or V1A 2B3
1753
+	 */
1754 1754
 	public $zip;
1755 1755
 
1756 1756
 	/**
1757
-	* @var string  $email
1758
-	* eg [email protected]
1759
-	*/
1757
+	 * @var string  $email
1758
+	 * eg [email protected]
1759
+	 */
1760 1760
 	public $email;
1761 1761
 
1762 1762
 
@@ -1775,9 +1775,9 @@  discard block
 block discarded – undo
1775 1775
 	public $vat;
1776 1776
 
1777 1777
 	/**
1778
-	* @var string  $logo_url
1779
-	* eg http://www.somedomain.com/wp-content/uploads/kittehs.jpg
1780
-	*/
1778
+	 * @var string  $logo_url
1779
+	 * eg http://www.somedomain.com/wp-content/uploads/kittehs.jpg
1780
+	 */
1781 1781
 	public $logo_url;
1782 1782
 
1783 1783
 
@@ -1871,55 +1871,55 @@  discard block
 block discarded – undo
1871 1871
 class EE_Currency_Config extends EE_Config_Base {
1872 1872
 
1873 1873
 	/**
1874
-	* @var string  $code
1875
-	* eg 'US'
1876
-	*/
1874
+	 * @var string  $code
1875
+	 * eg 'US'
1876
+	 */
1877 1877
 	public $code;
1878 1878
 
1879 1879
 	/**
1880
-	* @var string $name
1881
-	* eg 'Dollar'
1882
-	*/
1880
+	 * @var string $name
1881
+	 * eg 'Dollar'
1882
+	 */
1883 1883
 	public $name;
1884 1884
 
1885 1885
 	/**
1886
-	* plural name
1887
-	* @var string $plural
1888
-	* eg 'Dollars'
1889
-	*/
1886
+	 * plural name
1887
+	 * @var string $plural
1888
+	 * eg 'Dollars'
1889
+	 */
1890 1890
 	public $plural;
1891 1891
 
1892 1892
 	/**
1893
-	* currency sign
1894
-	* @var string  $sign
1895
-	* eg '$'
1896
-	*/
1893
+	 * currency sign
1894
+	 * @var string  $sign
1895
+	 * eg '$'
1896
+	 */
1897 1897
 	public $sign;
1898 1898
 
1899 1899
 	/**
1900
-	* Whether the currency sign should come before the number or not
1901
-	* @var boolean $sign_b4
1902
-	*/
1900
+	 * Whether the currency sign should come before the number or not
1901
+	 * @var boolean $sign_b4
1902
+	 */
1903 1903
 	public $sign_b4;
1904 1904
 
1905 1905
 	/**
1906
-	* How many digits should come after the decimal place
1907
-	* @var int $dec_plc
1908
-	*/
1906
+	 * How many digits should come after the decimal place
1907
+	 * @var int $dec_plc
1908
+	 */
1909 1909
 	public $dec_plc;
1910 1910
 
1911 1911
 	/**
1912
-	* Symbol to use for decimal mark
1913
-	* @var string $dec_mrk
1914
-	* eg '.'
1915
-	*/
1912
+	 * Symbol to use for decimal mark
1913
+	 * @var string $dec_mrk
1914
+	 * eg '.'
1915
+	 */
1916 1916
 	public $dec_mrk;
1917 1917
 
1918 1918
 	/**
1919
-	* Symbol to use for thousands
1920
-	* @var string $thsnds
1921
-	* eg ','
1922
-	*/
1919
+	 * Symbol to use for thousands
1920
+	 * @var string $thsnds
1921
+	 * eg ','
1922
+	 */
1923 1923
 	public $thsnds;
1924 1924
 
1925 1925
 
@@ -1987,13 +1987,13 @@  discard block
 block discarded – undo
1987 1987
 	 * 	whether or not to show alternate payment options during the reg process if payment status is pending
1988 1988
 	 * @var boolean $show_pending_payment_options
1989 1989
 	 */
1990
-      public $show_pending_payment_options;
1990
+	  public $show_pending_payment_options;
1991 1991
 
1992 1992
 	/**
1993 1993
 	 * Whether to skip the registration confirmation page
1994 1994
 	 * @var boolean $skip_reg_confirmation
1995 1995
 	 */
1996
-      public $skip_reg_confirmation;
1996
+	  public $skip_reg_confirmation;
1997 1997
 
1998 1998
 	/**
1999 1999
 	 * an array of SPCO reg steps where:
@@ -2004,64 +2004,64 @@  discard block
 block discarded – undo
2004 2004
 	 * 			"slug" => the URL param used to trigger the reg step
2005 2005
 	 * @var array $reg_steps
2006 2006
 	 */
2007
-      public $reg_steps;
2007
+	  public $reg_steps;
2008 2008
 
2009 2009
 	/**
2010 2010
 	 * Whether registration confirmation should be the last page of SPCO
2011 2011
 	 * @var boolean $reg_confirmation_last
2012 2012
 	 */
2013
-      public $reg_confirmation_last;
2013
+	  public $reg_confirmation_last;
2014 2014
 
2015 2015
 	  /**
2016 2016
 	   * Whether or not to enable the EE Bot Trap
2017 2017
 	   * @var boolean $use_bot_trap
2018 2018
 	   */
2019
-      public $use_bot_trap;
2019
+	  public $use_bot_trap;
2020 2020
 
2021 2021
 	  /**
2022 2022
 	   * Whether or not to encrypt some data sent by the EE Bot Trap
2023 2023
 	   * @var boolean $use_encryption
2024 2024
 	   */
2025
-      public $use_encryption;
2025
+	  public $use_encryption;
2026 2026
 
2027 2027
 	  /**
2028 2028
 	   * Whether or not to use ReCaptcha
2029 2029
 	   * @var boolean $use_captcha
2030 2030
 	   */
2031
-      public $use_captcha;
2031
+	  public $use_captcha;
2032 2032
 
2033 2033
 	  /**
2034 2034
 	   * ReCaptcha Theme
2035 2035
 	   * @var string $recaptcha_theme
2036 2036
 	   * 	options: 'dark	', 'light'
2037 2037
 	   */
2038
-      public $recaptcha_theme;
2038
+	  public $recaptcha_theme;
2039 2039
 
2040 2040
 	  /**
2041 2041
 	   * ReCaptcha Type
2042 2042
 	   * @var string $recaptcha_type
2043 2043
 	   * 	options: 'audio', 'image'
2044 2044
 	   */
2045
-      public $recaptcha_type;
2045
+	  public $recaptcha_type;
2046 2046
 
2047 2047
 	  /**
2048 2048
 	   * ReCaptcha language
2049 2049
 	   * @var string $recaptcha_language
2050 2050
 	   * eg 'en'
2051 2051
 	   */
2052
-      public $recaptcha_language;
2052
+	  public $recaptcha_language;
2053 2053
 
2054 2054
 	  /**
2055 2055
 	   * ReCaptcha public key
2056 2056
 	   * @var string $recaptcha_publickey
2057 2057
 	   */
2058
-      public $recaptcha_publickey;
2058
+	  public $recaptcha_publickey;
2059 2059
 
2060 2060
 	  /**
2061 2061
 	   * ReCaptcha private key
2062 2062
 	   * @var string $recaptcha_privatekey
2063 2063
 	   */
2064
-      public $recaptcha_privatekey;
2064
+	  public $recaptcha_privatekey;
2065 2065
 
2066 2066
 	/**
2067 2067
 	 * ReCaptcha width
@@ -2127,58 +2127,58 @@  discard block
 block discarded – undo
2127 2127
 class EE_Admin_Config extends EE_Config_Base {
2128 2128
 
2129 2129
 	/**
2130
-	* @var boolean $use_personnel_manager
2131
-	*/
2130
+	 * @var boolean $use_personnel_manager
2131
+	 */
2132 2132
 	public $use_personnel_manager;
2133 2133
 
2134 2134
 	/**
2135
-	* @var boolean $use_dashboard_widget
2136
-	*/
2135
+	 * @var boolean $use_dashboard_widget
2136
+	 */
2137 2137
 	public $use_dashboard_widget;
2138 2138
 
2139 2139
 	/**
2140
-	* @var int $events_in_dashboard
2141
-	*/
2140
+	 * @var int $events_in_dashboard
2141
+	 */
2142 2142
 	public $events_in_dashboard;
2143 2143
 
2144 2144
 	/**
2145
-	* @var boolean $use_event_timezones
2146
-	*/
2145
+	 * @var boolean $use_event_timezones
2146
+	 */
2147 2147
 	public $use_event_timezones;
2148 2148
 
2149 2149
 	/**
2150
-	* @var boolean $use_full_logging
2151
-	*/
2150
+	 * @var boolean $use_full_logging
2151
+	 */
2152 2152
 	public $use_full_logging;
2153 2153
 
2154 2154
 	/**
2155
-	* @var string $log_file_name
2156
-	*/
2155
+	 * @var string $log_file_name
2156
+	 */
2157 2157
 	public $log_file_name;
2158 2158
 
2159 2159
 	/**
2160
-	* @var string $debug_file_name
2161
-	*/
2160
+	 * @var string $debug_file_name
2161
+	 */
2162 2162
 	public $debug_file_name;
2163 2163
 
2164 2164
 	/**
2165
-	* @var boolean $use_remote_logging
2166
-	*/
2165
+	 * @var boolean $use_remote_logging
2166
+	 */
2167 2167
 	public $use_remote_logging;
2168 2168
 
2169 2169
 	/**
2170
-	* @var string $remote_logging_url
2171
-	*/
2170
+	 * @var string $remote_logging_url
2171
+	 */
2172 2172
 	public $remote_logging_url;
2173 2173
 
2174 2174
 	/**
2175
-	* @var boolean $show_reg_footer
2176
-	*/
2175
+	 * @var boolean $show_reg_footer
2176
+	 */
2177 2177
 	public $show_reg_footer;
2178 2178
 
2179 2179
 	/**
2180
-	* @var string $affiliate_id
2181
-	*/
2180
+	 * @var string $affiliate_id
2181
+	 */
2182 2182
 	public $affiliate_id;
2183 2183
 
2184 2184
 
@@ -2252,43 +2252,43 @@  discard block
 block discarded – undo
2252 2252
 class EE_Template_Config extends EE_Config_Base {
2253 2253
 
2254 2254
 	/**
2255
-	* @var boolean $enable_default_style
2256
-	*/
2255
+	 * @var boolean $enable_default_style
2256
+	 */
2257 2257
 	public $enable_default_style;
2258 2258
 
2259 2259
 	/**
2260
-	* @var string $custom_style_sheet
2261
-	*/
2260
+	 * @var string $custom_style_sheet
2261
+	 */
2262 2262
 	public $custom_style_sheet;
2263 2263
 
2264 2264
 	/**
2265
-	* @var boolean $display_address_in_regform
2266
-	*/
2265
+	 * @var boolean $display_address_in_regform
2266
+	 */
2267 2267
 	public $display_address_in_regform;
2268 2268
 
2269 2269
 	/**
2270
-	* @var int $display_description_on_multi_reg_page
2271
-	*/
2270
+	 * @var int $display_description_on_multi_reg_page
2271
+	 */
2272 2272
 	public $display_description_on_multi_reg_page;
2273 2273
 
2274 2274
 	/**
2275
-	* @var boolean $use_custom_templates
2276
-	*/
2275
+	 * @var boolean $use_custom_templates
2276
+	 */
2277 2277
 	public $use_custom_templates;
2278 2278
 
2279 2279
 	/**
2280
-	* @var string $current_espresso_theme
2281
-	*/
2280
+	 * @var string $current_espresso_theme
2281
+	 */
2282 2282
 	public $current_espresso_theme;
2283 2283
 
2284 2284
 	/**
2285
-	* @var EE_Event_Single_Config $EED_Event_Single
2286
-	*/
2285
+	 * @var EE_Event_Single_Config $EED_Event_Single
2286
+	 */
2287 2287
 	public $EED_Event_Single;
2288 2288
 
2289 2289
 	/**
2290
-	* @var EE_Events_Archive_Config $EED_Events_Archive
2291
-	*/
2290
+	 * @var EE_Events_Archive_Config $EED_Events_Archive
2291
+	 */
2292 2292
 	public $EED_Events_Archive;
2293 2293
 
2294 2294
 
@@ -2321,78 +2321,78 @@  discard block
 block discarded – undo
2321 2321
 class EE_Map_Config extends EE_Config_Base {
2322 2322
 
2323 2323
 	/**
2324
-	* @var boolean $use_google_maps
2325
-	*/
2324
+	 * @var boolean $use_google_maps
2325
+	 */
2326 2326
 	public $use_google_maps;
2327 2327
 
2328 2328
 	/**
2329
-	* @var int $event_details_map_width
2330
-	*/
2329
+	 * @var int $event_details_map_width
2330
+	 */
2331 2331
 	public $event_details_map_width;
2332 2332
 
2333 2333
 	/**
2334
-	* @var int $event_details_map_height
2335
-	*/
2334
+	 * @var int $event_details_map_height
2335
+	 */
2336 2336
 	public $event_details_map_height;
2337 2337
 
2338 2338
 	/**
2339
-	* @var int $event_details_map_zoom
2340
-	*/
2339
+	 * @var int $event_details_map_zoom
2340
+	 */
2341 2341
 	public $event_details_map_zoom;
2342 2342
 
2343 2343
 	/**
2344
-	* @var boolean $event_details_display_nav
2345
-	*/
2344
+	 * @var boolean $event_details_display_nav
2345
+	 */
2346 2346
 	public $event_details_display_nav;
2347 2347
 
2348 2348
 	/**
2349
-	* @var boolean $event_details_nav_size
2350
-	*/
2349
+	 * @var boolean $event_details_nav_size
2350
+	 */
2351 2351
 	public $event_details_nav_size;
2352 2352
 
2353 2353
 	/**
2354
-	* @var string $event_details_control_type
2355
-	*/
2354
+	 * @var string $event_details_control_type
2355
+	 */
2356 2356
 	public $event_details_control_type;
2357 2357
 
2358 2358
 	/**
2359
-	* @var string $event_details_map_align
2360
-	*/
2359
+	 * @var string $event_details_map_align
2360
+	 */
2361 2361
 	public $event_details_map_align;
2362 2362
 
2363 2363
 	/**
2364
-	* @var int $event_list_map_width
2365
-	*/
2364
+	 * @var int $event_list_map_width
2365
+	 */
2366 2366
 	public $event_list_map_width;
2367 2367
 
2368 2368
 	/**
2369
-	* @var int $event_list_map_height
2370
-	*/
2369
+	 * @var int $event_list_map_height
2370
+	 */
2371 2371
 	public $event_list_map_height;
2372 2372
 
2373 2373
 	/**
2374
-	* @var int $event_list_map_zoom
2375
-	*/
2374
+	 * @var int $event_list_map_zoom
2375
+	 */
2376 2376
 	public $event_list_map_zoom;
2377 2377
 
2378 2378
 	/**
2379
-	* @var boolean $event_list_display_nav
2380
-	*/
2379
+	 * @var boolean $event_list_display_nav
2380
+	 */
2381 2381
 	public $event_list_display_nav;
2382 2382
 
2383 2383
 	/**
2384
-	* @var boolean $event_list_nav_size
2385
-	*/
2384
+	 * @var boolean $event_list_nav_size
2385
+	 */
2386 2386
 	public $event_list_nav_size;
2387 2387
 
2388 2388
 	/**
2389
-	* @var string $event_list_control_type
2390
-	*/
2389
+	 * @var string $event_list_control_type
2390
+	 */
2391 2391
 	public $event_list_control_type;
2392 2392
 
2393 2393
 	/**
2394
-	* @var string $event_list_map_align
2395
-	*/
2394
+	 * @var string $event_list_map_align
2395
+	 */
2396 2396
 	public $event_list_map_align;
2397 2397
 
2398 2398
 
Please login to merge, or discard this patch.
core/EE_Configurable.core.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 	/**
53 53
 	 * @param string $config_section
54 54
 	 */
55
-	public function set_config_section( $config_section = '' ) {
56
-		$this->_config_section = ! empty( $config_section ) ? $config_section : 'modules';
55
+	public function set_config_section($config_section = '') {
56
+		$this->_config_section = ! empty($config_section) ? $config_section : 'modules';
57 57
 	}
58 58
 
59 59
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	/**
71 71
 	 * @param string $config_class
72 72
 	 */
73
-	public function set_config_class( $config_class = '' ) {
73
+	public function set_config_class($config_class = '') {
74 74
 		$this->_config_class = $config_class;
75 75
 	}
76 76
 
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
 	/**
89 89
 	 * @param mixed $config_name
90 90
 	 */
91
-	public function set_config_name( $config_name ) {
92
-		$this->_config_name = ! empty( $config_name ) ? $config_name : get_called_class();
91
+	public function set_config_name($config_name) {
92
+		$this->_config_name = ! empty($config_name) ? $config_name : get_called_class();
93 93
 	}
94 94
 
95 95
 
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 	 * @param 	EE_Config_Base 	$config_obj
113 113
 	 * @return 	mixed 	EE_Config_Base | NULL
114 114
 	 */
115
-	protected function _set_config( EE_Config_Base $config_obj = NULL ) {
116
-		return EE_Config::instance()->set_config( $this->config_section(), $this->config_name(), $this->config_class(), $config_obj );
115
+	protected function _set_config(EE_Config_Base $config_obj = NULL) {
116
+		return EE_Config::instance()->set_config($this->config_section(), $this->config_name(), $this->config_class(), $config_obj);
117 117
 	}
118 118
 
119 119
 
@@ -127,12 +127,12 @@  discard block
 block discarded – undo
127 127
 	 * @throws \EE_Error
128 128
 	 * @return    mixed    EE_Config_Base | NULL
129 129
 	 */
130
-	public function _update_config( EE_Config_Base $config_obj = NULL ) {
130
+	public function _update_config(EE_Config_Base $config_obj = NULL) {
131 131
 		$config_class = $this->config_class();
132
-		if ( ! $config_obj instanceof $config_class ) {
133
-			throw new EE_Error( sprintf( __( 'The "%1$s" class is not an instance of %2$s.', 'event_espresso' ), print_r( $config_obj, TRUE ), $config_class ));
132
+		if ( ! $config_obj instanceof $config_class) {
133
+			throw new EE_Error(sprintf(__('The "%1$s" class is not an instance of %2$s.', 'event_espresso'), print_r($config_obj, TRUE), $config_class));
134 134
 		}
135
-		return EE_Config::instance()->update_config( $this->config_section(), $this->config_name(), $config_obj );
135
+		return EE_Config::instance()->update_config($this->config_section(), $this->config_name(), $config_obj);
136 136
 	}
137 137
 
138 138
 
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
 	 * @return EE_Config_Base
144 144
 	 */
145 145
 	public function config() {
146
-		if ( empty( $this->_config )) {
147
-			$this->_config = EE_Config::instance()->get_config( $this->config_section(), $this->config_name(), $this->config_class() );
146
+		if (empty($this->_config)) {
147
+			$this->_config = EE_Config::instance()->get_config($this->config_section(), $this->config_name(), $this->config_class());
148 148
 		}
149 149
 		return $this->_config;
150 150
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.