Completed
Branch welcome-vuee (6b92e2)
by
unknown
61:25 queued 50:26
created
admin_pages/venues/Venues_Admin_Page.core.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -944,7 +944,7 @@
 block discarded – undo
944 944
 	 * @access  private
945 945
 	 * @param  int $VNU_ID
946 946
 	 * @param  string $venue_status
947
-	 * @return void
947
+	 * @return boolean
948 948
 	 */
949 949
 	private function _change_venue_status( $VNU_ID = 0, $venue_status = '' ) {
950 950
 		// grab venue id
Please login to merge, or discard this patch.
Braces   +12 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
@@ -893,8 +894,9 @@  discard block
 block discarded – undo
893 894
 		}
894 895
 		$action = $venue_status == 'trash' ? 'moved to the trash' : 'restored from the trash';
895 896
 
896
-		if ( $redirect_after )
897
-			$this->_redirect_after_action($success, 'Venue', $action, array('action' => 'default'));
897
+		if ( $redirect_after ) {
898
+					$this->_redirect_after_action($success, 'Venue', $action, array('action' => 'default'));
899
+		}
898 900
 
899 901
 	}
900 902
 
@@ -1013,8 +1015,9 @@  discard block
 block discarded – undo
1013 1015
 			$msg = __('An error occurred. An venue could not be deleted because a valid venue ID was not not supplied.', 'event_espresso');
1014 1016
 			EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__);
1015 1017
 		}
1016
-		if ( $redirect_after )
1017
-			$this->_redirect_after_action($success, 'Venue', 'deleted', array('action' => 'default'));
1018
+		if ( $redirect_after ) {
1019
+					$this->_redirect_after_action($success, 'Venue', 'deleted', array('action' => 'default'));
1020
+		}
1018 1021
 	}
1019 1022
 
1020 1023
 
@@ -1185,8 +1188,10 @@  discard block
 block discarded – undo
1185 1188
 	 * @return void
1186 1189
 	 */
1187 1190
 	private function _set_category_object() {
1188
-		if ( isset( $this->_category->id ) && !empty( $this->_category->id ) )
1189
-			return; //already have the category object so get out.
1191
+		if ( isset( $this->_category->id ) && !empty( $this->_category->id ) ) {
1192
+					return;
1193
+		}
1194
+		//already have the category object so get out.
1190 1195
 
1191 1196
 		//set default category object
1192 1197
 		$this->_set_empty_category_object();
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1229,11 +1229,11 @@
 block discarded – undo
1229 1229
 	protected function _category_list_table() {
1230 1230
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
1231 1231
 		$this->_admin_page_title .= ' ' . $this->get_action_link_or_button(
1232
-		    'add_category',
1233
-            'add_category',
1234
-            array(),
1235
-            'add-new-h2'
1236
-        );
1232
+			'add_category',
1233
+			'add_category',
1234
+			array(),
1235
+			'add-new-h2'
1236
+		);
1237 1237
 		$this->_search_btn_label = __('Venue Categories', 'event_espresso');
1238 1238
 		$this->display_admin_list_table_page_with_sidebar();
1239 1239
 	}
Please login to merge, or discard this patch.
Spacing   +241 added lines, -241 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 
63 63
 
64 64
 	protected function _init_page_props() {
65
-		require_once( EE_MODELS . 'EEM_Venue.model.php' );
65
+		require_once(EE_MODELS.'EEM_Venue.model.php');
66 66
 		$this->page_slug = EE_VENUES_PG_SLUG;
67 67
 		$this->_admin_base_url = EE_VENUES_ADMIN_URL;
68
-		$this->_admin_base_path = EE_ADMIN_PAGES . 'venues';
68
+		$this->_admin_base_path = EE_ADMIN_PAGES.'venues';
69 69
 		$this->page_label = __('Event Venues', 'event_espresso');
70 70
 		$this->_cpt_model_names = array(
71 71
 			'create_new' => 'EEM_Venue',
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 				'edit' => __('Update Venue', 'event_espresso'),
109 109
 				'add_category' => __('Save New Category', 'event_espresso'),
110 110
 				'edit_category' => __('Update Category', 'event_espresso'),
111
-				'google_map_settings' => __( 'Update Settings', 'event_espresso' )
111
+				'google_map_settings' => __('Update Settings', 'event_espresso')
112 112
 				)
113 113
 		);
114 114
 	}
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
 		//load field generator helper
124 124
 
125 125
 		//is there a vnu_id in the request?
126
-		$vnu_id = ! empty( $this->_req_data['VNU_ID'] ) && ! is_array( $this->_req_data['VNU_ID'] ) ? $this->_req_data['VNU_ID'] : 0;
127
-		$vnu_id = ! empty( $this->_req_data['post'] ) ? $this->_req_data['post'] : $vnu_id;
126
+		$vnu_id = ! empty($this->_req_data['VNU_ID']) && ! is_array($this->_req_data['VNU_ID']) ? $this->_req_data['VNU_ID'] : 0;
127
+		$vnu_id = ! empty($this->_req_data['post']) ? $this->_req_data['post'] : $vnu_id;
128 128
 
129 129
 		$this->_page_routes = array(
130 130
 			'default' => array(
@@ -142,27 +142,27 @@  discard block
 block discarded – undo
142 142
 				),
143 143
 			'trash_venue' => array(
144 144
 				'func' => '_trash_or_restore_venue',
145
-				'args' => array( 'venue_status' => 'trash' ),
145
+				'args' => array('venue_status' => 'trash'),
146 146
 				'noheader' => TRUE,
147 147
 				'capability' => 'ee_delete_venue',
148 148
 				'obj_id' => $vnu_id
149 149
 				),
150 150
 			'trash_venues' => array(
151 151
 				'func' => '_trash_or_restore_venues',
152
-				'args' => array( 'venue_status' => 'trash' ),
152
+				'args' => array('venue_status' => 'trash'),
153 153
 				'noheader' => TRUE,
154 154
 				'capability' => 'ee_delete_venues'
155 155
 				),
156 156
 			'restore_venue' => array(
157 157
 				'func' => '_trash_or_restore_venue',
158
-				'args' => array( 'venue_status' => 'draft' ),
158
+				'args' => array('venue_status' => 'draft'),
159 159
 				'noheader' => TRUE,
160 160
 				'capability' => 'ee_delete_venue',
161 161
 				'obj_id' => $vnu_id
162 162
 				),
163 163
 			'restore_venues' => array(
164 164
 				'func' => '_trash_or_restore_venues',
165
-				'args' => array( 'venue_status' => 'draft' ),
165
+				'args' => array('venue_status' => 'draft'),
166 166
 				'noheader' => TRUE,
167 167
 				'capability' => 'ee_delete_venues'
168 168
 				),
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 						'filename' => 'venues_overview_views_bulk_actions_search'
265 265
 					)
266 266
 				),
267
-				'help_tour' => array( 'Venues_Overview_Help_Tour' ),
267
+				'help_tour' => array('Venues_Overview_Help_Tour'),
268 268
 				'metaboxes' => array('_espresso_news_post_box', '_espresso_links_post_box'),
269 269
 				'require_nonce' => FALSE
270 270
 			),
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 						'filename' => 'venues_editor_other'
301 301
 					)
302 302
 				),
303
-				'help_tour' => array( 'Venues_Add_Venue_Help_Tour' ),
303
+				'help_tour' => array('Venues_Add_Venue_Help_Tour'),
304 304
 				'metaboxes' => array('_venue_editor_metaboxes'),
305 305
 				'require_nonce' => FALSE
306 306
 				),
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 					'label' => __('Edit Venue', 'event_espresso'),
310 310
 					'order' => 5,
311 311
 					'persistent' => FALSE,
312
-					'url' => isset($this->_req_data['post']) ? add_query_arg(array('post' => $this->_req_data['post'] ), $this->_current_page_view_url )  : $this->_admin_base_url
312
+					'url' => isset($this->_req_data['post']) ? add_query_arg(array('post' => $this->_req_data['post']), $this->_current_page_view_url) : $this->_admin_base_url
313 313
 				),
314 314
 				'help_tabs' => array(
315 315
 					'venues_editor_help_tab' => array(
@@ -343,17 +343,17 @@  discard block
 block discarded – undo
343 343
 			),
344 344
 			'google_map_settings' => array(
345 345
 				'nav' => array(
346
-					'label' => esc_html__('Google Maps', 'event_espresso' ),
346
+					'label' => esc_html__('Google Maps', 'event_espresso'),
347 347
 					'order' => 40
348 348
 				),
349
-				'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array('_publish_post_box' ) ),
349
+				'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')),
350 350
 				'help_tabs' => array(
351 351
 					'general_settings_google_maps_help_tab' => array(
352 352
 						'title' => __('Google Maps', 'event_espresso'),
353 353
 						'filename' => 'general_settings_google_maps'
354 354
 					)
355 355
 				),
356
-				'help_tour' => array( 'Google_Maps_Help_Tour' ),
356
+				'help_tour' => array('Google_Maps_Help_Tour'),
357 357
 				'require_nonce' => FALSE
358 358
 			),
359 359
 			//venue category stuff
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 						'filename' => 'venues_add_category'
370 370
 					)
371 371
 				),
372
-				'help_tour' => array( 'Venues_Add_Category_Help_Tour' ),
372
+				'help_tour' => array('Venues_Add_Category_Help_Tour'),
373 373
 				'require_nonce' => FALSE
374 374
 				),
375 375
 			'edit_category' => array(
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 					'label' => __('Edit Category', 'event_espresso'),
378 378
 					'order' => 15,
379 379
 					'persistent' => FALSE,
380
-					'url' => isset($this->_req_data['EVT_CAT_ID']) ? add_query_arg(array('EVT_CAT_ID' => $this->_req_data['EVT_CAT_ID'] ), $this->_current_page_view_url )  : $this->_admin_base_url
380
+					'url' => isset($this->_req_data['EVT_CAT_ID']) ? add_query_arg(array('EVT_CAT_ID' => $this->_req_data['EVT_CAT_ID']), $this->_current_page_view_url) : $this->_admin_base_url
381 381
 					),
382 382
 				'metaboxes' => array('_publish_post_box'),
383 383
 				'help_tabs' => array(
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 						'filename' => 'venues_categories_other'
414 414
 					)
415 415
 				),
416
-				'help_tour' => array( 'Venues_Categories_Help_Tour' ),
416
+				'help_tour' => array('Venues_Categories_Help_Tour'),
417 417
 				'metaboxes' => $this->_default_espresso_metaboxes,
418 418
 				'require_nonce' => FALSE
419 419
 				)
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 
471 471
 
472 472
 	public function load_scripts_styles() {
473
-		wp_register_style('ee-cat-admin', EVENTS_ASSETS_URL . 'ee-cat-admin.css', array(), EVENT_ESPRESSO_VERSION );
473
+		wp_register_style('ee-cat-admin', EVENTS_ASSETS_URL.'ee-cat-admin.css', array(), EVENT_ESPRESSO_VERSION);
474 474
 		wp_enqueue_style('ee-cat-admin');
475 475
 	}
476 476
 
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 	public function load_scripts_styles_edit() {
494 494
 		//styles
495 495
 		wp_enqueue_style('espresso-ui-theme');
496
-		wp_register_style( 'espresso_venues', EE_VENUES_ASSETS_URL . 'ee-venues-admin.css', array(), EVENT_ESPRESSO_VERSION );
496
+		wp_register_style('espresso_venues', EE_VENUES_ASSETS_URL.'ee-venues-admin.css', array(), EVENT_ESPRESSO_VERSION);
497 497
 		wp_enqueue_style('espresso_venues');
498 498
 	}
499 499
 
@@ -512,13 +512,13 @@  discard block
 block discarded – undo
512 512
 				)
513 513
 		);
514 514
 
515
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venues', 'espresso_venues_trash_venues' ) ) {
515
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venues', 'espresso_venues_trash_venues')) {
516 516
 			$this->_views['all']['bulk_action'] = array(
517 517
 				'trash_venues' => __('Move to Trash', 'event_espresso')
518 518
 			);
519 519
 			$this->_views['trash'] = array(
520 520
 				'slug' => 'trash',
521
-				'label' => __( 'Trash', 'event_espresso' ),
521
+				'label' => __('Trash', 'event_espresso'),
522 522
 				'count' => 0,
523 523
 				'bulk_action' => array(
524 524
 					'restore_venues' => __('Restore from Trash', 'event_espresso'),
@@ -551,9 +551,9 @@  discard block
 block discarded – undo
551 551
 
552 552
 
553 553
 	protected function _overview_list_table() {
554
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
555
-		$this->_template_args['after_list_table'] = EEH_Template::get_button_or_link( get_post_type_archive_link('espresso_venues'), __("View Venue Archive Page", "event_espresso"), 'button' );
556
-		$this->_admin_page_title .= ' ' . $this->get_action_link_or_button('create_new', 'add', array(), 'add-new-h2');
554
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
555
+		$this->_template_args['after_list_table'] = EEH_Template::get_button_or_link(get_post_type_archive_link('espresso_venues'), __("View Venue Archive Page", "event_espresso"), 'button');
556
+		$this->_admin_page_title .= ' '.$this->get_action_link_or_button('create_new', 'add', array(), 'add-new-h2');
557 557
 		$this->_search_btn_label = __('Venues', 'event_espresso');
558 558
 		$this->display_admin_list_table_page_with_sidebar();
559 559
 	}
@@ -566,8 +566,8 @@  discard block
 block discarded – undo
566 566
 			'vnu_url' => $this->_cpt_model_obj->venue_url(),
567 567
 			'vnu_phone' => $this->_cpt_model_obj->phone()
568 568
 			);
569
-		$template = EE_VENUES_TEMPLATE_PATH . 'venue_publish_box_extras.template.php';
570
-		EEH_Template::display_template( $template, $extra_rows );
569
+		$template = EE_VENUES_TEMPLATE_PATH.'venue_publish_box_extras.template.php';
570
+		EEH_Template::display_template($template, $extra_rows);
571 571
 	}
572 572
 
573 573
 
@@ -583,31 +583,31 @@  discard block
 block discarded – undo
583 583
 		$default_map_settings->use_google_maps = TRUE;
584 584
 		$default_map_settings->google_map_api_key = '';
585 585
 		// for event details pages (reg page)
586
-		$default_map_settings->event_details_map_width = 585; 			// ee_map_width_single
587
-		$default_map_settings->event_details_map_height = 362; 			// ee_map_height_single
588
-		$default_map_settings->event_details_map_zoom = 14; 			// ee_map_zoom_single
589
-		$default_map_settings->event_details_display_nav = TRUE; 			// ee_map_nav_display_single
590
-		$default_map_settings->event_details_nav_size = FALSE; 			// ee_map_nav_size_single
591
-		$default_map_settings->event_details_control_type = 'default'; 		// ee_map_type_control_single
592
-		$default_map_settings->event_details_map_align = 'center'; 			// ee_map_align_single
586
+		$default_map_settings->event_details_map_width = 585; // ee_map_width_single
587
+		$default_map_settings->event_details_map_height = 362; // ee_map_height_single
588
+		$default_map_settings->event_details_map_zoom = 14; // ee_map_zoom_single
589
+		$default_map_settings->event_details_display_nav = TRUE; // ee_map_nav_display_single
590
+		$default_map_settings->event_details_nav_size = FALSE; // ee_map_nav_size_single
591
+		$default_map_settings->event_details_control_type = 'default'; // ee_map_type_control_single
592
+		$default_map_settings->event_details_map_align = 'center'; // ee_map_align_single
593 593
 		// for event list pages
594
-		$default_map_settings->event_list_map_width = 300; 			// ee_map_width
595
-		$default_map_settings->event_list_map_height = 185; 		// ee_map_height
596
-		$default_map_settings->event_list_map_zoom = 12; 			// ee_map_zoom
597
-		$default_map_settings->event_list_display_nav = FALSE; 		// ee_map_nav_display
598
-		$default_map_settings->event_list_nav_size = TRUE; 			// ee_map_nav_size
599
-		$default_map_settings->event_list_control_type = 'dropdown'; 		// ee_map_type_control
600
-		$default_map_settings->event_list_map_align = 'center'; 			// ee_map_align
594
+		$default_map_settings->event_list_map_width = 300; // ee_map_width
595
+		$default_map_settings->event_list_map_height = 185; // ee_map_height
596
+		$default_map_settings->event_list_map_zoom = 12; // ee_map_zoom
597
+		$default_map_settings->event_list_display_nav = FALSE; // ee_map_nav_display
598
+		$default_map_settings->event_list_nav_size = TRUE; // ee_map_nav_size
599
+		$default_map_settings->event_list_control_type = 'dropdown'; // ee_map_type_control
600
+		$default_map_settings->event_list_map_align = 'center'; // ee_map_align
601 601
 
602 602
 		$this->_template_args['map_settings'] =
603
-			isset( EE_Registry::instance()->CFG->map_settings ) && ! empty( EE_Registry::instance()->CFG->map_settings )
604
-				? (object)array_merge( (array)$default_map_settings, (array)EE_Registry::instance()->CFG->map_settings )
603
+			isset(EE_Registry::instance()->CFG->map_settings) && ! empty(EE_Registry::instance()->CFG->map_settings)
604
+				? (object) array_merge((array) $default_map_settings, (array) EE_Registry::instance()->CFG->map_settings)
605 605
 				: $default_map_settings;
606 606
 
607
-		$this->_set_add_edit_form_tags( 'update_google_map_settings' );
608
-		$this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE );
607
+		$this->_set_add_edit_form_tags('update_google_map_settings');
608
+		$this->_set_publish_post_box_vars(NULL, FALSE, FALSE, NULL, FALSE);
609 609
 		$this->_template_args['admin_page_content'] = EEH_Template::display_template(
610
-			EE_VENUES_TEMPLATE_PATH . 'google_map.template.php',
610
+			EE_VENUES_TEMPLATE_PATH.'google_map.template.php',
611 611
 			$this->_template_args,
612 612
 			true
613 613
 		);
@@ -617,83 +617,83 @@  discard block
 block discarded – undo
617 617
 	protected function _update_google_map_settings() {
618 618
 
619 619
 		EE_Registry::instance()->CFG->map_settings->use_google_maps =
620
-			isset( $this->_req_data['use_google_maps'] )
621
-				? absint( $this->_req_data['use_google_maps'] )
620
+			isset($this->_req_data['use_google_maps'])
621
+				? absint($this->_req_data['use_google_maps'])
622 622
 				: EE_Registry::instance()->CFG->map_settings->use_google_maps;
623 623
 
624 624
 		EE_Registry::instance()->CFG->map_settings->google_map_api_key =
625
-			isset( $this->_req_data['google_map_api_key'] )
626
-				? sanitize_text_field( $this->_req_data['google_map_api_key'] )
625
+			isset($this->_req_data['google_map_api_key'])
626
+				? sanitize_text_field($this->_req_data['google_map_api_key'])
627 627
 				: EE_Registry::instance()->CFG->map_settings->google_map_api_key;
628 628
 
629 629
 		EE_Registry::instance()->CFG->map_settings->event_details_map_width =
630
-			isset( $this->_req_data['event_details_map_width'] )
631
-				? absint( $this->_req_data['event_details_map_width'] )
630
+			isset($this->_req_data['event_details_map_width'])
631
+				? absint($this->_req_data['event_details_map_width'])
632 632
 				: EE_Registry::instance()->CFG->map_settings->event_details_map_width;
633 633
 
634 634
 		EE_Registry::instance()->CFG->map_settings->event_details_map_height =
635
-			isset( $this->_req_data['event_details_map_height'] )
636
-				? absint( $this->_req_data['event_details_map_height'] )
635
+			isset($this->_req_data['event_details_map_height'])
636
+				? absint($this->_req_data['event_details_map_height'])
637 637
 				: EE_Registry::instance()->CFG->map_settings->event_details_map_height;
638 638
 
639 639
 		EE_Registry::instance()->CFG->map_settings->event_details_map_zoom =
640
-			isset( $this->_req_data['event_details_map_zoom'] )
641
-				? absint( $this->_req_data['event_details_map_zoom'] )
640
+			isset($this->_req_data['event_details_map_zoom'])
641
+				? absint($this->_req_data['event_details_map_zoom'])
642 642
 				: EE_Registry::instance()->CFG->map_settings->event_details_map_zoom;
643 643
 
644 644
 		EE_Registry::instance()->CFG->map_settings->event_details_display_nav =
645
-			isset( $this->_req_data['event_details_display_nav'] )
646
-				? absint( $this->_req_data['event_details_display_nav'] )
645
+			isset($this->_req_data['event_details_display_nav'])
646
+				? absint($this->_req_data['event_details_display_nav'])
647 647
 				: EE_Registry::instance()->CFG->map_settings->event_details_display_nav;
648 648
 
649 649
 		EE_Registry::instance()->CFG->map_settings->event_details_nav_size =
650
-			isset( $this->_req_data['event_details_nav_size'] )
651
-				? absint( $this->_req_data['event_details_nav_size'] )
650
+			isset($this->_req_data['event_details_nav_size'])
651
+				? absint($this->_req_data['event_details_nav_size'])
652 652
 				: EE_Registry::instance()->CFG->map_settings->event_details_nav_size;
653 653
 
654 654
 		EE_Registry::instance()->CFG->map_settings->event_details_control_type =
655
-			isset( $this->_req_data['event_details_control_type'] )
656
-				? sanitize_text_field( $this->_req_data['event_details_control_type'] )
655
+			isset($this->_req_data['event_details_control_type'])
656
+				? sanitize_text_field($this->_req_data['event_details_control_type'])
657 657
 				: EE_Registry::instance()->CFG->map_settings->event_details_control_type;
658 658
 
659 659
 		EE_Registry::instance()->CFG->map_settings->event_details_map_align =
660
-			isset( $this->_req_data['event_details_map_align'] )
661
-				? sanitize_text_field( $this->_req_data['event_details_map_align'] )
660
+			isset($this->_req_data['event_details_map_align'])
661
+				? sanitize_text_field($this->_req_data['event_details_map_align'])
662 662
 				: EE_Registry::instance()->CFG->map_settings->event_details_map_align;
663 663
 
664 664
 		EE_Registry::instance()->CFG->map_settings->event_list_map_width =
665
-			isset( $this->_req_data['event_list_map_width'] )
666
-				? absint( $this->_req_data['event_list_map_width'] )
665
+			isset($this->_req_data['event_list_map_width'])
666
+				? absint($this->_req_data['event_list_map_width'])
667 667
 				: EE_Registry::instance()->CFG->map_settings->event_list_map_width;
668 668
 
669 669
 		EE_Registry::instance()->CFG->map_settings->event_list_map_height =
670
-			isset( $this->_req_data['event_list_map_height'] )
671
-				? absint( $this->_req_data['event_list_map_height'] )
670
+			isset($this->_req_data['event_list_map_height'])
671
+				? absint($this->_req_data['event_list_map_height'])
672 672
 				: EE_Registry::instance()->CFG->map_settings->event_list_map_height;
673 673
 
674 674
 		EE_Registry::instance()->CFG->map_settings->event_list_map_zoom =
675
-			isset( $this->_req_data['event_list_map_zoom'] )
676
-				? absint( $this->_req_data['event_list_map_zoom'] )
675
+			isset($this->_req_data['event_list_map_zoom'])
676
+				? absint($this->_req_data['event_list_map_zoom'])
677 677
 				: EE_Registry::instance()->CFG->map_settings->event_list_map_zoom;
678 678
 
679 679
 		EE_Registry::instance()->CFG->map_settings->event_list_display_nav =
680
-			isset( $this->_req_data['event_list_display_nav'] )
681
-				? absint( $this->_req_data['event_list_display_nav'] )
680
+			isset($this->_req_data['event_list_display_nav'])
681
+				? absint($this->_req_data['event_list_display_nav'])
682 682
 				: EE_Registry::instance()->CFG->map_settings->event_list_display_nav;
683 683
 
684 684
 		EE_Registry::instance()->CFG->map_settings->event_list_nav_size =
685
-			isset( $this->_req_data['event_list_nav_size'] )
686
-				? absint( $this->_req_data['event_list_nav_size'] )
685
+			isset($this->_req_data['event_list_nav_size'])
686
+				? absint($this->_req_data['event_list_nav_size'])
687 687
 				: EE_Registry::instance()->CFG->map_settings->event_list_nav_size;
688 688
 
689 689
 		EE_Registry::instance()->CFG->map_settings->event_list_control_type =
690
-			isset( $this->_req_data['event_list_control_type'] )
691
-				? sanitize_text_field( $this->_req_data['event_list_control_type'] )
690
+			isset($this->_req_data['event_list_control_type'])
691
+				? sanitize_text_field($this->_req_data['event_list_control_type'])
692 692
 				: EE_Registry::instance()->CFG->map_settings->event_list_control_type;
693 693
 
694 694
 		EE_Registry::instance()->CFG->map_settings->event_list_map_align =
695
-			isset( $this->_req_data['event_list_map_align'] )
696
-				? sanitize_text_field( $this->_req_data['event_list_map_align'] )
695
+			isset($this->_req_data['event_list_map_align'])
696
+				? sanitize_text_field($this->_req_data['event_list_map_align'])
697 697
 				: EE_Registry::instance()->CFG->map_settings->event_list_map_align;
698 698
 
699 699
 		EE_Registry::instance()->CFG->map_settings = apply_filters(
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
 			EE_Registry::instance()->CFG->map_settings,
708 708
 			__FILE__, __FUNCTION__, __LINE__
709 709
 		);
710
-		$this->_redirect_after_action( $success, $what, 'updated', array( 'action' => 'google_map_settings' ) );
710
+		$this->_redirect_after_action($success, $what, 'updated', array('action' => 'google_map_settings'));
711 711
 
712 712
 	}
713 713
 
@@ -716,9 +716,9 @@  discard block
 block discarded – undo
716 716
 	protected function _venue_editor_metaboxes() {
717 717
 		$this->verify_cpt_object();
718 718
 
719
-		add_meta_box( 'espresso_venue_address_options', __('Physical Location', 'event_espresso'), array( $this, 'venue_address_metabox'), $this->page_slug, 'side', 'default' );
720
-		add_meta_box( 'espresso_venue_gmap_options', __('Google Map', 'event_espresso'), array( $this, 'venue_gmap_metabox'), $this->page_slug, 'side', 'default' );
721
-		add_meta_box( 'espresso_venue_virtual_loc_options', __('Virtual Location', 'event_espresso'), array( $this, 'venue_virtual_loc_metabox'), $this->page_slug, 'side', 'default' );
719
+		add_meta_box('espresso_venue_address_options', __('Physical Location', 'event_espresso'), array($this, 'venue_address_metabox'), $this->page_slug, 'side', 'default');
720
+		add_meta_box('espresso_venue_gmap_options', __('Google Map', 'event_espresso'), array($this, 'venue_gmap_metabox'), $this->page_slug, 'side', 'default');
721
+		add_meta_box('espresso_venue_virtual_loc_options', __('Virtual Location', 'event_espresso'), array($this, 'venue_virtual_loc_metabox'), $this->page_slug, 'side', 'default');
722 722
 
723 723
 	}
724 724
 
@@ -726,23 +726,23 @@  discard block
 block discarded – undo
726 726
 
727 727
 	public function venue_gmap_metabox() {
728 728
 		$template_args = array(
729
-			'vnu_enable_for_gmap' => EEH_Form_Fields::select_input('vnu_enable_for_gmap', $this->get_yes_no_values(), $this->_cpt_model_obj->enable_for_gmap() ),
729
+			'vnu_enable_for_gmap' => EEH_Form_Fields::select_input('vnu_enable_for_gmap', $this->get_yes_no_values(), $this->_cpt_model_obj->enable_for_gmap()),
730 730
 			'vnu_google_map_link' => $this->_cpt_model_obj->google_map_link(),
731 731
 			);
732
-		$template = EE_VENUES_TEMPLATE_PATH . 'venue_gmap_metabox_content.template.php';
733
-		EEH_Template::display_template( $template, $template_args );
732
+		$template = EE_VENUES_TEMPLATE_PATH.'venue_gmap_metabox_content.template.php';
733
+		EEH_Template::display_template($template, $template_args);
734 734
 	}
735 735
 
736 736
 
737 737
 
738 738
 	public function venue_address_metabox() {
739 739
 
740
-		$template_args['_venue'] =$this->_cpt_model_obj;
740
+		$template_args['_venue'] = $this->_cpt_model_obj;
741 741
 
742 742
 		$template_args['states_dropdown'] = EEH_Form_Fields::generate_form_input(
743 743
 			$QFI = new EE_Question_Form_Input(
744
-				EE_Question::new_instance( array( 'QST_display_text' => esc_html__( 'State', 'event_espresso' ), 'QST_system' => 'state' )),
745
-				EE_Answer::new_instance( array(  'ANS_value'=> $this->_cpt_model_obj->state_ID() )),
744
+				EE_Question::new_instance(array('QST_display_text' => esc_html__('State', 'event_espresso'), 'QST_system' => 'state')),
745
+				EE_Answer::new_instance(array('ANS_value'=> $this->_cpt_model_obj->state_ID())),
746 746
 				array(
747 747
 					'input_name' =>  'sta_id',
748 748
 					'input_id' => 'sta_id',
@@ -754,8 +754,8 @@  discard block
 block discarded – undo
754 754
 		);
755 755
 		$template_args['countries_dropdown'] = EEH_Form_Fields::generate_form_input(
756 756
 			$QFI = new EE_Question_Form_Input(
757
-				EE_Question::new_instance( array( 'QST_display_text' => esc_html__( 'Country', 'event_espresso' ), 'QST_system' => 'country' )),
758
-				EE_Answer::new_instance( array(  'ANS_value'=> $this->_cpt_model_obj->country_ID() )),
757
+				EE_Question::new_instance(array('QST_display_text' => esc_html__('Country', 'event_espresso'), 'QST_system' => 'country')),
758
+				EE_Answer::new_instance(array('ANS_value'=> $this->_cpt_model_obj->country_ID())),
759 759
 				array(
760 760
 					'input_name' =>  'cnt_iso',
761 761
 					'input_id' => 'cnt_iso',
@@ -766,8 +766,8 @@  discard block
 block discarded – undo
766 766
 			)
767 767
 		);
768 768
 
769
-		$template = EE_VENUES_TEMPLATE_PATH . 'venue_address_metabox_content.template.php';
770
-		EEH_Template::display_template( $template, $template_args );
769
+		$template = EE_VENUES_TEMPLATE_PATH.'venue_address_metabox_content.template.php';
770
+		EEH_Template::display_template($template, $template_args);
771 771
 	}
772 772
 
773 773
 
@@ -779,8 +779,8 @@  discard block
 block discarded – undo
779 779
 		$template_args = array(
780 780
 			'_venue' => $this->_cpt_model_obj
781 781
 			);
782
-		$template = EE_VENUES_TEMPLATE_PATH . 'venue_virtual_location_metabox_content.template.php';
783
-		EEH_Template::display_template( $template, $template_args );
782
+		$template = EE_VENUES_TEMPLATE_PATH.'venue_virtual_location_metabox_content.template.php';
783
+		EEH_Template::display_template($template, $template_args);
784 784
 	}
785 785
 
786 786
 
@@ -803,52 +803,52 @@  discard block
 block discarded – undo
803 803
 	 * @param  object $post    Post object (with "blessed" WP properties)
804 804
 	 * @return void
805 805
 	 */
806
-	protected function _insert_update_cpt_item( $post_id, $post ) {
806
+	protected function _insert_update_cpt_item($post_id, $post) {
807 807
 
808
-		if ( $post instanceof WP_Post && $post->post_type !== 'espresso_venues' ) {
809
-			return;// get out we're not processing the saving of venues.
808
+		if ($post instanceof WP_Post && $post->post_type !== 'espresso_venues') {
809
+			return; // get out we're not processing the saving of venues.
810 810
 		}
811 811
 
812
-		$wheres = array( $this->_venue_model->primary_key_name() => $post_id );
812
+		$wheres = array($this->_venue_model->primary_key_name() => $post_id);
813 813
 
814 814
 		$venue_values = array(
815
-			'VNU_address' => !empty( $this->_req_data['vnu_address'] ) ? $this->_req_data['vnu_address'] : NULL,
816
-			'VNU_address2' => !empty( $this->_req_data['vnu_address2'] ) ? $this->_req_data['vnu_address2'] : NULL,
817
-			'VNU_city' => !empty( $this->_req_data['vnu_city'] ) ? $this->_req_data['vnu_city'] : NULL,
818
-			'STA_ID' => !empty( $this->_req_data['sta_id'] ) ? $this->_req_data['sta_id'] : NULL,
819
-			'CNT_ISO' => !empty( $this->_req_data['cnt_iso'] ) ? $this->_req_data['cnt_iso'] : NULL,
820
-			'VNU_zip' => !empty( $this->_req_data['vnu_zip'] ) ? $this->_req_data['vnu_zip'] : NULL,
821
-			'VNU_phone' => !empty( $this->_req_data['vnu_phone'] ) ? $this->_req_data['vnu_phone'] : NULL,
822
-			'VNU_capacity' => !empty( $this->_req_data['vnu_capacity'] ) ? str_replace( ',', '', $this->_req_data['vnu_capacity'] ) : EE_INF,
823
-			'VNU_url' => !empty( $this->_req_data['vnu_url'] ) ? $this->_req_data['vnu_url'] : NULL,
824
-			'VNU_virtual_phone' => !empty( $this->_req_data['vnu_virtual_phone'] ) ? $this->_req_data['vnu_virtual_phone'] : NULL,
825
-			'VNU_virtual_url' => !empty( $this->_req_data['vnu_virtual_url'] ) ? $this->_req_data['vnu_virtual_url'] : NULL,
826
-			'VNU_enable_for_gmap' => !empty( $this->_req_data['vnu_enable_for_gmap'] ) ? TRUE : FALSE,
827
-			'VNU_google_map_link' => !empty( $this->_req_data['vnu_google_map_link'] ) ? $this->_req_data['vnu_google_map_link'] : NULL
815
+			'VNU_address' => ! empty($this->_req_data['vnu_address']) ? $this->_req_data['vnu_address'] : NULL,
816
+			'VNU_address2' => ! empty($this->_req_data['vnu_address2']) ? $this->_req_data['vnu_address2'] : NULL,
817
+			'VNU_city' => ! empty($this->_req_data['vnu_city']) ? $this->_req_data['vnu_city'] : NULL,
818
+			'STA_ID' => ! empty($this->_req_data['sta_id']) ? $this->_req_data['sta_id'] : NULL,
819
+			'CNT_ISO' => ! empty($this->_req_data['cnt_iso']) ? $this->_req_data['cnt_iso'] : NULL,
820
+			'VNU_zip' => ! empty($this->_req_data['vnu_zip']) ? $this->_req_data['vnu_zip'] : NULL,
821
+			'VNU_phone' => ! empty($this->_req_data['vnu_phone']) ? $this->_req_data['vnu_phone'] : NULL,
822
+			'VNU_capacity' => ! empty($this->_req_data['vnu_capacity']) ? str_replace(',', '', $this->_req_data['vnu_capacity']) : EE_INF,
823
+			'VNU_url' => ! empty($this->_req_data['vnu_url']) ? $this->_req_data['vnu_url'] : NULL,
824
+			'VNU_virtual_phone' => ! empty($this->_req_data['vnu_virtual_phone']) ? $this->_req_data['vnu_virtual_phone'] : NULL,
825
+			'VNU_virtual_url' => ! empty($this->_req_data['vnu_virtual_url']) ? $this->_req_data['vnu_virtual_url'] : NULL,
826
+			'VNU_enable_for_gmap' => ! empty($this->_req_data['vnu_enable_for_gmap']) ? TRUE : FALSE,
827
+			'VNU_google_map_link' => ! empty($this->_req_data['vnu_google_map_link']) ? $this->_req_data['vnu_google_map_link'] : NULL
828 828
 			);
829 829
 
830 830
 		//update venue
831
-		$success = $this->_venue_model->update( $venue_values, array( $wheres ) );
831
+		$success = $this->_venue_model->update($venue_values, array($wheres));
832 832
 
833 833
 		//get venue_object for other metaboxes that might be added via the filter... though it would seem to make sense to just use $this->_venue_model->get_one_by_ID( $post_id ).. i have to setup where conditions to override the filters in the model that filter out autodraft and inherit statuses so we GET the inherit id!
834
-		$get_one_where = array( $this->_venue_model->primary_key_name() => $post_id, 'status' => $post->post_status  );
835
-		$venue = $this->_venue_model->get_one( array( $get_one_where ) );
834
+		$get_one_where = array($this->_venue_model->primary_key_name() => $post_id, 'status' => $post->post_status);
835
+		$venue = $this->_venue_model->get_one(array($get_one_where));
836 836
 
837 837
 		//notice we've applied a filter for venue metabox callbacks but we don't actually have any default venue metaboxes in use.  So this is just here for addons to more easily hook into venue saves.
838
-		$venue_update_callbacks = apply_filters( 'FHEE__Venues_Admin_Page___insert_update_cpt_item__venue_update_callbacks', array() );
838
+		$venue_update_callbacks = apply_filters('FHEE__Venues_Admin_Page___insert_update_cpt_item__venue_update_callbacks', array());
839 839
 
840 840
 		$att_success = TRUE;
841 841
 
842
-		foreach ( $venue_update_callbacks as $v_callback ) {
843
-			$_succ = call_user_func_array( $v_callback, array( $venue,  $this->_req_data ) );
844
-			$att_success = !$att_success ? $att_success : $_succ; //if ANY of these updates fail then we want the appropriate global error message
842
+		foreach ($venue_update_callbacks as $v_callback) {
843
+			$_succ = call_user_func_array($v_callback, array($venue, $this->_req_data));
844
+			$att_success = ! $att_success ? $att_success : $_succ; //if ANY of these updates fail then we want the appropriate global error message
845 845
 		}
846 846
 
847 847
 		//any errors?
848
-		if ( $success && !$att_success ) {
849
-			EE_Error::add_error( __('Venue Details saved successfully but something went wrong with saving attachments.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
850
-		} else if ( $success === FALSE ) {
851
-			EE_Error::add_error( __('Venue Details did not save successfully.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
848
+		if ($success && ! $att_success) {
849
+			EE_Error::add_error(__('Venue Details saved successfully but something went wrong with saving attachments.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
850
+		} else if ($success === FALSE) {
851
+			EE_Error::add_error(__('Venue Details did not save successfully.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
852 852
 		}
853 853
 	}
854 854
 
@@ -856,9 +856,9 @@  discard block
 block discarded – undo
856 856
 
857 857
 
858 858
 
859
-	public function trash_cpt_item( $post_id ) {
859
+	public function trash_cpt_item($post_id) {
860 860
 		$this->_req_data['VNU_ID'] = $post_id;
861
-		$this->_trash_or_restore_venue( 'trash', FALSE );
861
+		$this->_trash_or_restore_venue('trash', FALSE);
862 862
 	}
863 863
 
864 864
 
@@ -866,18 +866,18 @@  discard block
 block discarded – undo
866 866
 
867 867
 
868 868
 
869
-	public function restore_cpt_item( $post_id ) {
869
+	public function restore_cpt_item($post_id) {
870 870
 		$this->_req_data['VNU_ID'] = $post_id;
871
-		$this->_trash_or_restore_venue( 'draft', FALSE );
871
+		$this->_trash_or_restore_venue('draft', FALSE);
872 872
 	}
873 873
 
874 874
 
875 875
 
876 876
 
877 877
 
878
-	public function delete_cpt_item( $post_id ) {
878
+	public function delete_cpt_item($post_id) {
879 879
 		$this->_req_data['VNU_ID'] = $post_id;
880
-		$this->_delete_venue( FALSE );
880
+		$this->_delete_venue(FALSE);
881 881
 	}
882 882
 
883 883
 
@@ -892,15 +892,15 @@  discard block
 block discarded – undo
892 892
 
893 893
 
894 894
 
895
-	protected function _trash_or_restore_venue( $venue_status = 'trash', $redirect_after = TRUE ) {
896
-		$VNU_ID = isset( $this->_req_data['VNU_ID'] ) ? absint( $this->_req_data['VNU_ID'] ) : FALSE;
895
+	protected function _trash_or_restore_venue($venue_status = 'trash', $redirect_after = TRUE) {
896
+		$VNU_ID = isset($this->_req_data['VNU_ID']) ? absint($this->_req_data['VNU_ID']) : FALSE;
897 897
 
898 898
 		//loop thru venues
899
-		if ( $VNU_ID ) {
899
+		if ($VNU_ID) {
900 900
 			//clean status
901
-			$venue_status = sanitize_key( $venue_status );
901
+			$venue_status = sanitize_key($venue_status);
902 902
 			// grab status
903
-			if (!empty($venue_status)) {
903
+			if ( ! empty($venue_status)) {
904 904
 				$success = $this->_change_venue_status($VNU_ID, $venue_status);
905 905
 			} else {
906 906
 				$success = FALSE;
@@ -914,7 +914,7 @@  discard block
 block discarded – undo
914 914
 		}
915 915
 		$action = $venue_status == 'trash' ? 'moved to the trash' : 'restored from the trash';
916 916
 
917
-		if ( $redirect_after )
917
+		if ($redirect_after)
918 918
 			$this->_redirect_after_action($success, 'Venue', $action, array('action' => 'default'));
919 919
 
920 920
 	}
@@ -923,11 +923,11 @@  discard block
 block discarded – undo
923 923
 
924 924
 
925 925
 
926
-	protected function _trash_or_restore_venues( $venue_status = 'trash' ) {
926
+	protected function _trash_or_restore_venues($venue_status = 'trash') {
927 927
 		// clean status
928 928
 		$venue_status = sanitize_key($venue_status);
929 929
 		// grab status
930
-		if (!empty($venue_status)) {
930
+		if ( ! empty($venue_status)) {
931 931
 			$success = TRUE;
932 932
 			//determine the event id and set to array.
933 933
 			$VNU_IDs = isset($this->_req_data['venue_id']) ? (array) $this->_req_data['venue_id'] : array();
@@ -967,20 +967,20 @@  discard block
 block discarded – undo
967 967
 	 * @param  string $venue_status
968 968
 	 * @return void
969 969
 	 */
970
-	private function _change_venue_status( $VNU_ID = 0, $venue_status = '' ) {
970
+	private function _change_venue_status($VNU_ID = 0, $venue_status = '') {
971 971
 		// grab venue id
972
-		if (! $VNU_ID) {
972
+		if ( ! $VNU_ID) {
973 973
 			$msg = __('An error occurred. No Venue ID or an invalid Venue ID was received.', 'event_espresso');
974 974
 			EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__);
975 975
 			return FALSE;
976 976
 		}
977 977
 
978
-		$this->_cpt_model_obj = EEM_Venue::instance()->get_one_by_ID( $VNU_ID );
978
+		$this->_cpt_model_obj = EEM_Venue::instance()->get_one_by_ID($VNU_ID);
979 979
 
980 980
 		// clean status
981 981
 		$venue_status = sanitize_key($venue_status);
982 982
 		// grab status
983
-		if ( ! $venue_status ) {
983
+		if ( ! $venue_status) {
984 984
 			$msg = __('An error occurred. No Venue Status or an invalid Venue Status was received.', 'event_espresso');
985 985
 			EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__);
986 986
 			return FALSE;
@@ -1001,7 +1001,7 @@  discard block
 block discarded – undo
1001 1001
 				$hook = FALSE;
1002 1002
 		}
1003 1003
 		//use class to change status
1004
-		$this->_cpt_model_obj->set_status( $venue_status );
1004
+		$this->_cpt_model_obj->set_status($venue_status);
1005 1005
 		$success = $this->_cpt_model_obj->save();
1006 1006
 
1007 1007
 		if ($success === FALSE) {
@@ -1020,21 +1020,21 @@  discard block
 block discarded – undo
1020 1020
 	 * @param  bool $redirect_after
1021 1021
 	 * @return void
1022 1022
 	 */
1023
-	protected function _delete_venue( $redirect_after = true ) {
1023
+	protected function _delete_venue($redirect_after = true) {
1024 1024
 		//determine the venue id and set to array.
1025 1025
 		$VNU_ID = isset($this->_req_data['VNU_ID']) ? absint($this->_req_data['VNU_ID']) : NULL;
1026
-		$VNU_ID = isset( $this->_req_data['post'] ) ? absint( $this->_req_data['post'] ) : $VNU_ID;
1026
+		$VNU_ID = isset($this->_req_data['post']) ? absint($this->_req_data['post']) : $VNU_ID;
1027 1027
 
1028 1028
 
1029 1029
 		// loop thru venues
1030 1030
 		if ($VNU_ID) {
1031
-			$success = $this->_delete_or_trash_venue( $VNU_ID );
1031
+			$success = $this->_delete_or_trash_venue($VNU_ID);
1032 1032
 		} else {
1033 1033
 			$success = FALSE;
1034 1034
 			$msg = __('An error occurred. An venue could not be deleted because a valid venue ID was not not supplied.', 'event_espresso');
1035 1035
 			EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__);
1036 1036
 		}
1037
-		if ( $redirect_after )
1037
+		if ($redirect_after)
1038 1038
 			$this->_redirect_after_action($success, 'Venue', 'deleted', array('action' => 'default'));
1039 1039
 	}
1040 1040
 
@@ -1066,7 +1066,7 @@  discard block
 block discarded – undo
1066 1066
 	//todo: put in parent
1067 1067
 	private function _delete_or_trash_venue($VNU_ID = FALSE) {
1068 1068
 		// grab event id
1069
-		if (!$VNU_ID = absint($VNU_ID)) {
1069
+		if ( ! $VNU_ID = absint($VNU_ID)) {
1070 1070
 			$msg = __('An error occurred. No Venue ID or an invalid Venue ID was received.', 'event_espresso');
1071 1071
 			EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__);
1072 1072
 			return FALSE;
@@ -1086,7 +1086,7 @@  discard block
 block discarded – undo
1086 1086
 			EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__);
1087 1087
 			return FALSE;
1088 1088
 		}
1089
-		do_action( 'AHEE__Venues_Admin_Page___delete_or_trash_venue__after_venue_deleted' );
1089
+		do_action('AHEE__Venues_Admin_Page___delete_or_trash_venue__after_venue_deleted');
1090 1090
 		return TRUE;
1091 1091
 	}
1092 1092
 
@@ -1097,11 +1097,11 @@  discard block
 block discarded – undo
1097 1097
 	/* QUERIES */
1098 1098
 
1099 1099
 
1100
-	public function get_venues( $per_page = 10, $count = FALSE ) {
1100
+	public function get_venues($per_page = 10, $count = FALSE) {
1101 1101
 
1102
-		$_orderby = !empty( $this->_req_data['orderby'] ) ? $this->_req_data['orderby'] : '';
1102
+		$_orderby = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : '';
1103 1103
 
1104
-		switch ( $_orderby ) {
1104
+		switch ($_orderby) {
1105 1105
 			case 'id':
1106 1106
 				$orderby = 'VNU_ID';
1107 1107
 				break;
@@ -1119,43 +1119,43 @@  discard block
 block discarded – undo
1119 1119
 		}
1120 1120
 
1121 1121
 
1122
-		$sort = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'ASC';
1122
+		$sort = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'ASC';
1123 1123
 
1124
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
1125
-		$per_page = isset( $per_page ) && !empty( $per_page ) ? $per_page : 10;
1126
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
1124
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
1125
+		$per_page = isset($per_page) && ! empty($per_page) ? $per_page : 10;
1126
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
1127 1127
 
1128 1128
 
1129
-		$offset = ($current_page-1)*$per_page;
1129
+		$offset = ($current_page - 1) * $per_page;
1130 1130
 		$limit = array($offset, $per_page);
1131 1131
 
1132
-		$category = isset( $this->_req_data['category'] ) && $this->_req_data['category'] > 0 ? $this->_req_data['category'] : NULL;
1132
+		$category = isset($this->_req_data['category']) && $this->_req_data['category'] > 0 ? $this->_req_data['category'] : NULL;
1133 1133
 		$where = array();
1134 1134
 
1135 1135
 		//only set initial status if it is in the incoming request.  Otherwise the "all" view display's all statuses.
1136
-		if ( isset( $this->_req_data['status'] ) && $this->_req_data['status'] != 'all' ) {
1136
+		if (isset($this->_req_data['status']) && $this->_req_data['status'] != 'all') {
1137 1137
 			$where['status'] = $this->_req_data['status'];
1138 1138
 		}
1139 1139
 
1140
-		if ( isset( $this->_req_data['venue_status'] ) ) {
1140
+		if (isset($this->_req_data['venue_status'])) {
1141 1141
 			$where['status'] = $this->_req_data['venue_status'];
1142 1142
 		}
1143 1143
 
1144 1144
 
1145
-		if ( $category ) {
1145
+		if ($category) {
1146 1146
 			$where['Term_Taxonomy.taxonomy'] = 'espresso_venue_categories';
1147 1147
 			$where['Term_Taxonomy.term_id'] = $category;
1148 1148
 		}
1149 1149
 
1150 1150
 
1151
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_venues', 'get_venues' ) ) {
1152
-			$where['VNU_wp_user'] =  get_current_user_id();
1151
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_venues', 'get_venues')) {
1152
+			$where['VNU_wp_user'] = get_current_user_id();
1153 1153
 		} else {
1154
-				if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_venues', 'get_venues' ) ) {
1154
+				if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_private_venues', 'get_venues')) {
1155 1155
 					$where['OR'] = array(
1156
-						'status*restrict_private' => array( '!=', 'private' ),
1156
+						'status*restrict_private' => array('!=', 'private'),
1157 1157
 						'AND'                     => array(
1158
-							'status*inclusive' => array( '=', 'private' ),
1158
+							'status*inclusive' => array('=', 'private'),
1159 1159
 							'VNU_wp_user'      => get_current_user_id()
1160 1160
 						)
1161 1161
 					);
@@ -1165,30 +1165,30 @@  discard block
 block discarded – undo
1165 1165
 
1166 1166
 
1167 1167
 
1168
-		if ( isset( $this->_req_data['s'] ) ) {
1169
-			$sstr = '%' . $this->_req_data['s'] . '%';
1168
+		if (isset($this->_req_data['s'])) {
1169
+			$sstr = '%'.$this->_req_data['s'].'%';
1170 1170
 			$where['OR'] = array(
1171
-				'VNU_name' => array('LIKE',$sstr ),
1172
-				'VNU_desc' => array('LIKE',$sstr ),
1173
-				'VNU_short_desc' => array( 'LIKE',$sstr ),
1174
-				'VNU_address' => array( 'LIKE', $sstr ),
1175
-				'VNU_address2' => array( 'LIKE', $sstr ),
1176
-				'VNU_city' => array( 'LIKE', $sstr ),
1177
-				'VNU_zip' => array( 'LIKE', $sstr ),
1178
-				'VNU_phone' => array( 'LIKE', $sstr ),
1179
-				'VNU_url' => array( 'LIKE', $sstr ),
1180
-				'VNU_virtual_phone' => array( 'LIKE', $sstr ),
1181
-				'VNU_virtual_url' => array( 'LIKE', $sstr ),
1182
-				'VNU_google_map_link' => array( 'LIKE', $sstr ),
1183
-				'Event.EVT_name' => array('LIKE', $sstr ),
1184
-				'Event.EVT_desc' => array('LIKE', $sstr ),
1185
-				'Event.EVT_phone' => array('LIKE', $sstr ),
1186
-				'Event.EVT_external_URL' => array('LIKE', $sstr ),
1171
+				'VNU_name' => array('LIKE', $sstr),
1172
+				'VNU_desc' => array('LIKE', $sstr),
1173
+				'VNU_short_desc' => array('LIKE', $sstr),
1174
+				'VNU_address' => array('LIKE', $sstr),
1175
+				'VNU_address2' => array('LIKE', $sstr),
1176
+				'VNU_city' => array('LIKE', $sstr),
1177
+				'VNU_zip' => array('LIKE', $sstr),
1178
+				'VNU_phone' => array('LIKE', $sstr),
1179
+				'VNU_url' => array('LIKE', $sstr),
1180
+				'VNU_virtual_phone' => array('LIKE', $sstr),
1181
+				'VNU_virtual_url' => array('LIKE', $sstr),
1182
+				'VNU_google_map_link' => array('LIKE', $sstr),
1183
+				'Event.EVT_name' => array('LIKE', $sstr),
1184
+				'Event.EVT_desc' => array('LIKE', $sstr),
1185
+				'Event.EVT_phone' => array('LIKE', $sstr),
1186
+				'Event.EVT_external_URL' => array('LIKE', $sstr),
1187 1187
 				);
1188 1188
 		}
1189 1189
 
1190 1190
 
1191
-		$venues = $count ? $this->_venue_model->count( array($where), 'VNU_ID' ) : $this->_venue_model->get_all( array( $where, 'limit' => $limit, 'order_by' => $orderby, 'order' => $sort ) );
1191
+		$venues = $count ? $this->_venue_model->count(array($where), 'VNU_ID') : $this->_venue_model->get_all(array($where, 'limit' => $limit, 'order_by' => $orderby, 'order' => $sort));
1192 1192
 
1193 1193
 		return $venues;
1194 1194
 
@@ -1206,22 +1206,22 @@  discard block
 block discarded – undo
1206 1206
 	 * @return void
1207 1207
 	 */
1208 1208
 	private function _set_category_object() {
1209
-		if ( isset( $this->_category->id ) && !empty( $this->_category->id ) )
1209
+		if (isset($this->_category->id) && ! empty($this->_category->id))
1210 1210
 			return; //already have the category object so get out.
1211 1211
 
1212 1212
 		//set default category object
1213 1213
 		$this->_set_empty_category_object();
1214 1214
 
1215 1215
 		//only set if we've got an id
1216
-		if ( !isset($this->_req_data['VEN_CAT_ID'] ) ) {
1216
+		if ( ! isset($this->_req_data['VEN_CAT_ID'])) {
1217 1217
 			return;
1218 1218
 		}
1219 1219
 
1220 1220
 		$category_id = absint($this->_req_data['VEN_CAT_ID']);
1221
-		$term = get_term( $category_id, 'espresso_venue_categories' );
1221
+		$term = get_term($category_id, 'espresso_venue_categories');
1222 1222
 
1223 1223
 
1224
-		if ( !empty( $term ) ) {
1224
+		if ( ! empty($term)) {
1225 1225
 			$this->_category->category_name = $term->name;
1226 1226
 			$this->_category->category_identifier = $term->slug;
1227 1227
 			$this->_category->category_desc = $term->description;
@@ -1235,15 +1235,15 @@  discard block
 block discarded – undo
1235 1235
 
1236 1236
 	private function _set_empty_category_object() {
1237 1237
 		$this->_category = new stdClass();
1238
-		$this->_category->category_name = $this->_category->category_identifier = $this->_category->category_desc  = '';
1238
+		$this->_category->category_name = $this->_category->category_identifier = $this->_category->category_desc = '';
1239 1239
 		$this->_category->id = $this->_category->parent = 0;
1240 1240
 	}
1241 1241
 
1242 1242
 
1243 1243
 
1244 1244
 	protected function _category_list_table() {
1245
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
1246
-		$this->_admin_page_title .= ' ' . $this->get_action_link_or_button(
1245
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
1246
+		$this->_admin_page_title .= ' '.$this->get_action_link_or_button(
1247 1247
 		    'add_category',
1248 1248
             'add_category',
1249 1249
             array(),
@@ -1263,13 +1263,13 @@  discard block
 block discarded – undo
1263 1263
 		$this->_set_add_edit_form_tags($route);
1264 1264
 
1265 1265
 		$this->_set_category_object();
1266
-		$id = !empty($this->_category->id) ? $this->_category->id : '';
1266
+		$id = ! empty($this->_category->id) ? $this->_category->id : '';
1267 1267
 
1268 1268
 		$delete_action = 'delete_category';
1269 1269
 
1270
-		$redirect = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'category_list' ), $this->_admin_base_url );
1270
+		$redirect = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'category_list'), $this->_admin_base_url);
1271 1271
 
1272
-		$this->_set_publish_post_box_vars( 'VEN_CAT_ID', $id, $delete_action, $redirect );
1272
+		$this->_set_publish_post_box_vars('VEN_CAT_ID', $id, $delete_action, $redirect);
1273 1273
 
1274 1274
 		//take care of contents
1275 1275
 		$this->_template_args['admin_page_content'] = $this->_category_details_content();
@@ -1283,25 +1283,25 @@  discard block
 block discarded – undo
1283 1283
 			'type' => 'wp_editor',
1284 1284
 			'value' => EEH_Formatter::admin_format_content($this->_category->category_desc),
1285 1285
 			'class' => 'my_editor_custom',
1286
-			'wpeditor_args' => array( 'media_buttons' => FALSE )
1286
+			'wpeditor_args' => array('media_buttons' => FALSE)
1287 1287
 		);
1288
-		$_wp_editor = $this->_generate_admin_form_fields( $editor_args, 'array' );
1288
+		$_wp_editor = $this->_generate_admin_form_fields($editor_args, 'array');
1289 1289
 
1290
-		$all_terms = get_terms( array('espresso_venue_categories' ), array( 'hide_empty' => 0, 'exclude' => array( $this->_category->id ) ) );
1290
+		$all_terms = get_terms(array('espresso_venue_categories'), array('hide_empty' => 0, 'exclude' => array($this->_category->id)));
1291 1291
 
1292 1292
 		//setup category select for term parents.
1293 1293
 		$category_select_values[] = array(
1294 1294
 			'text' => __('No Parent', 'event_espresso'),
1295 1295
 			'id' => 0
1296 1296
 			);
1297
-		foreach ( $all_terms as $term ) {
1297
+		foreach ($all_terms as $term) {
1298 1298
 			$category_select_values[] = array(
1299 1299
 				'text' => $term->name,
1300 1300
 				'id' => $term->term_id
1301 1301
 				);
1302 1302
 		}
1303 1303
 
1304
-		$category_select = EEH_Form_Fields::select_input( 'category_parent', $category_select_values, $this->_category->parent );
1304
+		$category_select = EEH_Form_Fields::select_input('category_parent', $category_select_values, $this->_category->parent);
1305 1305
 		$template_args = array(
1306 1306
 			'category' => $this->_category,
1307 1307
 			'category_select' => $category_select,
@@ -1310,15 +1310,15 @@  discard block
 block discarded – undo
1310 1310
 			'disable' => '',
1311 1311
 			'disabled_message' =>FALSE
1312 1312
 			);
1313
-		$template = EVENTS_TEMPLATE_PATH . 'event_category_details.template.php';
1314
-		return EEH_Template::display_template($template, $template_args, TRUE );
1313
+		$template = EVENTS_TEMPLATE_PATH.'event_category_details.template.php';
1314
+		return EEH_Template::display_template($template, $template_args, TRUE);
1315 1315
 	}
1316 1316
 
1317 1317
 
1318 1318
 	protected function _delete_categories() {
1319
-		$cat_ids = isset( $this->_req_data['VEN_CAT_ID'] ) ? (array) $this->_req_data['VEN_CAT_ID'] : (array) $this->_req_data['category_id'];
1319
+		$cat_ids = isset($this->_req_data['VEN_CAT_ID']) ? (array) $this->_req_data['VEN_CAT_ID'] : (array) $this->_req_data['category_id'];
1320 1320
 
1321
-		foreach ( $cat_ids as $cat_id ) {
1321
+		foreach ($cat_ids as $cat_id) {
1322 1322
 			$this->_delete_category($cat_id);
1323 1323
 		}
1324 1324
 
@@ -1326,7 +1326,7 @@  discard block
 block discarded – undo
1326 1326
 		$query_args = array(
1327 1327
 			'action' => 'category_list'
1328 1328
 			);
1329
-		$this->_redirect_after_action(0,'','',$query_args);
1329
+		$this->_redirect_after_action(0, '', '', $query_args);
1330 1330
 
1331 1331
 	}
1332 1332
 
@@ -1335,58 +1335,58 @@  discard block
 block discarded – undo
1335 1335
 
1336 1336
 
1337 1337
 	protected function _delete_category($cat_id) {
1338
-		$cat_id = absint( $cat_id );
1339
-		wp_delete_term( $cat_id, 'espresso_venue_categories' );
1338
+		$cat_id = absint($cat_id);
1339
+		wp_delete_term($cat_id, 'espresso_venue_categories');
1340 1340
 	}
1341 1341
 
1342 1342
 
1343 1343
 
1344 1344
 	protected function _insert_or_update_category($new_category) {
1345 1345
 
1346
-		$cat_id = $new_category ? $this->_insert_category() : $this->_insert_category( TRUE );
1346
+		$cat_id = $new_category ? $this->_insert_category() : $this->_insert_category(TRUE);
1347 1347
 		$success = 0; //we already have a success message so lets not send another.
1348
-		if ( $cat_id ) {
1348
+		if ($cat_id) {
1349 1349
 			$query_args = array(
1350 1350
 				'action'     => 'edit_category',
1351 1351
 				'VEN_CAT_ID' => $cat_id
1352 1352
 			);
1353 1353
 		} else {
1354
-			$query_args = array( 'action' => 'add_category' );
1354
+			$query_args = array('action' => 'add_category');
1355 1355
 		}
1356
-		$this->_redirect_after_action( $success, '','', $query_args, TRUE );
1356
+		$this->_redirect_after_action($success, '', '', $query_args, TRUE);
1357 1357
 
1358 1358
 	}
1359 1359
 
1360 1360
 
1361 1361
 
1362
-	private function _insert_category( $update = FALSE ) {
1362
+	private function _insert_category($update = FALSE) {
1363 1363
 		$cat_id = $update ? $this->_req_data['VEN_CAT_ID'] : '';
1364
-		$category_name= isset( $this->_req_data['category_name'] ) ? $this->_req_data['category_name'] : '';
1365
-		$category_desc= isset( $this->_req_data['category_desc'] ) ? $this->_req_data['category_desc'] : '';
1366
-		$category_parent = isset( $this->_req_data['category_parent'] ) ? $this->_req_data['category_parent'] : 0;
1364
+		$category_name = isset($this->_req_data['category_name']) ? $this->_req_data['category_name'] : '';
1365
+		$category_desc = isset($this->_req_data['category_desc']) ? $this->_req_data['category_desc'] : '';
1366
+		$category_parent = isset($this->_req_data['category_parent']) ? $this->_req_data['category_parent'] : 0;
1367 1367
 
1368
-		if ( empty( $category_name ) ) {
1369
-			$msg = __( 'You must add a name for the category.', 'event_espresso' );
1370
-			EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ );
1368
+		if (empty($category_name)) {
1369
+			$msg = __('You must add a name for the category.', 'event_espresso');
1370
+			EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__);
1371 1371
 			return false;
1372 1372
 		}
1373 1373
 
1374 1374
 
1375
-		$term_args=array(
1375
+		$term_args = array(
1376 1376
 			'name'=>$category_name,
1377 1377
 			'description'=>$category_desc,
1378 1378
 			'parent'=>$category_parent
1379 1379
 		);
1380 1380
 
1381
-		$insert_ids = $update ? wp_update_term( $cat_id, 'espresso_venue_categories', $term_args ) :wp_insert_term( $category_name, 'espresso_venue_categories', $term_args );
1381
+		$insert_ids = $update ? wp_update_term($cat_id, 'espresso_venue_categories', $term_args) : wp_insert_term($category_name, 'espresso_venue_categories', $term_args);
1382 1382
 
1383
-		if ( !is_array( $insert_ids ) ) {
1384
-			$msg = __( 'An error occurred and the category has not been saved to the database.', 'event_espresso' );
1385
-			EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ );
1383
+		if ( ! is_array($insert_ids)) {
1384
+			$msg = __('An error occurred and the category has not been saved to the database.', 'event_espresso');
1385
+			EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__);
1386 1386
 		} else {
1387 1387
 			$cat_id = $insert_ids['term_id'];
1388
-			$msg = sprintf ( __('The category %s was successfully created', 'event_espresso'), $category_name );
1389
-			EE_Error::add_success( $msg );
1388
+			$msg = sprintf(__('The category %s was successfully created', 'event_espresso'), $category_name);
1389
+			EE_Error::add_success($msg);
1390 1390
 		}
1391 1391
 
1392 1392
 		return $cat_id;
@@ -1406,11 +1406,11 @@  discard block
 block discarded – undo
1406 1406
 			'category_ids' => $this->_req_data['VEN_CAT_ID']
1407 1407
 			);
1408 1408
 
1409
-		$this->_req_data = array_merge( $this->_req_data, $new_request_args );
1409
+		$this->_req_data = array_merge($this->_req_data, $new_request_args);
1410 1410
 
1411
-		if ( is_readable( EE_CLASSES . 'EE_Export.class.php') ) {
1412
-			require_once( EE_CLASSES . 'EE_Export.class.php');
1413
-			$EE_Export = EE_Export::instance( $this->_req_data );
1411
+		if (is_readable(EE_CLASSES.'EE_Export.class.php')) {
1412
+			require_once(EE_CLASSES.'EE_Export.class.php');
1413
+			$EE_Export = EE_Export::instance($this->_req_data);
1414 1414
 			$EE_Export->export();
1415 1415
 		}
1416 1416
 
@@ -1422,7 +1422,7 @@  discard block
 block discarded – undo
1422 1422
 
1423 1423
 	protected function _import_categories() {
1424 1424
 
1425
-		require_once(EE_CLASSES . 'EE_Import.class.php');
1425
+		require_once(EE_CLASSES.'EE_Import.class.php');
1426 1426
 		EE_Import::instance()->import();
1427 1427
 
1428 1428
 	}
@@ -1430,29 +1430,29 @@  discard block
 block discarded – undo
1430 1430
 
1431 1431
 
1432 1432
 
1433
-	public function get_categories( $per_page = 10, $current_page = 1, $count = FALSE ) {
1433
+	public function get_categories($per_page = 10, $current_page = 1, $count = FALSE) {
1434 1434
 
1435 1435
 		//testing term stuff
1436
-		$orderby = isset( $this->_req_data['orderby'] ) ? $this->_req_data['orderby'] : 'Term.term_id';
1437
-		$order = isset( $this->_req_data['order'] ) ? $this->_req_data['order'] : 'DESC';
1438
-		$limit = ($current_page-1)*$per_page;
1439
-		$where = array( 'taxonomy' => 'espresso_venue_categories' );
1440
-		if ( isset( $this->_req_data['s'] ) ) {
1441
-			$sstr = '%' . $this->_req_data['s'] . '%';
1436
+		$orderby = isset($this->_req_data['orderby']) ? $this->_req_data['orderby'] : 'Term.term_id';
1437
+		$order = isset($this->_req_data['order']) ? $this->_req_data['order'] : 'DESC';
1438
+		$limit = ($current_page - 1) * $per_page;
1439
+		$where = array('taxonomy' => 'espresso_venue_categories');
1440
+		if (isset($this->_req_data['s'])) {
1441
+			$sstr = '%'.$this->_req_data['s'].'%';
1442 1442
 			$where['OR'] = array(
1443
-				'Term.name' => array( 'LIKE', $sstr),
1444
-				'description' => array( 'LIKE', $sstr )
1443
+				'Term.name' => array('LIKE', $sstr),
1444
+				'description' => array('LIKE', $sstr)
1445 1445
 				);
1446 1446
 		}
1447 1447
 
1448 1448
 		$query_params = array(
1449 1449
 			$where,
1450
-			'order_by' => array( $orderby => $order ),
1451
-			'limit' => $limit . ',' . $per_page,
1450
+			'order_by' => array($orderby => $order),
1451
+			'limit' => $limit.','.$per_page,
1452 1452
 			'force_join' => array('Term')
1453 1453
 			);
1454 1454
 
1455
-		$categories = $count ? EEM_Term_Taxonomy::instance()->count( $query_params, 'term_id' ) :EEM_Term_Taxonomy::instance()->get_all( $query_params );
1455
+		$categories = $count ? EEM_Term_Taxonomy::instance()->count($query_params, 'term_id') : EEM_Term_Taxonomy::instance()->get_all($query_params);
1456 1456
 
1457 1457
 		return $categories;
1458 1458
 	}
Please login to merge, or discard this patch.
core/db_classes/EE_Event.class.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1006,7 +1006,7 @@
 block discarded – undo
1006 1006
 	 *
1007 1007
 	 * @access public
1008 1008
 	 * @param boolean $echo     whether to return (FALSE), or echo out the result (TRUE)
1009
-	 * @return mixed void|string
1009
+	 * @return string void|string
1010 1010
 	 */
1011 1011
 	public function pretty_active_status( $echo = TRUE ) {
1012 1012
 		$active_status = $this->get_active_status();
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -352,8 +352,7 @@  discard block
 block discarded – undo
352 352
 		$short_desc = $this->get( 'EVT_short_desc' );
353 353
 		if ( !empty( $short_desc ) || $not_full_desc ) {
354 354
 			return $short_desc;
355
-		}
356
-		else {
355
+		} else {
357 356
 			$full_desc = $this->get( 'EVT_desc' );
358 357
 			return wp_trim_words( $full_desc, $num_words, $more );
359 358
 		}
@@ -965,8 +964,7 @@  discard block
 block discarded – undo
965 964
 	public function is_sold_out( $actual = FALSE ) {
966 965
 		if ( ! $actual ) {
967 966
 			return $this->status() == EEM_Event::sold_out;
968
-		}
969
-		else {
967
+		} else {
970 968
 			return $this->perform_sold_out_status_check();
971 969
 		}
972 970
 	}
@@ -1158,8 +1156,7 @@  discard block
 block discarded – undo
1158 1156
 	public function get_permalink() {
1159 1157
 		if ( $this->external_url() ) {
1160 1158
 			return $this->external_url();
1161
-		}
1162
-		else {
1159
+		} else {
1163 1160
 			return parent::get_permalink();
1164 1161
 		}
1165 1162
 	}
Please login to merge, or discard this patch.
Spacing   +216 added lines, -216 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
 /**
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 *                             		    date_format and the second value is the time format
36 36
 	 * @return EE_Event
37 37
 	 */
38
-	public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) {
39
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
40
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
38
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) {
39
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
40
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
41 41
 	}
42 42
 
43 43
 
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 	 *                          		the website will be used.
49 49
 	 * @return EE_Event
50 50
 	 */
51
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
52
-		return new self( $props_n_values, TRUE, $timezone );
51
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null) {
52
+		return new self($props_n_values, TRUE, $timezone);
53 53
 	}
54 54
 
55 55
 
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 	 * @param mixed  $field_value
62 62
 	 * @param bool   $use_default
63 63
 	 */
64
-	public function set( $field_name, $field_value, $use_default = false ) {
65
-		switch ( $field_name ) {
64
+	public function set($field_name, $field_value, $use_default = false) {
65
+		switch ($field_name) {
66 66
 			case 'status' :
67
-				$this->set_status( $field_value, $use_default );
67
+				$this->set_status($field_value, $use_default);
68 68
 				break;
69 69
 			default :
70
-				parent::set( $field_name, $field_value, $use_default );
70
+				parent::set($field_name, $field_value, $use_default);
71 71
 		}
72 72
 	}
73 73
 
@@ -86,29 +86,29 @@  discard block
 block discarded – undo
86 86
 	 * @return bool|void
87 87
 	 * @throws \EE_Error
88 88
 	 */
89
-	public function set_status( $new_status = null, $use_default = false ) {
89
+	public function set_status($new_status = null, $use_default = false) {
90 90
 		// get current Event status
91 91
 		$old_status = $this->status();
92 92
 		// if status has changed
93
-		if ( $old_status != $new_status ) {
93
+		if ($old_status != $new_status) {
94 94
 			// TO sold_out
95
-			if ( $new_status == EEM_Event::sold_out ) {
95
+			if ($new_status == EEM_Event::sold_out) {
96 96
 				// save the previous event status so that we can revert if the event is no longer sold out
97
-				$this->add_post_meta( '_previous_event_status', $old_status );
98
-				do_action( 'AHEE__EE_Event__set_status__to_sold_out', $this, $old_status, $new_status );
97
+				$this->add_post_meta('_previous_event_status', $old_status);
98
+				do_action('AHEE__EE_Event__set_status__to_sold_out', $this, $old_status, $new_status);
99 99
 				// OR FROM  sold_out
100
-			} else if ( $old_status == EEM_Event::sold_out ) {
101
-				$this->delete_post_meta( '_previous_event_status' );
102
-				do_action( 'AHEE__EE_Event__set_status__from_sold_out', $this, $old_status, $new_status );
100
+			} else if ($old_status == EEM_Event::sold_out) {
101
+				$this->delete_post_meta('_previous_event_status');
102
+				do_action('AHEE__EE_Event__set_status__from_sold_out', $this, $old_status, $new_status);
103 103
 			}
104 104
 			// update status
105
-			parent::set( 'status', $new_status, $use_default );
106
-			do_action( 'AHEE__EE_Event__set_status__after_update', $this );
105
+			parent::set('status', $new_status, $use_default);
106
+			do_action('AHEE__EE_Event__set_status__after_update', $this);
107 107
 			return true;
108 108
 		} else {
109 109
 			// even though the old value matches the new value, it's still good to
110 110
 			// allow the parent set method to have a say
111
-			parent::set( 'status', $new_status, $use_default );
111
+			parent::set('status', $new_status, $use_default);
112 112
 			return true;
113 113
 		}
114 114
 	}
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 	 * @param array $query_params like EEM_Base::get_all
122 122
 	 * @return EE_Datetime[]
123 123
 	 */
124
-	public function datetimes( $query_params = array() ) {
125
-		return $this->get_many_related( 'Datetime', $query_params );
124
+	public function datetimes($query_params = array()) {
125
+		return $this->get_many_related('Datetime', $query_params);
126 126
 	}
127 127
 
128 128
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @return EE_Datetime[]
134 134
 	 */
135 135
 	public function datetimes_in_chronological_order() {
136
-		return $this->get_many_related( 'Datetime', array( 'order_by' => array( 'DTT_EVT_start' => 'ASC' ) ) );
136
+		return $this->get_many_related('Datetime', array('order_by' => array('DTT_EVT_start' => 'ASC')));
137 137
 	}
138 138
 
139 139
 
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
 	 * @param null $limit
150 150
 	 * @return \EE_Datetime[]
151 151
 	 */
152
-	public function datetimes_ordered( $show_expired = true, $show_deleted = false, $limit = null ) {
153
-		return EEM_Datetime::instance( $this->_timezone )->get_datetimes_for_event_ordered_by_DTT_order( $this->ID(), $show_expired, $show_deleted, $limit );
152
+	public function datetimes_ordered($show_expired = true, $show_deleted = false, $limit = null) {
153
+		return EEM_Datetime::instance($this->_timezone)->get_datetimes_for_event_ordered_by_DTT_order($this->ID(), $show_expired, $show_deleted, $limit);
154 154
 	}
155 155
 
156 156
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	 * @return EE_Datetime
161 161
 	 */
162 162
 	public function first_datetime() {
163
-		return $this->get_first_related( 'Datetime' );
163
+		return $this->get_first_related('Datetime');
164 164
 	}
165 165
 
166 166
 
@@ -171,11 +171,11 @@  discard block
 block discarded – undo
171 171
 	 * @param bool $try_to_exclude_deleted
172 172
 	 * @return EE_Datetime
173 173
 	 */
174
-	public function primary_datetime( $try_to_exclude_expired = TRUE, $try_to_exclude_deleted = TRUE ) {
175
-		if ( !empty ( $this->_Primary_Datetime ) ) {
174
+	public function primary_datetime($try_to_exclude_expired = TRUE, $try_to_exclude_deleted = TRUE) {
175
+		if ( ! empty ($this->_Primary_Datetime)) {
176 176
 			return $this->_Primary_Datetime;
177 177
 		}
178
-		$this->_Primary_Datetime = EEM_Datetime::instance( $this->_timezone )->get_primary_datetime_for_event( $this->ID(), $try_to_exclude_expired, $try_to_exclude_deleted );
178
+		$this->_Primary_Datetime = EEM_Datetime::instance($this->_timezone)->get_primary_datetime_for_event($this->ID(), $try_to_exclude_expired, $try_to_exclude_deleted);
179 179
 		return $this->_Primary_Datetime;
180 180
 	}
181 181
 
@@ -186,30 +186,30 @@  discard block
 block discarded – undo
186 186
 	 * @param array $query_params like EEM_Base::get_all
187 187
 	 * @return EE_Ticket[]
188 188
 	 */
189
-	public function tickets( $query_params = array() ) {
189
+	public function tickets($query_params = array()) {
190 190
 		//first get all datetimes
191 191
 		$datetimes = $this->datetimes_ordered();
192
-		if ( ! $datetimes ) {
192
+		if ( ! $datetimes) {
193 193
 			return array();
194 194
 		}
195 195
 
196 196
 		$datetime_ids = array();
197
-		foreach ( $datetimes as $datetime ) {
197
+		foreach ($datetimes as $datetime) {
198 198
 			$datetime_ids[] = $datetime->ID();
199 199
 		}
200 200
 
201
-		$where_params = array( 'Datetime.DTT_ID' => array( 'IN', $datetime_ids ) );
201
+		$where_params = array('Datetime.DTT_ID' => array('IN', $datetime_ids));
202 202
 
203 203
 		//if incoming $query_params has where conditions let's merge but not override existing.
204
-		if ( is_array( $query_params ) && isset( $query_params[0]) ) {
205
-			$where_params = array_merge( $query_params[0], $where_params );
206
-			unset( $query_params[0] );
204
+		if (is_array($query_params) && isset($query_params[0])) {
205
+			$where_params = array_merge($query_params[0], $where_params);
206
+			unset($query_params[0]);
207 207
 		}
208 208
 
209 209
 		//now add $where_params to $query_params
210 210
 		$query_params[0] = $where_params;
211 211
 
212
-		return EEM_Ticket::instance()->get_all( $query_params );
212
+		return EEM_Ticket::instance()->get_all($query_params);
213 213
 	}
214 214
 
215 215
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	 * @return bool
219 219
 	 */
220 220
 	function additional_limit() {
221
-		return $this->get( 'EVT_additional_limit' );
221
+		return $this->get('EVT_additional_limit');
222 222
 	}
223 223
 
224 224
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 * @return bool
228 228
 	 */
229 229
 	function allow_overflow() {
230
-		return $this->get( 'EVT_allow_overflow' );
230
+		return $this->get('EVT_allow_overflow');
231 231
 	}
232 232
 
233 233
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	 * @return bool
237 237
 	 */
238 238
 	function created() {
239
-		return $this->get( 'EVT_created' );
239
+		return $this->get('EVT_created');
240 240
 	}
241 241
 
242 242
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	 * @return bool
246 246
 	 */
247 247
 	function description() {
248
-		return $this->get( 'EVT_desc' );
248
+		return $this->get('EVT_desc');
249 249
 	}
250 250
 
251 251
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	 * @return string of html
256 256
 	 */
257 257
 	function description_filtered() {
258
-		return $this->get_pretty( 'EVT_desc' );
258
+		return $this->get_pretty('EVT_desc');
259 259
 	}
260 260
 
261 261
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 	 * @return bool
265 265
 	 */
266 266
 	function display_description() {
267
-		return $this->get( 'EVT_display_desc' );
267
+		return $this->get('EVT_display_desc');
268 268
 	}
269 269
 
270 270
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 	 * @return bool
274 274
 	 */
275 275
 	function display_ticket_selector() {
276
-		return (bool)$this->get( 'EVT_display_ticket_selector' );
276
+		return (bool) $this->get('EVT_display_ticket_selector');
277 277
 	}
278 278
 
279 279
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 	 * @return bool
283 283
 	 */
284 284
 	function external_url() {
285
-		return $this->get( 'EVT_external_URL' );
285
+		return $this->get('EVT_external_URL');
286 286
 	}
287 287
 
288 288
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 	 * @return bool
292 292
 	 */
293 293
 	function member_only() {
294
-		return $this->get( 'EVT_member_only' );
294
+		return $this->get('EVT_member_only');
295 295
 	}
296 296
 
297 297
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 	 * @return bool
301 301
 	 */
302 302
 	function phone() {
303
-		return $this->get( 'EVT_phone' );
303
+		return $this->get('EVT_phone');
304 304
 	}
305 305
 
306 306
 
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 	 * @return bool
310 310
 	 */
311 311
 	function modified() {
312
-		return $this->get( 'EVT_modified' );
312
+		return $this->get('EVT_modified');
313 313
 	}
314 314
 
315 315
 
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 	 * @return bool
319 319
 	 */
320 320
 	function name() {
321
-		return $this->get( 'EVT_name' );
321
+		return $this->get('EVT_name');
322 322
 	}
323 323
 
324 324
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 	 * @return bool
328 328
 	 */
329 329
 	function order() {
330
-		return $this->get( 'EVT_order' );
330
+		return $this->get('EVT_order');
331 331
 	}
332 332
 
333 333
 
@@ -336,8 +336,8 @@  discard block
 block discarded – undo
336 336
 	 * @return bool|string
337 337
 	 */
338 338
 	function default_registration_status() {
339
-		$event_default_registration_status = $this->get( 'EVT_default_registration_status' );
340
-		return !empty( $event_default_registration_status ) ? $event_default_registration_status : EE_Registry::instance()->CFG->registration->default_STS_ID;
339
+		$event_default_registration_status = $this->get('EVT_default_registration_status');
340
+		return ! empty($event_default_registration_status) ? $event_default_registration_status : EE_Registry::instance()->CFG->registration->default_STS_ID;
341 341
 	}
342 342
 
343 343
 
@@ -348,14 +348,14 @@  discard block
 block discarded – undo
348 348
 	 * @param bool $not_full_desc
349 349
 	 * @return bool|string
350 350
 	 */
351
-	function short_description( $num_words = 55, $more = NULL, $not_full_desc = FALSE ) {
352
-		$short_desc = $this->get( 'EVT_short_desc' );
353
-		if ( !empty( $short_desc ) || $not_full_desc ) {
351
+	function short_description($num_words = 55, $more = NULL, $not_full_desc = FALSE) {
352
+		$short_desc = $this->get('EVT_short_desc');
353
+		if ( ! empty($short_desc) || $not_full_desc) {
354 354
 			return $short_desc;
355 355
 		}
356 356
 		else {
357
-			$full_desc = $this->get( 'EVT_desc' );
358
-			return wp_trim_words( $full_desc, $num_words, $more );
357
+			$full_desc = $this->get('EVT_desc');
358
+			return wp_trim_words($full_desc, $num_words, $more);
359 359
 		}
360 360
 	}
361 361
 
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 	 * @return bool
366 366
 	 */
367 367
 	function slug() {
368
-		return $this->get( 'EVT_slug' );
368
+		return $this->get('EVT_slug');
369 369
 	}
370 370
 
371 371
 
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 	 * @return bool
375 375
 	 */
376 376
 	function timezone_string() {
377
-		return $this->get( 'EVT_timezone_string' );
377
+		return $this->get('EVT_timezone_string');
378 378
 	}
379 379
 
380 380
 
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 	 * @return bool
384 384
 	 */
385 385
 	function visible_on() {
386
-		return $this->get( 'EVT_visible_on' );
386
+		return $this->get('EVT_visible_on');
387 387
 	}
388 388
 
389 389
 
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 	 * @return int
393 393
 	 */
394 394
 	function wp_user() {
395
-		return $this->get( 'EVT_wp_user' );
395
+		return $this->get('EVT_wp_user');
396 396
 	}
397 397
 
398 398
 
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 	 * @return bool
402 402
 	 */
403 403
 	function donations() {
404
-		return $this->get( 'EVT_donations' );
404
+		return $this->get('EVT_donations');
405 405
 	}
406 406
 
407 407
 
@@ -409,8 +409,8 @@  discard block
 block discarded – undo
409 409
 	/**
410 410
 	 * @param $limit
411 411
 	 */
412
-	function set_additional_limit( $limit ) {
413
-		$this->set( 'EVT_additional_limit', $limit );
412
+	function set_additional_limit($limit) {
413
+		$this->set('EVT_additional_limit', $limit);
414 414
 	}
415 415
 
416 416
 
@@ -418,8 +418,8 @@  discard block
 block discarded – undo
418 418
 	/**
419 419
 	 * @param $created
420 420
 	 */
421
-	function set_created( $created ) {
422
-		$this->set( 'EVT_created', $created );
421
+	function set_created($created) {
422
+		$this->set('EVT_created', $created);
423 423
 	}
424 424
 
425 425
 
@@ -427,8 +427,8 @@  discard block
 block discarded – undo
427 427
 	/**
428 428
 	 * @param $desc
429 429
 	 */
430
-	function set_description( $desc ) {
431
-		$this->set( 'EVT_desc', $desc );
430
+	function set_description($desc) {
431
+		$this->set('EVT_desc', $desc);
432 432
 	}
433 433
 
434 434
 
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
 	/**
437 437
 	 * @param $display_desc
438 438
 	 */
439
-	function set_display_description( $display_desc ) {
440
-		$this->set( 'EVT_display_desc', $display_desc );
439
+	function set_display_description($display_desc) {
440
+		$this->set('EVT_display_desc', $display_desc);
441 441
 	}
442 442
 
443 443
 
@@ -445,8 +445,8 @@  discard block
 block discarded – undo
445 445
 	/**
446 446
 	 * @param $display_ticket_selector
447 447
 	 */
448
-	function set_display_ticket_selector( $display_ticket_selector ) {
449
-		$this->set( 'EVT_display_ticket_selector', $display_ticket_selector );
448
+	function set_display_ticket_selector($display_ticket_selector) {
449
+		$this->set('EVT_display_ticket_selector', $display_ticket_selector);
450 450
 	}
451 451
 
452 452
 
@@ -454,8 +454,8 @@  discard block
 block discarded – undo
454 454
 	/**
455 455
 	 * @param $external_url
456 456
 	 */
457
-	function set_external_url( $external_url ) {
458
-		$this->set( 'EVT_external_URL', $external_url );
457
+	function set_external_url($external_url) {
458
+		$this->set('EVT_external_URL', $external_url);
459 459
 	}
460 460
 
461 461
 
@@ -463,8 +463,8 @@  discard block
 block discarded – undo
463 463
 	/**
464 464
 	 * @param $member_only
465 465
 	 */
466
-	function set_member_only( $member_only ) {
467
-		$this->set( 'EVT_member_only', $member_only );
466
+	function set_member_only($member_only) {
467
+		$this->set('EVT_member_only', $member_only);
468 468
 	}
469 469
 
470 470
 
@@ -472,8 +472,8 @@  discard block
 block discarded – undo
472 472
 	/**
473 473
 	 * @param $event_phone
474 474
 	 */
475
-	function set_event_phone( $event_phone ) {
476
-		$this->set( 'EVT_phone', $event_phone );
475
+	function set_event_phone($event_phone) {
476
+		$this->set('EVT_phone', $event_phone);
477 477
 	}
478 478
 
479 479
 
@@ -481,8 +481,8 @@  discard block
 block discarded – undo
481 481
 	/**
482 482
 	 * @param $modified
483 483
 	 */
484
-	function set_modified( $modified ) {
485
-		$this->set( 'EVT_modified', $modified );
484
+	function set_modified($modified) {
485
+		$this->set('EVT_modified', $modified);
486 486
 	}
487 487
 
488 488
 
@@ -490,8 +490,8 @@  discard block
 block discarded – undo
490 490
 	/**
491 491
 	 * @param $name
492 492
 	 */
493
-	function set_name( $name ) {
494
-		$this->set( 'EVT_name', $name );
493
+	function set_name($name) {
494
+		$this->set('EVT_name', $name);
495 495
 	}
496 496
 
497 497
 
@@ -499,8 +499,8 @@  discard block
 block discarded – undo
499 499
 	/**
500 500
 	 * @param $order
501 501
 	 */
502
-	function set_order( $order ) {
503
-		$this->set( 'EVT_order', $order );
502
+	function set_order($order) {
503
+		$this->set('EVT_order', $order);
504 504
 	}
505 505
 
506 506
 
@@ -508,8 +508,8 @@  discard block
 block discarded – undo
508 508
 	/**
509 509
 	 * @param $short_desc
510 510
 	 */
511
-	function set_short_description( $short_desc ) {
512
-		$this->set( 'EVT_short_desc', $short_desc );
511
+	function set_short_description($short_desc) {
512
+		$this->set('EVT_short_desc', $short_desc);
513 513
 	}
514 514
 
515 515
 
@@ -517,8 +517,8 @@  discard block
 block discarded – undo
517 517
 	/**
518 518
 	 * @param $slug
519 519
 	 */
520
-	function set_slug( $slug ) {
521
-		$this->set( 'EVT_slug', $slug );
520
+	function set_slug($slug) {
521
+		$this->set('EVT_slug', $slug);
522 522
 	}
523 523
 
524 524
 
@@ -526,8 +526,8 @@  discard block
 block discarded – undo
526 526
 	/**
527 527
 	 * @param $timezone_string
528 528
 	 */
529
-	function set_timezone_string( $timezone_string ) {
530
-		$this->set( 'EVT_timezone_string', $timezone_string );
529
+	function set_timezone_string($timezone_string) {
530
+		$this->set('EVT_timezone_string', $timezone_string);
531 531
 	}
532 532
 
533 533
 
@@ -535,8 +535,8 @@  discard block
 block discarded – undo
535 535
 	/**
536 536
 	 * @param $visible_on
537 537
 	 */
538
-	function set_visible_on( $visible_on ) {
539
-		$this->set( 'EVT_visible_on', $visible_on );
538
+	function set_visible_on($visible_on) {
539
+		$this->set('EVT_visible_on', $visible_on);
540 540
 	}
541 541
 
542 542
 
@@ -544,8 +544,8 @@  discard block
 block discarded – undo
544 544
 	/**
545 545
 	 * @param $wp_user
546 546
 	 */
547
-	function set_wp_user( $wp_user ) {
548
-		$this->set( 'EVT_wp_user', $wp_user );
547
+	function set_wp_user($wp_user) {
548
+		$this->set('EVT_wp_user', $wp_user);
549 549
 	}
550 550
 
551 551
 
@@ -553,8 +553,8 @@  discard block
 block discarded – undo
553 553
 	/**
554 554
 	 * @param $default_registration_status
555 555
 	 */
556
-	function set_default_registration_status( $default_registration_status ) {
557
-		$this->set( 'EVT_default_registration_status', $default_registration_status );
556
+	function set_default_registration_status($default_registration_status) {
557
+		$this->set('EVT_default_registration_status', $default_registration_status);
558 558
 	}
559 559
 
560 560
 
@@ -562,8 +562,8 @@  discard block
 block discarded – undo
562 562
 	/**
563 563
 	 * @param $donations
564 564
 	 */
565
-	function set_donations( $donations ) {
566
-		$this->set( 'EVT_donations', $donations );
565
+	function set_donations($donations) {
566
+		$this->set('EVT_donations', $donations);
567 567
 	}
568 568
 
569 569
 
@@ -573,8 +573,8 @@  discard block
 block discarded – undo
573 573
 	 * @param EE_Venue /int $venue_id_or_obj
574 574
 	 * @return EE_Venue
575 575
 	 */
576
-	function add_venue( $venue_id_or_obj ) {
577
-		return $this->_add_relation_to( $venue_id_or_obj, 'Venue' );
576
+	function add_venue($venue_id_or_obj) {
577
+		return $this->_add_relation_to($venue_id_or_obj, 'Venue');
578 578
 	}
579 579
 
580 580
 
@@ -584,8 +584,8 @@  discard block
 block discarded – undo
584 584
 	 * @param EE_Venue /int $venue_id_or_obj
585 585
 	 * @return EE_Venue
586 586
 	 */
587
-	function remove_venue( $venue_id_or_obj ) {
588
-		return $this->_remove_relation_to( $venue_id_or_obj, 'Venue' );
587
+	function remove_venue($venue_id_or_obj) {
588
+		return $this->_remove_relation_to($venue_id_or_obj, 'Venue');
589 589
 	}
590 590
 
591 591
 
@@ -595,8 +595,8 @@  discard block
 block discarded – undo
595 595
 	 * @param array $query_params like EEM_Base::get_all's $query_params
596 596
 	 * @return EE_Venue[]
597 597
 	 */
598
-	function venues( $query_params = array() ) {
599
-		return $this->get_many_related( 'Venue', $query_params );
598
+	function venues($query_params = array()) {
599
+		return $this->get_many_related('Venue', $query_params);
600 600
 	}
601 601
 
602 602
 
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 	 */
609 609
 	private function _has_ID_and_is_published() {
610 610
 		// first check if event id is present and not NULL, then check if this event is published (or any of the equivalent "published" statuses)
611
-		return ( $this->ID() && $this->ID() !== NULL && ( $this->status() == 'publish' || $this->status() == EEM_Event::sold_out || $this->status() == EEM_Event::postponed || $this->status() == EEM_Event::cancelled ) ) ? TRUE : FALSE;
611
+		return ($this->ID() && $this->ID() !== NULL && ($this->status() == 'publish' || $this->status() == EEM_Event::sold_out || $this->status() == EEM_Event::postponed || $this->status() == EEM_Event::cancelled)) ? TRUE : FALSE;
612 612
 	}
613 613
 
614 614
 
@@ -620,21 +620,21 @@  discard block
 block discarded – undo
620 620
 	 */
621 621
 	public function is_upcoming() {
622 622
 		// check if event id is present and if this event is published
623
-		if ( $this->is_inactive() ) {
623
+		if ($this->is_inactive()) {
624 624
 			return FALSE;
625 625
 		}
626 626
 		// set initial value
627 627
 		$upcoming = FALSE;
628 628
 		//next let's get all datetimes and loop through them
629 629
 		$datetimes = $this->datetimes_in_chronological_order();
630
-		foreach ( $datetimes as $datetime ) {
631
-			if ( $datetime instanceof EE_Datetime ) {
630
+		foreach ($datetimes as $datetime) {
631
+			if ($datetime instanceof EE_Datetime) {
632 632
 				//if this dtt is expired then we continue cause one of the other datetimes might be upcoming.
633
-				if ( $datetime->is_expired() ) {
633
+				if ($datetime->is_expired()) {
634 634
 					continue;
635 635
 				}
636 636
 				//if this dtt is active then we return false.
637
-				if ( $datetime->is_active() ) {
637
+				if ($datetime->is_active()) {
638 638
 					return FALSE;
639 639
 				}
640 640
 				//otherwise let's check upcoming status
@@ -651,21 +651,21 @@  discard block
 block discarded – undo
651 651
 	 */
652 652
 	public function is_active() {
653 653
 		// check if event id is present and if this event is published
654
-		if ( $this->is_inactive() ) {
654
+		if ($this->is_inactive()) {
655 655
 			return FALSE;
656 656
 		}
657 657
 		// set initial value
658 658
 		$active = FALSE;
659 659
 		//next let's get all datetimes and loop through them
660 660
 		$datetimes = $this->datetimes_in_chronological_order();
661
-		foreach ( $datetimes as $datetime ) {
662
-			if ( $datetime instanceof EE_Datetime ) {
661
+		foreach ($datetimes as $datetime) {
662
+			if ($datetime instanceof EE_Datetime) {
663 663
 				//if this dtt is expired then we continue cause one of the other datetimes might be active.
664
-				if ( $datetime->is_expired() ) {
664
+				if ($datetime->is_expired()) {
665 665
 					continue;
666 666
 				}
667 667
 				//if this dtt is upcoming then we return false.
668
-				if ( $datetime->is_upcoming() ) {
668
+				if ($datetime->is_upcoming()) {
669 669
 					return FALSE;
670 670
 				}
671 671
 				//otherwise let's check active status
@@ -682,17 +682,17 @@  discard block
 block discarded – undo
682 682
 	 */
683 683
 	public function is_expired() {
684 684
 		// check if event id is present and if this event is published
685
-		if ( $this->is_inactive() ) {
685
+		if ($this->is_inactive()) {
686 686
 			return FALSE;
687 687
 		}
688 688
 		// set initial value
689 689
 		$expired = FALSE;
690 690
 		//first let's get all datetimes and loop through them
691 691
 		$datetimes = $this->datetimes_in_chronological_order();
692
-		foreach ( $datetimes as $datetime ) {
693
-			if ( $datetime instanceof EE_Datetime ) {
692
+		foreach ($datetimes as $datetime) {
693
+			if ($datetime instanceof EE_Datetime) {
694 694
 				//if this dtt is upcoming or active then we return false.
695
-				if ( $datetime->is_upcoming() || $datetime->is_active() ) {
695
+				if ($datetime->is_upcoming() || $datetime->is_active()) {
696 696
 					return FALSE;
697 697
 				}
698 698
 				//otherwise let's check active status
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 	 */
710 710
 	public function is_inactive() {
711 711
 		// check if event id is present and if this event is published
712
-		if ( $this->_has_ID_and_is_published() ) {
712
+		if ($this->_has_ID_and_is_published()) {
713 713
 			return FALSE;
714 714
 		}
715 715
 		return TRUE;
@@ -727,37 +727,37 @@  discard block
 block discarded – undo
727 727
 	 */
728 728
 	public function perform_sold_out_status_check() {
729 729
 		// get all unexpired untrashed tickets
730
-		$tickets = $this->tickets( array(
730
+		$tickets = $this->tickets(array(
731 731
 			array(
732
-				'TKT_end_date'   => array( '>=', EEM_Ticket::instance()->current_time_for_query( 'TKT_end_date' ) ),
732
+				'TKT_end_date'   => array('>=', EEM_Ticket::instance()->current_time_for_query('TKT_end_date')),
733 733
 				'TKT_deleted'    => false
734 734
 			)
735 735
 		));
736 736
 		// if all the tickets are just expired, then don't update the event status to sold out
737
-		if ( empty( $tickets )) {
737
+		if (empty($tickets)) {
738 738
 			return true;
739 739
 		}
740 740
 		// set initial value
741 741
 		$spaces_remaining = 0;
742
-		foreach( $tickets as $ticket ) {
743
-			if ( $ticket instanceof EE_Ticket ) {
744
-				$spaces_remaining += $ticket->qty( 'saleable' );
742
+		foreach ($tickets as $ticket) {
743
+			if ($ticket instanceof EE_Ticket) {
744
+				$spaces_remaining += $ticket->qty('saleable');
745 745
 			}
746 746
 		}
747
-		if ( $spaces_remaining === 0 ) {
748
-			$this->set_status( EEM_Event::sold_out );
749
-			if ( !is_admin() || ( is_admin() && defined( 'DOING_AJAX' ) ) ) {
747
+		if ($spaces_remaining === 0) {
748
+			$this->set_status(EEM_Event::sold_out);
749
+			if ( ! is_admin() || (is_admin() && defined('DOING_AJAX'))) {
750 750
 				$this->save();
751 751
 			}
752 752
 			$sold_out = TRUE;
753 753
 		} else {
754 754
 			$sold_out = FALSE;
755 755
 			// was event previously marked as sold out ?
756
-			if ( $this->status() == EEM_Event::sold_out ) {
756
+			if ($this->status() == EEM_Event::sold_out) {
757 757
 				// revert status to previous value, if it was set
758
-				$previous_event_status = $this->get_post_meta( '_previous_event_status', true );
759
-				if ( $previous_event_status ) {
760
-					$this->set_status( $previous_event_status );
758
+				$previous_event_status = $this->get_post_meta('_previous_event_status', true);
759
+				if ($previous_event_status) {
760
+					$this->set_status($previous_event_status);
761 761
 				}
762 762
 			}
763 763
 		}
@@ -781,15 +781,15 @@  discard block
 block discarded – undo
781 781
 	 */
782 782
 	public function spaces_remaining_for_sale() {
783 783
 		//first get total available spaces including consideration for tickets that have already sold.
784
-		$spaces_available = $this->total_available_spaces( true );
784
+		$spaces_available = $this->total_available_spaces(true);
785 785
 
786 786
 		//if total available = 0, then exit right away because that means everything is expired.
787
-		if ( $spaces_available === 0 ) {
787
+		if ($spaces_available === 0) {
788 788
 			return 0;
789 789
 		}
790 790
 
791 791
 		//subtract total approved registrations from spaces available to get how many are remaining.
792
-		$spots_taken = EEM_Registration::instance()->count( array( array( 'EVT_ID' => $this->ID(), 'STS_ID' => EEM_Registration::status_id_approved ) ), 'REG_ID', true );
792
+		$spots_taken = EEM_Registration::instance()->count(array(array('EVT_ID' => $this->ID(), 'STS_ID' => EEM_Registration::status_id_approved)), 'REG_ID', true);
793 793
 		$spaces_remaining = $spaces_available - $spots_taken;
794 794
 
795 795
 		return $spaces_remaining > 0 ? $spaces_remaining : 0;
@@ -822,29 +822,29 @@  discard block
 block discarded – undo
822 822
 	 *
823 823
 	 * @return  int|float  (Note: if EE_INF is returned its considered a float by PHP)
824 824
 	 */
825
-	public function total_available_spaces( $current_total_available = false ) {
825
+	public function total_available_spaces($current_total_available = false) {
826 826
 		$spaces_available = 0;
827 827
 
828 828
 		//first get all tickets on the event and include expired tickets
829
-		$tickets = $this->tickets( array( 'default_where_conditions' => 'none' ) );
829
+		$tickets = $this->tickets(array('default_where_conditions' => 'none'));
830 830
 		$ticket_sums = array();
831 831
 		$datetime_limits = array();
832 832
 
833 833
 		//loop through tickets and normalize them
834
-		foreach ( $tickets as $ticket ) {
835
-			$datetimes = $ticket->datetimes( array( 'order_by' => array( 'DTT_reg_limit' => 'ASC' ) ) );
834
+		foreach ($tickets as $ticket) {
835
+			$datetimes = $ticket->datetimes(array('order_by' => array('DTT_reg_limit' => 'ASC')));
836 836
 
837
-			if ( empty( $datetimes ) ) {
837
+			if (empty($datetimes)) {
838 838
 				continue;
839 839
 			}
840 840
 
841 841
 			//first datetime should be the lowest datetime
842
-			$least_datetime = reset( $datetimes );
842
+			$least_datetime = reset($datetimes);
843 843
 
844 844
 			//lets reset the ticket quantity to be the lower of either the lowest datetime reg limit or the ticket quantity
845 845
 			//IF datetimes sold (and we're not doing current live total available, then use spaces remaining for datetime, not reg_limit.
846
-			if ( $current_total_available ) {
847
-				if ( $ticket->is_remaining() ) {
846
+			if ($current_total_available) {
847
+				if ($ticket->is_remaining()) {
848 848
 					$remaining = $ticket->remaining();
849 849
 				} else {
850 850
 					$spaces_available += $ticket->sold();
@@ -852,23 +852,23 @@  discard block
 block discarded – undo
852 852
 					continue;
853 853
 				}
854 854
 			} else {
855
-				$remaining = min( $ticket->qty(), $least_datetime->reg_limit() );
855
+				$remaining = min($ticket->qty(), $least_datetime->reg_limit());
856 856
 			}
857 857
 
858 858
 			//if $ticket_limit == infinity then let's drop out right away and just return that because any infinity amount trumps all other "available" amounts.
859
-			if ( $remaining === EE_INF ) {
859
+			if ($remaining === EE_INF) {
860 860
 				return EE_INF;
861 861
 			}
862 862
 
863 863
 			//multiply normalized $tkt quantity by the number of datetimes on the ticket as the "sum"
864 864
 			//also include the sum of all the datetime reg limits on the ticket for breaking ties.
865
-			$ticket_sums[$ticket->ID()]['sum'] = $remaining * count( $datetimes );
865
+			$ticket_sums[$ticket->ID()]['sum'] = $remaining * count($datetimes);
866 866
 			$ticket_sums[$ticket->ID()]['datetime_sums'] = 0;
867
-			foreach ( $datetimes as $datetime ) {
868
-				if ( $datetime->reg_limit() === EE_INF ) {
867
+			foreach ($datetimes as $datetime) {
868
+				if ($datetime->reg_limit() === EE_INF) {
869 869
 					$ticket_sums[$ticket->ID()]['datetime_sums'] = EE_INF;
870 870
 				} else {
871
-					$ticket_sums[ $ticket->ID() ]['datetime_sums'] += $current_total_available ? $datetime->spaces_remaining() : $datetime->reg_limit();
871
+					$ticket_sums[$ticket->ID()]['datetime_sums'] += $current_total_available ? $datetime->spaces_remaining() : $datetime->reg_limit();
872 872
 				}
873 873
 				$datetime_limits[$datetime->ID()] = $current_total_available ? $datetime->spaces_remaining() : $datetime->reg_limit();
874 874
 			}
@@ -879,74 +879,74 @@  discard block
 block discarded – undo
879 879
 		//ticket quantity by the number of datetimes on the ticket).  For tie-breakers, then the next sort is based on the
880 880
 		//ticket with the greatest sum of all remaining datetime->spaces_remaining() ( or $datetime->reg_limit() if not
881 881
 		//$current_total_available ) for the datetimes on the ticket.
882
-		usort( $ticket_sums, function( $a, $b ) {
883
-			if ( $a['sum'] == $b['sum'] ) {
884
-				if ( $a['datetime_sums'] == $b['datetime_sums'] ) {
882
+		usort($ticket_sums, function($a, $b) {
883
+			if ($a['sum'] == $b['sum']) {
884
+				if ($a['datetime_sums'] == $b['datetime_sums']) {
885 885
 					return 0;
886 886
 				}
887 887
 
888 888
 				return $a['datetime_sums'] < $b['datetime_sums'] ? 1 : -1;
889 889
 			}
890
-			return ( $a['sum'] < $b['sum'] ) ? -1 : 1;
890
+			return ($a['sum'] < $b['sum']) ? -1 : 1;
891 891
 		});
892 892
 
893 893
 		//now let's loop through the sorted tickets and simulate sellouts
894
-		foreach ( $ticket_sums as $ticket_info ) {
895
-			if ( $ticket_info['ticket'] instanceof EE_Ticket ) {
894
+		foreach ($ticket_sums as $ticket_info) {
895
+			if ($ticket_info['ticket'] instanceof EE_Ticket) {
896 896
 
897
-				$datetimes = $ticket_info['ticket']->datetimes( array( 'order_by' => array( 'DTT_reg_limit' => 'ASC' ) ) );
897
+				$datetimes = $ticket_info['ticket']->datetimes(array('order_by' => array('DTT_reg_limit' => 'ASC')));
898 898
 				//need to sort these $datetimes by remaining (only if $current_total_available)
899 899
 				//setup datetimes for simulation
900 900
 				$ticket_datetimes_remaining = array();
901
-				foreach( $datetimes as $datetime ) {
901
+				foreach ($datetimes as $datetime) {
902 902
 					$ticket_datetimes_remaining[$datetime->ID()]['rem'] = $datetime_limits[$datetime->ID()];
903 903
 					$ticket_datetimes_remaining[$datetime->ID()]['datetime'] = $datetime;
904 904
 				}
905
-				usort( $ticket_datetimes_remaining, function( $a, $b ) {
906
-					if ( $a['rem'] == $b['rem'] ) {
905
+				usort($ticket_datetimes_remaining, function($a, $b) {
906
+					if ($a['rem'] == $b['rem']) {
907 907
 						return 0;
908 908
 					}
909
-					return ( $a['rem'] < $b['rem'] ) ? -1 : 1;
909
+					return ($a['rem'] < $b['rem']) ? -1 : 1;
910 910
 				});
911 911
 
912 912
 
913 913
 				//get the remaining on the first datetime (which should be the one with the least remaining) and that is
914 914
 				//what we add to the spaces_available running total.  Then we need to decrease the remaining on our datetime tracker.
915
-				$lowest_datetime = reset( $ticket_datetimes_remaining );
915
+				$lowest_datetime = reset($ticket_datetimes_remaining);
916 916
 
917 917
 				//need to get the lower of; what the remaining is on the lowest datetime, and the remaining on the ticket.
918 918
 				// If this ends up being 0 (because of previous tickets in our simulation selling out), then it has already
919 919
 				// been tracked on $spaces available and this ticket is now sold out for the simulation, so we can continue
920 920
 				// to the next ticket.
921
-				if ( $current_total_available ) {
922
-					$remaining = min( $lowest_datetime['rem'], $ticket_info['ticket']->remaining() );
921
+				if ($current_total_available) {
922
+					$remaining = min($lowest_datetime['rem'], $ticket_info['ticket']->remaining());
923 923
 				} else {
924
-					$remaining = min( $lowest_datetime['rem'], $ticket_info['ticket']->qty() );
924
+					$remaining = min($lowest_datetime['rem'], $ticket_info['ticket']->qty());
925 925
 				}
926 926
 
927 927
 				//if $remaining is infinite that means that all datetimes on this ticket are infinite but we've made it here because all
928 928
 				//tickets have a quantity.  So we don't have to track datetimes, we can just use ticket quantities for total
929 929
 				//available.
930
-				if ( $remaining === EE_INF ) {
930
+				if ($remaining === EE_INF) {
931 931
 					$spaces_available += $ticket_info['ticket']->qty();
932 932
 					continue;
933 933
 				}
934 934
 
935 935
 				//if ticket has sold amounts then we also need to add that (but only if doing live counts)
936
-				if ( $current_total_available ) {
936
+				if ($current_total_available) {
937 937
 					$spaces_available += $ticket_info['ticket']->sold();
938 938
 				}
939 939
 
940
-				if ( $remaining <= 0 ) {
940
+				if ($remaining <= 0) {
941 941
 					continue;
942 942
 				} else {
943 943
 					$spaces_available += $remaining;
944 944
 				}
945 945
 
946 946
 				//loop through the datetimes and sell them out!
947
-				foreach ( $ticket_datetimes_remaining as $datetime_info ) {
948
-					if ( $datetime_info['datetime'] instanceof EE_Datetime ) {
949
-						$datetime_limits[ $datetime_info['datetime']->ID() ] += - $remaining;
947
+				foreach ($ticket_datetimes_remaining as $datetime_info) {
948
+					if ($datetime_info['datetime'] instanceof EE_Datetime) {
949
+						$datetime_limits[$datetime_info['datetime']->ID()] += - $remaining;
950 950
 					}
951 951
 				}
952 952
 			}
@@ -962,8 +962,8 @@  discard block
 block discarded – undo
962 962
 	 * @param  bool $actual whether or not to perform calculations to not only figure the actual status but also to flip the status if necessary to sold out If false, we just check the existing status of the event
963 963
 	 * @return boolean
964 964
 	 */
965
-	public function is_sold_out( $actual = FALSE ) {
966
-		if ( ! $actual ) {
965
+	public function is_sold_out($actual = FALSE) {
966
+		if ( ! $actual) {
967 967
 			return $this->status() == EEM_Event::sold_out;
968 968
 		}
969 969
 		else {
@@ -1008,30 +1008,30 @@  discard block
 block discarded – undo
1008 1008
 	 *
1009 1009
 	 * @return bool | string - based on EE_Datetime active constants or FALSE if error.
1010 1010
 	 */
1011
-	public function get_active_status( $reset = false ) {
1011
+	public function get_active_status($reset = false) {
1012 1012
 		// if the active status has already been set, then just use that value (unless we are resetting it)
1013
-		if ( ! empty( $this->_active_status ) && ! $reset ) {
1013
+		if ( ! empty($this->_active_status) && ! $reset) {
1014 1014
 			return $this->_active_status;
1015 1015
 		}
1016 1016
 		//first check if event id is present on this object
1017
-		if ( ! $this->ID() ) {
1017
+		if ( ! $this->ID()) {
1018 1018
 			return false;
1019 1019
 		}
1020 1020
 
1021
-		$where_params_for_event  = array( array( 'EVT_ID' => $this->ID() ) );
1021
+		$where_params_for_event = array(array('EVT_ID' => $this->ID()));
1022 1022
 
1023 1023
 		//if event is published:
1024
-		if ( $this->status() === 'publish' ) {
1024
+		if ($this->status() === 'publish') {
1025 1025
 			//active?
1026
-			if ( EEM_Datetime::instance()->get_datetime_count_for_status( EE_Datetime::active, $where_params_for_event ) > 0 ) {
1026
+			if (EEM_Datetime::instance()->get_datetime_count_for_status(EE_Datetime::active, $where_params_for_event) > 0) {
1027 1027
 				$this->_active_status = EE_Datetime::active;
1028 1028
 			} else {
1029 1029
 				//upcoming?
1030
-				if ( EEM_Datetime::instance()->get_datetime_count_for_status( EE_Datetime::upcoming, $where_params_for_event  ) > 0 ) {
1030
+				if (EEM_Datetime::instance()->get_datetime_count_for_status(EE_Datetime::upcoming, $where_params_for_event) > 0) {
1031 1031
 					$this->_active_status = EE_Datetime::upcoming;
1032 1032
 				} else {
1033 1033
 					//expired?
1034
-					if ( EEM_Datetime::instance()->get_datetime_count_for_status( EE_Datetime::expired, $where_params_for_event  ) > 0 ) {
1034
+					if (EEM_Datetime::instance()->get_datetime_count_for_status(EE_Datetime::expired, $where_params_for_event) > 0) {
1035 1035
 						$this->_active_status = EE_Datetime::expired;
1036 1036
 					} else {
1037 1037
 						//it would be odd if things make it this far because it basically means there are no datetime's
@@ -1042,7 +1042,7 @@  discard block
 block discarded – undo
1042 1042
 			}
1043 1043
 		} else {
1044 1044
 			//the event is not published, so let's just set it's active status according to its' post status
1045
-			switch ( $this->status() ) {
1045
+			switch ($this->status()) {
1046 1046
 				case EEM_Event::sold_out :
1047 1047
 					$this->_active_status = EE_Datetime::sold_out;
1048 1048
 					break;
@@ -1068,10 +1068,10 @@  discard block
 block discarded – undo
1068 1068
 	 * @param boolean $echo     whether to return (FALSE), or echo out the result (TRUE)
1069 1069
 	 * @return mixed void|string
1070 1070
 	 */
1071
-	public function pretty_active_status( $echo = TRUE ) {
1071
+	public function pretty_active_status($echo = TRUE) {
1072 1072
 		$active_status = $this->get_active_status();
1073
-		$status = '<span class="ee-status event-active-status-' . $active_status . '">' . EEH_Template::pretty_status( $active_status, FALSE, 'sentence' ) . '</span>';
1074
-		if ( $echo ) {
1073
+		$status = '<span class="ee-status event-active-status-'.$active_status.'">'.EEH_Template::pretty_status($active_status, FALSE, 'sentence').'</span>';
1074
+		if ($echo) {
1075 1075
 			echo $status;
1076 1076
 			return '';
1077 1077
 		}
@@ -1085,12 +1085,12 @@  discard block
 block discarded – undo
1085 1085
 	 */
1086 1086
 	public function get_number_of_tickets_sold() {
1087 1087
 		$tkt_sold = 0;
1088
-		if ( !$this->ID() ) {
1088
+		if ( ! $this->ID()) {
1089 1089
 			return 0;
1090 1090
 		}
1091 1091
 		$datetimes = $this->datetimes();
1092
-		foreach ( $datetimes as $datetime ) {
1093
-			if ( $datetime instanceof EE_Datetime ) {
1092
+		foreach ($datetimes as $datetime) {
1093
+			if ($datetime instanceof EE_Datetime) {
1094 1094
 				$tkt_sold += $datetime->sold();
1095 1095
 			}
1096 1096
 		}
@@ -1105,7 +1105,7 @@  discard block
 block discarded – undo
1105 1105
 	 * @return int
1106 1106
 	 */
1107 1107
 	public function get_count_of_all_registrations() {
1108
-		return EEM_Event::instance()->count_related( $this, 'Registration' );
1108
+		return EEM_Event::instance()->count_related($this, 'Registration');
1109 1109
 	}
1110 1110
 
1111 1111
 
@@ -1115,9 +1115,9 @@  discard block
 block discarded – undo
1115 1115
 	 * @return EE_Ticket
1116 1116
 	 */
1117 1117
 	public function get_ticket_with_earliest_start_time() {
1118
-		$where[ 'Datetime.EVT_ID' ] = $this->ID();
1119
-		$query_params = array( $where, 'order_by' => array( 'TKT_start_date' => 'ASC' ) );
1120
-		return EE_Registry::instance()->load_model( 'Ticket' )->get_one( $query_params );
1118
+		$where['Datetime.EVT_ID'] = $this->ID();
1119
+		$query_params = array($where, 'order_by' => array('TKT_start_date' => 'ASC'));
1120
+		return EE_Registry::instance()->load_model('Ticket')->get_one($query_params);
1121 1121
 	}
1122 1122
 
1123 1123
 
@@ -1127,9 +1127,9 @@  discard block
 block discarded – undo
1127 1127
 	 * @return EE_Ticket
1128 1128
 	 */
1129 1129
 	public function get_ticket_with_latest_end_time() {
1130
-		$where[ 'Datetime.EVT_ID' ] = $this->ID();
1131
-		$query_params = array( $where, 'order_by' => array( 'TKT_end_date' => 'DESC' ) );
1132
-		return EE_Registry::instance()->load_model( 'Ticket' )->get_one( $query_params );
1130
+		$where['Datetime.EVT_ID'] = $this->ID();
1131
+		$query_params = array($where, 'order_by' => array('TKT_end_date' => 'DESC'));
1132
+		return EE_Registry::instance()->load_model('Ticket')->get_one($query_params);
1133 1133
 	}
1134 1134
 
1135 1135
 
@@ -1141,11 +1141,11 @@  discard block
 block discarded – undo
1141 1141
 	public function tickets_on_sale() {
1142 1142
 		$earliest_ticket = $this->get_ticket_with_earliest_start_time();
1143 1143
 		$latest_ticket = $this->get_ticket_with_latest_end_time();
1144
-		if ( !$latest_ticket instanceof EE_Ticket && !$earliest_ticket instanceof EE_Ticket ) {
1144
+		if ( ! $latest_ticket instanceof EE_Ticket && ! $earliest_ticket instanceof EE_Ticket) {
1145 1145
 			return FALSE;
1146 1146
 		}
1147 1147
 		//check on sale for these two tickets.
1148
-		if ( $latest_ticket->is_on_sale() || $earliest_ticket->is_on_sale() ) {
1148
+		if ($latest_ticket->is_on_sale() || $earliest_ticket->is_on_sale()) {
1149 1149
 			return TRUE;
1150 1150
 		}
1151 1151
 		return FALSE;
@@ -1159,7 +1159,7 @@  discard block
 block discarded – undo
1159 1159
 	 * @return string
1160 1160
 	 */
1161 1161
 	public function get_permalink() {
1162
-		if ( $this->external_url() ) {
1162
+		if ($this->external_url()) {
1163 1163
 			return $this->external_url();
1164 1164
 		}
1165 1165
 		else {
@@ -1174,10 +1174,10 @@  discard block
 block discarded – undo
1174 1174
 	 * @param array $query_params like EEM_Base::get_all
1175 1175
 	 * @return EE_Term
1176 1176
 	 */
1177
-	public function first_event_category( $query_params = array() ) {
1178
-		$query_params[ 0 ][ 'Term_Taxonomy.taxonomy' ] = 'espresso_event_categories';
1179
-		$query_params[ 0 ][ 'Term_Taxonomy.Event.EVT_ID' ] = $this->ID();
1180
-		return EEM_Term::instance()->get_one( $query_params );
1177
+	public function first_event_category($query_params = array()) {
1178
+		$query_params[0]['Term_Taxonomy.taxonomy'] = 'espresso_event_categories';
1179
+		$query_params[0]['Term_Taxonomy.Event.EVT_ID'] = $this->ID();
1180
+		return EEM_Term::instance()->get_one($query_params);
1181 1181
 	}
1182 1182
 
1183 1183
 
@@ -1187,10 +1187,10 @@  discard block
 block discarded – undo
1187 1187
 	 * @param array $query_params
1188 1188
 	 * @return EE_Term[]
1189 1189
 	 */
1190
-	public function get_all_event_categories( $query_params = array() ) {
1191
-		$query_params[ 0 ][ 'Term_Taxonomy.taxonomy' ] = 'espresso_event_categories';
1192
-		$query_params[ 0 ][ 'Term_Taxonomy.Event.EVT_ID' ] = $this->ID();
1193
-		return EEM_Term::instance()->get_all( $query_params );
1190
+	public function get_all_event_categories($query_params = array()) {
1191
+		$query_params[0]['Term_Taxonomy.taxonomy'] = 'espresso_event_categories';
1192
+		$query_params[0]['Term_Taxonomy.Event.EVT_ID'] = $this->ID();
1193
+		return EEM_Term::instance()->get_all($query_params);
1194 1194
 	}
1195 1195
 
1196 1196
 	/**
@@ -1198,8 +1198,8 @@  discard block
 block discarded – undo
1198 1198
 	 * @param array $query_params @see EEM_Base::get_all
1199 1199
 	 * @return EE_Question_Group[]
1200 1200
 	 */
1201
-	public function question_groups($query_params = array()){
1202
-		$query_params = ! empty( $query_params ) ? $query_params : array( 'order_by' => array( 'QSG_order' => 'ASC' ));
1201
+	public function question_groups($query_params = array()) {
1202
+		$query_params = ! empty($query_params) ? $query_params : array('order_by' => array('QSG_order' => 'ASC'));
1203 1203
 		return $this->get_many_related('Question_Group', $query_params);
1204 1204
 	}
1205 1205
 
@@ -1238,12 +1238,12 @@  discard block
 block discarded – undo
1238 1238
 	 * @return string
1239 1239
 	 */
1240 1240
 	public function get_admin_edit_link() {
1241
-		return EEH_URL::add_query_args_and_nonce( array(
1241
+		return EEH_URL::add_query_args_and_nonce(array(
1242 1242
 			'page' => 'espresso_events',
1243 1243
 			'action' => 'edit',
1244 1244
 			'post' => $this->ID()
1245 1245
 			),
1246
-			admin_url( 'admin.php' )
1246
+			admin_url('admin.php')
1247 1247
 		);
1248 1248
 	}
1249 1249
 
@@ -1255,11 +1255,11 @@  discard block
 block discarded – undo
1255 1255
 	 * @return string
1256 1256
 	 */
1257 1257
 	public function get_admin_settings_link() {
1258
-		return EEH_URL::add_query_args_and_nonce( array(
1258
+		return EEH_URL::add_query_args_and_nonce(array(
1259 1259
 			'page' => 'espresso_events',
1260 1260
 			'action' => 'default_event_settings'
1261 1261
 			),
1262
-			admin_url( 'admin.php' )
1262
+			admin_url('admin.php')
1263 1263
 		);
1264 1264
 	}
1265 1265
 
@@ -1274,11 +1274,11 @@  discard block
 block discarded – undo
1274 1274
 	 */
1275 1275
 	public function get_admin_overview_link() {
1276 1276
 
1277
-		return EEH_URL::add_query_args_and_nonce( array(
1277
+		return EEH_URL::add_query_args_and_nonce(array(
1278 1278
 			'page' => 'espresso_events',
1279 1279
 			'action' => 'default'
1280 1280
 		),
1281
-			admin_url( 'admin.php' )
1281
+			admin_url('admin.php')
1282 1282
 		);
1283 1283
 	}
1284 1284
 
Please login to merge, or discard this patch.
admin_pages/events/help_tabs/event_editor_venue_details.help_tab.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,5 +3,5 @@
 block discarded – undo
3 3
 <?php _e('A venue is the place or location that is hosting your event. This setting is optional which means that you are not required to select a venue for your event.', 'event_espresso'); ?>
4 4
 </p>
5 5
 <p>
6
-<?php echo sprintf(__('Venues can be managed through the %sVenues page%s.', 'event_espresso'),'<a href="admin.php?page=espresso_venues">','</a>'); ?>
6
+<?php echo sprintf(__('Venues can be managed through the %sVenues page%s.', 'event_espresso'), '<a href="admin.php?page=espresso_venues">', '</a>'); ?>
7 7
 </p>
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
admin_pages/events/templates/event_tickets_metabox_main.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php do_action( 'AHEE__event_tickets_metabox_main__before_content' ); ?>
1
+<?php do_action('AHEE__event_tickets_metabox_main__before_content'); ?>
2 2
 <div id="event-and-ticket-form-content">
3 3
 	<h4 class="event-tickets-datetimes-title"><?php _e('Event Datetime', 'event_espresso'); ?></h4><?php echo $event_datetime_help_link; ?>
4 4
 	<div class="event-datetimes-container">
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
 						</td>
30 30
 						<td class="event-datetime-column reg-limit-column">
31 31
 							<?php
32
-								$reg_limit = $time->get_pretty('DTT_reg_limit','input');
32
+								$reg_limit = $time->get_pretty('DTT_reg_limit', 'input');
33 33
 							?>
34 34
 							<input type="text" name="edit_event_datetimes[1][DTT_reg_limit]" id="event-datetime-DTT_reg_limit-1" class="ee-small-text-inp ee-inp-right event-datetime-DTT_reg_limit" value="<?php echo $reg_limit; ?>">
35 35
 						</td>
36
-						<td class="datetime-tickets-sold"><?php printf( __('Tickets Sold: %s', 'event_espresso'), $time->get('DTT_sold') ); ?></td>
36
+						<td class="datetime-tickets-sold"><?php printf(__('Tickets Sold: %s', 'event_espresso'), $time->get('DTT_sold')); ?></td>
37 37
 					</tr>
38 38
 				</tbody>
39 39
 			</table>
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	<div style="clear:both"></div>
72 72
 </div> <!-- end #event-and-ticket-form-content -->
73 73
 
74
-<?php do_action( 'AHEE__event_tickets_metabox_main__after_content' ); ?>
74
+<?php do_action('AHEE__event_tickets_metabox_main__after_content'); ?>
75 75
 
76 76
 <table id="new-ticket-row-form" class="hidden">
77 77
 	<tbody><?php echo $ticket_js_structure; ?></tbody>
Please login to merge, or discard this patch.
general_settings/help_tabs/general_settings_critical_pages.help_tab.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,41 +6,41 @@
 block discarded – undo
6 6
 <ul>
7 7
 <li>
8 8
 <strong><?php _e('Registration Checkout Page', 'event_espresso'); ?></strong><br />
9
-<?php printf( __('This page displays all your events and is required. It is important that this page always contain the %s shortcode. It is not required to be in your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_CHECKOUT]</strong>' ); ?>
9
+<?php printf(__('This page displays all your events and is required. It is important that this page always contain the %s shortcode. It is not required to be in your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_CHECKOUT]</strong>'); ?>
10 10
 </li>
11 11
 <li>
12 12
 <strong><?php _e('Transactions Page', 'event_espresso'); ?></strong><br />
13
-<?php printf( __('This page processes the payments and is required. It should only contain the %s shortcode. No other content should be added and it should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_TXN_PAGE]</strong>' ); ?>
13
+<?php printf(__('This page processes the payments and is required. It should only contain the %s shortcode. No other content should be added and it should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_TXN_PAGE]</strong>'); ?>
14 14
 </li>
15 15
 <li>
16 16
 <strong><?php _e('Thank You Page', 'event_espresso'); ?></strong><br />
17
-<?php printf( __('This page is displayed after a successful transaction and is required. It should contain the %s shortcode. Additionally, you may customize this page by adding extra content to the page. It should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_THANK_YOU]</strong>' ); ?>
17
+<?php printf(__('This page is displayed after a successful transaction and is required. It should contain the %s shortcode. Additionally, you may customize this page by adding extra content to the page. It should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_THANK_YOU]</strong>'); ?>
18 18
 </li>
19 19
 <li>
20 20
 <strong><?php _e('Cancel / Return Page', 'event_espresso'); ?></strong><br />
21
-<?php printf( __('This page is displayed after an unsuccessful transaction and is required.  It should contain the %s shortcode. Additionally, you may customize this page by adding extra content to the page. It should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_CANCELLED]</strong>' ); ?>
21
+<?php printf(__('This page is displayed after an unsuccessful transaction and is required.  It should contain the %s shortcode. Additionally, you may customize this page by adding extra content to the page. It should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_CANCELLED]</strong>'); ?>
22 22
 </li>
23 23
 <li>
24 24
 <strong><?php _e('Event List', 'event_espresso'); ?></strong><br />
25
-<?php printf(__('If you would like to style the look of your events archive page, then follow the WordPress instructions for %1$screating a custom template for archive pages%2$s.', 'event_espresso'), '<a href="http://codex.wordpress.org/Post_Type_Templates">','</a>'); ?>
25
+<?php printf(__('If you would like to style the look of your events archive page, then follow the WordPress instructions for %1$screating a custom template for archive pages%2$s.', 'event_espresso'), '<a href="http://codex.wordpress.org/Post_Type_Templates">', '</a>'); ?>
26 26
 <ul>
27 27
 <li style="list-style-type: circle;">
28
-<?php printf( __('Build a template for your events - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>archive-espresso_events.php</strong>','wp-content/themes/twenty-fourteen' ); ?>
28
+<?php printf(__('Build a template for your events - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>archive-espresso_events.php</strong>', 'wp-content/themes/twenty-fourteen'); ?>
29 29
 </li>
30 30
 <li style="list-style-type: circle;">
31
-<?php printf( __('Build a template for a single event - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>single-espresso_events.php</strong>','wp-content/themes/twenty-fourteen' ); ?>
31
+<?php printf(__('Build a template for a single event - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>single-espresso_events.php</strong>', 'wp-content/themes/twenty-fourteen'); ?>
32 32
 </li>
33 33
 </ul>
34 34
 </li>
35 35
 <li>
36 36
 <strong><?php _e('Venue List', 'event_espresso'); ?></strong><br />
37
-<?php printf(__('If you would like to style the look of your venues archive page, then follow the WordPress instructions for %1$screating a custom template for archive pages%2$s.', 'event_espresso'), '<a href="http://codex.wordpress.org/Post_Type_Templates">','</a>'); ?>
37
+<?php printf(__('If you would like to style the look of your venues archive page, then follow the WordPress instructions for %1$screating a custom template for archive pages%2$s.', 'event_espresso'), '<a href="http://codex.wordpress.org/Post_Type_Templates">', '</a>'); ?>
38 38
 <ul>
39 39
 <li style="list-style-type: circle;">
40
-<?php printf( __('Build a template for your events - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>archive-espresso_venues.php</strong>','wp-content/themes/twenty-fourteen' ); ?>
40
+<?php printf(__('Build a template for your events - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>archive-espresso_venues.php</strong>', 'wp-content/themes/twenty-fourteen'); ?>
41 41
 </li>
42 42
 <li style="list-style-type: circle;">
43
-<?php printf( __('Build a template for a single event - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>single-espresso_venues.php</strong>','wp-content/themes/twenty-fourteen' ); ?>
43
+<?php printf(__('Build a template for a single event - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>single-espresso_venues.php</strong>', 'wp-content/themes/twenty-fourteen'); ?>
44 44
 </li>
45 45
 </ul>
46 46
 </li>
Please login to merge, or discard this patch.
admin_pages/general_settings/templates/espresso_page_settings.template.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 						</strong>
25 25
 						<?php echo EEH_Template::get_help_tab_link('registration_page_info'); ?>
26 26
 						<br />
27
-						<?php echo General_Settings_Admin_Page::edit_view_links( $reg_page_id );?>
27
+						<?php echo General_Settings_Admin_Page::edit_view_links($reg_page_id); ?>
28 28
 					</label>
29 29
 				</th>
30 30
 				<td>
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
 						<option value="0">
33 33
 							<?php _e('Main Page', 'event_espresso'); ?>
34 34
 						</option>
35
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $reg_page_id ); ?>
35
+						<?php General_Settings_Admin_Page::page_settings_dropdown($reg_page_id); ?>
36 36
 					</select>
37 37
 					<span>
38
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $reg_page_obj, '[ESPRESSO_CHECKOUT]' ); ?>
38
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($reg_page_obj, '[ESPRESSO_CHECKOUT]'); ?>
39 39
 					</span>
40 40
 					<br />
41 41
 					<p class="description">
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 						<?php echo EEH_Template::get_help_tab_link('notify_url_info'); ?>
60 60
 						<br />
61 61
 						<span class="lt-grey-text"><?php _e('Notify URL (processes payments)', 'event_espresso'); ?></span><br/>
62
-						<?php echo General_Settings_Admin_Page::edit_view_links( $txn_page_id );?>
62
+						<?php echo General_Settings_Admin_Page::edit_view_links($txn_page_id); ?>
63 63
 					</label>
64 64
 				</th>
65 65
 				<td>
@@ -67,16 +67,16 @@  discard block
 block discarded – undo
67 67
 						<option value="0">
68 68
 							<?php _e('Main Page', 'event_espresso'); ?>
69 69
 						</option>
70
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $txn_page_id ); ?>
70
+						<?php General_Settings_Admin_Page::page_settings_dropdown($txn_page_id); ?>
71 71
 					</select>
72 72
 					<span>
73
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $txn_page_obj, '[ESPRESSO_TXN_PAGE]' ); ?>
73
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($txn_page_obj, '[ESPRESSO_TXN_PAGE]'); ?>
74 74
 					</span>
75 75
 					<br />
76 76
 					<p class="description">
77 77
 						<?php
78 78
 						echo sprintf(
79
-							__( 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso' ),
79
+							__('This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso'),
80 80
 							'<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_TXN_PAGE]</span>'
81 81
 						);
82 82
 						?>
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 						</strong>
94 94
 						<?php echo EEH_Template::get_help_tab_link('return_url_info'); ?>
95 95
 						<br />
96
-						<?php echo General_Settings_Admin_Page::edit_view_links( $thank_you_page_id );?>
96
+						<?php echo General_Settings_Admin_Page::edit_view_links($thank_you_page_id); ?>
97 97
 					</label>
98 98
 				</th>
99 99
 				<td>
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
 						<option value="0">
102 102
 							<?php _e('Main Page', 'event_espresso'); ?>
103 103
 						</option>
104
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $thank_you_page_id ); ?>
104
+						<?php General_Settings_Admin_Page::page_settings_dropdown($thank_you_page_id); ?>
105 105
 					</select>
106 106
 					<span>
107
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $thank_you_page_obj, '[ESPRESSO_THANK_YOU]' ); ?>
107
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($thank_you_page_obj, '[ESPRESSO_THANK_YOU]'); ?>
108 108
 					</span>
109 109
 					<br />
110 110
 					<p class="description">
111 111
 						<?php
112 112
 						echo sprintf(
113
-							__( 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso' ),
113
+							__('This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso'),
114 114
 							'<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_THANK_YOU]</span>'
115 115
 						);
116 116
 						?>
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 						</strong>
128 128
 						<?php echo EEH_Template::get_help_tab_link('cancel_return_info'); ?>
129 129
 						<br />
130
-						<?php echo General_Settings_Admin_Page::edit_view_links( $cancel_page_id );?>
130
+						<?php echo General_Settings_Admin_Page::edit_view_links($cancel_page_id); ?>
131 131
 					</label>
132 132
 				</th>
133 133
 				<td>
@@ -135,16 +135,16 @@  discard block
 block discarded – undo
135 135
 						<option value="0">
136 136
 							<?php _e('Main Page', 'event_espresso'); ?>
137 137
 						</option>
138
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $cancel_page_id ); ?>
138
+						<?php General_Settings_Admin_Page::page_settings_dropdown($cancel_page_id); ?>
139 139
 					</select>
140 140
 					<span>
141
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $cancel_page_obj, '[ESPRESSO_CANCELLED]' ); ?>
141
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($cancel_page_obj, '[ESPRESSO_CANCELLED]'); ?>
142 142
 					</span>
143 143
 					<br />
144 144
 					<p class="description">
145 145
 						<?php
146 146
 						echo sprintf(
147
-							__( 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain a "cancelled transaction" message and the %s shortcode.', 'event_espresso' ),
147
+							__('This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain a "cancelled transaction" message and the %s shortcode.', 'event_espresso'),
148 148
 							'<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_CANCELLED]</span>'
149 149
 						);
150 150
 						?>
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 						</strong>
162 162
 						<?php echo EEH_Template::get_help_tab_link('event_list_cpt_info'); ?>
163 163
 						<br />
164
-						<a href='<?php echo get_post_type_archive_link('espresso_events') ?>'><?php	_e('View', 'event_espresso');?></a>
164
+						<a href='<?php echo get_post_type_archive_link('espresso_events') ?>'><?php	_e('View', 'event_espresso'); ?></a>
165 165
 					</label>
166 166
 				</th>
167 167
 				<td>
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 						<?php echo __('Events are custom post types and use WordPress\' normal archive pages for displaying events.', 'event_espresso') ?>
170 170
 					</p>
171 171
 					<p class="description">
172
-						<?php printf(__('If you would still like your events on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', 'event_espresso'),'<a href="admin.php?page=espresso_support">','</a>') ?>
172
+						<?php printf(__('If you would still like your events on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', 'event_espresso'), '<a href="admin.php?page=espresso_support">', '</a>') ?>
173 173
 					</p>
174 174
 					<br/><br/>
175 175
 				</td>
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 						</strong>
184 184
 						<?php echo EEH_Template::get_help_tab_link('venue_list_cpt_info'); ?>
185 185
 						<br />
186
-						<a href='<?php echo get_post_type_archive_link('espresso_venues') ?>'><?php	_e('View', 'event_espresso');?></a>
186
+						<a href='<?php echo get_post_type_archive_link('espresso_venues') ?>'><?php	_e('View', 'event_espresso'); ?></a>
187 187
 					</label>
188 188
 				</th>
189 189
 				<td>
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 						<?php echo __('Venues are custom post types and use WordPress\' normal archive pages for displaying events.', 'event_espresso') ?>
192 192
 					</p>
193 193
 					<p class="description">
194
-						<?php printf(__('If you would still like your venues on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', 'event_espresso'),'<a href="admin.php?page=espresso_support">','</a>') ?>
194
+						<?php printf(__('If you would still like your venues on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', 'event_espresso'), '<a href="admin.php?page=espresso_support">', '</a>') ?>
195 195
 					</p>
196 196
 				</td>
197 197
 			</tr>
Please login to merge, or discard this patch.
admin_pages/messages/templates/shortcode_selector_skeleton.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@
 block discarded – undo
7 7
  * @type    string  $fieldname  The name of the field the chooser is associated with.
8 8
  * @type    string  $linked_input_id The name of the input that the shortcode gets inserted to.
9 9
  */
10
-if ( ! empty( $shortcodes ) ) : ?>
10
+if ( ! empty($shortcodes)) : ?>
11 11
 <span class="ee-messages-shortcodes-chooser js-open-list-trigger dashicons dashicons-menu">
12 12
 	<ul id="ee_shortcode_chooser_<?php echo $fieldname; ?>" class="ee_shortcode_chooser_container hidden">
13
-		<?php foreach( $shortcodes as $shortcode => $label ) : ?>
13
+		<?php foreach ($shortcodes as $shortcode => $label) : ?>
14 14
 			<li>
15
-				<span class="js-shortcode-selection" data-value="<?php echo esc_attr( $shortcode ); ?>" data-linked-input-id="<?php echo esc_attr( $linked_input_id ); ?>"><?php echo $shortcode; ?></span>
15
+				<span class="js-shortcode-selection" data-value="<?php echo esc_attr($shortcode); ?>" data-linked-input-id="<?php echo esc_attr($linked_input_id); ?>"><?php echo $shortcode; ?></span>
16 16
 			</li>
17 17
 		<?php endforeach; ?>
18 18
 	</ul>
19 19
 </span>
20
-<?php endif ; ?>
21 20
\ No newline at end of file
21
+<?php endif; ?>
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
admin_pages/venues/Venue_Categories_Admin_List_Table.class.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
 
36 36
 
37 37
 	protected function _setup_data() {
38
-		$this->_data = $this->_admin_page->get_categories( $this->_per_page, $this->_current_page);
39
-		$this->_all_data_count = $this->_admin_page->get_categories( $this->_per_page, $this->_current_page, TRUE );
38
+		$this->_data = $this->_admin_page->get_categories($this->_per_page, $this->_current_page);
39
+		$this->_all_data_count = $this->_admin_page->get_categories($this->_per_page, $this->_current_page, TRUE);
40 40
 	}
41 41
 
42 42
 
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 
46 46
 	protected function _set_properties() {
47 47
 		$this->_wp_list_args = array(
48
-			'singular' => __('venue category', 'event_espresso' ),
49
-			'plural' => __('venue categories', 'event_espresso' ),
48
+			'singular' => __('venue category', 'event_espresso'),
49
+			'plural' => __('venue categories', 'event_espresso'),
50 50
 			'ajax' => TRUE, //for now,
51 51
 			'screen' => $this->_admin_page->get_current_screen()->id
52 52
 			);
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 			);
61 61
 
62 62
 		$this->_sortable_columns = array(
63
-			'id' => array( 'Term.term_id' => true ),
64
-			'name' => array( 'Term.slug' => false ),
65
-			'count' => array( 'term_count' => false )
63
+			'id' => array('Term.term_id' => true),
64
+			'name' => array('Term.slug' => false),
65
+			'count' => array('term_count' => false)
66 66
 			);
67 67
 
68 68
 		$this->_hidden_columns = array();
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
 
94 94
 	public function column_cb($item) {
95
-		return sprintf( '<input type="checkbox" name="VEN_CAT_ID[]" value="%s" />', $item->get('term_id') );
95
+		return sprintf('<input type="checkbox" name="VEN_CAT_ID[]" value="%s" />', $item->get('term_id'));
96 96
 	}
97 97
 
98 98
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
 	public function column_id($item) {
104 104
 		$content = $item->get('term_id');
105
-		$content .= '  <span class="show-on-mobile-view-only">' . $item->get_first_related('Term')->get('name') . '</span>';
105
+		$content .= '  <span class="show-on-mobile-view-only">'.$item->get_first_related('Term')->get('name').'</span>';
106 106
 		return $content;
107 107
 	}
108 108
 
@@ -122,17 +122,17 @@  discard block
 block discarded – undo
122 122
 			'VEN_CAT_ID' => $item->get('term_id')
123 123
 		);
124 124
 
125
-		$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_VENUES_ADMIN_URL );
126
-		$delete_link = EE_Admin_Page::add_query_args_and_nonce( $delete_query_args, EE_VENUES_ADMIN_URL );
125
+		$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_VENUES_ADMIN_URL);
126
+		$delete_link = EE_Admin_Page::add_query_args_and_nonce($delete_query_args, EE_VENUES_ADMIN_URL);
127 127
 
128 128
 		$actions = array(
129
-			'edit' => '<a href="' . $edit_link . '" title="' . esc_attr__('Edit Category', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>'
129
+			'edit' => '<a href="'.$edit_link.'" title="'.esc_attr__('Edit Category', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>'
130 130
 			);
131 131
 
132 132
 
133
-		$actions['delete'] = '<a href="' . $delete_link . '" title="' . esc_attr__('Delete Category', 'event_espresso') . '">' . __('Delete', 'event_espresso') . '</a>';
133
+		$actions['delete'] = '<a href="'.$delete_link.'" title="'.esc_attr__('Delete Category', 'event_espresso').'">'.__('Delete', 'event_espresso').'</a>';
134 134
 
135
-		$content = '<strong><a class="row-title" href="' . $edit_link . '">' . $item->get_first_related('Term')->get('name') . '</a></strong>';
135
+		$content = '<strong><a class="row-title" href="'.$edit_link.'">'.$item->get_first_related('Term')->get('name').'</a></strong>';
136 136
 		$content .= $this->row_actions($actions);
137 137
 		return $content;
138 138
 	}
@@ -141,20 +141,20 @@  discard block
 block discarded – undo
141 141
 
142 142
 
143 143
 	public function column_shortcode($item) {
144
-		$content = '[EVENT_ESPRESSO_CATEGORY category_id="' . $item->get_first_related('Term')->get('slug') . '"]';
144
+		$content = '[EVENT_ESPRESSO_CATEGORY category_id="'.$item->get_first_related('Term')->get('slug').'"]';
145 145
 		return $content;
146 146
 	}
147 147
 
148 148
 
149 149
 
150 150
 
151
-	public function column_count( $item ) {
151
+	public function column_count($item) {
152 152
 		$e_args = array(
153 153
 			'action' => 'default',
154 154
 			'category' => $item->get_first_related('Term')->ID()
155 155
 			);
156
-		$e_link = EE_Admin_Page::add_query_args_and_nonce( $e_args, EE_VENUES_ADMIN_URL );
157
-		$content = '<a href="' . $e_link . '">' . $item->get('term_count') . '</a>';
156
+		$e_link = EE_Admin_Page::add_query_args_and_nonce($e_args, EE_VENUES_ADMIN_URL);
157
+		$content = '<a href="'.$e_link.'">'.$item->get('term_count').'</a>';
158 158
 		return $content;
159 159
 	}
160 160
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
admin_pages/venues/Venues_Admin_List_Table.class.php 2 patches
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 class Venues_Admin_List_Table extends EE_Admin_List_Table {
33 33
 
34
-	public function __construct( $admin_page ) {
34
+	public function __construct($admin_page) {
35 35
 		parent::__construct($admin_page);
36 36
 	}
37 37
 
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
 
41 41
 	protected function _setup_data() {
42
-		$this->_data = $this->_admin_page->get_venues( $this->_per_page);
43
-		$this->_all_data_count = $this->_admin_page->get_venues( $this->_per_page, TRUE );
42
+		$this->_data = $this->_admin_page->get_venues($this->_per_page);
43
+		$this->_all_data_count = $this->_admin_page->get_venues($this->_per_page, TRUE);
44 44
 	}
45 45
 
46 46
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 
50 50
 	protected function _set_properties() {
51 51
 		$this->_wp_list_args = array(
52
-			'singular' => __('Event Venue', 'event_espresso' ),
53
-			'plural' => __('Event Venues', 'event_espresso' ),
52
+			'singular' => __('Event Venue', 'event_espresso'),
53
+			'plural' => __('Event Venues', 'event_espresso'),
54 54
 			'ajax' => TRUE, //for now,
55 55
 			'screen' => $this->_admin_page->get_current_screen()->id
56 56
 			);
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 			);
67 67
 
68 68
 		$this->_sortable_columns = array(
69
-			'id' => array( 'id' => true ),
70
-			'name' => array( 'name' => false ),
71
-			'city' => array( 'city' => false ),
72
-			'capacity' => array( 'capacity' => false )
69
+			'id' => array('id' => true),
70
+			'name' => array('name' => false),
71
+			'city' => array('city' => false),
72
+			'capacity' => array('capacity' => false)
73 73
 			);
74 74
 
75 75
 		$this->_hidden_columns = array();
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
 	protected function _add_view_counts() {
93 93
 		$this->_views['all']['count'] = EEM_Venue::instance()->count();
94
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venues', 'espresso_venues_trash_venues' ) ) {
94
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venues', 'espresso_venues_trash_venues')) {
95 95
 			$this->_views['trash']['count'] = EEM_Venue::instance()->count_deleted();
96 96
 		}
97 97
 	}
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
 	public function column_cb($item) {
105 105
 
106
-		return $item->count_related('Event') > 0 && $item->get( 'status' ) === 'trash' ? '<span class="ee-lock-icon"></span>' : sprintf( '<input type="checkbox" name="venue_id[]" value="%s" />', $item->ID());
106
+		return $item->count_related('Event') > 0 && $item->get('status') === 'trash' ? '<span class="ee-lock-icon"></span>' : sprintf('<input type="checkbox" name="venue_id[]" value="%s" />', $item->ID());
107 107
 	}
108 108
 
109 109
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
 	public function column_id($item) {
113 113
 		$content = $item->ID();
114
-		$content .= '  <span class="show-on-mobile-view-only">' . $item->name() . '</span>';
114
+		$content .= '  <span class="show-on-mobile-view-only">'.$item->name().'</span>';
115 115
 		return $content;
116 116
 	}
117 117
 
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 			'post' => $item->ID()
123 123
 		);
124 124
 
125
-		$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_VENUES_ADMIN_URL );
125
+		$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_VENUES_ADMIN_URL);
126 126
 
127 127
 		$statuses = EEM_Venue::instance()->get_status_array();
128
-		$actions = $this->_column_name_action_setup( $item );
129
-		$content = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_venue', 'espresso_venues_edit', $item->ID() ) ? '<strong><a class="row-title" href="' . $edit_link . '">' . stripslashes_deep($item->name()) . '</a></strong>' : $item->name();
130
-		$content .= $item->status() == 'draft' ? ' - <span class="post-state">' . $statuses['draft'] . '</span>' : '';
128
+		$actions = $this->_column_name_action_setup($item);
129
+		$content = EE_Registry::instance()->CAP->current_user_can('ee_edit_venue', 'espresso_venues_edit', $item->ID()) ? '<strong><a class="row-title" href="'.$edit_link.'">'.stripslashes_deep($item->name()).'</a></strong>' : $item->name();
130
+		$content .= $item->status() == 'draft' ? ' - <span class="post-state">'.$statuses['draft'].'</span>' : '';
131 131
 		$content .= $this->row_actions($actions);
132 132
 		return $content;
133 133
 	}
@@ -138,59 +138,59 @@  discard block
 block discarded – undo
138 138
 	 * @param EE_Venue $item
139 139
 	 * @return array()
140 140
 	 */
141
-	protected function _column_name_action_setup( EE_Venue $item ) {
141
+	protected function _column_name_action_setup(EE_Venue $item) {
142 142
 		$actions = array();
143 143
 
144
-		if ( EE_Registry::instance()->CAP->current_user_can('ee_edit_venue', 'espresso_venues_edit', $item->ID() ) ) {
144
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_venue', 'espresso_venues_edit', $item->ID())) {
145 145
 			$edit_query_args = array(
146 146
 				'action' => 'edit',
147 147
 				'post' => $item->ID()
148 148
 			);
149
-			$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_VENUES_ADMIN_URL );
150
-			$actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr__('Edit Venue', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>';
149
+			$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_VENUES_ADMIN_URL);
150
+			$actions['edit'] = '<a href="'.$edit_link.'" title="'.esc_attr__('Edit Venue', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>';
151 151
 
152 152
 		}
153 153
 
154 154
 
155
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_trash_venue', $item->ID() ) ) {
155
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_trash_venue', $item->ID())) {
156 156
 			$trash_event_query_arg = array(
157 157
 				'action' => 'trash_venue',
158 158
 				'VNU_ID' => $item->ID()
159 159
 			);
160
-			$trash_venue_link = EE_Admin_Page::add_query_args_and_nonce( $trash_event_query_arg, EE_VENUES_ADMIN_URL );
160
+			$trash_venue_link = EE_Admin_Page::add_query_args_and_nonce($trash_event_query_arg, EE_VENUES_ADMIN_URL);
161 161
 		}
162 162
 
163
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_restore_venue', $item->ID() ) ) {
163
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_restore_venue', $item->ID())) {
164 164
 			$restore_venue_query_args = array(
165 165
 				'action' => 'restore_venue',
166 166
 				'VNU_ID' => $item->ID()
167 167
 			);
168
-			$restore_venue_link = EE_Admin_Page::add_query_args_and_nonce( $restore_venue_query_args, EE_VENUES_ADMIN_URL );
168
+			$restore_venue_link = EE_Admin_Page::add_query_args_and_nonce($restore_venue_query_args, EE_VENUES_ADMIN_URL);
169 169
 		}
170 170
 
171
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_delete_venue', $item->ID() ) ) {
171
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_delete_venue', $item->ID())) {
172 172
 			$delete_venue_query_args = array(
173 173
 				'action' => 'delete_venue',
174 174
 				'VNU_ID' => $item->ID()
175 175
 			);
176
-			$delete_venue_link = EE_Admin_Page::add_query_args_and_nonce( $delete_venue_query_args, EE_VENUES_ADMIN_URL );
176
+			$delete_venue_link = EE_Admin_Page::add_query_args_and_nonce($delete_venue_query_args, EE_VENUES_ADMIN_URL);
177 177
 		}
178 178
 
179 179
 		$view_link = get_permalink($item->ID());
180 180
 
181
-		switch ( $item->get( 'status' ) ) {
181
+		switch ($item->get('status')) {
182 182
 			case 'trash' :
183
-				if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_restore_venue', $item->ID() ) ) {
184
-					$actions['restore_from_trash'] = '<a href="' . $restore_venue_link . '" title="' . esc_attr__('Restore from Trash', 'event_espresso') . '">' . __('Restore from Trash', 'event_espresso') . '</a>';
183
+				if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_restore_venue', $item->ID())) {
184
+					$actions['restore_from_trash'] = '<a href="'.$restore_venue_link.'" title="'.esc_attr__('Restore from Trash', 'event_espresso').'">'.__('Restore from Trash', 'event_espresso').'</a>';
185 185
 				}
186
-				if (  $item->count_related('Event') === 0 && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_delete_venue', $item->ID() ) ) {
187
-					$actions['delete permanently'] = '<a href="' . $delete_venue_link . '" title="' . esc_attr__('Delete Permanently', 'event_espresso') . '">' . __('Delete Permanently', 'event_espresso') . '</a>';
186
+				if ($item->count_related('Event') === 0 && EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_delete_venue', $item->ID())) {
187
+					$actions['delete permanently'] = '<a href="'.$delete_venue_link.'" title="'.esc_attr__('Delete Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>';
188 188
 				}
189 189
 				break;
190 190
 			default :
191
-				$actions['view'] = '<a href="' . $view_link . '" title="' . esc_attr__('View Venue', 'event_espresso') . '">' . __('View', 'event_espresso') . '</a>';
192
-				if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_trash_venue', $item->ID() ) ) {
193
-					$actions['move to trash'] = '<a href="' . $trash_venue_link . '" title="' . esc_attr__('Trash Event', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>';
191
+				$actions['view'] = '<a href="'.$view_link.'" title="'.esc_attr__('View Venue', 'event_espresso').'">'.__('View', 'event_espresso').'</a>';
192
+				if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_trash_venue', $item->ID())) {
193
+					$actions['move to trash'] = '<a href="'.$trash_venue_link.'" title="'.esc_attr__('Trash Event', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>';
194 194
 				}
195 195
 		}
196 196
 		return $actions;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 
218 218
 
219 219
 	public function column_shortcode($item) {
220
-		$content = '[ESPRESSO_VENUE id=' . $item->ID() . ']';
220
+		$content = '[ESPRESSO_VENUE id='.$item->ID().']';
221 221
 		return $content;
222 222
 	}
223 223
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.