Completed
Branch FET-8394-move-rules-into-core (5a0f96)
by
unknown
09:47 queued 10s
created
extend/registration_form/templates/questions_in_group_meta_box.template.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 //required variables for template:
3 3
 assert($question_group instanceof EE_Question_Group);
4
-assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions)));//list of unused questions
5
-foreach($all_questions as $question_option){
4
+assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions))); //list of unused questions
5
+foreach ($all_questions as $question_option) {
6 6
 	assert($question_option);
7 7
 	assert($question_option instanceof EE_Question);
8 8
 }
9 9
 ?>
10
-<h4><?php _e('Check off all questions that you wish to appear in this group.','event_espresso');?></h4>
10
+<h4><?php _e('Check off all questions that you wish to appear in this group.', 'event_espresso'); ?></h4>
11 11
 <ul>
12 12
 	<?php 
13
-	foreach( $all_questions as $question_ID=>$question ){
13
+	foreach ($all_questions as $question_ID=>$question) {
14 14
 		/*@var $question EE_Question*/
15
-		$checked = array_key_exists( $question_ID, $question_group->questions() ) ? ' checked="checked"' : '';
15
+		$checked = array_key_exists($question_ID, $question_group->questions()) ? ' checked="checked"' : '';
16 16
 	?>
17 17
 	<li>
18 18
 		<label for="question-<?php echo $question_ID?>">
19
-			<input type="checkbox" name="questions[<?php echo $question_ID;?>]" id="question-<?php echo $question_ID;?>" value="<?php echo $question_ID;?>"<?php echo $checked;?>/>
19
+			<input type="checkbox" name="questions[<?php echo $question_ID; ?>]" id="question-<?php echo $question_ID; ?>" value="<?php echo $question_ID; ?>"<?php echo $checked; ?>/>
20 20
 			<?php echo $question->display_text()?>				
21 21
 		</label>
22 22
 	</li>
Please login to merge, or discard this patch.
admin/extend/registration_form/templates/reg_form_settings.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <div class="padding">
2
-		<?php do_action( 'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template' ); ?>
2
+		<?php do_action('AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template'); ?>
3 3
 </div>
Please login to merge, or discard this patch.
admin/extend/registrations/EE_Event_Registrations_List_Table.class.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
 	/**
186 186
 	 * 		column_REG_att_checked_in
187
-	*/
187
+	 */
188 188
 	function column__REG_att_checked_in(EE_Registration $item){
189 189
 		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : 0;
190 190
 		$checkinstatus = $item->check_in_status_for_datetime($DTT_ID);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
 	/**
235 235
 	 * 		column_REG_count
236
-	*/
236
+	 */
237 237
 	function column__REG_count(EE_Registration $item){
238 238
 		return sprintf(__( '%s of %s', 'event_espresso' ),$item->count(), $item->group_size());
239 239
 	}
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 
276 276
 	/**
277 277
 	 * 		column_REG_final_price
278
-	*/
278
+	 */
279 279
 	function column__REG_final_price(EE_Registration $item){
280 280
 		return '<span class="reg-pad-rght">' .  ' ' . $item->pretty_final_price() . '</span>';
281 281
 	}
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
 	/**
288 288
 	 * 		column_TXN_paid
289
-	*/
289
+	 */
290 290
 	function column_TXN_paid(EE_Registration $item){
291 291
 
292 292
 		if ( $item->count() == 1 ) {
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
 	/**
315 315
 	 * 		column_TXN_total
316
-	*/
316
+	 */
317 317
 	function column_TXN_total(EE_Registration $item){
318 318
 		$txn = $item->transaction();
319 319
 		$view_txn_url = add_query_arg( array('action' => 'view_transaction', 'TXN_ID' => $txn->ID() ), TXN_ADMIN_URL );
Please login to merge, or discard this patch.
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	 */
15 15
 	protected $_evt = NULL;
16 16
 
17
-	public function __construct( $admin_page ) {
17
+	public function __construct($admin_page) {
18 18
 		parent::__construct($admin_page);
19 19
 		$this->_status = $this->_admin_page->get_registration_status_array();
20 20
 	}
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
 
24 24
 
25 25
 	protected function _setup_data() {
26
-		$this->_data = $this->_view != 'trash' ? $this->_admin_page->get_event_attendees( $this->_per_page ) : $this->_admin_page->get_event_attendees( $this->_per_page, FALSE, TRUE );
27
-		$this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_event_attendees(  $this->_per_page, TRUE ) : $this->_admin_page->get_event_attendees(  $this->_per_page, TRUE, TRUE);
26
+		$this->_data = $this->_view != 'trash' ? $this->_admin_page->get_event_attendees($this->_per_page) : $this->_admin_page->get_event_attendees($this->_per_page, FALSE, TRUE);
27
+		$this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_event_attendees($this->_per_page, TRUE) : $this->_admin_page->get_event_attendees($this->_per_page, TRUE, TRUE);
28 28
 	}
29 29
 
30 30
 
31 31
 
32 32
 
33 33
 	protected function _set_properties() {
34
-		$evt_id = isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : NULL;
34
+		$evt_id = isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : NULL;
35 35
 
36 36
 		$this->_wp_list_args = array(
37 37
 			'singular' => __('registrant', 'event_espresso'),
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
 			);
42 42
 
43 43
 		$columns['_Reg_Status'] = '';
44
-		if ( !empty( $evt_id ) )
45
-			$columns['cb'] =  '<input type="checkbox" />'; //Render a checkbox instead of text
44
+		if ( ! empty($evt_id))
45
+			$columns['cb'] = '<input type="checkbox" />'; //Render a checkbox instead of text
46 46
 
47 47
 		$this->_columns = array(
48 48
 				'_REG_att_checked_in' => '<span class="dashicons dashicons-yes ee-icon-size-18"></span>',
@@ -50,36 +50,36 @@  discard block
 block discarded – undo
50 50
 				'ATT_name' =>  __('Registrant', 'event_espresso'),
51 51
 				'ATT_email' =>  __('Email Address', 'event_espresso'),
52 52
 				'Event' => __('Event', 'event_espresso'),
53
-				'_REG_code' => __( 'Reg Code', 'event_espresso' ),
53
+				'_REG_code' => __('Reg Code', 'event_espresso'),
54 54
 				'PRC_name' => __('TKT Option', 'event_espresso'),
55 55
 				'_REG_final_price' => __('Price', 'event_espresso'),
56 56
 				'TXN_paid' => __('Paid', 'event_espresso'),
57 57
 				'TXN_total' => __('Total', 'event_espresso')
58 58
 			);
59 59
 
60
-		$this->_columns = array_merge( $columns, $this->_columns);
60
+		$this->_columns = array_merge($columns, $this->_columns);
61 61
 
62
-		if ( !empty( $evt_id ) && EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'espresso_registrations_registrations_reports', $evt_id )  ) {
62
+		if ( ! empty($evt_id) && EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'espresso_registrations_registrations_reports', $evt_id)) {
63 63
 			$this->_bottom_buttons = array(
64 64
 				'report'=> array(
65 65
 					'route' => 'registrations_report',
66
-					'extra_request' => !empty($evt_id) ? array('EVT_ID'=>$evt_id) : NULL
66
+					'extra_request' => ! empty($evt_id) ? array('EVT_ID'=>$evt_id) : NULL
67 67
 				)
68 68
 			);
69 69
 		}
70 70
 
71 71
 		$this->_sortable_columns = array(
72 72
 			 //true means its already sorted
73
-			'ATT_name' => array( 'ATT_name' => TRUE ),
74
-			'_REG_code' => array( '_REG_code' => TRUE ),
75
-			'Event' => array( 'Event.EVT.Name' => FALSE )
73
+			'ATT_name' => array('ATT_name' => TRUE),
74
+			'_REG_code' => array('_REG_code' => TRUE),
75
+			'Event' => array('Event.EVT.Name' => FALSE)
76 76
 		);
77 77
 
78 78
 		$this->_hidden_columns = array();
79 79
 
80 80
 
81 81
 		$this->_evt = EEM_Event::instance()->get_one_by_ID($evt_id);
82
-		$this->_dtts_for_event = !empty($evt_id) ? $this->_evt->datetimes_ordered() : array();
82
+		$this->_dtts_for_event = ! empty($evt_id) ? $this->_evt->datetimes_ordered() : array();
83 83
 
84 84
 
85 85
 	}
@@ -91,36 +91,36 @@  discard block
 block discarded – undo
91 91
 	protected function _get_table_filters() {
92 92
 		$filters = $where = array();
93 93
 
94
-		EE_Registry::instance()->load_helper( 'Form_Fields' );
94
+		EE_Registry::instance()->load_helper('Form_Fields');
95 95
 
96
-		if ( empty( $this->_dtts_for_event ) ) {
96
+		if (empty($this->_dtts_for_event)) {
97 97
 			//this means we don't have an event so let's setup a filter dropdown for all the events to select
98 98
 			//note possible capability restrictions
99
-			if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_events', 'get_events') ) {
100
-				$where['status**'] =  array( '!=', 'private' );
99
+			if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_private_events', 'get_events')) {
100
+				$where['status**'] = array('!=', 'private');
101 101
 			}
102 102
 
103
-			if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_events', 'get_events' ) ) {
104
-				$where['EVT_wp_user'] =  get_current_user_id();
103
+			if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_events', 'get_events')) {
104
+				$where['EVT_wp_user'] = get_current_user_id();
105 105
 			}
106 106
 
107
-			$events = EEM_Event::instance()->get_all(array( $where, 'order_by' => array( 'EVT_name' => 'asc' ) ) );
108
-			$evts[] = array('id' => 0, 'text' => __('To toggle Check-in status, select an event', 'event_espresso') );
109
-			foreach ( $events as $evt ) {
107
+			$events = EEM_Event::instance()->get_all(array($where, 'order_by' => array('EVT_name' => 'asc')));
108
+			$evts[] = array('id' => 0, 'text' => __('To toggle Check-in status, select an event', 'event_espresso'));
109
+			foreach ($events as $evt) {
110 110
 				//any registrations for this event?
111
-				if ( ! $evt->get_count_of_all_registrations() )
111
+				if ( ! $evt->get_count_of_all_registrations())
112 112
 					continue;
113
-				$evts[] = array( 'id' => $evt->ID(), 'text' => $evt->get('EVT_name') );
113
+				$evts[] = array('id' => $evt->ID(), 'text' => $evt->get('EVT_name'));
114 114
 			}
115
-			$filters[] = EEH_Form_Fields::select_input( 'event_id', $evts );
115
+			$filters[] = EEH_Form_Fields::select_input('event_id', $evts);
116 116
 
117 117
 		} else {
118 118
 			//DTT datetimes filter
119
-			$cur_dtt = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : $this->_evt->primary_datetime()->ID();
119
+			$cur_dtt = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : $this->_evt->primary_datetime()->ID();
120 120
 			$dtts = array();
121
-			foreach ( $this->_dtts_for_event as $dtt ) {
122
-				$datetime_string = $dtt->start_date_and_time() . ' - ' . $dtt->end_date_and_time();
123
-				$dtts[] = array('id' => $dtt->ID(), 'text' => $datetime_string );
121
+			foreach ($this->_dtts_for_event as $dtt) {
122
+				$datetime_string = $dtt->start_date_and_time().' - '.$dtt->end_date_and_time();
123
+				$dtts[] = array('id' => $dtt->ID(), 'text' => $datetime_string);
124 124
 			}
125 125
 			$filters[] = EEH_Form_Fields::select_input('DTT_ID', $dtts, $cur_dtt);
126 126
 		}
@@ -141,19 +141,19 @@  discard block
 block discarded – undo
141 141
 
142 142
 
143 143
 	protected function _get_total_event_attendees() {
144
-		$EVT_ID = isset($this->_req_data['event_id']) ? absint( $this->_req_data['event_id'] ) : FALSE;
145
-		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
144
+		$EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : FALSE;
145
+		$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
146 146
 		$query_params = array();
147
-		if ($EVT_ID){
148
-			$query_params[0]['EVT_ID']=$EVT_ID;
147
+		if ($EVT_ID) {
148
+			$query_params[0]['EVT_ID'] = $EVT_ID;
149 149
 		}
150 150
 		//if DTT is included we do multiple datetimes.  Otherwise we just do primary datetime
151
-		if ( $DTT_ID ) {
151
+		if ($DTT_ID) {
152 152
 			$query_params[0]['Ticket.Datetime.DTT_ID'] = $DTT_ID;
153 153
 		}
154
-		$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 ) );
154
+		$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));
155 155
 
156
-		$query_params[0]['STS_ID']= array('IN', $status_ids_array );
156
+		$query_params[0]['STS_ID'] = array('IN', $status_ids_array);
157 157
 		return EEM_Registration::instance()->count($query_params);
158 158
 	}
159 159
 
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
 
164 164
 
165 165
 
166
-	function column__Reg_Status( EE_Registration $item ) {
167
-		return '<span class="ee-status-strip ee-status-strip-td reg-status-' . $item->status_ID() . '"></span>';
166
+	function column__Reg_Status(EE_Registration $item) {
167
+		return '<span class="ee-status-strip ee-status-strip-td reg-status-'.$item->status_ID().'"></span>';
168 168
 	}
169 169
 
170 170
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
 
174 174
 	function column_cb($item) {
175
-		return sprintf( '<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', $item->ID() );
175
+		return sprintf('<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', $item->ID());
176 176
 	}
177 177
 
178 178
 
@@ -185,14 +185,14 @@  discard block
 block discarded – undo
185 185
 	/**
186 186
 	 * 		column_REG_att_checked_in
187 187
 	*/
188
-	function column__REG_att_checked_in(EE_Registration $item){
189
-		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : 0;
188
+	function column__REG_att_checked_in(EE_Registration $item) {
189
+		$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : 0;
190 190
 		$checkinstatus = $item->check_in_status_for_datetime($DTT_ID);
191 191
 		$nonce = wp_create_nonce('checkin_nonce');
192
-		$evt_id = isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : NULL;
193
-		$toggle_active = !empty ( $evt_id ) && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_checkin', 'espresso_registrations_toggle_checkin_status', $item->ID() ) ? ' clickable trigger-checkin' : '';
192
+		$evt_id = isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : NULL;
193
+		$toggle_active = ! empty ($evt_id) && EE_Registry::instance()->CAP->current_user_can('ee_edit_checkin', 'espresso_registrations_toggle_checkin_status', $item->ID()) ? ' clickable trigger-checkin' : '';
194 194
 
195
-		 return '<span class="checkin-icons checkedin-status-' . $checkinstatus . $toggle_active . '" data-_regid="' . $item->ID() . '" data-dttid="' . $DTT_ID . '" data-nonce="' . $nonce . '"></span>';
195
+		 return '<span class="checkin-icons checkedin-status-'.$checkinstatus.$toggle_active.'" data-_regid="'.$item->ID().'" data-dttid="'.$DTT_ID.'" data-nonce="'.$nonce.'"></span>';
196 196
 	}
197 197
 
198 198
 
@@ -201,30 +201,30 @@  discard block
 block discarded – undo
201 201
 
202 202
 	function column_ATT_name(EE_Registration $item) {
203 203
 		$attendee = $item->attendee();
204
-		if ( ! $attendee instanceof EE_Attendee ) {
204
+		if ( ! $attendee instanceof EE_Attendee) {
205 205
 			return __('No contact record for this registration.', 'event_espresso');
206 206
 		}
207 207
 
208 208
 		// edit attendee link
209
-		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL );
210
-		$name_link = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_contacts', 'espresso_registrations_edit_attendee' ) ?  '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact', 'event_espresso' ) . '">' . $item->attendee()->full_name() . '</a>' : $item->attendee()->full_name();
209
+		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$item->ID()), REG_ADMIN_URL);
210
+		$name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact', 'event_espresso').'">'.$item->attendee()->full_name().'</a>' : $item->attendee()->full_name();
211 211
 		$name_link .= $item->count() == 1 ? '&nbsp;<sup><div class="dashicons dashicons-star-filled lt-blue-icon ee-icon-size-8"></div></sup>	' : '';
212 212
 
213 213
 		$actions = array();
214
-		$DTT_ID = !empty( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
215
-		$DTT_ID = empty( $DTT_ID ) && !empty( $this->_req_data['event_id'] ) ? EEM_Event::instance()->get_one_by_ID( $this->_req_data['event_id'] )->primary_datetime()->ID() : $DTT_ID;
214
+		$DTT_ID = ! empty($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
215
+		$DTT_ID = empty($DTT_ID) && ! empty($this->_req_data['event_id']) ? EEM_Event::instance()->get_one_by_ID($this->_req_data['event_id'])->primary_datetime()->ID() : $DTT_ID;
216 216
 
217
-		if ( !empty($DTT_ID) && EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkins', 'espresso_registrations_registration_checkins' ) ) {
218
-			$checkin_list_url = EE_Admin_Page::add_query_args_and_nonce( array('action' => 'registration_checkins', '_REGID' => $item->ID(), 'DTT_ID' => $DTT_ID));
219
-			$actions['checkin'] = '<a href="' . $checkin_list_url . '" title="' . esc_attr__('View all the check-ins/checkouts for this registrant', 'event_espresso' ) . '">' . __('View', 'event_espresso') . '</a>';
217
+		if ( ! empty($DTT_ID) && EE_Registry::instance()->CAP->current_user_can('ee_read_checkins', 'espresso_registrations_registration_checkins')) {
218
+			$checkin_list_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'registration_checkins', '_REGID' => $item->ID(), 'DTT_ID' => $DTT_ID));
219
+			$actions['checkin'] = '<a href="'.$checkin_list_url.'" title="'.esc_attr__('View all the check-ins/checkouts for this registrant', 'event_espresso').'">'.__('View', 'event_espresso').'</a>';
220 220
 		}
221 221
 
222
-		return !empty( $DTT_ID ) ? sprintf( '%1$s %2$s', $name_link, $this->row_actions($actions) ) : $name_link;
222
+		return ! empty($DTT_ID) ? sprintf('%1$s %2$s', $name_link, $this->row_actions($actions)) : $name_link;
223 223
 	}
224 224
 
225 225
 
226 226
 
227
-	function column_ATT_email( EE_Registration $item ) {
227
+	function column_ATT_email(EE_Registration $item) {
228 228
 		$attendee = $item->attendee();
229 229
 		return $attendee instanceof EE_Attendee ? $attendee->email() : '';
230 230
 		return $item->get_first_related('Attendee')->email();
@@ -234,8 +234,8 @@  discard block
 block discarded – undo
234 234
 	/**
235 235
 	 * 		column_REG_count
236 236
 	*/
237
-	function column__REG_count(EE_Registration $item){
238
-		return sprintf(__( '%s of %s', 'event_espresso' ),$item->count(), $item->group_size());
237
+	function column__REG_count(EE_Registration $item) {
238
+		return sprintf(__('%s of %s', 'event_espresso'), $item->count(), $item->group_size());
239 239
 	}
240 240
 
241 241
 
@@ -244,9 +244,9 @@  discard block
 block discarded – undo
244 244
 	 * @param  EE_Registration $item EE_Registration object
245 245
 	 * @return string                Registration code
246 246
 	 */
247
-	function column__REG_code(EE_Registration $item){
248
-		$link = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'view_registration', '_REG_ID' => $item->ID() ), REG_ADMIN_URL );
249
-		return EE_Registry::instance()->instance()->CAP->current_user_can('ee_read_registration', 'view_registration', $item->ID() ) ? '<a href="' . $link . '" title="' . esc_attr__('View Registration Details', 'event_espresso') .'">' . $item->get('REG_code') . '</a>' : $item->get('REG_code');
247
+	function column__REG_code(EE_Registration $item) {
248
+		$link = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'view_registration', '_REG_ID' => $item->ID()), REG_ADMIN_URL);
249
+		return EE_Registry::instance()->instance()->CAP->current_user_can('ee_read_registration', 'view_registration', $item->ID()) ? '<a href="'.$link.'" title="'.esc_attr__('View Registration Details', 'event_espresso').'">'.$item->get('REG_code').'</a>' : $item->get('REG_code');
250 250
 	}
251 251
 
252 252
 
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
 
256 256
 	function column_Event(EE_Registration $item) {
257 257
 		$event = $this->_evt instanceof EE_Event ? $this->_evt : $item->event();
258
-		$chkin_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'event_registrations', 'event_id'=>$event->ID() ), REG_ADMIN_URL );
259
-		$event_label = EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkins', 'espresso_registrations_registration_checkins' ) ?  '<a href="'.$chkin_lnk_url.'" title="' . esc_attr__( 'View Checkins for this Event', 'event_espresso' ) . '">' . $event->name() . '</a>' : $event->name();
258
+		$chkin_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'event_registrations', 'event_id'=>$event->ID()), REG_ADMIN_URL);
259
+		$event_label = EE_Registry::instance()->CAP->current_user_can('ee_read_checkins', 'espresso_registrations_registration_checkins') ? '<a href="'.$chkin_lnk_url.'" title="'.esc_attr__('View Checkins for this Event', 'event_espresso').'">'.$event->name().'</a>' : $event->name();
260 260
 		return $event_label;
261 261
 	}
262 262
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 
265 265
 
266 266
 
267
-	function column_PRC_name(EE_Registration $item){
267
+	function column_PRC_name(EE_Registration $item) {
268 268
 		return $item->ticket() instanceof EE_Ticket ? $item->ticket()->name() : __("Unknown", "event_espresso");
269 269
 	}
270 270
 
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
 	/**
277 277
 	 * 		column_REG_final_price
278 278
 	*/
279
-	function column__REG_final_price(EE_Registration $item){
280
-		return '<span class="reg-pad-rght">' .  ' ' . $item->pretty_final_price() . '</span>';
279
+	function column__REG_final_price(EE_Registration $item) {
280
+		return '<span class="reg-pad-rght">'.' '.$item->pretty_final_price().'</span>';
281 281
 	}
282 282
 
283 283
 
@@ -287,20 +287,20 @@  discard block
 block discarded – undo
287 287
 	/**
288 288
 	 * 		column_TXN_paid
289 289
 	*/
290
-	function column_TXN_paid(EE_Registration $item){
290
+	function column_TXN_paid(EE_Registration $item) {
291 291
 
292
-		if ( $item->count() == 1 ) {
292
+		if ($item->count() == 1) {
293 293
 
294
-			if ( $item->transaction()->paid() >= $item->transaction()->total() ) {
294
+			if ($item->transaction()->paid() >= $item->transaction()->total()) {
295 295
 				return '<span class="reg-pad-rght"><div class="dashicons dashicons-yes green-icon"></div></span>';
296 296
 			} else {
297
-				$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID() ), TXN_ADMIN_URL );
298
-				return EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction' ) ?  '
297
+				$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID()), TXN_ADMIN_URL);
298
+				return EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '
299 299
 				<span class="reg-pad-rght">
300
-					<a class="status-'. $item->transaction()->status_ID() .'" href="'.$view_txn_lnk_url.'"  title="' . esc_attr__( 'View Transaction', 'event_espresso' ) . '">
301
-						' . $item->transaction()->pretty_paid(). '
300
+					<a class="status-'. $item->transaction()->status_ID().'" href="'.$view_txn_lnk_url.'"  title="'.esc_attr__('View Transaction', 'event_espresso').'">
301
+						' . $item->transaction()->pretty_paid().'
302 302
 					</a>
303
-				<span>' : '<span class="reg-pad-rght">' . $item->transaction()->pretty_paid() . '</span>';
303
+				<span>' : '<span class="reg-pad-rght">'.$item->transaction()->pretty_paid().'</span>';
304 304
 			}
305 305
 		} else {
306 306
 			return '<span class="reg-pad-rght"></span>';
@@ -314,13 +314,13 @@  discard block
 block discarded – undo
314 314
 	/**
315 315
 	 * 		column_TXN_total
316 316
 	*/
317
-	function column_TXN_total(EE_Registration $item){
317
+	function column_TXN_total(EE_Registration $item) {
318 318
 		$txn = $item->transaction();
319
-		$view_txn_url = add_query_arg( array('action' => 'view_transaction', 'TXN_ID' => $txn->ID() ), TXN_ADMIN_URL );
320
-		if ( $item->get('REG_count') == 1 ) {
319
+		$view_txn_url = add_query_arg(array('action' => 'view_transaction', 'TXN_ID' => $txn->ID()), TXN_ADMIN_URL);
320
+		if ($item->get('REG_count') == 1) {
321 321
 			$line_total_obj = $txn->total_line_item();
322 322
 			$txn_total = $line_total_obj instanceof EE_Line_Item ? $line_total_obj->get_pretty('LIN_total') : __('View Transaction', 'event_espresso');
323
-			return EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction' ) ?  '<a href="' . $view_txn_url . '" title="' . esc_attr__('View Transaction', 'event_espresso') . '"><span class="reg-pad-rght">'. $txn_total  .'</span></a>' : '<span class="reg-pad-rght">' . $txn_total . '</span>';
323
+			return EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '<a href="'.$view_txn_url.'" title="'.esc_attr__('View Transaction', 'event_espresso').'"><span class="reg-pad-rght">'.$txn_total.'</span></a>' : '<span class="reg-pad-rght">'.$txn_total.'</span>';
324 324
 		} else {
325 325
 			return '<span class="reg-pad-rght"></span>';
326 326
 		}
Please login to merge, or discard this patch.
Braces   +10 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
 
4 6
 class EE_Event_Registrations_List_Table extends EE_Admin_List_Table {
@@ -41,8 +43,10 @@  discard block
 block discarded – undo
41 43
 			);
42 44
 
43 45
 		$columns['_Reg_Status'] = '';
44
-		if ( !empty( $evt_id ) )
45
-			$columns['cb'] =  '<input type="checkbox" />'; //Render a checkbox instead of text
46
+		if ( !empty( $evt_id ) ) {
47
+					$columns['cb'] =  '<input type="checkbox" />';
48
+		}
49
+		//Render a checkbox instead of text
46 50
 
47 51
 		$this->_columns = array(
48 52
 				'_REG_att_checked_in' => '<span class="dashicons dashicons-yes ee-icon-size-18"></span>',
@@ -108,8 +112,9 @@  discard block
 block discarded – undo
108 112
 			$evts[] = array('id' => 0, 'text' => __('To toggle Check-in status, select an event', 'event_espresso') );
109 113
 			foreach ( $events as $evt ) {
110 114
 				//any registrations for this event?
111
-				if ( ! $evt->get_count_of_all_registrations() )
112
-					continue;
115
+				if ( ! $evt->get_count_of_all_registrations() ) {
116
+									continue;
117
+				}
113 118
 				$evts[] = array( 'id' => $evt->ID(), 'text' => $evt->get('EVT_name') );
114 119
 			}
115 120
 			$filters[] = EEH_Form_Fields::select_input( 'event_id', $evts );
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->_hidden_columns = array();
@@ -80,25 +80,25 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 
82 82
 
83
-	function column_cb($item ) {
84
-		return sprintf( '<input type="checkbox" name="checkbox[%1$s]" />', $item->ID() );
83
+	function column_cb($item) {
84
+		return sprintf('<input type="checkbox" name="checkbox[%1$s]" />', $item->ID());
85 85
 	}
86 86
 
87 87
 
88
-	function column_CHK_in( EE_Checkin $item ) {
88
+	function column_CHK_in(EE_Checkin $item) {
89 89
 		$checkinstatus = $item->get('CHK_in');
90 90
 		$checkinstatus = $checkinstatus ? 1 : 2;
91
-		return '<span class="checkin-icons checkedin-status-' . $checkinstatus . '"></span>';
91
+		return '<span class="checkin-icons checkedin-status-'.$checkinstatus.'"></span>';
92 92
 	}
93 93
 
94 94
 
95 95
 
96
-	function column_CHK_timestamp( EE_Checkin $item ) {
96
+	function column_CHK_timestamp(EE_Checkin $item) {
97 97
 		$actions = array();
98
-		$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() ) );
99
-		$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>' : '';
98
+		$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()));
99
+		$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 100
 
101
-		return sprintf( '%1$s %2$s', $item->get_datetime('CHK_timestamp'), $this->row_actions($actions) );
101
+		return sprintf('%1$s %2$s', $item->get_datetime('CHK_timestamp'), $this->row_actions($actions));
102 102
 	}
103 103
 
104 104
 
@@ -113,30 +113,30 @@  discard block
 block discarded – undo
113 113
 	 * @param bool    $count        Whether to return a count or not
114 114
 	 * @return EE_Checkin[]|int
115 115
 	 */
116
-	protected function _get_checkins( $per_page = 10, $count = FALSE ) {
117
-		$REG_ID = isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : FALSE;
118
-		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : FALSE;
116
+	protected function _get_checkins($per_page = 10, $count = FALSE) {
117
+		$REG_ID = isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : FALSE;
118
+		$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : FALSE;
119 119
 
120 120
 		//if user does not have the capability for the checkins for this registration then get out!
121
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkin', 'espresso_registrations_registration_checkins', $REG_ID ) ) {
121
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_checkin', 'espresso_registrations_registration_checkins', $REG_ID)) {
122 122
 			return $count ? 0 : array();
123 123
 		}
124 124
 
125 125
 		//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') );
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 128
 
129 129
 		//set orderby
130 130
 		$orderby = 'CHK_timestamp'; //note that with this table we're only providing the option to orderby the timestamp value.
131 131
 
132
-		$order = !empty( $this->_req_data['order'] ) ? $this->_req_data['order'] : 'ASC';
132
+		$order = ! empty($this->_req_data['order']) ? $this->_req_data['order'] : 'ASC';
133 133
 
134
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
135
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
134
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
135
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
136 136
 		$limit = NULL;
137
-		if ( !$count ) {
138
-			$offset = ($current_page-1)*$per_page;
139
-			$limit = array( $offset, $per_page );
137
+		if ( ! $count) {
138
+			$offset = ($current_page - 1) * $per_page;
139
+			$limit = array($offset, $per_page);
140 140
 		}
141 141
 
142 142
 		$_where = array(
@@ -144,13 +144,13 @@  discard block
 block discarded – undo
144 144
 			'DTT_ID' => $DTT_ID
145 145
 			);
146 146
 
147
-		$query_params = array( $_where, 'order_by' => array( $orderby => $order ), 'limit' => $limit );
147
+		$query_params = array($_where, 'order_by' => array($orderby => $order), 'limit' => $limit);
148 148
 
149 149
 		//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 ) );
150
+		if ($count)
151
+			return EEM_Checkin::instance()->count(array($_where));
152 152
 
153
-		return $count ? EEM_Checkin::instance()->count( array( $_where ) ) : EEM_Checkin::instance()->get_all($query_params);
153
+		return $count ? EEM_Checkin::instance()->count(array($_where)) : EEM_Checkin::instance()->get_all($query_params);
154 154
 	}
155 155
 
156 156
 } //end class EE_Registration_CheckIn_List_Table
Please login to merge, or discard this patch.
admin/extend/registrations/Extend_EE_Attendee_Contact_List_Table.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
admin/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.
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.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
admin/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.
caffeinated/admin/extend/support/Extend_Support_Admin_Page.core.php 2 patches
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.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
admin/extend/support/templates/support_admin_details_faq.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 		</dt>
39 39
 		<dd>
40 40
             <p>
41
-            <?php printf( __('You can add the events or venues page as items to the navigation menu by going to Appearance --> Menus and check the boxes found under the %sEvent Espresso Pages%s section. Then click the Add to Menu button and finally click on the Save Menu button.', 'event_espresso'), '<strong>', '</strong>' ); ?>
41
+            <?php printf(__('You can add the events or venues page as items to the navigation menu by going to Appearance --> Menus and check the boxes found under the %sEvent Espresso Pages%s section. Then click the Add to Menu button and finally click on the Save Menu button.', 'event_espresso'), '<strong>', '</strong>'); ?>
42 42
             <br />
43 43
 			<?php _e('Quick Link:', 'event_espresso'); ?>
44 44
 			<a href="<?php echo site_url('/wp-admin/nav-menus.php'); ?>"><?php _e('Menu Manager', 'event_espresso'); ?></a>
Please login to merge, or discard this patch.