Completed
Branch BUG-9871-email-validation (e62b1a)
by
unknown
350:41 queued 333:27
created
admin_pages/registrations/EE_Registrations_List_Table.class.php 4 patches
Braces   +4 added lines, -2 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
  * EEH_URL helper
4 6
  * Helper class for URL-related PHP functions
@@ -62,7 +64,7 @@  discard block
 block discarded – undo
62 64
 				isset($results['response']['code']) &&
63 65
 				$results['response']['code'] == '200'){
64 66
 			return true;
65
-		}else{
67
+		} else{
66 68
 			return false;
67 69
 		}
68 70
 	}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 	 *
94 94
 	 * @abstract
95 95
 	 * @access protected
96
-	 * @return array
96
+	 * @return string[]
97 97
 	 */
98 98
 	protected function _get_table_filters() {
99 99
 		$filters = array();
Please login to merge, or discard this patch.
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -370,18 +370,18 @@  discard block
 block discarded – undo
370 370
 	 * @return string
371 371
 	 * @throws \EE_Error
372 372
 	 */
373
-    public function column_cb($item){
373
+	public function column_cb($item){
374 374
 	/** checkbox/lock **/
375 375
 	$transaction = $item->get_first_related( 'Transaction' );
376 376
 	$payment_count = $transaction instanceof EE_Transaction ? $transaction->count_related( 'Payment' ) : 0;
377
-	    return $payment_count > 0
378
-		    ? sprintf( '<input type="checkbox" name="_REG_ID[]" value="%1$s" />', $item->ID() )
379
-		      . '<span class="ee-lock-icon"></span>'
380
-		    : sprintf(
381
-			    '<input type="checkbox" name="_REG_ID[]" value="%1$s" />',
382
-			    $item->ID()
383
-		    );
384
-    }
377
+		return $payment_count > 0
378
+			? sprintf( '<input type="checkbox" name="_REG_ID[]" value="%1$s" />', $item->ID() )
379
+			  . '<span class="ee-lock-icon"></span>'
380
+			: sprintf(
381
+				'<input type="checkbox" name="_REG_ID[]" value="%1$s" />',
382
+				$item->ID()
383
+			);
384
+	}
385 385
 
386 386
 
387 387
 
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 	 */
418 418
 	public function column__REG_date(EE_Registration $item){
419 419
 		$this->_set_related_details($item);
420
-       		 //Build row actions
420
+	   		 //Build row actions
421 421
 		$view_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=> $this->_transaction_details['id'] ), TXN_ADMIN_URL );
422 422
 		$view_link = EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '<a class="ee-status-color-' . $this->_transaction_details['status'] . '" href="'.$view_lnk_url.'" title="' . esc_attr( $this->_transaction_details['title_attr'] ) . '">' . $item->get_i18n_datetime( 'REG_date' ) . '</a>' : $item->get_i18n_datetime( 'REG_date' );
423 423
 		$view_link .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $this->_transaction_details['status'], false, 'sentence' ) . '</span>';
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 		} else {
472 472
 			return __( 'There is no ticket on this registration', 'event_espresso' );
473 473
 		}
474
-    }
474
+	}
475 475
 
476 476
 
477 477
 
@@ -494,14 +494,14 @@  discard block
 block discarded – undo
494 494
 		$t = $item->get_first_related('Transaction');
495 495
 		$payment_count = $t instanceof EE_Transaction ? $t->count_related('Payment') : 0;
496 496
 
497
-	    //append group count to name
498
-	    $link .= '&nbsp;' . sprintf(__( '(%1$s / %2$s)', 'event_espresso' ), $item->count(), $item->group_size());
497
+		//append group count to name
498
+		$link .= '&nbsp;' . sprintf(__( '(%1$s / %2$s)', 'event_espresso' ), $item->count(), $item->group_size());
499 499
 
500
-	    //append reg_code
501
-	    $link .= '<br>' . sprintf( __( 'Reg Code: %s', 'event_espresso' ), $item->get('REG_code') );
500
+		//append reg_code
501
+		$link .= '<br>' . sprintf( __( 'Reg Code: %s', 'event_espresso' ), $item->get('REG_code') );
502 502
 
503
-	    //reg status text for accessibility
504
-	    $link .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $item->status_ID(), false, 'sentence' ) . '</span>';
503
+		//reg status text for accessibility
504
+		$link .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $item->status_ID(), false, 'sentence' ) . '</span>';
505 505
 
506 506
 		//trash/restore/delete actions
507 507
 		$actions = array();
@@ -731,14 +731,14 @@  discard block
 block discarded – undo
731 731
 		//message list table link (filtered by REG_ID
732 732
 		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_messages', 'view_filtered_messages' ) ) {
733 733
 			$filtered_messages_link = '<li>'
734
-			                          . EEH_MSG_Template::get_message_action_link(
734
+									  . EEH_MSG_Template::get_message_action_link(
735 735
 											'see_notifications_for',
736 736
 											null,
737 737
 											array(
738 738
 												'_REG_ID' => $item->ID()
739 739
 												)
740 740
 											)
741
-			                          . '</li>';
741
+									  . '</li>';
742 742
 		}
743 743
 
744 744
 		return $this->_action_string( $view_lnk . $edit_lnk . $resend_reg_lnk . $view_txn_lnk . $dl_invoice_lnk . $filtered_messages_link, $item, 'ul', 'reg-overview-actions-ul' );
Please login to merge, or discard this patch.
Spacing   +167 added lines, -167 removed lines patch added patch discarded remove patch
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
 	/**
55 55
 	 * @param \Registrations_Admin_Page $admin_page
56 56
 	 */
57
-	public function __construct( Registrations_Admin_Page $admin_page ){
58
-		if ( ! empty( $_GET['event_id'] ) ) {
57
+	public function __construct(Registrations_Admin_Page $admin_page) {
58
+		if ( ! empty($_GET['event_id'])) {
59 59
 			$extra_query_args = array();
60
-			foreach ( $admin_page->get_views() as $key => $view_details ) {
61
-				$extra_query_args[$view_details['slug']] = array( 'event_id' => $_GET['event_id'] );
60
+			foreach ($admin_page->get_views() as $key => $view_details) {
61
+				$extra_query_args[$view_details['slug']] = array('event_id' => $_GET['event_id']);
62 62
 			}
63
-			$this->_views = $admin_page->get_list_table_view_RLs( $extra_query_args );
63
+			$this->_views = $admin_page->get_list_table_view_RLs($extra_query_args);
64 64
 		}
65 65
 		parent::__construct($admin_page);
66 66
 		$this->_status = $this->_admin_page->get_registration_status_array();
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 	 * @return void
76 76
 	 */
77 77
 	protected function _setup_data() {
78
-		$this->_data = $this->_admin_page->get_registrations( $this->_per_page );
79
-		$this->_all_data_count = $this->_admin_page->get_registrations( $this->_per_page, TRUE, FALSE, FALSE );
78
+		$this->_data = $this->_admin_page->get_registrations($this->_per_page);
79
+		$this->_all_data_count = $this->_admin_page->get_registrations($this->_per_page, TRUE, FALSE, FALSE);
80 80
 	}
81 81
 
82 82
 
@@ -93,30 +93,30 @@  discard block
 block discarded – undo
93 93
 			'ajax' => TRUE,
94 94
 			'screen' => $this->_admin_page->get_current_screen()->id
95 95
 			);
96
-		$ID_column_name = __( 'ID', 'event_espresso' );
96
+		$ID_column_name = __('ID', 'event_espresso');
97 97
 		$ID_column_name .= ' : <span class="show-on-mobile-view-only" style="float:none">';
98
-		$ID_column_name .= __( 'Registrant Name', 'event_espresso' );
98
+		$ID_column_name .= __('Registrant Name', 'event_espresso');
99 99
 		$ID_column_name .= '</span> ';
100
-		if ( isset( $_GET['event_id'] )) {
100
+		if (isset($_GET['event_id'])) {
101 101
 			$this->_columns = array(
102 102
 				'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
103 103
 				'_REG_ID' => $ID_column_name,
104
-				'ATT_fname' => __( 'Name', 'event_espresso' ),
104
+				'ATT_fname' => __('Name', 'event_espresso'),
105 105
 				'ATT_email' =>  __('Email', 'event_espresso'),
106
-				'_REG_date' => __( 'Reg Date', 'event_espresso' ),
107
-				'PRC_amount' => __( 'TKT Price', 'event_espresso' ),
108
-				'_REG_final_price' => __( 'Final Price', 'event_espresso' ),
109
-				'TXN_total' => __( 'Total Txn', 'event_espresso' ),
106
+				'_REG_date' => __('Reg Date', 'event_espresso'),
107
+				'PRC_amount' => __('TKT Price', 'event_espresso'),
108
+				'_REG_final_price' => __('Final Price', 'event_espresso'),
109
+				'TXN_total' => __('Total Txn', 'event_espresso'),
110 110
 				'TXN_paid' => __('Paid', 'event_espresso'),
111
-				'actions' => __( 'Actions', 'event_espresso' )
111
+				'actions' => __('Actions', 'event_espresso')
112 112
 				);
113 113
 			$this->_bottom_buttons = array(
114 114
 					'report'=> array(
115 115
 					'route' => 'registrations_report',
116 116
 					'extra_request' =>
117 117
 						array(
118
-							'EVT_ID'=> isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : null,
119
-							'return_url' => urlencode( "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" )
118
+							'EVT_ID'=> isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : null,
119
+							'return_url' => urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}")
120 120
 						)
121 121
 				),
122 122
 			);
@@ -124,19 +124,19 @@  discard block
 block discarded – undo
124 124
 			$this->_columns = array(
125 125
 				'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
126 126
 				'_REG_ID' => $ID_column_name,
127
-				'ATT_fname' => __( 'Name', 'event_espresso' ),
128
-				'_REG_date' => __( 'TXN Date', 'event_espresso' ),
129
-				'event_name' => __( 'Event', 'event_espresso' ),
130
-				'DTT_EVT_start' => __( 'Event Date', 'event_espresso' ),
131
-				'_REG_final_price' => __( 'Price', 'event_espresso' ),
132
-				'_REG_paid' => __( 'Paid', 'event_espresso' ),
133
-				'actions' => __( 'Actions', 'event_espresso' )
127
+				'ATT_fname' => __('Name', 'event_espresso'),
128
+				'_REG_date' => __('TXN Date', 'event_espresso'),
129
+				'event_name' => __('Event', 'event_espresso'),
130
+				'DTT_EVT_start' => __('Event Date', 'event_espresso'),
131
+				'_REG_final_price' => __('Price', 'event_espresso'),
132
+				'_REG_paid' => __('Paid', 'event_espresso'),
133
+				'actions' => __('Actions', 'event_espresso')
134 134
 			);
135 135
 			$this->_bottom_buttons = array(
136 136
 				'report_all'=> array(
137 137
 				'route' => 'registrations_report',
138 138
 				'extra_request' => array(
139
-					'return_url' => urlencode( "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" ) )
139
+					'return_url' => urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}") )
140 140
 				),
141 141
 			);
142 142
 		}
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 		$this->_primary_column = '_REG_ID';
145 145
 
146 146
 		$this->_sortable_columns = array(
147
-			'_REG_date' => array( '_REG_date' => TRUE ),   //true means its already sorted
148
-			'ATT_fname' => array( 'ATT_fname' => FALSE ),
149
-			'event_name' => array( 'event_name' => FALSE ),
150
-			'DTT_EVT_start'	=> array( 'DTT_EVT_start' => FALSE ),
151
-			'_REG_ID' => array( '_REG_ID' => FALSE ),
147
+			'_REG_date' => array('_REG_date' => TRUE), //true means its already sorted
148
+			'ATT_fname' => array('ATT_fname' => FALSE),
149
+			'event_name' => array('event_name' => FALSE),
150
+			'DTT_EVT_start'	=> array('DTT_EVT_start' => FALSE),
151
+			'_REG_ID' => array('_REG_ID' => FALSE),
152 152
 		);
153 153
 
154 154
 		$this->_hidden_columns = array();
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
 	 * @param  EE_Registration $item the current item
163 163
 	 * @return string
164 164
 	 */
165
-	protected function _get_row_class( $item ) {
166
-		$class = parent::_get_row_class( $item );
165
+	protected function _get_row_class($item) {
166
+		$class = parent::_get_row_class($item);
167 167
 		//add status class
168
-		$class .= ' ee-status-strip reg-status-' . $item->status_ID();
169
-		if ( $this->_has_checkbox_column ) {
168
+		$class .= ' ee-status-strip reg-status-'.$item->status_ID();
169
+		if ($this->_has_checkbox_column) {
170 170
 			$class .= ' has-checkbox-column';
171 171
 		}
172 172
 		return $class;
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
 	 * @param EE_Registration $registration
181 181
 	 * @throws \EE_Error
182 182
 	 */
183
-	protected function _set_related_details( EE_Registration $registration ) {
183
+	protected function _set_related_details(EE_Registration $registration) {
184 184
 
185
-		$transaction = $registration->get_first_related( 'Transaction' );
185
+		$transaction = $registration->get_first_related('Transaction');
186 186
 		$status = $transaction instanceof EE_Transaction
187 187
 			? $transaction->status_ID()
188 188
 			: EEM_Transaction::failed_status_code;
@@ -191,8 +191,8 @@  discard block
 block discarded – undo
191 191
 			'status' => $status,
192 192
 			'id' => $transaction instanceof EE_Transaction ? $transaction->ID() : 0,
193 193
 			'title_attr' => sprintf(
194
-				__( 'View Transaction Details (%s)', 'event_espresso' ),
195
-				EEH_Template::pretty_status( $status, false, 'sentence' )
194
+				__('View Transaction Details (%s)', 'event_espresso'),
195
+				EEH_Template::pretty_status($status, false, 'sentence')
196 196
 			)
197 197
 		);
198 198
 
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
 			'status' => $status,
204 204
 			'id' => $event instanceof EE_Event ? $event->ID() : 0,
205 205
 			'title_attr' => sprintf(
206
-				__( 'Edit Event (%s)', 'event_espresso' ),
207
-				EEH_Template::pretty_status( $status, false, 'sentence' )
206
+				__('Edit Event (%s)', 'event_espresso'),
207
+				EEH_Template::pretty_status($status, false, 'sentence')
208 208
 			)
209 209
 		);
210 210
 	}
@@ -221,30 +221,30 @@  discard block
 block discarded – undo
221 221
 
222 222
 		//todo we're currently using old functions here. We need to move things into the Events_Admin_Page() class as methods.
223 223
 
224
-		$cur_date = isset( $this->_req_data['month_range'] ) ? $this->_req_data['month_range'] : '';
225
-		$cur_category = isset( $this->_req_data['EVT_CAT'] ) ? $this->_req_data['EVT_CAT'] : -1;
226
-		$reg_status = isset( $this->_req_data['_reg_status'] ) ? $this->_req_data['_reg_status'] : '';
224
+		$cur_date = isset($this->_req_data['month_range']) ? $this->_req_data['month_range'] : '';
225
+		$cur_category = isset($this->_req_data['EVT_CAT']) ? $this->_req_data['EVT_CAT'] : -1;
226
+		$reg_status = isset($this->_req_data['_reg_status']) ? $this->_req_data['_reg_status'] : '';
227 227
 
228
-		$filters[] = EEH_Form_Fields::generate_registration_months_dropdown( $cur_date, $reg_status, $cur_category );
229
-		$filters[] = EEH_Form_Fields::generate_event_category_dropdown( $cur_category );
228
+		$filters[] = EEH_Form_Fields::generate_registration_months_dropdown($cur_date, $reg_status, $cur_category);
229
+		$filters[] = EEH_Form_Fields::generate_event_category_dropdown($cur_category);
230 230
 
231 231
 		$status = array();
232
-		$status[] = array( 'id' => 0, 'text' => __('Select Status', 'event_espresso') );
233
-		foreach ( $this->_status as $key => $value ) {
234
-			$status[] = array( 'id' => $key, 'text' => $value );
232
+		$status[] = array('id' => 0, 'text' => __('Select Status', 'event_espresso'));
233
+		foreach ($this->_status as $key => $value) {
234
+			$status[] = array('id' => $key, 'text' => $value);
235 235
 		}
236
-		if ( $this->_view !== 'incomplete' ) {
236
+		if ($this->_view !== 'incomplete') {
237 237
 			$filters[] = EEH_Form_Fields::select_input(
238 238
 				'_reg_status',
239 239
 				$status,
240
-				isset( $this->_req_data['_reg_status'] )
241
-					? strtoupper( sanitize_key( $this->_req_data['_reg_status'] ))
240
+				isset($this->_req_data['_reg_status'])
241
+					? strtoupper(sanitize_key($this->_req_data['_reg_status']))
242 242
 					: ''
243 243
 			);
244 244
 		}
245 245
 
246
-		if ( isset( $this->_req_data['event_id'] ) ) {
247
-			$filters[] = EEH_Form_Fields::hidden_input( 'event_id',  $this->_req_data['event_id'], 'reg_event_id' );
246
+		if (isset($this->_req_data['event_id'])) {
247
+			$filters[] = EEH_Form_Fields::hidden_input('event_id', $this->_req_data['event_id'], 'reg_event_id');
248 248
 		}
249 249
 
250 250
 		return $filters;
@@ -263,9 +263,9 @@  discard block
 block discarded – undo
263 263
 		$this->_views['all']['count'] = $this->_total_registrations();
264 264
 		$this->_views['month']['count'] = $this->_total_registrations_this_month();
265 265
 		$this->_views['today']['count'] = $this->_total_registrations_today();
266
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_registrations', 'espresso_registrations_trash_registrations' ) ) {
267
-			$this->_views['incomplete']['count'] = $this->_total_registrations( 'incomplete' );
268
-			$this->_views['trash']['count'] = $this->_total_registrations( 'trash' );
266
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_registrations', 'espresso_registrations_trash_registrations')) {
267
+			$this->_views['incomplete']['count'] = $this->_total_registrations('incomplete');
268
+			$this->_views['trash']['count'] = $this->_total_registrations('trash');
269 269
 		}
270 270
 	}
271 271
 
@@ -279,23 +279,23 @@  discard block
 block discarded – undo
279 279
 	 * @return int
280 280
 	 * @throws \EE_Error
281 281
 	 */
282
-	protected function _total_registrations( $view = '' ){
282
+	protected function _total_registrations($view = '') {
283 283
 		$_where = array();
284
-		$EVT_ID = isset( $this->_req_data['event_id'] ) ? absint( $this->_req_data['event_id'] ) : FALSE;
285
-		if( $EVT_ID ) {
284
+		$EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : FALSE;
285
+		if ($EVT_ID) {
286 286
 			$_where['EVT_ID'] = $EVT_ID;
287 287
 		}
288
-		switch ( $view ) {
288
+		switch ($view) {
289 289
 			case 'trash' :
290
-				return EEM_Registration::instance()->count_deleted( array( $_where ));
290
+				return EEM_Registration::instance()->count_deleted(array($_where));
291 291
 				break;
292 292
 			case 'incomplete' :
293 293
 				$_where['STS_ID'] = EEM_Registration::status_id_incomplete;
294 294
 				break;
295 295
 			default :
296
-				$_where['STS_ID'] = array( '!=', EEM_Registration::status_id_incomplete );
296
+				$_where['STS_ID'] = array('!=', EEM_Registration::status_id_incomplete);
297 297
 		}
298
-		return EEM_Registration::instance()->count( array( $_where ));
298
+		return EEM_Registration::instance()->count(array($_where));
299 299
 	}
300 300
 
301 301
 
@@ -307,32 +307,32 @@  discard block
 block discarded – undo
307 307
 	 * @return int
308 308
 	 * @throws \EE_Error
309 309
 	 */
310
-	protected function _total_registrations_this_month(){
311
-		$EVT_ID = isset( $this->_req_data['event_id'] ) ? absint( $this->_req_data['event_id'] ) : FALSE;
312
-		$_where = $EVT_ID ? array( 'EVT_ID' => $EVT_ID ) : array();
310
+	protected function _total_registrations_this_month() {
311
+		$EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : FALSE;
312
+		$_where = $EVT_ID ? array('EVT_ID' => $EVT_ID) : array();
313 313
 		$this_year_r = date('Y', current_time('timestamp'));
314 314
 		$time_start = ' 00:00:00';
315 315
 		$time_end = ' 23:59:59';
316 316
 		$this_month_r = date('m', current_time('timestamp'));
317
-		$days_this_month = date( 't', current_time('timestamp') );
317
+		$days_this_month = date('t', current_time('timestamp'));
318 318
 		//setup date query.
319 319
 		$beginning_string = EEM_Registration::instance()->convert_datetime_for_query(
320 320
 			'REG_date',
321
-			$this_year_r . '-' . $this_month_r . '-01' . ' ' . $time_start,
321
+			$this_year_r.'-'.$this_month_r.'-01'.' '.$time_start,
322 322
 			'Y-m-d H:i:s'
323 323
 		);
324 324
 		$end_string = EEM_Registration::instance()->convert_datetime_for_query(
325 325
 			'REG_date',
326
-			$this_year_r . '-' . $this_month_r . '-' . $days_this_month . ' ' . $time_end,
326
+			$this_year_r.'-'.$this_month_r.'-'.$days_this_month.' '.$time_end,
327 327
 			'Y-m-d H:i:s'
328 328
 		);
329
-		$_where['REG_date']= array('BETWEEN',
329
+		$_where['REG_date'] = array('BETWEEN',
330 330
 			array(
331 331
 				$beginning_string,
332 332
 				$end_string
333 333
 		));
334
-		$_where['STS_ID'] = array( '!=', EEM_Registration::status_id_incomplete );
335
-		return EEM_Registration::instance()->count(array( $_where ) );
334
+		$_where['STS_ID'] = array('!=', EEM_Registration::status_id_incomplete);
335
+		return EEM_Registration::instance()->count(array($_where));
336 336
 	}
337 337
 
338 338
 
@@ -344,20 +344,20 @@  discard block
 block discarded – undo
344 344
 	 * @return int
345 345
 	 * @throws \EE_Error
346 346
 	 */
347
-	protected function _total_registrations_today(){
347
+	protected function _total_registrations_today() {
348 348
 
349
-		$EVT_ID = isset( $this->_req_data['event_id'] ) ? absint( $this->_req_data['event_id'] ) : FALSE;
350
-		$_where = $EVT_ID ? array( 'EVT_ID' => $EVT_ID ) : array();
349
+		$EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : FALSE;
350
+		$_where = $EVT_ID ? array('EVT_ID' => $EVT_ID) : array();
351 351
 		$current_date = date('Y-m-d', current_time('timestamp'));
352 352
 		$time_start = ' 00:00:00';
353 353
 		$time_end = ' 23:59:59';
354
-		$_where['REG_date']= array('BETWEEN',
354
+		$_where['REG_date'] = array('BETWEEN',
355 355
 			array(
356
-				EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $current_date . $time_start, 'Y-m-d H:i:s' ),
357
-				EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $current_date . $time_end, 'Y-m-d H:i:s' )
356
+				EEM_Registration::instance()->convert_datetime_for_query('REG_date', $current_date.$time_start, 'Y-m-d H:i:s'),
357
+				EEM_Registration::instance()->convert_datetime_for_query('REG_date', $current_date.$time_end, 'Y-m-d H:i:s')
358 358
 		));
359
-		$_where['STS_ID'] = array( '!=', EEM_Registration::status_id_incomplete );
360
-		return EEM_Registration::instance()->count(array( $_where ) );
359
+		$_where['STS_ID'] = array('!=', EEM_Registration::status_id_incomplete);
360
+		return EEM_Registration::instance()->count(array($_where));
361 361
 	}
362 362
 
363 363
 
@@ -370,12 +370,12 @@  discard block
 block discarded – undo
370 370
 	 * @return string
371 371
 	 * @throws \EE_Error
372 372
 	 */
373
-    public function column_cb($item){
373
+    public function column_cb($item) {
374 374
 	/** checkbox/lock **/
375
-	$transaction = $item->get_first_related( 'Transaction' );
376
-	$payment_count = $transaction instanceof EE_Transaction ? $transaction->count_related( 'Payment' ) : 0;
375
+	$transaction = $item->get_first_related('Transaction');
376
+	$payment_count = $transaction instanceof EE_Transaction ? $transaction->count_related('Payment') : 0;
377 377
 	    return $payment_count > 0
378
-		    ? sprintf( '<input type="checkbox" name="_REG_ID[]" value="%1$s" />', $item->ID() )
378
+		    ? sprintf('<input type="checkbox" name="_REG_ID[]" value="%1$s" />', $item->ID())
379 379
 		      . '<span class="ee-lock-icon"></span>'
380 380
 		    : sprintf(
381 381
 			    '<input type="checkbox" name="_REG_ID[]" value="%1$s" />',
@@ -393,14 +393,14 @@  discard block
 block discarded – undo
393 393
 	 * @return string
394 394
 	 * @throws \EE_Error
395 395
 	 */
396
-	public function column__REG_ID(EE_Registration $item){
396
+	public function column__REG_ID(EE_Registration $item) {
397 397
 		$attendee = $item->attendee();
398 398
 		$content = $item->ID();
399 399
 		$content .= '<div class="show-on-mobile-view-only">';
400 400
 		$content .= '<br>';
401 401
 		$content .= $attendee instanceof EE_Attendee ? $attendee->full_name() : '';
402
-		$content .= '&nbsp;' . sprintf(__( '(%1$s / %2$s)', 'event_espresso' ), $item->count(), $item->group_size());
403
-		$content .= '<br>' . sprintf( __( 'Reg Code: %s', 'event_espresso' ), $item->get('REG_code') );
402
+		$content .= '&nbsp;'.sprintf(__('(%1$s / %2$s)', 'event_espresso'), $item->count(), $item->group_size());
403
+		$content .= '<br>'.sprintf(__('Reg Code: %s', 'event_espresso'), $item->get('REG_code'));
404 404
 		$content .= '</div>';
405 405
 		return $content;
406 406
 	}
@@ -415,12 +415,12 @@  discard block
 block discarded – undo
415 415
 	 * @return string
416 416
 	 * @throws \EE_Error
417 417
 	 */
418
-	public function column__REG_date(EE_Registration $item){
418
+	public function column__REG_date(EE_Registration $item) {
419 419
 		$this->_set_related_details($item);
420 420
        		 //Build row actions
421
-		$view_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=> $this->_transaction_details['id'] ), TXN_ADMIN_URL );
422
-		$view_link = EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '<a class="ee-status-color-' . $this->_transaction_details['status'] . '" href="'.$view_lnk_url.'" title="' . esc_attr( $this->_transaction_details['title_attr'] ) . '">' . $item->get_i18n_datetime( 'REG_date' ) . '</a>' : $item->get_i18n_datetime( 'REG_date' );
423
-		$view_link .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $this->_transaction_details['status'], false, 'sentence' ) . '</span>';
421
+		$view_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=> $this->_transaction_details['id']), TXN_ADMIN_URL);
422
+		$view_link = EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '<a class="ee-status-color-'.$this->_transaction_details['status'].'" href="'.$view_lnk_url.'" title="'.esc_attr($this->_transaction_details['title_attr']).'">'.$item->get_i18n_datetime('REG_date').'</a>' : $item->get_i18n_datetime('REG_date');
423
+		$view_link .= '<br><span class="ee-status-text-small">'.EEH_Template::pretty_status($this->_transaction_details['status'], false, 'sentence').'</span>';
424 424
 		return $view_link;
425 425
 	}
426 426
 
@@ -434,18 +434,18 @@  discard block
 block discarded – undo
434 434
 	 * @return string
435 435
 	 * @throws \EE_Error
436 436
 	 */
437
-	public function column_event_name(EE_Registration $item){
438
-		$this->_set_related_details( $item );
437
+	public function column_event_name(EE_Registration $item) {
438
+		$this->_set_related_details($item);
439 439
 		// page=espresso_events&action=edit_event&EVT_ID=2&edit_event_nonce=cf3a7e5b62
440
-		$edit_event_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit', 'post'=>$item->event_ID() ), EVENTS_ADMIN_URL );
440
+		$edit_event_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit', 'post'=>$item->event_ID()), EVENTS_ADMIN_URL);
441 441
 		$event_name = $item->event_name();
442 442
 		$event_name = $event_name ? $event_name : __("No Associated Event", 'event_espresso');
443
-		$edit_event = EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'edit_event', $item->event_ID() ) ? '<a class="ee-status-color-' . $this->_event_details['status'] . '" href="' . $edit_event_url . '" title="' . esc_attr( $this->_event_details['title_attr'] ) .'">' .  wp_trim_words( $event_name, 30, '...' ) . '</a>' : wp_trim_words( $event_name, 30, '...' ) ;
443
+		$edit_event = EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'edit_event', $item->event_ID()) ? '<a class="ee-status-color-'.$this->_event_details['status'].'" href="'.$edit_event_url.'" title="'.esc_attr($this->_event_details['title_attr']).'">'.wp_trim_words($event_name, 30, '...').'</a>' : wp_trim_words($event_name, 30, '...');
444 444
 
445
-		$edit_event_url = EE_Admin_Page::add_query_args_and_nonce( array( 'event_id'=>$item->event_ID() ), REG_ADMIN_URL );
446
-		$actions['event_filter'] = '<a href="' . $edit_event_url . '" title="' . sprintf( esc_attr__( 'Filter this list to only show registrations for %s', 'event_espresso' ), $event_name ) .'">' .  __( 'View Registrations', 'event_espresso' ) . '</a>';
445
+		$edit_event_url = EE_Admin_Page::add_query_args_and_nonce(array('event_id'=>$item->event_ID()), REG_ADMIN_URL);
446
+		$actions['event_filter'] = '<a href="'.$edit_event_url.'" title="'.sprintf(esc_attr__('Filter this list to only show registrations for %s', 'event_espresso'), $event_name).'">'.__('View Registrations', 'event_espresso').'</a>';
447 447
 
448
-		return sprintf('%1$s %2$s', $edit_event, $this->row_actions($actions) );
448
+		return sprintf('%1$s %2$s', $edit_event, $this->row_actions($actions));
449 449
 	}
450 450
 
451 451
 
@@ -458,18 +458,18 @@  discard block
 block discarded – undo
458 458
 	 * @return string
459 459
 	 * @throws \EE_Error
460 460
 	 */
461
-   	public function column_DTT_EVT_start(EE_Registration $item){
461
+   	public function column_DTT_EVT_start(EE_Registration $item) {
462 462
 		$datetime_strings = array();
463
-		$ticket = $item->ticket( TRUE );
464
-		if ( $ticket instanceof EE_Ticket ) {
463
+		$ticket = $item->ticket(TRUE);
464
+		if ($ticket instanceof EE_Ticket) {
465 465
 			$remove_defaults = array('default_where_conditions' => 'none');
466 466
 			$datetimes = $ticket->datetimes($remove_defaults);
467
-			foreach($datetimes as $datetime){
468
-				$datetime_strings[] = $datetime->get_i18n_datetime( 'DTT_EVT_start' );
467
+			foreach ($datetimes as $datetime) {
468
+				$datetime_strings[] = $datetime->get_i18n_datetime('DTT_EVT_start');
469 469
 			}
470
-			return implode("<br />",$datetime_strings);
470
+			return implode("<br />", $datetime_strings);
471 471
 		} else {
472
-			return __( 'There is no ticket on this registration', 'event_espresso' );
472
+			return __('There is no ticket on this registration', 'event_espresso');
473 473
 		}
474 474
     }
475 475
 
@@ -483,45 +483,45 @@  discard block
 block discarded – undo
483 483
 	 * @return string
484 484
 	 * @throws \EE_Error
485 485
 	 */
486
-   	public function column_ATT_fname(EE_Registration $item){
486
+   	public function column_ATT_fname(EE_Registration $item) {
487 487
    		$attendee = $item->attendee();
488 488
 
489
-		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL );
489
+		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$item->ID()), REG_ADMIN_URL);
490 490
 		$attendee_name = $attendee instanceof EE_Attendee ? $attendee->full_name() : '';
491
-		$link = EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $item->ID() ) ? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '">' . $attendee_name . '</a>' : $attendee_name;
491
+		$link = EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $item->ID()) ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('View Registration Details', 'event_espresso').'">'.$attendee_name.'</a>' : $attendee_name;
492 492
 		$link .= $item->count() === 1 ? '&nbsp;<sup><div class="dashicons dashicons-star-filled lt-blue-icon ee-icon-size-8"></div></sup>' : '';
493 493
 
494 494
 		$t = $item->get_first_related('Transaction');
495 495
 		$payment_count = $t instanceof EE_Transaction ? $t->count_related('Payment') : 0;
496 496
 
497 497
 	    //append group count to name
498
-	    $link .= '&nbsp;' . sprintf(__( '(%1$s / %2$s)', 'event_espresso' ), $item->count(), $item->group_size());
498
+	    $link .= '&nbsp;'.sprintf(__('(%1$s / %2$s)', 'event_espresso'), $item->count(), $item->group_size());
499 499
 
500 500
 	    //append reg_code
501
-	    $link .= '<br>' . sprintf( __( 'Reg Code: %s', 'event_espresso' ), $item->get('REG_code') );
501
+	    $link .= '<br>'.sprintf(__('Reg Code: %s', 'event_espresso'), $item->get('REG_code'));
502 502
 
503 503
 	    //reg status text for accessibility
504
-	    $link .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $item->status_ID(), false, 'sentence' ) . '</span>';
504
+	    $link .= '<br><span class="ee-status-text-small">'.EEH_Template::pretty_status($item->status_ID(), false, 'sentence').'</span>';
505 505
 
506 506
 		//trash/restore/delete actions
507 507
 		$actions = array();
508
-		if ( $this->_view !== 'trash' && $payment_count === 0 && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_registration', 'espresso_registrations_trash_registrations', $item->ID() ) ) {
509
-			$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'trash_registrations', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL );
510
-			$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="' . esc_attr__( 'Trash Registration', 'event_espresso' ) . '">' . __( 'Trash', 'event_espresso' ) . '</a>';
511
-		} elseif ( $this->_view === 'trash' ) {
508
+		if ($this->_view !== 'trash' && $payment_count === 0 && EE_Registry::instance()->CAP->current_user_can('ee_delete_registration', 'espresso_registrations_trash_registrations', $item->ID())) {
509
+			$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'trash_registrations', '_REG_ID'=>$item->ID()), REG_ADMIN_URL);
510
+			$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Trash Registration', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>';
511
+		} elseif ($this->_view === 'trash') {
512 512
 			// restore registration link
513
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_registration', 'espresso_registrations_restore_registrations', $item->ID() ) ) {
514
-				$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_registrations', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL );
515
-				$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Registration', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>';
513
+			if (EE_Registry::instance()->CAP->current_user_can('ee_delete_registration', 'espresso_registrations_restore_registrations', $item->ID())) {
514
+				$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_registrations', '_REG_ID'=>$item->ID()), REG_ADMIN_URL);
515
+				$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Registration', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>';
516 516
 			}
517
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_registration', 'espresso_registrations_ee_delete_registrations', $item->ID() ) ) {
518
-				$delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'delete_registrations', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL );
517
+			if (EE_Registry::instance()->CAP->current_user_can('ee_delete_registration', 'espresso_registrations_ee_delete_registrations', $item->ID())) {
518
+				$delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'delete_registrations', '_REG_ID'=>$item->ID()), REG_ADMIN_URL);
519 519
 
520
-				$actions['delete'] = '<a href="'.$delete_lnk_url.'" title="' . esc_attr__( 'Delete Registration Permanently', 'event_espresso' ). '">' . __( 'Delete', 'event_espresso' ) . '</a>';
520
+				$actions['delete'] = '<a href="'.$delete_lnk_url.'" title="'.esc_attr__('Delete Registration Permanently', 'event_espresso').'">'.__('Delete', 'event_espresso').'</a>';
521 521
 			}
522 522
 		}
523 523
 
524
-		return sprintf('%1$s %2$s', $link, $this->row_actions($actions) );
524
+		return sprintf('%1$s %2$s', $link, $this->row_actions($actions));
525 525
 	}
526 526
 
527 527
 
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
 	 * @return string
535 535
 	 * @throws \EE_Error
536 536
 	 */
537
-	public function column_ATT_email( EE_Registration $item ) {
537
+	public function column_ATT_email(EE_Registration $item) {
538 538
 		$attendee = $item->get_first_related('Attendee');
539 539
 		return ! $attendee instanceof EE_Attendee ? __('No attached contact record.', 'event_espresso') : $attendee->email();
540 540
 	}
@@ -548,8 +548,8 @@  discard block
 block discarded – undo
548 548
 	 * @param \EE_Registration $item
549 549
 	 * @return string
550 550
 	 */
551
-	public function column__REG_count(EE_Registration $item){
552
-		return  sprintf(__( '%1$s / %2$s', 'event_espresso' ), $item->count(), $item->group_size());
551
+	public function column__REG_count(EE_Registration $item) {
552
+		return  sprintf(__('%1$s / %2$s', 'event_espresso'), $item->count(), $item->group_size());
553 553
 	}
554 554
 
555 555
 
@@ -561,16 +561,16 @@  discard block
 block discarded – undo
561 561
 	 * @param \EE_Registration $item
562 562
 	 * @return string
563 563
 	 */
564
-	public function column_PRC_amount(EE_Registration $item){
564
+	public function column_PRC_amount(EE_Registration $item) {
565 565
 		$ticket = $item->ticket();
566 566
 
567
-		$content = isset( $_GET['event_id'] ) && $ticket instanceof EE_Ticket ? '<span class="TKT_name">' . $ticket->name() . '</span><br />' : '';
567
+		$content = isset($_GET['event_id']) && $ticket instanceof EE_Ticket ? '<span class="TKT_name">'.$ticket->name().'</span><br />' : '';
568 568
 
569
-		if ( $item->final_price() > 0 ) {
570
-			$content .= '<span class="reg-pad-rght">' . $item->pretty_final_price() . '</span>';
569
+		if ($item->final_price() > 0) {
570
+			$content .= '<span class="reg-pad-rght">'.$item->pretty_final_price().'</span>';
571 571
 		} else {
572 572
 			// free event
573
-			$content .= '<span class="reg-overview-free-event-spn reg-pad-rght">' . __( 'free', 'event_espresso' ) . '</span>';
573
+			$content .= '<span class="reg-overview-free-event-spn reg-pad-rght">'.__('free', 'event_espresso').'</span>';
574 574
 		}
575 575
 
576 576
 		return $content;
@@ -586,11 +586,11 @@  discard block
 block discarded – undo
586 586
 	 * @param \EE_Registration $item
587 587
 	 * @return string
588 588
 	 */
589
-	public function column__REG_final_price(EE_Registration $item){
589
+	public function column__REG_final_price(EE_Registration $item) {
590 590
 		$ticket = $item->ticket();
591
-		$content = isset( $_GET['event_id'] ) || ! $ticket instanceof EE_Ticket ? '' : '<span class="TKT_name">' . $ticket->name() . '</span><br />';
591
+		$content = isset($_GET['event_id']) || ! $ticket instanceof EE_Ticket ? '' : '<span class="TKT_name">'.$ticket->name().'</span><br />';
592 592
 
593
-		$content .= '<span class="reg-pad-rght">' .  $item->pretty_final_price() . '</span>';
593
+		$content .= '<span class="reg-pad-rght">'.$item->pretty_final_price().'</span>';
594 594
 		return $content;
595 595
 
596 596
 	}
@@ -604,13 +604,13 @@  discard block
 block discarded – undo
604 604
 	 * @param \EE_Registration $item
605 605
 	 * @return string
606 606
 	 */
607
-	public function column__REG_paid(EE_Registration $item){
607
+	public function column__REG_paid(EE_Registration $item) {
608 608
 		$payment_method = $item->payment_method();
609
-		$payment_method_name = $payment_method instanceof EE_Payment_Method ? $payment_method->admin_name() : __( 'Unknown', 'event_espresso' );
609
+		$payment_method_name = $payment_method instanceof EE_Payment_Method ? $payment_method->admin_name() : __('Unknown', 'event_espresso');
610 610
 
611
-		$content = '<span class="reg-pad-rght">' .  $item->pretty_paid() . '</span>';
612
-		if ( $item->paid() > 0 ) {
613
-			$content .= '<br><span class="ee-status-text-small">' . sprintf( __( '...via %s', 'event_espresso' ), $payment_method_name ) . '</span>';
611
+		$content = '<span class="reg-pad-rght">'.$item->pretty_paid().'</span>';
612
+		if ($item->paid() > 0) {
613
+			$content .= '<br><span class="ee-status-text-small">'.sprintf(__('...via %s', 'event_espresso'), $payment_method_name).'</span>';
614 614
 		}
615 615
 		return $content;
616 616
 	}
@@ -625,11 +625,11 @@  discard block
 block discarded – undo
625 625
 	 * @return string
626 626
 	 * @throws \EE_Error
627 627
 	 */
628
-	public function column_TXN_total(EE_Registration $item){
629
-		if($item->transaction()){
630
-			$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID() ), TXN_ADMIN_URL );
631
-			return EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction', $item->transaction_ID() ) ? '<span class="reg-pad-rght"><a class="status-'. $item->transaction()->status_ID() .'" href="'.$view_txn_lnk_url.'"  title="' . esc_attr__( 'View Transaction', 'event_espresso' ) . '">'  . $item->transaction()->pretty_total() . '</a></span>' : '<span class="reg-pad-rght">' . $item->transaction()->pretty_total() . '</span>';
632
-		}else{
628
+	public function column_TXN_total(EE_Registration $item) {
629
+		if ($item->transaction()) {
630
+			$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID()), TXN_ADMIN_URL);
631
+			return EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction', $item->transaction_ID()) ? '<span class="reg-pad-rght"><a class="status-'.$item->transaction()->status_ID().'" href="'.$view_txn_lnk_url.'"  title="'.esc_attr__('View Transaction', 'event_espresso').'">'.$item->transaction()->pretty_total().'</a></span>' : '<span class="reg-pad-rght">'.$item->transaction()->pretty_total().'</span>';
632
+		} else {
633 633
 			return __("None", "event_espresso");
634 634
 		}
635 635
 	}
@@ -644,15 +644,15 @@  discard block
 block discarded – undo
644 644
 	 * @return string
645 645
 	 * @throws \EE_Error
646 646
 	 */
647
-	public function column_TXN_paid(EE_Registration $item){
647
+	public function column_TXN_paid(EE_Registration $item) {
648 648
 
649
-		if ( $item->count() === 1 ) {
649
+		if ($item->count() === 1) {
650 650
 			$transaction = $item->transaction() ? $item->transaction() : EE_Transaction::new_instance();
651
-			if ( $transaction->paid() >= $transaction->total() ) {
651
+			if ($transaction->paid() >= $transaction->total()) {
652 652
 				return '<span class="reg-pad-rght"><div class="dashicons dashicons-yes green-icon"></div></span>';
653 653
 			} else {
654
-				$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID() ), TXN_ADMIN_URL );
655
-				return EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction', $item->transaction_ID() ) ? '<span class="reg-pad-rght"><a class="status-'. $transaction->status_ID() .'" href="'.$view_txn_lnk_url.'"  title="' . esc_attr__( 'View Transaction', 'event_espresso' ) . '">' . $item->transaction()->pretty_paid() . '</a><span>' : '<span class="reg-pad-rght">' . $item->transaction()->pretty_paid() . '</span>';
654
+				$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID()), TXN_ADMIN_URL);
655
+				return EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction', $item->transaction_ID()) ? '<span class="reg-pad-rght"><a class="status-'.$transaction->status_ID().'" href="'.$view_txn_lnk_url.'"  title="'.esc_attr__('View Transaction', 'event_espresso').'">'.$item->transaction()->pretty_paid().'</a><span>' : '<span class="reg-pad-rght">'.$item->transaction()->pretty_paid().'</span>';
656 656
 			}
657 657
 		}
658 658
 
@@ -673,42 +673,42 @@  discard block
 block discarded – undo
673 673
 	public function column_actions(EE_Registration $item) {
674 674
 		$actions = array();
675 675
 		$attendee = $item->attendee();
676
-		$this->_set_related_details( $item );
676
+		$this->_set_related_details($item);
677 677
 
678 678
 		//Build row actions
679
-		$view_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL );
680
-		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$item->attendee_ID() ), REG_ADMIN_URL );
679
+		$view_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$item->ID()), REG_ADMIN_URL);
680
+		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$item->attendee_ID()), REG_ADMIN_URL);
681 681
 
682 682
 		// page=attendees&event_admin_reports=resend_email&registration_id=43653465634&event_id=2&form_action=resend_email
683 683
 		//$resend_reg_lnk_url_params = array( 'action'=>'resend_registration', '_REG_ID'=>$item->REG_ID );
684
-		$resend_reg_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'resend_registration', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL, true );
684
+		$resend_reg_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'resend_registration', '_REG_ID'=>$item->ID()), REG_ADMIN_URL, true);
685 685
 
686 686
 
687 687
 		//Build row actions
688
-		$actions['view_lnk'] = EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $item->ID() ) ? '
688
+		$actions['view_lnk'] = EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $item->ID()) ? '
689 689
 			<li>
690
-			<a href="'.$view_lnk_url.'" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '" class="tiny-text">
690
+			<a href="'.$view_lnk_url.'" title="'.esc_attr__('View Registration Details', 'event_espresso').'" class="tiny-text">
691 691
 				<div class="dashicons dashicons-clipboard"></div>
692 692
 			</a>
693 693
 			</li>' : '';
694
-		$actions['edit_lnk'] = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee' ) &&  $attendee instanceof EE_Attendee ?'
694
+		$actions['edit_lnk'] = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') && $attendee instanceof EE_Attendee ? '
695 695
 			<li>
696
-			<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact Details', 'event_espresso' ) . '" class="tiny-text">
696
+			<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact Details', 'event_espresso').'" class="tiny-text">
697 697
 				<div class="ee-icon ee-icon-user-edit ee-icon-size-16"></div>
698 698
 			</a>
699 699
 			</li>' : '';
700
-		$actions['resend_reg_lnk'] = $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_resend_registration', $item->ID() ) ? '
700
+		$actions['resend_reg_lnk'] = $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_resend_registration', $item->ID()) ? '
701 701
 			<li>
702
-			<a href="'.$resend_reg_lnk_url.'" title="' . esc_attr__( 'Resend Registration Details', 'event_espresso' ) . '" class="tiny-text">
702
+			<a href="'.$resend_reg_lnk_url.'" title="'.esc_attr__('Resend Registration Details', 'event_espresso').'" class="tiny-text">
703 703
 				<div class="dashicons dashicons-email-alt"></div>
704 704
 			</a>
705 705
 			</li>' : '';
706 706
 
707 707
 		// page=transactions&action=view_transaction&txn=256&_wpnonce=6414da4dbb
708
-		$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$this->_transaction_details['id'] ), TXN_ADMIN_URL );
709
-		$actions['view_txn_lnk'] = EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction', $this->_transaction_details['id'] ) ? '
708
+		$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$this->_transaction_details['id']), TXN_ADMIN_URL);
709
+		$actions['view_txn_lnk'] = EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction', $this->_transaction_details['id']) ? '
710 710
 			<li>
711
-			<a class="ee-status-color-' . $this->_transaction_details['status'] . ' tiny-text" href="'.$view_txn_lnk_url.'"  title="' . $this->_transaction_details['title_attr'] . '">
711
+			<a class="ee-status-color-' . $this->_transaction_details['status'].' tiny-text" href="'.$view_txn_lnk_url.'"  title="'.$this->_transaction_details['title_attr'].'">
712 712
 				<div class="dashicons dashicons-cart"></div>
713 713
 			</a>
714 714
 			</li>' : '';
@@ -717,17 +717,17 @@  discard block
 block discarded – undo
717 717
 		$actions['dl_invoice_lnk'] = '';
718 718
 		$dl_invoice_lnk_url = $item->invoice_url();
719 719
 		//only show invoice link if message type is active.
720
-		if ( $attendee instanceof EE_Attendee && $item->is_primary_registrant() && EEH_MSG_Template::is_mt_active( 'invoice' ) ) {
720
+		if ($attendee instanceof EE_Attendee && $item->is_primary_registrant() && EEH_MSG_Template::is_mt_active('invoice')) {
721 721
 			$actions['dl_invoice_lnk'] = '
722 722
 		<li>
723
-			<a title="' . esc_attr__( 'View Transaction Invoice', 'event_espresso' ) . '" target="_blank" href="'.$dl_invoice_lnk_url.'" class="tiny-text">
723
+			<a title="' . esc_attr__('View Transaction Invoice', 'event_espresso').'" target="_blank" href="'.$dl_invoice_lnk_url.'" class="tiny-text">
724 724
 				<span class="dashicons dashicons-media-spreadsheet ee-icon-size-18"></span>
725 725
 			</a>
726 726
 		</li>';
727 727
 		}
728 728
 		$actions['filtered_messages_link'] = '';
729 729
 		//message list table link (filtered by REG_ID
730
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_global_messages', 'view_filtered_messages' ) ) {
730
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_global_messages', 'view_filtered_messages')) {
731 731
 			$actions['filtered_messages_link'] = '<li>'
732 732
 			                          . EEH_MSG_Template::get_message_action_link(
733 733
 											'see_notifications_for',
@@ -738,9 +738,9 @@  discard block
 block discarded – undo
738 738
 											)
739 739
 			                          . '</li>';
740 740
 		}
741
-		$actions = apply_filters( 'FHEE__EE_Registrations_List_Table__column_actions__actions', $actions, $item, $this );
741
+		$actions = apply_filters('FHEE__EE_Registrations_List_Table__column_actions__actions', $actions, $item, $this);
742 742
 		return $this->_action_string(
743
-			implode( '',  $actions ),
743
+			implode('', $actions),
744 744
 			$item,
745 745
 			'ul',
746 746
 			'reg-overview-actions-ul'
Please login to merge, or discard this patch.
templates/attendee_address_details_metabox_content.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-EEH_Template_Validator::verify_instanceof( $attendee, '$attendee', 'EE_Attendee');
2
+EEH_Template_Validator::verify_instanceof($attendee, '$attendee', 'EE_Attendee');
3 3
 /**
4 4
  * @var $attendee - instance of EE_Attendee
5 5
  */
Please login to merge, or discard this patch.
admin_pages/support/Support_Admin_Page.core.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 class Support_Admin_Page extends EE_Admin_Page {
31 31
 
32 32
 
33
-	public function __construct( $routing = TRUE ) {
34
-		parent::__construct( $routing );
33
+	public function __construct($routing = TRUE) {
34
+		parent::__construct($routing);
35 35
 	}
36 36
 
37 37
 
@@ -84,14 +84,14 @@  discard block
 block discarded – undo
84 84
 				'nav' => array(
85 85
 					'label' => __('Shortcodes', 'event_espresso'),
86 86
 					'order' => 30),
87
-				'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array('_shortcodes_boxes' ) ),
87
+				'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_shortcodes_boxes')),
88 88
 				'require_nonce' => FALSE
89 89
 				),
90 90
 			'contact_support' => array(
91 91
 				'nav' => array(
92 92
 					'label' => __('Support', 'event_espresso'),
93 93
 					'order' => 40),
94
-				'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array( '_support_boxes' ) ),
94
+				'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_support_boxes')),
95 95
 				'require_nonce' => FALSE
96 96
 				),
97 97
 			'developers' => array(
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 
120 120
 
121 121
 	protected function _installation() {
122
-		$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_installation.template.php';
123
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, '', TRUE);
122
+		$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_installation.template.php';
123
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, '', TRUE);
124 124
 		$this->display_admin_page_with_sidebar();
125 125
 	}
126 126
 
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
 			'other_resources' => __('Other Resources', 'event_espresso')
146 146
 			);
147 147
 
148
-		foreach ( $boxes as $box => $label ) {
149
-			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_' . $box . '.template.php';
148
+		foreach ($boxes as $box => $label) {
149
+			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_'.$box.'.template.php';
150 150
 			$callback_args = array('template_path' => $template_path);
151
-			add_meta_box( 'espresso_' . $box . '_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen->id, 'normal', 'high', $callback_args);
151
+			add_meta_box('espresso_'.$box.'_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen->id, 'normal', 'high', $callback_args);
152 152
 		}
153 153
 	}
154 154
 
@@ -169,15 +169,15 @@  discard block
 block discarded – undo
169 169
 			'shortcodes_event_listings' => __('Event Listings', 'event_espresso'),
170 170
 			'shortcodes_ticket_selector' => __('Event Ticket Selector', 'event_espresso'),
171 171
 			'shortcodes_category' => __('Event Categories', 'event_espresso'),
172
-			'shortcodes_attendee' => __( 'Event Attendees', 'event_espresso' )
172
+			'shortcodes_attendee' => __('Event Attendees', 'event_espresso')
173 173
 			/*'shortcodes_single_events' => __('Single Events', 'event_espresso'),*/
174 174
 			/*'shortcodes_attendee_listings' => __('Attendee Listings', 'event_espresso'),*/
175 175
 			);
176 176
 
177
-		foreach ( $boxes as $box => $label ) {
178
-			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_' . $box . '.template.php';
177
+		foreach ($boxes as $box => $label) {
178
+			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_'.$box.'.template.php';
179 179
 			$callback_args = array('template_path' => $template_path);
180
-			add_meta_box( 'espresso_' . $box . '_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen->id, 'normal', 'high', $callback_args);
180
+			add_meta_box('espresso_'.$box.'_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen->id, 'normal', 'high', $callback_args);
181 181
 		}
182 182
 	}
183 183
 
@@ -196,17 +196,17 @@  discard block
 block discarded – undo
196 196
 			'important_information' => __('Important Information', 'event_espresso')
197 197
 			);
198 198
 
199
-		foreach ( $boxes as $box => $label ) {
200
-			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_' . $box . '.template.php';
199
+		foreach ($boxes as $box => $label) {
200
+			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_'.$box.'.template.php';
201 201
 			$callback_args = array('template_path' => $template_path, 'template_args' => $this->_template_args);
202
-			add_meta_box( 'espresso_' . $box . '_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], $metabox["args"]["template_args"], TRUE );'), $this->_current_screen->id, 'normal', 'high', $callback_args);
202
+			add_meta_box('espresso_'.$box.'_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], $metabox["args"]["template_args"], TRUE );'), $this->_current_screen->id, 'normal', 'high', $callback_args);
203 203
 		}
204 204
 	}
205 205
 
206 206
 
207 207
 	protected function _developers() {
208
-		$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'developers_admin_details.template.php';
209
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, array(), true );
208
+		$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'developers_admin_details.template.php';
209
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, array(), true);
210 210
 		$this->display_admin_page_with_sidebar();
211 211
 	}
212 212
 } //end Support_Admin_Page class
Please login to merge, or discard this patch.
admin_pages/support/Support_Admin_Page_Init.core.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 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
 /**
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 
33 33
 	public function __construct() {
34 34
 		//define some help/support page related constants
35
-		define( 'EE_SUPPORT_PG_SLUG', 'espresso_support' );
36
-		define( 'EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page=' . EE_SUPPORT_PG_SLUG ));
37
-		define( 'EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'support/templates/');
38
-		define( 'EE_SUPPORT_ADMIN', EE_ADMIN_PAGES . 'support/' );
39
-		define( 'EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'support/assets/' );
35
+		define('EE_SUPPORT_PG_SLUG', 'espresso_support');
36
+		define('EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page='.EE_SUPPORT_PG_SLUG));
37
+		define('EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES.'support/templates/');
38
+		define('EE_SUPPORT_ADMIN', EE_ADMIN_PAGES.'support/');
39
+		define('EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL.'support/assets/');
40 40
 		parent::__construct();
41 41
 	}
42 42
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	protected function _set_menu_map() {
48
-		$this->_menu_map = new EE_Admin_Page_Sub_Menu( array(
48
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(array(
49 49
 			'menu_group' => 'extras',
50 50
 			'menu_order' => 30,
51 51
 			'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN,
Please login to merge, or discard this patch.
admin_pages/transactions/Transactions_Admin_Page_Init.core.php 2 patches
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.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -32,16 +32,16 @@  discard block
 block discarded – undo
32 32
 	 */
33 33
 	public function __construct() {
34 34
 
35
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
36
-		if ( ! defined( 'TXN_PG_SLUG' ) ) {
37
-			define( 'TXN_PG_SLUG', 'espresso_transactions' );
38
-			define( 'TXN_PG_NAME', ucwords( str_replace( '_', '', TXN_PG_SLUG ) ) );
39
-			define( 'TXN_ADMIN', EE_ADMIN_PAGES . 'transactions' . DS );
40
-			define( 'TXN_ADMIN_URL', admin_url( 'admin.php?page=' . TXN_PG_SLUG ) );
41
-			define( 'TXN_ASSETS_PATH', TXN_ADMIN . 'assets' . DS );
42
-			define( 'TXN_ASSETS_URL', str_replace( '\\', '/', EE_ADMIN_PAGES_URL . 'transactions/assets' . DS ) );
43
-			define( 'TXN_TEMPLATE_PATH', TXN_ADMIN . 'templates' . DS );
44
-			define( 'TXN_TEMPLATE_URL', str_replace( '\\', '/', EE_ADMIN_PAGES_URL . 'transactions/templates' . DS ) );
35
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
36
+		if ( ! defined('TXN_PG_SLUG')) {
37
+			define('TXN_PG_SLUG', 'espresso_transactions');
38
+			define('TXN_PG_NAME', ucwords(str_replace('_', '', TXN_PG_SLUG)));
39
+			define('TXN_ADMIN', EE_ADMIN_PAGES.'transactions'.DS);
40
+			define('TXN_ADMIN_URL', admin_url('admin.php?page='.TXN_PG_SLUG));
41
+			define('TXN_ASSETS_PATH', TXN_ADMIN.'assets'.DS);
42
+			define('TXN_ASSETS_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL.'transactions/assets'.DS));
43
+			define('TXN_TEMPLATE_PATH', TXN_ADMIN.'templates'.DS);
44
+			define('TXN_TEMPLATE_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL.'transactions/templates'.DS));
45 45
 		}
46 46
 		parent::__construct();
47 47
 	}
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * @return void
64 64
 	 */
65 65
 	protected function _set_menu_map() {
66
-		$this->_menu_map = new EE_Admin_Page_Sub_Menu( array(
66
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(array(
67 67
 			'menu_group' => 'main',
68 68
 			'menu_order' => 50,
69 69
 			'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
Please login to merge, or discard this patch.
admin/extend/general_settings/Extend_General_Settings_Admin_Page.core.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 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
 /**
@@ -32,30 +32,30 @@  discard block
 block discarded – undo
32 32
 
33 33
 
34 34
 
35
-	public function __construct( $routing = TRUE ) {
36
-		parent::__construct( $routing );
37
-		define( 'GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/' );
35
+	public function __construct($routing = TRUE) {
36
+		parent::__construct($routing);
37
+		define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'general_settings/templates/');
38 38
 	}
39 39
 
40 40
 
41 41
 
42 42
 	protected function _extend_page_config() {
43 43
 
44
-		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings';
44
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'general_settings';
45 45
 
46 46
 		//filters and action hooks here
47
-		add_action('AHEE__admin_option_settings__template__before', array( $this, 'use_venue_and_staff_manager_settings'), 10 );
48
-		add_action( 'AHEE__admin_option_settings__template__before', array( $this, 'debug_logging_options' ), 9 );
49
-		add_filter( 'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin', array( $this, 'update_debug_logging_options' ), 10, 1 );
47
+		add_action('AHEE__admin_option_settings__template__before', array($this, 'use_venue_and_staff_manager_settings'), 10);
48
+		add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9);
49
+		add_filter('FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin', array($this, 'update_debug_logging_options'), 10, 1);
50 50
 
51 51
 	}
52 52
 
53 53
 
54 54
 
55
-	public function use_venue_and_staff_manager_settings( $template_args ) {
56
-		$_args['use_personnel_manager_select'] = EEH_Form_Fields::select_input('use_personnel_manager', $template_args['values'], $template_args['use_personnel_manager'] );
57
-		$template = GEN_SET_CAF_TEMPLATE_PATH . 'use_venue_and_staff_manager_settings.template.php';
58
-		EEH_Template::display_template( $template, $_args );
55
+	public function use_venue_and_staff_manager_settings($template_args) {
56
+		$_args['use_personnel_manager_select'] = EEH_Form_Fields::select_input('use_personnel_manager', $template_args['values'], $template_args['use_personnel_manager']);
57
+		$template = GEN_SET_CAF_TEMPLATE_PATH.'use_venue_and_staff_manager_settings.template.php';
58
+		EEH_Template::display_template($template, $_args);
59 59
 	}
60 60
 
61 61
 
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
 	 * @param array $template_args
69 69
 	 * @return void
70 70
 	 */
71
-	public function debug_logging_options( $template_args = array() ) {
71
+	public function debug_logging_options($template_args = array()) {
72 72
 		$template_args['use_full_logging'] = EE_Registry::instance()->CFG->admin->use_full_logging;
73
-		$template_args['use_remote_logging'] = isset( EE_Registry::instance()->CFG->admin->use_remote_logging ) ? absint( EE_Registry::instance()->CFG->admin->use_remote_logging ) : FALSE;
74
-		$template_args['remote_logging_url'] = isset( EE_Registry::instance()->CFG->admin->remote_logging_url ) && ! empty( EE_Registry::instance()->CFG->admin->remote_logging_url ) ? stripslashes( EE_Registry::instance()->CFG->admin->remote_logging_url ) : '';
75
-		$template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php';
76
-		EEH_Template::display_template( $template, $template_args );
73
+		$template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint(EE_Registry::instance()->CFG->admin->use_remote_logging) : FALSE;
74
+		$template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url) && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url) ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : '';
75
+		$template = GEN_SET_CAF_TEMPLATE_PATH.'debug_log_settings.template.php';
76
+		EEH_Template::display_template($template, $template_args);
77 77
 	}
78 78
 
79 79
 
@@ -84,17 +84,17 @@  discard block
 block discarded – undo
84 84
 	 * @param array $admin_options
85 85
 	 * @return array
86 86
 	 */
87
-	public function update_debug_logging_options( $admin_options = array() ) {
88
-		$use_full_logging = isset( $this->_req_data['use_full_logging'] ) ? (bool)absint( $this->_req_data['use_full_logging'] ) : $admin_options->use_full_logging;
87
+	public function update_debug_logging_options($admin_options = array()) {
88
+		$use_full_logging = isset($this->_req_data['use_full_logging']) ? (bool) absint($this->_req_data['use_full_logging']) : $admin_options->use_full_logging;
89 89
 		$admin_options->use_full_logging = $use_full_logging;
90 90
 		
91
-		if ( $use_full_logging === FALSE ) {
92
-			EE_Error::get_notices( FALSE );
91
+		if ($use_full_logging === FALSE) {
92
+			EE_Error::get_notices(FALSE);
93 93
 			EE_Error::reset_notices();
94 94
 		}
95 95
 
96
-		$admin_options->use_remote_logging = isset( $this->_req_data['use_remote_logging'] ) ? absint( $this->_req_data['use_remote_logging'] ) : $admin_options->use_remote_logging;
97
-		$admin_options->remote_logging_url = isset( $this->_req_data['remote_logging_url'] ) ? esc_url_raw( $this->_req_data['remote_logging_url'] ) : $admin_options->remote_logging_url;
96
+		$admin_options->use_remote_logging = isset($this->_req_data['use_remote_logging']) ? absint($this->_req_data['use_remote_logging']) : $admin_options->use_remote_logging;
97
+		$admin_options->remote_logging_url = isset($this->_req_data['remote_logging_url']) ? esc_url_raw($this->_req_data['remote_logging_url']) : $admin_options->remote_logging_url;
98 98
 		return $admin_options;
99 99
 	}
100 100
 
Please login to merge, or discard this patch.
Extend_Registration_Form_Questions_Admin_List_Table.class.php 2 patches
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
@@ -125,8 +126,9 @@  discard block
 block discarded – undo
125 126
 		$actions = array();
126 127
 
127 128
 		//return $item->name();
128
-		if ( !defined('REG_ADMIN_URL') )
129
-			define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
129
+		if ( !defined('REG_ADMIN_URL') ) {
130
+					define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
131
+		}
130 132
 
131 133
 		$edit_query_args = array(
132 134
 				'action' => 'edit_question_group',
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -31,15 +31,15 @@  discard block
 block discarded – undo
31 31
 
32 32
 class Extend_Registration_Form_Questions_Admin_List_Table extends Registration_Form_Questions_Admin_List_Table {
33 33
 
34
-	public function __construct( $admin_page ) {
35
-		parent::__construct( $admin_page );
34
+	public function __construct($admin_page) {
35
+		parent::__construct($admin_page);
36 36
 	}
37 37
 
38 38
 	public function column_display_text(EE_Question $item) {
39 39
 		$system_question = $item->is_system_question();
40 40
 		$actions = array();
41 41
 
42
-		if ( !defined('REG_ADMIN_URL') )
42
+		if ( ! defined('REG_ADMIN_URL'))
43 43
 			define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
44 44
 
45 45
 		$edit_query_args = array(
@@ -67,35 +67,35 @@  discard block
 block discarded – undo
67 67
 				'QST_ID' => $item->ID()
68 68
 			);
69 69
 
70
-		$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_FORMS_ADMIN_URL );
71
-		$trash_link = EE_Admin_Page::add_query_args_and_nonce( $trash_query_args, EE_FORMS_ADMIN_URL );
72
-		$restore_link = EE_Admin_Page::add_query_args_and_nonce( $restore_query_args, EE_FORMS_ADMIN_URL );
73
-		$delete_link = EE_Admin_Page::add_query_args_and_nonce( $delete_query_args, EE_FORMS_ADMIN_URL );
74
-		$duplicate_link = EE_Admin_Page::add_query_args_and_nonce( $duplicate_query_args, EE_FORMS_ADMIN_URL );
70
+		$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_FORMS_ADMIN_URL);
71
+		$trash_link = EE_Admin_Page::add_query_args_and_nonce($trash_query_args, EE_FORMS_ADMIN_URL);
72
+		$restore_link = EE_Admin_Page::add_query_args_and_nonce($restore_query_args, EE_FORMS_ADMIN_URL);
73
+		$delete_link = EE_Admin_Page::add_query_args_and_nonce($delete_query_args, EE_FORMS_ADMIN_URL);
74
+		$duplicate_link = EE_Admin_Page::add_query_args_and_nonce($duplicate_query_args, EE_FORMS_ADMIN_URL);
75 75
 
76
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_question', 'espresso_registration_form_edit_question', $item->ID() ) ) {
76
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_question', 'espresso_registration_form_edit_question', $item->ID())) {
77 77
 			$actions = array(
78
-				'edit' => '<a href="' . $edit_link . '" title="' . __('Edit Question', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>'
78
+				'edit' => '<a href="'.$edit_link.'" title="'.__('Edit Question', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>'
79 79
 			);
80 80
 		}
81 81
 
82
-		if ( ! $system_question && $this->_view != 'trash' && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_question', 'espresso_registration_form_trash_question', $item->ID() ) ) {
83
-			$actions['delete'] = '<a href="' . $trash_link . '" title="' . __('Trash Question', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>';
82
+		if ( ! $system_question && $this->_view != 'trash' && EE_Registry::instance()->CAP->current_user_can('ee_delete_question', 'espresso_registration_form_trash_question', $item->ID())) {
83
+			$actions['delete'] = '<a href="'.$trash_link.'" title="'.__('Trash Question', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>';
84 84
 		}
85 85
 
86
-		if ( $this->_view == 'trash' ) {
87
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_question', 'espresso_registration_form_restore_question', $item->ID() ) ) {
88
-				$actions['restore'] = '<a href="' . $restore_link . '" title="' . __('Restore Question', 'event_espresso') . '">' . __('Restore', 'event_espresso') . '</a>';
86
+		if ($this->_view == 'trash') {
87
+			if (EE_Registry::instance()->CAP->current_user_can('ee_delete_question', 'espresso_registration_form_restore_question', $item->ID())) {
88
+				$actions['restore'] = '<a href="'.$restore_link.'" title="'.__('Restore Question', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>';
89 89
 			}
90
-			if ( $item->count_related('Answer') === 0 && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_question', 'espresso_registration_form_delete_questions', $item->ID() ) ) {
91
-				$actions['delete'] = '<a href="' . $delete_link . '" title="' . __('Delete Question Permanently', 'event_espresso') . '">' . __('Delete Permanently', 'event_espresso') . '</a>';
90
+			if ($item->count_related('Answer') === 0 && EE_Registry::instance()->CAP->current_user_can('ee_delete_question', 'espresso_registration_form_delete_questions', $item->ID())) {
91
+				$actions['delete'] = '<a href="'.$delete_link.'" title="'.__('Delete Question Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>';
92 92
 			}
93 93
 		}
94
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_questions', 'espresso_registration_form_edit_question' ) ) {
95
-			$actions[ 'duplicate' ] = '<a href="' . $duplicate_link . '" title="' . __('Duplicate Question', 'event_espresso') . '">' . __('Duplicate', 'event_espresso') . '</a>';
94
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_questions', 'espresso_registration_form_edit_question')) {
95
+			$actions['duplicate'] = '<a href="'.$duplicate_link.'" title="'.__('Duplicate Question', 'event_espresso').'">'.__('Duplicate', 'event_espresso').'</a>';
96 96
 		}
97 97
 
98
-		$content = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_question', 'espresso_registration_form_edit_question', $item->ID() ) ? '<strong><a class="row-title" href="' . $edit_link . '">' . $item->display_text() . '</a></strong>' : $item->display_text();
98
+		$content = EE_Registry::instance()->CAP->current_user_can('ee_edit_question', 'espresso_registration_form_edit_question', $item->ID()) ? '<strong><a class="row-title" href="'.$edit_link.'">'.$item->display_text().'</a></strong>' : $item->display_text();
99 99
 		$content .= $this->row_actions($actions);
100 100
 		return $content;
101 101
 	}
Please login to merge, or discard this patch.
admin/extend/registrations/Extend_EE_Attendee_Contact_List_Table.class.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 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
 /**
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 				'route' => 'contact_list_report',
37 37
 				'extra_request' =>  
38 38
 						array( 
39
-							'return_url' => urlencode( "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" ) ) 
39
+							'return_url' => urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}") ) 
40 40
 			),
41 41
 //			'contact_list_export'=> array(
42 42
 //				'route' => 'contact_list_export'
Please login to merge, or discard this patch.
caffeinated/admin/extend/support/Extend_Support_Admin_Page.core.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 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
 /**
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
  */
30 30
 class Extend_Support_Admin_Page extends Support_Admin_Page {
31 31
 
32
-	public function __construct( $routing = TRUE ) {
33
-		parent::__construct( $routing );
34
-		define( 'EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'support/templates/' );
32
+	public function __construct($routing = TRUE) {
33
+		parent::__construct($routing);
34
+		define('EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'support/templates/');
35 35
 	}
36 36
 
37 37
 
38 38
 
39 39
 
40 40
 	protected function _extend_page_config() {
41
-		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'support';
41
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'support';
42 42
 		//new routes and new configs (or overrides )
43 43
 		$new_page_routes = array(
44 44
 			'faq' => array(
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 				'capability' => 'ee_read_ee'
47 47
 				)
48 48
 			);
49
-		$this->_page_routes = array_merge( $this->_page_routes, $new_page_routes );
49
+		$this->_page_routes = array_merge($this->_page_routes, $new_page_routes);
50 50
 
51 51
 		$new_page_config = array(
52 52
 			'faq' => array(
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 				'require_nonce' => FALSE
58 58
 				)
59 59
 			);
60
-		$this->_page_config = array_merge( $this->_page_config, $new_page_config );
60
+		$this->_page_config = array_merge($this->_page_config, $new_page_config);
61 61
 
62 62
 		$this->_page_config['default']['metaboxes'][] = '_installation_boxes';
63 63
 	}
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 
67 67
 
68 68
 	protected function _faq() {
69
-		$template_path = EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH . 'support_admin_details_faq.template.php';
70
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, '', TRUE);
69
+		$template_path = EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH.'support_admin_details_faq.template.php';
70
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, '', TRUE);
71 71
 		$this->display_admin_page_with_sidebar();
72 72
 
73 73
 	}
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 
76 76
 
77 77
 	protected function _installation_boxes() {
78
-		$callback_args = array('template_path' => EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH . 'support_admin_details_additional_information.template.php');
79
-		add_meta_box( 'espresso_additional_information_support', __('Additional Information', 'event_espresso'), create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE);' ), $this->_current_screen->id, 'normal', 'high', $callback_args);
78
+		$callback_args = array('template_path' => EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH.'support_admin_details_additional_information.template.php');
79
+		add_meta_box('espresso_additional_information_support', __('Additional Information', 'event_espresso'), create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE);'), $this->_current_screen->id, 'normal', 'high', $callback_args);
80 80
 	}
81 81
 
82 82
 
Please login to merge, or discard this patch.