Completed
Branch FET-8162-relation-exists (8f4753)
by
unknown
347:12 queued 335:12
created
help_tours/Registration_Form_Edit_Question_Group_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 Group', 'event_espresso') . '</h3>';
102
-		$content .= '<p>' . __('This tour of the Edit Question Group 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 Group', 'event_espresso').'</h3>';
102
+		$content .= '<p>'.__('This tour of the Edit Question Group 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 _qsg_name_stop() {
108
-		return '<p>' . __('The name of the question group.', 'event_espresso') . '</p>';
108
+		return '<p>'.__('The name of the question group.', 'event_espresso').'</p>';
109 109
 	}
110 110
 
111 111
 	protected function _qsg_identifier_stop() {
112
-		return '<p>' . __('A unique name for your question group.', 'event_espresso') . '</p>';
112
+		return '<p>'.__('A unique name for your question group.', 'event_espresso').'</p>';
113 113
 	}
114 114
 
115 115
 	protected function _qsg_desc_stop() {
116
-		return '<p>' . __('A description of the question group.', 'event_espresso') . '</p>';
116
+		return '<p>'.__('A description of the question group.', 'event_espresso').'</p>';
117 117
 	}
118 118
 
119 119
 	protected function _qsg_order_stop() {
120
-		return '<p>' . __('Set the order that you want your question group to appear in.', 'event_espresso') . '</p>';
120
+		return '<p>'.__('Set the order that you want your question group to appear in.', 'event_espresso').'</p>';
121 121
 	}
122 122
 
123 123
 	protected function _qsg_show_group_name_stop() {
124
-		return '<p>' . __('Specify whether the group name should be shown on the registration page.', 'event_espresso') . '</p>';
124
+		return '<p>'.__('Specify whether the group name should be shown on the registration page.', 'event_espresso').'</p>';
125 125
 	}
126 126
 
127 127
 	protected function _qsg_show_group_desc_stop() {
128
-		return '<p>' . __('Specify whether the group description should be shown on the registration page.', 'event_espresso') . '</p>';
128
+		return '<p>'.__('Specify whether the group description should be shown on the registration page.', '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_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.
help_tours/Registration_Form_Questions_Overview_Help_Tour.class.php 2 patches
Spacing   +10 added lines, -10 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
 /**
@@ -116,30 +116,30 @@  discard block
 block discarded – undo
116 116
 
117 117
 
118 118
 	protected function _start() {
119
-		$content = '<h3>' . __('Questions Overview', 'event_espresso') . '</h3>';
120
-		$content .= '<p>' . __('This tour of the Questions Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
119
+		$content = '<h3>'.__('Questions Overview', 'event_espresso').'</h3>';
120
+		$content .= '<p>'.__('This tour of the Questions Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
121 121
 
122 122
 		return $content;
123 123
 	}
124 124
 
125 125
 	protected function _display_text_stop() {
126
-		return '<p>' . __('View available questions. You can reorder your questions by dragging and dropping them.', 'event_espresso') . '</p>';
126
+		return '<p>'.__('View available questions. You can reorder your questions by dragging and dropping them.', 'event_espresso').'</p>';
127 127
 	}
128 128
 
129 129
 	protected function _admin_label_stop() {
130
-		return '<p>' . __('View the admin label for your questions.', 'event_espresso') . '</p>';
130
+		return '<p>'.__('View the admin label for your questions.', 'event_espresso').'</p>';
131 131
 	}
132 132
 
133 133
 	protected function _type_stop() {
134
-		return '<p>' . __('View the type of question. Available options are Text, Textarea, Checkboxes, Radio Buttons, Dropdown, State/Province Dropdown, Country Dropdown, and Date Picker.', 'event_espresso') . '</p>';
134
+		return '<p>'.__('View the type of question. Available options are Text, Textarea, Checkboxes, Radio Buttons, Dropdown, State/Province Dropdown, Country Dropdown, and Date Picker.', 'event_espresso').'</p>';
135 135
 	}
136 136
 
137 137
 	protected function _values_stop() {
138
-		return '<p>' . __('View stored values for checkboxes, radio buttons, and select boxes.', 'event_espresso') . '</p>';
138
+		return '<p>'.__('View stored values for checkboxes, radio buttons, and select boxes.', 'event_espresso').'</p>';
139 139
 	}
140 140
 
141 141
 	protected function _required_stop() {
142
-		return '<p>' . __('View if a question is required.', 'event_espresso') . '</p>';
142
+		return '<p>'.__('View if a question is required.', 'event_espresso').'</p>';
143 143
 	}
144 144
 
145 145
 	/* protected function _bulk_actions_stop() {
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
 	} */
148 148
 
149 149
 	protected function _search_stop() {
150
-		return '<p>' . __('Search through questions. The following sources will be searched: Name of Question (display text).', 'event_espresso') . '</p>';
150
+		return '<p>'.__('Search through questions. The following sources will be searched: Name of Question (display text).', 'event_espresso').'</p>';
151 151
 	}
152 152
 
153 153
 	protected function _add_new_question_stop() {
154
-		return '<p>' . __('Click here to add a new question.', 'event_espresso') . '</p>';
154
+		return '<p>'.__('Click here to add a new question.', 'event_espresso').'</p>';
155 155
 	}
156 156
 
157 157
 }
158 158
\ 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   +489 added lines, -489 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,41 +1232,41 @@  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
-		if ( ! isset( $this->_req_data['return'] ) || $this->_req_data['return'] != 'view_registration' ) {
1255
+		if ( ! isset($this->_req_data['return']) || $this->_req_data['return'] != 'view_registration') {
1256 1256
 			//unset nonces
1257
-			foreach ( $this->_req_data as $ref => $value ) {
1258
-				if ( strpos( $ref, 'nonce' ) !== false ) {
1259
-					unset( $this->_req_data[$ref] );
1257
+			foreach ($this->_req_data as $ref => $value) {
1258
+				if (strpos($ref, 'nonce') !== false) {
1259
+					unset($this->_req_data[$ref]);
1260 1260
 					continue;
1261 1261
 				}
1262
-				$this->_req_data[$ref] = urlencode( $value );
1262
+				$this->_req_data[$ref] = urlencode($value);
1263 1263
 			}
1264 1264
 
1265 1265
 			//merge request vars so that the reloaded list table contains any existin filter query params
1266
-			$route = array_merge( $this->_req_data, $route );
1266
+			$route = array_merge($this->_req_data, $route);
1267 1267
 		}
1268 1268
 
1269
-		$this->_redirect_after_action( FALSE, '', '', $route, TRUE );
1269
+		$this->_redirect_after_action(FALSE, '', '', $route, TRUE);
1270 1270
 	}
1271 1271
 
1272 1272
 
@@ -1278,30 +1278,30 @@  discard block
 block discarded – undo
1278 1278
 	protected function _change_reg_status() {
1279 1279
 		$success = FALSE;
1280 1280
 		$this->_req_data['return'] = 'view_registration';
1281
-		if ( !isset( $this->_req_data['_reg_status_id'] ) ) {
1281
+		if ( ! isset($this->_req_data['_reg_status_id'])) {
1282 1282
 			$result['success'] = FALSE;
1283
-			$this->_reg_status_change_return( '', $result );
1283
+			$this->_reg_status_change_return('', $result);
1284 1284
 		}
1285 1285
 
1286
-		switch ( $this->_req_data['_reg_status_id'] ) {
1287
-			case EEH_Template::pretty_status( EEM_Registration::status_id_approved, FALSE, 'sentence' ) :
1286
+		switch ($this->_req_data['_reg_status_id']) {
1287
+			case EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence') :
1288 1288
 				$this->approve_registration();
1289 1289
 				break;
1290
-			case EEH_Template::pretty_status( EEM_Registration::status_id_pending_payment, FALSE, 'sentence' ) :
1290
+			case EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, FALSE, 'sentence') :
1291 1291
 				$this->pending_registration();
1292 1292
 				break;
1293
-			case EEH_Template::pretty_status( EEM_Registration::status_id_not_approved, FALSE, 'sentence' ) :
1293
+			case EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, FALSE, 'sentence') :
1294 1294
 				$this->not_approve_registration();
1295 1295
 				break;
1296
-			case EEH_Template::pretty_status( EEM_Registration::status_id_declined, FALSE, 'sentence' ) :
1296
+			case EEH_Template::pretty_status(EEM_Registration::status_id_declined, FALSE, 'sentence') :
1297 1297
 				$this->decline_registration();
1298 1298
 				break;
1299
-			case EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, FALSE, 'sentence' ) :
1299
+			case EEH_Template::pretty_status(EEM_Registration::status_id_cancelled, FALSE, 'sentence') :
1300 1300
 				$this->cancel_registration();
1301 1301
 				break;
1302 1302
 			default :
1303 1303
 				$result['success'] = FALSE;
1304
-				$this->_reg_status_change_return( '', $result );
1304
+				$this->_reg_status_change_return('', $result);
1305 1305
 				break;
1306 1306
 		}
1307 1307
 	}
@@ -1314,9 +1314,9 @@  discard block
 block discarded – undo
1314 1314
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1315 1315
 	*		@return void
1316 1316
 	*/
1317
-	protected function approve_registration( $notify = FALSE ) {
1318
-		$result = $this->_set_registration_status( FALSE, EEM_Registration::status_id_approved, $notify );
1319
-		$this->_reg_status_change_return( EEM_Registration::status_id_approved, $result );
1317
+	protected function approve_registration($notify = FALSE) {
1318
+		$result = $this->_set_registration_status(FALSE, EEM_Registration::status_id_approved, $notify);
1319
+		$this->_reg_status_change_return(EEM_Registration::status_id_approved, $result);
1320 1320
 	}
1321 1321
 
1322 1322
 
@@ -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 decline_registration( $notify = FALSE ) {
1331
-		$result = $this->_set_registration_status( FALSE, EEM_Registration::status_id_declined, $notify );
1332
-		$this->_reg_status_change_return( EEM_Registration::status_id_declined, $result );
1330
+	protected function decline_registration($notify = FALSE) {
1331
+		$result = $this->_set_registration_status(FALSE, EEM_Registration::status_id_declined, $notify);
1332
+		$this->_reg_status_change_return(EEM_Registration::status_id_declined, $result);
1333 1333
 	}
1334 1334
 
1335 1335
 
@@ -1341,9 +1341,9 @@  discard block
 block discarded – undo
1341 1341
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1342 1342
 	*		@return void
1343 1343
 	*/
1344
-	protected function cancel_registration( $notify = FALSE ) {
1345
-		$result = $this->_set_registration_status( FALSE, EEM_Registration::status_id_cancelled, $notify );
1346
-		$this->_reg_status_change_return( EEM_Registration::status_id_cancelled, $result );
1344
+	protected function cancel_registration($notify = FALSE) {
1345
+		$result = $this->_set_registration_status(FALSE, EEM_Registration::status_id_cancelled, $notify);
1346
+		$this->_reg_status_change_return(EEM_Registration::status_id_cancelled, $result);
1347 1347
 	}
1348 1348
 
1349 1349
 
@@ -1356,9 +1356,9 @@  discard block
 block discarded – undo
1356 1356
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1357 1357
 	*		@return void
1358 1358
 	*/
1359
-	protected function not_approve_registration( $notify = FALSE ) {
1360
-		$result = $this->_set_registration_status( FALSE, EEM_Registration::status_id_not_approved, $notify );
1361
-		$this->_reg_status_change_return( EEM_Registration::status_id_not_approved, $result );
1359
+	protected function not_approve_registration($notify = FALSE) {
1360
+		$result = $this->_set_registration_status(FALSE, EEM_Registration::status_id_not_approved, $notify);
1361
+		$this->_reg_status_change_return(EEM_Registration::status_id_not_approved, $result);
1362 1362
 	}
1363 1363
 
1364 1364
 
@@ -1369,9 +1369,9 @@  discard block
 block discarded – undo
1369 1369
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1370 1370
 	*		@return void
1371 1371
 	*/
1372
-	protected function pending_registration( $notify = FALSE ) {
1373
-		$result = $this->_set_registration_status( FALSE, EEM_Registration::status_id_pending_payment, $notify );
1374
-		$this->_reg_status_change_return( EEM_Registration::status_id_pending_payment, $result );
1372
+	protected function pending_registration($notify = FALSE) {
1373
+		$result = $this->_set_registration_status(FALSE, EEM_Registration::status_id_pending_payment, $notify);
1374
+		$this->_reg_status_change_return(EEM_Registration::status_id_pending_payment, $result);
1375 1375
 	}
1376 1376
 
1377 1377
 
@@ -1387,70 +1387,70 @@  discard block
 block discarded – undo
1387 1387
 		$this->_session = $transaction->session_data();
1388 1388
 
1389 1389
 		$this->_template_args['REG_ID'] = $this->_registration->ID();
1390
-		$this->_template_args['line_items'] = $transaction->get_many_related('Line_Item', array( array('LIN_type' => 'line-item' ) ) );
1390
+		$this->_template_args['line_items'] = $transaction->get_many_related('Line_Item', array(array('LIN_type' => 'line-item')));
1391 1391
 
1392 1392
 
1393 1393
 		$attendee = $this->_registration->attendee();
1394 1394
 
1395 1395
 		// process taxes
1396
-		if ( $transaction ) {
1396
+		if ($transaction) {
1397 1397
 			//get all "tax" line items for this transaction and we'll use them for the tax display.
1398
-			$taxes = $transaction->get_many_related('Line_Item', array(array('LIN_type' => EEM_Line_Item::type_tax ) ) );
1399
-			$this->_template_args['taxes'] = !empty($taxes) ? $taxes : array();
1398
+			$taxes = $transaction->get_many_related('Line_Item', array(array('LIN_type' => EEM_Line_Item::type_tax)));
1399
+			$this->_template_args['taxes'] = ! empty($taxes) ? $taxes : array();
1400 1400
 		} else {
1401 1401
 			$this->_template_args['taxes'] = array();
1402 1402
 		}
1403 1403
 
1404
-		$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' ) : '';
1405
-		$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' ) : '';
1404
+		$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') : '';
1405
+		$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') : '';
1406 1406
 
1407
-		$this->_template_args['grand_total'] = EEH_Template::format_currency( $transaction->total() );
1407
+		$this->_template_args['grand_total'] = EEH_Template::format_currency($transaction->total());
1408 1408
 
1409 1409
 		$this->_template_args['currency_sign'] = EE_Registry::instance()->CFG->currency->sign;
1410
-		$payment = $transaction->get_first_related( 'Payment' );
1410
+		$payment = $transaction->get_first_related('Payment');
1411 1411
 		$payment = ! $payment instanceof EE_Payment ? EE_Payment::new_instance() : $payment;
1412
-		$payment_method = $payment->get_first_related( 'Payment_Method' );
1412
+		$payment_method = $payment->get_first_related('Payment_Method');
1413 1413
 		$payment_method = ! $payment_method instanceof EE_Payment_Method ? EE_Payment_Method::new_instance() : $payment_method;
1414
-		$reg_status_class = 'status-' . $this->_registration->status_ID();
1414
+		$reg_status_class = 'status-'.$this->_registration->status_ID();
1415 1415
 		$reg_details = array(
1416 1416
 			'payment_method' => $payment_method->name(),
1417 1417
 			'response_msg' => $payment->gateway_response(),
1418
-			'registration_id' => $this->_registration->get( 'REG_code' ),
1418
+			'registration_id' => $this->_registration->get('REG_code'),
1419 1419
 			'registration_session' => $this->_registration->session_ID(),
1420
-			'ip_address' => isset( $this->_session['ip_address'] ) ? $this->_session['ip_address'] : '',
1421
-			'user_agent' => isset( $this->_session['user_agent'] ) ? $this->_session['user_agent'] : '',
1420
+			'ip_address' => isset($this->_session['ip_address']) ? $this->_session['ip_address'] : '',
1421
+			'user_agent' => isset($this->_session['user_agent']) ? $this->_session['user_agent'] : '',
1422 1422
 			);
1423 1423
 
1424 1424
 
1425
-		if ( isset( $reg_details['registration_id'] )) {
1425
+		if (isset($reg_details['registration_id'])) {
1426 1426
 			$this->_template_args['reg_details']['registration_id']['value'] = $reg_details['registration_id'];
1427
-			$this->_template_args['reg_details']['registration_id']['label'] = __( 'Registration ID', 'event_espresso' );
1427
+			$this->_template_args['reg_details']['registration_id']['label'] = __('Registration ID', 'event_espresso');
1428 1428
 			$this->_template_args['reg_details']['registration_id']['class'] = 'regular-text';
1429 1429
 		}
1430 1430
 
1431
-		if ( isset( $reg_details['payment_method'] ) ) {
1431
+		if (isset($reg_details['payment_method'])) {
1432 1432
 			$this->_template_args['reg_details']['payment_method']['value'] = $reg_details['payment_method'];
1433
-			$this->_template_args['reg_details']['payment_method']['label'] = __( 'Most Recent Payment Method', 'event_espresso' );
1433
+			$this->_template_args['reg_details']['payment_method']['label'] = __('Most Recent Payment Method', 'event_espresso');
1434 1434
 			$this->_template_args['reg_details']['payment_method']['class'] = 'regular-text';
1435 1435
 			$this->_template_args['reg_details']['response_msg']['value'] = $reg_details['response_msg'];
1436
-			$this->_template_args['reg_details']['response_msg']['label'] = __( 'Payment method response', 'event_espresso' );
1436
+			$this->_template_args['reg_details']['response_msg']['label'] = __('Payment method response', 'event_espresso');
1437 1437
 			$this->_template_args['reg_details']['response_msg']['class'] = 'regular-text';
1438 1438
 		}
1439 1439
 
1440 1440
 		$this->_template_args['reg_details']['registration_session']['value'] = $reg_details['registration_session'];
1441
-		$this->_template_args['reg_details']['registration_session']['label'] = __( 'Registration Session', 'event_espresso' );
1441
+		$this->_template_args['reg_details']['registration_session']['label'] = __('Registration Session', 'event_espresso');
1442 1442
 		$this->_template_args['reg_details']['registration_session']['class'] = 'regular-text';
1443 1443
 
1444 1444
 		$this->_template_args['reg_details']['ip_address']['value'] = $reg_details['ip_address'];
1445
-		$this->_template_args['reg_details']['ip_address']['label'] = __( 'Registration placed from IP', 'event_espresso' );
1445
+		$this->_template_args['reg_details']['ip_address']['label'] = __('Registration placed from IP', 'event_espresso');
1446 1446
 		$this->_template_args['reg_details']['ip_address']['class'] = 'regular-text';
1447 1447
 
1448 1448
 		$this->_template_args['reg_details']['user_agent']['value'] = $reg_details['user_agent'];
1449
-		$this->_template_args['reg_details']['user_agent']['label'] = __( 'Registrant User Agent', 'event_espresso' );
1449
+		$this->_template_args['reg_details']['user_agent']['label'] = __('Registrant User Agent', 'event_espresso');
1450 1450
 		$this->_template_args['reg_details']['user_agent']['class'] = 'large-text';
1451 1451
 
1452
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_reg_details.template.php';
1453
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1452
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_details_main_meta_box_reg_details.template.php';
1453
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1454 1454
 
1455 1455
 	}
1456 1456
 
@@ -1466,23 +1466,23 @@  discard block
 block discarded – undo
1466 1466
 	*/
1467 1467
 	public function _reg_questions_meta_box() {
1468 1468
 
1469
-		add_filter( 'FHEE__EEH_Form_Fields__generate_question_groups_html__before_question_group_questions', array( $this, 'form_before_question_group' ), 10, 1 );
1470
-		add_filter( 'FHEE__EEH_Form_Fields__generate_question_groups_html__after_question_group_questions', array( $this, 'form_after_question_group' ), 10, 1 );
1471
-		add_filter( 'FHEE__EEH_Form_Fields__label_html', array( $this, 'form_form_field_label_wrap' ), 10, 1 );
1472
-		add_filter( 'FHEE__EEH_Form_Fields__input_html', array( $this, 'form_form_field_input__wrap' ), 10, 1 );
1469
+		add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__before_question_group_questions', array($this, 'form_before_question_group'), 10, 1);
1470
+		add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__after_question_group_questions', array($this, 'form_after_question_group'), 10, 1);
1471
+		add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'form_form_field_label_wrap'), 10, 1);
1472
+		add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'form_form_field_input__wrap'), 10, 1);
1473 1473
 
1474
-		$question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options( $this->_registration, $this->_registration->get('EVT_ID') );
1474
+		$question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options($this->_registration, $this->_registration->get('EVT_ID'));
1475 1475
 
1476 1476
 		//EEH_Debug_Tools::printr( $question_groups, '$question_groups  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
1477 1477
 
1478
-		EE_Registry::instance()->load_helper( 'Form_Fields' );
1479
-		$this->_template_args['att_questions'] = EEH_Form_Fields::generate_question_groups_html( $question_groups );
1478
+		EE_Registry::instance()->load_helper('Form_Fields');
1479
+		$this->_template_args['att_questions'] = EEH_Form_Fields::generate_question_groups_html($question_groups);
1480 1480
 
1481 1481
 		$this->_template_args['reg_questions_form_action'] = 'update_attendee_registration_form';
1482 1482
 		$this->_template_args['REG_ID'] = $this->_registration->ID();
1483 1483
 
1484
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_reg_questions.template.php';
1485
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1484
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_details_main_meta_box_reg_questions.template.php';
1485
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1486 1486
 
1487 1487
 	}
1488 1488
 
@@ -1497,7 +1497,7 @@  discard block
 block discarded – undo
1497 1497
 	 * 		@param 		string 		$output
1498 1498
 	 * 		@return 		string
1499 1499
 	 */
1500
-	public function form_before_question_group( $output ) {
1500
+	public function form_before_question_group($output) {
1501 1501
 		return '
1502 1502
 	<table class="form-table ee-width-100">
1503 1503
 		<tbody>
@@ -1514,13 +1514,13 @@  discard block
 block discarded – undo
1514 1514
 	 * 		@param 		string 		$output
1515 1515
 	 * 		@return 		string
1516 1516
 	 */
1517
-	public function form_after_question_group( $output ) {
1517
+	public function form_after_question_group($output) {
1518 1518
 		return  '
1519 1519
 			<tr class="hide-if-no-js">
1520 1520
 				<th> </th>
1521 1521
 				<td class="reg-admin-edit-attendee-question-td">
1522
-					<a class="reg-admin-edit-attendee-question-lnk" href="#" title="' . esc_attr__( 'click to edit question', 'event_espresso' ) . '">
1523
-						<span class="reg-admin-edit-question-group-spn lt-grey-txt">' . __( 'edit the above question group', 'event_espresso' ) . '</span>
1522
+					<a class="reg-admin-edit-attendee-question-lnk" href="#" title="' . esc_attr__('click to edit question', 'event_espresso').'">
1523
+						<span class="reg-admin-edit-question-group-spn lt-grey-txt">' . __('edit the above question group', 'event_espresso').'</span>
1524 1524
 						<div class="dashicons dashicons-edit"></div>
1525 1525
 					</a>
1526 1526
 				</td>
@@ -1540,11 +1540,11 @@  discard block
 block discarded – undo
1540 1540
 	 * 		@param 		string 		$label
1541 1541
 	 * 		@return 		string
1542 1542
 	 */
1543
-	public function form_form_field_label_wrap( $label ) {
1543
+	public function form_form_field_label_wrap($label) {
1544 1544
 		return '
1545 1545
 			<tr>
1546 1546
 				<th>
1547
-					' . $label  . '
1547
+					' . $label.'
1548 1548
 				</th>';
1549 1549
 	}
1550 1550
 
@@ -1558,10 +1558,10 @@  discard block
 block discarded – undo
1558 1558
 	 * 		@param 		string 		$label
1559 1559
 	 * 		@return 		string
1560 1560
 	 */
1561
-	public function form_form_field_input__wrap( $input ) {
1561
+	public function form_form_field_input__wrap($input) {
1562 1562
 		return '
1563 1563
 				<td class="reg-admin-attendee-questions-input-td disabled-input">
1564
-					' . $input . '
1564
+					' . $input.'
1565 1565
 				</td>
1566 1566
 			</tr>';
1567 1567
 	}
@@ -1575,13 +1575,13 @@  discard block
 block discarded – undo
1575 1575
 	*		@return void
1576 1576
 	*/
1577 1577
 	protected function _update_attendee_registration_form() {
1578
-		$qstns = isset( $this->_req_data['qstn'] ) ? $this->_req_data['qstn'] : FALSE;
1579
-		$REG_ID = isset( $this->_req_data['_REG_ID'] ) ? absint( $this->_req_data['_REG_ID'] ) : FALSE;
1580
-		$qstns = apply_filters( 'FHEE__Registrations_Admin_Page___update_attendee_registration_form__qstns', $qstns );
1581
-		$success = $this->_save_attendee_registration_form( $REG_ID, $qstns );
1578
+		$qstns = isset($this->_req_data['qstn']) ? $this->_req_data['qstn'] : FALSE;
1579
+		$REG_ID = isset($this->_req_data['_REG_ID']) ? absint($this->_req_data['_REG_ID']) : FALSE;
1580
+		$qstns = apply_filters('FHEE__Registrations_Admin_Page___update_attendee_registration_form__qstns', $qstns);
1581
+		$success = $this->_save_attendee_registration_form($REG_ID, $qstns);
1582 1582
 		$what = __('Registration Form', 'event_espresso');
1583
-		$route = $REG_ID ? array( 'action' => 'view_registration', '_REG_ID' => $REG_ID ) : array( 'action' => 'default' );
1584
-		$this->_redirect_after_action( $success, $what, __('updated', 'event_espresso'), $route );
1583
+		$route = $REG_ID ? array('action' => 'view_registration', '_REG_ID' => $REG_ID) : array('action' => 'default');
1584
+		$this->_redirect_after_action($success, $what, __('updated', 'event_espresso'), $route);
1585 1585
 
1586 1586
 	}
1587 1587
 
@@ -1594,26 +1594,26 @@  discard block
 block discarded – undo
1594 1594
 	 * @param bool $qstns
1595 1595
 	 * @return bool
1596 1596
 	 */
1597
-	private function _save_attendee_registration_form( $REG_ID = FALSE, $qstns = FALSE ) {
1597
+	private function _save_attendee_registration_form($REG_ID = FALSE, $qstns = FALSE) {
1598 1598
 
1599
-		if ( ! $REG_ID || ! $qstns ) {
1600
-			EE_Error::add_error( __('An error occurred. No registration ID and/or registration questions were received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
1599
+		if ( ! $REG_ID || ! $qstns) {
1600
+			EE_Error::add_error(__('An error occurred. No registration ID and/or registration questions were received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
1601 1601
 		}
1602 1602
 		$success = TRUE;
1603 1603
 
1604 1604
 		// allow others to get in on this awesome fun   :D
1605
-		do_action( 'AHEE__Registrations_Admin_Page___save_attendee_registration_form__after_reg_and_attendee_save', $REG_ID, $qstns );
1605
+		do_action('AHEE__Registrations_Admin_Page___save_attendee_registration_form__after_reg_and_attendee_save', $REG_ID, $qstns);
1606 1606
 		// loop thru questions... FINALLY!!!
1607 1607
 
1608
-		foreach ( $qstns as $QST_ID => $qstn ) {
1608
+		foreach ($qstns as $QST_ID => $qstn) {
1609 1609
 			//if $qstn isn't an array then it doesn't already have an answer, so let's create the answer
1610
-			if ( !is_array($qstn) ) {
1611
-				$success = $this->_save_new_answer( $REG_ID, $QST_ID, $qstn);
1610
+			if ( ! is_array($qstn)) {
1611
+				$success = $this->_save_new_answer($REG_ID, $QST_ID, $qstn);
1612 1612
 				continue;
1613 1613
 			}
1614 1614
 
1615 1615
 
1616
-			foreach ( $qstn as $ANS_ID => $ANS_value ) {
1616
+			foreach ($qstn as $ANS_ID => $ANS_value) {
1617 1617
 				//get answer
1618 1618
 				$query_params = array(
1619 1619
 					0 => array(
@@ -1624,8 +1624,8 @@  discard block
 block discarded – undo
1624 1624
 					);
1625 1625
 				$answer = EEM_Answer::instance()->get_one($query_params);
1626 1626
 				//this MAY be an array but NOT have an answer because its multi select.  If so then we need to create the answer
1627
-				if ( ! $answer instanceof EE_Answer ) {
1628
-					$success = $this->_save_new_answer( $REG_ID, $QST_ID, $qstn);
1627
+				if ( ! $answer instanceof EE_Answer) {
1628
+					$success = $this->_save_new_answer($REG_ID, $QST_ID, $qstn);
1629 1629
 					continue 2;
1630 1630
 				}
1631 1631
 
@@ -1639,7 +1639,7 @@  discard block
 block discarded – undo
1639 1639
 
1640 1640
 
1641 1641
 	//TODO: try changing this to use the model directly... not indirectly through creating a default object...
1642
-	private function _save_new_answer( $REG_ID, $QST_ID, $ans ) {
1642
+	private function _save_new_answer($REG_ID, $QST_ID, $ans) {
1643 1643
 		$set_values = array(
1644 1644
 			'QST_ID' => $QST_ID,
1645 1645
 			'REG_ID' => $REG_ID,
@@ -1666,30 +1666,30 @@  discard block
 block discarded – undo
1666 1666
 		$registrations = $REG->get_all(array(
1667 1667
 			array(
1668 1668
 				'TXN_ID'=>$this->_registration->transaction_ID(),
1669
-				'REG_ID'=>array('!=',$this->_registration->ID())
1669
+				'REG_ID'=>array('!=', $this->_registration->ID())
1670 1670
 			),
1671 1671
 			'force_join'=>array('Attendee')));
1672 1672
 
1673 1673
 		$this->_template_args['attendees'] = array();
1674 1674
 		$this->_template_args['attendee_notice'] = '';
1675 1675
 		EE_Registry::instance()->load_helper('Array');
1676
-		if ( empty( $registrations)  || ( is_array($registrations) &&  ! EEH_Array::get_one_item_from_array($registrations) ) ) {
1677
-			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__ );
1676
+		if (empty($registrations) || (is_array($registrations) && ! EEH_Array::get_one_item_from_array($registrations))) {
1677
+			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__);
1678 1678
 			$this->_template_args['attendee_notice'] = EE_Error::get_notices();
1679 1679
 		} else {
1680 1680
 
1681 1681
 			$att_nmbr = 1;
1682
-			foreach ( $registrations as $registration ) {
1682
+			foreach ($registrations as $registration) {
1683 1683
 				/* @var $registration EE_Registration */
1684 1684
 				$attendee = $registration->attendee() ? $registration->attendee() : EEM_Attendee::instance()->create_default_object();
1685
-				$this->_template_args['attendees'][ $att_nmbr ]['fname'] = $attendee->fname();//( isset( $registration->ATT_fname ) & ! empty( $registration->ATT_fname ) ) ? $registration->ATT_fname : '';
1686
-				$this->_template_args['attendees'][ $att_nmbr ]['lname'] = $attendee->lname();//( isset( $registration->ATT_lname ) & ! empty( $registration->ATT_lname ) ) ? $registration->ATT_lname : '';
1687
-				$this->_template_args['attendees'][ $att_nmbr ]['email'] = $attendee->email();//( isset( $registration->ATT_email ) & ! empty( $registration->ATT_email ) ) ? $registration->ATT_email : '';
1688
-				$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 : '';
1685
+				$this->_template_args['attendees'][$att_nmbr]['fname'] = $attendee->fname(); //( isset( $registration->ATT_fname ) & ! empty( $registration->ATT_fname ) ) ? $registration->ATT_fname : '';
1686
+				$this->_template_args['attendees'][$att_nmbr]['lname'] = $attendee->lname(); //( isset( $registration->ATT_lname ) & ! empty( $registration->ATT_lname ) ) ? $registration->ATT_lname : '';
1687
+				$this->_template_args['attendees'][$att_nmbr]['email'] = $attendee->email(); //( isset( $registration->ATT_email ) & ! empty( $registration->ATT_email ) ) ? $registration->ATT_email : '';
1688
+				$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 : '';
1689 1689
 
1690
-				$this->_template_args['attendees'][ $att_nmbr ]['address'] = implode( ', ', $attendee->full_address_as_array() );
1690
+				$this->_template_args['attendees'][$att_nmbr]['address'] = implode(', ', $attendee->full_address_as_array());
1691 1691
 
1692
-				$this->_template_args['attendees'][ $att_nmbr ]['att_link'] = self::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$attendee->ID() ), REG_ADMIN_URL );
1692
+				$this->_template_args['attendees'][$att_nmbr]['att_link'] = self::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$attendee->ID()), REG_ADMIN_URL);
1693 1693
 
1694 1694
 				$att_nmbr++;
1695 1695
 			}
@@ -1701,8 +1701,8 @@  discard block
 block discarded – undo
1701 1701
 
1702 1702
 	//			$this->_template_args['registration_form_url'] = add_query_arg( array( 'action' => 'edit_registration', 'process' => 'attendees'  ), REG_ADMIN_URL );
1703 1703
 		}
1704
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_attendees.template.php';
1705
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1704
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_details_main_meta_box_attendees.template.php';
1705
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1706 1706
 
1707 1707
 	}
1708 1708
 
@@ -1723,11 +1723,11 @@  discard block
 block discarded – undo
1723 1723
 		$attendee = $att_check instanceof EE_Attendee ? $att_check : EEM_Attendee::instance()->create_default_object();
1724 1724
 
1725 1725
 		//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)
1726
-		if ( ! $this->_registration->is_primary_registrant() ) {
1726
+		if ( ! $this->_registration->is_primary_registrant()) {
1727 1727
 			$primary_registration = $this->_registration->get_primary_registration();
1728 1728
 			$primary_attendee = $primary_registration->attendee();
1729 1729
 
1730
-			if ( ! $primary_attendee instanceof EE_Attendee || $attendee->ID() !== $primary_attendee->ID() ) {
1730
+			if ( ! $primary_attendee instanceof EE_Attendee || $attendee->ID() !== $primary_attendee->ID()) {
1731 1731
 				//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.
1732 1732
 				$primary_registration = NULL;
1733 1733
 			}
@@ -1736,28 +1736,28 @@  discard block
 block discarded – undo
1736 1736
 		}
1737 1737
 
1738 1738
 		$this->_template_args['ATT_ID'] = $attendee->ID();
1739
-		$this->_template_args['fname'] = $attendee->fname();//$this->_registration->ATT_fname;
1740
-		$this->_template_args['lname'] = $attendee->lname();//$this->_registration->ATT_lname;
1741
-		$this->_template_args['email'] = $attendee->email();//$this->_registration->ATT_email;
1739
+		$this->_template_args['fname'] = $attendee->fname(); //$this->_registration->ATT_fname;
1740
+		$this->_template_args['lname'] = $attendee->lname(); //$this->_registration->ATT_lname;
1741
+		$this->_template_args['email'] = $attendee->email(); //$this->_registration->ATT_email;
1742 1742
 		$this->_template_args['phone'] = $attendee->phone();
1743 1743
 
1744
-		EE_Registry::instance()->load_helper( 'Formatter' );
1745
-		$this->_template_args[ 'formatted_address' ] = EEH_Address::format( $attendee );
1744
+		EE_Registry::instance()->load_helper('Formatter');
1745
+		$this->_template_args['formatted_address'] = EEH_Address::format($attendee);
1746 1746
 
1747 1747
 
1748 1748
 		//edit link
1749
-		$this->_template_args['att_edit_link'] = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$attendee->ID() ), REG_ADMIN_URL );
1750
-		$this->_template_args['att_edit_label'] = __('View/Edit Contact' );
1749
+		$this->_template_args['att_edit_link'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$attendee->ID()), REG_ADMIN_URL);
1750
+		$this->_template_args['att_edit_label'] = __('View/Edit Contact');
1751 1751
 
1752 1752
 		//create link
1753
-		$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 ): '';
1753
+		$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) : '';
1754 1754
 		$this->_template_args['create_label'] = __('Create Contact', 'event_espresso');
1755 1755
 
1756 1756
 		$this->_template_args['att_check'] = $att_check;
1757 1757
 
1758 1758
 
1759
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_side_meta_box_registrant.template.php';
1760
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1759
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_details_side_meta_box_registrant.template.php';
1760
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1761 1761
 	}
1762 1762
 
1763 1763
 
@@ -1770,7 +1770,7 @@  discard block
 block discarded – undo
1770 1770
 	 * @access protected
1771 1771
 	 * @return void
1772 1772
 	 */
1773
-	protected function _trash_or_restore_registrations( $trash = TRUE ) {
1773
+	protected function _trash_or_restore_registrations($trash = TRUE) {
1774 1774
 		$REGM = EEM_Registration::instance();
1775 1775
 
1776 1776
 		$success = 1;
@@ -1780,26 +1780,26 @@  discard block
 block discarded – undo
1780 1780
 		$dtts = array();
1781 1781
 
1782 1782
 		//if empty _REG_ID then get out because there's nothing to do
1783
-		if ( empty( $this->_req_data['_REG_ID'] ) ) {
1783
+		if (empty($this->_req_data['_REG_ID'])) {
1784 1784
 			$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');
1785
-			EE_Error::add_error( $msg, __FILE__, __LINE__, __FUNCTION__ );
1786
-			$this->_redirect_after_action(FALSE, '', '', array(), TRUE );
1785
+			EE_Error::add_error($msg, __FILE__, __LINE__, __FUNCTION__);
1786
+			$this->_redirect_after_action(FALSE, '', '', array(), TRUE);
1787 1787
 		}
1788 1788
 
1789 1789
 		//Checkboxes
1790
-		if (!empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1790
+		if ( ! empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1791 1791
 			// if array has more than one element than success message should be plural
1792
-			$success = count( $this->_req_data['_REG_ID'] ) > 1 ? 2 : 1;
1792
+			$success = count($this->_req_data['_REG_ID']) > 1 ? 2 : 1;
1793 1793
 			// cycle thru checkboxes
1794
-			while (list( $ind, $REG_ID ) = each($this->_req_data['_REG_ID'])) {
1794
+			while (list($ind, $REG_ID) = each($this->_req_data['_REG_ID'])) {
1795 1795
 
1796 1796
 				$REG = $REGM->get_one_by_ID($REG_ID);
1797 1797
 				$payment_count = $REG->get_first_related('Transaction')->count_related('Payment');
1798
-				if ( $payment_count > 0 ) {
1798
+				if ($payment_count > 0) {
1799 1799
 					$name = $REG->attendee()->full_name();
1800 1800
 					$error = 1;
1801 1801
 					$success = 0;
1802
-					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__ );
1802
+					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__);
1803 1803
 					continue; //can't trash this registration because it has payments.
1804 1804
 				}
1805 1805
 				$ticket = $REG->get_first_related('Ticket');
@@ -1808,7 +1808,7 @@  discard block
 block discarded – undo
1808 1808
 				$dtts = array_merge($dtts, $dtt);
1809 1809
 
1810 1810
 				$updated = $trash ? $REG->delete() : $REG->restore();
1811
-				if ( !$updated ) {
1811
+				if ( ! $updated) {
1812 1812
 					$success = 0;
1813 1813
 				} else {
1814 1814
 					$success = 2;
@@ -1823,7 +1823,7 @@  discard block
 block discarded – undo
1823 1823
 			$tickets[$ticket->ID()] = $ticket;
1824 1824
 			$dtts = $ticket->get_many_related('Datetime');
1825 1825
 			$updated = $trash ? $REG->delete() : $REG->restore();
1826
-			if ( ! $updated ) {
1826
+			if ( ! $updated) {
1827 1827
 				$success = 0;
1828 1828
 			}
1829 1829
 
@@ -1833,10 +1833,10 @@  discard block
 block discarded – undo
1833 1833
 		EEM_Ticket::instance()->update_tickets_sold($tickets);
1834 1834
 		EEM_Datetime::instance()->update_sold($dtts);
1835 1835
 
1836
-		$what = $success > 1 ? __( 'Registrations', 'event_espresso' ) : __( 'Registration', 'event_espresso' );
1837
-		$action_desc = $trash ? __( 'moved to the trash', 'event_espresso' ) : __( 'restored', 'event_espresso' );
1836
+		$what = $success > 1 ? __('Registrations', 'event_espresso') : __('Registration', 'event_espresso');
1837
+		$action_desc = $trash ? __('moved to the trash', 'event_espresso') : __('restored', 'event_espresso');
1838 1838
 		$overwrite_msgs = $error ? TRUE : FALSE;
1839
-		$this->_redirect_after_action( $success, $what, $action_desc, array( 'action' => 'default' ), $overwrite_msgs );
1839
+		$this->_redirect_after_action($success, $what, $action_desc, array('action' => 'default'), $overwrite_msgs);
1840 1840
 	}
1841 1841
 
1842 1842
 
@@ -1860,16 +1860,16 @@  discard block
 block discarded – undo
1860 1860
 		$success = 1;
1861 1861
 
1862 1862
 		//Checkboxes
1863
-		if (!empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1863
+		if ( ! empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1864 1864
 			// if array has more than one element than success message should be plural
1865
-			$success = count( $this->_req_data['_REG_ID'] ) > 1 ? 2 : 1;
1865
+			$success = count($this->_req_data['_REG_ID']) > 1 ? 2 : 1;
1866 1866
 			// cycle thru checkboxes
1867
-			while (list( $ind, $REG_ID ) = each($this->_req_data['_REG_ID'])) {
1867
+			while (list($ind, $REG_ID) = each($this->_req_data['_REG_ID'])) {
1868 1868
 				$REG = $REG_MDL->get_one_by_ID($REG_ID);
1869
-				if ( ! $REG instanceof EE_Registration )
1869
+				if ( ! $REG instanceof EE_Registration)
1870 1870
 					continue;
1871 1871
 				$deleted = $this->_delete_registration($REG);
1872
-				if ( !$deleted ) {
1872
+				if ( ! $deleted) {
1873 1873
 					$success = 0;
1874 1874
 				}
1875 1875
 			}
@@ -1879,15 +1879,15 @@  discard block
 block discarded – undo
1879 1879
 			$REG_ID = $this->_req_data['_REG_ID'];
1880 1880
 			$REG = $REG_MDL->get_one_by_ID($REG_ID);
1881 1881
 			$deleted = $this->_delete_registration($REG);
1882
-			if ( ! $deleted ) {
1882
+			if ( ! $deleted) {
1883 1883
 				$success = 0;
1884 1884
 			}
1885 1885
 
1886 1886
 		}
1887 1887
 
1888
-		$what = $success > 1 ? __( 'Registrations', 'event_espresso' ) : __( 'Registration', 'event_espresso' );
1889
-		$action_desc = __( 'permanently deleted.', 'event_espresso' );
1890
-		$this->_redirect_after_action( $success, $what, $action_desc, array( 'action' => 'default' ), TRUE );
1888
+		$what = $success > 1 ? __('Registrations', 'event_espresso') : __('Registration', 'event_espresso');
1889
+		$action_desc = __('permanently deleted.', 'event_espresso');
1890
+		$this->_redirect_after_action($success, $what, $action_desc, array('action' => 'default'), TRUE);
1891 1891
 	}
1892 1892
 
1893 1893
 
@@ -1899,31 +1899,31 @@  discard block
 block discarded – undo
1899 1899
 	 * @param  EE_Registration $REG registration to be deleted permenantly
1900 1900
 	 * @return boolean              true = successful deletion, false = fail.
1901 1901
 	 */
1902
-	protected function _delete_registration( EE_Registration $REG ) {
1902
+	protected function _delete_registration(EE_Registration $REG) {
1903 1903
 		//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.
1904 1904
 		$TXN = $REG->get_first_related('Transaction');
1905 1905
 		$REGS = $TXN->get_many_related('Registration');
1906 1906
 
1907 1907
 		$all_trashed = TRUE;
1908
-		foreach ( $REGS as $registration ) {
1909
-			if ( ! $registration->get('REG_deleted') )
1908
+		foreach ($REGS as $registration) {
1909
+			if ( ! $registration->get('REG_deleted'))
1910 1910
 				$all_trashed = FALSE;
1911 1911
 		}
1912 1912
 
1913
-		if ( ! $all_trashed ) {
1914
-			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__ );
1913
+		if ( ! $all_trashed) {
1914
+			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__);
1915 1915
 			return false;
1916 1916
 		}
1917 1917
 
1918 1918
 		//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).
1919
-		foreach ( $REGS as $registration ) {
1919
+		foreach ($REGS as $registration) {
1920 1920
 
1921 1921
 			//delete related answers
1922 1922
 			$registration->delete_related_permanently('Answer');
1923 1923
 
1924 1924
 			//remove relationship to EE_Attendee (but we ALWAYS leave the contact record intact)
1925 1925
 			$attendee = $registration->get_first_related('Attendee');
1926
-			if ( $attendee instanceof EE_Attendee ) {
1926
+			if ($attendee instanceof EE_Attendee) {
1927 1927
 				$registration->_remove_relation_to($attendee, 'Attendee');
1928 1928
 			}
1929 1929
 
@@ -1933,7 +1933,7 @@  discard block
 block discarded – undo
1933 1933
 			//now delete permanently the checkins related to this registration.
1934 1934
 			$registration->delete_related_permanently('Checkin');
1935 1935
 
1936
-			if ( $registration->ID() === $REG->ID() )
1936
+			if ($registration->ID() === $REG->ID())
1937 1937
 				continue; //we don't want to delete permanently the existing registration just yet.
1938 1938
 
1939 1939
 			//remove relation to transaction for these registrations if NOT the existing registrations
@@ -1966,34 +1966,34 @@  discard block
 block discarded – undo
1966 1966
 	 * @return void
1967 1967
 	 */
1968 1968
 	public function new_registration() {
1969
-		if ( ! $this->_set_reg_event() ) {
1970
-			throw new EE_Error(__('Unable to continue with registering because there is no Event ID in the request', 'event_espresso') );
1969
+		if ( ! $this->_set_reg_event()) {
1970
+			throw new EE_Error(__('Unable to continue with registering because there is no Event ID in the request', 'event_espresso'));
1971 1971
 		}
1972
-		EE_Registry::instance()->REQ->set_espresso_page( TRUE );
1972
+		EE_Registry::instance()->REQ->set_espresso_page(TRUE);
1973 1973
 
1974 1974
 		// gotta start with a clean slate if we're not coming here via ajax
1975
-		if ( ! defined('DOING_AJAX' ) && ( ! isset( $this->_req_data['processing_registration'] ) || isset( $this->_req_data['step_error'] ))) {
1976
-			EE_Registry::instance()->SSN->clear_session( __CLASS__, __FUNCTION__ );
1975
+		if ( ! defined('DOING_AJAX') && ( ! isset($this->_req_data['processing_registration']) || isset($this->_req_data['step_error']))) {
1976
+			EE_Registry::instance()->SSN->clear_session(__CLASS__, __FUNCTION__);
1977 1977
 		}
1978 1978
 
1979
-		$this->_template_args['event_name'] = '' ;
1979
+		$this->_template_args['event_name'] = '';
1980 1980
 		// event name
1981
-		if ( $this->_reg_event ) {
1981
+		if ($this->_reg_event) {
1982 1982
 			$this->_template_args['event_name'] = $this->_reg_event->name();
1983
-			$edit_event_url = self::add_query_args_and_nonce( array( 'action'=>'edit', 'post'=>$this->_reg_event->ID() ), EVENTS_ADMIN_URL );
1984
-			$edit_event_lnk = '<a href="'.$edit_event_url.'" title="' . esc_attr__( 'Edit ', 'event_espresso' ) . $this->_reg_event->name() . '">' . __( 'Edit Event', 'event_espresso' ) . '</a>';
1985
-			$this->_template_args['event_name'] .= ' <span class="admin-page-header-edit-lnk not-bold">' . $edit_event_lnk . '</span>' ;
1983
+			$edit_event_url = self::add_query_args_and_nonce(array('action'=>'edit', 'post'=>$this->_reg_event->ID()), EVENTS_ADMIN_URL);
1984
+			$edit_event_lnk = '<a href="'.$edit_event_url.'" title="'.esc_attr__('Edit ', 'event_espresso').$this->_reg_event->name().'">'.__('Edit Event', 'event_espresso').'</a>';
1985
+			$this->_template_args['event_name'] .= ' <span class="admin-page-header-edit-lnk not-bold">'.$edit_event_lnk.'</span>';
1986 1986
 		}
1987 1987
 
1988 1988
 		$this->_template_args['step_content'] = $this->_get_registration_step_content();
1989 1989
 
1990
-		if ( defined('DOING_AJAX' ) )
1990
+		if (defined('DOING_AJAX'))
1991 1991
 			$this->_return_json();
1992 1992
 
1993 1993
 
1994 1994
 		// grab header
1995
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_register_new_attendee.template.php';
1996
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1995
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_register_new_attendee.template.php';
1996
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1997 1997
 
1998 1998
 		//$this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE );
1999 1999
 		// the details template wrapper
@@ -2011,7 +2011,7 @@  discard block
 block discarded – undo
2011 2011
 	 */
2012 2012
 	protected function _get_registration_step_content() {
2013 2013
 
2014
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_register_new_attendee_step_content.template.php';
2014
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_register_new_attendee_step_content.template.php';
2015 2015
 		$template_args = array(
2016 2016
 			'title' => '',
2017 2017
 			'content' => '',
@@ -2032,11 +2032,11 @@  discard block
 block discarded – undo
2032 2032
 
2033 2033
 		//if the cart is empty then we know we're at step one so we'll display ticket selector
2034 2034
 		$cart = EE_Registry::instance()->SSN->get_session_data('cart');
2035
-		$step = empty( $cart ) ? 'ticket' : 'questions';
2036
-		switch ( $step ) {
2035
+		$step = empty($cart) ? 'ticket' : 'questions';
2036
+		switch ($step) {
2037 2037
 			case 'ticket' :
2038 2038
 				$template_args['title'] = __('Step One: Select the Ticket for this registration', 'event_espresso');
2039
-				$template_args['content'] = EED_Ticket_Selector::instance()->display_ticket_selector( $this->_reg_event );
2039
+				$template_args['content'] = EED_Ticket_Selector::instance()->display_ticket_selector($this->_reg_event);
2040 2040
 				$template_args['step_button_text'] = __('Add Tickets and Continue to Registrant Details', 'event_espresso');
2041 2041
 				$template_args['show_notification_toggle'] = FALSE;
2042 2042
 				break;
@@ -2049,9 +2049,9 @@  discard block
 block discarded – undo
2049 2049
 				break;
2050 2050
 		}
2051 2051
 
2052
-		$this->_set_add_edit_form_tags( 'process_reg_step', $hidden_fields ); //we come back to the process_registration_step route.
2052
+		$this->_set_add_edit_form_tags('process_reg_step', $hidden_fields); //we come back to the process_registration_step route.
2053 2053
 
2054
-		return EEH_Template::display_template( $template_path, $template_args, TRUE );
2054
+		return EEH_Template::display_template($template_path, $template_args, TRUE);
2055 2055
 	}
2056 2056
 
2057 2057
 
@@ -2065,11 +2065,11 @@  discard block
 block discarded – undo
2065 2065
 	*		@return boolean
2066 2066
 	*/
2067 2067
 	private function _set_reg_event() {
2068
-		if ( is_object( $this->_reg_event )) {
2068
+		if (is_object($this->_reg_event)) {
2069 2069
 			return TRUE;
2070 2070
 		}
2071
-		$EVT_ID = ( ! empty( $this->_req_data['event_id'] )) ? absint( $this->_req_data['event_id'] ) : FALSE;
2072
-		if ( ! $EVT_ID ) {
2071
+		$EVT_ID = ( ! empty($this->_req_data['event_id'])) ? absint($this->_req_data['event_id']) : FALSE;
2072
+		if ( ! $EVT_ID) {
2073 2073
 			return FALSE;
2074 2074
 		}
2075 2075
 
@@ -2090,59 +2090,59 @@  discard block
 block discarded – undo
2090 2090
 	public function process_reg_step() {
2091 2091
 
2092 2092
 		$this->_set_reg_event();
2093
-		EE_Registry::instance()->REQ->set_espresso_page( TRUE );
2093
+		EE_Registry::instance()->REQ->set_espresso_page(TRUE);
2094 2094
 
2095 2095
 		//what step are we on?
2096
-		$cart = EE_Registry::instance()->SSN->get_session_data( 'cart' );
2097
-		$step = empty( $cart ) ? 'ticket' : 'questions';
2096
+		$cart = EE_Registry::instance()->SSN->get_session_data('cart');
2097
+		$step = empty($cart) ? 'ticket' : 'questions';
2098 2098
 
2099 2099
 		//if doing ajax then we need to verify the nonce
2100
-		if ( 'DOING_AJAX' ) {
2101
-			$nonce = isset( $this->_req_data[$this->_req_nonce] ) ? sanitize_text_field( $this->_req_data[$this->_req_nonce] ) : '';
2102
-			$this->_verify_nonce( $nonce, $this->_req_nonce );
2100
+		if ('DOING_AJAX') {
2101
+			$nonce = isset($this->_req_data[$this->_req_nonce]) ? sanitize_text_field($this->_req_data[$this->_req_nonce]) : '';
2102
+			$this->_verify_nonce($nonce, $this->_req_nonce);
2103 2103
 		}
2104 2104
 
2105
-		switch ( $step ) {
2105
+		switch ($step) {
2106 2106
 			case 'ticket' :
2107 2107
 				//process ticket selection
2108 2108
 				$success = EED_Ticket_Selector::instance()->process_ticket_selections();
2109
-				if ( $success ) {
2110
-					EE_Error::add_success( __('Tickets Selected. Now complete the registration.'), 'event_espresso');
2109
+				if ($success) {
2110
+					EE_Error::add_success(__('Tickets Selected. Now complete the registration.'), 'event_espresso');
2111 2111
 				} else {
2112 2112
 					$query_args['step_error'] = $this->_req_data['step_error'] = TRUE;
2113 2113
 				}
2114
-				if ( defined('DOING_AJAX') ) {
2114
+				if (defined('DOING_AJAX')) {
2115 2115
 					$this->new_registration(); //display next step
2116 2116
 				} else {
2117 2117
 					$query_args['action'] = 'new_registration';
2118 2118
 					$query_args['processing_registration'] = true;
2119 2119
 					$query_args['event_id'] = $this->_reg_event->ID();
2120
-					$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
2120
+					$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
2121 2121
 				}
2122 2122
 				break;
2123 2123
 			case 'questions' :
2124 2124
 				//process registration
2125 2125
 				$transaction = EED_Single_Page_Checkout::instance()->process_registration_from_admin();
2126
-				if ( ! $transaction instanceof EE_Transaction ) {
2126
+				if ( ! $transaction instanceof EE_Transaction) {
2127 2127
 					$query_args = array(
2128 2128
 						'action' => 'new_registration',
2129 2129
 						'processing_registration' => true,
2130 2130
 						'event_id' => $this->_reg_event->ID()
2131 2131
 					);
2132 2132
 
2133
-					if ( defined('DOING_AJAX' )) {
2133
+					if (defined('DOING_AJAX')) {
2134 2134
 						//display registration form again because there are errors (maybe validation?)
2135 2135
 						$this->new_registration();
2136 2136
 						return;
2137 2137
 					} else {
2138
-						$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
2138
+						$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
2139 2139
 						return;
2140 2140
 					}
2141 2141
 				}
2142 2142
 				/** @type EE_Transaction_Payments $transaction_payments */
2143
-				$transaction_payments = EE_Registry::instance()->load_class( 'Transaction_Payments' );
2143
+				$transaction_payments = EE_Registry::instance()->load_class('Transaction_Payments');
2144 2144
 				// maybe update status, and make sure to save transaction if not done already
2145
-				if ( ! $transaction_payments->update_transaction_status_based_on_total_paid( $transaction )) {
2145
+				if ( ! $transaction_payments->update_transaction_status_based_on_total_paid($transaction)) {
2146 2146
 					$transaction->save();
2147 2147
 				}
2148 2148
 				$query_args = array(
@@ -2150,8 +2150,8 @@  discard block
 block discarded – undo
2150 2150
 					'TXN_ID' => $transaction->ID(),
2151 2151
 					'page' => 'espresso_transactions'
2152 2152
 				);
2153
-				EE_Error::add_success( __('Registration Created.  Please review the transaction and add any payments as necessary', 'event_espresso') );
2154
-				$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
2153
+				EE_Error::add_success(__('Registration Created.  Please review the transaction and add any payments as necessary', 'event_espresso'));
2154
+				$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
2155 2155
 				break;
2156 2156
 			}
2157 2157
 
@@ -2171,7 +2171,7 @@  discard block
 block discarded – undo
2171 2171
 	*		@return void
2172 2172
 	*/
2173 2173
 	protected function _attendee_contact_list_table() {
2174
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
2174
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
2175 2175
 		$this->_search_btn_label = __('Contacts', 'event_espresso');
2176 2176
 		$this->display_admin_list_table_page_with_no_sidebar();
2177 2177
 	}
@@ -2186,13 +2186,13 @@  discard block
 block discarded – undo
2186 2186
 	*		@access public
2187 2187
 	*		@return array
2188 2188
 	*/
2189
-	public function get_attendees( $per_page, $count = FALSE, $trash = FALSE ) {
2189
+	public function get_attendees($per_page, $count = FALSE, $trash = FALSE) {
2190 2190
 
2191
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
2191
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
2192 2192
 		// start with an empty array
2193 2193
 		$attendees = array();
2194 2194
 
2195
-		require_once( REG_ADMIN . 'EE_Attendee_Contact_List_Table.class.php' );
2195
+		require_once(REG_ADMIN.'EE_Attendee_Contact_List_Table.class.php');
2196 2196
 		$ATT_MDL = EEM_Attendee::instance();
2197 2197
 
2198 2198
 		$this->_req_data['orderby'] = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : '';
@@ -2220,47 +2220,47 @@  discard block
 block discarded – undo
2220 2220
 				$orderby = 'ATT_lname';
2221 2221
 		}
2222 2222
 
2223
-		$sort = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'ASC';
2223
+		$sort = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'ASC';
2224 2224
 
2225
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
2226
-		$per_page = isset( $per_page ) && !empty( $per_page ) ? $per_page : 10;
2227
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
2225
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
2226
+		$per_page = isset($per_page) && ! empty($per_page) ? $per_page : 10;
2227
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
2228 2228
 
2229 2229
 		$_where = array();
2230 2230
 
2231
-		if ( isset( $this->_req_data['s'] ) ) {
2232
-			$sstr = '%' . $this->_req_data['s'] . '%';
2231
+		if (isset($this->_req_data['s'])) {
2232
+			$sstr = '%'.$this->_req_data['s'].'%';
2233 2233
 			$_where['OR'] = array(
2234
-				'Registration.Event.EVT_name' => array( 'LIKE', $sstr),
2235
-				'Registration.Event.EVT_desc' => array( 'LIKE', $sstr ),
2236
-				'Registration.Event.EVT_short_desc' => array( 'LIKE' , $sstr ),
2237
-				'ATT_fname' => array( 'LIKE', $sstr ),
2238
-				'ATT_lname' => array( 'LIKE', $sstr ),
2239
-				'ATT_short_bio' => array( 'LIKE', $sstr ),
2240
-				'ATT_email' => array('LIKE', $sstr ),
2241
-				'ATT_address' => array( 'LIKE', $sstr ),
2242
-				'ATT_address2' => array( 'LIKE', $sstr ),
2243
-				'ATT_city' => array( 'LIKE', $sstr ),
2244
-				'Country.CNT_name' => array( 'LIKE', $sstr ),
2245
-				'State.STA_name' => array('LIKE', $sstr ),
2246
-				'ATT_phone' => array( 'LIKE', $sstr ),
2247
-				'Registration.REG_final_price' => array( 'LIKE', $sstr ),
2248
-				'Registration.REG_code' => array( 'LIKE', $sstr ),
2249
-				'Registration.REG_count' => array( 'LIKE' , $sstr ),
2250
-				'Registration.REG_group_size' => array( 'LIKE' , $sstr )
2234
+				'Registration.Event.EVT_name' => array('LIKE', $sstr),
2235
+				'Registration.Event.EVT_desc' => array('LIKE', $sstr),
2236
+				'Registration.Event.EVT_short_desc' => array('LIKE', $sstr),
2237
+				'ATT_fname' => array('LIKE', $sstr),
2238
+				'ATT_lname' => array('LIKE', $sstr),
2239
+				'ATT_short_bio' => array('LIKE', $sstr),
2240
+				'ATT_email' => array('LIKE', $sstr),
2241
+				'ATT_address' => array('LIKE', $sstr),
2242
+				'ATT_address2' => array('LIKE', $sstr),
2243
+				'ATT_city' => array('LIKE', $sstr),
2244
+				'Country.CNT_name' => array('LIKE', $sstr),
2245
+				'State.STA_name' => array('LIKE', $sstr),
2246
+				'ATT_phone' => array('LIKE', $sstr),
2247
+				'Registration.REG_final_price' => array('LIKE', $sstr),
2248
+				'Registration.REG_code' => array('LIKE', $sstr),
2249
+				'Registration.REG_count' => array('LIKE', $sstr),
2250
+				'Registration.REG_group_size' => array('LIKE', $sstr)
2251 2251
 				);
2252 2252
 		}
2253 2253
 
2254 2254
 
2255
-		$offset = ($current_page-1)*$per_page;
2256
-		$limit = $count ? NULL : array( $offset, $per_page );
2255
+		$offset = ($current_page - 1) * $per_page;
2256
+		$limit = $count ? NULL : array($offset, $per_page);
2257 2257
 
2258
-		if ( $trash ) {
2259
-			$_where['status'] = array( '!=', 'publish' );
2260
-			$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));
2258
+		if ($trash) {
2259
+			$_where['status'] = array('!=', 'publish');
2260
+			$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));
2261 2261
 		} else {
2262
-			$_where['status'] = array( 'IN', array( 'publish' ) );
2263
-			$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) );
2262
+			$_where['status'] = array('IN', array('publish'));
2263
+			$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));
2264 2264
 		}
2265 2265
 
2266 2266
 		return $all_attendees;
@@ -2277,10 +2277,10 @@  discard block
 block discarded – undo
2277 2277
 	 */
2278 2278
 	protected function _resend_registration() {
2279 2279
 		$success = $this->_process_resend_registration();
2280
-		$query_args = isset($this->_req_data['redirect_to'] ) ? array('action' => $this->_req_data['redirect_to'], '_REG_ID' => $this->_req_data['_REG_ID'] ) : array(
2280
+		$query_args = isset($this->_req_data['redirect_to']) ? array('action' => $this->_req_data['redirect_to'], '_REG_ID' => $this->_req_data['_REG_ID']) : array(
2281 2281
 			'action' => 'default'
2282 2282
 		);
2283
-		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE );
2283
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
2284 2284
 	}
2285 2285
 
2286 2286
 
@@ -2288,17 +2288,17 @@  discard block
 block discarded – undo
2288 2288
 
2289 2289
 
2290 2290
 
2291
-	public function _registrations_report(){
2292
-		EE_Registry::instance()->load_helper( 'File' );
2291
+	public function _registrations_report() {
2292
+		EE_Registry::instance()->load_helper('File');
2293 2293
 		$new_request_args = array(
2294 2294
 			'export' => 'report',
2295 2295
 			'action' => 'registrations_report_for_event',
2296
-			'EVT_ID' => isset( $this->_req_data[ 'EVT_ID'] ) ? $this->_req_data[ 'EVT_ID' ] : NULL,
2296
+			'EVT_ID' => isset($this->_req_data['EVT_ID']) ? $this->_req_data['EVT_ID'] : NULL,
2297 2297
 		);
2298 2298
 		$this->_req_data = array_merge($this->_req_data, $new_request_args);
2299 2299
 
2300
-		if ( is_readable(EE_CLASSES . 'EE_Export.class.php')) {
2301
-			require_once(EE_CLASSES . 'EE_Export.class.php');
2300
+		if (is_readable(EE_CLASSES.'EE_Export.class.php')) {
2301
+			require_once(EE_CLASSES.'EE_Export.class.php');
2302 2302
 			$EE_Export = EE_Export::instance($this->_req_data);
2303 2303
 			$EE_Export->export();
2304 2304
 		}
@@ -2306,19 +2306,19 @@  discard block
 block discarded – undo
2306 2306
 
2307 2307
 
2308 2308
 
2309
-	public function _contact_list_export(){
2310
-		EE_Registry::instance()->load_helper( 'File' );
2311
-		if ( is_readable(EE_CLASSES . 'EE_Export.class.php')) {
2312
-			require_once(EE_CLASSES . 'EE_Export.class.php');
2309
+	public function _contact_list_export() {
2310
+		EE_Registry::instance()->load_helper('File');
2311
+		if (is_readable(EE_CLASSES.'EE_Export.class.php')) {
2312
+			require_once(EE_CLASSES.'EE_Export.class.php');
2313 2313
 			$EE_Export = EE_Export::instance($this->_req_data);
2314 2314
 			$EE_Export->export_attendees();
2315 2315
 		}
2316 2316
 	}
2317 2317
 
2318
-	public function _contact_list_report(){
2319
-		EE_Registry::instance()->load_helper( 'File' );
2320
-		if ( is_readable(EE_CLASSES . 'EE_Export.class.php')) {
2321
-			require_once(EE_CLASSES . 'EE_Export.class.php');
2318
+	public function _contact_list_report() {
2319
+		EE_Registry::instance()->load_helper('File');
2320
+		if (is_readable(EE_CLASSES.'EE_Export.class.php')) {
2321
+			require_once(EE_CLASSES.'EE_Export.class.php');
2322 2322
 			$EE_Export = EE_Export::instance($this->_req_data);
2323 2323
 			$EE_Export->report_attendees();
2324 2324
 		}
@@ -2337,73 +2337,73 @@  discard block
 block discarded – undo
2337 2337
 	 * @return void
2338 2338
 	 */
2339 2339
 	protected function _duplicate_attendee() {
2340
-		$action = !empty( $this->_req_data['return'] ) ? $this->_req_data['return'] : 'default';
2340
+		$action = ! empty($this->_req_data['return']) ? $this->_req_data['return'] : 'default';
2341 2341
 		//verify we have necessary info
2342
-		if ( empty($this->_req_data['_REG_ID'] )  ) {
2343
-			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__ );
2344
-			$query_args = array( 'action' => $action );
2342
+		if (empty($this->_req_data['_REG_ID'])) {
2343
+			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__);
2344
+			$query_args = array('action' => $action);
2345 2345
 			$this->_redirect_after_action('', '', '', $query_args, TRUE);
2346 2346
 		}
2347 2347
 
2348 2348
 		//okay necessary deets present... let's dupe the incoming attendee and attach to incoming registration.
2349
-		$registration = EEM_Registration::instance()->get_one_by_ID( $this->_req_data['_REG_ID'] );
2349
+		$registration = EEM_Registration::instance()->get_one_by_ID($this->_req_data['_REG_ID']);
2350 2350
 		$attendee = $registration->attendee();
2351 2351
 
2352 2352
 		//remove relation of existing attendee on registration
2353
-		$registration->_remove_relation_to($attendee, 'Attendee' );
2353
+		$registration->_remove_relation_to($attendee, 'Attendee');
2354 2354
 		//new attendee
2355 2355
 		$new_attendee = clone $attendee;
2356
-		$new_attendee->set( 'ATT_ID', 0 );
2356
+		$new_attendee->set('ATT_ID', 0);
2357 2357
 		$new_attendee->save();
2358 2358
 
2359 2359
 		//add new attendee to reg
2360
-		$registration->_add_relation_to( $new_attendee, 'Attendee');
2360
+		$registration->_add_relation_to($new_attendee, 'Attendee');
2361 2361
 
2362
-		EE_Error::add_success( __('New Contact record created.  Now make any edits you wish to make for this contact.', 'event_espresso') );
2362
+		EE_Error::add_success(__('New Contact record created.  Now make any edits you wish to make for this contact.', 'event_espresso'));
2363 2363
 
2364 2364
 		//redirect to edit page for attendee
2365
-		$query_args = array( 'post' => $new_attendee->ID(), 'action' => 'edit_attendee' );
2365
+		$query_args = array('post' => $new_attendee->ID(), 'action' => 'edit_attendee');
2366 2366
 
2367
-		$this->_redirect_after_action( '', '', '', $query_args, TRUE );
2367
+		$this->_redirect_after_action('', '', '', $query_args, TRUE);
2368 2368
 	}
2369 2369
 
2370 2370
 
2371 2371
 	//related to cpt routes
2372 2372
 	protected function _insert_update_cpt_item($post_id, $post) {
2373 2373
 		$success = true;
2374
-		$attendee = EEM_Attendee::instance()->get_one_by_ID( $post_id );
2374
+		$attendee = EEM_Attendee::instance()->get_one_by_ID($post_id);
2375 2375
 		//for attendee updates
2376
-		if ( $post->post_type = 'espresso_attendees' && !empty( $attendee ) ) {
2376
+		if ($post->post_type = 'espresso_attendees' && ! empty($attendee)) {
2377 2377
 			//note we should only be UPDATING attendees at this point.
2378 2378
 			$updated_fields = array(
2379 2379
 				'ATT_fname' => $this->_req_data['ATT_fname'],
2380 2380
 				'ATT_lname' => $this->_req_data['ATT_lname'],
2381
-				'ATT_full_name'=> $this->_req_data['ATT_fname'] . ' ' . $this->_req_data['ATT_lname'],
2381
+				'ATT_full_name'=> $this->_req_data['ATT_fname'].' '.$this->_req_data['ATT_lname'],
2382 2382
 				'ATT_address' => isset($this->_req_data['ATT_address']) ? $this->_req_data['ATT_address'] : '',
2383 2383
 				'ATT_address2' => isset($this->_req_data['ATT_address2']) ? $this->_req_data['ATT_address2'] : '',
2384
-				'ATT_city' => isset( $this->_req_data['ATT_city'] ) ? $this->_req_data['ATT_city'] : '',
2385
-				'STA_ID' => isset( $this->_req_data['STA_ID'] ) ? $this->_req_data['STA_ID'] : '',
2386
-				'CNT_ISO' => isset( $this->_req_data['CNT_ISO'] ) ? $this->_req_data['CNT_ISO'] : '',
2387
-				'ATT_zip' => isset( $this->_req_data['ATT_zip'] ) ? $this->_req_data['ATT_zip'] : '',
2388
-				'ATT_email' => isset( $this->_req_data['ATT_email'] ) ? $this->_req_data['ATT_email'] : '',
2389
-				'ATT_phone' => isset( $this->_req_data['ATT_phone'] ) ? $this->_req_data['ATT_phone'] : ''
2384
+				'ATT_city' => isset($this->_req_data['ATT_city']) ? $this->_req_data['ATT_city'] : '',
2385
+				'STA_ID' => isset($this->_req_data['STA_ID']) ? $this->_req_data['STA_ID'] : '',
2386
+				'CNT_ISO' => isset($this->_req_data['CNT_ISO']) ? $this->_req_data['CNT_ISO'] : '',
2387
+				'ATT_zip' => isset($this->_req_data['ATT_zip']) ? $this->_req_data['ATT_zip'] : '',
2388
+				'ATT_email' => isset($this->_req_data['ATT_email']) ? $this->_req_data['ATT_email'] : '',
2389
+				'ATT_phone' => isset($this->_req_data['ATT_phone']) ? $this->_req_data['ATT_phone'] : ''
2390 2390
 				);
2391
-			foreach ( $updated_fields as $field => $value ) {
2391
+			foreach ($updated_fields as $field => $value) {
2392 2392
 				$attendee->set($field, $value);
2393 2393
 			}
2394 2394
 
2395 2395
 			$success = $attendee->save();
2396 2396
 
2397
-			$attendee_update_callbacks = apply_filters( 'FHEE__Registrations_Admin_Page__insert_update_cpt_item__attendee_update', array() );
2398
-			foreach ( $attendee_update_callbacks as $a_callback ) {
2399
-				if ( FALSE === call_user_func_array( $a_callback, array($attendee, $this->_req_data ) ) ) {
2400
-					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 ) );
2397
+			$attendee_update_callbacks = apply_filters('FHEE__Registrations_Admin_Page__insert_update_cpt_item__attendee_update', array());
2398
+			foreach ($attendee_update_callbacks as $a_callback) {
2399
+				if (FALSE === call_user_func_array($a_callback, array($attendee, $this->_req_data))) {
2400
+					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));
2401 2401
 				}
2402 2402
 			}
2403 2403
 		}
2404 2404
 
2405
-		if ( $success === FALSE )
2406
-			EE_Error::add_error(__('Something went wrong with updating the meta table data for the registration.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
2405
+		if ($success === FALSE)
2406
+			EE_Error::add_error(__('Something went wrong with updating the meta table data for the registration.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
2407 2407
 
2408 2408
 	}
2409 2409
 
@@ -2423,17 +2423,17 @@  discard block
 block discarded – undo
2423 2423
 		remove_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2424 2424
 		remove_meta_box('commentstatusdiv', $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2425 2425
 
2426
-		if ( post_type_supports( 'espresso_attendees', 'excerpt') ) {
2427
-			add_meta_box('postexcerpt', __('Short Biography', 'event_espresso'), 'post_excerpt_meta_box', $this->_cpt_routes[$this->_req_action], 'normal' );
2426
+		if (post_type_supports('espresso_attendees', 'excerpt')) {
2427
+			add_meta_box('postexcerpt', __('Short Biography', 'event_espresso'), 'post_excerpt_meta_box', $this->_cpt_routes[$this->_req_action], 'normal');
2428 2428
 		}
2429 2429
 
2430
-		if ( post_type_supports( 'espresso_attendees', 'comments') ) {
2430
+		if (post_type_supports('espresso_attendees', 'comments')) {
2431 2431
 			add_meta_box('commentsdiv', __('Notes on the Contact', 'event_espresso'), 'post_comment_meta_box', $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2432 2432
 		}
2433 2433
 
2434
-		add_meta_box('attendee_contact_info', __('Contact Info', 'event_espresso'), array( $this, 'attendee_contact_info'), $this->_cpt_routes[$this->_req_action], 'side', 'core' );
2435
-		add_meta_box('attendee_details_address', __('Address Details', 'event_espresso'), array($this, 'attendee_address_details'), $this->_cpt_routes[$this->_req_action], 'normal', 'core' );
2436
-		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');
2434
+		add_meta_box('attendee_contact_info', __('Contact Info', 'event_espresso'), array($this, 'attendee_contact_info'), $this->_cpt_routes[$this->_req_action], 'side', 'core');
2435
+		add_meta_box('attendee_details_address', __('Address Details', 'event_espresso'), array($this, 'attendee_address_details'), $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2436
+		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');
2437 2437
 	}
2438 2438
 
2439 2439
 
@@ -2442,10 +2442,10 @@  discard block
 block discarded – undo
2442 2442
 	 * @param  WP_Post $post wp post object
2443 2443
 	 * @return string        attendee contact info ( and form )
2444 2444
 	 */
2445
-	public function attendee_contact_info( $post ) {
2445
+	public function attendee_contact_info($post) {
2446 2446
 		//get attendee object ( should already have it )
2447 2447
 		$this->_template_args['attendee'] = $this->_cpt_model_obj;
2448
-		$template = REG_TEMPLATE_PATH . 'attendee_contact_info_metabox_content.template.php';
2448
+		$template = REG_TEMPLATE_PATH.'attendee_contact_info_metabox_content.template.php';
2449 2449
 		EEH_Template::display_template($template, $this->_template_args);
2450 2450
 	}
2451 2451
 
@@ -2461,12 +2461,12 @@  discard block
 block discarded – undo
2461 2461
 		$this->_template_args['attendee'] = $this->_cpt_model_obj;
2462 2462
 		$this->_template_args['state_html'] = EEH_Form_Fields::generate_form_input(
2463 2463
 				new EE_Question_Form_Input(
2464
-				EE_Question::new_instance( array(
2464
+				EE_Question::new_instance(array(
2465 2465
 					'QST_ID' => 0,
2466 2466
 					'QST_display_text' => __('State/Province', 'event_espresso'),
2467 2467
 					'QST_system' => 'admin-state'
2468 2468
 					)),
2469
-				EE_Answer::new_instance( array(
2469
+				EE_Answer::new_instance(array(
2470 2470
 					'ANS_ID' => 0,
2471 2471
 					'ANS_value' => $this->_cpt_model_obj->state_ID()
2472 2472
 					)),
@@ -2479,12 +2479,12 @@  discard block
 block discarded – undo
2479 2479
 			));
2480 2480
 		$this->_template_args['country_html'] = EEH_Form_Fields::generate_form_input(
2481 2481
 				new EE_Question_Form_Input(
2482
-				EE_Question::new_instance( array(
2482
+				EE_Question::new_instance(array(
2483 2483
 					'QST_ID' => 0,
2484 2484
 					'QST_display_text' => __('Country', 'event_espresso'),
2485 2485
 					'QST_system' => 'admin-country'
2486 2486
 					)),
2487
-				EE_Answer::new_instance( array(
2487
+				EE_Answer::new_instance(array(
2488 2488
 					'ANS_ID' => 0,
2489 2489
 					'ANS_value' => $this->_cpt_model_obj->country_ID()
2490 2490
 					)),
@@ -2495,8 +2495,8 @@  discard block
 block discarded – undo
2495 2495
 					'append_qstn_id' => FALSE
2496 2496
 					)
2497 2497
 				));
2498
-		$template = REG_TEMPLATE_PATH . 'attendee_address_details_metabox_content.template.php';
2499
-		EEH_Template::display_template($template, $this->_template_args );
2498
+		$template = REG_TEMPLATE_PATH.'attendee_address_details_metabox_content.template.php';
2499
+		EEH_Template::display_template($template, $this->_template_args);
2500 2500
 
2501 2501
 	}
2502 2502
 
@@ -2506,11 +2506,11 @@  discard block
 block discarded – undo
2506 2506
 	*		@access protected
2507 2507
 	*		@return void
2508 2508
 	*/
2509
-	public function attendee_registrations_meta_box( $post ) {
2509
+	public function attendee_registrations_meta_box($post) {
2510 2510
 
2511 2511
 		$this->_template_args['attendee'] = $this->_cpt_model_obj;
2512 2512
 		$this->_template_args['registrations'] = $this->_cpt_model_obj->get_many_related('Registration');
2513
-		$template = REG_TEMPLATE_PATH . 'attendee_registrations_main_meta_box.template.php';
2513
+		$template = REG_TEMPLATE_PATH.'attendee_registrations_main_meta_box.template.php';
2514 2514
 		EEH_Template::display_template($template, $this->_template_args);
2515 2515
 
2516 2516
 	}
@@ -2524,8 +2524,8 @@  discard block
 block discarded – undo
2524 2524
 	 * @return string        html for new form.
2525 2525
 	 */
2526 2526
 	public function after_title_form_fields($post) {
2527
-		if ( $post->post_type == 'espresso_attendees' ) {
2528
-			$template = REG_TEMPLATE_PATH . 'attendee_details_after_title_form_fields.template.php';
2527
+		if ($post->post_type == 'espresso_attendees') {
2528
+			$template = REG_TEMPLATE_PATH.'attendee_details_after_title_form_fields.template.php';
2529 2529
 			$template_args['attendee'] = $this->_cpt_model_obj;
2530 2530
 			EEH_Template::display_template($template, $template_args);
2531 2531
 		}
@@ -2542,21 +2542,21 @@  discard block
 block discarded – undo
2542 2542
 	*		@access protected
2543 2543
 	*		@return void
2544 2544
 	*/
2545
-	protected function _trash_or_restore_attendees( $trash = TRUE ) {
2545
+	protected function _trash_or_restore_attendees($trash = TRUE) {
2546 2546
 
2547
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
2547
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
2548 2548
 
2549 2549
 		$ATT_MDL = EEM_Attendee::instance();
2550 2550
 
2551 2551
 		$success = 1;
2552 2552
 		//Checkboxes
2553
-		if (!empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
2553
+		if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
2554 2554
 			// if array has more than one element than success message should be plural
2555
-			$success = count( $this->_req_data['checkbox'] ) > 1 ? 2 : 1;
2555
+			$success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
2556 2556
 			// cycle thru checkboxes
2557
-			while (list( $ATT_ID, $value ) = each($this->_req_data['checkbox'])) {
2558
-				$updated = $trash ? $ATT_MDL->update_by_ID(array( 'status' => 'trash' ), $ATT_ID) : $ATT_MDL->update_by_ID( array('status' => 'publish' ), $ATT_ID);
2559
-				if ( !$updated ) {
2557
+			while (list($ATT_ID, $value) = each($this->_req_data['checkbox'])) {
2558
+				$updated = $trash ? $ATT_MDL->update_by_ID(array('status' => 'trash'), $ATT_ID) : $ATT_MDL->update_by_ID(array('status' => 'publish'), $ATT_ID);
2559
+				if ( ! $updated) {
2560 2560
 					$success = 0;
2561 2561
 				}
2562 2562
 			}
@@ -2565,18 +2565,18 @@  discard block
 block discarded – undo
2565 2565
 			// grab single id and delete
2566 2566
 			$ATT_ID = absint($this->_req_data['ATT_ID']);
2567 2567
 			//get attendee
2568
-			$att = $ATT_MDL->get_one_by_ID( $ATT_ID );
2568
+			$att = $ATT_MDL->get_one_by_ID($ATT_ID);
2569 2569
 			$updated = $trash ? $att->set_status('trash') : $att->set_status('publish');
2570 2570
 			$updated = $att->save();
2571
-			if ( ! $updated ) {
2571
+			if ( ! $updated) {
2572 2572
 				$success = 0;
2573 2573
 			}
2574 2574
 
2575 2575
 		}
2576 2576
 
2577
-		$what = $success > 1 ? __( 'Contacts', 'event_espresso' ) : __( 'Contact', 'event_espresso' );
2578
-		$action_desc = $trash ? __( 'moved to the trash', 'event_espresso' ) : __( 'restored', 'event_espresso' );
2579
-		$this->_redirect_after_action( $success, $what, $action_desc, array( 'action' => 'contact_list' ) );
2577
+		$what = $success > 1 ? __('Contacts', 'event_espresso') : __('Contact', 'event_espresso');
2578
+		$action_desc = $trash ? __('moved to the trash', 'event_espresso') : __('restored', 'event_espresso');
2579
+		$this->_redirect_after_action($success, $what, $action_desc, array('action' => 'contact_list'));
2580 2580
 
2581 2581
 	}
2582 2582
 
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.