Completed
Branch FET-9413-questions-refactor (536482)
by
unknown
449:46 queued 435:07
created
caffeinated/admin/extend/events/templates/import_page.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <div class="import-area">
2 2
 	<div class="important-notice">
3
-		<?php _e( 'The import feature has been disabled because of bugs. It is expected to be put back in place soon.', 'event_espresso' );?>
3
+		<?php _e('The import feature has been disabled because of bugs. It is expected to be put back in place soon.', 'event_espresso'); ?>
4 4
 	</div>
5 5
 <?php // echo $form?>
6 6
 </div>
Please login to merge, or discard this patch.
caffeinated/admin/extend/events/templates/template_settings.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,6 +5,6 @@
 block discarded – undo
5 5
 ?>
6 6
 <div class="padding">
7 7
 
8
-	<?php do_action( 'AHEE__template_settings__template__before_settings_form' ); ?>
8
+	<?php do_action('AHEE__template_settings__template__before_settings_form'); ?>
9 9
 
10 10
 </div>
Please login to merge, or discard this patch.
admin/extend/general_settings/templates/debug_log_settings.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
 				<?php echo EEH_Template::get_help_tab_link('full_logging_info'); ?>
12 12
 			</th>
13 13
 			<td>
14
-				<?php echo EEH_Form_Fields::select_input('use_full_logging', $values, $use_full_logging ); ?>
14
+				<?php echo EEH_Form_Fields::select_input('use_full_logging', $values, $use_full_logging); ?>
15 15
 				<p class="description">
16 16
 					<span class="reminder-spn">
17 17
 						<?php _e('Please use caution when using this feature. These files may be publicly available.', 'event_espresso'); ?>
18 18
 					</span><br/>
19
-					<?php echo sprintf( __('Once saved, this file will be available at: %s', 'event_espresso'), '<br /><b>/wp-content/uploads/espresso/logs/' . EE_Registry::instance()->CFG->admin->log_file_name() . '</b>' ); ?>
19
+					<?php echo sprintf(__('Once saved, this file will be available at: %s', 'event_espresso'), '<br /><b>/wp-content/uploads/espresso/logs/'.EE_Registry::instance()->CFG->admin->log_file_name().'</b>'); ?>
20 20
 				</p>
21 21
 
22 22
 			</td>
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 				<?php echo EEH_Template::get_help_tab_link('remote_logging_info'); ?>
29 29
 			</th>
30 30
 			<td>
31
-				<?php echo EEH_Form_Fields::select_input('use_remote_logging', $values, $use_remote_logging ); ?>
31
+				<?php echo EEH_Form_Fields::select_input('use_remote_logging', $values, $use_remote_logging); ?>
32 32
 				<p class="description">
33 33
 					<?php _e('Send debugging data to the remote URL below.', 'event_espresso'); ?>
34 34
 				</p>
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 				<?php echo EEH_Template::get_help_tab_link('remote_logging_url_info'); ?>
42 42
 			</th>
43 43
 			<td>
44
-				<input name="remote_logging_url" id="remote_logging_url" size="20" class="regular-text" type="text" value="<?php echo $remote_logging_url;?>" />
44
+				<input name="remote_logging_url" id="remote_logging_url" size="20" class="regular-text" type="text" value="<?php echo $remote_logging_url; ?>" />
45 45
 				<p class="description">
46 46
 					<?php _e('Example: http://requestb.in/MY_UNIQUE_ID', 'event_espresso'); ?>
47 47
 
Please login to merge, or discard this patch.
admin/extend/messages/Custom_Messages_Template_List_Table.class.php 2 patches
Spacing   +65 added lines, -65 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
 /**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 class Custom_Messages_Template_List_Table extends EE_Admin_List_Table {
31 31
 
32 32
 
33
-	public function __construct( $admin_page ) {
33
+	public function __construct($admin_page) {
34 34
 		//Set parent defaults
35 35
 		parent::__construct($admin_page);
36 36
 	}
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
 
41 41
 	protected function _setup_data() {
42
-		$this->_data = $this->_admin_page->get_message_templates( $this->_per_page, $this->_view, FALSE, FALSE, FALSE );
43
-		$this->_all_data_count = $this->_admin_page->get_message_templates( $this->_per_page, $this->_view, TRUE, TRUE, FALSE );
42
+		$this->_data = $this->_admin_page->get_message_templates($this->_per_page, $this->_view, FALSE, FALSE, FALSE);
43
+		$this->_all_data_count = $this->_admin_page->get_message_templates($this->_per_page, $this->_view, TRUE, TRUE, FALSE);
44 44
 	}
45 45
 
46 46
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 
50 50
 	protected function _set_properties() {
51 51
 		$this->_wp_list_args = array(
52
-			'singular' => __('Message Template Group', 'event_espresso' ),
53
-			'plural' => __('Message Template', 'event_espresso' ),
52
+			'singular' => __('Message Template Group', 'event_espresso'),
53
+			'plural' => __('Message Template', 'event_espresso'),
54 54
 			'ajax' => TRUE, //for now,
55 55
 			'screen' => $this->_admin_page->get_current_screen()->id
56 56
 			);
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
 			'cb' => '<input type="checkbox" />',
60 60
 			'name' => __('Template Name', 'event_espresso'),
61 61
 			'message_type' => __('Message Type', 'event_espresso'),
62
-			'messenger' => __( 'Messenger', 'event_espresso'),
63
-			'description' => __( 'Description', 'event_espresso' ),
64
-			'events' => __( 'Events', 'event_espresso'), //count of events using this template.
62
+			'messenger' => __('Messenger', 'event_espresso'),
63
+			'description' => __('Description', 'event_espresso'),
64
+			'events' => __('Events', 'event_espresso'), //count of events using this template.
65 65
 			'actions' => ''
66 66
 			//'messages_sent' => __( 'Total Sent', 'event_espresso' ) //todo this will come later when we've got message tracking in place.
67 67
 			);
68 68
 
69 69
 		$this->_sortable_columns = array(
70
-			'messenger' => array( 'MTP_messenger' => TRUE ),
70
+			'messenger' => array('MTP_messenger' => TRUE),
71 71
 			//'message_type' => array( 'MTP_message_type' => FALSE )
72 72
 			);
73 73
 
@@ -86,16 +86,16 @@  discard block
 block discarded – undo
86 86
 	 *
87 87
 	 * @return string
88 88
 	 */
89
-	public function single_row( $item ) {
89
+	public function single_row($item) {
90 90
 		$message_type = $item->message_type_obj();
91 91
 		$messenger = $item->messenger_obj();
92 92
 
93
-		if ( ! $message_type instanceof EE_message_type || ! $messenger instanceof EE_messenger ) {
93
+		if ( ! $message_type instanceof EE_message_type || ! $messenger instanceof EE_messenger) {
94 94
 			echo '';
95 95
 			return;
96 96
 		}
97 97
 
98
-		parent::single_row( $item );
98
+		parent::single_row($item);
99 99
 	}
100 100
 
101 101
 
@@ -103,29 +103,29 @@  discard block
 block discarded – undo
103 103
 
104 104
 	protected function _get_table_filters() {
105 105
 		$filters = array();
106
-		EE_Registry::instance()->load_helper( 'Form_Fields' );
106
+		EE_Registry::instance()->load_helper('Form_Fields');
107 107
 		$messengers = $this->_admin_page->get_active_messengers();
108 108
 		$message_types = $this->_admin_page->get_installed_message_types();
109 109
 
110 110
 
111 111
 		//setup messengers for selects
112
-		$i=1;
112
+		$i = 1;
113 113
 		$m_values[0]['id'] = 'all';
114
-		$m_values[0]['text'] = __('All Messengers', 'event_espresso' );
115
-		foreach ( $messengers as $messenger => $args ) {
114
+		$m_values[0]['text'] = __('All Messengers', 'event_espresso');
115
+		foreach ($messengers as $messenger => $args) {
116 116
 			$m_values[$i]['id'] = $messenger;
117 117
 			$m_values[$i]['text'] = ucwords($args['obj']->label['singular']);
118 118
 			$i++;
119 119
 		}
120
-		foreach ( $messengers as $messenger => $args ) {
120
+		foreach ($messengers as $messenger => $args) {
121 121
 			$m_values[$i]['id'] = $messenger;
122 122
 			$m_values[$i]['text'] = ucwords($args['obj']->label['singular']);
123 123
 			$i++;
124 124
 		}
125 125
 
126 126
 		//lets do the same for message types
127
-		$i=1;
128
-		foreach ( $message_types as $message_type => $args ) {
127
+		$i = 1;
128
+		foreach ($message_types as $message_type => $args) {
129 129
 			$mt_values[$i]['id'] = $message_type;
130 130
 			$mt_values[$i]['text'] = ucwords($args['obj']->label['singular']);
131 131
 			$i++;
@@ -141,28 +141,28 @@  discard block
 block discarded – undo
141 141
 			'text' => __('Show All', 'event_espresso')
142 142
 			);
143 143
 
144
-		$msgr_filters = !empty($m_values) ? array_merge( $msgr_default, $m_values ) : array();
145
-		$mt_filters = !empty($mt_values) ? array_merge( $mt_default, $mt_values ) : array();
144
+		$msgr_filters = ! empty($m_values) ? array_merge($msgr_default, $m_values) : array();
145
+		$mt_filters = ! empty($mt_values) ? array_merge($mt_default, $mt_values) : array();
146 146
 
147
-		if ( empty( $m_values ) )
147
+		if (empty($m_values))
148 148
 			$msgr_filters[0] = array(
149 149
 				'id' => 'no_messenger_options',
150 150
 				'text' => __('No Messengers active', 'event_espresso')
151 151
 				);
152 152
 
153
-		if ( empty($mt_values) )
153
+		if (empty($mt_values))
154 154
 			$mt_filters[0] = array(
155 155
 				'id' => 'no_message_type_options',
156 156
 				'text' => __('No Message Types active', 'event_espresso')
157 157
 				);
158 158
 
159
-		if ( count( $messengers ) >= 1  && !empty( $m_values ) ) {
160
-			unset( $msgr_filters[0] );
161
-			$msgr_filters = array_values( $msgr_filters ); //reindex keys
159
+		if (count($messengers) >= 1 && ! empty($m_values)) {
160
+			unset($msgr_filters[0]);
161
+			$msgr_filters = array_values($msgr_filters); //reindex keys
162 162
 		}
163 163
 
164
-		$filters[] = EEH_Form_Fields::select_input('ee_messenger_filter_by', $msgr_filters, isset($this->_req_data['ee_messenger_filter_by']) ? sanitize_key( $this->_req_data['ee_messenger_filter_by']) : '' );
165
-		$filters[] = EEH_Form_Fields::select_input('ee_message_type_filter_by', $mt_filters, isset($this->_req_data['ee_message_type_filter_by']) ? sanitize_key( $this->_req_data['ee_message_type_filter_by']) : '');
164
+		$filters[] = EEH_Form_Fields::select_input('ee_messenger_filter_by', $msgr_filters, isset($this->_req_data['ee_messenger_filter_by']) ? sanitize_key($this->_req_data['ee_messenger_filter_by']) : '');
165
+		$filters[] = EEH_Form_Fields::select_input('ee_message_type_filter_by', $mt_filters, isset($this->_req_data['ee_message_type_filter_by']) ? sanitize_key($this->_req_data['ee_message_type_filter_by']) : '');
166 166
 		return $filters;
167 167
 	}
168 168
 
@@ -170,14 +170,14 @@  discard block
 block discarded – undo
170 170
 	 * we're just removing the search box for message templates, not needed.
171 171
 	 * @return string (empty);
172 172
 	 */
173
-	function search_box( $text, $input_id ) {
173
+	function search_box($text, $input_id) {
174 174
 		return '';
175 175
 	}
176 176
 
177 177
 
178 178
 	protected function _add_view_counts() {
179
-		foreach ( $this->_views as $view => $args )  {
180
-			$this->_views[$view]['count'] = $this->_admin_page->get_message_templates( $this->_per_page, $view, TRUE, TRUE, FALSE );
179
+		foreach ($this->_views as $view => $args) {
180
+			$this->_views[$view]['count'] = $this->_admin_page->get_message_templates($this->_per_page, $view, TRUE, TRUE, FALSE);
181 181
 		}
182 182
 	}
183 183
 
@@ -191,16 +191,16 @@  discard block
 block discarded – undo
191 191
 	 * @return string
192 192
 	 */
193 193
 	public function no_items() {
194
-		if ( $this->_view !== 'trashed' )
195
-			printf( __('%sNo Custom Templates found.%s To create your first custom message template, go to the "Default Message Templates" tab and click the "Create Custom" button next to the template you want to use as a base for the new one.', 'event_espresso'), '<strong>', '</strong>' );
194
+		if ($this->_view !== 'trashed')
195
+			printf(__('%sNo Custom Templates found.%s To create your first custom message template, go to the "Default Message Templates" tab and click the "Create Custom" button next to the template you want to use as a base for the new one.', 'event_espresso'), '<strong>', '</strong>');
196 196
 		else
197 197
 			parent::no_items();
198 198
 	}
199 199
 
200 200
 
201 201
 
202
-	public function column_cb( $item ) {
203
-		return sprintf( '<input type="checkbox" name="checkbox[%s] value="1" />', $item->GRP_ID() );
202
+	public function column_cb($item) {
203
+		return sprintf('<input type="checkbox" name="checkbox[%s] value="1" />', $item->GRP_ID());
204 204
 	}
205 205
 
206 206
 
@@ -208,29 +208,29 @@  discard block
 block discarded – undo
208 208
 
209 209
 
210 210
 
211
-	function column_name( $item ) {
212
-		return '<p>' . $item->name() . '</p>';
211
+	function column_name($item) {
212
+		return '<p>'.$item->name().'</p>';
213 213
 	}
214 214
 
215 215
 
216 216
 
217 217
 
218
-	function column_description( $item ) {
219
-		return '<p>' . $item->description() . '</p>';
218
+	function column_description($item) {
219
+		return '<p>'.$item->description().'</p>';
220 220
 	}
221 221
 
222 222
 
223 223
 
224
-	function column_actions( $item ) {
225
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_messages', 'espresso_messages_add_new_message_template' ) ) {
224
+	function column_actions($item) {
225
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_messages', 'espresso_messages_add_new_message_template')) {
226 226
 			$create_args = array(
227 227
 				'GRP_ID' => $item->ID(),
228 228
 				'messenger' => $item->messenger(),
229 229
 				'message_type' => $item->message_type(),
230 230
 				'action' => 'add_new_message_template'
231 231
 				);
232
-			$create_link = EE_Admin_Page::add_query_args_and_nonce( $create_args, EE_MSG_ADMIN_URL );
233
-			return sprintf( '<p><a href="%s" class="button button-small">%s</a></p>', $create_link, __('Create Custom', 'event_espresso') );
232
+			$create_link = EE_Admin_Page::add_query_args_and_nonce($create_args, EE_MSG_ADMIN_URL);
233
+			return sprintf('<p><a href="%s" class="button button-small">%s</a></p>', $create_link, __('Create Custom', 'event_espresso'));
234 234
 		}
235 235
 		return '';
236 236
 	}
@@ -247,27 +247,27 @@  discard block
 block discarded – undo
247 247
 		$actions = array();
248 248
 
249 249
 		// edit link but only if item isn't trashed.
250
-		if ( !$item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ) {
251
-			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_message_template', 'id'=>$item->GRP_ID() ), EE_MSG_ADMIN_URL );
252
-			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Template', 'event_espresso' ) . '">' . __( 'Edit', 'event_espresso' ) . '</a>';
250
+		if ( ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID())) {
251
+			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_message_template', 'id'=>$item->GRP_ID()), EE_MSG_ADMIN_URL);
252
+			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Template', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>';
253 253
 		}
254 254
 
255
-		$name_link = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() )? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Template', 'event_espresso' ) . '">' . ucwords( $item->messenger_obj()->label['singular'] ) . '</a>' : ucwords( $item->messenger_obj()->label['singular'] );
256
-		$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'trash_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE ), EE_MSG_ADMIN_URL );
255
+		$name_link = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Template', 'event_espresso').'">'.ucwords($item->messenger_obj()->label['singular']).'</a>' : ucwords($item->messenger_obj()->label['singular']);
256
+		$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'trash_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE), EE_MSG_ADMIN_URL);
257 257
 		// restore link
258
-		$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE ), EE_MSG_ADMIN_URL );
258
+		$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE), EE_MSG_ADMIN_URL);
259 259
 		// delete price link
260
-		$delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'delete_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE ), EE_MSG_ADMIN_URL );
260
+		$delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'delete_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE), EE_MSG_ADMIN_URL);
261 261
 
262
-		if ( !$item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_message', 'espresso_messages_trash_message_template', $item->ID() ) ) {
263
-			$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="' . esc_attr__( 'Move Template Group to Trash', 'event_espresso' ) . '">' . __( 'Move to Trash', 'event_espresso' ) . '</a>';
262
+		if ( ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_delete_message', 'espresso_messages_trash_message_template', $item->ID())) {
263
+			$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Move Template Group to Trash', 'event_espresso').'">'.__('Move to Trash', 'event_espresso').'</a>';
264 264
 		} else {
265
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_message', 'espresso_messages_restore_message_template', $item->ID() ) ) {
266
-				$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Message Template', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>';
265
+			if (EE_Registry::instance()->CAP->current_user_can('ee_delete_message', 'espresso_messages_restore_message_template', $item->ID())) {
266
+				$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Message Template', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>';
267 267
 			}
268 268
 
269
-			if ( $this->_view == 'trashed' && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_message', 'espresso_messages_delete_message_template', $item->ID() ) ) {
270
-				$actions['delete'] = '<a href="'.$delete_lnk_url.'" title="' . esc_attr__( 'Delete Template Group Permanently', 'event_espresso' ) . '">' . __( 'Delete Permanently', 'event_espresso' ) . '</a>';
269
+			if ($this->_view == 'trashed' && EE_Registry::instance()->CAP->current_user_can('ee_delete_message', 'espresso_messages_delete_message_template', $item->ID())) {
270
+				$actions['delete'] = '<a href="'.$delete_lnk_url.'" title="'.esc_attr__('Delete Template Group Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>';
271 271
 			}
272 272
 		}
273 273
 
@@ -276,15 +276,15 @@  discard block
 block discarded – undo
276 276
 		$c_configs = $item->contexts_config();
277 277
 		$ctxt = array();
278 278
 		$context_templates = $item->context_templates();
279
-		foreach ( $context_templates as $context => $template_fields ) {
280
-			$mtp_to = !empty( $context_templates[$context]['to'] ) && $context_templates[$context]['to'] instanceof EE_Message_Template ? $context_templates[$context]['to']->get('MTP_content') : NULL;
281
-			$inactive = empty( $mtp_to ) && !empty( $context_templates[$context]['to'] ) ? ' class="mtp-inactive"' : '';
279
+		foreach ($context_templates as $context => $template_fields) {
280
+			$mtp_to = ! empty($context_templates[$context]['to']) && $context_templates[$context]['to'] instanceof EE_Message_Template ? $context_templates[$context]['to']->get('MTP_content') : NULL;
281
+			$inactive = empty($mtp_to) && ! empty($context_templates[$context]['to']) ? ' class="mtp-inactive"' : '';
282 282
 			$context_title = ucwords($c_configs[$context]['label']);
283
-			$edit_link = EE_Admin_Page::add_query_args_and_nonce( array('action'=>'edit_message_template', 'id'=>$item->GRP_ID(), 'context' => $context), EE_MSG_ADMIN_URL );
284
-			$ctxt[] = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ? '<a' . $inactive . ' href="'. $edit_link . '" title="' . esc_attr__('Edit Context', 'event_espresso') . '">' . $context_title . '</a>' : $context_title;
283
+			$edit_link = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_message_template', 'id'=>$item->GRP_ID(), 'context' => $context), EE_MSG_ADMIN_URL);
284
+			$ctxt[] = EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? '<a'.$inactive.' href="'.$edit_link.'" title="'.esc_attr__('Edit Context', 'event_espresso').'">'.$context_title.'</a>' : $context_title;
285 285
 		}
286 286
 
287
-		$ctx_content = !$item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ? sprintf( __('<strong>%s:</strong> ', 'event_espresso'), ucwords($c_label['plural']) ) . implode(' | ', $ctxt) : '';
287
+		$ctx_content = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? sprintf(__('<strong>%s:</strong> ', 'event_espresso'), ucwords($c_label['plural'])).implode(' | ', $ctxt) : '';
288 288
 
289 289
 
290 290
 		//Return the name contents
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 										/* $1%s */ $name_link,
293 293
 										/* $2%s */ $item->GRP_ID(),
294 294
 										/* %4$s */ $ctx_content,
295
-										/* $3%s */ $this->row_actions( $actions )
295
+										/* $3%s */ $this->row_actions($actions)
296 296
 		);
297 297
 	}
298 298
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 	 * @return string       message_type name
314 314
 	 */
315 315
 	function column_message_type($item) {
316
-		return ucwords($item->message_type_obj()->label['singular'] );
316
+		return ucwords($item->message_type_obj()->label['singular']);
317 317
 	}
318 318
 
319 319
 
Please login to merge, or discard this patch.
Braces   +13 added lines, -9 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
@@ -144,17 +145,19 @@  discard block
 block discarded – undo
144 145
 		$msgr_filters = !empty($m_values) ? array_merge( $msgr_default, $m_values ) : array();
145 146
 		$mt_filters = !empty($mt_values) ? array_merge( $mt_default, $mt_values ) : array();
146 147
 
147
-		if ( empty( $m_values ) )
148
-			$msgr_filters[0] = array(
148
+		if ( empty( $m_values ) ) {
149
+					$msgr_filters[0] = array(
149 150
 				'id' => 'no_messenger_options',
150 151
 				'text' => __('No Messengers active', 'event_espresso')
151 152
 				);
153
+		}
152 154
 
153
-		if ( empty($mt_values) )
154
-			$mt_filters[0] = array(
155
+		if ( empty($mt_values) ) {
156
+					$mt_filters[0] = array(
155 157
 				'id' => 'no_message_type_options',
156 158
 				'text' => __('No Message Types active', 'event_espresso')
157 159
 				);
160
+		}
158 161
 
159 162
 		if ( count( $messengers ) >= 1  && !empty( $m_values ) ) {
160 163
 			unset( $msgr_filters[0] );
@@ -191,10 +194,11 @@  discard block
 block discarded – undo
191 194
 	 * @return string
192 195
 	 */
193 196
 	public function no_items() {
194
-		if ( $this->_view !== 'trashed' )
195
-			printf( __('%sNo Custom Templates found.%s To create your first custom message template, go to the "Default Message Templates" tab and click the "Create Custom" button next to the template you want to use as a base for the new one.', 'event_espresso'), '<strong>', '</strong>' );
196
-		else
197
-			parent::no_items();
197
+		if ( $this->_view !== 'trashed' ) {
198
+					printf( __('%sNo Custom Templates found.%s To create your first custom message template, go to the "Default Message Templates" tab and click the "Create Custom" button next to the template you want to use as a base for the new one.', 'event_espresso'), '<strong>', '</strong>' );
199
+		} else {
200
+					parent::no_items();
201
+		}
198 202
 	}
199 203
 
200 204
 
Please login to merge, or discard this patch.
caffeinated/admin/extend/messages/Extend_Messages_Admin_Page.core.php 2 patches
Spacing   +22 added lines, -22 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,18 +31,18 @@  discard block
 block discarded – undo
31 31
 
32 32
 
33 33
 
34
-	public function __construct( $routing = TRUE ) {
35
-		parent::__construct( $routing );
36
-		if ( !defined( 'EE_MSG_CAF_ASSETS_PATH' ) ) {
37
-			define( 'EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/' );
38
-			define( 'EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/' );
39
-			define( 'EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/' );
40
-			define( 'EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/' );
34
+	public function __construct($routing = TRUE) {
35
+		parent::__construct($routing);
36
+		if ( ! defined('EE_MSG_CAF_ASSETS_PATH')) {
37
+			define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/assets/');
38
+			define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/assets/');
39
+			define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/templates/');
40
+			define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/templates/');
41 41
 		}
42 42
 	}
43 43
 
44 44
 	protected function _extend_page_config() {
45
-		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages';
45
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'messages';
46 46
 		$this->_page_routes['custom_mtps'] = array(
47 47
 			'func' => '_ee_custom_messages_overview_list_table',
48 48
 			'capability' => 'ee_read_messages' );
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 				'require_nonce' => FALSE
71 71
 				);
72 72
 
73
-		add_action( 'current_screen', array( $this, 'dynamic_screen_hooks' ), 10 );
73
+		add_action('current_screen', array($this, 'dynamic_screen_hooks'), 10);
74 74
 	}
75 75
 
76 76
 
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
 	public function dynamic_screen_hooks() {
88 88
 		global $admin_page_hooks;
89 89
 
90
-		if ( !empty( $admin_page_hooks['espresso_events'] ) ) {
90
+		if ( ! empty($admin_page_hooks['espresso_events'])) {
91 91
 			//we're on a EE specific page... good stuff!
92 92
 			$hook_prefix = $admin_page_hooks['espresso_events'];
93
-			$filter_ref = $hook_prefix . '_page_' . $this->page_slug;
94
-			add_filter( 'FHEE_manage_' . $filter_ref . '_columns', array( $this, 'add_custom_mtps_columns' ), 10, 2 );
95
-			add_action( 'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref, array( $this, 'custom_mtp_create_button_column'), 10, 2 );
93
+			$filter_ref = $hook_prefix.'_page_'.$this->page_slug;
94
+			add_filter('FHEE_manage_'.$filter_ref.'_columns', array($this, 'add_custom_mtps_columns'), 10, 2);
95
+			add_action('AHEE__EE_Admin_List_Table__column_actions__'.$filter_ref, array($this, 'custom_mtp_create_button_column'), 10, 2);
96 96
 		}
97 97
 	}
98 98
 
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 	 * @param array  $columns   Original defined list of columns
107 107
 	 * @param string $screen_id The unique screen id for the page.
108 108
 	 */
109
-	public function add_custom_mtps_columns( $columns, $screen_id ) {
110
-		if ( $screen_id !== 'espresso_messages_default' ) {
109
+	public function add_custom_mtps_columns($columns, $screen_id) {
110
+		if ($screen_id !== 'espresso_messages_default') {
111 111
 			return $columns;
112 112
 		}
113 113
 
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
 	 *
129 129
 	 * @return string html content for the page.
130 130
 	 */
131
-	public function custom_mtp_create_button_column( $item, $screen_id ) {
132
-		if ( $screen_id !== 'espresso_messages_default' || ! EE_Registry::instance()->CAP->current_user_can( 'ee_edit_messages', 'espresso_messages_add_new_message_template' ) ) {
131
+	public function custom_mtp_create_button_column($item, $screen_id) {
132
+		if ($screen_id !== 'espresso_messages_default' || ! EE_Registry::instance()->CAP->current_user_can('ee_edit_messages', 'espresso_messages_add_new_message_template')) {
133 133
 			return '';
134 134
 		}
135 135
 
136 136
 		//first we consider whether this template has override set.  If it does then that means no custom templates can be created from this template as a base.  So let's just skip the button creation.
137
-		if ( $item->get('MTP_is_override' ) )
137
+		if ($item->get('MTP_is_override'))
138 138
 			return '';
139 139
 
140 140
 
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
 			'message_type' => $item->message_type(),
145 145
 			'action' => 'add_new_message_template'
146 146
 			);
147
-		$create_link = EE_Admin_Page::add_query_args_and_nonce( $create_args, EE_MSG_ADMIN_URL );
148
-		echo sprintf( '<a href="%s" class="button button-small">%s</a>', $create_link, __('Create Custom', 'event_espresso') );
147
+		$create_link = EE_Admin_Page::add_query_args_and_nonce($create_args, EE_MSG_ADMIN_URL);
148
+		echo sprintf('<a href="%s" class="button button-small">%s</a>', $create_link, __('Create Custom', 'event_espresso'));
149 149
 	}
150 150
 
151 151
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 				)
179 179
 			)
180 180
 		);
181
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_messages', 'espresso_messages_trash_message_template' ) ) {
181
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_messages', 'espresso_messages_trash_message_template')) {
182 182
 			$this->_views['trashed'] = array(
183 183
 				'slug' => 'trashed',
184 184
 				'label' => __('Trash', 'event_espresso'),
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 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
@@ -134,8 +135,9 @@  discard block
 block discarded – undo
134 135
 		}
135 136
 
136 137
 		//first we consider whether this template has override set.  If it does then that means no custom templates can be created from this template as a base.  So let's just skip the button creation.
137
-		if ( $item->get('MTP_is_override' ) )
138
-			return '';
138
+		if ( $item->get('MTP_is_override' ) ) {
139
+					return '';
140
+		}
139 141
 
140 142
 
141 143
 		$create_args = array(
Please login to merge, or discard this patch.
admin/extend/registrations/EE_Registration_CheckIn_List_Table.class.php 2 patches
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
@@ -123,8 +125,9 @@  discard block
 block discarded – undo
123 125
 		}
124 126
 
125 127
 		//if no reg id then get out cause need a reg id
126
-		if ( empty( $REG_ID ) || empty( $DTT_ID ) )
127
-			throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') );
128
+		if ( empty( $REG_ID ) || empty( $DTT_ID ) ) {
129
+					throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') );
130
+		}
128 131
 
129 132
 		//set orderby
130 133
 		$orderby = 'CHK_timestamp'; //note that with this table we're only providing the option to orderby the timestamp value.
@@ -147,8 +150,9 @@  discard block
 block discarded – undo
147 150
 		$query_params = array( $_where, 'order_by' => array( $orderby => $order ), 'limit' => $limit );
148 151
 
149 152
 		//if no per_page value then we just want to return a count of all Check-ins
150
-		if ( $count )
151
-			return EEM_Checkin::instance()->count( array( $_where ) );
153
+		if ( $count ) {
154
+					return EEM_Checkin::instance()->count( array( $_where ) );
155
+		}
152 156
 
153 157
 		return $count ? EEM_Checkin::instance()->count( array( $_where ) ) : EEM_Checkin::instance()->get_all($query_params);
154 158
 	}
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 
30 30
 
31
-	public function __construct( $admin_page ) {
31
+	public function __construct($admin_page) {
32 32
 		parent::__construct($admin_page);
33 33
 	}
34 34
 
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
 
38 38
 	protected function _setup_data() {
39
-		$this->_data = $this->_get_checkins( $this->_per_page );
40
-		$this->_all_data_count = $this->_get_checkins(  $this->_per_page, TRUE );
39
+		$this->_data = $this->_get_checkins($this->_per_page);
40
+		$this->_all_data_count = $this->_get_checkins($this->_per_page, TRUE);
41 41
 	}
42 42
 
43 43
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			);
59 59
 
60 60
 		$this->_sortable_columns = array(
61
-			'CHK_timestamp' => array( 'CHK_timestamp' => TRUE )
61
+			'CHK_timestamp' => array('CHK_timestamp' => TRUE)
62 62
 			);
63 63
 
64 64
 		$this->_primary_column = 'CHK_in';
@@ -82,25 +82,25 @@  discard block
 block discarded – undo
82 82
 	}
83 83
 
84 84
 
85
-	function column_cb($item ) {
86
-		return sprintf( '<input type="checkbox" name="checkbox[%1$s]" />', $item->ID() );
85
+	function column_cb($item) {
86
+		return sprintf('<input type="checkbox" name="checkbox[%1$s]" />', $item->ID());
87 87
 	}
88 88
 
89 89
 
90
-	function column_CHK_in( EE_Checkin $item ) {
90
+	function column_CHK_in(EE_Checkin $item) {
91 91
 		$checkinstatus = $item->get('CHK_in');
92 92
 		$checkinstatus = $checkinstatus ? EE_Registration::checkin_status_in : EE_Registration::checkin_status_out;
93
-		return '<span class="checkin-icons checkedin-status-' . $checkinstatus . '"></span><span class="show-on-mobile-view-only">' . $item->get_datetime('CHK_timestamp') . '</span>';
93
+		return '<span class="checkin-icons checkedin-status-'.$checkinstatus.'"></span><span class="show-on-mobile-view-only">'.$item->get_datetime('CHK_timestamp').'</span>';
94 94
 	}
95 95
 
96 96
 
97 97
 
98
-	function column_CHK_timestamp( EE_Checkin $item ) {
98
+	function column_CHK_timestamp(EE_Checkin $item) {
99 99
 		$actions = array();
100
-		$delete_url = EE_Admin_Page::add_query_args_and_nonce( array('action' => 'delete_checkin_row', 'DTT_ID' => $this->_req_data['DTT_ID'], '_REGID' => $this->_req_data['_REGID'], 'CHK_ID' => $item->ID() ) );
101
-		$actions['delete_checkin'] = EE_Registry::instance()->CAP->current_user_can( 'ee_delete_checkins', 'espresso_registrations_delete_checkin_row' ) ? '<a href="' . $delete_url . '" title="' . esc_attr__('Click here to delete this check-in record', 'event_espresso') . '">' . __('Delete', 'event_espresso') . '</a>' : '';
100
+		$delete_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'delete_checkin_row', 'DTT_ID' => $this->_req_data['DTT_ID'], '_REGID' => $this->_req_data['_REGID'], 'CHK_ID' => $item->ID()));
101
+		$actions['delete_checkin'] = EE_Registry::instance()->CAP->current_user_can('ee_delete_checkins', 'espresso_registrations_delete_checkin_row') ? '<a href="'.$delete_url.'" title="'.esc_attr__('Click here to delete this check-in record', 'event_espresso').'">'.__('Delete', 'event_espresso').'</a>' : '';
102 102
 
103
-		return sprintf( '%1$s %2$s', $item->get_datetime('CHK_timestamp'), $this->row_actions($actions) );
103
+		return sprintf('%1$s %2$s', $item->get_datetime('CHK_timestamp'), $this->row_actions($actions));
104 104
 	}
105 105
 
106 106
 
@@ -115,30 +115,30 @@  discard block
 block discarded – undo
115 115
 	 * @param bool    $count        Whether to return a count or not
116 116
 	 * @return EE_Checkin[]|int
117 117
 	 */
118
-	protected function _get_checkins( $per_page = 10, $count = FALSE ) {
119
-		$REG_ID = isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : FALSE;
120
-		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : FALSE;
118
+	protected function _get_checkins($per_page = 10, $count = FALSE) {
119
+		$REG_ID = isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : FALSE;
120
+		$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : FALSE;
121 121
 
122 122
 		//if user does not have the capability for the checkins for this registration then get out!
123
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkin', 'espresso_registrations_registration_checkins', $REG_ID ) ) {
123
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_checkin', 'espresso_registrations_registration_checkins', $REG_ID)) {
124 124
 			return $count ? 0 : array();
125 125
 		}
126 126
 
127 127
 		//if no reg id then get out cause need a reg id
128
-		if ( empty( $REG_ID ) || empty( $DTT_ID ) )
129
-			throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') );
128
+		if (empty($REG_ID) || empty($DTT_ID))
129
+			throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso'));
130 130
 
131 131
 		//set orderby
132 132
 		$orderby = 'CHK_timestamp'; //note that with this table we're only providing the option to orderby the timestamp value.
133 133
 
134
-		$order = !empty( $this->_req_data['order'] ) ? $this->_req_data['order'] : 'ASC';
134
+		$order = ! empty($this->_req_data['order']) ? $this->_req_data['order'] : 'ASC';
135 135
 
136
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
137
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
136
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
137
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
138 138
 		$limit = NULL;
139
-		if ( !$count ) {
140
-			$offset = ($current_page-1)*$per_page;
141
-			$limit = array( $offset, $per_page );
139
+		if ( ! $count) {
140
+			$offset = ($current_page - 1) * $per_page;
141
+			$limit = array($offset, $per_page);
142 142
 		}
143 143
 
144 144
 		$_where = array(
@@ -146,13 +146,13 @@  discard block
 block discarded – undo
146 146
 			'DTT_ID' => $DTT_ID
147 147
 			);
148 148
 
149
-		$query_params = array( $_where, 'order_by' => array( $orderby => $order ), 'limit' => $limit );
149
+		$query_params = array($_where, 'order_by' => array($orderby => $order), 'limit' => $limit);
150 150
 
151 151
 		//if no per_page value then we just want to return a count of all Check-ins
152
-		if ( $count )
153
-			return EEM_Checkin::instance()->count( array( $_where ) );
152
+		if ($count)
153
+			return EEM_Checkin::instance()->count(array($_where));
154 154
 
155
-		return $count ? EEM_Checkin::instance()->count( array( $_where ) ) : EEM_Checkin::instance()->get_all($query_params);
155
+		return $count ? EEM_Checkin::instance()->count(array($_where)) : EEM_Checkin::instance()->get_all($query_params);
156 156
 	}
157 157
 
158 158
 } //end class EE_Registration_CheckIn_List_Table
Please login to merge, or discard this patch.
admin/extend/registrations/Extend_EE_Registrations_List_Table.class.php 3 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
 	/**
32 32
 	 * 		REG_date
33 33
 	*/
34
-	function column_REG_date(EE_Registration $item){
34
+	function column_REG_date(EE_Registration $item) {
35 35
 
36 36
 		//Build row actions
37 37
 		$actions = array();
38 38
 
39 39
 		//Build row actions
40
-		$check_in_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'event_registrations', 'event_id'=>$item->event_ID() ), REG_ADMIN_URL );
41
-		$actions['check_in'] = EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkin', 'espresso_registrations_registration_checkins', $item->ID() ) ? '
42
-			<a href="'.$check_in_url.'" title="' . esc_attr__( 'The Check-In List allows you to easily toggle check-in status for this event', 'event_espresso' ) . '">' . __( 'View Check-ins', 'event_espresso' ) . '</a>' : __( 'View Check-ins', 'event_espresso' );
40
+		$check_in_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'event_registrations', 'event_id'=>$item->event_ID()), REG_ADMIN_URL);
41
+		$actions['check_in'] = EE_Registry::instance()->CAP->current_user_can('ee_read_checkin', 'espresso_registrations_registration_checkins', $item->ID()) ? '
42
+			<a href="'.$check_in_url.'" title="'.esc_attr__('The Check-In List allows you to easily toggle check-in status for this event', 'event_espresso').'">'.__('View Check-ins', 'event_espresso').'</a>' : __('View Check-ins', 'event_espresso');
43 43
 
44
-		$view_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$item->transaction()->ID() ), TXN_ADMIN_URL );
45
-		$REG_date = EE_Regisry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction' ) ?  '<a href="'.$view_lnk_url.'" title="' . esc_attr__( 'View Transaction Details', 'event_espresso' ) . '">' . $item->get_i18n_datetime( 'REG_date' ) . '</a>' : $item->get_i18n_datetime( 'REG_date' );
44
+		$view_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$item->transaction()->ID()), TXN_ADMIN_URL);
45
+		$REG_date = EE_Regisry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '<a href="'.$view_lnk_url.'" title="'.esc_attr__('View Transaction Details', 'event_espresso').'">'.$item->get_i18n_datetime('REG_date').'</a>' : $item->get_i18n_datetime('REG_date');
46 46
 
47
-		return sprintf('%1$s %2$s', $REG_date, $this->row_actions($actions) );
47
+		return sprintf('%1$s %2$s', $REG_date, $this->row_actions($actions));
48 48
 
49 49
 	}
50 50
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	/**
55 55
 	 * 		column_default
56 56
 	*/
57
-   	function column_DTT_EVT_start(EE_Registration $item){
57
+   	function column_DTT_EVT_start(EE_Registration $item) {
58 58
 		$datetime_strings = array();
59 59
 		$remove_defaults = array('default_where_conditions' => 'none');
60 60
 		$ticket = $item->ticket();
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
 			'action'=>'event_registrations',
64 64
 			'event_id'=>$item->event_ID()
65 65
 			);
66
-		foreach($datetimes as $datetime){
66
+		foreach ($datetimes as $datetime) {
67 67
 			$query_args['DTT_ID'] = $datetime->ID();
68
-			$checkin_url = EE_Admin_Page::add_query_args_and_nonce( $query_args, REG_ADMIN_URL );
69
-			$datetime_strings[] = EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkin', 'espresso_registrations_registration_checkins', $item->ID() ) ? '<a href="' . $checkin_url . '" title="' . esc_attr__( 'View Checkins for this Event', 'event_espresso' ) . '">' . $datetime->get_i18n_datetime( 'DTT_EVT_start' ) . '</a>' : $datetime->get_i18n_datetime( 'DTT_EVT_start' );
68
+			$checkin_url = EE_Admin_Page::add_query_args_and_nonce($query_args, REG_ADMIN_URL);
69
+			$datetime_strings[] = EE_Registry::instance()->CAP->current_user_can('ee_read_checkin', 'espresso_registrations_registration_checkins', $item->ID()) ? '<a href="'.$checkin_url.'" title="'.esc_attr__('View Checkins for this Event', 'event_espresso').'">'.$datetime->get_i18n_datetime('DTT_EVT_start').'</a>' : $datetime->get_i18n_datetime('DTT_EVT_start');
70 70
 		}
71
-		return implode("<br />",$datetime_strings);
71
+		return implode("<br />", $datetime_strings);
72 72
     }
73 73
 
74 74
 
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.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 	/**
32 32
 	 * 		REG_date
33
-	*/
33
+	 */
34 34
 	function column_REG_date(EE_Registration $item){
35 35
 
36 36
 		//Build row actions
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
 	/**
55 55
 	 * 		column_default
56
-	*/
56
+	 */
57 57
    	function column_DTT_EVT_start(EE_Registration $item){
58 58
 		$datetime_strings = array();
59 59
 		$remove_defaults = array('default_where_conditions' => 'none');
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			$datetime_strings[] = EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkin', 'espresso_registrations_registration_checkins', $item->ID() ) ? '<a href="' . $checkin_url . '" title="' . esc_attr__( 'View Checkins for this Event', 'event_espresso' ) . '">' . $datetime->get_i18n_datetime( 'DTT_EVT_start' ) . '</a>' : $datetime->get_i18n_datetime( 'DTT_EVT_start' );
70 70
 		}
71 71
 		return implode("<br />",$datetime_strings);
72
-    }
72
+	}
73 73
 
74 74
 
75 75
 
Please login to merge, or discard this patch.
admin/extend/registrations/Extend_Registrations_Admin_Page.core.php 4 patches
Braces   +6 added lines, -4 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
@@ -679,8 +680,9 @@  discard block
 block discarded – undo
679 680
 			EE_Error::add_error(__('Missing some required data to toggle the Check-in', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__  );
680 681
 		}
681 682
 
682
-		if ( defined('DOING_AJAX' ) )
683
-			return $new_status;
683
+		if ( defined('DOING_AJAX' ) ) {
684
+					return $new_status;
685
+		}
684 686
 
685 687
 		$this->_redirect_after_action( FALSE,'', '', $query_args, TRUE );
686 688
 
@@ -918,7 +920,7 @@  discard block
 block discarded – undo
918 920
 		$query_params['force_join'] = array('Attendee');//force join to attendee model so that it gets cached, because we're going to need the attendee for each registration
919 921
 		if($count){
920 922
 			$registrations = EEM_Registration::instance()->count(array($query_params[0]));
921
-		}else{
923
+		} else{
922 924
 			$registrations = EEM_Registration::instance()->get_all($query_params);
923 925
 
924 926
 
Please login to merge, or discard this patch.
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -631,8 +631,6 @@
 block discarded – undo
631 631
 	/**
632 632
 	 * 		handles toggleing the checkin status for the registration,
633 633
 	*		@access protected
634
-	*		@param boolean 	$check_in
635
-	*		@return void
636 634
 	*/
637 635
 	protected function _toggle_checkin_status() {
638 636
 		//first let's get the query args out of the way for the redirect
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -453,9 +453,9 @@  discard block
 block discarded – undo
453 453
 
454 454
 	/**
455 455
 	 * 		generates Business Reports regarding Registrations
456
-	*		@access protected
457
-	*		@return void
458
-	*/
456
+	 *		@access protected
457
+	 *		@return void
458
+	 */
459 459
 	protected function _registration_reports() {
460 460
 		$template_path = EE_ADMIN_TEMPLATE . 'admin_reports.template.php';
461 461
 		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, $this->_reports_template_data, true );
@@ -630,10 +630,10 @@  discard block
 block discarded – undo
630 630
 
631 631
 	/**
632 632
 	 * 		handles toggleing the checkin status for the registration,
633
-	*		@access protected
634
-	*		@param boolean 	$check_in
635
-	*		@return void
636
-	*/
633
+	 *		@access protected
634
+	 *		@param boolean 	$check_in
635
+	 *		@return void
636
+	 */
637 637
 	protected function _toggle_checkin_status() {
638 638
 		//first let's get the query args out of the way for the redirect
639 639
 		$query_args = array(
@@ -754,9 +754,9 @@  discard block
 block discarded – undo
754 754
 
755 755
 	/**
756 756
 	 * 		generates HTML for the Event Registrations List Table
757
-	*		@access protected
758
-	*		@return void
759
-	*/
757
+	 *		@access protected
758
+	 *		@return void
759
+	 */
760 760
 	protected function _event_registrations_list_table() {
761 761
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
762 762
 		$this->_admin_page_title .= isset( $this->_req_data['event_id'] ) ? $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $this->_req_data['event_id']), 'add-new-h2') : '';
@@ -786,11 +786,11 @@  discard block
 block discarded – undo
786 786
 				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_approved,
787 787
 				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_approved, FALSE, 'sentence' )
788 788
 				),
789
-            'cancelled_status' => array(
789
+			'cancelled_status' => array(
790 790
 				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_cancelled,
791 791
 				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, FALSE, 'sentence' )
792 792
 				),
793
-            'declined_status' => array(
793
+			'declined_status' => array(
794 794
 				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_declined,
795 795
 				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_declined, FALSE, 'sentence' )
796 796
 				),
@@ -818,9 +818,9 @@  discard block
 block discarded – undo
818 818
 	/**
819 819
 	 * 		get_attendees
820 820
 	 * 		@param bool $count whether to return count or data.
821
-	*		@access public
822
-	*		@return array
823
-	*/
821
+	 *		@access public
822
+	 *		@return array
823
+	 */
824 824
 	public function get_event_attendees( $per_page = 10, $count = FALSE, $trash = FALSE, $orderby = '' ) {
825 825
 
826 826
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
Please login to merge, or discard this patch.
Spacing   +216 added lines, -216 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 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
 /**
@@ -37,20 +37,20 @@  discard block
 block discarded – undo
37 37
 	protected $_reports_template_data = array();
38 38
 
39 39
 
40
-	public function __construct( $routing = TRUE ) {
41
-		parent::__construct( $routing );
42
-		define( 'REG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'registrations/templates/');
43
-		define( 'REG_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND . 'registrations/assets/');
44
-		define( 'REG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'registrations/assets/');
40
+	public function __construct($routing = TRUE) {
41
+		parent::__construct($routing);
42
+		define('REG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'registrations/templates/');
43
+		define('REG_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND.'registrations/assets/');
44
+		define('REG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'registrations/assets/');
45 45
 	}
46 46
 
47 47
 
48 48
 	protected function _extend_page_config() {
49
-		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'registrations';
49
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'registrations';
50 50
 
51
-		$reg_id = ! empty( $this->_req_data['_REG_ID'] ) && ! is_array( $this->_req_data['_REG_ID'] ) ? $this->_req_data['_REG_ID'] : 0;
52
-		$att_id = ! empty( $this->_req_data[ 'ATT_ID' ] ) ? ! is_array( $this->_req_data['ATT_ID'] ) : 0;
53
-		$att_id = ! empty( $this->_req_data['post'] ) && ! is_array( $this->_req_data['post'] ) ? $this->_req_data['post'] : $att_id;
51
+		$reg_id = ! empty($this->_req_data['_REG_ID']) && ! is_array($this->_req_data['_REG_ID']) ? $this->_req_data['_REG_ID'] : 0;
52
+		$att_id = ! empty($this->_req_data['ATT_ID']) ? ! is_array($this->_req_data['ATT_ID']) : 0;
53
+		$att_id = ! empty($this->_req_data['post']) && ! is_array($this->_req_data['post']) ? $this->_req_data['post'] : $att_id;
54 54
 
55 55
 		$new_page_routes = array(
56 56
 			'reports' => array(
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 				)
90 90
 			);
91 91
 
92
-		$this->_page_routes = array_merge( $this->_page_routes, $new_page_routes );
92
+		$this->_page_routes = array_merge($this->_page_routes, $new_page_routes);
93 93
 
94 94
 		$new_page_config = array(
95 95
 			'reports' => array(
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 						'filename' => 'registrations_event_checkin_other'
135 135
 					)
136 136
 				),
137
-				'help_tour' => array( 'Event_Checkin_Help_Tour' ),
138
-				'qtips' => array('Registration_List_Table_Tips' ),
137
+				'help_tour' => array('Event_Checkin_Help_Tour'),
138
+				'qtips' => array('Registration_List_Table_Tips'),
139 139
 				'list_table' => 'EE_Event_Registrations_List_Table',
140 140
 				'metaboxes' => array(),
141 141
 				'require_nonce' => FALSE
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 		// var_dump($this->_req_data);
157 157
 		// exit();
158 158
 
159
-		$this->_page_config = array_merge( $this->_page_config, $new_page_config );
159
+		$this->_page_config = array_merge($this->_page_config, $new_page_config);
160 160
 		$this->_page_config['contact_list']['list_table'] = 'Extend_EE_Attendee_Contact_List_Table';
161 161
 		$this->_page_config['default']['list_table'] = 'Extend_EE_Registrations_List_Table';
162 162
 	}
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
 	protected function _ajax_hooks() {
167 167
 		parent::_ajax_hooks();
168
-		add_action('wp_ajax_get_newsletter_form_content', array( $this, 'get_newsletter_form_content') );
168
+		add_action('wp_ajax_get_newsletter_form_content', array($this, 'get_newsletter_form_content'));
169 169
 	}
170 170
 
171 171
 
@@ -175,20 +175,20 @@  discard block
 block discarded – undo
175 175
 
176 176
 		//if newsletter message type is active then let's add filter and load js for it.
177 177
 		EE_Registry::instance()->load_helper('MSG_Template');
178
-		if ( EEH_MSG_Template::is_mt_active('newsletter') ) {
178
+		if (EEH_MSG_Template::is_mt_active('newsletter')) {
179 179
 			//enqueue newsletter js
180
-			wp_enqueue_script( 'ee-newsletter-trigger', REG_CAF_ASSETS_URL . 'ee-newsletter-trigger.js', array( 'ee-dialog'), EVENT_ESPRESSO_VERSION, TRUE );
181
-			wp_enqueue_style( 'ee-newsletter-trigger-css', REG_CAF_ASSETS_URL . 'ee-newsletter-trigger.css', array(), EVENT_ESPRESSO_VERSION );
180
+			wp_enqueue_script('ee-newsletter-trigger', REG_CAF_ASSETS_URL.'ee-newsletter-trigger.js', array('ee-dialog'), EVENT_ESPRESSO_VERSION, TRUE);
181
+			wp_enqueue_style('ee-newsletter-trigger-css', REG_CAF_ASSETS_URL.'ee-newsletter-trigger.css', array(), EVENT_ESPRESSO_VERSION);
182 182
 			//hook in buttons for newsletter message type trigger.
183
-			add_action('AHEE__EE_Admin_List_Table__extra_tablenav__after_bottom_buttons', array( $this, 'add_newsletter_action_buttons'), 10 );
183
+			add_action('AHEE__EE_Admin_List_Table__extra_tablenav__after_bottom_buttons', array($this, 'add_newsletter_action_buttons'), 10);
184 184
 		}
185 185
 	}
186 186
 
187 187
 
188 188
 
189 189
 	public function load_scripts_styles_reports() {
190
-		wp_register_script( 'ee-reg-reports-js', REG_CAF_ASSETS_URL . 'ee-registration-admin-reports.js', array( 'google-charts' ), EVENT_ESPRESSO_VERSION, true );
191
-		wp_enqueue_script( 'ee-reg-reports-js' );
190
+		wp_register_script('ee-reg-reports-js', REG_CAF_ASSETS_URL.'ee-registration-admin-reports.js', array('google-charts'), EVENT_ESPRESSO_VERSION, true);
191
+		wp_enqueue_script('ee-reg-reports-js');
192 192
 		$this->_registration_reports_js_setup();
193 193
 	}
194 194
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 				'slug' => 'all',
221 221
 				'label' => __('All', 'event_espresso'),
222 222
 				'count' => 0,
223
-				'bulk_action' => !isset( $this->_req_data['event_id'] ) ? array() : array(
223
+				'bulk_action' => ! isset($this->_req_data['event_id']) ? array() : array(
224 224
 					'toggle_checkin_status' => __('Toggle Check-In', 'event_espresso'),
225 225
 					//'trash_registrations' => __('Trash Registrations', 'event_espresso')
226 226
 					)
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 				'slug' => 'all',
239 239
 				'label' => __('All', 'event_espresso'),
240 240
 				'count' => 0,
241
-				'bulk_action' => array( 'delete_checkin_rows' => __('Delete Check-In Rows', 'event_espresso') )
241
+				'bulk_action' => array('delete_checkin_rows' => __('Delete Check-In Rows', 'event_espresso'))
242 242
 				),
243 243
 			);
244 244
 	}
@@ -254,20 +254,20 @@  discard block
 block discarded – undo
254 254
 	 */
255 255
 	public function get_newsletter_form_content() {
256 256
 		//do a nonce check cause we're not coming in from an normal route here.
257
-		$nonce = isset( $this->_req_data['get_newsletter_form_content_nonce'] ) ? sanitize_text_field( $this->_req_data['get_newsletter_form_content_nonce'] ) : '';
257
+		$nonce = isset($this->_req_data['get_newsletter_form_content_nonce']) ? sanitize_text_field($this->_req_data['get_newsletter_form_content_nonce']) : '';
258 258
 		$nonce_ref = 'get_newsletter_form_content_nonce';
259 259
 
260
-		$this->_verify_nonce( $nonce, $nonce_ref );
260
+		$this->_verify_nonce($nonce, $nonce_ref);
261 261
 		//let's get the mtp for the incoming MTP_ ID
262
-		if ( !isset( $this->_req_data['GRP_ID'] ) ) {
263
-			EE_Error::add_error( __('There must be something broken with the js or html structure because the required data for getting a message template group is not present (need an GRP_ID).', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
262
+		if ( ! isset($this->_req_data['GRP_ID'])) {
263
+			EE_Error::add_error(__('There must be something broken with the js or html structure because the required data for getting a message template group is not present (need an GRP_ID).', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
264 264
 			$this->_template_args['success'] = FALSE;
265 265
 			$this->_template_args['error'] = TRUE;
266 266
 			$this->_return_json();
267 267
 		}
268
-		$MTPG = EEM_Message_Template_Group::instance()->get_one_by_ID( $this->_req_data['GRP_ID'] );
269
-		if ( ! $MTPG instanceof EE_Message_Template_Group ) {
270
-			EE_Error::add_error( sprintf( __('The GRP_ID given (%d) does not appear to have a corresponding row in the database.', 'event_espresso'), $this->_req_data['GRP_ID'] ), __FILE__, __FUNCTION__, __LINE__  );
268
+		$MTPG = EEM_Message_Template_Group::instance()->get_one_by_ID($this->_req_data['GRP_ID']);
269
+		if ( ! $MTPG instanceof EE_Message_Template_Group) {
270
+			EE_Error::add_error(sprintf(__('The GRP_ID given (%d) does not appear to have a corresponding row in the database.', 'event_espresso'), $this->_req_data['GRP_ID']), __FILE__, __FUNCTION__, __LINE__);
271 271
 			$this->_template_args['success'] = FALSE;
272 272
 			$this->_template_args['error'] = TRUE;
273 273
 			$this->_return_json();
@@ -276,11 +276,11 @@  discard block
 block discarded – undo
276 276
 		$MTPs = $MTPG->context_templates();
277 277
 		$MTPs = $MTPs['attendee'];
278 278
 		$template_fields = array();
279
-		foreach ( $MTPs as $MTP ) {
279
+		foreach ($MTPs as $MTP) {
280 280
 			$field = $MTP->get('MTP_template_field');
281
-			if ( $field == 'content'  ) {
281
+			if ($field == 'content') {
282 282
 				$content = $MTP->get('MTP_content');
283
-				if ( !empty( $content['newsletter_content'] ) ) {
283
+				if ( ! empty($content['newsletter_content'])) {
284 284
 					$template_fields['newsletter_content'] = $content['newsletter_content'];
285 285
 					}
286 286
 				continue;
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 		$this->_template_args['data'] = array(
294 294
 			'batch_message_from' => isset($template_fields['from']) ? $template_fields['from'] : '',
295 295
 			'batch_message_subject' => isset($template_fields['subject']) ? $template_fields['subject'] : '',
296
-			'batch_message_content' => isset( $template_fields['newsletter_content'] ) ? $template_fields['newsletter_content'] : ''
296
+			'batch_message_content' => isset($template_fields['newsletter_content']) ? $template_fields['newsletter_content'] : ''
297 297
 			);
298 298
 		$this->_return_json();
299 299
 	}
@@ -309,8 +309,8 @@  discard block
 block discarded – undo
309 309
 	 * @param EE_Admin_List_Table $list_table
310 310
 	 * @return string html string for extra buttons
311 311
 	 */
312
-	public function add_newsletter_action_buttons( EE_Admin_List_Table $list_table ) {
313
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_newsletter_selected_send' ) ) {
312
+	public function add_newsletter_action_buttons(EE_Admin_List_Table $list_table) {
313
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_newsletter_selected_send')) {
314 314
 			return '';
315 315
 		}
316 316
 
@@ -319,13 +319,13 @@  discard block
 block discarded – undo
319 319
 			'event_registrations',
320 320
 			'default'
321 321
 			);
322
-		if ( $this->_current_page == 'espresso_registrations' && in_array( $this->_req_action, $routes_to_add_to )  ) {
323
-			if ( ( $this->_req_action == 'event_registrations' && empty( $this->_req_data['event_id'] ) ) || ( isset( $this->_req_data['status'] ) && $this->_req_data['status'] == 'trash' ) ) {
322
+		if ($this->_current_page == 'espresso_registrations' && in_array($this->_req_action, $routes_to_add_to)) {
323
+			if (($this->_req_action == 'event_registrations' && empty($this->_req_data['event_id'])) || (isset($this->_req_data['status']) && $this->_req_data['status'] == 'trash')) {
324 324
 				echo '';
325 325
 			} else {
326
-				$button_text = sprintf( __('Send Batch Message (%s selected)', 'event_espresso'), '<span class="send-selected-newsletter-count">0</span>' );
327
-				echo '<button id="selected-batch-send-trigger" class="button secondary-button"><span class="dashicons dashicons-email "></span>' . $button_text . '</button>';
328
-				add_action('admin_footer', array( $this, 'newsletter_send_form_skeleton') );
326
+				$button_text = sprintf(__('Send Batch Message (%s selected)', 'event_espresso'), '<span class="send-selected-newsletter-count">0</span>');
327
+				echo '<button id="selected-batch-send-trigger" class="button secondary-button"><span class="dashicons dashicons-email "></span>'.$button_text.'</button>';
328
+				add_action('admin_footer', array($this, 'newsletter_send_form_skeleton'));
329 329
 			}
330 330
 		}
331 331
 	}
@@ -337,38 +337,38 @@  discard block
 block discarded – undo
337 337
 		$list_table = $this->_list_table_object;
338 338
 		$codes = array();
339 339
 		//need to templates for the newsletter message type for the template selector.
340
-		$values[] = array( 'text' => __('Select Template to Use', 'event_espresso'), 'id' => 0 );
341
-		$mtps = EEM_Message_Template_Group::instance()->get_all( array( array( 'MTP_message_type' => 'newsletter', 'MTP_messenger' => 'email' ) ) );
342
-		foreach ( $mtps as $mtp ) {
340
+		$values[] = array('text' => __('Select Template to Use', 'event_espresso'), 'id' => 0);
341
+		$mtps = EEM_Message_Template_Group::instance()->get_all(array(array('MTP_message_type' => 'newsletter', 'MTP_messenger' => 'email')));
342
+		foreach ($mtps as $mtp) {
343 343
 			$name = $mtp->name();
344 344
 			$values[] = array(
345
-				'text' => empty( $name ) ? __('Global', 'event_espresso') : $name,
345
+				'text' => empty($name) ? __('Global', 'event_espresso') : $name,
346 346
 				'id' => $mtp->ID()
347 347
 				);
348 348
 		}
349 349
 
350 350
 		//need to get a list of shortcodes that are available for the newsletter message type.
351 351
 		EE_Registry::instance()->load_helper('MSG_Template');
352
-		$shortcodes = EEH_MSG_Template::get_shortcodes( 'newsletter', 'email', array(), 'attendee', FALSE );
353
-		foreach ( $shortcodes as $field => $shortcode_array ) {
354
-			$codes[$field] = implode(', ', array_keys($shortcode_array ) );
352
+		$shortcodes = EEH_MSG_Template::get_shortcodes('newsletter', 'email', array(), 'attendee', FALSE);
353
+		foreach ($shortcodes as $field => $shortcode_array) {
354
+			$codes[$field] = implode(', ', array_keys($shortcode_array));
355 355
 		}
356 356
 
357 357
 		$shortcodes = $codes;
358 358
 
359
-		$form_template = REG_CAF_TEMPLATE_PATH . 'newsletter-send-form.template.php';
359
+		$form_template = REG_CAF_TEMPLATE_PATH.'newsletter-send-form.template.php';
360 360
 		$form_template_args = array(
361 361
 			'form_action' => admin_url('admin.php?page=espresso_registrations'),
362 362
 			'form_route' => 'newsletter_selected_send',
363 363
 			'form_nonce_name' => 'newsletter_selected_send_nonce',
364
-			'form_nonce' => wp_create_nonce( 'newsletter_selected_send_nonce' ),
364
+			'form_nonce' => wp_create_nonce('newsletter_selected_send_nonce'),
365 365
 			'redirect_back_to' => $this->_req_action,
366
-			'ajax_nonce' => wp_create_nonce( 'get_newsletter_form_content_nonce'),
367
-			'template_selector' => EEH_Form_Fields::select_input('newsletter_mtp_selected', $values ),
366
+			'ajax_nonce' => wp_create_nonce('get_newsletter_form_content_nonce'),
367
+			'template_selector' => EEH_Form_Fields::select_input('newsletter_mtp_selected', $values),
368 368
 			'shortcodes' => $shortcodes,
369 369
 			'id_type' => $list_table instanceof EE_Attendee_Contact_List_Table ? 'contact' : 'registration'
370 370
 			);
371
-		EEH_Template::display_template( $form_template, $form_template_args );
371
+		EEH_Template::display_template($form_template, $form_template_args);
372 372
 	}
373 373
 
374 374
 
@@ -383,35 +383,35 @@  discard block
 block discarded – undo
383 383
 	protected function _newsletter_selected_send() {
384 384
 		$success = TRUE;
385 385
 		//first we need to make sure we have a GRP_ID so we know what template we're sending and updating!
386
-		if ( empty( $this->_req_data['newsletter_mtp_selected'] ) ) {
387
-			EE_Error::add_error( __('In order to send a message, a Message Template GRP_ID is needed. It was not provided so messages were not sent.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
386
+		if (empty($this->_req_data['newsletter_mtp_selected'])) {
387
+			EE_Error::add_error(__('In order to send a message, a Message Template GRP_ID is needed. It was not provided so messages were not sent.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
388 388
 			$success = FALSE;
389 389
 		}
390 390
 
391
-		if ( $success ) {
391
+		if ($success) {
392 392
 			//update Message template in case there are any changes
393
-			$MTPG = EEM_Message_Template_Group::instance()->get_one_by_ID( $this->_req_data['newsletter_mtp_selected'] );
393
+			$MTPG = EEM_Message_Template_Group::instance()->get_one_by_ID($this->_req_data['newsletter_mtp_selected']);
394 394
 			$MTPs = $MTPG instanceof EE_Message_Template_Group ? $MTPG->context_templates() : array();
395
-			if ( empty( $MTPs ) ) {
396
-				EE_Error::add_error( __('Unable to retrieve message template fields from the db. Messages not sent.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
395
+			if (empty($MTPs)) {
396
+				EE_Error::add_error(__('Unable to retrieve message template fields from the db. Messages not sent.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
397 397
 				$success = FALSE;
398 398
 			}
399 399
 
400 400
 			//let's just update the specific fields
401
-			foreach ( $MTPs['attendee'] as $MTP ) {
401
+			foreach ($MTPs['attendee'] as $MTP) {
402 402
 				$field = $MTP->get('MTP_template_field');
403 403
 				$content = $MTP->get('MTP_content');
404 404
 				$new_content = $content;
405
-				switch( $field ) {
405
+				switch ($field) {
406 406
 					case 'from' :
407
-						$new_content = !empty( $this->_req_data['batch_message']['from'] ) ? $this->_req_data['batch_message']['from'] : $content;
407
+						$new_content = ! empty($this->_req_data['batch_message']['from']) ? $this->_req_data['batch_message']['from'] : $content;
408 408
 						break;
409 409
 					case 'subject' :
410
-						$new_content = !empty( $this->_req_data['batch_message']['subject'] ) ? $this->_req_data['batch_message']['subject'] : $content;
410
+						$new_content = ! empty($this->_req_data['batch_message']['subject']) ? $this->_req_data['batch_message']['subject'] : $content;
411 411
 						break;
412 412
 					case 'content' :
413 413
 						$new_content = $content;
414
-						$new_content['newsletter_content'] = !empty( $this->_req_data['batch_message']['content'] ) ? $this->_req_data['batch_message']['content'] : $content['newsletter_content'];
414
+						$new_content['newsletter_content'] = ! empty($this->_req_data['batch_message']['content']) ? $this->_req_data['batch_message']['content'] : $content['newsletter_content'];
415 415
 						break;
416 416
 					default :
417 417
 						continue;
@@ -422,20 +422,20 @@  discard block
 block discarded – undo
422 422
 			}
423 423
 
424 424
 			//great fields are updated!  now let's make sure we just have contact objects (EE_Attendee).
425
-			$id_type = !empty( $this->_req_data['batch_message']['id_type'] ) ? $this->_req_data['batch_message']['id_type'] : 'registration';
425
+			$id_type = ! empty($this->_req_data['batch_message']['id_type']) ? $this->_req_data['batch_message']['id_type'] : 'registration';
426 426
 
427 427
 			//id_type will affect how we assemble the ids.
428
-			$ids = !empty( $this->_req_data['batch_message']['ids'] ) ? json_decode( stripslashes($this->_req_data['batch_message']['ids']) ) : array();
428
+			$ids = ! empty($this->_req_data['batch_message']['ids']) ? json_decode(stripslashes($this->_req_data['batch_message']['ids'])) : array();
429 429
 
430
-			$contacts = $id_type == 'registration' ? EEM_Attendee::instance()->get_array_of_contacts_from_reg_ids( $ids ) : EEM_Attendee::instance()->get_all( array( array( 'ATT_ID' => array('in', $ids ) ) ) );
430
+			$contacts = $id_type == 'registration' ? EEM_Attendee::instance()->get_array_of_contacts_from_reg_ids($ids) : EEM_Attendee::instance()->get_all(array(array('ATT_ID' => array('in', $ids))));
431 431
 
432 432
 			//we do _action because ALL triggers are handled in EED_Messages.
433
-			do_action('AHEE__Extend_Registrations_Admin_Page___newsletter_selected_send', $contacts, $MTPG->ID() );
433
+			do_action('AHEE__Extend_Registrations_Admin_Page___newsletter_selected_send', $contacts, $MTPG->ID());
434 434
 		}
435 435
 		$query_args = array(
436
-			'action' => !empty( $this->_req_data['redirect_back_to'] ) ? $this->_req_data['redirect_back_to'] : 'default'
436
+			'action' => ! empty($this->_req_data['redirect_back_to']) ? $this->_req_data['redirect_back_to'] : 'default'
437 437
 			);
438
-		$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
438
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
439 439
 	}
440 440
 
441 441
 
@@ -457,8 +457,8 @@  discard block
 block discarded – undo
457 457
 	*		@return void
458 458
 	*/
459 459
 	protected function _registration_reports() {
460
-		$template_path = EE_ADMIN_TEMPLATE . 'admin_reports.template.php';
461
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, $this->_reports_template_data, true );
460
+		$template_path = EE_ADMIN_TEMPLATE.'admin_reports.template.php';
461
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, $this->_reports_template_data, true);
462 462
 		// the final template wrapper
463 463
 		$this->display_admin_page_with_no_sidebar();
464 464
 
@@ -471,41 +471,41 @@  discard block
 block discarded – undo
471 471
 	 *
472 472
 	 * @return string
473 473
 	 */
474
-	private function _registrations_per_day_report( $period = '-1 month' ) {
474
+	private function _registrations_per_day_report($period = '-1 month') {
475 475
 		$report_ID = 'reg-admin-registrations-per-day-report-dv';
476 476
 
477 477
 		$REG = EEM_Registration::instance();
478 478
 
479
-		$results = $REG->get_registrations_per_day_report( $period );
479
+		$results = $REG->get_registrations_per_day_report($period);
480 480
 
481 481
 		$results = (array) $results;
482 482
 		$regs = array();
483 483
 		$subtitle = '';
484 484
 
485
-		if( $results ) {
486
-			$regs[] = array( __( 'Date (only days with registrations are shown)', 'event_espresso' ), __('Total Registrations', 'event_espresso' ) );
487
-			foreach ( $results as $result ) {
488
-				$regs[] = array( $result->regDate, (int) $result->total );
485
+		if ($results) {
486
+			$regs[] = array(__('Date (only days with registrations are shown)', 'event_espresso'), __('Total Registrations', 'event_espresso'));
487
+			foreach ($results as $result) {
488
+				$regs[] = array($result->regDate, (int) $result->total);
489 489
 			}
490 490
 
491 491
 			//setup the date range.
492
-			EE_Registry::instance()->load_helper( 'DTT_Helper' );
493
-			$beginning_date = new DateTime( "now " . $period, new DateTimeZone( EEH_DTT_Helper::get_timezone() ) );
494
-			$ending_date = new DateTime( "now", new DateTimeZone( EEH_DTT_Helper::get_timezone() ) );
495
-			$subtitle = sprintf( _x( 'For the period: %s to %s', 'Used to give date range', 'event_espresso' ), $beginning_date->format( 'Y-m-d' ), $ending_date->format( 'Y-m-d' ) );
492
+			EE_Registry::instance()->load_helper('DTT_Helper');
493
+			$beginning_date = new DateTime("now ".$period, new DateTimeZone(EEH_DTT_Helper::get_timezone()));
494
+			$ending_date = new DateTime("now", new DateTimeZone(EEH_DTT_Helper::get_timezone()));
495
+			$subtitle = sprintf(_x('For the period: %s to %s', 'Used to give date range', 'event_espresso'), $beginning_date->format('Y-m-d'), $ending_date->format('Y-m-d'));
496 496
 		}
497 497
 
498
-		$report_title = __( 'Total Registrations per Day', 'event_espresso' );
498
+		$report_title = __('Total Registrations per Day', 'event_espresso');
499 499
 
500 500
 		$report_params = array(
501 501
 			'title' 	=> $report_title,
502 502
 			'subtitle' => $subtitle,
503 503
 			'id' 		=> $report_ID,
504 504
 			'regs' 	=> $regs,
505
-			'noResults' => empty( $regs ),
506
-			'noRegsMsg' => sprintf( __('%sThere are currently no registration records in the last month for this report.%s', 'event_espresso'), '<h2>' . $report_title . '</h2><p>', '</p>' ),
505
+			'noResults' => empty($regs),
506
+			'noRegsMsg' => sprintf(__('%sThere are currently no registration records in the last month for this report.%s', 'event_espresso'), '<h2>'.$report_title.'</h2><p>', '</p>'),
507 507
 		);
508
-		wp_localize_script( 'ee-reg-reports-js', 'regPerDay', $report_params );
508
+		wp_localize_script('ee-reg-reports-js', 'regPerDay', $report_params);
509 509
 
510 510
 		return $report_ID;
511 511
 	}
@@ -517,41 +517,41 @@  discard block
 block discarded – undo
517 517
 	 *
518 518
 	 * @return string
519 519
 	 */
520
-	private function _registrations_per_event_report( $period = '-1 month' ) {
520
+	private function _registrations_per_event_report($period = '-1 month') {
521 521
 
522 522
 		$report_ID = 'reg-admin-registrations-per-event-report-dv';
523 523
 
524 524
 		$REG = EEM_Registration::instance();
525 525
 
526
-		$results = $REG->get_registrations_per_event_report( $period );
526
+		$results = $REG->get_registrations_per_event_report($period);
527 527
 		$results = (array) $results;
528 528
 		$regs = array();
529 529
 		$subtitle = '';
530 530
 
531
-		if ( $results ) {
532
-			$regs[] = array( __( 'Event', 'event_espresso' ), __('Total Registrations', 'event_espresso' ) );
533
-			foreach ( $results as $result ) {
534
-				$regs[] = array( wp_trim_words( $result->event_name, 4, '...' ), (int) $result->total );
531
+		if ($results) {
532
+			$regs[] = array(__('Event', 'event_espresso'), __('Total Registrations', 'event_espresso'));
533
+			foreach ($results as $result) {
534
+				$regs[] = array(wp_trim_words($result->event_name, 4, '...'), (int) $result->total);
535 535
 			}
536 536
 
537 537
 			//setup the date range.
538
-			EE_Registry::instance()->load_helper( 'DTT_Helper' );
539
-			$beginning_date = new DateTime( "now " . $period, new DateTimeZone( EEH_DTT_Helper::get_timezone() ) );
540
-			$ending_date = new DateTime( "now", new DateTimeZone( EEH_DTT_Helper::get_timezone() ) );
541
-			$subtitle = sprintf( _x( 'For the period: %s to %s', 'Used to give date range', 'event_espresso' ), $beginning_date->format( 'Y-m-d' ), $ending_date->format( 'Y-m-d' ) );
538
+			EE_Registry::instance()->load_helper('DTT_Helper');
539
+			$beginning_date = new DateTime("now ".$period, new DateTimeZone(EEH_DTT_Helper::get_timezone()));
540
+			$ending_date = new DateTime("now", new DateTimeZone(EEH_DTT_Helper::get_timezone()));
541
+			$subtitle = sprintf(_x('For the period: %s to %s', 'Used to give date range', 'event_espresso'), $beginning_date->format('Y-m-d'), $ending_date->format('Y-m-d'));
542 542
 		}
543 543
 
544
-		$report_title = __( 'Total Registrations per Event', 'event_espresso' );
544
+		$report_title = __('Total Registrations per Event', 'event_espresso');
545 545
 
546 546
 		$report_params = array(
547 547
 			'title' 	=> $report_title,
548 548
 			'subtitle' => $subtitle,
549 549
 			'id' 		=> $report_ID,
550 550
 			'regs' 	=> $regs,
551
-			'noResults' => empty( $regs ),
552
-			'noRegsMsg' => sprintf( __('%sThere are currently no registration records in the last month for this report.%s', 'event_espresso'), '<h2>' . $report_title . '</h2><p>', '</p>' ),
551
+			'noResults' => empty($regs),
552
+			'noRegsMsg' => sprintf(__('%sThere are currently no registration records in the last month for this report.%s', 'event_espresso'), '<h2>'.$report_title.'</h2><p>', '</p>'),
553 553
 		);
554
-		wp_localize_script( 'ee-reg-reports-js', 'regPerEvent', $report_params );
554
+		wp_localize_script('ee-reg-reports-js', 'regPerEvent', $report_params);
555 555
 
556 556
 		return $report_ID;
557 557
 	}
@@ -565,8 +565,8 @@  discard block
 block discarded – undo
565 565
 	 * @return void
566 566
 	 */
567 567
 	protected function _registration_checkin_list_table() {
568
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
569
-		$reg_id = isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : null;
568
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
569
+		$reg_id = isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : null;
570 570
 		$reg = EEM_Registration::instance()->get_one_by_ID($reg_id);
571 571
 		$this->_admin_page_title .= $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $reg->event_ID()), 'add-new-h2');
572 572
 
@@ -580,15 +580,15 @@  discard block
 block discarded – undo
580 580
 				'desc' => __('This indicates the attendee has been checked out', 'event_espresso')
581 581
 				)
582 582
 			);
583
-		$this->_template_args['after_list_table'] = $this->_display_legend( $legend_items );
583
+		$this->_template_args['after_list_table'] = $this->_display_legend($legend_items);
584 584
 
585 585
 
586
-		$dtt_id = isset(  $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
587
-		$go_back_url = !empty( $reg_id )  ? EE_Admin_Page::add_query_args_and_nonce(array('action' => 'event_registrations', 'event_id' => EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Event')->ID(), 'DTT_ID' => $dtt_id ), $this->_admin_base_url ) : '';
586
+		$dtt_id = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
587
+		$go_back_url = ! empty($reg_id) ? EE_Admin_Page::add_query_args_and_nonce(array('action' => 'event_registrations', 'event_id' => EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Event')->ID(), 'DTT_ID' => $dtt_id), $this->_admin_base_url) : '';
588 588
 
589
-		$this->_template_args['before_list_table'] = !empty( $reg_id ) && !empty( $dtt_id ) ? '<h2>' . sprintf(__("%s's check in records for %s at the event, %s", 'event_espresso'), '<span id="checkin-attendee-name">' . EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Attendee')->full_name() . '</span>', '<span id="checkin-dtt"><a href="' . $go_back_url . '">' . EEM_Datetime::instance()->get_one_by_ID($dtt_id)->start_date_and_time() . ' - ' . EEM_Datetime::instance()->get_one_by_ID($dtt_id)->end_date_and_time() . '</a></span>', '<span id="checkin-event-name">' . EEM_Datetime::instance()->get_one_by_ID($dtt_id)->get_first_related('Event')->get('EVT_name') . '</span>' ) . '</h2>' : '';
590
-		$this->_template_args['list_table_hidden_fields'] = !empty( $reg_id ) ? '<input type="hidden" name="_REGID" value="' . $reg_id . '">' : '';
591
-		$this->_template_args['list_table_hidden_fields'] .= !empty( $dtt_id ) ? '<input type="hidden" name="DTT_ID" value="' . $dtt_id . '">' : '';
589
+		$this->_template_args['before_list_table'] = ! empty($reg_id) && ! empty($dtt_id) ? '<h2>'.sprintf(__("%s's check in records for %s at the event, %s", 'event_espresso'), '<span id="checkin-attendee-name">'.EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Attendee')->full_name().'</span>', '<span id="checkin-dtt"><a href="'.$go_back_url.'">'.EEM_Datetime::instance()->get_one_by_ID($dtt_id)->start_date_and_time().' - '.EEM_Datetime::instance()->get_one_by_ID($dtt_id)->end_date_and_time().'</a></span>', '<span id="checkin-event-name">'.EEM_Datetime::instance()->get_one_by_ID($dtt_id)->get_first_related('Event')->get('EVT_name').'</span>').'</h2>' : '';
590
+		$this->_template_args['list_table_hidden_fields'] = ! empty($reg_id) ? '<input type="hidden" name="_REGID" value="'.$reg_id.'">' : '';
591
+		$this->_template_args['list_table_hidden_fields'] .= ! empty($dtt_id) ? '<input type="hidden" name="DTT_ID" value="'.$dtt_id.'">' : '';
592 592
 
593 593
 		$this->display_admin_list_table_page_with_no_sidebar();
594 594
 	}
@@ -601,24 +601,24 @@  discard block
 block discarded – undo
601 601
 	 */
602 602
 	public function toggle_checkin_status() {
603 603
 		//first make sure we have the necessary data
604
-		if ( !isset( $this->_req_data['_regid'] ) ) {
605
-			EE_Error::add_error( __('There must be something broken with the html structure because the required data for toggling the Check-in status is not being sent via ajax', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
604
+		if ( ! isset($this->_req_data['_regid'])) {
605
+			EE_Error::add_error(__('There must be something broken with the html structure because the required data for toggling the Check-in status is not being sent via ajax', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
606 606
 			$this->_template_args['success'] = FALSE;
607 607
 			$this->_template_args['error'] = TRUE;
608 608
 			$this->_return_json();
609 609
 		};
610 610
 
611 611
 		//do a nonce check cause we're not coming in from an normal route here.
612
-		$nonce = isset( $this->_req_data['checkinnonce'] ) ? sanitize_text_field( $this->_req_data['checkinnonce'] ) : '';
612
+		$nonce = isset($this->_req_data['checkinnonce']) ? sanitize_text_field($this->_req_data['checkinnonce']) : '';
613 613
 		$nonce_ref = 'checkin_nonce';
614 614
 
615
-		$this->_verify_nonce( $nonce, $nonce_ref );
615
+		$this->_verify_nonce($nonce, $nonce_ref);
616 616
 
617 617
 		//beautiful! Made it this far so let's get the status.
618 618
 		$new_status = $this->_toggle_checkin_status();
619 619
 
620 620
 		//setup new class to return via ajax
621
-		$this->_template_args['admin_page_content'] = 'clickable trigger-checkin checkin-icons checkedin-status-' . $new_status;
621
+		$this->_template_args['admin_page_content'] = 'clickable trigger-checkin checkin-icons checkedin-status-'.$new_status;
622 622
 		$this->_template_args['success'] = TRUE;
623 623
 		$this->_return_json();
624 624
 	}
@@ -638,32 +638,32 @@  discard block
 block discarded – undo
638 638
 		//first let's get the query args out of the way for the redirect
639 639
 		$query_args = array(
640 640
 			'action' => 'event_registrations',
641
-			'event_id' => isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : NULL,
642
-			'DTT_ID' => isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL
641
+			'event_id' => isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : NULL,
642
+			'DTT_ID' => isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL
643 643
 			);
644 644
 		$new_status = FALSE;
645 645
 
646 646
 		// bulk action check in toggle
647
-		if ( ! empty( $this->_req_data['checkbox'] ) && is_array( $this->_req_data['checkbox'] )) {
647
+		if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
648 648
 			// cycle thru checkboxes
649
-			while ( list( $REG_ID, $value ) = each($this->_req_data['checkbox'])) {
650
-				$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
649
+			while (list($REG_ID, $value) = each($this->_req_data['checkbox'])) {
650
+				$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
651 651
 				$new_status = $this->_toggle_checkin($REG_ID, $DTT_ID);
652 652
 			}
653 653
 
654
-		} elseif ( isset( $this->_req_data['_regid'] ) ) {
654
+		} elseif (isset($this->_req_data['_regid'])) {
655 655
 			//coming from ajax request
656
-			$DTT_ID = isset( $this->_req_data['dttid'] ) ? $this->_req_data['dttid'] : NULL;
656
+			$DTT_ID = isset($this->_req_data['dttid']) ? $this->_req_data['dttid'] : NULL;
657 657
 			$query_args['DTT_ID'] = $DTT_ID;
658 658
 			$new_status = $this->_toggle_checkin($this->_req_data['_regid'], $DTT_ID);
659 659
 		} else {
660
-			EE_Error::add_error(__('Missing some required data to toggle the Check-in', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__  );
660
+			EE_Error::add_error(__('Missing some required data to toggle the Check-in', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
661 661
 		}
662 662
 
663
-		if ( defined('DOING_AJAX' ) )
663
+		if (defined('DOING_AJAX'))
664 664
 			return $new_status;
665 665
 
666
-		$this->_redirect_after_action( FALSE,'', '', $query_args, TRUE );
666
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
667 667
 
668 668
 	}
669 669
 
@@ -679,11 +679,11 @@  discard block
 block discarded – undo
679 679
 	 */
680 680
 	private function _toggle_checkin($REG_ID, $DTT_ID) {
681 681
 		$REG = EEM_Registration::instance()->get_one_by_ID($REG_ID);
682
-		$new_status = $REG->toggle_checkin_status( $DTT_ID );
683
-		if ( $new_status !== FALSE ) {
684
-			EE_Error::add_success($REG->get_checkin_msg($DTT_ID) );
682
+		$new_status = $REG->toggle_checkin_status($DTT_ID);
683
+		if ($new_status !== FALSE) {
684
+			EE_Error::add_success($REG->get_checkin_msg($DTT_ID));
685 685
 		} else {
686
-			EE_Error::add_error($REG->get_checkin_msg($DTT_ID, TRUE), __FILE__, __FUNCTION__, __LINE__ );
686
+			EE_Error::add_error($REG->get_checkin_msg($DTT_ID, TRUE), __FILE__, __FUNCTION__, __LINE__);
687 687
 			$new_status = FALSE;
688 688
 		}
689 689
 		return $new_status;
@@ -699,28 +699,28 @@  discard block
 block discarded – undo
699 699
 	protected function _delete_checkin_rows() {
700 700
 		$query_args = array(
701 701
 			'action' => 'registration_checkins',
702
-			'DTT_ID' => isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : 0,
703
-			'_REGID' => isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : 0
702
+			'DTT_ID' => isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : 0,
703
+			'_REGID' => isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : 0
704 704
 			);
705
-		if ( !empty( $this->_req_data['checkbox'] ) && is_array( $this->_req_data['checkbox'] ) ) {
706
-			while ( list( $CHK_ID, $value ) = each( $this->_req_data['checkbox'] ) ) {
705
+		if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
706
+			while (list($CHK_ID, $value) = each($this->_req_data['checkbox'])) {
707 707
 				$errors = 0;
708
-				if ( ! EEM_Checkin::instance()->delete_by_ID($CHK_ID ) ) {
708
+				if ( ! EEM_Checkin::instance()->delete_by_ID($CHK_ID)) {
709 709
 					$errors++;
710 710
 				}
711 711
 			}
712 712
 		} else {
713
-			EE_Error::add_error(__('So, something went wrong with the bulk delete because there was no data received for instructions on WHAT to delete!', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
714
-			$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
713
+			EE_Error::add_error(__('So, something went wrong with the bulk delete because there was no data received for instructions on WHAT to delete!', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
714
+			$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
715 715
 		}
716 716
 
717
-		if ( $errors > 0 ) {
718
-			EE_Error::add_error( sprintf( __('There were %d records that did not delete successfully', 'event_espresso'), $errors ), __FILE__, __FUNCTION__, __LINE__ );
717
+		if ($errors > 0) {
718
+			EE_Error::add_error(sprintf(__('There were %d records that did not delete successfully', 'event_espresso'), $errors), __FILE__, __FUNCTION__, __LINE__);
719 719
 		} else {
720
-			EE_Error::add_success( __('Records were successfully deleted', 'event_espresso') );
720
+			EE_Error::add_success(__('Records were successfully deleted', 'event_espresso'));
721 721
 		}
722 722
 
723
-		$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
723
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
724 724
 	}
725 725
 
726 726
 
@@ -732,20 +732,20 @@  discard block
 block discarded – undo
732 732
 	protected function _delete_checkin_row() {
733 733
 		$query_args = array(
734 734
 			'action' => 'registration_checkins',
735
-			'DTT_ID' => isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : 0,
736
-			'_REGID' => isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : 0
735
+			'DTT_ID' => isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : 0,
736
+			'_REGID' => isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : 0
737 737
 			);
738 738
 
739
-		if ( !empty( $this->_req_data['CHK_ID'] ) ) {
740
-			if ( ! EEM_Checkin::instance()->delete_by_ID($this->_req_data['CHK_ID'] ) ) {
741
-				EE_Error::add_error(__('Something went wrong and this check-in record was not deleted', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
739
+		if ( ! empty($this->_req_data['CHK_ID'])) {
740
+			if ( ! EEM_Checkin::instance()->delete_by_ID($this->_req_data['CHK_ID'])) {
741
+				EE_Error::add_error(__('Something went wrong and this check-in record was not deleted', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
742 742
 			} else {
743
-				EE_Error::add_success( __('Check-In record successfully deleted', 'event_espresso') );
743
+				EE_Error::add_success(__('Check-In record successfully deleted', 'event_espresso'));
744 744
 			}
745 745
 		} else {
746
-			EE_Error::add_error(__('In order to delete a Check-in record, there must be a Check-In ID available. There is not. It is not your fault, there is just a gremlin living in the code', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
746
+			EE_Error::add_error(__('In order to delete a Check-in record, there must be a Check-In ID available. There is not. It is not your fault, there is just a gremlin living in the code', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
747 747
 		}
748
-		$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
748
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
749 749
 	}
750 750
 
751 751
 
@@ -758,8 +758,8 @@  discard block
 block discarded – undo
758 758
 	*		@return void
759 759
 	*/
760 760
 	protected function _event_registrations_list_table() {
761
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
762
-		$this->_admin_page_title .= isset( $this->_req_data['event_id'] ) ? $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $this->_req_data['event_id']), 'add-new-h2') : '';
761
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
762
+		$this->_admin_page_title .= isset($this->_req_data['event_id']) ? $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $this->_req_data['event_id']), 'add-new-h2') : '';
763 763
 
764 764
 		$legend_items = array(
765 765
 			'star-icon' => array(
@@ -783,31 +783,31 @@  discard block
 block discarded – undo
783 783
 				'desc' => __('View All Check-in Records for this Registrant', 'event_espresso')
784 784
 				),
785 785
 			'approved_status' => array(
786
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_approved,
787
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_approved, FALSE, 'sentence' )
786
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_approved,
787
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence')
788 788
 				),
789 789
             'cancelled_status' => array(
790
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_cancelled,
791
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, FALSE, 'sentence' )
790
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_cancelled,
791
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_cancelled, FALSE, 'sentence')
792 792
 				),
793 793
             'declined_status' => array(
794
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_declined,
795
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_declined, FALSE, 'sentence' )
794
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_declined,
795
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_declined, FALSE, 'sentence')
796 796
 				),
797 797
 			'not_approved' => array(
798
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_not_approved,
799
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_not_approved, FALSE, 'sentence' )
798
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_not_approved,
799
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, FALSE, 'sentence')
800 800
 				),
801 801
 			'pending_status' => array(
802
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_pending_payment,
803
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_pending_payment, FALSE, 'sentence' )
802
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_pending_payment,
803
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, FALSE, 'sentence')
804 804
 				)/**/
805 805
 			);
806
-		$this->_template_args['after_list_table'] = $this->_display_legend( $legend_items );
806
+		$this->_template_args['after_list_table'] = $this->_display_legend($legend_items);
807 807
 
808
-		$event_id = isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : null;
809
-		$this->_template_args['before_list_table'] = !empty( $event_id ) ? '<h2>' . sprintf(__('Viewing Registrations for Event: %s', 'event_espresso'), EEM_Event::instance()->get_one_by_ID($event_id)->get('EVT_name') ) . '</h2>' : '';
810
-		$this->_template_args['list_table_hidden_fields'] = !empty( $event_id ) ? '<input type="hidden" name="event_id" value="' . $event_id . '">' : '';
808
+		$event_id = isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : null;
809
+		$this->_template_args['before_list_table'] = ! empty($event_id) ? '<h2>'.sprintf(__('Viewing Registrations for Event: %s', 'event_espresso'), EEM_Event::instance()->get_one_by_ID($event_id)->get('EVT_name')).'</h2>' : '';
810
+		$this->_template_args['list_table_hidden_fields'] = ! empty($event_id) ? '<input type="hidden" name="event_id" value="'.$event_id.'">' : '';
811 811
 
812 812
 		$this->display_admin_list_table_page_with_no_sidebar();
813 813
 	}
@@ -821,15 +821,15 @@  discard block
 block discarded – undo
821 821
 	*		@access public
822 822
 	*		@return array
823 823
 	*/
824
-	public function get_event_attendees( $per_page = 10, $count = FALSE, $trash = FALSE, $orderby = '' ) {
824
+	public function get_event_attendees($per_page = 10, $count = FALSE, $trash = FALSE, $orderby = '') {
825 825
 
826
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
827
-		require_once(EE_MODELS . 'EEM_Attendee.model.php');
826
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
827
+		require_once(EE_MODELS.'EEM_Attendee.model.php');
828 828
 		//$ATT_MDL = EEM_Attendee::instance();
829 829
 
830
-		$EVT_ID = isset($this->_req_data['event_id']) ? absint( $this->_req_data['event_id'] ) : FALSE;
831
-		$CAT_ID = isset($this->_req_data['category_id']) ? absint( $this->_req_data['category_id'] ) : FALSE;
832
-		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
830
+		$EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : FALSE;
831
+		$CAT_ID = isset($this->_req_data['category_id']) ? absint($this->_req_data['category_id']) : FALSE;
832
+		$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
833 833
 
834 834
 		$this->_req_data['orderby'] = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : $orderby;
835 835
 
@@ -842,94 +842,94 @@  discard block
 block discarded – undo
842 842
 //				$orderby = 'reg.REG_final_price';
843 843
 		}
844 844
 
845
-		$sort = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'ASC';
845
+		$sort = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'ASC';
846 846
 
847
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
848
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
847
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
848
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
849 849
 
850 850
 
851
-		$offset = ($current_page-1)*$per_page;
852
-		$limit = $count ? NULL : array( $offset, $per_page );
853
-		$query_params = array(array('Event.status'=>array('IN',  array_keys(EEM_Event::instance()->get_status_array()))));
854
-		if ($EVT_ID){
855
-			$query_params[0]['EVT_ID']=$EVT_ID;
851
+		$offset = ($current_page - 1) * $per_page;
852
+		$limit = $count ? NULL : array($offset, $per_page);
853
+		$query_params = array(array('Event.status'=>array('IN', array_keys(EEM_Event::instance()->get_status_array()))));
854
+		if ($EVT_ID) {
855
+			$query_params[0]['EVT_ID'] = $EVT_ID;
856 856
 		}
857
-		if($CAT_ID){
857
+		if ($CAT_ID) {
858 858
 			throw new EE_Error("You specified a Category Id for this query. Thats odd because we are now using terms and taxonomies. So did you mean the term taxonomy id o rthe term id?");
859 859
 		}
860 860
 
861 861
 		//if DTT is included we do multiple datetimes.
862
-		if ( $DTT_ID ) {
862
+		if ($DTT_ID) {
863 863
 			$query_params[0]['Ticket.Datetime.DTT_ID'] = $DTT_ID;
864 864
 		}
865 865
 
866 866
 		//make sure we only have default where on the current regs
867 867
 		$query_params['default_where_conditions'] = 'this_model_only';
868 868
 
869
-		$status_ids_array = apply_filters( 'FHEE__Extend_Registrations_Admin_Page__get_event_attendees__status_ids_array', array( EEM_Registration::status_id_pending_payment, EEM_Registration::status_id_approved ) );
869
+		$status_ids_array = apply_filters('FHEE__Extend_Registrations_Admin_Page__get_event_attendees__status_ids_array', array(EEM_Registration::status_id_pending_payment, EEM_Registration::status_id_approved));
870 870
 
871
-		$query_params[0]['STS_ID']= array('IN', $status_ids_array );
871
+		$query_params[0]['STS_ID'] = array('IN', $status_ids_array);
872 872
 
873
-		if($trash){
874
-			$query_params[0]['Attendee.status']=  EEM_CPT_Base::post_status_trashed;
873
+		if ($trash) {
874
+			$query_params[0]['Attendee.status'] = EEM_CPT_Base::post_status_trashed;
875 875
 		}
876 876
 
877
-		if ( isset( $this->_req_data['s'] ) ) {
878
-			$sstr = '%' . $this->_req_data['s'] . '%';
877
+		if (isset($this->_req_data['s'])) {
878
+			$sstr = '%'.$this->_req_data['s'].'%';
879 879
 			$query_params[0]['OR'] = array(
880
-				'Event.EVT_name' => array( 'LIKE', $sstr),
881
-				'Event.EVT_desc' => array( 'LIKE', $sstr ),
882
-				'Event.EVT_short_desc' => array( 'LIKE' , $sstr ),
883
-				'Attendee.ATT_fname' => array( 'LIKE', $sstr ),
884
-				'Attendee.ATT_lname' => array( 'LIKE', $sstr ),
885
-				'Attendee.ATT_short_bio' => array( 'LIKE', $sstr ),
886
-				'Attendee.ATT_email' => array('LIKE', $sstr ),
887
-				'Attendee.ATT_address' => array( 'LIKE', $sstr ),
888
-				'Attendee.ATT_address2' => array( 'LIKE', $sstr ),
889
-				'Attendee.ATT_city' => array( 'LIKE', $sstr ),
890
-				'REG_final_price' => array( 'LIKE', $sstr ),
891
-				'REG_code' => array( 'LIKE', $sstr ),
892
-				'REG_count' => array( 'LIKE' , $sstr ),
893
-				'REG_group_size' => array( 'LIKE' , $sstr ),
894
-				'Ticket.TKT_name' => array( 'LIKE', $sstr ),
895
-				'Ticket.TKT_description' => array( 'LIKE', $sstr )
880
+				'Event.EVT_name' => array('LIKE', $sstr),
881
+				'Event.EVT_desc' => array('LIKE', $sstr),
882
+				'Event.EVT_short_desc' => array('LIKE', $sstr),
883
+				'Attendee.ATT_fname' => array('LIKE', $sstr),
884
+				'Attendee.ATT_lname' => array('LIKE', $sstr),
885
+				'Attendee.ATT_short_bio' => array('LIKE', $sstr),
886
+				'Attendee.ATT_email' => array('LIKE', $sstr),
887
+				'Attendee.ATT_address' => array('LIKE', $sstr),
888
+				'Attendee.ATT_address2' => array('LIKE', $sstr),
889
+				'Attendee.ATT_city' => array('LIKE', $sstr),
890
+				'REG_final_price' => array('LIKE', $sstr),
891
+				'REG_code' => array('LIKE', $sstr),
892
+				'REG_count' => array('LIKE', $sstr),
893
+				'REG_group_size' => array('LIKE', $sstr),
894
+				'Ticket.TKT_name' => array('LIKE', $sstr),
895
+				'Ticket.TKT_description' => array('LIKE', $sstr)
896 896
 				);
897 897
 		}
898 898
 
899 899
 		$query_params['order_by'][$orderby] = $sort;
900 900
 		$query_params['limit'] = $limit;
901
-		$query_params['force_join'] = array('Attendee');//force join to attendee model so that it gets cached, because we're going to need the attendee for each registration
902
-		if($count){
903
-			$registrations = EEM_Registration::instance()->count(array($query_params[0], 'default_where_conditions' => 'this_model_only' ));
904
-		}else{
901
+		$query_params['force_join'] = array('Attendee'); //force join to attendee model so that it gets cached, because we're going to need the attendee for each registration
902
+		if ($count) {
903
+			$registrations = EEM_Registration::instance()->count(array($query_params[0], 'default_where_conditions' => 'this_model_only'));
904
+		} else {
905 905
 			$registrations = EEM_Registration::instance()->get_all($query_params);
906 906
 
907 907
 
908 908
 	//		$registrations = EEM_Registration::instance();
909 909
 	//		$all_attendees = EEM_Attendee::instance()->get_event_attendees( $EVT_ID, $CAT_ID, $reg_status, $trash, $orderby, $sort, $limit, $output );
910
-			if ( isset( $registrations[0] ) && $registrations[0] instanceof EE_Registration ) {
910
+			if (isset($registrations[0]) && $registrations[0] instanceof EE_Registration) {
911 911
 				//EEH_Debug_Tools::printr( $all_attendees[0], '$all_attendees[0]  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
912 912
 				// name
913 913
 				$first_registration = $registrations[0];
914 914
 				$event_obj = $first_registration->event_obj();
915
-				if($event_obj){
915
+				if ($event_obj) {
916 916
 					$event_name = $first_registration->event_obj()->name();
917
-					$event_date = 'TODO: we need to get date from earliest price date or should this be the actual event date?';//$first_registration->date_obj()->reg_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 ) : '';
917
+					$event_date = 'TODO: we need to get date from earliest price date or should this be the actual event date?'; //$first_registration->date_obj()->reg_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 ) : '';
918 918
 					// edit event link
919
-					if ( $event_name != '' ) {
920
-						$edit_event_url = self::add_query_args_and_nonce( array( 'action'=>'edit_event', 'EVT_ID'=>$EVT_ID ), EVENTS_ADMIN_URL );
921
-						$edit_event_lnk = '<a href="'.$edit_event_url.'" title="' . esc_attr__( 'Edit ', 'event_espresso' ) . $event_name . '">' . __( 'Edit Event', 'event_espresso' ) . '</a>';
922
-						$event_name .= ' <span class="admin-page-header-edit-lnk not-bold">' . $edit_event_lnk . '</span>' ;
919
+					if ($event_name != '') {
920
+						$edit_event_url = self::add_query_args_and_nonce(array('action'=>'edit_event', 'EVT_ID'=>$EVT_ID), EVENTS_ADMIN_URL);
921
+						$edit_event_lnk = '<a href="'.$edit_event_url.'" title="'.esc_attr__('Edit ', 'event_espresso').$event_name.'">'.__('Edit Event', 'event_espresso').'</a>';
922
+						$event_name .= ' <span class="admin-page-header-edit-lnk not-bold">'.$edit_event_lnk.'</span>';
923 923
 					}
924 924
 
925
-					$back_2_reg_url = self::add_query_args_and_nonce( array( 'action'=>'default' ), REG_ADMIN_URL );
926
-					$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>';
925
+					$back_2_reg_url = self::add_query_args_and_nonce(array('action'=>'default'), REG_ADMIN_URL);
926
+					$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>';
927 927
 
928 928
 					$this->_template_args['before_admin_page_content'] = '
929 929
 				<div id="admin-page-header">
930
-					<h1><span class="small-text not-bold">'.__( 'Event: ', 'event_espresso' ).'</span>'. $event_name .'</h1>
931
-					<h3><span class="small-text not-bold">'.__( 'Date: ', 'event_espresso' ). '</span>'. $event_date .'</h3>
932
-					<span class="admin-page-header-go-back-lnk not-bold">' . $back_2_reg_lnk . '</span>
930
+					<h1><span class="small-text not-bold">'.__('Event: ', 'event_espresso').'</span>'.$event_name.'</h1>
931
+					<h3><span class="small-text not-bold">'.__('Date: ', 'event_espresso').'</span>'.$event_date.'</h3>
932
+					<span class="admin-page-header-go-back-lnk not-bold">' . $back_2_reg_lnk.'</span>
933 933
 				</div>
934 934
 				';
935 935
 				}
Please login to merge, or discard this patch.
admin/extend/registrations/templates/newsletter-send-form.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
                 <input type="hidden" id="get_newsletter_form_content_nonce" name="get_newsletter_form_content_nonce" value="<?php echo $ajax_nonce; ?>">
33 33
                 <input type="hidden" name="batch_message[id_type]" value="<?php echo $id_type; ?>">
34 34
                 <input id="newsletter-batch-ids" type="hidden" name="batch_message[ids]" value="">
35
-                <h3 class="newsletter-send-form-title"><?php printf( __('Sending batch message to %s people...', 'event_espresso'), '[NUMPEOPLE]' ); ?></h3>
35
+                <h3 class="newsletter-send-form-title"><?php printf(__('Sending batch message to %s people...', 'event_espresso'), '[NUMPEOPLE]'); ?></h3>
36 36
                 <label for="batch-message-template-selector"><?php _e('Select Template:', 'event_espresso'); ?></label>
37 37
                 <?php echo $template_selector; ?>
38 38
                 <div class="batch-message-edit-fields" style="display:none;">
Please login to merge, or discard this patch.