Completed
Branch FET-7988-evertec-needs (20e248)
by
unknown
160:11 queued 146:10
created
help_tours/Registration_Form_Edit_Question_Help_Tour.class.php 2 patches
Spacing   +9 added lines, -9 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
 /**
@@ -98,34 +98,34 @@  discard block
 block discarded – undo
98 98
 
99 99
 
100 100
 	protected function _start() {
101
-		$content = '<h3>' . __('Edit Question', 'event_espresso') . '</h3>';
102
-		$content .= '<p>' . __('This tour of the Edit Question page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
101
+		$content = '<h3>'.__('Edit Question', 'event_espresso').'</h3>';
102
+		$content .= '<p>'.__('This tour of the Edit Question page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
103 103
 		
104 104
 		return $content;
105 105
 	}
106 106
 
107 107
 	protected function _qst_display_text_stop() {
108
-		return '<p>' . __('This is the question that is displayed to registrants who are signing up for events.', 'event_espresso') . '</p>';
108
+		return '<p>'.__('This is the question that is displayed to registrants who are signing up for events.', 'event_espresso').'</p>';
109 109
 	}
110 110
 
111 111
 	protected function _qst_admin_label_stop() {
112
-		return '<p>' . __('Helps you understand the difference between questions that may appear similar but are actually different.', 'event_espresso') . '</p>';
112
+		return '<p>'.__('Helps you understand the difference between questions that may appear similar but are actually different.', 'event_espresso').'</p>';
113 113
 	}
114 114
 
115 115
 	protected function _qst_admin_only_stop() {
116
-		return '<p>' . __('Specify whether this question should be shown only to the admins.', 'event_espresso') . '</p>';
116
+		return '<p>'.__('Specify whether this question should be shown only to the admins.', 'event_espresso').'</p>';
117 117
 	}
118 118
 
119 119
 	protected function _qst_type_stop() {
120
-		return '<p>' . __('Select the type of question. Available options are text, textarea, single, multiple, dropdown, and date.', 'event_espresso') . '</p>';
120
+		return '<p>'.__('Select the type of question. Available options are text, textarea, single, multiple, dropdown, and date.', 'event_espresso').'</p>';
121 121
 	}
122 122
 
123 123
 	protected function _qst_required_stop() {
124
-		return '<p>' . __('Specify whether this question should be required.', 'event_espresso') . '</p>';
124
+		return '<p>'.__('Specify whether this question should be required.', 'event_espresso').'</p>';
125 125
 	}
126 126
 
127 127
 	protected function _qst_required_text_stop() {
128
-		return '<p>' . __('Text to display when registrant does not answer question but is required to.', 'event_espresso') . '</p>';
128
+		return '<p>'.__('Text to display when registrant does not answer question but is required to.', 'event_espresso').'</p>';
129 129
 	}
130 130
 
131 131
 }
132 132
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
help_tours/Registration_Form_Question_Groups_Help_Tour.class.php 2 patches
Spacing   +14 added lines, -14 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
 /**
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 				)
43 43
 			);
44 44
 
45
-		if ( $this->_is_caf ) {
45
+		if ($this->_is_caf) {
46 46
 			$this->_stops[15] = array(
47 47
 				'id' => 'id',
48 48
 				'content' => $this->_id_stop(),
@@ -111,45 +111,45 @@  discard block
 block discarded – undo
111 111
 
112 112
 
113 113
 	protected function _start() {
114
-		$content = '<h3>' . __('Question Groups', 'event_espresso') . '</h3>';
115
-		if ( $this->_is_caf ) {
116
-			$content .= '<p>' . __('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
114
+		$content = '<h3>'.__('Question Groups', 'event_espresso').'</h3>';
115
+		if ($this->_is_caf) {
116
+			$content .= '<p>'.__('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
117 117
 		} else {
118
-			$content .= '<p>' . __('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.', 'event_espresso') . '</p>';
118
+			$content .= '<p>'.__('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.', 'event_espresso').'</p>';
119 119
 		}
120 120
 		
121 121
 		return $content;
122 122
 	}
123 123
 
124 124
 	protected function _id_stop() {
125
-		return '<p>' . __('View the ID of the question group. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
125
+		return '<p>'.__('View the ID of the question group. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
126 126
 	}
127 127
 
128 128
 	protected function _name_stop() {
129
-		return '<p>' . __('View available questions groups. You can reorder your questions by dragging and dropping them.', 'event_espresso') . '</p>';
129
+		return '<p>'.__('View available questions groups. You can reorder your questions by dragging and dropping them.', 'event_espresso').'</p>';
130 130
 	}
131 131
 
132 132
 	protected function _description_stop() {
133
-		return '<p>' . __('View the question group description.', 'event_espresso') . '</p>';
133
+		return '<p>'.__('View the question group description.', 'event_espresso').'</p>';
134 134
 	}
135 135
 
136 136
 	protected function _show_group_name_stop() {
137
-		return '<p>' . __('View if the name of the question group should be shown to customers.', 'event_espresso') . '</p>';
137
+		return '<p>'.__('View if the name of the question group should be shown to customers.', 'event_espresso').'</p>';
138 138
 	}
139 139
 
140 140
 	protected function _show_group_description_stop() {
141
-		return '<p>' . __('View if the description of the question group should be shown to customers.', 'event_espresso') . '</p>';
141
+		return '<p>'.__('View if the description of the question group should be shown to customers.', 'event_espresso').'</p>';
142 142
 	}
143 143
 
144 144
 	protected function _bulk_actions_stop() {
145
-		return '<p>' . __('Perform bulk actions to multiple question groups.', 'event_espresso') . '</p>';
145
+		return '<p>'.__('Perform bulk actions to multiple question groups.', 'event_espresso').'</p>';
146 146
 	}
147 147
 
148 148
 	protected function _search_stop() {
149
-		return '<p>' . __('Search through questions. The following sources will be searched: question group name and question group description.', 'event_espresso') . '</p>';
149
+		return '<p>'.__('Search through questions. The following sources will be searched: question group name and question group description.', 'event_espresso').'</p>';
150 150
 	}
151 151
 
152 152
 	protected function _add_new_question_group_stop() {
153
-		return '<p>' . __('Click here to create a new question group.', 'event_espresso') . '</p>';
153
+		return '<p>'.__('Click here to create a new question group.', 'event_espresso').'</p>';
154 154
 	}
155 155
 }
156 156
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
registration_form/help_tours/Registration_Form_Settings_Help_Tour.class.php 2 patches
Spacing   +9 added lines, -9 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
 /**
@@ -98,34 +98,34 @@  discard block
 block discarded – undo
98 98
 
99 99
 
100 100
 	protected function _start() {
101
-		$content = '<h3>' . __('Registration Form Settings', 'event_espresso') . '</h3>';
102
-		$content .= '<p>' . __('This tour of the Registration Form Settings page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
101
+		$content = '<h3>'.__('Registration Form Settings', 'event_espresso').'</h3>';
102
+		$content .= '<p>'.__('This tour of the Registration Form Settings page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
103 103
 		
104 104
 		return $content;
105 105
 	}
106 106
 
107 107
 	protected function _use_recaptcha_stop() {
108
-		return '<p>' . __('Specify whether reCAPTCHA should be enabled.', 'event_espresso') . '</p>';
108
+		return '<p>'.__('Specify whether reCAPTCHA should be enabled.', 'event_espresso').'</p>';
109 109
 	}
110 110
 
111 111
 	protected function _recaptcha_public_key_stop() {
112
-		return '<p>' . __('Enter your public key for reCAPTCHA.', 'event_espresso') . '</p>';
112
+		return '<p>'.__('Enter your public key for reCAPTCHA.', 'event_espresso').'</p>';
113 113
 	}
114 114
 
115 115
 	protected function _recaptcha_private_key_stop() {
116
-		return '<p>' . __('Enter your private key for reCAPTCHA.', 'event_espresso') . '</p>';
116
+		return '<p>'.__('Enter your private key for reCAPTCHA.', 'event_espresso').'</p>';
117 117
 	}
118 118
 
119 119
 	protected function _recaptcha_theme_stop() {
120
-		return '<p>' . __('Select a theme (style) for your reCAPTCHA.', 'event_espresso') . '</p>';
120
+		return '<p>'.__('Select a theme (style) for your reCAPTCHA.', 'event_espresso').'</p>';
121 121
 	}
122 122
 
123 123
 	protected function _recaptcha_language_stop() {
124
-		return '<p>' . __('Specify the language that should be used for reCAPTCHA.', 'event_espresso') . '</p>';
124
+		return '<p>'.__('Specify the language that should be used for reCAPTCHA.', 'event_espresso').'</p>';
125 125
 	}
126 126
 
127 127
 	protected function _recaptcha_width_stop() {
128
-		return '<p>' . __('Specify how wide (in pixels) the reCAPTCHA form should be.', 'event_espresso') . '</p>';
128
+		return '<p>'.__('Specify how wide (in pixels) the reCAPTCHA form should be.', 'event_espresso').'</p>';
129 129
 	}
130 130
 
131 131
 }
132 132
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
admin_pages/registrations/EE_Attendee_Contact_List_Table.class.php 2 patches
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 class EE_Attendee_Contact_List_Table extends EE_Admin_List_Table {
5 5
 
6 6
 
7
-	public function __construct( $admin_page ) {
7
+	public function __construct($admin_page) {
8 8
 		parent::__construct($admin_page);
9 9
 	}
10 10
 
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 
13 13
 
14 14
 	protected function _setup_data() {
15
-		$this->_data = $this->_view != 'trash' ? $this->_admin_page->get_attendees( $this->_per_page ) : $this->_admin_page->get_attendees( $this->_per_page, FALSE, TRUE );
16
-		$this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_attendees( $this->_per_page, TRUE ) : $this->_admin_page->get_attendees( $this->_per_page,TRUE, TRUE );
15
+		$this->_data = $this->_view != 'trash' ? $this->_admin_page->get_attendees($this->_per_page) : $this->_admin_page->get_attendees($this->_per_page, FALSE, TRUE);
16
+		$this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_attendees($this->_per_page, TRUE) : $this->_admin_page->get_attendees($this->_per_page, TRUE, TRUE);
17 17
 	}
18 18
 
19 19
 
@@ -41,13 +41,13 @@  discard block
 block discarded – undo
41 41
 			);
42 42
 
43 43
 		$this->_sortable_columns = array(
44
-			'ATT_ID' => array( 'ATT_ID' => FALSE ),
45
-			'ATT_lname' => array( 'ATT_lname' => TRUE ), //true means its already sorted
46
-			'ATT_fname' => array( 'ATT_fname' => FALSE ),
47
-			'ATT_email' => array( 'ATT_email' => FALSE ),
48
-			'ATT_city' => array( 'ATT_city' => FALSE ),
49
-			'STA_ID' => array( 'STA_ID' => FALSE ),
50
-			'CNT_ISO' => array( 'CNT_ISO' => FALSE )
44
+			'ATT_ID' => array('ATT_ID' => FALSE),
45
+			'ATT_lname' => array('ATT_lname' => TRUE), //true means its already sorted
46
+			'ATT_fname' => array('ATT_fname' => FALSE),
47
+			'ATT_email' => array('ATT_email' => FALSE),
48
+			'ATT_city' => array('ATT_city' => FALSE),
49
+			'STA_ID' => array('STA_ID' => FALSE),
50
+			'CNT_ISO' => array('CNT_ISO' => FALSE)
51 51
 		);
52 52
 
53 53
 		$this->_hidden_columns = array();
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
 
65 65
 
66 66
 	protected function _add_view_counts() {
67
-		$this->_views['in_use']['count'] = $this->_admin_page->get_attendees( $this->_per_page, TRUE );
68
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_contacts', 'espresso_registrations_delete_registration' ) ) {
69
-			$this->_views['trash']['count'] = $this->_admin_page->get_attendees( $this->_per_page,TRUE, TRUE );
67
+		$this->_views['in_use']['count'] = $this->_admin_page->get_attendees($this->_per_page, TRUE);
68
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_delete_registration')) {
69
+			$this->_views['trash']['count'] = $this->_admin_page->get_attendees($this->_per_page, TRUE, TRUE);
70 70
 		}
71 71
 	}
72 72
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 
91 91
 	function column_cb($item) {
92
-		return sprintf( '<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID() );
92
+		return sprintf('<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID());
93 93
 	}
94 94
 
95 95
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
 
99 99
 	function column_ATT_ID($item) {
100
-		return '<div>' . $item->ID() . '</div>';
100
+		return '<div>'.$item->ID().'</div>';
101 101
 	}
102 102
 
103 103
 
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
 	function column_ATT_lname($item) {
108 108
 
109 109
 		// edit attendee link
110
-		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$item->ID() ), REG_ADMIN_URL );
111
-		$name_link = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_contacts', 'espresso_registrations_edit_attendee' ) ?  '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact', 'event_espresso' ) . '">' . $item->lname() . '</a>' : $item->lname();
110
+		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$item->ID()), REG_ADMIN_URL);
111
+		$name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact', 'event_espresso').'">'.$item->lname().'</a>' : $item->lname();
112 112
 		return $name_link;
113 113
 
114 114
 	}
@@ -121,30 +121,30 @@  discard block
 block discarded – undo
121 121
 		//Build row actions
122 122
 		$actions = array();
123 123
 		// edit attendee link
124
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_contacts', 'espresso_registrations_edit_attendee' ) ) {
125
-			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$item->ID() ), REG_ADMIN_URL );
126
-			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact', 'event_espresso' ) . '">' . __( 'Edit', 'event_espresso' ) . '</a>';
124
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee')) {
125
+			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$item->ID()), REG_ADMIN_URL);
126
+			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>';
127 127
 		}
128 128
 
129
-		if ( $this->_view == 'in_use' ) {
129
+		if ($this->_view == 'in_use') {
130 130
 			// trash attendee link
131
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_contacts', 'espresso_registrations_trash_attendees' ) ) {
132
-				$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'trash_attendees', 'ATT_ID'=>$item->ID() ), REG_ADMIN_URL );
133
-				$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="' . esc_attr__( 'Move Contact to Trash', 'event_espresso' ) . '">' . __( 'Trash', 'event_espresso' ) . '</a>';
131
+			if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_trash_attendees')) {
132
+				$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'trash_attendees', 'ATT_ID'=>$item->ID()), REG_ADMIN_URL);
133
+				$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Move Contact to Trash', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>';
134 134
 			}
135 135
 		} else {
136
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_contacts', 'espresso_registrations_restore_attendees' ) ) {
136
+			if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_restore_attendees')) {
137 137
 				// restore attendee link
138
-				$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_attendees', 'ATT_ID'=>$item->ID() ), REG_ADMIN_URL );
139
-				$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Contact', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>';
138
+				$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_attendees', 'ATT_ID'=>$item->ID()), REG_ADMIN_URL);
139
+				$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Contact', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>';
140 140
 			}
141 141
 		}
142 142
 
143
-		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$item->ID() ), REG_ADMIN_URL );
144
-		$name_link = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_contacts', 'espresso_registrations_edit_attendee' ) ?  '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact', 'event_espresso' ) . '">' . $item->fname() . '</a>' : $item->fname();
143
+		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$item->ID()), REG_ADMIN_URL);
144
+		$name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact', 'event_espresso').'">'.$item->fname().'</a>' : $item->fname();
145 145
 
146 146
 		//Return the name contents
147
-		return sprintf('%1$s %2$s', $name_link, $this->row_actions($actions) );
147
+		return sprintf('%1$s %2$s', $name_link, $this->row_actions($actions));
148 148
 	}
149 149
 
150 150
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
 
154 154
 	function column_ATT_email($item) {
155
-		return '<a href="mailto:' . $item->email() . '">' . $item->email() . '</a>';
155
+		return '<a href="mailto:'.$item->email().'">'.$item->email().'</a>';
156 156
 	}
157 157
 
158 158
 
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
 
173 173
 	function column_STA_ID($item) {
174 174
 		$states = EEM_State::instance()->get_all_states();
175
-		$state = isset( $states[ $item->state_ID() ] ) ? $states[ $item->state_ID() ]->get( 'STA_name' ) : $item->state_ID();
176
-		return ! is_numeric( $state ) ? $state : '';
175
+		$state = isset($states[$item->state_ID()]) ? $states[$item->state_ID()]->get('STA_name') : $item->state_ID();
176
+		return ! is_numeric($state) ? $state : '';
177 177
 	}
178 178
 
179 179
 
@@ -181,8 +181,8 @@  discard block
 block discarded – undo
181 181
 	function column_CNT_ISO($item) {
182 182
 		$countries = EEM_Country::instance()->get_all_countries();
183 183
 		//EEH_Debug_Tools::printr( $countries, '$countries  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
184
-		$country = isset( $countries[ $item->country_ID() ] ) ? $countries[ $item->country_ID() ]->get( 'CNT_name' ) : $item->country_ID();
185
-		return ! is_numeric( $country ) ? $country : '';
184
+		$country = isset($countries[$item->country_ID()]) ? $countries[$item->country_ID()]->get('CNT_name') : $item->country_ID();
185
+		return ! is_numeric($country) ? $country : '';
186 186
 	}
187 187
 
188 188
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
admin_pages/registrations/Registrations_Admin_Page.core.php 4 patches
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 
125 125
 	/**
126 126
 	 * 		grab url requests and route them
127
-	*		@access private
128
-	*		@return void
129
-	*/
127
+	 *		@access private
128
+	 *		@return void
129
+	 */
130 130
 	public function _set_page_routes() {
131 131
 
132 132
 		$this->_get_registration_status_array();
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 						'title' => __('Registrations Other', 'event_espresso'),
399 399
 						'filename' => 'registrations_overview_other'
400 400
 					)
401
-                ),
401
+				),
402 402
 				'help_tour' => array( 'Registration_Overview_Help_Tour' ),
403 403
 				'qtips' => array('Registration_List_Table_Tips'),
404 404
 				'list_table' => 'EE_Registrations_List_Table',
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 					'url' => isset($this->_req_data['_REG_ID']) ? add_query_arg(array('_REG_ID' => $this->_req_data['_REG_ID'] ), $this->_current_page_view_url )  : $this->_admin_base_url,
413 413
 					'persistent' => FALSE
414 414
 					),
415
-                'help_tabs' => array(
415
+				'help_tabs' => array(
416 416
 					'registrations_details_help_tab' => array(
417 417
 						'title' => __('Registration Details', 'event_espresso'),
418 418
 						'filename' => 'registrations_details'
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
 					'order' => 20
477 477
 					),
478 478
 				'list_table' => 'EE_Attendee_Contact_List_Table',
479
-                'help_tabs' => array(
479
+				'help_tabs' => array(
480 480
 					'registrations_contact_list_help_tab' => array(
481 481
 						'title' => __('Registrations Contact List', 'event_espresso'),
482 482
 						'filename' => 'registrations_contact_list'
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 						'title' => __('Contact List Other', 'event_espresso'),
494 494
 						'filename' => 'registrations_contact_list_other'
495 495
 					)
496
-                ),
496
+				),
497 497
 				'help_tour' => array( 'Contact_List_Help_Tour' ),
498 498
 				'metaboxes' => array(),
499 499
 				'require_nonce' => FALSE
@@ -527,9 +527,9 @@  discard block
 block discarded – undo
527 527
 
528 528
 	/**
529 529
 	 * 		get list of registration statuses
530
-	*		@access private
531
-	*		@return void
532
-	*/
530
+	 *		@access private
531
+	 *		@return void
532
+	 */
533 533
 	private function _get_registration_status_array() {
534 534
 		self::$_reg_status = EEM_Registration::reg_status_array( array(), TRUE);
535 535
 	}
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
 			return TRUE;
831 831
 		}
832 832
 
833
-	    $REG = EEM_Registration::instance();
833
+		$REG = EEM_Registration::instance();
834 834
 
835 835
 		$REG_ID = ( ! empty( $this->_req_data['_REG_ID'] )) ? absint( $this->_req_data['_REG_ID'] ) : FALSE;
836 836
 
@@ -1051,9 +1051,9 @@  discard block
 block discarded – undo
1051 1051
 
1052 1052
 	/**
1053 1053
 	 * 		generates HTML for the View Registration Details Admin page
1054
-	*		@access protected
1055
-	*		@return void
1056
-	*/
1054
+	 *		@access protected
1055
+	 *		@return void
1056
+	 */
1057 1057
 	protected function _registration_details() {
1058 1058
 
1059 1059
 		$this->_template_args = array();
@@ -1130,9 +1130,9 @@  discard block
 block discarded – undo
1130 1130
 
1131 1131
 	/**
1132 1132
 	 * 		_set_approve_or_decline_reg_status_buttons
1133
-	*		@access protected
1134
-	*		@return string
1135
-	*/
1133
+	 *		@access protected
1134
+	 *		@return string
1135
+	 */
1136 1136
 	public function set_reg_status_buttons_metabox() {
1137 1137
 
1138 1138
 		//is registration for free event OR for a completed transaction? This will determine whether the set to pending option is shown.
@@ -1321,10 +1321,10 @@  discard block
 block discarded – undo
1321 1321
 
1322 1322
 	/**
1323 1323
 	 * 		approve_registration
1324
-	*		@access protected
1325
-	*		@param bool $notify whether or not to notify the registrant about their approval.
1326
-	*		@return void
1327
-	*/
1324
+	 *		@access protected
1325
+	 *		@param bool $notify whether or not to notify the registrant about their approval.
1326
+	 *		@return void
1327
+	 */
1328 1328
 	protected function approve_registration( $notify = false ) {
1329 1329
 		$this->_reg_status_change_return( EEM_Registration::status_id_approved, $notify );
1330 1330
 	}
@@ -1334,10 +1334,10 @@  discard block
 block discarded – undo
1334 1334
 
1335 1335
 	/**
1336 1336
 	 * 		decline_registration
1337
-	*		@access protected
1338
-	*		@param bool $notify whether or not to notify the registrant about their approval.
1339
-	*		@return void
1340
-	*/
1337
+	 *		@access protected
1338
+	 *		@param bool $notify whether or not to notify the registrant about their approval.
1339
+	 *		@return void
1340
+	 */
1341 1341
 	protected function decline_registration( $notify = false ) {
1342 1342
 		$this->_reg_status_change_return( EEM_Registration::status_id_declined, $notify );
1343 1343
 	}
@@ -1347,10 +1347,10 @@  discard block
 block discarded – undo
1347 1347
 
1348 1348
 	/**
1349 1349
 	 * 		cancel_registration
1350
-	*		@access protected
1351
-	*		@param bool $notify whether or not to notify the registrant about their approval.
1352
-	*		@return void
1353
-	*/
1350
+	 *		@access protected
1351
+	 *		@param bool $notify whether or not to notify the registrant about their approval.
1352
+	 *		@return void
1353
+	 */
1354 1354
 	protected function cancel_registration( $notify = false ) {
1355 1355
 		$this->_reg_status_change_return( EEM_Registration::status_id_cancelled, $notify );
1356 1356
 	}
@@ -1361,10 +1361,10 @@  discard block
 block discarded – undo
1361 1361
 
1362 1362
 	/**
1363 1363
 	 * 		not_approve_registration
1364
-	*		@access protected
1365
-	*		@param bool $notify whether or not to notify the registrant about their approval.
1366
-	*		@return void
1367
-	*/
1364
+	 *		@access protected
1365
+	 *		@param bool $notify whether or not to notify the registrant about their approval.
1366
+	 *		@return void
1367
+	 */
1368 1368
 	protected function not_approve_registration( $notify = false ) {
1369 1369
 		$this->_reg_status_change_return( EEM_Registration::status_id_not_approved, $notify );
1370 1370
 	}
@@ -1373,10 +1373,10 @@  discard block
 block discarded – undo
1373 1373
 
1374 1374
 	/**
1375 1375
 	 * 		decline_registration
1376
-	*		@access protected
1377
-	*		@param bool $notify whether or not to notify the registrant about their approval.
1378
-	*		@return void
1379
-	*/
1376
+	 *		@access protected
1377
+	 *		@param bool $notify whether or not to notify the registrant about their approval.
1378
+	 *		@return void
1379
+	 */
1380 1380
 	protected function pending_registration( $notify = false ) {
1381 1381
 		$this->_reg_status_change_return( EEM_Registration::status_id_pending_payment, $notify );
1382 1382
 	}
@@ -1386,9 +1386,9 @@  discard block
 block discarded – undo
1386 1386
 
1387 1387
 	/**
1388 1388
 	 * 		generates HTML for the Registration main meta box
1389
-	*		@access public
1390
-	*		@return void
1391
-	*/
1389
+	 *		@access public
1390
+	 *		@return void
1391
+	 */
1392 1392
 	public function _reg_details_meta_box() {
1393 1393
 		EEH_Autoloader::register_line_item_display_autoloaders();
1394 1394
 		EEH_Autoloader::register_line_item_filter_autoloaders();
@@ -1471,9 +1471,9 @@  discard block
 block discarded – undo
1471 1471
 
1472 1472
 	/**
1473 1473
 	 * 		generates HTML for the Registration Questions meta box
1474
-	*		@access public
1475
-	*		@return void
1476
-	*/
1474
+	 *		@access public
1475
+	 *		@return void
1476
+	 */
1477 1477
 	public function _reg_questions_meta_box() {
1478 1478
 
1479 1479
 		add_filter( 'FHEE__EEH_Form_Fields__generate_question_groups_html__before_question_group_questions', array( $this, 'form_before_question_group' ), 10, 1 );
@@ -1581,9 +1581,9 @@  discard block
 block discarded – undo
1581 1581
 
1582 1582
 	/**
1583 1583
 	 * 		generates HTML for the Registration main meta box
1584
-	*		@access protected
1585
-	*		@return void
1586
-	*/
1584
+	 *		@access protected
1585
+	 *		@return void
1586
+	 */
1587 1587
 	protected function _update_attendee_registration_form() {
1588 1588
 		$qstns = isset( $this->_req_data['qstn'] ) ? $this->_req_data['qstn'] : FALSE;
1589 1589
 		$REG_ID = isset( $this->_req_data['_REG_ID'] ) ? absint( $this->_req_data['_REG_ID'] ) : FALSE;
@@ -1665,12 +1665,12 @@  discard block
 block discarded – undo
1665 1665
 
1666 1666
 	/**
1667 1667
 	 * 		generates HTML for the Registration main meta box
1668
-	*		@access public
1669
-	*		@return void
1670
-	*/
1668
+	 *		@access public
1669
+	 *		@return void
1670
+	 */
1671 1671
 	public function _reg_attendees_meta_box() {
1672 1672
 
1673
-	    $REG = EEM_Registration::instance();
1673
+		$REG = EEM_Registration::instance();
1674 1674
 		//get all other registrations on this transaction, and cache
1675 1675
 		//the attendees for them so we don't have to run another query using force_join
1676 1676
 		$registrations = $REG->get_all(array(
@@ -1723,9 +1723,9 @@  discard block
 block discarded – undo
1723 1723
 
1724 1724
 	/**
1725 1725
 	 * 		generates HTML for the Edit Registration side meta box
1726
-	*		@access public
1727
-	*		@return void
1728
-	*/
1726
+	 *		@access public
1727
+	 *		@return void
1728
+	 */
1729 1729
 	public function _reg_registrant_side_meta_box() {
1730 1730
 
1731 1731
 		/*@var $attendee EE_Attendee */
@@ -2071,9 +2071,9 @@  discard block
 block discarded – undo
2071 2071
 
2072 2072
 	/**
2073 2073
 	 * 		set_reg_event
2074
-	*		@access private
2075
-	*		@return boolean
2076
-	*/
2074
+	 *		@access private
2075
+	 *		@return boolean
2076
+	 */
2077 2077
 	private function _set_reg_event() {
2078 2078
 		if ( is_object( $this->_reg_event )) {
2079 2079
 			return TRUE;
@@ -2177,9 +2177,9 @@  discard block
 block discarded – undo
2177 2177
 
2178 2178
 	/**
2179 2179
 	 * 		generates HTML for the Attendee Contact List
2180
-	*		@access protected
2181
-	*		@return void
2182
-	*/
2180
+	 *		@access protected
2181
+	 *		@return void
2182
+	 */
2183 2183
 	protected function _attendee_contact_list_table() {
2184 2184
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
2185 2185
 		$this->_search_btn_label = __('Contacts', 'event_espresso');
@@ -2193,9 +2193,9 @@  discard block
 block discarded – undo
2193 2193
 	/**
2194 2194
 	 * 		get_attendees
2195 2195
 	 * 		@param bool $count whether to return count or data.
2196
-	*		@access public
2197
-	*		@return array
2198
-	*/
2196
+	 *		@access public
2197
+	 *		@return array
2198
+	 */
2199 2199
 	public function get_attendees( $per_page, $count = FALSE, $trash = FALSE ) {
2200 2200
 
2201 2201
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
@@ -2513,9 +2513,9 @@  discard block
 block discarded – undo
2513 2513
 
2514 2514
 	/**
2515 2515
 	 * 		_attendee_details
2516
-	*		@access protected
2517
-	*		@return void
2518
-	*/
2516
+	 *		@access protected
2517
+	 *		@return void
2518
+	 */
2519 2519
 	public function attendee_registrations_meta_box( $post ) {
2520 2520
 
2521 2521
 		$this->_template_args['attendee'] = $this->_cpt_model_obj;
@@ -2548,10 +2548,10 @@  discard block
 block discarded – undo
2548 2548
 
2549 2549
 	/**
2550 2550
 	 * 		_trash_or_restore_attendee
2551
-	*		@param boolean 		$trash - whether to move item to trash (TRUE) or restore it (FALSE)
2552
-	*		@access protected
2553
-	*		@return void
2554
-	*/
2551
+	 *		@param boolean 		$trash - whether to move item to trash (TRUE) or restore it (FALSE)
2552
+	 *		@access protected
2553
+	 *		@return void
2554
+	 */
2555 2555
 	protected function _trash_or_restore_attendees( $trash = TRUE ) {
2556 2556
 
2557 2557
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
Please login to merge, or discard this patch.
Braces   +30 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
@@ -79,8 +81,9 @@  discard block
 block discarded – undo
79 81
 	public function clear_comment_link( $link, $comment, $args ) {
80 82
 		//gotta make sure this only happens on this route
81 83
 		$post_type = get_post_type( $comment->comment_post_ID);
82
-		if ( $post_type == 'espresso_attendees' )
83
-			return '#commentsdiv';
84
+		if ( $post_type == 'espresso_attendees' ) {
85
+					return '#commentsdiv';
86
+		}
84 87
 		return $link;
85 88
 	}
86 89
 
@@ -834,9 +837,9 @@  discard block
 block discarded – undo
834 837
 
835 838
 		$REG_ID = ( ! empty( $this->_req_data['_REG_ID'] )) ? absint( $this->_req_data['_REG_ID'] ) : FALSE;
836 839
 
837
-		if ( $this->_registration = $REG->get_one_by_ID( $REG_ID ))
838
-			return TRUE;
839
-		else {
840
+		if ( $this->_registration = $REG->get_one_by_ID( $REG_ID )) {
841
+					return TRUE;
842
+		} else {
840 843
 			$error_msg = sprintf( __('An error occurred and the details for Registration ID #%s could not be retrieved.', 'event_espresso'), $REG_ID );
841 844
 			EE_Error::add_error( $error_msg, __FILE__, __FUNCTION__, __LINE__ );
842 845
 			$this->_registration = NULL;
@@ -933,7 +936,7 @@  discard block
 block discarded – undo
933 936
 					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $curdate . $time_start, 'Y-m-d H:i:s' ),
934 937
 					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $curdate . $time_end, 'Y-m-d H:i:s' ),
935 938
 			));
936
-		}elseif($this_month_a || $this_month){
939
+		} elseif($this_month_a || $this_month){
937 940
 			$this_month_r = date('m', current_time('timestamp'));
938 941
 			$days_this_month = date( 't', current_time('timestamp') );
939 942
 			$_where['REG_date']= array('BETWEEN',
@@ -941,18 +944,18 @@  discard block
 block discarded – undo
941 944
 					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $this_year_r . '-' . $this_month_r . '-01' . ' ' . $time_start, 'Y-m-d H:i:s' ),
942 945
 					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $this_year_r . '-' . $this_month_r . '-' . $days_this_month . ' ' . $time_end, 'Y-m-d H:i:s' )
943 946
 			));
944
-		}elseif($month_range){
947
+		} elseif($month_range){
945 948
 			$pieces = explode(' ', $this->_req_data['month_range'], 3);
946 949
 			$month_r = !empty($pieces[0]) ? date('m', strtotime($pieces[0])) : '';
947 950
 			$year_r = !empty($pieces[1]) ? $pieces[1] : '';
948 951
 			$days_in_month = date('t', strtotime($year_r .  '-' . $month_r . '-' . '01') );
949 952
 			$_where['REG_date']= array('BETWEEN',
950 953
 				array(  EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $year_r . '-' . $month_r . '-01 00:00:00', 'Y-m-d H:i:s'), EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $year_r . '-' . $month_r . '-' . $days_in_month .  ' 23:59:59', 'Y-m-d H:i:s' ) ) );
951
-		}elseif($start_date && $end_date){
954
+		} elseif($start_date && $end_date){
952 955
 			throw new EE_Error("not yet supported");
953
-		}elseif($start_date){
956
+		} elseif($start_date){
954 957
 			throw new EE_Error("not yet supported");
955
-		}elseif($end_date){
958
+		} elseif($end_date){
956 959
 			throw new EE_Error("not yet supported");
957 960
 		}
958 961
 
@@ -1876,8 +1879,9 @@  discard block
 block discarded – undo
1876 1879
 			// cycle thru checkboxes
1877 1880
 			while (list( $ind, $REG_ID ) = each($this->_req_data['_REG_ID'])) {
1878 1881
 				$REG = $REG_MDL->get_one_by_ID($REG_ID);
1879
-				if ( ! $REG instanceof EE_Registration )
1880
-					continue;
1882
+				if ( ! $REG instanceof EE_Registration ) {
1883
+									continue;
1884
+				}
1881 1885
 				$deleted = $this->_delete_registration($REG);
1882 1886
 				if ( !$deleted ) {
1883 1887
 					$success = 0;
@@ -1916,8 +1920,9 @@  discard block
 block discarded – undo
1916 1920
 
1917 1921
 		$all_trashed = TRUE;
1918 1922
 		foreach ( $REGS as $registration ) {
1919
-			if ( ! $registration->get('REG_deleted') )
1920
-				$all_trashed = FALSE;
1923
+			if ( ! $registration->get('REG_deleted') ) {
1924
+							$all_trashed = FALSE;
1925
+			}
1921 1926
 		}
1922 1927
 
1923 1928
 		if ( ! $all_trashed ) {
@@ -1943,8 +1948,10 @@  discard block
 block discarded – undo
1943 1948
 			//now delete permanently the checkins related to this registration.
1944 1949
 			$registration->delete_related_permanently('Checkin');
1945 1950
 
1946
-			if ( $registration->ID() === $REG->ID() )
1947
-				continue; //we don't want to delete permanently the existing registration just yet.
1951
+			if ( $registration->ID() === $REG->ID() ) {
1952
+							continue;
1953
+			}
1954
+			//we don't want to delete permanently the existing registration just yet.
1948 1955
 
1949 1956
 			//remove relation to transaction for these registrations if NOT the existing registrations
1950 1957
 			$registration->_remove_relations('Transaction');
@@ -1997,8 +2004,9 @@  discard block
 block discarded – undo
1997 2004
 
1998 2005
 		$this->_template_args['step_content'] = $this->_get_registration_step_content();
1999 2006
 
2000
-		if ( defined('DOING_AJAX' ) )
2001
-			$this->_return_json();
2007
+		if ( defined('DOING_AJAX' ) ) {
2008
+					$this->_return_json();
2009
+		}
2002 2010
 
2003 2011
 
2004 2012
 		// grab header
@@ -2412,8 +2420,9 @@  discard block
 block discarded – undo
2412 2420
 			}
2413 2421
 		}
2414 2422
 
2415
-		if ( $success === FALSE )
2416
-			EE_Error::add_error(__('Something went wrong with updating the meta table data for the registration.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
2423
+		if ( $success === FALSE ) {
2424
+					EE_Error::add_error(__('Something went wrong with updating the meta table data for the registration.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
2425
+		}
2417 2426
 
2418 2427
 	}
2419 2428
 
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
 	 * This sets the _registration property for the registration details screen
821 821
 	 *
822 822
 	 * @access private
823
-	 * @return void
823
+	 * @return boolean
824 824
 	 */
825 825
 	private function _set_registration_object() {
826 826
 		//get out if we've already set the object
@@ -1558,8 +1558,6 @@  discard block
 block discarded – undo
1558 1558
 	 * 		form_form_field_input__wrap
1559 1559
 	 *
1560 1560
 	 * 		@access 		public
1561
-	 * 		@param 		string 		$label
1562
-	 * 		@return 		string
1563 1561
 	 */
1564 1562
 	public function form_form_field_input__wrap( $input ) {
1565 1563
 		return '
@@ -1642,6 +1640,10 @@  discard block
 block discarded – undo
1642 1640
 
1643 1641
 
1644 1642
 	//TODO: try changing this to use the model directly... not indirectly through creating a default object...
1643
+
1644
+	/**
1645
+	 * @param boolean $REG_ID
1646
+	 */
1645 1647
 	private function _save_new_answer( $REG_ID, $QST_ID, $ans ) {
1646 1648
 		$set_values = array(
1647 1649
 			'QST_ID' => $QST_ID,
Please login to merge, or discard this patch.
Spacing   +483 added lines, -483 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 	 * @param bool $routing
43 43
 	 * @return Registrations_Admin_Page
44 44
 	 */
45
-	public function __construct( $routing = TRUE ) {
46
-		parent::__construct( $routing );
45
+	public function __construct($routing = TRUE) {
46
+		parent::__construct($routing);
47 47
 	}
48 48
 
49 49
 
@@ -70,16 +70,16 @@  discard block
 block discarded – undo
70 70
 			'espresso_attendees' => 'edit_attendee'
71 71
 			);
72 72
 
73
-		add_action('edit_form_after_title', array($this, 'after_title_form_fields'), 10 );
73
+		add_action('edit_form_after_title', array($this, 'after_title_form_fields'), 10);
74 74
 		//add filters so that the comment urls don't take users to a confusing 404 page
75
-		add_filter('get_comment_link', array( $this, 'clear_comment_link' ), 10, 3 );
75
+		add_filter('get_comment_link', array($this, 'clear_comment_link'), 10, 3);
76 76
 	}
77 77
 
78 78
 
79
-	public function clear_comment_link( $link, $comment, $args ) {
79
+	public function clear_comment_link($link, $comment, $args) {
80 80
 		//gotta make sure this only happens on this route
81
-		$post_type = get_post_type( $comment->comment_post_ID);
82
-		if ( $post_type == 'espresso_attendees' )
81
+		$post_type = get_post_type($comment->comment_post_ID);
82
+		if ($post_type == 'espresso_attendees')
83 83
 			return '#commentsdiv';
84 84
 		return $link;
85 85
 	}
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
 	protected function _ajax_hooks() {
89 89
 		//todo: all hooks for registrations ajax goes in here
90
-		add_action( 'wp_ajax_toggle_checkin_status', array( $this, 'toggle_checkin_status' ));
90
+		add_action('wp_ajax_toggle_checkin_status', array($this, 'toggle_checkin_status'));
91 91
 	}
92 92
 
93 93
 
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 					'add-attendee' => __('Add Contact', 'event_espresso'),
103 103
 					'edit' => __('Edit Contact', 'event_espresso'),
104 104
 					'report'=>  __("Event Registrations CSV Report", "event_espresso"),
105
-					'report_all' => __( 'All Registrations CSV Report', 'event_espresso' ),
106
-					'contact_list_report' => __( 'Contact List Report', 'event_espresso' ),
105
+					'report_all' => __('All Registrations CSV Report', 'event_espresso'),
106
+					'contact_list_report' => __('Contact List Report', 'event_espresso'),
107 107
 					'contact_list_export'=>  __("Export Data", "event_espresso"),
108 108
 				),
109 109
 			'publishbox' => array(
@@ -130,9 +130,9 @@  discard block
 block discarded – undo
130 130
 
131 131
 		$this->_get_registration_status_array();
132 132
 
133
-		$reg_id = ! empty( $this->_req_data['_REG_ID'] ) && ! is_array( $this->_req_data['_REG_ID'] ) ? $this->_req_data['_REG_ID'] : 0;
134
-		$att_id = ! empty( $this->_req_data[ 'ATT_ID' ] ) && ! is_array( $this->_req_data['ATT_ID'] ) ? $this->_req_data['ATT_ID'] : 0;
135
-		$att_id = ! empty( $this->_req_data['post'] ) && ! is_array( $this->_req_data['post'] ) ? $this->_req_data['post'] : $att_id;
133
+		$reg_id = ! empty($this->_req_data['_REG_ID']) && ! is_array($this->_req_data['_REG_ID']) ? $this->_req_data['_REG_ID'] : 0;
134
+		$att_id = ! empty($this->_req_data['ATT_ID']) && ! is_array($this->_req_data['ATT_ID']) ? $this->_req_data['ATT_ID'] : 0;
135
+		$att_id = ! empty($this->_req_data['post']) && ! is_array($this->_req_data['post']) ? $this->_req_data['post'] : $att_id;
136 136
 
137 137
 		$this->_page_routes = array(
138 138
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
 				'edit_registration'	=> array(
151 151
 						'func' => '_registration_details',
152
-						'args' => array( 'edit' ),
152
+						'args' => array('edit'),
153 153
 						'noheader' => TRUE,
154 154
 						'capability' => 'ee_edit_registration',
155 155
 						'obj_id' => $reg_id
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
 				'restore_registrations' => array(
166 166
 					'func' => '_trash_or_restore_registrations',
167
-					'args' => array( 'trash' => FALSE ),
167
+					'args' => array('trash' => FALSE),
168 168
 					'noheader' => TRUE,
169 169
 					'capability' => 'ee_delete_registrations'
170 170
 					),
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 						'filename' => 'registrations_overview_other'
399 399
 					)
400 400
                 ),
401
-				'help_tour' => array( 'Registration_Overview_Help_Tour' ),
401
+				'help_tour' => array('Registration_Overview_Help_Tour'),
402 402
 				'qtips' => array('Registration_List_Table_Tips'),
403 403
 				'list_table' => 'EE_Registrations_List_Table',
404 404
 				'require_nonce' => FALSE
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 				'nav' => array(
409 409
 					'label' => __('REG Details', 'event_espresso'),
410 410
 					'order' => 15,
411
-					'url' => isset($this->_req_data['_REG_ID']) ? add_query_arg(array('_REG_ID' => $this->_req_data['_REG_ID'] ), $this->_current_page_view_url )  : $this->_admin_base_url,
411
+					'url' => isset($this->_req_data['_REG_ID']) ? add_query_arg(array('_REG_ID' => $this->_req_data['_REG_ID']), $this->_current_page_view_url) : $this->_admin_base_url,
412 412
 					'persistent' => FALSE
413 413
 					),
414 414
                 'help_tabs' => array(
@@ -429,8 +429,8 @@  discard block
 block discarded – undo
429 429
 						'filename' => 'registrations_details_registrant_details'
430 430
 						)
431 431
 					),
432
-				'help_tour' => array( 'Registration_Details_Help_Tour' ),
433
-				'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array( '_registration_details_metaboxes' ) ),
432
+				'help_tour' => array('Registration_Details_Help_Tour'),
433
+				'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_registration_details_metaboxes')),
434 434
 				'require_nonce' => FALSE
435 435
 				),
436 436
 
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 					'order' => 15,
454 454
 					'persistent' => FALSE
455 455
 					),
456
-				'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array('_publish_post_box' ) ),
456
+				'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')),
457 457
 				'require_nonce' => FALSE
458 458
 				),
459 459
 
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 					'label' => __('Edit Contact', 'event_espresso'),
463 463
 					'order' => 15,
464 464
 					'persistent' => FALSE,
465
-					'url' => isset($this->_req_data['ATT_ID']) ? add_query_arg(array('ATT_ID' => $this->_req_data['ATT_ID'] ), $this->_current_page_view_url )  : $this->_admin_base_url
465
+					'url' => isset($this->_req_data['ATT_ID']) ? add_query_arg(array('ATT_ID' => $this->_req_data['ATT_ID']), $this->_current_page_view_url) : $this->_admin_base_url
466 466
 					),
467 467
 				'metaboxes' => array('attendee_editor_metaboxes'),
468 468
 				'require_nonce' => FALSE
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 						'filename' => 'registrations_contact_list_other'
493 493
 					)
494 494
                 ),
495
-				'help_tour' => array( 'Contact_List_Help_Tour' ),
495
+				'help_tour' => array('Contact_List_Help_Tour'),
496 496
 				'metaboxes' => array(),
497 497
 				'require_nonce' => FALSE
498 498
 				),
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 	*		@return void
528 528
 	*/
529 529
 	private function _get_registration_status_array() {
530
-		self::$_reg_status = EEM_Registration::reg_status_array( array(), TRUE);
530
+		self::$_reg_status = EEM_Registration::reg_status_array(array(), TRUE);
531 531
 	}
532 532
 
533 533
 
@@ -550,11 +550,11 @@  discard block
 block discarded – undo
550 550
 	public function load_scripts_styles() {
551 551
 		//style
552 552
 		//wp_register_style('espresso_attendees', ATT_ASSETS_URL . 'espresso_attendees_admin.css', array(), EVENT_ESPRESSO_VERSION );
553
-		wp_register_style('espresso_reg', REG_ASSETS_URL . 'espresso_registrations_admin.css', array('ee-admin-css'), EVENT_ESPRESSO_VERSION );
553
+		wp_register_style('espresso_reg', REG_ASSETS_URL.'espresso_registrations_admin.css', array('ee-admin-css'), EVENT_ESPRESSO_VERSION);
554 554
 		wp_enqueue_style('espresso_reg');
555 555
 
556 556
 		//script
557
-		wp_register_script('espresso_reg', REG_ASSETS_URL . 'espresso_registrations_admin.js', array('jquery-ui-datepicker', 'jquery-ui-draggable', 'ee_admin_js'), EVENT_ESPRESSO_VERSION, TRUE);
557
+		wp_register_script('espresso_reg', REG_ASSETS_URL.'espresso_registrations_admin.js', array('jquery-ui-datepicker', 'jquery-ui-draggable', 'ee_admin_js'), EVENT_ESPRESSO_VERSION, TRUE);
558 558
 		wp_enqueue_script('espresso_reg');
559 559
 	}
560 560
 
@@ -563,9 +563,9 @@  discard block
 block discarded – undo
563 563
 	public function load_scripts_styles_edit_attendee() {
564 564
 		//stuff to only show up on our attendee edit details page.
565 565
 		$attendee_details_translations = array(
566
-			'att_publish_text' => sprintf( __('Created on: <b>%1$s</b>', 'event_espresso'), $this->_cpt_model_obj->get_datetime('ATT_created') )
566
+			'att_publish_text' => sprintf(__('Created on: <b>%1$s</b>', 'event_espresso'), $this->_cpt_model_obj->get_datetime('ATT_created'))
567 567
 			);
568
-		wp_localize_script( 'espresso_reg', 'ATTENDEE_DETAILS', $attendee_details_translations );
568
+		wp_localize_script('espresso_reg', 'ATTENDEE_DETAILS', $attendee_details_translations);
569 569
 		wp_enqueue_script('jquery-validate');
570 570
 	}
571 571
 
@@ -574,8 +574,8 @@  discard block
 block discarded – undo
574 574
 		//styles
575 575
 		wp_enqueue_style('espresso-ui-theme');
576 576
 		//scripts
577
-		EE_Registry::$i18n_js_strings['update_att_qstns'] = __( 'click "Update Registration Questions" to save your changes', 'event_espresso' );
578
-		wp_localize_script( 'espresso_reg', 'eei18n', EE_Registry::$i18n_js_strings );
577
+		EE_Registry::$i18n_js_strings['update_att_qstns'] = __('click "Update Registration Questions" to save your changes', 'event_espresso');
578
+		wp_localize_script('espresso_reg', 'eei18n', EE_Registry::$i18n_js_strings);
579 579
 	}
580 580
 
581 581
 
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 
586 586
 	public function load_scripts_styles_contact_list() {
587 587
 		wp_deregister_style('espresso_reg');
588
-		wp_register_style('espresso_att', REG_ASSETS_URL . 'espresso_attendees_admin.css', array('ee-admin-css'), EVENT_ESPRESSO_VERSION );
588
+		wp_register_style('espresso_att', REG_ASSETS_URL.'espresso_attendees_admin.css', array('ee-admin-css'), EVENT_ESPRESSO_VERSION);
589 589
 		wp_enqueue_style('espresso_att');
590 590
 	}
591 591
 
@@ -594,9 +594,9 @@  discard block
 block discarded – undo
594 594
 
595 595
 
596 596
 	public function load_scripts_styles_new_registration() {
597
-		wp_register_script( 'ee-spco-for-admin', REG_ASSETS_URL . 'spco_for_admin.js', array('underscore', 'jquery'), EVENT_ESPRESSO_VERSION, TRUE );
597
+		wp_register_script('ee-spco-for-admin', REG_ASSETS_URL.'spco_for_admin.js', array('underscore', 'jquery'), EVENT_ESPRESSO_VERSION, TRUE);
598 598
 		wp_enqueue_script('ee-spco-for-admin');
599
-		add_filter('FHEE__EED_Ticket_Selector__load_tckt_slctr_assets', '__return_true' );
599
+		add_filter('FHEE__EED_Ticket_Selector__load_tckt_slctr_assets', '__return_true');
600 600
 		EE_Form_Section_Proper::wp_enqueue_scripts();
601 601
 		EED_Ticket_Selector::load_tckt_slctr_assets();
602 602
 		EE_Datepicker_Input::enqueue_styles_and_scripts();
@@ -635,23 +635,23 @@  discard block
 block discarded – undo
635 635
 
636 636
 		/** setup reg status bulk actions **/
637 637
 		$def_reg_status_actions['approve_registration'] = __('Approve Registrations', 'event_espresso');
638
-		if ( in_array( $match_array['approve_registration'], $active_mts ) && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'batch_send_messages' ) ) {
638
+		if (in_array($match_array['approve_registration'], $active_mts) && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'batch_send_messages')) {
639 639
 			$def_reg_status_actions['approve_and_notify_registration'] = __('Approve and Notify Registrations', 'event_espresso');
640 640
 		}
641 641
 		$def_reg_status_actions['decline_registration'] = __('Decline Registrations', 'event_espresso');
642
-		if ( in_array( $match_array['decline_registration'], $active_mts ) && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'batch_send_messages' ) ) {
642
+		if (in_array($match_array['decline_registration'], $active_mts) && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'batch_send_messages')) {
643 643
 			$def_reg_status_actions['decline_and_notify_registration'] = __('Decline and Notify Registrations', 'event_espresso');
644 644
 		}
645 645
 		$def_reg_status_actions['pending_registration'] = __('Set Registrations to Pending Payment', 'event_espresso');
646
-		if ( in_array( $match_array['pending_registration'], $active_mts ) && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'batch_send_messages' ) ) {
646
+		if (in_array($match_array['pending_registration'], $active_mts) && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'batch_send_messages')) {
647 647
 			$def_reg_status_actions['pending_and_notify_registration'] = __('Set Registrations to Pending Payment and Notify', 'event_espresso');
648 648
 		}
649 649
 		$def_reg_status_actions['no_approve_registration'] = __('Set Registrations to Not Approved', 'event_espresso');
650
-		if ( in_array( $match_array['no_approve_registration'], $active_mts ) && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'batch_send_messages' ) ) {
650
+		if (in_array($match_array['no_approve_registration'], $active_mts) && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'batch_send_messages')) {
651 651
 			$def_reg_status_actions['no_approve_and_notify_registration'] = __('Set Registrations to Not Approved and Notify', 'event_espresso');
652 652
 		}
653 653
 		$def_reg_status_actions['cancel_registration'] = __('Cancel Registrations', 'event_espresso');
654
-		if ( in_array( $match_array['cancel_registration'], $active_mts ) && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'batch_send_messages' ) ) {
654
+		if (in_array($match_array['cancel_registration'], $active_mts) && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'batch_send_messages')) {
655 655
 			$def_reg_status_actions['cancel_and_notify_registration'] = __('Cancel Registrations and Notify', 'event_espresso');
656 656
 		}
657 657
 
@@ -660,29 +660,29 @@  discard block
 block discarded – undo
660 660
 				'slug' => 'all',
661 661
 				'label' => __('View All Registrations', 'event_espresso'),
662 662
 				'count' => 0,
663
-				'bulk_action' => array_merge( $def_reg_status_actions, array(
663
+				'bulk_action' => array_merge($def_reg_status_actions, array(
664 664
 					'trash_registrations' => __('Trash Registrations', 'event_espresso')
665
-					) )
665
+					))
666 666
 				),
667 667
 			'month' => array(
668 668
 				'slug' => 'month',
669 669
 				'label' => __('This Month', 'event_espresso'),
670 670
 				'count' => 0,
671
-				'bulk_action' => array_merge( $def_reg_status_actions, array(
671
+				'bulk_action' => array_merge($def_reg_status_actions, array(
672 672
 					'trash_registrations' => __('Trash Registrations', 'event_espresso')
673 673
 					))
674 674
 				),
675 675
 			'today' => array(
676 676
 				'slug' => 'today',
677
-				'label' => sprintf( __('Today - %s', 'event_espresso'), date('M d, Y', current_time('timestamp', 0) ) ),
677
+				'label' => sprintf(__('Today - %s', 'event_espresso'), date('M d, Y', current_time('timestamp', 0))),
678 678
 				'count' => 0,
679
-				'bulk_action' => array_merge( $def_reg_status_actions,  array(
679
+				'bulk_action' => array_merge($def_reg_status_actions, array(
680 680
 					'trash_registrations' => __('Trash Registrations', 'event_espresso')
681 681
 					))
682 682
 				)
683 683
 			);
684 684
 
685
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_registrations', 'espresso_registrations_delete_registration' ) ) {
685
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_registrations', 'espresso_registrations_delete_registration')) {
686 686
 			$this->_views['incomplete'] = array(
687 687
 				'slug' => 'incomplete',
688 688
 				'label' => __('Incomplete', 'event_espresso'),
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
 				)
719 719
 			);
720 720
 
721
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_contacts', 'espresso_registrations_trash_attendees' ) ) {
721
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_trash_attendees')) {
722 722
 			$this->_views['trash'] = array(
723 723
 				'slug' => 'trash',
724 724
 				'label' => __('Trash', 'event_espresso'),
@@ -753,42 +753,42 @@  discard block
 block discarded – undo
753 753
 				'desc' => __('View Transaction Details', 'event_espresso')
754 754
 				)
755 755
  			);
756
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_resend_registration' ) ) {
756
+		if (EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_resend_registration')) {
757 757
 			$fc_items['resend_registration'] = array(
758 758
 				'class' => 'dashicons dashicons-email-alt',
759 759
 				'desc' => __('Resend Registration Details', 'event_espresso')
760 760
 				);
761 761
 		} else {
762
-			$fc_items['blank'] = array( 'class' => 'blank', 'desc' => '' );
762
+			$fc_items['blank'] = array('class' => 'blank', 'desc' => '');
763 763
 		}
764 764
 
765 765
 		$sc_items = array(
766 766
 			'approved_status' => array(
767
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_approved,
768
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_approved, FALSE, 'sentence' )
767
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_approved,
768
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence')
769 769
 				),
770 770
 			'pending_status' => array(
771
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_pending_payment,
772
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_pending_payment, FALSE, 'sentence' )
771
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_pending_payment,
772
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, FALSE, 'sentence')
773 773
 				),
774 774
 			'incomplete_status' => array(
775
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_incomplete,
776
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_incomplete, FALSE, 'sentence' )
775
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_incomplete,
776
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_incomplete, FALSE, 'sentence')
777 777
 			),
778 778
 			'not_approved' => array(
779
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_not_approved,
780
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_not_approved, FALSE, 'sentence' )
779
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_not_approved,
780
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, FALSE, 'sentence')
781 781
 				),
782 782
 			'declined_status' => array(
783
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_declined,
784
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_declined, FALSE, 'sentence' )
783
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_declined,
784
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_declined, FALSE, 'sentence')
785 785
 				),
786 786
 			'cancelled_status' => array(
787
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_cancelled,
788
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, FALSE, 'sentence' )
787
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_cancelled,
788
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_cancelled, FALSE, 'sentence')
789 789
 				)
790 790
 			);
791
-		return array_merge( $fc_items, $sc_items );
791
+		return array_merge($fc_items, $sc_items);
792 792
 	}
793 793
 
794 794
 
@@ -801,15 +801,15 @@  discard block
 block discarded – undo
801 801
 
802 802
 
803 803
 	protected function _registrations_overview_list_table() {
804
-		$EVT_ID = ( ! empty( $this->_req_data['event_id'] )) ? absint( $this->_req_data['event_id'] ) : FALSE;
805
-		if ( $EVT_ID ) {
806
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_registrations', 'espresso_registrations_new_registration', $EVT_ID ) ) {
807
-				$this->_admin_page_title .= $this->get_action_link_or_button( 'new_registration', 'add-registrant', array( 'event_id' => $EVT_ID ), 'add-new-h2' );
804
+		$EVT_ID = ( ! empty($this->_req_data['event_id'])) ? absint($this->_req_data['event_id']) : FALSE;
805
+		if ($EVT_ID) {
806
+			if (EE_Registry::instance()->CAP->current_user_can('ee_edit_registrations', 'espresso_registrations_new_registration', $EVT_ID)) {
807
+				$this->_admin_page_title .= $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $EVT_ID), 'add-new-h2');
808 808
 			}
809
-			$event = EEM_Event::instance()->get_one_by_ID( $EVT_ID );
810
-			$this->_template_args['admin_page_header'] = $event instanceof EE_Event ? sprintf( __('%s Viewing registrations for the event: %s%s', 'event_espresso'), '<h2>', '<a href="' . EE_Admin_Page::add_query_args_and_nonce( array('action' => 'edit', 'post' => $event->ID() ), EVENTS_ADMIN_URL ) . '">' . $event->get('EVT_name') . '</a>', '</h2>' ) : '';
809
+			$event = EEM_Event::instance()->get_one_by_ID($EVT_ID);
810
+			$this->_template_args['admin_page_header'] = $event instanceof EE_Event ? sprintf(__('%s Viewing registrations for the event: %s%s', 'event_espresso'), '<h2>', '<a href="'.EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit', 'post' => $event->ID()), EVENTS_ADMIN_URL).'">'.$event->get('EVT_name').'</a>', '</h2>') : '';
811 811
 		}
812
-		$this->_template_args['after_list_table'] = $this->_display_legend( $this->_registration_legend_items() );
812
+		$this->_template_args['after_list_table'] = $this->_display_legend($this->_registration_legend_items());
813 813
 		$this->display_admin_list_table_page_with_no_sidebar();
814 814
 	}
815 815
 
@@ -824,19 +824,19 @@  discard block
 block discarded – undo
824 824
 	 */
825 825
 	private function _set_registration_object() {
826 826
 		//get out if we've already set the object
827
-		if ( is_object( $this->_registration )) {
827
+		if (is_object($this->_registration)) {
828 828
 			return TRUE;
829 829
 		}
830 830
 
831 831
 	    $REG = EEM_Registration::instance();
832 832
 
833
-		$REG_ID = ( ! empty( $this->_req_data['_REG_ID'] )) ? absint( $this->_req_data['_REG_ID'] ) : FALSE;
833
+		$REG_ID = ( ! empty($this->_req_data['_REG_ID'])) ? absint($this->_req_data['_REG_ID']) : FALSE;
834 834
 
835
-		if ( $this->_registration = $REG->get_one_by_ID( $REG_ID ))
835
+		if ($this->_registration = $REG->get_one_by_ID($REG_ID))
836 836
 			return TRUE;
837 837
 		else {
838
-			$error_msg = sprintf( __('An error occurred and the details for Registration ID #%s could not be retrieved.', 'event_espresso'), $REG_ID );
839
-			EE_Error::add_error( $error_msg, __FILE__, __FUNCTION__, __LINE__ );
838
+			$error_msg = sprintf(__('An error occurred and the details for Registration ID #%s could not be retrieved.', 'event_espresso'), $REG_ID);
839
+			EE_Error::add_error($error_msg, __FILE__, __FUNCTION__, __LINE__);
840 840
 			$this->_registration = NULL;
841 841
 			return FALSE;
842 842
 		}
@@ -855,24 +855,24 @@  discard block
 block discarded – undo
855 855
 	 * @internal param bool $all whether to ignore all query params and just return ALL registrations (or count if count is set)
856 856
 	 * @return mixed (int|array)  int = count || array of registration objects
857 857
 	 */
858
-	public function get_registrations( $per_page = 10, $count = FALSE, $this_month = FALSE, $today = FALSE ) {
859
-
860
-		$EVT_ID = ! empty( $this->_req_data['event_id'] ) && $this->_req_data['event_id'] > 0 ? absint( $this->_req_data['event_id'] ) : FALSE;
861
-		$CAT_ID = ! empty( $this->_req_data['EVT_CAT'] ) && (int) $this->_req_data['EVT_CAT'] > 0? absint( $this->_req_data['EVT_CAT'] ) : FALSE;
862
-		$reg_status = ! empty( $this->_req_data['_reg_status'] ) ? sanitize_text_field( $this->_req_data['_reg_status'] ) : FALSE;
863
-		$month_range = ! empty( $this->_req_data['month_range'] ) ? sanitize_text_field( $this->_req_data['month_range'] ) : FALSE;//should be like 2013-april
864
-		$today_a = ! empty( $this->_req_data['status'] ) && $this->_req_data['status'] == 'today' ? TRUE : FALSE;
865
-		$this_month_a = ! empty( $this->_req_data['status'] ) && $this->_req_data['status'] == 'month' ? TRUE  : FALSE;
858
+	public function get_registrations($per_page = 10, $count = FALSE, $this_month = FALSE, $today = FALSE) {
859
+
860
+		$EVT_ID = ! empty($this->_req_data['event_id']) && $this->_req_data['event_id'] > 0 ? absint($this->_req_data['event_id']) : FALSE;
861
+		$CAT_ID = ! empty($this->_req_data['EVT_CAT']) && (int) $this->_req_data['EVT_CAT'] > 0 ? absint($this->_req_data['EVT_CAT']) : FALSE;
862
+		$reg_status = ! empty($this->_req_data['_reg_status']) ? sanitize_text_field($this->_req_data['_reg_status']) : FALSE;
863
+		$month_range = ! empty($this->_req_data['month_range']) ? sanitize_text_field($this->_req_data['month_range']) : FALSE; //should be like 2013-april
864
+		$today_a = ! empty($this->_req_data['status']) && $this->_req_data['status'] == 'today' ? TRUE : FALSE;
865
+		$this_month_a = ! empty($this->_req_data['status']) && $this->_req_data['status'] == 'month' ? TRUE : FALSE;
866 866
 		$start_date = FALSE;
867 867
 		$end_date = FALSE;
868 868
 		$_where = array();
869
-		$trash = ! empty( $this->_req_data['status'] ) && $this->_req_data['status'] == 'trash' ? TRUE : FALSE;
870
-		$incomplete = ! empty( $this->_req_data['status'] ) && $this->_req_data['status'] == 'incomplete' ? TRUE : FALSE;
869
+		$trash = ! empty($this->_req_data['status']) && $this->_req_data['status'] == 'trash' ? TRUE : FALSE;
870
+		$incomplete = ! empty($this->_req_data['status']) && $this->_req_data['status'] == 'incomplete' ? TRUE : FALSE;
871 871
 
872 872
 		//set orderby
873 873
 		$this->_req_data['orderby'] = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : '';
874 874
 
875
-		switch ( $this->_req_data['orderby'] ) {
875
+		switch ($this->_req_data['orderby']) {
876 876
 			case '_REG_ID':
877 877
 				$orderby = 'REG_ID';
878 878
 				break;
@@ -892,26 +892,26 @@  discard block
 block discarded – undo
892 892
 				$orderby = 'REG_date';
893 893
 		}
894 894
 
895
-		$sort = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'DESC';
896
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
897
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
895
+		$sort = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'DESC';
896
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
897
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
898 898
 
899 899
 
900
-		$offset = ($current_page-1)*$per_page;
901
-		$limit = $count  ? NULL : array( $offset, $per_page );
900
+		$offset = ($current_page - 1) * $per_page;
901
+		$limit = $count ? NULL : array($offset, $per_page);
902 902
 
903
-		if($EVT_ID){
904
-			$_where['EVT_ID']=$EVT_ID;
903
+		if ($EVT_ID) {
904
+			$_where['EVT_ID'] = $EVT_ID;
905 905
 		}
906
-		if($CAT_ID){
906
+		if ($CAT_ID) {
907 907
 			$_where['Event.Term_Taxonomy.term_id'] = $CAT_ID;
908 908
 		}
909
-		if ( $incomplete ) {
909
+		if ($incomplete) {
910 910
 			$_where['STS_ID'] = EEM_Registration::status_id_incomplete;
911 911
 		} else if ( ! $trash) {
912
-			$_where['STS_ID'] = array( '!=', EEM_Registration::status_id_incomplete );
912
+			$_where['STS_ID'] = array('!=', EEM_Registration::status_id_incomplete);
913 913
 		}
914
-		if($reg_status){
914
+		if ($reg_status) {
915 915
 			$_where['STS_ID'] = $reg_status;
916 916
 		}
917 917
 
@@ -923,102 +923,102 @@  discard block
 block discarded – undo
923 923
 		$time_start = ' 00:00:00';
924 924
 		$time_end = ' 23:59:59';
925 925
 
926
-		if($today_a || $today ){
926
+		if ($today_a || $today) {
927 927
 			$curdate = date('Y-m-d', current_time('timestamp'));
928
-			$_where['REG_date']= array('BETWEEN',
928
+			$_where['REG_date'] = array('BETWEEN',
929 929
 				array(
930
-					strtotime($curdate . $time_start),
931
-					strtotime($curdate . $time_end)
930
+					strtotime($curdate.$time_start),
931
+					strtotime($curdate.$time_end)
932 932
 			));
933
-		}elseif($this_month_a || $this_month){
933
+		}elseif ($this_month_a || $this_month) {
934 934
 			$this_month_r = date('m', current_time('timestamp'));
935
-			$days_this_month = date( 't', current_time('timestamp') );
936
-			$_where['REG_date']= array('BETWEEN',
935
+			$days_this_month = date('t', current_time('timestamp'));
936
+			$_where['REG_date'] = array('BETWEEN',
937 937
 				array(
938
-					strtotime( $this_year_r . '-' . $this_month_r . '-01' . ' ' . $time_start ),
939
-					strtotime( $this_year_r . '-' . $this_month_r . $days_this_month . ' ' . $time_end )
938
+					strtotime($this_year_r.'-'.$this_month_r.'-01'.' '.$time_start),
939
+					strtotime($this_year_r.'-'.$this_month_r.$days_this_month.' '.$time_end)
940 940
 			));
941
-		}elseif($month_range){
941
+		}elseif ($month_range) {
942 942
 			$pieces = explode(' ', $this->_req_data['month_range'], 3);
943
-			$month_r = !empty($pieces[0]) ? date('m', strtotime($pieces[0])) : '';
944
-			$year_r = !empty($pieces[1]) ? $pieces[1] : '';
945
-			$_where['REG_date']= array('BETWEEN',
946
-				array( strtotime($year_r . '-' . $month_r . '-01 00:00:00'), strtotime($year_r . '-' . $month_r . '-31 23:59:59' ) ) );
947
-		}elseif($start_date && $end_date){
943
+			$month_r = ! empty($pieces[0]) ? date('m', strtotime($pieces[0])) : '';
944
+			$year_r = ! empty($pieces[1]) ? $pieces[1] : '';
945
+			$_where['REG_date'] = array('BETWEEN',
946
+				array(strtotime($year_r.'-'.$month_r.'-01 00:00:00'), strtotime($year_r.'-'.$month_r.'-31 23:59:59')));
947
+		}elseif ($start_date && $end_date) {
948 948
 			throw new EE_Error("not yet supported");
949
-		}elseif($start_date){
949
+		}elseif ($start_date) {
950 950
 			throw new EE_Error("not yet supported");
951
-		}elseif($end_date){
951
+		}elseif ($end_date) {
952 952
 			throw new EE_Error("not yet supported");
953 953
 		}
954 954
 
955
-		if ( isset( $this->_req_data['s'] ) ) {
956
-			$sstr = '%' . $this->_req_data['s'] . '%';
955
+		if (isset($this->_req_data['s'])) {
956
+			$sstr = '%'.$this->_req_data['s'].'%';
957 957
 			$_where['OR'] = array(
958
-				'Event.EVT_name' => array( 'LIKE', $sstr),
959
-				'Event.EVT_desc' => array( 'LIKE', $sstr ),
960
-				'Event.EVT_short_desc' => array( 'LIKE' , $sstr ),
961
-				'Attendee.ATT_fname' => array( 'LIKE', $sstr ),
962
-				'Attendee.ATT_lname' => array( 'LIKE', $sstr ),
963
-				'Attendee.ATT_short_bio' => array( 'LIKE', $sstr ),
964
-				'Attendee.ATT_email' => array('LIKE', $sstr ),
965
-				'Attendee.ATT_address' => array( 'LIKE', $sstr ),
966
-				'Attendee.ATT_address2' => array( 'LIKE', $sstr ),
967
-				'Attendee.ATT_city' => array( 'LIKE', $sstr ),
968
-				'REG_final_price' => array( 'LIKE', $sstr ),
969
-				'REG_code' => array( 'LIKE', $sstr ),
970
-				'REG_count' => array( 'LIKE' , $sstr ),
971
-				'REG_group_size' => array( 'LIKE' , $sstr ),
972
-				'Ticket.TKT_name' => array( 'LIKE', $sstr ),
973
-				'Ticket.TKT_description' => array( 'LIKE', $sstr )
958
+				'Event.EVT_name' => array('LIKE', $sstr),
959
+				'Event.EVT_desc' => array('LIKE', $sstr),
960
+				'Event.EVT_short_desc' => array('LIKE', $sstr),
961
+				'Attendee.ATT_fname' => array('LIKE', $sstr),
962
+				'Attendee.ATT_lname' => array('LIKE', $sstr),
963
+				'Attendee.ATT_short_bio' => array('LIKE', $sstr),
964
+				'Attendee.ATT_email' => array('LIKE', $sstr),
965
+				'Attendee.ATT_address' => array('LIKE', $sstr),
966
+				'Attendee.ATT_address2' => array('LIKE', $sstr),
967
+				'Attendee.ATT_city' => array('LIKE', $sstr),
968
+				'REG_final_price' => array('LIKE', $sstr),
969
+				'REG_code' => array('LIKE', $sstr),
970
+				'REG_count' => array('LIKE', $sstr),
971
+				'REG_group_size' => array('LIKE', $sstr),
972
+				'Ticket.TKT_name' => array('LIKE', $sstr),
973
+				'Ticket.TKT_description' => array('LIKE', $sstr)
974 974
 				);
975 975
 		}
976 976
 
977 977
 		//capability checks
978
-		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'get_registrations' ) ) {
978
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'get_registrations')) {
979 979
 			$_where['AND'] = array(
980 980
 				'Event.EVT_wp_user' => get_current_user_id()
981 981
 				);
982 982
 		}
983 983
 
984 984
 
985
-		if( $count ){
986
-			if ( $trash ) {
987
-				return EEM_Registration::instance()->count_deleted( array( $_where ));
988
-			} else if ( $incomplete ) {
989
-				return EEM_Registration::instance()->count( array( $_where ));
985
+		if ($count) {
986
+			if ($trash) {
987
+				return EEM_Registration::instance()->count_deleted(array($_where));
988
+			} else if ($incomplete) {
989
+				return EEM_Registration::instance()->count(array($_where));
990 990
 			} else {
991
-				return EEM_Registration::instance()->count( array( $_where, 'default_where_conditions' => 'this_model_only' ));
991
+				return EEM_Registration::instance()->count(array($_where, 'default_where_conditions' => 'this_model_only'));
992 992
 			}
993 993
 		} else {
994 994
 			//make sure we remove default where conditions cause all registrations matching query are returned
995
-			$query_params = array( $_where, 'order_by' => array( $orderby => $sort ), 'default_where_conditions' => 'this_model_only' );
996
-			if ( $per_page !== -1 ) {
995
+			$query_params = array($_where, 'order_by' => array($orderby => $sort), 'default_where_conditions' => 'this_model_only');
996
+			if ($per_page !== -1) {
997 997
 				$query_params['limit'] = $limit;
998 998
 			}
999
-			$registrations =  $trash ? EEM_Registration::instance()->get_all_deleted($query_params) : EEM_Registration::instance()->get_all($query_params);
999
+			$registrations = $trash ? EEM_Registration::instance()->get_all_deleted($query_params) : EEM_Registration::instance()->get_all($query_params);
1000 1000
 
1001 1001
 
1002
-			if ( $EVT_ID && isset( $registrations[0] ) && $registrations[0] instanceof EE_Registration &&  $registrations[0]->event_obj()) {
1002
+			if ($EVT_ID && isset($registrations[0]) && $registrations[0] instanceof EE_Registration && $registrations[0]->event_obj()) {
1003 1003
 				$first_registration = $registrations[0];
1004 1004
 				//EEH_Debug_Tools::printr( $registrations[0], '$registrations  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
1005 1005
 				$event_name = $first_registration->event_obj()->name();
1006
-				$event_date = $first_registration->date_obj()->start_date_and_time('l F j, Y,', 'g:i:s a');// isset( $registrations[0]->DTT_EVT_start ) ? date( 'l F j, Y,    g:i:s a', $registrations[0]->DTT_EVT_start ) : '';
1006
+				$event_date = $first_registration->date_obj()->start_date_and_time('l F j, Y,', 'g:i:s a'); // isset( $registrations[0]->DTT_EVT_start ) ? date( 'l F j, Y,    g:i:s a', $registrations[0]->DTT_EVT_start ) : '';
1007 1007
 				// edit event link
1008
-				if ( $event_name != '' ) {
1009
-					$edit_event_url = self::add_query_args_and_nonce( array( 'action'=>'edit_event', 'EVT_ID'=>$EVT_ID ), EVENTS_ADMIN_URL );
1010
-					$edit_event_lnk = '<a href="'.$edit_event_url.'" title="' . esc_attr__( 'Edit ', 'event_espresso' ) . $event_name . '">' . __( 'Edit Event', 'event_espresso' ) . '</a>';
1011
-					$event_name .= ' <span class="admin-page-header-edit-lnk not-bold">' . $edit_event_lnk . '</span>' ;
1008
+				if ($event_name != '') {
1009
+					$edit_event_url = self::add_query_args_and_nonce(array('action'=>'edit_event', 'EVT_ID'=>$EVT_ID), EVENTS_ADMIN_URL);
1010
+					$edit_event_lnk = '<a href="'.$edit_event_url.'" title="'.esc_attr__('Edit ', 'event_espresso').$event_name.'">'.__('Edit Event', 'event_espresso').'</a>';
1011
+					$event_name .= ' <span class="admin-page-header-edit-lnk not-bold">'.$edit_event_lnk.'</span>';
1012 1012
 				}
1013 1013
 
1014
-				$back_2_reg_url = self::add_query_args_and_nonce( array( 'action'=>'default' ), REG_ADMIN_URL );
1015
-				$back_2_reg_lnk = '<a href="'.$back_2_reg_url.'" title="' . esc_attr__( 'click to return to viewing all registrations ', 'event_espresso' ) . '">&laquo; ' . __( 'Back to All Registrations', 'event_espresso' ) . '</a>';
1014
+				$back_2_reg_url = self::add_query_args_and_nonce(array('action'=>'default'), REG_ADMIN_URL);
1015
+				$back_2_reg_lnk = '<a href="'.$back_2_reg_url.'" title="'.esc_attr__('click to return to viewing all registrations ', 'event_espresso').'">&laquo; '.__('Back to All Registrations', 'event_espresso').'</a>';
1016 1016
 
1017 1017
 				$this->_template_args['before_admin_page_content'] = '
1018 1018
 			<div id="admin-page-header">
1019
-				<h1><span class="small-text not-bold">'.__( 'Event: ', 'event_espresso' ).'</span>'. $event_name .'</h1>
1020
-				<h3><span class="small-text not-bold">'.__( 'Date: ', 'event_espresso' ). '</span>'. $event_date .'</h3>
1021
-				<span class="admin-page-header-go-back-lnk not-bold">' . $back_2_reg_lnk . '</span>
1019
+				<h1><span class="small-text not-bold">'.__('Event: ', 'event_espresso').'</span>'.$event_name.'</h1>
1020
+				<h3><span class="small-text not-bold">'.__('Date: ', 'event_espresso').'</span>'.$event_date.'</h3>
1021
+				<span class="admin-page-header-go-back-lnk not-bold">' . $back_2_reg_lnk.'</span>
1022 1022
 			</div>
1023 1023
 			';
1024 1024
 
@@ -1056,24 +1056,24 @@  discard block
 block discarded – undo
1056 1056
 
1057 1057
 		$this->_set_registration_object();
1058 1058
 
1059
-		if ( is_object( $this->_registration )) {
1059
+		if (is_object($this->_registration)) {
1060 1060
 			$transaction = $this->_registration->transaction() ? $this->_registration->transaction() : EE_Transaction::new_instance();
1061 1061
 			$this->_session = $transaction->session_data();
1062 1062
 
1063
-			$title = __( ucwords( str_replace( '_', ' ', $this->_req_action )), 'event_espresso' );
1063
+			$title = __(ucwords(str_replace('_', ' ', $this->_req_action)), 'event_espresso');
1064 1064
 			// add PRC_ID to title if editing
1065
-			$title = $this->_registration->ID() ? $title . ' # ' . $this->_registration->ID() : $title;
1065
+			$title = $this->_registration->ID() ? $title.' # '.$this->_registration->ID() : $title;
1066 1066
 
1067 1067
 
1068 1068
 			$this->_template_args['reg_nmbr']['value'] = $this->_registration->ID();
1069
-			$this->_template_args['reg_nmbr']['label'] = __( 'Registration Number', 'event_espresso' );
1069
+			$this->_template_args['reg_nmbr']['label'] = __('Registration Number', 'event_espresso');
1070 1070
 
1071
-			$this->_template_args['reg_datetime']['value'] =  $this->_registration->pretty_date('l F j, Y','g:i:s a') ;
1072
-			$this->_template_args['reg_datetime']['label'] = __( 'Date', 'event_espresso' );
1071
+			$this->_template_args['reg_datetime']['value'] = $this->_registration->pretty_date('l F j, Y', 'g:i:s a');
1072
+			$this->_template_args['reg_datetime']['label'] = __('Date', 'event_espresso');
1073 1073
 
1074 1074
 			$this->_template_args['reg_status']['value'] = $this->_registration->pretty_status();
1075
-			$this->_template_args['reg_status']['label'] = __( 'Registration Status', 'event_espresso' );
1076
-			$this->_template_args['reg_status']['class'] = 'status-' . $this->_registration->status_ID();
1075
+			$this->_template_args['reg_status']['label'] = __('Registration Status', 'event_espresso');
1076
+			$this->_template_args['reg_status']['class'] = 'status-'.$this->_registration->status_ID();
1077 1077
 
1078 1078
 			$this->_template_args['approve_decline_reg_status_buttons'] = $this->_set_approve_or_decline_reg_status_buttons();
1079 1079
 
@@ -1085,8 +1085,8 @@  discard block
 block discarded – undo
1085 1085
 			$this->_template_args['registration'] = $this->_registration;
1086 1086
 
1087 1087
 			// grab header
1088
-			$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_header.template.php';
1089
-			$this->_template_args['admin_page_header'] = EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1088
+			$template_path = REG_TEMPLATE_PATH.'reg_admin_details_header.template.php';
1089
+			$this->_template_args['admin_page_header'] = EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1090 1090
 
1091 1091
 		} else {
1092 1092
 
@@ -1107,13 +1107,13 @@  discard block
 block discarded – undo
1107 1107
 	protected function _registration_details_metaboxes() {
1108 1108
 		$this->_set_registration_object();
1109 1109
 		$attendee = $this->_registration instanceof EE_Registration ? $this->_registration->attendee() : null;
1110
-		add_meta_box( 'edit-reg-details-mbox', __( 'Registration Details', 'event_espresso' ), array( $this, '_reg_details_meta_box' ), $this->wp_page_slug, 'normal', 'high' );
1111
-		if ( $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can('ee_edit_registration', 'edit-reg-questions-mbox' ) ) {
1112
-			add_meta_box( 'edit-reg-questions-mbox', __( 'Registration Form Answers', 'event_espresso' ), array( $this, '_reg_questions_meta_box' ), $this->wp_page_slug, 'normal', 'high' );
1110
+		add_meta_box('edit-reg-details-mbox', __('Registration Details', 'event_espresso'), array($this, '_reg_details_meta_box'), $this->wp_page_slug, 'normal', 'high');
1111
+		if ($attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can('ee_edit_registration', 'edit-reg-questions-mbox')) {
1112
+			add_meta_box('edit-reg-questions-mbox', __('Registration Form Answers', 'event_espresso'), array($this, '_reg_questions_meta_box'), $this->wp_page_slug, 'normal', 'high');
1113 1113
 		}
1114
-		add_meta_box( 'edit-reg-registrant-mbox', __( 'Contact Details', 'event_espresso' ), array( $this, '_reg_registrant_side_meta_box' ), $this->wp_page_slug, 'side', 'high' );
1115
-		if ( $this->_registration->group_size() > 1 ) {
1116
-			add_meta_box( 'edit-reg-attendees-mbox', __( 'Other Registrations in this Transaction', 'event_espresso' ), array( $this, '_reg_attendees_meta_box' ), $this->wp_page_slug, 'normal', 'high' );
1114
+		add_meta_box('edit-reg-registrant-mbox', __('Contact Details', 'event_espresso'), array($this, '_reg_registrant_side_meta_box'), $this->wp_page_slug, 'side', 'high');
1115
+		if ($this->_registration->group_size() > 1) {
1116
+			add_meta_box('edit-reg-attendees-mbox', __('Other Registrations in this Transaction', 'event_espresso'), array($this, '_reg_attendees_meta_box'), $this->wp_page_slug, 'normal', 'high');
1117 1117
 		}
1118 1118
 	}
1119 1119
 
@@ -1137,20 +1137,20 @@  discard block
 block discarded – undo
1137 1137
 
1138 1138
 		$default_status = EE_Registry::instance()->CFG->registration->default_STS_ID;
1139 1139
 		$template_args['attendee'] = $this->_registration->attendee();
1140
-		$template = REG_TEMPLATE_PATH . 'reg_status_change_buttons.template.php';
1141
-		if ( $this->_set_registration_object() ) {
1140
+		$template = REG_TEMPLATE_PATH.'reg_status_change_buttons.template.php';
1141
+		if ($this->_set_registration_object()) {
1142 1142
 			$current_status = $this->_registration->status_ID();
1143
-			unset( $status_buttons[$current_status] );
1144
-			if ( $current_status != EEM_Registration::status_id_pending_payment && $is_complete ) {
1145
-				unset( $status_buttons[EEM_Registration::status_id_pending_payment] );
1143
+			unset($status_buttons[$current_status]);
1144
+			if ($current_status != EEM_Registration::status_id_pending_payment && $is_complete) {
1145
+				unset($status_buttons[EEM_Registration::status_id_pending_payment]);
1146 1146
 			}
1147
-			$template_args['status_buttons'] = implode( "\n", $status_buttons );
1147
+			$template_args['status_buttons'] = implode("\n", $status_buttons);
1148 1148
 		}
1149 1149
 		$template_args['form_url'] = REG_ADMIN_URL;
1150 1150
 		$template_args['REG_ID'] = $this->_registration->ID();
1151
-		$template_args['nonce'] = wp_nonce_field( 'change_reg_status_nonce',  'change_reg_status_nonce', FALSE, FALSE );
1151
+		$template_args['nonce'] = wp_nonce_field('change_reg_status_nonce', 'change_reg_status_nonce', FALSE, FALSE);
1152 1152
 
1153
-		return EEH_Template::display_template( $template, $template_args, TRUE );
1153
+		return EEH_Template::display_template($template, $template_args, TRUE);
1154 1154
 
1155 1155
 	}
1156 1156
 
@@ -1164,11 +1164,11 @@  discard block
 block discarded – undo
1164 1164
 	private function _get_reg_status_buttons() {
1165 1165
 
1166 1166
 		$buttons = array(
1167
-			EEM_Registration::status_id_approved => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-' . EEM_Registration::status_id_approved . '" value="' . EEH_Template::pretty_status( EEM_Registration::status_id_approved, FALSE, 'sentence' ) . '">',
1168
-			EEM_Registration::status_id_pending_payment => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-' . EEM_Registration::status_id_pending_payment . '" value="' . EEH_Template::pretty_status( EEM_Registration::status_id_pending_payment, FALSE, 'sentence' ) . '">',
1169
-			EEM_Registration::status_id_not_approved => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-' . EEM_Registration::status_id_not_approved . '" value="' . EEH_Template::pretty_status( EEM_Registration::status_id_not_approved, FALSE, 'sentence' ) . '">',
1170
-			EEM_Registration::status_id_declined => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-' . EEM_Registration::status_id_declined . '" value="' . EEH_Template::pretty_status( EEM_Registration::status_id_declined, FALSE, 'sentence' ) . '">',
1171
-			EEM_Registration::status_id_cancelled =>'<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-' . EEM_Registration::status_id_cancelled . '" value="' . EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, FALSE, 'sentence' ) . '">',
1167
+			EEM_Registration::status_id_approved => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-'.EEM_Registration::status_id_approved.'" value="'.EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence').'">',
1168
+			EEM_Registration::status_id_pending_payment => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-'.EEM_Registration::status_id_pending_payment.'" value="'.EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, FALSE, 'sentence').'">',
1169
+			EEM_Registration::status_id_not_approved => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-'.EEM_Registration::status_id_not_approved.'" value="'.EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, FALSE, 'sentence').'">',
1170
+			EEM_Registration::status_id_declined => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-'.EEM_Registration::status_id_declined.'" value="'.EEH_Template::pretty_status(EEM_Registration::status_id_declined, FALSE, 'sentence').'">',
1171
+			EEM_Registration::status_id_cancelled =>'<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-'.EEM_Registration::status_id_cancelled.'" value="'.EEH_Template::pretty_status(EEM_Registration::status_id_cancelled, FALSE, 'sentence').'">',
1172 1172
 			);
1173 1173
 		return $buttons;
1174 1174
 	}
@@ -1185,42 +1185,42 @@  discard block
 block discarded – undo
1185 1185
 	 * @internal param $bool $notify Whether or not to notify the registrant(s) about the status change.
1186 1186
 	 * @return array
1187 1187
 	 */
1188
-	private function _set_registration_status( $REG_ID = FALSE, $status = FALSE, $notify = FALSE ) {
1188
+	private function _set_registration_status($REG_ID = FALSE, $status = FALSE, $notify = FALSE) {
1189 1189
 		$success = FALSE;
1190 1190
 		// set default status if none is passed
1191 1191
 		$status = $status ? $status : EEM_Registration::status_id_pending_payment;
1192 1192
 		// have we been passed a REG_ID ?
1193
-		if ( ! $REG_ID ) {
1193
+		if ( ! $REG_ID) {
1194 1194
 			// no ? then check for one in the req data
1195
-			$REG_ID = isset( $this->_req_data['_REG_ID'] ) && !is_array( $this->_req_data['_REG_ID'] ) ? absint( $this->_req_data['_REG_ID'] ) : $REG_ID;
1195
+			$REG_ID = isset($this->_req_data['_REG_ID']) && ! is_array($this->_req_data['_REG_ID']) ? absint($this->_req_data['_REG_ID']) : $REG_ID;
1196 1196
 		}
1197 1197
 		// still don't have one?
1198
-		if ( ! $REG_ID ) {
1198
+		if ( ! $REG_ID) {
1199 1199
 			// then check req data for an array of REG_IDs
1200
-			$REG_IDs = isset( $this->_req_data['_REG_ID'] ) && is_array( $this->_req_data['_REG_ID'] ) ? (array) $this->_req_data['_REG_ID'] : array();
1200
+			$REG_IDs = isset($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID']) ? (array) $this->_req_data['_REG_ID'] : array();
1201 1201
 			$success = TRUE;
1202 1202
 			// loop thru REG_IDs and set each reg status separately
1203
-			foreach ( $REG_IDs as $REG_ID ) {
1204
-				$result = $this->_set_registration_status( $REG_ID, $status, $notify );
1205
-				$success = isset( $result['success'] ) && $result['success'] ? $success : FALSE;
1203
+			foreach ($REG_IDs as $REG_ID) {
1204
+				$result = $this->_set_registration_status($REG_ID, $status, $notify);
1205
+				$success = isset($result['success']) && $result['success'] ? $success : FALSE;
1206 1206
 			}
1207 1207
 			$REG_ID = FALSE;
1208 1208
 		}
1209
-		if ( $REG_ID ) {
1210
-			$registration = EEM_Registration::instance()->get_one_by_ID( $REG_ID );
1211
-			if ( $registration instanceof EE_Registration ) {
1212
-				$registration->set_status( $status );
1209
+		if ($REG_ID) {
1210
+			$registration = EEM_Registration::instance()->get_one_by_ID($REG_ID);
1211
+			if ($registration instanceof EE_Registration) {
1212
+				$registration->set_status($status);
1213 1213
 				$success = $registration->save();
1214 1214
 			}
1215 1215
 			//make sure we don't just get 0 updated
1216 1216
 			$success = $success === FALSE ? FALSE : TRUE;
1217 1217
 
1218
-			if ( $success && $notify && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_resend_registration' ) ) {
1218
+			if ($success && $notify && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_resend_registration')) {
1219 1219
 				$this->_req_data['_REG_ID'] = $REG_ID;
1220 1220
 				$this->_process_resend_registration();
1221 1221
 			}
1222 1222
 		}
1223
-		return array( 'REG_ID' => $REG_ID, 'success' => $success );
1223
+		return array('REG_ID' => $REG_ID, 'success' => $success);
1224 1224
 	}
1225 1225
 
1226 1226
 
@@ -1232,27 +1232,27 @@  discard block
 block discarded – undo
1232 1232
 	 * @param  array  $result array from _set_registration_status()
1233 1233
 	 * @return void
1234 1234
 	 */
1235
-	private function _reg_status_change_return( $STS_ID, $result ) {
1236
-		$success = isset( $result['success'] ) && $result['success'] ? TRUE : FALSE;
1235
+	private function _reg_status_change_return($STS_ID, $result) {
1236
+		$success = isset($result['success']) && $result['success'] ? TRUE : FALSE;
1237 1237
 
1238 1238
 		//setup success message
1239
-		if ( $success ) {
1239
+		if ($success) {
1240 1240
 
1241
-			$msg = $result['REG_ID'] ? sprintf( __('Registration status has been set to %s', 'event_espresso'), EEH_Template::pretty_status($STS_ID, FALSE, 'lower' ) ) :  sprintf( __('Registrations have been %s.', 'event_espresso'), EEH_Template::pretty_status($STS_ID, FALSE, 'lower' ) ) ;
1242
-			EE_Error::add_success( $msg );
1241
+			$msg = $result['REG_ID'] ? sprintf(__('Registration status has been set to %s', 'event_espresso'), EEH_Template::pretty_status($STS_ID, FALSE, 'lower')) : sprintf(__('Registrations have been %s.', 'event_espresso'), EEH_Template::pretty_status($STS_ID, FALSE, 'lower'));
1242
+			EE_Error::add_success($msg);
1243 1243
 		} else {
1244
-			EE_Error::add_error( __('Something went wrong, and the status was not changed', 'event_espresso' ), __FILE__, __LINE__, __FUNCTION__ );
1244
+			EE_Error::add_error(__('Something went wrong, and the status was not changed', 'event_espresso'), __FILE__, __LINE__, __FUNCTION__);
1245 1245
 		}
1246 1246
 
1247
-		$route = isset( $this->_req_data['return'] ) && $this->_req_data['return'] == 'view_registration' ? array( 'action' => 'view_registration', '_REG_ID' => $result['REG_ID'] ) : array( 'action' => 'default' );
1247
+		$route = isset($this->_req_data['return']) && $this->_req_data['return'] == 'view_registration' ? array('action' => 'view_registration', '_REG_ID' => $result['REG_ID']) : array('action' => 'default');
1248 1248
 
1249 1249
 		//was the send notification toggle checked?
1250
-		if ( !empty( $this->_req_data['txn_reg_status_change']['send_notifications'] ) && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_resend_registration' ) ) {
1250
+		if ( ! empty($this->_req_data['txn_reg_status_change']['send_notifications']) && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_resend_registration')) {
1251 1251
 			$this->_req_data['_REG_ID'] = $result['REG_ID'];
1252 1252
 			$this->_process_resend_registration();
1253 1253
 		}
1254 1254
 
1255
-		$this->_redirect_after_action( FALSE, '', '', $route, TRUE );
1255
+		$this->_redirect_after_action(FALSE, '', '', $route, TRUE);
1256 1256
 	}
1257 1257
 
1258 1258
 
@@ -1264,30 +1264,30 @@  discard block
 block discarded – undo
1264 1264
 	protected function _change_reg_status() {
1265 1265
 		$success = FALSE;
1266 1266
 		$this->_req_data['return'] = 'view_registration';
1267
-		if ( !isset( $this->_req_data['_reg_status_id'] ) ) {
1267
+		if ( ! isset($this->_req_data['_reg_status_id'])) {
1268 1268
 			$result['success'] = FALSE;
1269
-			$this->_reg_status_change_return( '', $result );
1269
+			$this->_reg_status_change_return('', $result);
1270 1270
 		}
1271 1271
 
1272
-		switch ( $this->_req_data['_reg_status_id'] ) {
1273
-			case EEH_Template::pretty_status( EEM_Registration::status_id_approved, FALSE, 'sentence' ) :
1272
+		switch ($this->_req_data['_reg_status_id']) {
1273
+			case EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence') :
1274 1274
 				$this->approve_registration();
1275 1275
 				break;
1276
-			case EEH_Template::pretty_status( EEM_Registration::status_id_pending_payment, FALSE, 'sentence' ) :
1276
+			case EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, FALSE, 'sentence') :
1277 1277
 				$this->pending_registration();
1278 1278
 				break;
1279
-			case EEH_Template::pretty_status( EEM_Registration::status_id_not_approved, FALSE, 'sentence' ) :
1279
+			case EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, FALSE, 'sentence') :
1280 1280
 				$this->not_approve_registration();
1281 1281
 				break;
1282
-			case EEH_Template::pretty_status( EEM_Registration::status_id_declined, FALSE, 'sentence' ) :
1282
+			case EEH_Template::pretty_status(EEM_Registration::status_id_declined, FALSE, 'sentence') :
1283 1283
 				$this->decline_registration();
1284 1284
 				break;
1285
-			case EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, FALSE, 'sentence' ) :
1285
+			case EEH_Template::pretty_status(EEM_Registration::status_id_cancelled, FALSE, 'sentence') :
1286 1286
 				$this->cancel_registration();
1287 1287
 				break;
1288 1288
 			default :
1289 1289
 				$result['success'] = FALSE;
1290
-				$this->_reg_status_change_return( '', $result );
1290
+				$this->_reg_status_change_return('', $result);
1291 1291
 				break;
1292 1292
 		}
1293 1293
 	}
@@ -1300,9 +1300,9 @@  discard block
 block discarded – undo
1300 1300
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1301 1301
 	*		@return void
1302 1302
 	*/
1303
-	protected function approve_registration( $notify = FALSE ) {
1304
-		$result = $this->_set_registration_status( FALSE, EEM_Registration::status_id_approved, $notify );
1305
-		$this->_reg_status_change_return( EEM_Registration::status_id_approved, $result );
1303
+	protected function approve_registration($notify = FALSE) {
1304
+		$result = $this->_set_registration_status(FALSE, EEM_Registration::status_id_approved, $notify);
1305
+		$this->_reg_status_change_return(EEM_Registration::status_id_approved, $result);
1306 1306
 	}
1307 1307
 
1308 1308
 
@@ -1313,9 +1313,9 @@  discard block
 block discarded – undo
1313 1313
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1314 1314
 	*		@return void
1315 1315
 	*/
1316
-	protected function decline_registration( $notify = FALSE ) {
1317
-		$result = $this->_set_registration_status( FALSE, EEM_Registration::status_id_declined, $notify );
1318
-		$this->_reg_status_change_return( EEM_Registration::status_id_declined, $result );
1316
+	protected function decline_registration($notify = FALSE) {
1317
+		$result = $this->_set_registration_status(FALSE, EEM_Registration::status_id_declined, $notify);
1318
+		$this->_reg_status_change_return(EEM_Registration::status_id_declined, $result);
1319 1319
 	}
1320 1320
 
1321 1321
 
@@ -1327,9 +1327,9 @@  discard block
 block discarded – undo
1327 1327
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1328 1328
 	*		@return void
1329 1329
 	*/
1330
-	protected function cancel_registration( $notify = FALSE ) {
1331
-		$result = $this->_set_registration_status( FALSE, EEM_Registration::status_id_cancelled, $notify );
1332
-		$this->_reg_status_change_return( EEM_Registration::status_id_cancelled, $result );
1330
+	protected function cancel_registration($notify = FALSE) {
1331
+		$result = $this->_set_registration_status(FALSE, EEM_Registration::status_id_cancelled, $notify);
1332
+		$this->_reg_status_change_return(EEM_Registration::status_id_cancelled, $result);
1333 1333
 	}
1334 1334
 
1335 1335
 
@@ -1342,9 +1342,9 @@  discard block
 block discarded – undo
1342 1342
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1343 1343
 	*		@return void
1344 1344
 	*/
1345
-	protected function not_approve_registration( $notify = FALSE ) {
1346
-		$result = $this->_set_registration_status( FALSE, EEM_Registration::status_id_not_approved, $notify );
1347
-		$this->_reg_status_change_return( EEM_Registration::status_id_not_approved, $result );
1345
+	protected function not_approve_registration($notify = FALSE) {
1346
+		$result = $this->_set_registration_status(FALSE, EEM_Registration::status_id_not_approved, $notify);
1347
+		$this->_reg_status_change_return(EEM_Registration::status_id_not_approved, $result);
1348 1348
 	}
1349 1349
 
1350 1350
 
@@ -1355,9 +1355,9 @@  discard block
 block discarded – undo
1355 1355
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1356 1356
 	*		@return void
1357 1357
 	*/
1358
-	protected function pending_registration( $notify = FALSE ) {
1359
-		$result = $this->_set_registration_status( FALSE, EEM_Registration::status_id_pending_payment, $notify );
1360
-		$this->_reg_status_change_return( EEM_Registration::status_id_pending_payment, $result );
1358
+	protected function pending_registration($notify = FALSE) {
1359
+		$result = $this->_set_registration_status(FALSE, EEM_Registration::status_id_pending_payment, $notify);
1360
+		$this->_reg_status_change_return(EEM_Registration::status_id_pending_payment, $result);
1361 1361
 	}
1362 1362
 
1363 1363
 
@@ -1373,70 +1373,70 @@  discard block
 block discarded – undo
1373 1373
 		$this->_session = $transaction->session_data();
1374 1374
 
1375 1375
 		$this->_template_args['REG_ID'] = $this->_registration->ID();
1376
-		$this->_template_args['line_items'] = $transaction->get_many_related('Line_Item', array( array('LIN_type' => 'line-item' ) ) );
1376
+		$this->_template_args['line_items'] = $transaction->get_many_related('Line_Item', array(array('LIN_type' => 'line-item')));
1377 1377
 
1378 1378
 
1379 1379
 		$attendee = $this->_registration->attendee();
1380 1380
 
1381 1381
 		// process taxes
1382
-		if ( $transaction ) {
1382
+		if ($transaction) {
1383 1383
 			//get all "tax" line items for this transaction and we'll use them for the tax display.
1384
-			$taxes = $transaction->get_many_related('Line_Item', array(array('LIN_type' => EEM_Line_Item::type_tax ) ) );
1385
-			$this->_template_args['taxes'] = !empty($taxes) ? $taxes : array();
1384
+			$taxes = $transaction->get_many_related('Line_Item', array(array('LIN_type' => EEM_Line_Item::type_tax)));
1385
+			$this->_template_args['taxes'] = ! empty($taxes) ? $taxes : array();
1386 1386
 		} else {
1387 1387
 			$this->_template_args['taxes'] = array();
1388 1388
 		}
1389 1389
 
1390
-		$this->_template_args['view_transaction_button'] = EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction' ) ?EEH_Template::get_button_or_link( EE_Admin_Page::add_query_args_and_nonce( array('action'=> 'view_transaction', 'TXN_ID' => $transaction->ID() ), TXN_ADMIN_URL ), __(' View Transaction'), 'button secondary-button right', 'dashicons dashicons-cart' ) : '';
1391
-		$this->_template_args['resend_registration_button'] = $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_resend_registration' ) ?EEH_Template::get_button_or_link( EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'resend_registration', '_REG_ID'=>$this->_registration->ID(), 'redirect_to' => 'view_registration' ), REG_ADMIN_URL ), __(' Resend Registration'), 'button secondary-button right', 'dashicons dashicons-email-alt' ) : '';
1390
+		$this->_template_args['view_transaction_button'] = EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? EEH_Template::get_button_or_link(EE_Admin_Page::add_query_args_and_nonce(array('action'=> 'view_transaction', 'TXN_ID' => $transaction->ID()), TXN_ADMIN_URL), __(' View Transaction'), 'button secondary-button right', 'dashicons dashicons-cart') : '';
1391
+		$this->_template_args['resend_registration_button'] = $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_resend_registration') ? EEH_Template::get_button_or_link(EE_Admin_Page::add_query_args_and_nonce(array('action'=>'resend_registration', '_REG_ID'=>$this->_registration->ID(), 'redirect_to' => 'view_registration'), REG_ADMIN_URL), __(' Resend Registration'), 'button secondary-button right', 'dashicons dashicons-email-alt') : '';
1392 1392
 
1393
-		$this->_template_args['grand_total'] = EEH_Template::format_currency( $transaction->total() );
1393
+		$this->_template_args['grand_total'] = EEH_Template::format_currency($transaction->total());
1394 1394
 
1395 1395
 		$this->_template_args['currency_sign'] = EE_Registry::instance()->CFG->currency->sign;
1396
-		$payment = $transaction->get_first_related( 'Payment' );
1396
+		$payment = $transaction->get_first_related('Payment');
1397 1397
 		$payment = ! $payment instanceof EE_Payment ? EE_Payment::new_instance() : $payment;
1398
-		$payment_method = $payment->get_first_related( 'Payment_Method' );
1398
+		$payment_method = $payment->get_first_related('Payment_Method');
1399 1399
 		$payment_method = ! $payment_method instanceof EE_Payment_Method ? EE_Payment_Method::new_instance() : $payment_method;
1400
-		$reg_status_class = 'status-' . $this->_registration->status_ID();
1400
+		$reg_status_class = 'status-'.$this->_registration->status_ID();
1401 1401
 		$reg_details = array(
1402 1402
 			'payment_method' => $payment_method->name(),
1403 1403
 			'response_msg' => $payment->gateway_response(),
1404
-			'registration_id' => $this->_registration->get( 'REG_code' ),
1404
+			'registration_id' => $this->_registration->get('REG_code'),
1405 1405
 			'registration_session' => $this->_registration->session_ID(),
1406
-			'ip_address' => isset( $this->_session['ip_address'] ) ? $this->_session['ip_address'] : '',
1407
-			'user_agent' => isset( $this->_session['user_agent'] ) ? $this->_session['user_agent'] : '',
1406
+			'ip_address' => isset($this->_session['ip_address']) ? $this->_session['ip_address'] : '',
1407
+			'user_agent' => isset($this->_session['user_agent']) ? $this->_session['user_agent'] : '',
1408 1408
 			);
1409 1409
 
1410 1410
 
1411
-		if ( isset( $reg_details['registration_id'] )) {
1411
+		if (isset($reg_details['registration_id'])) {
1412 1412
 			$this->_template_args['reg_details']['registration_id']['value'] = $reg_details['registration_id'];
1413
-			$this->_template_args['reg_details']['registration_id']['label'] = __( 'Registration ID', 'event_espresso' );
1413
+			$this->_template_args['reg_details']['registration_id']['label'] = __('Registration ID', 'event_espresso');
1414 1414
 			$this->_template_args['reg_details']['registration_id']['class'] = 'regular-text';
1415 1415
 		}
1416 1416
 
1417
-		if ( isset( $reg_details['payment_method'] ) ) {
1417
+		if (isset($reg_details['payment_method'])) {
1418 1418
 			$this->_template_args['reg_details']['payment_method']['value'] = $reg_details['payment_method'];
1419
-			$this->_template_args['reg_details']['payment_method']['label'] = __( 'Most Recent Payment Method', 'event_espresso' );
1419
+			$this->_template_args['reg_details']['payment_method']['label'] = __('Most Recent Payment Method', 'event_espresso');
1420 1420
 			$this->_template_args['reg_details']['payment_method']['class'] = 'regular-text';
1421 1421
 			$this->_template_args['reg_details']['response_msg']['value'] = $reg_details['response_msg'];
1422
-			$this->_template_args['reg_details']['response_msg']['label'] = __( 'Payment method response', 'event_espresso' );
1422
+			$this->_template_args['reg_details']['response_msg']['label'] = __('Payment method response', 'event_espresso');
1423 1423
 			$this->_template_args['reg_details']['response_msg']['class'] = 'regular-text';
1424 1424
 		}
1425 1425
 
1426 1426
 		$this->_template_args['reg_details']['registration_session']['value'] = $reg_details['registration_session'];
1427
-		$this->_template_args['reg_details']['registration_session']['label'] = __( 'Registration Session', 'event_espresso' );
1427
+		$this->_template_args['reg_details']['registration_session']['label'] = __('Registration Session', 'event_espresso');
1428 1428
 		$this->_template_args['reg_details']['registration_session']['class'] = 'regular-text';
1429 1429
 
1430 1430
 		$this->_template_args['reg_details']['ip_address']['value'] = $reg_details['ip_address'];
1431
-		$this->_template_args['reg_details']['ip_address']['label'] = __( 'Registration placed from IP', 'event_espresso' );
1431
+		$this->_template_args['reg_details']['ip_address']['label'] = __('Registration placed from IP', 'event_espresso');
1432 1432
 		$this->_template_args['reg_details']['ip_address']['class'] = 'regular-text';
1433 1433
 
1434 1434
 		$this->_template_args['reg_details']['user_agent']['value'] = $reg_details['user_agent'];
1435
-		$this->_template_args['reg_details']['user_agent']['label'] = __( 'Registrant User Agent', 'event_espresso' );
1435
+		$this->_template_args['reg_details']['user_agent']['label'] = __('Registrant User Agent', 'event_espresso');
1436 1436
 		$this->_template_args['reg_details']['user_agent']['class'] = 'large-text';
1437 1437
 
1438
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_reg_details.template.php';
1439
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1438
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_details_main_meta_box_reg_details.template.php';
1439
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1440 1440
 
1441 1441
 	}
1442 1442
 
@@ -1452,23 +1452,23 @@  discard block
 block discarded – undo
1452 1452
 	*/
1453 1453
 	public function _reg_questions_meta_box() {
1454 1454
 
1455
-		add_filter( 'FHEE__EEH_Form_Fields__generate_question_groups_html__before_question_group_questions', array( $this, 'form_before_question_group' ), 10, 1 );
1456
-		add_filter( 'FHEE__EEH_Form_Fields__generate_question_groups_html__after_question_group_questions', array( $this, 'form_after_question_group' ), 10, 1 );
1457
-		add_filter( 'FHEE__EEH_Form_Fields__label_html', array( $this, 'form_form_field_label_wrap' ), 10, 1 );
1458
-		add_filter( 'FHEE__EEH_Form_Fields__input_html', array( $this, 'form_form_field_input__wrap' ), 10, 1 );
1455
+		add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__before_question_group_questions', array($this, 'form_before_question_group'), 10, 1);
1456
+		add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__after_question_group_questions', array($this, 'form_after_question_group'), 10, 1);
1457
+		add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'form_form_field_label_wrap'), 10, 1);
1458
+		add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'form_form_field_input__wrap'), 10, 1);
1459 1459
 
1460
-		$question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options( $this->_registration, $this->_registration->get('EVT_ID') );
1460
+		$question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options($this->_registration, $this->_registration->get('EVT_ID'));
1461 1461
 
1462 1462
 		//EEH_Debug_Tools::printr( $question_groups, '$question_groups  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
1463 1463
 
1464
-		EE_Registry::instance()->load_helper( 'Form_Fields' );
1465
-		$this->_template_args['att_questions'] = EEH_Form_Fields::generate_question_groups_html( $question_groups );
1464
+		EE_Registry::instance()->load_helper('Form_Fields');
1465
+		$this->_template_args['att_questions'] = EEH_Form_Fields::generate_question_groups_html($question_groups);
1466 1466
 
1467 1467
 		$this->_template_args['reg_questions_form_action'] = 'update_attendee_registration_form';
1468 1468
 		$this->_template_args['REG_ID'] = $this->_registration->ID();
1469 1469
 
1470
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_reg_questions.template.php';
1471
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1470
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_details_main_meta_box_reg_questions.template.php';
1471
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1472 1472
 
1473 1473
 	}
1474 1474
 
@@ -1483,7 +1483,7 @@  discard block
 block discarded – undo
1483 1483
 	 * 		@param 		string 		$output
1484 1484
 	 * 		@return 		string
1485 1485
 	 */
1486
-	public function form_before_question_group( $output ) {
1486
+	public function form_before_question_group($output) {
1487 1487
 		return '
1488 1488
 	<table class="form-table ee-width-100">
1489 1489
 		<tbody>
@@ -1500,13 +1500,13 @@  discard block
 block discarded – undo
1500 1500
 	 * 		@param 		string 		$output
1501 1501
 	 * 		@return 		string
1502 1502
 	 */
1503
-	public function form_after_question_group( $output ) {
1503
+	public function form_after_question_group($output) {
1504 1504
 		return  '
1505 1505
 			<tr class="hide-if-no-js">
1506 1506
 				<th> </th>
1507 1507
 				<td class="reg-admin-edit-attendee-question-td">
1508
-					<a class="reg-admin-edit-attendee-question-lnk" href="#" title="' . esc_attr__( 'click to edit question', 'event_espresso' ) . '">
1509
-						<span class="reg-admin-edit-question-group-spn lt-grey-txt">' . __( 'edit the above question group', 'event_espresso' ) . '</span>
1508
+					<a class="reg-admin-edit-attendee-question-lnk" href="#" title="' . esc_attr__('click to edit question', 'event_espresso').'">
1509
+						<span class="reg-admin-edit-question-group-spn lt-grey-txt">' . __('edit the above question group', 'event_espresso').'</span>
1510 1510
 						<div class="dashicons dashicons-edit"></div>
1511 1511
 					</a>
1512 1512
 				</td>
@@ -1526,11 +1526,11 @@  discard block
 block discarded – undo
1526 1526
 	 * 		@param 		string 		$label
1527 1527
 	 * 		@return 		string
1528 1528
 	 */
1529
-	public function form_form_field_label_wrap( $label ) {
1529
+	public function form_form_field_label_wrap($label) {
1530 1530
 		return '
1531 1531
 			<tr>
1532 1532
 				<th>
1533
-					' . $label  . '
1533
+					' . $label.'
1534 1534
 				</th>';
1535 1535
 	}
1536 1536
 
@@ -1544,10 +1544,10 @@  discard block
 block discarded – undo
1544 1544
 	 * 		@param 		string 		$label
1545 1545
 	 * 		@return 		string
1546 1546
 	 */
1547
-	public function form_form_field_input__wrap( $input ) {
1547
+	public function form_form_field_input__wrap($input) {
1548 1548
 		return '
1549 1549
 				<td class="reg-admin-attendee-questions-input-td disabled-input">
1550
-					' . $input . '
1550
+					' . $input.'
1551 1551
 				</td>
1552 1552
 			</tr>';
1553 1553
 	}
@@ -1561,13 +1561,13 @@  discard block
 block discarded – undo
1561 1561
 	*		@return void
1562 1562
 	*/
1563 1563
 	protected function _update_attendee_registration_form() {
1564
-		$qstns = isset( $this->_req_data['qstn'] ) ? $this->_req_data['qstn'] : FALSE;
1565
-		$REG_ID = isset( $this->_req_data['_REG_ID'] ) ? absint( $this->_req_data['_REG_ID'] ) : FALSE;
1566
-		$qstns = apply_filters( 'FHEE__Registrations_Admin_Page___update_attendee_registration_form__qstns', $qstns );
1567
-		$success = $this->_save_attendee_registration_form( $REG_ID, $qstns );
1564
+		$qstns = isset($this->_req_data['qstn']) ? $this->_req_data['qstn'] : FALSE;
1565
+		$REG_ID = isset($this->_req_data['_REG_ID']) ? absint($this->_req_data['_REG_ID']) : FALSE;
1566
+		$qstns = apply_filters('FHEE__Registrations_Admin_Page___update_attendee_registration_form__qstns', $qstns);
1567
+		$success = $this->_save_attendee_registration_form($REG_ID, $qstns);
1568 1568
 		$what = __('Registration Form', 'event_espresso');
1569
-		$route = $REG_ID ? array( 'action' => 'view_registration', '_REG_ID' => $REG_ID ) : array( 'action' => 'default' );
1570
-		$this->_redirect_after_action( $success, $what, __('updated', 'event_espresso'), $route );
1569
+		$route = $REG_ID ? array('action' => 'view_registration', '_REG_ID' => $REG_ID) : array('action' => 'default');
1570
+		$this->_redirect_after_action($success, $what, __('updated', 'event_espresso'), $route);
1571 1571
 
1572 1572
 	}
1573 1573
 
@@ -1580,26 +1580,26 @@  discard block
 block discarded – undo
1580 1580
 	 * @param bool $qstns
1581 1581
 	 * @return bool
1582 1582
 	 */
1583
-	private function _save_attendee_registration_form( $REG_ID = FALSE, $qstns = FALSE ) {
1583
+	private function _save_attendee_registration_form($REG_ID = FALSE, $qstns = FALSE) {
1584 1584
 
1585
-		if ( ! $REG_ID || ! $qstns ) {
1586
-			EE_Error::add_error( __('An error occurred. No registration ID and/or registration questions were received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
1585
+		if ( ! $REG_ID || ! $qstns) {
1586
+			EE_Error::add_error(__('An error occurred. No registration ID and/or registration questions were received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
1587 1587
 		}
1588 1588
 		$success = TRUE;
1589 1589
 
1590 1590
 		// allow others to get in on this awesome fun   :D
1591
-		do_action( 'AHEE__Registrations_Admin_Page___save_attendee_registration_form__after_reg_and_attendee_save', $REG_ID, $qstns );
1591
+		do_action('AHEE__Registrations_Admin_Page___save_attendee_registration_form__after_reg_and_attendee_save', $REG_ID, $qstns);
1592 1592
 		// loop thru questions... FINALLY!!!
1593 1593
 
1594
-		foreach ( $qstns as $QST_ID => $qstn ) {
1594
+		foreach ($qstns as $QST_ID => $qstn) {
1595 1595
 			//if $qstn isn't an array then it doesn't already have an answer, so let's create the answer
1596
-			if ( !is_array($qstn) ) {
1597
-				$success = $this->_save_new_answer( $REG_ID, $QST_ID, $qstn);
1596
+			if ( ! is_array($qstn)) {
1597
+				$success = $this->_save_new_answer($REG_ID, $QST_ID, $qstn);
1598 1598
 				continue;
1599 1599
 			}
1600 1600
 
1601 1601
 
1602
-			foreach ( $qstn as $ANS_ID => $ANS_value ) {
1602
+			foreach ($qstn as $ANS_ID => $ANS_value) {
1603 1603
 				//get answer
1604 1604
 				$query_params = array(
1605 1605
 					0 => array(
@@ -1610,8 +1610,8 @@  discard block
 block discarded – undo
1610 1610
 					);
1611 1611
 				$answer = EEM_Answer::instance()->get_one($query_params);
1612 1612
 				//this MAY be an array but NOT have an answer because its multi select.  If so then we need to create the answer
1613
-				if ( ! $answer instanceof EE_Answer ) {
1614
-					$success = $this->_save_new_answer( $REG_ID, $QST_ID, $qstn);
1613
+				if ( ! $answer instanceof EE_Answer) {
1614
+					$success = $this->_save_new_answer($REG_ID, $QST_ID, $qstn);
1615 1615
 					continue 2;
1616 1616
 				}
1617 1617
 
@@ -1625,7 +1625,7 @@  discard block
 block discarded – undo
1625 1625
 
1626 1626
 
1627 1627
 	//TODO: try changing this to use the model directly... not indirectly through creating a default object...
1628
-	private function _save_new_answer( $REG_ID, $QST_ID, $ans ) {
1628
+	private function _save_new_answer($REG_ID, $QST_ID, $ans) {
1629 1629
 		$set_values = array(
1630 1630
 			'QST_ID' => $QST_ID,
1631 1631
 			'REG_ID' => $REG_ID,
@@ -1652,30 +1652,30 @@  discard block
 block discarded – undo
1652 1652
 		$registrations = $REG->get_all(array(
1653 1653
 			array(
1654 1654
 				'TXN_ID'=>$this->_registration->transaction_ID(),
1655
-				'REG_ID'=>array('!=',$this->_registration->ID())
1655
+				'REG_ID'=>array('!=', $this->_registration->ID())
1656 1656
 			),
1657 1657
 			'force_join'=>array('Attendee')));
1658 1658
 
1659 1659
 		$this->_template_args['attendees'] = array();
1660 1660
 		$this->_template_args['attendee_notice'] = '';
1661 1661
 		EE_Registry::instance()->load_helper('Array');
1662
-		if ( empty( $registrations)  || ( is_array($registrations) &&  ! EEH_Array::get_one_item_from_array($registrations) ) ) {
1663
-			EE_Error::add_error( __('There are no records attached to this registration. Something may have gone wrong with the registration', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
1662
+		if (empty($registrations) || (is_array($registrations) && ! EEH_Array::get_one_item_from_array($registrations))) {
1663
+			EE_Error::add_error(__('There are no records attached to this registration. Something may have gone wrong with the registration', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
1664 1664
 			$this->_template_args['attendee_notice'] = EE_Error::get_notices();
1665 1665
 		} else {
1666 1666
 
1667 1667
 			$att_nmbr = 1;
1668
-			foreach ( $registrations as $registration ) {
1668
+			foreach ($registrations as $registration) {
1669 1669
 				/* @var $registration EE_Registration */
1670 1670
 				$attendee = $registration->attendee() ? $registration->attendee() : EEM_Attendee::instance()->create_default_object();
1671
-				$this->_template_args['attendees'][ $att_nmbr ]['fname'] = $attendee->fname();//( isset( $registration->ATT_fname ) & ! empty( $registration->ATT_fname ) ) ? $registration->ATT_fname : '';
1672
-				$this->_template_args['attendees'][ $att_nmbr ]['lname'] = $attendee->lname();//( isset( $registration->ATT_lname ) & ! empty( $registration->ATT_lname ) ) ? $registration->ATT_lname : '';
1673
-				$this->_template_args['attendees'][ $att_nmbr ]['email'] = $attendee->email();//( isset( $registration->ATT_email ) & ! empty( $registration->ATT_email ) ) ? $registration->ATT_email : '';
1674
-				$this->_template_args['attendees'][ $att_nmbr ]['final_price'] = $registration->price_paid();//( isset( $registration->REG_final_price ) & ! empty( $registration->REG_final_price ) ) ? $registration->REG_final_price : '';
1671
+				$this->_template_args['attendees'][$att_nmbr]['fname'] = $attendee->fname(); //( isset( $registration->ATT_fname ) & ! empty( $registration->ATT_fname ) ) ? $registration->ATT_fname : '';
1672
+				$this->_template_args['attendees'][$att_nmbr]['lname'] = $attendee->lname(); //( isset( $registration->ATT_lname ) & ! empty( $registration->ATT_lname ) ) ? $registration->ATT_lname : '';
1673
+				$this->_template_args['attendees'][$att_nmbr]['email'] = $attendee->email(); //( isset( $registration->ATT_email ) & ! empty( $registration->ATT_email ) ) ? $registration->ATT_email : '';
1674
+				$this->_template_args['attendees'][$att_nmbr]['final_price'] = $registration->price_paid(); //( isset( $registration->REG_final_price ) & ! empty( $registration->REG_final_price ) ) ? $registration->REG_final_price : '';
1675 1675
 
1676
-				$this->_template_args['attendees'][ $att_nmbr ]['address'] = implode( ', ', $attendee->full_address_as_array() );
1676
+				$this->_template_args['attendees'][$att_nmbr]['address'] = implode(', ', $attendee->full_address_as_array());
1677 1677
 
1678
-				$this->_template_args['attendees'][ $att_nmbr ]['att_link'] = self::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$attendee->ID() ), REG_ADMIN_URL );
1678
+				$this->_template_args['attendees'][$att_nmbr]['att_link'] = self::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$attendee->ID()), REG_ADMIN_URL);
1679 1679
 
1680 1680
 				$att_nmbr++;
1681 1681
 			}
@@ -1687,8 +1687,8 @@  discard block
 block discarded – undo
1687 1687
 
1688 1688
 	//			$this->_template_args['registration_form_url'] = add_query_arg( array( 'action' => 'edit_registration', 'process' => 'attendees'  ), REG_ADMIN_URL );
1689 1689
 		}
1690
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_attendees.template.php';
1691
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1690
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_details_main_meta_box_attendees.template.php';
1691
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1692 1692
 
1693 1693
 	}
1694 1694
 
@@ -1709,11 +1709,11 @@  discard block
 block discarded – undo
1709 1709
 		$attendee = $att_check instanceof EE_Attendee ? $att_check : EEM_Attendee::instance()->create_default_object();
1710 1710
 
1711 1711
 		//now let's determine if this is not the primary registration.  If it isn't then we set the primary_registration object for reference BUT ONLY if the Attendee object loaded is not the same as the primary registration object (that way we know if we need to show cereate button or not)
1712
-		if ( ! $this->_registration->is_primary_registrant() ) {
1712
+		if ( ! $this->_registration->is_primary_registrant()) {
1713 1713
 			$primary_registration = $this->_registration->get_primary_registration();
1714 1714
 			$primary_attendee = $primary_registration->attendee();
1715 1715
 
1716
-			if ( ! $primary_attendee instanceof EE_Attendee || $attendee->ID() !== $primary_attendee->ID() ) {
1716
+			if ( ! $primary_attendee instanceof EE_Attendee || $attendee->ID() !== $primary_attendee->ID()) {
1717 1717
 				//in here?  This means the displayed registration is not the primary registrant but ALREADY HAS its own custom attendee object so let's not worry about the primary reg.
1718 1718
 				$primary_registration = NULL;
1719 1719
 			}
@@ -1722,28 +1722,28 @@  discard block
 block discarded – undo
1722 1722
 		}
1723 1723
 
1724 1724
 		$this->_template_args['ATT_ID'] = $attendee->ID();
1725
-		$this->_template_args['fname'] = $attendee->fname();//$this->_registration->ATT_fname;
1726
-		$this->_template_args['lname'] = $attendee->lname();//$this->_registration->ATT_lname;
1727
-		$this->_template_args['email'] = $attendee->email();//$this->_registration->ATT_email;
1725
+		$this->_template_args['fname'] = $attendee->fname(); //$this->_registration->ATT_fname;
1726
+		$this->_template_args['lname'] = $attendee->lname(); //$this->_registration->ATT_lname;
1727
+		$this->_template_args['email'] = $attendee->email(); //$this->_registration->ATT_email;
1728 1728
 		$this->_template_args['phone'] = $attendee->phone();
1729 1729
 
1730
-		EE_Registry::instance()->load_helper( 'Formatter' );
1731
-		$this->_template_args[ 'formatted_address' ] = EEH_Address::format( $attendee );
1730
+		EE_Registry::instance()->load_helper('Formatter');
1731
+		$this->_template_args['formatted_address'] = EEH_Address::format($attendee);
1732 1732
 
1733 1733
 
1734 1734
 		//edit link
1735
-		$this->_template_args['att_edit_link'] = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$attendee->ID() ), REG_ADMIN_URL );
1736
-		$this->_template_args['att_edit_label'] = __('View/Edit Contact' );
1735
+		$this->_template_args['att_edit_link'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$attendee->ID()), REG_ADMIN_URL);
1736
+		$this->_template_args['att_edit_label'] = __('View/Edit Contact');
1737 1737
 
1738 1738
 		//create link
1739
-		$this->_template_args['create_link'] = $primary_registration instanceof EE_Registration ? EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'duplicate_attendee',  '_REG_ID' => $this->_registration->ID() ), REG_ADMIN_URL ): '';
1739
+		$this->_template_args['create_link'] = $primary_registration instanceof EE_Registration ? EE_Admin_Page::add_query_args_and_nonce(array('action' => 'duplicate_attendee', '_REG_ID' => $this->_registration->ID()), REG_ADMIN_URL) : '';
1740 1740
 		$this->_template_args['create_label'] = __('Create Contact', 'event_espresso');
1741 1741
 
1742 1742
 		$this->_template_args['att_check'] = $att_check;
1743 1743
 
1744 1744
 
1745
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_side_meta_box_registrant.template.php';
1746
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1745
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_details_side_meta_box_registrant.template.php';
1746
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1747 1747
 	}
1748 1748
 
1749 1749
 
@@ -1756,7 +1756,7 @@  discard block
 block discarded – undo
1756 1756
 	 * @access protected
1757 1757
 	 * @return void
1758 1758
 	 */
1759
-	protected function _trash_or_restore_registrations( $trash = TRUE ) {
1759
+	protected function _trash_or_restore_registrations($trash = TRUE) {
1760 1760
 		$REGM = EEM_Registration::instance();
1761 1761
 
1762 1762
 		$success = 1;
@@ -1766,26 +1766,26 @@  discard block
 block discarded – undo
1766 1766
 		$dtts = array();
1767 1767
 
1768 1768
 		//if empty _REG_ID then get out because there's nothing to do
1769
-		if ( empty( $this->_req_data['_REG_ID'] ) ) {
1769
+		if (empty($this->_req_data['_REG_ID'])) {
1770 1770
 			$msg = $trash ? __('In order to trash registrations you must select which ones you wish to trash by clicking the checkboxes.', 'event_espresso') : __('In order to restore registrations you must select which ones you wish to restore by clicking the checkboxes.', 'event_espresso');
1771
-			EE_Error::add_error( $msg, __FILE__, __LINE__, __FUNCTION__ );
1772
-			$this->_redirect_after_action(FALSE, '', '', array(), TRUE );
1771
+			EE_Error::add_error($msg, __FILE__, __LINE__, __FUNCTION__);
1772
+			$this->_redirect_after_action(FALSE, '', '', array(), TRUE);
1773 1773
 		}
1774 1774
 
1775 1775
 		//Checkboxes
1776
-		if (!empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1776
+		if ( ! empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1777 1777
 			// if array has more than one element than success message should be plural
1778
-			$success = count( $this->_req_data['_REG_ID'] ) > 1 ? 2 : 1;
1778
+			$success = count($this->_req_data['_REG_ID']) > 1 ? 2 : 1;
1779 1779
 			// cycle thru checkboxes
1780
-			while (list( $ind, $REG_ID ) = each($this->_req_data['_REG_ID'])) {
1780
+			while (list($ind, $REG_ID) = each($this->_req_data['_REG_ID'])) {
1781 1781
 
1782 1782
 				$REG = $REGM->get_one_by_ID($REG_ID);
1783 1783
 				$payment_count = $REG->get_first_related('Transaction')->count_related('Payment');
1784
-				if ( $payment_count > 0 ) {
1784
+				if ($payment_count > 0) {
1785 1785
 					$name = $REG->attendee()->full_name();
1786 1786
 					$error = 1;
1787 1787
 					$success = 0;
1788
-					EE_Error::add_error( sprintf( __('The registration for %s could not be trashed because it has payments attached to the related transaction.  If you wish to trash this registration you must first delete the payments on the related transaction.', 'event_espresso'), $name ), __FILE__, __FUNCTION__, __LINE__ );
1788
+					EE_Error::add_error(sprintf(__('The registration for %s could not be trashed because it has payments attached to the related transaction.  If you wish to trash this registration you must first delete the payments on the related transaction.', 'event_espresso'), $name), __FILE__, __FUNCTION__, __LINE__);
1789 1789
 					continue; //can't trash this registration because it has payments.
1790 1790
 				}
1791 1791
 				$ticket = $REG->get_first_related('Ticket');
@@ -1794,7 +1794,7 @@  discard block
 block discarded – undo
1794 1794
 				$dtts = array_merge($dtts, $dtt);
1795 1795
 
1796 1796
 				$updated = $trash ? $REG->delete() : $REG->restore();
1797
-				if ( !$updated ) {
1797
+				if ( ! $updated) {
1798 1798
 					$success = 0;
1799 1799
 				} else {
1800 1800
 					$success = 2;
@@ -1809,7 +1809,7 @@  discard block
 block discarded – undo
1809 1809
 			$tickets[$ticket->ID()] = $ticket;
1810 1810
 			$dtts = $ticket->get_many_related('Datetime');
1811 1811
 			$updated = $trash ? $REG->delete() : $REG->restore();
1812
-			if ( ! $updated ) {
1812
+			if ( ! $updated) {
1813 1813
 				$success = 0;
1814 1814
 			}
1815 1815
 
@@ -1819,10 +1819,10 @@  discard block
 block discarded – undo
1819 1819
 		EEM_Ticket::instance()->update_tickets_sold($tickets);
1820 1820
 		EEM_Datetime::instance()->update_sold($dtts);
1821 1821
 
1822
-		$what = $success > 1 ? __( 'Registrations', 'event_espresso' ) : __( 'Registration', 'event_espresso' );
1823
-		$action_desc = $trash ? __( 'moved to the trash', 'event_espresso' ) : __( 'restored', 'event_espresso' );
1822
+		$what = $success > 1 ? __('Registrations', 'event_espresso') : __('Registration', 'event_espresso');
1823
+		$action_desc = $trash ? __('moved to the trash', 'event_espresso') : __('restored', 'event_espresso');
1824 1824
 		$overwrite_msgs = $error ? TRUE : FALSE;
1825
-		$this->_redirect_after_action( $success, $what, $action_desc, array( 'action' => 'default' ), $overwrite_msgs );
1825
+		$this->_redirect_after_action($success, $what, $action_desc, array('action' => 'default'), $overwrite_msgs);
1826 1826
 	}
1827 1827
 
1828 1828
 
@@ -1846,16 +1846,16 @@  discard block
 block discarded – undo
1846 1846
 		$success = 1;
1847 1847
 
1848 1848
 		//Checkboxes
1849
-		if (!empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1849
+		if ( ! empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1850 1850
 			// if array has more than one element than success message should be plural
1851
-			$success = count( $this->_req_data['_REG_ID'] ) > 1 ? 2 : 1;
1851
+			$success = count($this->_req_data['_REG_ID']) > 1 ? 2 : 1;
1852 1852
 			// cycle thru checkboxes
1853
-			while (list( $ind, $REG_ID ) = each($this->_req_data['_REG_ID'])) {
1853
+			while (list($ind, $REG_ID) = each($this->_req_data['_REG_ID'])) {
1854 1854
 				$REG = $REG_MDL->get_one_by_ID($REG_ID);
1855
-				if ( ! $REG instanceof EE_Registration )
1855
+				if ( ! $REG instanceof EE_Registration)
1856 1856
 					continue;
1857 1857
 				$deleted = $this->_delete_registration($REG);
1858
-				if ( !$deleted ) {
1858
+				if ( ! $deleted) {
1859 1859
 					$success = 0;
1860 1860
 				}
1861 1861
 			}
@@ -1865,15 +1865,15 @@  discard block
 block discarded – undo
1865 1865
 			$REG_ID = $this->_req_data['_REG_ID'];
1866 1866
 			$REG = $REG_MDL->get_one_by_ID($REG_ID);
1867 1867
 			$deleted = $this->_delete_registration($REG);
1868
-			if ( ! $deleted ) {
1868
+			if ( ! $deleted) {
1869 1869
 				$success = 0;
1870 1870
 			}
1871 1871
 
1872 1872
 		}
1873 1873
 
1874
-		$what = $success > 1 ? __( 'Registrations', 'event_espresso' ) : __( 'Registration', 'event_espresso' );
1875
-		$action_desc = __( 'permanently deleted.', 'event_espresso' );
1876
-		$this->_redirect_after_action( $success, $what, $action_desc, array( 'action' => 'default' ), TRUE );
1874
+		$what = $success > 1 ? __('Registrations', 'event_espresso') : __('Registration', 'event_espresso');
1875
+		$action_desc = __('permanently deleted.', 'event_espresso');
1876
+		$this->_redirect_after_action($success, $what, $action_desc, array('action' => 'default'), TRUE);
1877 1877
 	}
1878 1878
 
1879 1879
 
@@ -1885,31 +1885,31 @@  discard block
 block discarded – undo
1885 1885
 	 * @param  EE_Registration $REG registration to be deleted permenantly
1886 1886
 	 * @return boolean              true = successful deletion, false = fail.
1887 1887
 	 */
1888
-	protected function _delete_registration( EE_Registration $REG ) {
1888
+	protected function _delete_registration(EE_Registration $REG) {
1889 1889
 		//first we start with the transaction... ultimately, we WILL not delete permanently if there are any related registrations on the transaction that are NOT trashed.
1890 1890
 		$TXN = $REG->get_first_related('Transaction');
1891 1891
 		$REGS = $TXN->get_many_related('Registration');
1892 1892
 
1893 1893
 		$all_trashed = TRUE;
1894
-		foreach ( $REGS as $registration ) {
1895
-			if ( ! $registration->get('REG_deleted') )
1894
+		foreach ($REGS as $registration) {
1895
+			if ( ! $registration->get('REG_deleted'))
1896 1896
 				$all_trashed = FALSE;
1897 1897
 		}
1898 1898
 
1899
-		if ( ! $all_trashed ) {
1900
-			EE_Error::add_error( __('Unable to permanently delete this registration. Before this registration can be permanently deleted, all registrations made in the same transaction must be trashed as well.  These registrations will be permanently deleted in the same action.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
1899
+		if ( ! $all_trashed) {
1900
+			EE_Error::add_error(__('Unable to permanently delete this registration. Before this registration can be permanently deleted, all registrations made in the same transaction must be trashed as well.  These registrations will be permanently deleted in the same action.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
1901 1901
 			return false;
1902 1902
 		}
1903 1903
 
1904 1904
 		//k made it here so that means we can delete all the related transactions and their answers (but let's do them separately from THIS one).
1905
-		foreach ( $REGS as $registration ) {
1905
+		foreach ($REGS as $registration) {
1906 1906
 
1907 1907
 			//delete related answers
1908 1908
 			$registration->delete_related_permanently('Answer');
1909 1909
 
1910 1910
 			//remove relationship to EE_Attendee (but we ALWAYS leave the contact record intact)
1911 1911
 			$attendee = $registration->get_first_related('Attendee');
1912
-			if ( $attendee instanceof EE_Attendee ) {
1912
+			if ($attendee instanceof EE_Attendee) {
1913 1913
 				$registration->_remove_relation_to($attendee, 'Attendee');
1914 1914
 			}
1915 1915
 
@@ -1919,7 +1919,7 @@  discard block
 block discarded – undo
1919 1919
 			//now delete permanently the checkins related to this registration.
1920 1920
 			$registration->delete_related_permanently('Checkin');
1921 1921
 
1922
-			if ( $registration->ID() === $REG->ID() )
1922
+			if ($registration->ID() === $REG->ID())
1923 1923
 				continue; //we don't want to delete permanently the existing registration just yet.
1924 1924
 
1925 1925
 			//remove relation to transaction for these registrations if NOT the existing registrations
@@ -1952,34 +1952,34 @@  discard block
 block discarded – undo
1952 1952
 	 * @return void
1953 1953
 	 */
1954 1954
 	public function new_registration() {
1955
-		if ( ! $this->_set_reg_event() ) {
1956
-			throw new EE_Error(__('Unable to continue with registering because there is no Event ID in the request', 'event_espresso') );
1955
+		if ( ! $this->_set_reg_event()) {
1956
+			throw new EE_Error(__('Unable to continue with registering because there is no Event ID in the request', 'event_espresso'));
1957 1957
 		}
1958
-		EE_Registry::instance()->REQ->set_espresso_page( TRUE );
1958
+		EE_Registry::instance()->REQ->set_espresso_page(TRUE);
1959 1959
 
1960 1960
 		// gotta start with a clean slate if we're not coming here via ajax
1961
-		if ( ! defined('DOING_AJAX' ) && ( ! isset( $this->_req_data['processing_registration'] ) || isset( $this->_req_data['step_error'] ))) {
1962
-			EE_Registry::instance()->SSN->clear_session( __CLASS__, __FUNCTION__ );
1961
+		if ( ! defined('DOING_AJAX') && ( ! isset($this->_req_data['processing_registration']) || isset($this->_req_data['step_error']))) {
1962
+			EE_Registry::instance()->SSN->clear_session(__CLASS__, __FUNCTION__);
1963 1963
 		}
1964 1964
 
1965
-		$this->_template_args['event_name'] = '' ;
1965
+		$this->_template_args['event_name'] = '';
1966 1966
 		// event name
1967
-		if ( $this->_reg_event ) {
1967
+		if ($this->_reg_event) {
1968 1968
 			$this->_template_args['event_name'] = $this->_reg_event->name();
1969
-			$edit_event_url = self::add_query_args_and_nonce( array( 'action'=>'edit', 'post'=>$this->_reg_event->ID() ), EVENTS_ADMIN_URL );
1970
-			$edit_event_lnk = '<a href="'.$edit_event_url.'" title="' . esc_attr__( 'Edit ', 'event_espresso' ) . $this->_reg_event->name() . '">' . __( 'Edit Event', 'event_espresso' ) . '</a>';
1971
-			$this->_template_args['event_name'] .= ' <span class="admin-page-header-edit-lnk not-bold">' . $edit_event_lnk . '</span>' ;
1969
+			$edit_event_url = self::add_query_args_and_nonce(array('action'=>'edit', 'post'=>$this->_reg_event->ID()), EVENTS_ADMIN_URL);
1970
+			$edit_event_lnk = '<a href="'.$edit_event_url.'" title="'.esc_attr__('Edit ', 'event_espresso').$this->_reg_event->name().'">'.__('Edit Event', 'event_espresso').'</a>';
1971
+			$this->_template_args['event_name'] .= ' <span class="admin-page-header-edit-lnk not-bold">'.$edit_event_lnk.'</span>';
1972 1972
 		}
1973 1973
 
1974 1974
 		$this->_template_args['step_content'] = $this->_get_registration_step_content();
1975 1975
 
1976
-		if ( defined('DOING_AJAX' ) )
1976
+		if (defined('DOING_AJAX'))
1977 1977
 			$this->_return_json();
1978 1978
 
1979 1979
 
1980 1980
 		// grab header
1981
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_register_new_attendee.template.php';
1982
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1981
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_register_new_attendee.template.php';
1982
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1983 1983
 
1984 1984
 		//$this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE );
1985 1985
 		// the details template wrapper
@@ -1997,7 +1997,7 @@  discard block
 block discarded – undo
1997 1997
 	 */
1998 1998
 	protected function _get_registration_step_content() {
1999 1999
 
2000
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_register_new_attendee_step_content.template.php';
2000
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_register_new_attendee_step_content.template.php';
2001 2001
 		$template_args = array(
2002 2002
 			'title' => '',
2003 2003
 			'content' => '',
@@ -2018,11 +2018,11 @@  discard block
 block discarded – undo
2018 2018
 
2019 2019
 		//if the cart is empty then we know we're at step one so we'll display ticket selector
2020 2020
 		$cart = EE_Registry::instance()->SSN->get_session_data('cart');
2021
-		$step = empty( $cart ) ? 'ticket' : 'questions';
2022
-		switch ( $step ) {
2021
+		$step = empty($cart) ? 'ticket' : 'questions';
2022
+		switch ($step) {
2023 2023
 			case 'ticket' :
2024 2024
 				$template_args['title'] = __('Step One: Select the Ticket for this registration', 'event_espresso');
2025
-				$template_args['content'] = EED_Ticket_Selector::instance()->display_ticket_selector( $this->_reg_event );
2025
+				$template_args['content'] = EED_Ticket_Selector::instance()->display_ticket_selector($this->_reg_event);
2026 2026
 				$template_args['step_button_text'] = __('Add Tickets and Continue to Registrant Details', 'event_espresso');
2027 2027
 				$template_args['show_notification_toggle'] = FALSE;
2028 2028
 				break;
@@ -2035,9 +2035,9 @@  discard block
 block discarded – undo
2035 2035
 				break;
2036 2036
 		}
2037 2037
 
2038
-		$this->_set_add_edit_form_tags( 'process_reg_step', $hidden_fields ); //we come back to the process_registration_step route.
2038
+		$this->_set_add_edit_form_tags('process_reg_step', $hidden_fields); //we come back to the process_registration_step route.
2039 2039
 
2040
-		return EEH_Template::display_template( $template_path, $template_args, TRUE );
2040
+		return EEH_Template::display_template($template_path, $template_args, TRUE);
2041 2041
 	}
2042 2042
 
2043 2043
 
@@ -2051,11 +2051,11 @@  discard block
 block discarded – undo
2051 2051
 	*		@return boolean
2052 2052
 	*/
2053 2053
 	private function _set_reg_event() {
2054
-		if ( is_object( $this->_reg_event )) {
2054
+		if (is_object($this->_reg_event)) {
2055 2055
 			return TRUE;
2056 2056
 		}
2057
-		$EVT_ID = ( ! empty( $this->_req_data['event_id'] )) ? absint( $this->_req_data['event_id'] ) : FALSE;
2058
-		if ( ! $EVT_ID ) {
2057
+		$EVT_ID = ( ! empty($this->_req_data['event_id'])) ? absint($this->_req_data['event_id']) : FALSE;
2058
+		if ( ! $EVT_ID) {
2059 2059
 			return FALSE;
2060 2060
 		}
2061 2061
 
@@ -2076,59 +2076,59 @@  discard block
 block discarded – undo
2076 2076
 	public function process_reg_step() {
2077 2077
 
2078 2078
 		$this->_set_reg_event();
2079
-		EE_Registry::instance()->REQ->set_espresso_page( TRUE );
2079
+		EE_Registry::instance()->REQ->set_espresso_page(TRUE);
2080 2080
 
2081 2081
 		//what step are we on?
2082
-		$cart = EE_Registry::instance()->SSN->get_session_data( 'cart' );
2083
-		$step = empty( $cart ) ? 'ticket' : 'questions';
2082
+		$cart = EE_Registry::instance()->SSN->get_session_data('cart');
2083
+		$step = empty($cart) ? 'ticket' : 'questions';
2084 2084
 
2085 2085
 		//if doing ajax then we need to verify the nonce
2086
-		if ( 'DOING_AJAX' ) {
2087
-			$nonce = isset( $this->_req_data[$this->_req_nonce] ) ? sanitize_text_field( $this->_req_data[$this->_req_nonce] ) : '';
2088
-			$this->_verify_nonce( $nonce, $this->_req_nonce );
2086
+		if ('DOING_AJAX') {
2087
+			$nonce = isset($this->_req_data[$this->_req_nonce]) ? sanitize_text_field($this->_req_data[$this->_req_nonce]) : '';
2088
+			$this->_verify_nonce($nonce, $this->_req_nonce);
2089 2089
 		}
2090 2090
 
2091
-		switch ( $step ) {
2091
+		switch ($step) {
2092 2092
 			case 'ticket' :
2093 2093
 				//process ticket selection
2094 2094
 				$success = EED_Ticket_Selector::instance()->process_ticket_selections();
2095
-				if ( $success ) {
2096
-					EE_Error::add_success( __('Tickets Selected. Now complete the registration.'), 'event_espresso');
2095
+				if ($success) {
2096
+					EE_Error::add_success(__('Tickets Selected. Now complete the registration.'), 'event_espresso');
2097 2097
 				} else {
2098 2098
 					$query_args['step_error'] = $this->_req_data['step_error'] = TRUE;
2099 2099
 				}
2100
-				if ( defined('DOING_AJAX') ) {
2100
+				if (defined('DOING_AJAX')) {
2101 2101
 					$this->new_registration(); //display next step
2102 2102
 				} else {
2103 2103
 					$query_args['action'] = 'new_registration';
2104 2104
 					$query_args['processing_registration'] = true;
2105 2105
 					$query_args['event_id'] = $this->_reg_event->ID();
2106
-					$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
2106
+					$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
2107 2107
 				}
2108 2108
 				break;
2109 2109
 			case 'questions' :
2110 2110
 				//process registration
2111 2111
 				$transaction = EED_Single_Page_Checkout::instance()->process_registration_from_admin();
2112
-				if ( ! $transaction instanceof EE_Transaction ) {
2112
+				if ( ! $transaction instanceof EE_Transaction) {
2113 2113
 					$query_args = array(
2114 2114
 						'action' => 'new_registration',
2115 2115
 						'processing_registration' => true,
2116 2116
 						'event_id' => $this->_reg_event->ID()
2117 2117
 					);
2118 2118
 
2119
-					if ( defined('DOING_AJAX' )) {
2119
+					if (defined('DOING_AJAX')) {
2120 2120
 						//display registration form again because there are errors (maybe validation?)
2121 2121
 						$this->new_registration();
2122 2122
 						return;
2123 2123
 					} else {
2124
-						$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
2124
+						$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
2125 2125
 						return;
2126 2126
 					}
2127 2127
 				}
2128 2128
 				/** @type EE_Transaction_Payments $transaction_payments */
2129
-				$transaction_payments = EE_Registry::instance()->load_class( 'Transaction_Payments' );
2129
+				$transaction_payments = EE_Registry::instance()->load_class('Transaction_Payments');
2130 2130
 				// maybe update status, and make sure to save transaction if not done already
2131
-				if ( ! $transaction_payments->update_transaction_status_based_on_total_paid( $transaction )) {
2131
+				if ( ! $transaction_payments->update_transaction_status_based_on_total_paid($transaction)) {
2132 2132
 					$transaction->save();
2133 2133
 				}
2134 2134
 				$query_args = array(
@@ -2136,8 +2136,8 @@  discard block
 block discarded – undo
2136 2136
 					'TXN_ID' => $transaction->ID(),
2137 2137
 					'page' => 'espresso_transactions'
2138 2138
 				);
2139
-				EE_Error::add_success( __('Registration Created.  Please review the transaction and add any payments as necessary', 'event_espresso') );
2140
-				$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
2139
+				EE_Error::add_success(__('Registration Created.  Please review the transaction and add any payments as necessary', 'event_espresso'));
2140
+				$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
2141 2141
 				break;
2142 2142
 			}
2143 2143
 
@@ -2157,7 +2157,7 @@  discard block
 block discarded – undo
2157 2157
 	*		@return void
2158 2158
 	*/
2159 2159
 	protected function _attendee_contact_list_table() {
2160
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
2160
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
2161 2161
 		$this->_search_btn_label = __('Contacts', 'event_espresso');
2162 2162
 		$this->display_admin_list_table_page_with_no_sidebar();
2163 2163
 	}
@@ -2172,13 +2172,13 @@  discard block
 block discarded – undo
2172 2172
 	*		@access public
2173 2173
 	*		@return array
2174 2174
 	*/
2175
-	public function get_attendees( $per_page, $count = FALSE, $trash = FALSE ) {
2175
+	public function get_attendees($per_page, $count = FALSE, $trash = FALSE) {
2176 2176
 
2177
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
2177
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
2178 2178
 		// start with an empty array
2179 2179
 		$attendees = array();
2180 2180
 
2181
-		require_once( REG_ADMIN . 'EE_Attendee_Contact_List_Table.class.php' );
2181
+		require_once(REG_ADMIN.'EE_Attendee_Contact_List_Table.class.php');
2182 2182
 		$ATT_MDL = EEM_Attendee::instance();
2183 2183
 
2184 2184
 		$this->_req_data['orderby'] = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : '';
@@ -2206,47 +2206,47 @@  discard block
 block discarded – undo
2206 2206
 				$orderby = 'ATT_lname';
2207 2207
 		}
2208 2208
 
2209
-		$sort = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'ASC';
2209
+		$sort = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'ASC';
2210 2210
 
2211
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
2212
-		$per_page = isset( $per_page ) && !empty( $per_page ) ? $per_page : 10;
2213
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
2211
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
2212
+		$per_page = isset($per_page) && ! empty($per_page) ? $per_page : 10;
2213
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
2214 2214
 
2215 2215
 		$_where = array();
2216 2216
 
2217
-		if ( isset( $this->_req_data['s'] ) ) {
2218
-			$sstr = '%' . $this->_req_data['s'] . '%';
2217
+		if (isset($this->_req_data['s'])) {
2218
+			$sstr = '%'.$this->_req_data['s'].'%';
2219 2219
 			$_where['OR'] = array(
2220
-				'Registration.Event.EVT_name' => array( 'LIKE', $sstr),
2221
-				'Registration.Event.EVT_desc' => array( 'LIKE', $sstr ),
2222
-				'Registration.Event.EVT_short_desc' => array( 'LIKE' , $sstr ),
2223
-				'ATT_fname' => array( 'LIKE', $sstr ),
2224
-				'ATT_lname' => array( 'LIKE', $sstr ),
2225
-				'ATT_short_bio' => array( 'LIKE', $sstr ),
2226
-				'ATT_email' => array('LIKE', $sstr ),
2227
-				'ATT_address' => array( 'LIKE', $sstr ),
2228
-				'ATT_address2' => array( 'LIKE', $sstr ),
2229
-				'ATT_city' => array( 'LIKE', $sstr ),
2230
-				'Country.CNT_name' => array( 'LIKE', $sstr ),
2231
-				'State.STA_name' => array('LIKE', $sstr ),
2232
-				'ATT_phone' => array( 'LIKE', $sstr ),
2233
-				'Registration.REG_final_price' => array( 'LIKE', $sstr ),
2234
-				'Registration.REG_code' => array( 'LIKE', $sstr ),
2235
-				'Registration.REG_count' => array( 'LIKE' , $sstr ),
2236
-				'Registration.REG_group_size' => array( 'LIKE' , $sstr )
2220
+				'Registration.Event.EVT_name' => array('LIKE', $sstr),
2221
+				'Registration.Event.EVT_desc' => array('LIKE', $sstr),
2222
+				'Registration.Event.EVT_short_desc' => array('LIKE', $sstr),
2223
+				'ATT_fname' => array('LIKE', $sstr),
2224
+				'ATT_lname' => array('LIKE', $sstr),
2225
+				'ATT_short_bio' => array('LIKE', $sstr),
2226
+				'ATT_email' => array('LIKE', $sstr),
2227
+				'ATT_address' => array('LIKE', $sstr),
2228
+				'ATT_address2' => array('LIKE', $sstr),
2229
+				'ATT_city' => array('LIKE', $sstr),
2230
+				'Country.CNT_name' => array('LIKE', $sstr),
2231
+				'State.STA_name' => array('LIKE', $sstr),
2232
+				'ATT_phone' => array('LIKE', $sstr),
2233
+				'Registration.REG_final_price' => array('LIKE', $sstr),
2234
+				'Registration.REG_code' => array('LIKE', $sstr),
2235
+				'Registration.REG_count' => array('LIKE', $sstr),
2236
+				'Registration.REG_group_size' => array('LIKE', $sstr)
2237 2237
 				);
2238 2238
 		}
2239 2239
 
2240 2240
 
2241
-		$offset = ($current_page-1)*$per_page;
2242
-		$limit = $count ? NULL : array( $offset, $per_page );
2241
+		$offset = ($current_page - 1) * $per_page;
2242
+		$limit = $count ? NULL : array($offset, $per_page);
2243 2243
 
2244
-		if ( $trash ) {
2245
-			$_where['status'] = array( '!=', 'publish' );
2246
-			$all_attendees = $count ? $ATT_MDL->count( array($_where,'order_by'=>array($orderby=>$sort), 'limit'=>$limit)): $ATT_MDL->get_all( array($_where,'order_by'=>array($orderby=>$sort), 'limit'=>$limit));
2244
+		if ($trash) {
2245
+			$_where['status'] = array('!=', 'publish');
2246
+			$all_attendees = $count ? $ATT_MDL->count(array($_where, 'order_by'=>array($orderby=>$sort), 'limit'=>$limit)) : $ATT_MDL->get_all(array($_where, 'order_by'=>array($orderby=>$sort), 'limit'=>$limit));
2247 2247
 		} else {
2248
-			$_where['status'] = array( 'IN', array( 'publish' ) );
2249
-			$all_attendees = $count ? $ATT_MDL->count( array($_where, 'order_by'=>array($orderby=>$sort),'limit'=>$limit)) : $ATT_MDL->get_all( array($_where, 'order_by'=>array($orderby=>$sort), 'limit'=>$limit) );
2248
+			$_where['status'] = array('IN', array('publish'));
2249
+			$all_attendees = $count ? $ATT_MDL->count(array($_where, 'order_by'=>array($orderby=>$sort), 'limit'=>$limit)) : $ATT_MDL->get_all(array($_where, 'order_by'=>array($orderby=>$sort), 'limit'=>$limit));
2250 2250
 		}
2251 2251
 
2252 2252
 		return $all_attendees;
@@ -2263,10 +2263,10 @@  discard block
 block discarded – undo
2263 2263
 	 */
2264 2264
 	protected function _resend_registration() {
2265 2265
 		$success = $this->_process_resend_registration();
2266
-		$query_args = isset($this->_req_data['redirect_to'] ) ? array('action' => $this->_req_data['redirect_to'], '_REG_ID' => $this->_req_data['_REG_ID'] ) : array(
2266
+		$query_args = isset($this->_req_data['redirect_to']) ? array('action' => $this->_req_data['redirect_to'], '_REG_ID' => $this->_req_data['_REG_ID']) : array(
2267 2267
 			'action' => 'default'
2268 2268
 		);
2269
-		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE );
2269
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
2270 2270
 	}
2271 2271
 
2272 2272
 
@@ -2274,17 +2274,17 @@  discard block
 block discarded – undo
2274 2274
 
2275 2275
 
2276 2276
 
2277
-	public function _registrations_report(){
2278
-		EE_Registry::instance()->load_helper( 'File' );
2277
+	public function _registrations_report() {
2278
+		EE_Registry::instance()->load_helper('File');
2279 2279
 		$new_request_args = array(
2280 2280
 			'export' => 'report',
2281 2281
 			'action' => 'registrations_report_for_event',
2282
-			'EVT_ID' => isset( $this->_req_data[ 'EVT_ID'] ) ? $this->_req_data[ 'EVT_ID' ] : NULL,
2282
+			'EVT_ID' => isset($this->_req_data['EVT_ID']) ? $this->_req_data['EVT_ID'] : NULL,
2283 2283
 		);
2284 2284
 		$this->_req_data = array_merge($this->_req_data, $new_request_args);
2285 2285
 
2286
-		if ( is_readable(EE_CLASSES . 'EE_Export.class.php')) {
2287
-			require_once(EE_CLASSES . 'EE_Export.class.php');
2286
+		if (is_readable(EE_CLASSES.'EE_Export.class.php')) {
2287
+			require_once(EE_CLASSES.'EE_Export.class.php');
2288 2288
 			$EE_Export = EE_Export::instance($this->_req_data);
2289 2289
 			$EE_Export->export();
2290 2290
 		}
@@ -2292,19 +2292,19 @@  discard block
 block discarded – undo
2292 2292
 
2293 2293
 
2294 2294
 
2295
-	public function _contact_list_export(){
2296
-		EE_Registry::instance()->load_helper( 'File' );
2297
-		if ( is_readable(EE_CLASSES . 'EE_Export.class.php')) {
2298
-			require_once(EE_CLASSES . 'EE_Export.class.php');
2295
+	public function _contact_list_export() {
2296
+		EE_Registry::instance()->load_helper('File');
2297
+		if (is_readable(EE_CLASSES.'EE_Export.class.php')) {
2298
+			require_once(EE_CLASSES.'EE_Export.class.php');
2299 2299
 			$EE_Export = EE_Export::instance($this->_req_data);
2300 2300
 			$EE_Export->export_attendees();
2301 2301
 		}
2302 2302
 	}
2303 2303
 
2304
-	public function _contact_list_report(){
2305
-		EE_Registry::instance()->load_helper( 'File' );
2306
-		if ( is_readable(EE_CLASSES . 'EE_Export.class.php')) {
2307
-			require_once(EE_CLASSES . 'EE_Export.class.php');
2304
+	public function _contact_list_report() {
2305
+		EE_Registry::instance()->load_helper('File');
2306
+		if (is_readable(EE_CLASSES.'EE_Export.class.php')) {
2307
+			require_once(EE_CLASSES.'EE_Export.class.php');
2308 2308
 			$EE_Export = EE_Export::instance($this->_req_data);
2309 2309
 			$EE_Export->report_attendees();
2310 2310
 		}
@@ -2323,73 +2323,73 @@  discard block
 block discarded – undo
2323 2323
 	 * @return void
2324 2324
 	 */
2325 2325
 	protected function _duplicate_attendee() {
2326
-		$action = !empty( $this->_req_data['return'] ) ? $this->_req_data['return'] : 'default';
2326
+		$action = ! empty($this->_req_data['return']) ? $this->_req_data['return'] : 'default';
2327 2327
 		//verify we have necessary info
2328
-		if ( empty($this->_req_data['_REG_ID'] )  ) {
2329
-			EE_Error::add_error( __('Unable to create the contact for the registration because the required paramaters are not present (_REG_ID )', 'event_espresso'),  __FILE__, __LINE__, __FUNCTION__ );
2330
-			$query_args = array( 'action' => $action );
2328
+		if (empty($this->_req_data['_REG_ID'])) {
2329
+			EE_Error::add_error(__('Unable to create the contact for the registration because the required paramaters are not present (_REG_ID )', 'event_espresso'), __FILE__, __LINE__, __FUNCTION__);
2330
+			$query_args = array('action' => $action);
2331 2331
 			$this->_redirect_after_action('', '', '', $query_args, TRUE);
2332 2332
 		}
2333 2333
 
2334 2334
 		//okay necessary deets present... let's dupe the incoming attendee and attach to incoming registration.
2335
-		$registration = EEM_Registration::instance()->get_one_by_ID( $this->_req_data['_REG_ID'] );
2335
+		$registration = EEM_Registration::instance()->get_one_by_ID($this->_req_data['_REG_ID']);
2336 2336
 		$attendee = $registration->attendee();
2337 2337
 
2338 2338
 		//remove relation of existing attendee on registration
2339
-		$registration->_remove_relation_to($attendee, 'Attendee' );
2339
+		$registration->_remove_relation_to($attendee, 'Attendee');
2340 2340
 		//new attendee
2341 2341
 		$new_attendee = clone $attendee;
2342
-		$new_attendee->set( 'ATT_ID', 0 );
2342
+		$new_attendee->set('ATT_ID', 0);
2343 2343
 		$new_attendee->save();
2344 2344
 
2345 2345
 		//add new attendee to reg
2346
-		$registration->_add_relation_to( $new_attendee, 'Attendee');
2346
+		$registration->_add_relation_to($new_attendee, 'Attendee');
2347 2347
 
2348
-		EE_Error::add_success( __('New Contact record created.  Now make any edits you wish to make for this contact.', 'event_espresso') );
2348
+		EE_Error::add_success(__('New Contact record created.  Now make any edits you wish to make for this contact.', 'event_espresso'));
2349 2349
 
2350 2350
 		//redirect to edit page for attendee
2351
-		$query_args = array( 'post' => $new_attendee->ID(), 'action' => 'edit_attendee' );
2351
+		$query_args = array('post' => $new_attendee->ID(), 'action' => 'edit_attendee');
2352 2352
 
2353
-		$this->_redirect_after_action( '', '', '', $query_args, TRUE );
2353
+		$this->_redirect_after_action('', '', '', $query_args, TRUE);
2354 2354
 	}
2355 2355
 
2356 2356
 
2357 2357
 	//related to cpt routes
2358 2358
 	protected function _insert_update_cpt_item($post_id, $post) {
2359 2359
 		$success = true;
2360
-		$attendee = EEM_Attendee::instance()->get_one_by_ID( $post_id );
2360
+		$attendee = EEM_Attendee::instance()->get_one_by_ID($post_id);
2361 2361
 		//for attendee updates
2362
-		if ( $post->post_type = 'espresso_attendees' && !empty( $attendee ) ) {
2362
+		if ($post->post_type = 'espresso_attendees' && ! empty($attendee)) {
2363 2363
 			//note we should only be UPDATING attendees at this point.
2364 2364
 			$updated_fields = array(
2365 2365
 				'ATT_fname' => $this->_req_data['ATT_fname'],
2366 2366
 				'ATT_lname' => $this->_req_data['ATT_lname'],
2367
-				'ATT_full_name'=> $this->_req_data['ATT_fname'] . ' ' . $this->_req_data['ATT_lname'],
2367
+				'ATT_full_name'=> $this->_req_data['ATT_fname'].' '.$this->_req_data['ATT_lname'],
2368 2368
 				'ATT_address' => isset($this->_req_data['ATT_address']) ? $this->_req_data['ATT_address'] : '',
2369 2369
 				'ATT_address2' => isset($this->_req_data['ATT_address2']) ? $this->_req_data['ATT_address2'] : '',
2370
-				'ATT_city' => isset( $this->_req_data['ATT_city'] ) ? $this->_req_data['ATT_city'] : '',
2371
-				'STA_ID' => isset( $this->_req_data['STA_ID'] ) ? $this->_req_data['STA_ID'] : '',
2372
-				'CNT_ISO' => isset( $this->_req_data['CNT_ISO'] ) ? $this->_req_data['CNT_ISO'] : '',
2373
-				'ATT_zip' => isset( $this->_req_data['ATT_zip'] ) ? $this->_req_data['ATT_zip'] : '',
2374
-				'ATT_email' => isset( $this->_req_data['ATT_email'] ) ? $this->_req_data['ATT_email'] : '',
2375
-				'ATT_phone' => isset( $this->_req_data['ATT_phone'] ) ? $this->_req_data['ATT_phone'] : ''
2370
+				'ATT_city' => isset($this->_req_data['ATT_city']) ? $this->_req_data['ATT_city'] : '',
2371
+				'STA_ID' => isset($this->_req_data['STA_ID']) ? $this->_req_data['STA_ID'] : '',
2372
+				'CNT_ISO' => isset($this->_req_data['CNT_ISO']) ? $this->_req_data['CNT_ISO'] : '',
2373
+				'ATT_zip' => isset($this->_req_data['ATT_zip']) ? $this->_req_data['ATT_zip'] : '',
2374
+				'ATT_email' => isset($this->_req_data['ATT_email']) ? $this->_req_data['ATT_email'] : '',
2375
+				'ATT_phone' => isset($this->_req_data['ATT_phone']) ? $this->_req_data['ATT_phone'] : ''
2376 2376
 				);
2377
-			foreach ( $updated_fields as $field => $value ) {
2377
+			foreach ($updated_fields as $field => $value) {
2378 2378
 				$attendee->set($field, $value);
2379 2379
 			}
2380 2380
 
2381 2381
 			$success = $attendee->save();
2382 2382
 
2383
-			$attendee_update_callbacks = apply_filters( 'FHEE__Registrations_Admin_Page__insert_update_cpt_item__attendee_update', array() );
2384
-			foreach ( $attendee_update_callbacks as $a_callback ) {
2385
-				if ( FALSE === call_user_func_array( $a_callback, array($attendee, $this->_req_data ) ) ) {
2386
-					throw new EE_Error( sprintf( __('The %s callback given for the "FHEE__Registrations_Admin_Page__insert_update_cpt_item__attendee_update" filter is not a valid callback.  Please check the spelling.', 'event_espresso'), $a_callback ) );
2383
+			$attendee_update_callbacks = apply_filters('FHEE__Registrations_Admin_Page__insert_update_cpt_item__attendee_update', array());
2384
+			foreach ($attendee_update_callbacks as $a_callback) {
2385
+				if (FALSE === call_user_func_array($a_callback, array($attendee, $this->_req_data))) {
2386
+					throw new EE_Error(sprintf(__('The %s callback given for the "FHEE__Registrations_Admin_Page__insert_update_cpt_item__attendee_update" filter is not a valid callback.  Please check the spelling.', 'event_espresso'), $a_callback));
2387 2387
 				}
2388 2388
 			}
2389 2389
 		}
2390 2390
 
2391
-		if ( $success === FALSE )
2392
-			EE_Error::add_error(__('Something went wrong with updating the meta table data for the registration.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
2391
+		if ($success === FALSE)
2392
+			EE_Error::add_error(__('Something went wrong with updating the meta table data for the registration.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
2393 2393
 
2394 2394
 	}
2395 2395
 
@@ -2409,17 +2409,17 @@  discard block
 block discarded – undo
2409 2409
 		remove_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2410 2410
 		remove_meta_box('commentstatusdiv', $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2411 2411
 
2412
-		if ( post_type_supports( 'espresso_attendees', 'excerpt') ) {
2413
-			add_meta_box('postexcerpt', __('Short Biography', 'event_espresso'), 'post_excerpt_meta_box', $this->_cpt_routes[$this->_req_action], 'normal' );
2412
+		if (post_type_supports('espresso_attendees', 'excerpt')) {
2413
+			add_meta_box('postexcerpt', __('Short Biography', 'event_espresso'), 'post_excerpt_meta_box', $this->_cpt_routes[$this->_req_action], 'normal');
2414 2414
 		}
2415 2415
 
2416
-		if ( post_type_supports( 'espresso_attendees', 'comments') ) {
2416
+		if (post_type_supports('espresso_attendees', 'comments')) {
2417 2417
 			add_meta_box('commentsdiv', __('Notes on the Contact', 'event_espresso'), 'post_comment_meta_box', $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2418 2418
 		}
2419 2419
 
2420
-		add_meta_box('attendee_contact_info', __('Contact Info', 'event_espresso'), array( $this, 'attendee_contact_info'), $this->_cpt_routes[$this->_req_action], 'side', 'core' );
2421
-		add_meta_box('attendee_details_address', __('Address Details', 'event_espresso'), array($this, 'attendee_address_details'), $this->_cpt_routes[$this->_req_action], 'normal', 'core' );
2422
-		add_meta_box('attendee_registrations', __('Registrations for this Contact', 'event_espresso'), array( $this, 'attendee_registrations_meta_box'), $this->_cpt_routes[$this->_req_action], 'normal', 'high');
2420
+		add_meta_box('attendee_contact_info', __('Contact Info', 'event_espresso'), array($this, 'attendee_contact_info'), $this->_cpt_routes[$this->_req_action], 'side', 'core');
2421
+		add_meta_box('attendee_details_address', __('Address Details', 'event_espresso'), array($this, 'attendee_address_details'), $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2422
+		add_meta_box('attendee_registrations', __('Registrations for this Contact', 'event_espresso'), array($this, 'attendee_registrations_meta_box'), $this->_cpt_routes[$this->_req_action], 'normal', 'high');
2423 2423
 	}
2424 2424
 
2425 2425
 
@@ -2428,10 +2428,10 @@  discard block
 block discarded – undo
2428 2428
 	 * @param  WP_Post $post wp post object
2429 2429
 	 * @return string        attendee contact info ( and form )
2430 2430
 	 */
2431
-	public function attendee_contact_info( $post ) {
2431
+	public function attendee_contact_info($post) {
2432 2432
 		//get attendee object ( should already have it )
2433 2433
 		$this->_template_args['attendee'] = $this->_cpt_model_obj;
2434
-		$template = REG_TEMPLATE_PATH . 'attendee_contact_info_metabox_content.template.php';
2434
+		$template = REG_TEMPLATE_PATH.'attendee_contact_info_metabox_content.template.php';
2435 2435
 		EEH_Template::display_template($template, $this->_template_args);
2436 2436
 	}
2437 2437
 
@@ -2447,12 +2447,12 @@  discard block
 block discarded – undo
2447 2447
 		$this->_template_args['attendee'] = $this->_cpt_model_obj;
2448 2448
 		$this->_template_args['state_html'] = EEH_Form_Fields::generate_form_input(
2449 2449
 				new EE_Question_Form_Input(
2450
-				EE_Question::new_instance( array(
2450
+				EE_Question::new_instance(array(
2451 2451
 					'QST_ID' => 0,
2452 2452
 					'QST_display_text' => __('State/Province', 'event_espresso'),
2453 2453
 					'QST_system' => 'admin-state'
2454 2454
 					)),
2455
-				EE_Answer::new_instance( array(
2455
+				EE_Answer::new_instance(array(
2456 2456
 					'ANS_ID' => 0,
2457 2457
 					'ANS_value' => $this->_cpt_model_obj->state_ID()
2458 2458
 					)),
@@ -2465,12 +2465,12 @@  discard block
 block discarded – undo
2465 2465
 			));
2466 2466
 		$this->_template_args['country_html'] = EEH_Form_Fields::generate_form_input(
2467 2467
 				new EE_Question_Form_Input(
2468
-				EE_Question::new_instance( array(
2468
+				EE_Question::new_instance(array(
2469 2469
 					'QST_ID' => 0,
2470 2470
 					'QST_display_text' => __('Country', 'event_espresso'),
2471 2471
 					'QST_system' => 'admin-country'
2472 2472
 					)),
2473
-				EE_Answer::new_instance( array(
2473
+				EE_Answer::new_instance(array(
2474 2474
 					'ANS_ID' => 0,
2475 2475
 					'ANS_value' => $this->_cpt_model_obj->country_ID()
2476 2476
 					)),
@@ -2481,8 +2481,8 @@  discard block
 block discarded – undo
2481 2481
 					'append_qstn_id' => FALSE
2482 2482
 					)
2483 2483
 				));
2484
-		$template = REG_TEMPLATE_PATH . 'attendee_address_details_metabox_content.template.php';
2485
-		EEH_Template::display_template($template, $this->_template_args );
2484
+		$template = REG_TEMPLATE_PATH.'attendee_address_details_metabox_content.template.php';
2485
+		EEH_Template::display_template($template, $this->_template_args);
2486 2486
 
2487 2487
 	}
2488 2488
 
@@ -2492,11 +2492,11 @@  discard block
 block discarded – undo
2492 2492
 	*		@access protected
2493 2493
 	*		@return void
2494 2494
 	*/
2495
-	public function attendee_registrations_meta_box( $post ) {
2495
+	public function attendee_registrations_meta_box($post) {
2496 2496
 
2497 2497
 		$this->_template_args['attendee'] = $this->_cpt_model_obj;
2498 2498
 		$this->_template_args['registrations'] = $this->_cpt_model_obj->get_many_related('Registration');
2499
-		$template = REG_TEMPLATE_PATH . 'attendee_registrations_main_meta_box.template.php';
2499
+		$template = REG_TEMPLATE_PATH.'attendee_registrations_main_meta_box.template.php';
2500 2500
 		EEH_Template::display_template($template, $this->_template_args);
2501 2501
 
2502 2502
 	}
@@ -2510,8 +2510,8 @@  discard block
 block discarded – undo
2510 2510
 	 * @return string        html for new form.
2511 2511
 	 */
2512 2512
 	public function after_title_form_fields($post) {
2513
-		if ( $post->post_type == 'espresso_attendees' ) {
2514
-			$template = REG_TEMPLATE_PATH . 'attendee_details_after_title_form_fields.template.php';
2513
+		if ($post->post_type == 'espresso_attendees') {
2514
+			$template = REG_TEMPLATE_PATH.'attendee_details_after_title_form_fields.template.php';
2515 2515
 			$template_args['attendee'] = $this->_cpt_model_obj;
2516 2516
 			EEH_Template::display_template($template, $template_args);
2517 2517
 		}
@@ -2528,21 +2528,21 @@  discard block
 block discarded – undo
2528 2528
 	*		@access protected
2529 2529
 	*		@return void
2530 2530
 	*/
2531
-	protected function _trash_or_restore_attendees( $trash = TRUE ) {
2531
+	protected function _trash_or_restore_attendees($trash = TRUE) {
2532 2532
 
2533
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
2533
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
2534 2534
 
2535 2535
 		$ATT_MDL = EEM_Attendee::instance();
2536 2536
 
2537 2537
 		$success = 1;
2538 2538
 		//Checkboxes
2539
-		if (!empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
2539
+		if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
2540 2540
 			// if array has more than one element than success message should be plural
2541
-			$success = count( $this->_req_data['checkbox'] ) > 1 ? 2 : 1;
2541
+			$success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
2542 2542
 			// cycle thru checkboxes
2543
-			while (list( $ATT_ID, $value ) = each($this->_req_data['checkbox'])) {
2544
-				$updated = $trash ? $ATT_MDL->update_by_ID(array( 'status' => 'trash' ), $ATT_ID) : $ATT_MDL->update_by_ID( array('status' => 'publish' ), $ATT_ID);
2545
-				if ( !$updated ) {
2543
+			while (list($ATT_ID, $value) = each($this->_req_data['checkbox'])) {
2544
+				$updated = $trash ? $ATT_MDL->update_by_ID(array('status' => 'trash'), $ATT_ID) : $ATT_MDL->update_by_ID(array('status' => 'publish'), $ATT_ID);
2545
+				if ( ! $updated) {
2546 2546
 					$success = 0;
2547 2547
 				}
2548 2548
 			}
@@ -2551,18 +2551,18 @@  discard block
 block discarded – undo
2551 2551
 			// grab single id and delete
2552 2552
 			$ATT_ID = absint($this->_req_data['ATT_ID']);
2553 2553
 			//get attendee
2554
-			$att = $ATT_MDL->get_one_by_ID( $ATT_ID );
2554
+			$att = $ATT_MDL->get_one_by_ID($ATT_ID);
2555 2555
 			$updated = $trash ? $att->set_status('trash') : $att->set_status('publish');
2556 2556
 			$updated = $att->save();
2557
-			if ( ! $updated ) {
2557
+			if ( ! $updated) {
2558 2558
 				$success = 0;
2559 2559
 			}
2560 2560
 
2561 2561
 		}
2562 2562
 
2563
-		$what = $success > 1 ? __( 'Contacts', 'event_espresso' ) : __( 'Contact', 'event_espresso' );
2564
-		$action_desc = $trash ? __( 'moved to the trash', 'event_espresso' ) : __( 'restored', 'event_espresso' );
2565
-		$this->_redirect_after_action( $success, $what, $action_desc, array( 'action' => 'contact_list' ) );
2563
+		$what = $success > 1 ? __('Contacts', 'event_espresso') : __('Contact', 'event_espresso');
2564
+		$action_desc = $trash ? __('moved to the trash', 'event_espresso') : __('restored', 'event_espresso');
2565
+		$this->_redirect_after_action($success, $what, $action_desc, array('action' => 'contact_list'));
2566 2566
 
2567 2567
 	}
2568 2568
 
Please login to merge, or discard this patch.
admin_pages/registrations/help_tours/Contact_List_Help_Tour.class.php 2 patches
Spacing   +15 added lines, -15 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
 /**
@@ -153,57 +153,57 @@  discard block
 block discarded – undo
153 153
 
154 154
 
155 155
 	protected function _start() {
156
-		$content = '<h3>' . __('Contact List', 'event_espresso') . '</h3>';
157
-		$content .= '<p>' . __('This tour of the Contact List page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
156
+		$content = '<h3>'.__('Contact List', 'event_espresso').'</h3>';
157
+		$content .= '<p>'.__('This tour of the Contact List page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
158 158
 		return $content;
159 159
 	}
160 160
 
161 161
 	protected function _attendee_id_stop() {
162
-		return '<p>' . __('View ID for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
162
+		return '<p>'.__('View ID for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
163 163
 	}
164 164
 
165 165
 	protected function _attendee_name_stop() {
166
-		return '<p>' . __('View first name for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
166
+		return '<p>'.__('View first name for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
167 167
 	}
168 168
 
169 169
 	protected function _att_lname_stop() {
170
-		return '<p>' . __('View last name for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
170
+		return '<p>'.__('View last name for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
171 171
 	}
172 172
 
173 173
 	protected function _att_email_stop() {
174
-		return '<p>' . __('View email address for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
174
+		return '<p>'.__('View email address for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
175 175
 	}
176 176
 
177 177
 	protected function _att_phone_stop() {
178
-		return '<p>' . __('View phone number for registrants.', 'event_espresso') . '</p>';
178
+		return '<p>'.__('View phone number for registrants.', 'event_espresso').'</p>';
179 179
 	}
180 180
 
181 181
 	protected function _att_address_stop() {
182
-		return '<p>' . __('View address for registrants.', 'event_espresso') . '</p>';
182
+		return '<p>'.__('View address for registrants.', 'event_espresso').'</p>';
183 183
 	}
184 184
 
185 185
 	protected function _att_city_stop() {
186
-		return '<p>' . __('View city for registrants.', 'event_espresso') . '</p>';
186
+		return '<p>'.__('View city for registrants.', 'event_espresso').'</p>';
187 187
 	}
188 188
 
189 189
 	protected function _sta_id_stop() {
190
-		return '<p>' . __('View state/province for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
190
+		return '<p>'.__('View state/province for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
191 191
 	}
192 192
 
193 193
 	protected function _cnt_iso_stop() {
194
-		return '<p>' . __('View country for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
194
+		return '<p>'.__('View country for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
195 195
 	}
196 196
 
197 197
 	protected function _bulkactions_stop() {
198
-		return '<p>' . __('Perform a bulk action to multiple registrants.', 'event_espresso') . '</p>';
198
+		return '<p>'.__('Perform a bulk action to multiple registrants.', 'event_espresso').'</p>';
199 199
 	}
200 200
 
201 201
 	protected function _search_stop() {
202
-		return '<p>' . __('Search through contacts. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, and Registration Code.', 'event_espresso') . '</p>';
202
+		return '<p>'.__('Search through contacts. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, and Registration Code.', 'event_espresso').'</p>';
203 203
 	}
204 204
 
205 205
 	protected function _contact_list_csv_export_stop() {
206
-		return '<p>' . __('Export your contact list to a CSV file.', 'event_espresso') . '</p>';
206
+		return '<p>'.__('Export your contact list to a CSV file.', 'event_espresso').'</p>';
207 207
 	}
208 208
 
209 209
 }
210 210
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
admin_pages/registrations/help_tours/Event_Checkin_Help_Tour.class.php 2 patches
Spacing   +21 added lines, -21 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
 	protected function _set_tour_properties() {
33 33
 		$this->_label = __('Event Check-in Tour', 'event_espresso');
34
-		if ( isset( $this->_req_data['event_id'] ) )
34
+		if (isset($this->_req_data['event_id']))
35 35
 			$this->_slug = 'event-checkin-overview-joyride';
36 36
 		else
37 37
 			$this->_slug = 'all-event-checkin-overview-joyride';
@@ -183,73 +183,73 @@  discard block
 block discarded – undo
183 183
 
184 184
 
185 185
 	protected function _start() {
186
-		$content = '<h3>' . __('Event Check-in', 'event_espresso') . '</h3>';
187
-		if ( isset( $this->_req_data['event_id'] ) ) {
188
-			$content .= '<p>' . __('This tour of the Event Check-in page will go over different areas of the screen to help you understand what they are used for.<br /><br /> Note: You are currently viewing the check-in for a specific event so you can toggle the check-in status for attendees.', 'event_espresso') . '</p>';
186
+		$content = '<h3>'.__('Event Check-in', 'event_espresso').'</h3>';
187
+		if (isset($this->_req_data['event_id'])) {
188
+			$content .= '<p>'.__('This tour of the Event Check-in page will go over different areas of the screen to help you understand what they are used for.<br /><br /> Note: You are currently viewing the check-in for a specific event so you can toggle the check-in status for attendees.', 'event_espresso').'</p>';
189 189
 		} else {
190
-			$content .= '<p>' . __('This tour of the event check-in page will go over different areas of the screen to help you understand what they are used for. <br /><br /> Note: You must select an event from the dropdown menu before you can toggle the check-in status for an attendee.', 'event_espresso') . '</p>';
190
+			$content .= '<p>'.__('This tour of the event check-in page will go over different areas of the screen to help you understand what they are used for. <br /><br /> Note: You must select an event from the dropdown menu before you can toggle the check-in status for an attendee.', 'event_espresso').'</p>';
191 191
 		}
192 192
 		return $content;
193 193
 	}
194 194
 
195 195
 	protected function _reg_count_stop() {
196
-		return '<p>' . __('View registration number.', 'event_espresso') . '</p>';
196
+		return '<p>'.__('View registration number.', 'event_espresso').'</p>';
197 197
 	}
198 198
 
199 199
 	protected function _attendee_name_stop() {
200
-		return '<p>' . __('View name of registrant. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
200
+		return '<p>'.__('View name of registrant. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
201 201
 	}
202 202
 
203 203
 	protected function _attendee_email_stop() {
204
-		return '<p>' . __('View email address for a registrant.', 'event_espresso') . '</p>';
204
+		return '<p>'.__('View email address for a registrant.', 'event_espresso').'</p>';
205 205
 	}
206 206
 
207 207
 	protected function _reg_date_stop() {
208
-		return '<p>' . __('View registration date. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
208
+		return '<p>'.__('View registration date. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
209 209
 	}
210 210
 
211 211
 	protected function _reg_code_stop() {
212
-		return '<p>' . __('View registration code. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
212
+		return '<p>'.__('View registration code. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
213 213
 	}
214 214
 
215 215
 	protected function _reg_final_price_stop() {
216
-		return '<p>' . __('View price for ticket.', 'event_espresso') . '</p>';
216
+		return '<p>'.__('View price for ticket.', 'event_espresso').'</p>';
217 217
 	}
218 218
 
219 219
 	protected function _txn_paid_stop() {
220
-		return '<p>' . __('View if registrant has paid for ticket.', 'event_espresso') . '</p>';
220
+		return '<p>'.__('View if registrant has paid for ticket.', 'event_espresso').'</p>';
221 221
 	}
222 222
 
223 223
 	protected function _txn_total_stop() {
224
-		return '<p>' . __('View total amount paid.', 'event_espresso') . '</p>';
224
+		return '<p>'.__('View total amount paid.', 'event_espresso').'</p>';
225 225
 	}
226 226
 
227 227
 	protected function _prc_name_stop() {
228
-		return '<p>' . __('View type of ticket.', 'event_espresso') . '</p>';
228
+		return '<p>'.__('View type of ticket.', 'event_espresso').'</p>';
229 229
 	}
230 230
 
231 231
 	protected function _actions_stop() {
232
-		return '<p>' . __('Perform an action to a registration. See legend in bottom left corner.', 'event_espresso') . '</p>';
232
+		return '<p>'.__('Perform an action to a registration. See legend in bottom left corner.', 'event_espresso').'</p>';
233 233
 	}
234 234
 
235 235
 	protected function _legend_stop() {
236
-		return '<p>' . __('This is the legend that describes the different check-in statuses. Also shows available status for registrations.', 'event_espresso') . '</p>';
236
+		return '<p>'.__('This is the legend that describes the different check-in statuses. Also shows available status for registrations.', 'event_espresso').'</p>';
237 237
 	}
238 238
 	
239 239
 	protected function _bulkactions_stop() {
240
-		return '<p>' . __('Perform a bulk action to multiple registrations (only available when viewing check-in for a specific event).', 'event_espresso') . '</p>';
240
+		return '<p>'.__('Perform a bulk action to multiple registrations (only available when viewing check-in for a specific event).', 'event_espresso').'</p>';
241 241
 	}
242 242
 
243 243
 	protected function _event_selector_stop() {
244
-		return '<p>' . __('Select an event from this dropdown and click the filter button to see the check-in registration list for a specific event. You will then be able to toggle the check-in status for a registration.', 'event_espresso') . '</p>';
244
+		return '<p>'.__('Select an event from this dropdown and click the filter button to see the check-in registration list for a specific event. You will then be able to toggle the check-in status for a registration.', 'event_espresso').'</p>';
245 245
 	}
246 246
 
247 247
 	protected function _dtt_selector_stop() {
248
-		return '<p>' . __('This dropdown shows you the date and time that a displayed registration is attached to. You can switch to a different event by selecting another date and clicking on the filter button. You can also switch out of this view by clicking on the reset filters button.', 'event_espresso') . '</p>';
248
+		return '<p>'.__('This dropdown shows you the date and time that a displayed registration is attached to. You can switch to a different event by selecting another date and clicking on the filter button. You can also switch out of this view by clicking on the reset filters button.', 'event_espresso').'</p>';
249 249
 	}
250 250
 
251 251
 	protected function _search_stop() {
252
-		return '<p>' . __('Search through registrations. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, Registration Code, Registration Group Size, Ticket Name, and Ticket Description.', 'event_espresso') . '</p>';
252
+		return '<p>'.__('Search through registrations. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, Registration Code, Registration Group Size, Ticket Name, and Ticket Description.', 'event_espresso').'</p>';
253 253
 	}
254 254
 
255 255
 }
256 256
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +7 added lines, -5 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
@@ -31,10 +32,11 @@  discard block
 block discarded – undo
31 32
 
32 33
 	protected function _set_tour_properties() {
33 34
 		$this->_label = __('Event Check-in Tour', 'event_espresso');
34
-		if ( isset( $this->_req_data['event_id'] ) )
35
-			$this->_slug = 'event-checkin-overview-joyride';
36
-		else
37
-			$this->_slug = 'all-event-checkin-overview-joyride';
35
+		if ( isset( $this->_req_data['event_id'] ) ) {
36
+					$this->_slug = 'event-checkin-overview-joyride';
37
+		} else {
38
+					$this->_slug = 'all-event-checkin-overview-joyride';
39
+		}
38 40
 	}
39 41
 
40 42
 
Please login to merge, or discard this patch.
registrations/help_tours/Registration_Details_Help_Tour.class.php 2 patches
Spacing   +9 added lines, -9 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
 /**
@@ -99,32 +99,32 @@  discard block
 block discarded – undo
99 99
 
100 100
 
101 101
 	protected function _start() {
102
-		$content = '<h3>' . __('Registration Details', 'event_espresso') . '</h3>';
103
-		$content .= '<p>' . __('This tour of the Registration Details page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
102
+		$content = '<h3>'.__('Registration Details', 'event_espresso').'</h3>';
103
+		$content .= '<p>'.__('This tour of the Registration Details page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
104 104
 		return $content;
105 105
 	}
106 106
 
107 107
 	protected function _reg_date_title() {
108
-		return '<p>' . __('This is the date that the registration occurred on.') . '</p>';
108
+		return '<p>'.__('This is the date that the registration occurred on.').'</p>';
109 109
 	}
110 110
 	
111 111
 	protected function _reg_details_stop() {
112
-		return '<p>' . __('The buttons below allow you to perform an action with a registration. The options are Approved, Not Approved, Declined, and Cancelled.', 'event_espresso') . '</p>';
112
+		return '<p>'.__('The buttons below allow you to perform an action with a registration. The options are Approved, Not Approved, Declined, and Cancelled.', 'event_espresso').'</p>';
113 113
 	}
114 114
 
115 115
 	protected function _reg_details_table() {
116
-		return '<p>' . __('The registration items area displays various information including Line Item ID, Event Name, Event Date, Ticket Option, Price, Quantity, Line Total, Sales Tax, and the Grand Total.', 'event_espresso') . '</p>';
116
+		return '<p>'.__('The registration items area displays various information including Line Item ID, Event Name, Event Date, Ticket Option, Price, Quantity, Line Total, Sales Tax, and the Grand Total.', 'event_espresso').'</p>';
117 117
 	}
118 118
 
119 119
 	protected function _display_additional_info_stop() {
120
-		return '<p>' . __('You can view additional information about the registration by clicking on the link below. Examples of available information includes Registration ID, IP Address, and User Agent.', 'event_espresso') . '</p>';
120
+		return '<p>'.__('You can view additional information about the registration by clicking on the link below. Examples of available information includes Registration ID, IP Address, and User Agent.', 'event_espresso').'</p>';
121 121
 	}
122 122
 
123 123
 	protected function _edit_reg_question_stop() {
124
-		return '<p>' . __('View the answers to your custom questions below.', 'event_espresso') . '</p>';
124
+		return '<p>'.__('View the answers to your custom questions below.', 'event_espresso').'</p>';
125 125
 	}
126 126
 
127 127
 	protected function _attendee_details_stop() {
128
-		return '<p>' . __('View details on the registrant attached to this registration.', 'event_espresso') . '</p>';
128
+		return '<p>'.__('View details on the registrant attached to this registration.', 'event_espresso').'</p>';
129 129
 	}
130 130
 }
131 131
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
registrations/help_tours/Registration_Overview_Help_Tour.class.php 2 patches
Spacing   +20 added lines, -20 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
 	protected function _set_tour_properties() {
33 33
 		$this->_label = __('Registrations Overview Tour', 'event_espresso');
34
-		if ( isset( $this->_req_data['event_id'] ) )
34
+		if (isset($this->_req_data['event_id']))
35 35
 			$this->_slug = 'registration-per-event-overview-joyride';
36 36
 		else
37 37
 			$this->_slug = 'registration-overview-joyride';
@@ -174,69 +174,69 @@  discard block
 block discarded – undo
174 174
 
175 175
 
176 176
 	protected function _start() {
177
-		$content = '<h3>' . __('Registration Overview', 'event_espresso') . '</h3>';
178
-		if ( isset( $this->_req_data['event_id'] ) ) {
179
-			$content .= '<p>' . __('An introduction to the Registration Overview page for a single event. This view is pretty much the same as the default overview registration page except you are only seeing registrations for a specific event.  There are also some changes to the available columns in this view.', 'event_espresso') . '</p>';
177
+		$content = '<h3>'.__('Registration Overview', 'event_espresso').'</h3>';
178
+		if (isset($this->_req_data['event_id'])) {
179
+			$content .= '<p>'.__('An introduction to the Registration Overview page for a single event. This view is pretty much the same as the default overview registration page except you are only seeing registrations for a specific event.  There are also some changes to the available columns in this view.', 'event_espresso').'</p>';
180 180
 		} else {
181
-			$content .= '<p>' . __('This tour of the Registration Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
181
+			$content .= '<p>'.__('This tour of the Registration Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
182 182
 		}
183 183
 		return $content;
184 184
 	}
185 185
 
186 186
 	protected function _reg_id_stop() {
187
-		return '<p>' . __('View the registration ID. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
187
+		return '<p>'.__('View the registration ID. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
188 188
 	}
189 189
 
190 190
 	protected function _reg_count_stop() {
191
-		return '<p>' . __('View registration number.', 'event_espresso') . '</p>';
191
+		return '<p>'.__('View registration number.', 'event_espresso').'</p>';
192 192
 	}
193 193
 
194 194
 	protected function _attendee_name_stop() {
195
-		return '<p>' . __('View the name of the registrant. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
195
+		return '<p>'.__('View the name of the registrant. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
196 196
 	}
197 197
 
198 198
 	protected function _reg_date_stop() {
199
-		return '<p>' . __('View registration date. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
199
+		return '<p>'.__('View registration date. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
200 200
 	}
201 201
 
202 202
 	protected function _event_name_stop() {
203
-		return '<p>' . __('View the name of the event. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
203
+		return '<p>'.__('View the name of the event. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
204 204
 	}
205 205
 
206 206
 	protected function _dtt_evt_start_stop() {
207
-		return '<p>' . __('View the date of the event. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
207
+		return '<p>'.__('View the date of the event. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
208 208
 	}
209 209
 
210 210
 	protected function _reg_code_stop() {
211
-		return '<p>' . __('View registration code for a registrant.', 'event_espresso') . '</p>';
211
+		return '<p>'.__('View registration code for a registrant.', 'event_espresso').'</p>';
212 212
 	}
213 213
 
214 214
 	protected function _txn_total_stop() {
215
-		return '<p>' . __('View price of registration.', 'event_espresso') . '</p>';
215
+		return '<p>'.__('View price of registration.', 'event_espresso').'</p>';
216 216
 	}
217 217
 
218 218
 	protected function _actions_stop() {
219
-		return '<p>' . __('Perform an action to a registration. See legend in bottom left corner.', 'event_espresso') . '</p>';
219
+		return '<p>'.__('Perform an action to a registration. See legend in bottom left corner.', 'event_espresso').'</p>';
220 220
 	}
221 221
 
222 222
 	protected function _legend_stop() {
223
-		return '<p>' . __('This is the legend that describes the actions available in the actions column. Also shows available statuses for a registration.', 'event_espresso') . '</p>';
223
+		return '<p>'.__('This is the legend that describes the actions available in the actions column. Also shows available statuses for a registration.', 'event_espresso').'</p>';
224 224
 	}
225 225
 
226 226
 	protected function _views_stop() {
227
-		return '<p>' . __('You can select different views by time period or look at registrations which have been moved to the trash.') . '</p>';
227
+		return '<p>'.__('You can select different views by time period or look at registrations which have been moved to the trash.').'</p>';
228 228
 	}
229 229
 
230 230
 	protected function _bulkactions_stop() {
231
-		return '<p>' . __('Perform a bulk action to multiple registrations.', 'event_espresso') . '</p>';
231
+		return '<p>'.__('Perform a bulk action to multiple registrations.', 'event_espresso').'</p>';
232 232
 	}
233 233
 
234 234
 	protected function _stop_about_filters() {
235
-		return '<p>' . __('Registrations can be filtered by date, categories, or status.', 'event_espresso') . '</p>';
235
+		return '<p>'.__('Registrations can be filtered by date, categories, or status.', 'event_espresso').'</p>';
236 236
 	}
237 237
 	
238 238
 	protected function _search_stop() {
239
-		return '<p>' . __('Search through registrations. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, Registration Code, Registration Group Size, Ticket Name, and Ticket Description.', 'event_espresso') . '</p>';
239
+		return '<p>'.__('Search through registrations. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, Registration Code, Registration Group Size, Ticket Name, and Ticket Description.', 'event_espresso').'</p>';
240 240
 	}
241 241
 
242 242
 }
243 243
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +7 added lines, -5 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
@@ -31,10 +32,11 @@  discard block
 block discarded – undo
31 32
 
32 33
 	protected function _set_tour_properties() {
33 34
 		$this->_label = __('Registrations Overview Tour', 'event_espresso');
34
-		if ( isset( $this->_req_data['event_id'] ) )
35
-			$this->_slug = 'registration-per-event-overview-joyride';
36
-		else
37
-			$this->_slug = 'registration-overview-joyride';
35
+		if ( isset( $this->_req_data['event_id'] ) ) {
36
+					$this->_slug = 'registration-per-event-overview-joyride';
37
+		} else {
38
+					$this->_slug = 'registration-overview-joyride';
39
+		}
38 40
 	}
39 41
 
40 42
 
Please login to merge, or discard this patch.