Completed
Branch FET-5580-registration-cancella... (d3ffee)
by
unknown
100:24 queued 86:32
created
registrations/templates/attendee_registrations_main_meta_box.template.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -5,42 +5,42 @@
 block discarded – undo
5 5
 		<table class="admin-primary-mbox-tbl">
6 6
 			<thead>
7 7
 				<tr>
8
-					<th class="jst-left"><?php _e( 'Event Name', 'event_espresso' );?></th>
9
-					<th class="jst-left"><?php _e( 'REG ID', 'event_espresso' );?></th>
10
-					<th class="jst-left"><?php _e( 'TXN ID', 'event_espresso' );?></th>
11
-					<th class="jst-left"><?php _e( 'Reg Code', 'event_espresso' );?></th>
12
-					<th class="jst-rght"><?php _e( 'Ticket Price', 'event_espresso' );?></th>
8
+					<th class="jst-left"><?php _e('Event Name', 'event_espresso'); ?></th>
9
+					<th class="jst-left"><?php _e('REG ID', 'event_espresso'); ?></th>
10
+					<th class="jst-left"><?php _e('TXN ID', 'event_espresso'); ?></th>
11
+					<th class="jst-left"><?php _e('Reg Code', 'event_espresso'); ?></th>
12
+					<th class="jst-rght"><?php _e('Ticket Price', 'event_espresso'); ?></th>
13 13
 				</tr>
14 14
 			</thead>
15 15
 			<tbody>
16
-			<?php foreach( $registrations as $registration ) : ?>
16
+			<?php foreach ($registrations as $registration) : ?>
17 17
 				<tr>
18 18
 					<td class="jst-left">
19 19
 					<?php
20
-						$event_url = add_query_arg( array( 'action' => 'edit', 'post' => $registration->event_ID() ), admin_url( 'admin.php?page=espresso_events' ));
21
-						echo EE_Registry::instance()->CAP->current_user_can( 'ee_edit_event', 'espresso_events_edit', $registration->event_ID() ) ?  '<a href="'. $event_url .'"  title="'. esc_attr__( 'Edit Event', 'event_espresso' ) .'">' . $registration->event_name() . '</a>' : $registration->event_name();
20
+						$event_url = add_query_arg(array('action' => 'edit', 'post' => $registration->event_ID()), admin_url('admin.php?page=espresso_events'));
21
+						echo EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'espresso_events_edit', $registration->event_ID()) ? '<a href="'.$event_url.'"  title="'.esc_attr__('Edit Event', 'event_espresso').'">'.$registration->event_name().'</a>' : $registration->event_name();
22 22
 					?>
23 23
 					</td>
24 24
 					<td class="jst-left">
25 25
 					<?php
26
-							$reg_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$registration->ID() ), REG_ADMIN_URL );
27
-							echo EE_Registry::instance()->CAP->current_user_can( 'ee_read_registration', 'espresso_registrations_view_registration', $registration->ID() ) ? '
28
-							<a href="'.$reg_url.'" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '">' . 
29
-								sprintf( __( 'View Registration ', 'event_espresso'), $registration->ID() ) .
26
+							$reg_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$registration->ID()), REG_ADMIN_URL);
27
+							echo EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $registration->ID()) ? '
28
+							<a href="'.$reg_url.'" title="'.esc_attr__('View Registration Details', 'event_espresso').'">'. 
29
+								sprintf(__('View Registration ', 'event_espresso'), $registration->ID()).
30 30
 							'</a>' : '';
31 31
 					?>
32 32
 					</td>
33 33
 					<td class="jst-left">
34 34
 					<?php
35
-						$txn_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$registration->transaction_ID() ), TXN_ADMIN_URL );
36
-						echo EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction' ) ? '
37
-						<a href="'.$txn_url.'" title="' . esc_attr__( 'View Transaction Details', 'event_espresso' ) . '">
38
-							View Transaction ' . $registration->transaction_ID() . '
35
+						$txn_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$registration->transaction_ID()), TXN_ADMIN_URL);
36
+						echo EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '
37
+						<a href="'.$txn_url.'" title="'.esc_attr__('View Transaction Details', 'event_espresso').'">
38
+							View Transaction ' . $registration->transaction_ID().'
39 39
 						</a>' : '';
40 40
 					?>
41 41
 					</td>
42
-					<td class="jst-left"><?php echo $registration->reg_code();?></td>
43
-					<td class="jst-rght"><?php echo EEH_Template::format_currency( $registration->final_price() );?></td>
42
+					<td class="jst-left"><?php echo $registration->reg_code(); ?></td>
43
+					<td class="jst-rght"><?php echo EEH_Template::format_currency($registration->final_price()); ?></td>
44 44
 				</tr>
45 45
 			<?php endforeach; ?>
46 46
 			</tbody>
Please login to merge, or discard this patch.
caffeinated/admin/extend/events/help_tabs/import_page.help_tab.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@
 block discarded – undo
2 2
 <p>
3 3
 <?php _e('The importer can be used to import event information into Event Espresso using a CSV file.', 'event_espresso'); ?>
4 4
 </p>
5
-<h3><?php _e("Importing from other Event Espresso 4 Sites", 'event_espresso');?></h3>
5
+<h3><?php _e("Importing from other Event Espresso 4 Sites", 'event_espresso'); ?></h3>
6 6
 <p>
7 7
 <?php _e('To import Event Espresso data from another Event Espresso 4 install, export a CSV file from the admin Events overview page, or anywhere you can generate a CSV export file from. Then upload that file here (regardless of what type of information was exported).', 'event_espresso'); ?>
8 8
 </p>
9 9
 <p>
10 10
 <?php _e('Note: its possible that data from the other site have the same IDs as data in this site. The importer recognizes that this data is from a different database and inserts new items for each item in the CSV file, regardless of whether its ID matches that of an item in this site\'s database or not. However, the importer also remembers the mapping from the old site\'s database to this site\'s database, and on subsequent CSV importers from that site, the data in this database will be updated instead of re-inserting new items.', 'event_espresso'); ?>
11 11
 </p>
12
-<h3><?php _e("Importing from this Site", 'event_espresso');?></h3>
13
-<p><?php _e("You may want to export data from this site, modify it (or modify the database), and re-import it. When this is done, the importer recognizes that the data is from this site\'s database and updates the records (instead of inserting new items like it would have, had the CSV data been from a different site).", 'event_espresso');?></p>
12
+<h3><?php _e("Importing from this Site", 'event_espresso'); ?></h3>
13
+<p><?php _e("You may want to export data from this site, modify it (or modify the database), and re-import it. When this is done, the importer recognizes that the data is from this site\'s database and updates the records (instead of inserting new items like it would have, had the CSV data been from a different site).", 'event_espresso'); ?></p>
14 14
 
15
-	<h3><?php _e("Notes about Generating your own CSV Import Files", "event_espresso");?></h3>
16
-	<p><?php _e("If you think you could save time entering data into a CSV file, you can use the sample import file below. Note that creating your own CSV file is more complicated than in Event Espresso 3.1 because of the more advanced data structure, and so we recommend creating/editing your events using the normal web-interface.", "event_espresso");?></p>
17
-	<p><?php _e("The export file is just an export of an event, or if you do not have any events in your system, it will only contain column headers. Do not change those column headers. Add as many rows as you like. ", "event_espresso");?></p>
18
-	<p><?php _e("In the ID columns (columns ending in '_ID'), you should enter 'temporary IDs', which are unique numbers/words that identify that item, which can be used later when you want to refer to that item. (For example, if you assign an event's EVT_ID to be a temporary id of 'my-event-1', then use that same phrase 'my-event-1' to refer to that event in the Datetime model's EVT_ID column)", "event_espresso");?></p>
19
-	<p><?php _e("Also note, you do NOT have to enter info in for each model. (You can, for example, only enter in Term_Taxonomies and Term model data)", "event_espresso");?></p>
20 15
\ No newline at end of file
16
+	<h3><?php _e("Notes about Generating your own CSV Import Files", "event_espresso"); ?></h3>
17
+	<p><?php _e("If you think you could save time entering data into a CSV file, you can use the sample import file below. Note that creating your own CSV file is more complicated than in Event Espresso 3.1 because of the more advanced data structure, and so we recommend creating/editing your events using the normal web-interface.", "event_espresso"); ?></p>
18
+	<p><?php _e("The export file is just an export of an event, or if you do not have any events in your system, it will only contain column headers. Do not change those column headers. Add as many rows as you like. ", "event_espresso"); ?></p>
19
+	<p><?php _e("In the ID columns (columns ending in '_ID'), you should enter 'temporary IDs', which are unique numbers/words that identify that item, which can be used later when you want to refer to that item. (For example, if you assign an event's EVT_ID to be a temporary id of 'my-event-1', then use that same phrase 'my-event-1' to refer to that event in the Datetime model's EVT_ID column)", "event_espresso"); ?></p>
20
+	<p><?php _e("Also note, you do NOT have to enter info in for each model. (You can, for example, only enter in Term_Taxonomies and Term model data)", "event_espresso"); ?></p>
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
core/business/EE_Transaction_Payments.class.php 2 patches
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 	 * @access private
117 117
 	 * @param EE_Transaction $transaction
118 118
 	 * @param bool           $update_txn
119
-	 * @return bool true if TXN total was updated, false if not
119
+	 * @return boolean|null true if TXN total was updated, false if not
120 120
 	 * @throws \EE_Error
121 121
 	 */
122 122
 	public function recalculate_transaction_total( EE_Transaction $transaction, $update_txn = true ) {
@@ -147,7 +147,6 @@  discard block
 block discarded – undo
147 147
 	 * then client code needs to take responsibility for saving the TXN
148 148
 	 * regardless of what happens within EE_Transaction_Payments;
149 149
 	 *
150
-	 * @param EE_Transaction/int $transaction_obj_or_id EE_Transaction or its ID
151 150
 	 * @param 	boolean $update_txn  	whether to save the TXN
152 151
 	 * @return 	boolean 	 	whether the TXN was saved
153 152
 	 */
@@ -185,7 +184,7 @@  discard block
 block discarded – undo
185 184
 	 * 		@access		public
186 185
 	 * 		@param EE_Transaction $transaction
187 186
 	 *		@param	string $payment_status, one of EEM_Payment's statuses, like 'PAP' (Approved). By default, searches for approved payments
188
-	 *		@return 		mixed		float on success, false on fail
187
+	 *		@return 		double		float on success, false on fail
189 188
 	 */
190 189
 	public function recalculate_total_payments_for_transaction( EE_Transaction $transaction, $payment_status = EEM_Payment::status_id_approved ) {
191 190
 		// verify transaction
Please login to merge, or discard this patch.
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
2
-EE_Registry::instance()->load_class( 'Processor_Base' );
2
+EE_Registry::instance()->load_class('Processor_Base');
3 3
 
4 4
 /**
5 5
  * Class EE_Transaction_Payments
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public static function instance() {
46 46
 		// check if class object is instantiated
47
-		if ( ! self::$_instance instanceof EE_Transaction_Payments ) {
47
+		if ( ! self::$_instance instanceof EE_Transaction_Payments) {
48 48
 			self::$_instance = new self();
49 49
 		}
50 50
 		return self::$_instance;
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 	/**
73 73
 	 * @param string $old_txn_status
74 74
 	 */
75
-	public function set_old_txn_status( $old_txn_status ) {
75
+	public function set_old_txn_status($old_txn_status) {
76 76
 		// only set the first time
77
-		if ( $this->_old_txn_status === null ) {
77
+		if ($this->_old_txn_status === null) {
78 78
 			$this->_old_txn_status = $old_txn_status;
79 79
 		}
80 80
 	}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	/**
94 94
 	 * @param string $new_txn_status
95 95
 	 */
96
-	public function set_new_txn_status( $new_txn_status ) {
96
+	public function set_new_txn_status($new_txn_status) {
97 97
 		$this->_new_txn_status = $new_txn_status;
98 98
 	}
99 99
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	 * @return bool
106 106
 	 */
107 107
 	public function txn_status_updated() {
108
-		return $this->_new_txn_status !== $this->_old_txn_status && $this->_old_txn_status !== null  ? true : false;
108
+		return $this->_new_txn_status !== $this->_old_txn_status && $this->_old_txn_status !== null ? true : false;
109 109
 	}
110 110
 
111 111
 
@@ -119,18 +119,18 @@  discard block
 block discarded – undo
119 119
 	 * @return bool true if TXN total was updated, false if not
120 120
 	 * @throws \EE_Error
121 121
 	 */
122
-	public function recalculate_transaction_total( EE_Transaction $transaction, $update_txn = true ) {
122
+	public function recalculate_transaction_total(EE_Transaction $transaction, $update_txn = true) {
123 123
 		$total_line_item = $transaction->total_line_item();
124
-		if ( ! $total_line_item instanceof EE_Line_Item ) {
124
+		if ( ! $total_line_item instanceof EE_Line_Item) {
125 125
 			EE_Error::add_error(
126
-				sprintf( __( 'The Total Line Item for Transaction %1$d\'s was not found or is invalid.', 'event_espresso' ), $transaction->ID() ),
126
+				sprintf(__('The Total Line Item for Transaction %1$d\'s was not found or is invalid.', 'event_espresso'), $transaction->ID()),
127 127
 				__FILE__, __FUNCTION__, __LINE__
128 128
 			);
129 129
 			return false;
130 130
 		}
131 131
 		$new_total = $total_line_item->recalculate_total_including_taxes();
132
-		$transaction->set_total( $new_total );
133
-		if ( $update_txn ) {
132
+		$transaction->set_total($new_total);
133
+		if ($update_txn) {
134 134
 			return $transaction->save() ? true : false;
135 135
 		}
136 136
 	}
@@ -151,22 +151,22 @@  discard block
 block discarded – undo
151 151
 	 * @param 	boolean $update_txn  	whether to save the TXN
152 152
 	 * @return 	boolean 	 	whether the TXN was saved
153 153
 	 */
154
-	public function calculate_total_payments_and_update_status( EE_Transaction $transaction, $update_txn = true ){
154
+	public function calculate_total_payments_and_update_status(EE_Transaction $transaction, $update_txn = true) {
155 155
 		// verify transaction
156
-		if ( ! $transaction instanceof EE_Transaction ) {
157
-			EE_Error::add_error( __( 'Please provide a valid EE_Transaction object.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
156
+		if ( ! $transaction instanceof EE_Transaction) {
157
+			EE_Error::add_error(__('Please provide a valid EE_Transaction object.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
158 158
 			return false;
159 159
 		}
160 160
 		// set incoming TXN_Status
161
-		$this->set_old_txn_status( $transaction->status_ID() );
161
+		$this->set_old_txn_status($transaction->status_ID());
162 162
 		// calculate total paid
163
-		$total_paid = $this->recalculate_total_payments_for_transaction( $transaction );
163
+		$total_paid = $this->recalculate_total_payments_for_transaction($transaction);
164 164
 		// if total paid has changed
165
-		if ( $total_paid != $transaction->paid() ) {
166
-			$transaction->set_paid( $total_paid );
165
+		if ($total_paid != $transaction->paid()) {
166
+			$transaction->set_paid($total_paid);
167 167
 			// maybe update status, and make sure to save transaction if not done already
168
-			if ( ! $this->update_transaction_status_based_on_total_paid( $transaction, $update_txn )) {
169
-				if ( $update_txn ) {
168
+			if ( ! $this->update_transaction_status_based_on_total_paid($transaction, $update_txn)) {
169
+				if ($update_txn) {
170 170
 					return $transaction->save() ? true : false;
171 171
 				}
172 172
 			} else {
@@ -187,18 +187,18 @@  discard block
 block discarded – undo
187 187
 	 *		@param	string $payment_status, one of EEM_Payment's statuses, like 'PAP' (Approved). By default, searches for approved payments
188 188
 	 *		@return 		mixed		float on success, false on fail
189 189
 	 */
190
-	public function recalculate_total_payments_for_transaction( EE_Transaction $transaction, $payment_status = EEM_Payment::status_id_approved ) {
190
+	public function recalculate_total_payments_for_transaction(EE_Transaction $transaction, $payment_status = EEM_Payment::status_id_approved) {
191 191
 		// verify transaction
192
-		if ( ! $transaction instanceof EE_Transaction ) {
193
-			EE_Error::add_error( __( 'Please provide a valid EE_Transaction object.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
192
+		if ( ! $transaction instanceof EE_Transaction) {
193
+			EE_Error::add_error(__('Please provide a valid EE_Transaction object.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
194 194
 			return false;
195 195
 		}
196 196
 		// ensure Payment model is loaded
197
-		EE_Registry::instance()->load_model( 'Payment' );
197
+		EE_Registry::instance()->load_model('Payment');
198 198
 		// calls EEM_Base::sum()
199 199
 		return EEM_Payment::instance()->sum(
200 200
 			// query params
201
-			array( array( 'TXN_ID' => $transaction->ID(), 'STS_ID' => $payment_status )),
201
+			array(array('TXN_ID' => $transaction->ID(), 'STS_ID' => $payment_status)),
202 202
 			// field to sum
203 203
 			'PAY_amount'
204 204
 		);
@@ -214,37 +214,37 @@  discard block
 block discarded – undo
214 214
 	 * @return 	boolean 	 	whether the TXN was saved
215 215
 	 * @throws \EE_Error
216 216
 	 */
217
-	public function update_transaction_status_based_on_total_paid( EE_Transaction $transaction, $update_txn = TRUE ) {
217
+	public function update_transaction_status_based_on_total_paid(EE_Transaction $transaction, $update_txn = TRUE) {
218 218
 		// verify transaction
219
-		if ( ! $transaction instanceof EE_Transaction ) {
219
+		if ( ! $transaction instanceof EE_Transaction) {
220 220
 			EE_Error::add_error(
221
-				__( 'Please provide a valid EE_Transaction object.', 'event_espresso' ),
221
+				__('Please provide a valid EE_Transaction object.', 'event_espresso'),
222 222
 				__FILE__, __FUNCTION__, __LINE__
223 223
 			);
224 224
 			return FALSE;
225 225
 		}
226
-		EE_Registry::instance()->load_helper( 'Money' );
226
+		EE_Registry::instance()->load_helper('Money');
227 227
 		// set incoming TXN_Status
228
-		$this->set_old_txn_status( $transaction->status_ID() );
228
+		$this->set_old_txn_status($transaction->status_ID());
229 229
 		// set transaction status based on comparison of TXN_paid vs TXN_total
230
-		if ( EEH_Money::compare_floats( $transaction->paid(), $transaction->total(), '>' ) ){
230
+		if (EEH_Money::compare_floats($transaction->paid(), $transaction->total(), '>')) {
231 231
 			$new_txn_status = EEM_Transaction::overpaid_status_code;
232
-		} else if ( EEH_Money::compare_floats( $transaction->paid(), $transaction->total() ) ) {
232
+		} else if (EEH_Money::compare_floats($transaction->paid(), $transaction->total())) {
233 233
 			$new_txn_status = EEM_Transaction::complete_status_code;
234
-		} else if ( EEH_Money::compare_floats( $transaction->paid(), $transaction->total(), '<' ) ) {
234
+		} else if (EEH_Money::compare_floats($transaction->paid(), $transaction->total(), '<')) {
235 235
 			$new_txn_status = EEM_Transaction::incomplete_status_code;
236 236
 		} else {
237 237
 			EE_Error::add_error(
238
-				__( 'The total paid calculation for this transaction is inaccurate.', 'event_espresso' ),
238
+				__('The total paid calculation for this transaction is inaccurate.', 'event_espresso'),
239 239
 				__FILE__, __FUNCTION__, __LINE__
240 240
 			);
241 241
 			return FALSE;
242 242
 		}
243
-		if ( $new_txn_status !== $transaction->status_ID() ) {
243
+		if ($new_txn_status !== $transaction->status_ID()) {
244 244
 			// set incoming TXN_Status
245
-			$this->set_new_txn_status( $new_txn_status );
246
-			$transaction->set_status( $new_txn_status );
247
-			if ( $update_txn ) {
245
+			$this->set_new_txn_status($new_txn_status);
246
+			$transaction->set_status($new_txn_status);
247
+			if ($update_txn) {
248 248
 				return $transaction->save() ? TRUE : FALSE;
249 249
 			}
250 250
 		}
@@ -263,21 +263,21 @@  discard block
 block discarded – undo
263 263
 	 * @param EE_Payment $payment
264 264
 	 * @return boolean
265 265
 	 */
266
-	public function delete_payment_and_update_transaction( EE_Payment $payment ) {
266
+	public function delete_payment_and_update_transaction(EE_Payment $payment) {
267 267
 		// verify payment
268
-		if ( ! $payment instanceof EE_Payment ) {
269
-			EE_Error::add_error( __( 'A valid Payment object was not received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
268
+		if ( ! $payment instanceof EE_Payment) {
269
+			EE_Error::add_error(__('A valid Payment object was not received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
270 270
 			return FALSE;
271 271
 		}
272
-		if ( ! $this->delete_registration_payments_and_update_registrations( $payment ) ) {
272
+		if ( ! $this->delete_registration_payments_and_update_registrations($payment)) {
273 273
 			return false;
274 274
 		}
275
-		if ( ! $payment->delete() ) {
276
-			EE_Error::add_error( __( 'The payment could not be deleted.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
275
+		if ( ! $payment->delete()) {
276
+			EE_Error::add_error(__('The payment could not be deleted.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
277 277
 			return false;
278 278
 		}
279 279
 		$transaction = $payment->transaction();
280
-		return $this->calculate_total_payments_and_update_status( $transaction );
280
+		return $this->calculate_total_payments_and_update_status($transaction);
281 281
 	}
282 282
 
283 283
 
@@ -293,28 +293,28 @@  discard block
 block discarded – undo
293 293
 	 * @return bool
294 294
 	 * @throws \EE_Error
295 295
 	 */
296
-	public function delete_registration_payments_and_update_registrations( EE_Payment $payment, $reg_payment_query_params = array() ) {
296
+	public function delete_registration_payments_and_update_registrations(EE_Payment $payment, $reg_payment_query_params = array()) {
297 297
 		$save_payment = false;
298
-		$reg_payment_query_params = ! empty( $reg_payment_query_params ) ? $reg_payment_query_params : array( array( 'PAY_ID' => $payment->ID() ) );
299
-		$registration_payments = EEM_Registration_Payment::instance()->get_all( $reg_payment_query_params );
300
-		if ( ! empty( $registration_payments )) {
301
-			foreach ( $registration_payments as $registration_payment ) {
302
-				if ( $registration_payment instanceof EE_Registration_Payment ) {
298
+		$reg_payment_query_params = ! empty($reg_payment_query_params) ? $reg_payment_query_params : array(array('PAY_ID' => $payment->ID()));
299
+		$registration_payments = EEM_Registration_Payment::instance()->get_all($reg_payment_query_params);
300
+		if ( ! empty($registration_payments)) {
301
+			foreach ($registration_payments as $registration_payment) {
302
+				if ($registration_payment instanceof EE_Registration_Payment) {
303 303
 					$amount_paid = $registration_payment->amount();
304 304
 					$registration = $registration_payment->registration();
305
-					if ( $registration instanceof EE_Registration ) {
306
-						$registration->set_paid( $registration->paid() - $amount_paid );
307
-						if ( $registration->save() ) {
308
-							if ( $registration_payment->delete() ) {
309
-								$registration->_remove_relation_to( $payment, 'Payment' );
310
-								$payment->_remove_relation_to( $registration, 'Registration' );
305
+					if ($registration instanceof EE_Registration) {
306
+						$registration->set_paid($registration->paid() - $amount_paid);
307
+						if ($registration->save()) {
308
+							if ($registration_payment->delete()) {
309
+								$registration->_remove_relation_to($payment, 'Payment');
310
+								$payment->_remove_relation_to($registration, 'Registration');
311 311
 							}
312 312
 							$save_payment = true;
313 313
 						}
314 314
 					} else {
315 315
 						EE_Error::add_error(
316 316
 							sprintf(
317
-								__( 'An invalid Registration object was associated with Registration Payment ID# %1$d.', 'event_espresso' ),
317
+								__('An invalid Registration object was associated with Registration Payment ID# %1$d.', 'event_espresso'),
318 318
 								$registration_payment->ID()
319 319
 							),
320 320
 							__FILE__, __FUNCTION__, __LINE__
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 				} else {
325 325
 					EE_Error::add_error(
326 326
 						sprintf(
327
-							__( 'An invalid Registration Payment object was associated with payment ID# %1$d.', 'event_espresso' ),
327
+							__('An invalid Registration Payment object was associated with payment ID# %1$d.', 'event_espresso'),
328 328
 							$payment->ID()
329 329
 						),
330 330
 						__FILE__, __FUNCTION__, __LINE__
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 				}
334 334
 			}
335 335
 		}
336
-		if ( $save_payment ) {
336
+		if ($save_payment) {
337 337
 			$payment->save();
338 338
 		}
339 339
 		return true;
Please login to merge, or discard this patch.
templates/txn_admin_details_main_meta_box_attendees.template.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,25 +5,25 @@
 block discarded – undo
5 5
 		<table class="admin-primary-mbox-tbl">
6 6
 			<thead>
7 7
 				<tr>
8
-					<th class="jst-left"><?php _e( '#', 'event_espresso' );?></th>
9
-					<th class="jst-left"><?php _e( 'Event Name and Ticket', 'event_espresso' );?></th>
10
-					<th class="jst-left"><?php _e( 'Registrant', 'event_espresso' );?></th>
11
-					<th class="jst-left"><?php _e( 'Ticket Price', 'event_espresso' );?></th>
12
-					<th class="jst-left"><?php _e( 'Email', 'event_espresso' );?></th>
13
-					<th class="jst-left"><?php _e( 'Address', 'event_espresso' );?></th>
8
+					<th class="jst-left"><?php _e('#', 'event_espresso'); ?></th>
9
+					<th class="jst-left"><?php _e('Event Name and Ticket', 'event_espresso'); ?></th>
10
+					<th class="jst-left"><?php _e('Registrant', 'event_espresso'); ?></th>
11
+					<th class="jst-left"><?php _e('Ticket Price', 'event_espresso'); ?></th>
12
+					<th class="jst-left"><?php _e('Email', 'event_espresso'); ?></th>
13
+					<th class="jst-left"><?php _e('Address', 'event_espresso'); ?></th>
14 14
 				</tr>
15 15
 			</thead>
16 16
 			<tbody>
17
-		<?php if ( isset( $event_attendees ) && is_array( $event_attendees )) : ?>
18
-			<?php foreach ( $event_attendees as $registration => $attendee ) : ?>
17
+		<?php if (isset($event_attendees) && is_array($event_attendees)) : ?>
18
+			<?php foreach ($event_attendees as $registration => $attendee) : ?>
19 19
 				<tr>
20
-					<td class="jst-left"><?php echo $attendee['att_num'];?></td>
21
-					<td class="jst-left"><?php echo $attendee['event_ticket_name'];?></td>
20
+					<td class="jst-left"><?php echo $attendee['att_num']; ?></td>
21
+					<td class="jst-left"><?php echo $attendee['event_ticket_name']; ?></td>
22 22
 					<td class="jst-left">
23 23
 						<?php
24
-						$att_link = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$registration), REG_ADMIN_URL );
24
+						$att_link = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$registration), REG_ADMIN_URL);
25 25
 						?>
26
-						<a href="<?php echo $att_link; ?>" title="<?php _e( 'View details for this registrant', 'event_espresso' );?>">
26
+						<a href="<?php echo $att_link; ?>" title="<?php _e('View details for this registrant', 'event_espresso'); ?>">
27 27
 							<?php echo $attendee['attendee']?>
28 28
 						</a>
29 29
 					</td>
Please login to merge, or discard this patch.
line_item_filters/EE_Specific_Registrations_Line_Item_Filter.class.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
  */
19 19
 class EE_Specific_Registrations_Line_Item_Filter extends EE_Line_Item_Filter_Base {
20 20
 /**
21
-	 * array of line item codes and their corresponding quantities for registrations
22
-	 *
21
+ * array of line item codes and their corresponding quantities for registrations
22
+ *
23 23
 *@type array $_line_item_registrations
24
-	 */
24
+ */
25 25
 	protected $_line_item_registrations = array();
26 26
 
27 27
 	/**
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 
6 6
 /**
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
 	 * EE_Billable_Line_Item_Filter constructor.
43 43
 	 * @param EE_Registration[] $registrations
44 44
 	 */
45
-	public function __construct( $registrations ) {
45
+	public function __construct($registrations) {
46 46
 		$this->_registrations = $registrations;
47
-		$this->_calculate_registrations_per_line_item_code( $registrations );
47
+		$this->_calculate_registrations_per_line_item_code($registrations);
48 48
 		// these reg statuses should NOT increment the line item quantity
49 49
 		$this->_closed_reg_statuses = EEM_Registration::closed_reg_statuses();
50 50
 	}
@@ -55,20 +55,20 @@  discard block
 block discarded – undo
55 55
 	 * @param EE_Registration[] $registrations
56 56
 	 * @return void
57 57
 	 */
58
-	protected function _calculate_registrations_per_line_item_code( $registrations ) {
59
-		foreach( $registrations as $registration ) {
58
+	protected function _calculate_registrations_per_line_item_code($registrations) {
59
+		foreach ($registrations as $registration) {
60 60
 			$line_item_code = EEM_Line_Item::instance()->get_var(
61 61
 				EEM_Line_Item::instance()->line_item_for_registration_query_params(
62 62
 					$registration,
63
-					array( 'limit' => 1 )
63
+					array('limit' => 1)
64 64
 				),
65 65
 				'LIN_code'
66 66
 			);
67
-			if( $line_item_code ) {
68
-				if( ! isset( $this->_line_item_registrations[ $line_item_code ] ) ) {
69
-					$this->_line_item_registrations[ $line_item_code ] = array();
67
+			if ($line_item_code) {
68
+				if ( ! isset($this->_line_item_registrations[$line_item_code])) {
69
+					$this->_line_item_registrations[$line_item_code] = array();
70 70
 				}
71
-				$this->_line_item_registrations[ $line_item_code ][ $registration->ID() ] = $registration;
71
+				$this->_line_item_registrations[$line_item_code][$registration->ID()] = $registration;
72 72
 			}
73 73
 		}
74 74
 	}
@@ -81,61 +81,61 @@  discard block
 block discarded – undo
81 81
 	 * @param EEI_Line_Item      $line_item
82 82
 	 * @return \EEI_Line_Item
83 83
 	 */
84
-	public function process( EEI_Line_Item $line_item ) {
85
-		$this->_adjust_line_item_quantity( $line_item );
86
-		if( ! $line_item->children() ) {
84
+	public function process(EEI_Line_Item $line_item) {
85
+		$this->_adjust_line_item_quantity($line_item);
86
+		if ( ! $line_item->children()) {
87 87
 			return $line_item;
88 88
 		}
89 89
 		//the original running total (taking ALL tickets into account)
90 90
 		$running_total_of_children = 0;
91 91
 		//the new running total (only taking the specified ticket quantities into account)
92 92
 		$running_total_of_children_under_consideration = 0;
93
-		foreach ( $line_item->children() as $child_line_item ) {
94
-			if( $child_line_item->is_percent() ) {
93
+		foreach ($line_item->children() as $child_line_item) {
94
+			if ($child_line_item->is_percent()) {
95 95
 				$original_li_total = $running_total_of_children * $child_line_item->percent() / 100;
96
-			}else{
96
+			} else {
97 97
 				$original_li_total = $child_line_item->unit_price() * $child_line_item->quantity();
98 98
 			}
99 99
 
100
-			$this->process( $child_line_item );
100
+			$this->process($child_line_item);
101 101
 			/*
102 102
 			 * If this line item is a normal line item that isn't for a ticket
103 103
 			 * we want to modify its total (and unit price if not a percentage line item)
104 104
 			 * so it reflects only that portion of the surcharge/discount shared by these
105 105
 			 * registrations
106 106
 			 */
107
-			if(
107
+			if (
108 108
 				$child_line_item->type() === EEM_Line_Item::type_line_item
109 109
 				&& $child_line_item->OBJ_type() !== 'Ticket'
110 110
 			) {
111
-				if( $running_total_of_children ) {
111
+				if ($running_total_of_children) {
112 112
 					$percent_of_running_total = $original_li_total / $running_total_of_children;
113 113
 				} else {
114 114
 					$percent_of_running_total = 0;
115 115
 				}
116 116
 
117
-				$child_line_item->set_total( $running_total_of_children_under_consideration * $percent_of_running_total );
118
-				if( ! $child_line_item->is_percent() ) {
119
-					$child_line_item->set_unit_price( $child_line_item->total() / $child_line_item->quantity() );
117
+				$child_line_item->set_total($running_total_of_children_under_consideration * $percent_of_running_total);
118
+				if ( ! $child_line_item->is_percent()) {
119
+					$child_line_item->set_unit_price($child_line_item->total() / $child_line_item->quantity());
120 120
 				}
121 121
 			} else if (
122 122
 				$line_item->type() === EEM_Line_Item::type_line_item
123 123
 				&& $line_item->OBJ_type() === 'Ticket'
124 124
 			) {
125 125
 				//make sure this item's quantity matches its parent
126
-				if( ! $child_line_item->is_percent() ) {
127
-					$child_line_item->set_quantity( $line_item->quantity() );
128
-					$child_line_item->set_total( $child_line_item->unit_price() * $child_line_item->quantity() );
126
+				if ( ! $child_line_item->is_percent()) {
127
+					$child_line_item->set_quantity($line_item->quantity());
128
+					$child_line_item->set_total($child_line_item->unit_price() * $child_line_item->quantity());
129 129
 				}
130 130
 			}
131 131
 			$running_total_of_children += $original_li_total;
132 132
 			$running_total_of_children_under_consideration += $child_line_item->total();
133 133
 		}
134
-		$line_item->set_total( $running_total_of_children_under_consideration );
135
-		if( $line_item->quantity() ) {
136
-			$line_item->set_unit_price( $running_total_of_children_under_consideration / $line_item->quantity() );
134
+		$line_item->set_total($running_total_of_children_under_consideration);
135
+		if ($line_item->quantity()) {
136
+			$line_item->set_unit_price($running_total_of_children_under_consideration / $line_item->quantity());
137 137
 		} else {
138
-			$line_item->set_unit_price( 0 );
138
+			$line_item->set_unit_price(0);
139 139
 		}
140 140
 		return $line_item;
141 141
 	}
@@ -148,27 +148,27 @@  discard block
 block discarded – undo
148 148
 	 * @param EEI_Line_Item $line_item
149 149
 	 * @return EEI_Line_Item
150 150
 	 */
151
-	protected function _adjust_line_item_quantity( EEI_Line_Item $line_item ) {
151
+	protected function _adjust_line_item_quantity(EEI_Line_Item $line_item) {
152 152
 		// is this a ticket ?
153
-		if ( $line_item->type() === EEM_Line_Item::type_line_item && $line_item->OBJ_type() == 'Ticket' ) {
153
+		if ($line_item->type() === EEM_Line_Item::type_line_item && $line_item->OBJ_type() == 'Ticket') {
154 154
 			$quantity = 0;
155 155
 			// if this ticket is billable at this moment, then we should have a positive quantity
156 156
 			if (
157
-				isset( $this->_line_item_registrations[ $line_item->code() ] )
158
-				&& is_array( $this->_line_item_registrations[ $line_item->code() ] )
157
+				isset($this->_line_item_registrations[$line_item->code()])
158
+				&& is_array($this->_line_item_registrations[$line_item->code()])
159 159
 			) {
160 160
 				// set quantity based on number of open registrations for this ticket
161
-				foreach ( $this->_line_item_registrations[ $line_item->code() ] as $registration ) {
161
+				foreach ($this->_line_item_registrations[$line_item->code()] as $registration) {
162 162
 					if (
163 163
 						$registration instanceof EE_Registration
164
-						&& ! in_array( $registration->status_ID(), $this->_closed_reg_statuses )
164
+						&& ! in_array($registration->status_ID(), $this->_closed_reg_statuses)
165 165
 					) {
166 166
 						$quantity++;
167 167
 					}
168 168
 				}
169 169
 			}
170
-			$line_item->set_quantity( $quantity );
171
-			$line_item->set_total( $line_item->unit_price() * $line_item->quantity() );
170
+			$line_item->set_quantity($quantity);
171
+			$line_item->set_total($line_item->unit_price() * $line_item->quantity());
172 172
 		}
173 173
 		return $line_item;
174 174
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 		if( $normalized_value ){
34 34
 			if (filter_var($normalized_value, FILTER_VALIDATE_URL) === false){
35 35
 				throw new EE_Validation_Error( $this->get_validation_error_message(), 'invalid_url');
36
-			}else{
36
+			} else{
37 37
 				EE_Registry::instance()->load_helper('URL');
38 38
 				if( ! EEH_URL::remote_file_exists(
39 39
 						$normalized_value,
Please login to merge, or discard this patch.
caffeinated/modules/recaptcha/ReCaptcha/RequestMethod/Post.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -34,37 +34,37 @@
 block discarded – undo
34 34
  */
35 35
 class Post implements RequestMethod
36 36
 {
37
-    /**
38
-     * URL to which requests are POSTed.
39
-     * @const string
40
-     */
41
-    const SITE_VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';
37
+	/**
38
+	 * URL to which requests are POSTed.
39
+	 * @const string
40
+	 */
41
+	const SITE_VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';
42 42
 
43
-    /**
44
-     * Submit the POST request with the specified parameters.
45
-     *
46
-     * @param RequestParameters $params Request parameters
47
-     * @return string Body of the reCAPTCHA response
48
-     */
49
-    public function submit(RequestParameters $params)
50
-    {
51
-        /**
52
-         * PHP 5.6.0 changed the way you specify the peer name for SSL context options.
53
-         * Using "CN_name" will still work, but it will raise deprecated errors.
54
-         */
55
-        $peer_key = version_compare(PHP_VERSION, '5.6.0', '<') ? 'CN_name' : 'peer_name';
56
-        $options = array(
57
-            'http' => array(
58
-                'header' => "Content-type: application/x-www-form-urlencoded\r\n",
59
-                'method' => 'POST',
60
-                'content' => $params->toQueryString(),
61
-                // Force the peer to validate (not needed in 5.6.0+, but still works
62
-                'verify_peer' => true,
63
-                // Force the peer validation to use www.google.com
64
-                $peer_key => 'www.google.com',
65
-            ),
66
-        );
67
-        $context = stream_context_create($options);
68
-        return file_get_contents(self::SITE_VERIFY_URL, false, $context);
69
-    }
43
+	/**
44
+	 * Submit the POST request with the specified parameters.
45
+	 *
46
+	 * @param RequestParameters $params Request parameters
47
+	 * @return string Body of the reCAPTCHA response
48
+	 */
49
+	public function submit(RequestParameters $params)
50
+	{
51
+		/**
52
+		 * PHP 5.6.0 changed the way you specify the peer name for SSL context options.
53
+		 * Using "CN_name" will still work, but it will raise deprecated errors.
54
+		 */
55
+		$peer_key = version_compare(PHP_VERSION, '5.6.0', '<') ? 'CN_name' : 'peer_name';
56
+		$options = array(
57
+			'http' => array(
58
+				'header' => "Content-type: application/x-www-form-urlencoded\r\n",
59
+				'method' => 'POST',
60
+				'content' => $params->toQueryString(),
61
+				// Force the peer to validate (not needed in 5.6.0+, but still works
62
+				'verify_peer' => true,
63
+				// Force the peer validation to use www.google.com
64
+				$peer_key => 'www.google.com',
65
+			),
66
+		);
67
+		$context = stream_context_create($options);
68
+		return file_get_contents(self::SITE_VERIFY_URL, false, $context);
69
+	}
70 70
 }
Please login to merge, or discard this patch.
caffeinated/modules/recaptcha/ReCaptcha/RequestMethod.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
 interface RequestMethod
33 33
 {
34 34
 
35
-    /**
36
-     * Submit the request with the specified parameters.
37
-     *
38
-     * @param RequestParameters $params Request parameters
39
-     * @return string Body of the reCAPTCHA response
40
-     */
41
-    public function submit(RequestParameters $params);
35
+	/**
36
+	 * Submit the request with the specified parameters.
37
+	 *
38
+	 * @param RequestParameters $params Request parameters
39
+	 * @return string Body of the reCAPTCHA response
40
+	 */
41
+	public function submit(RequestParameters $params);
42 42
 }
Please login to merge, or discard this patch.
caffeinated/modules/recaptcha/ReCaptcha/RequestMethod/Socket.php 1 patch
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -32,73 +32,73 @@
 block discarded – undo
32 32
  */
33 33
 class Socket
34 34
 {
35
-    private $handle = null;
35
+	private $handle = null;
36 36
 
37
-    /**
38
-     * fsockopen
39
-     * 
40
-     * @see http://php.net/fsockopen
41
-     * @param string $hostname
42
-     * @param int $port
43
-     * @param int $errno
44
-     * @param string $errstr
45
-     * @param float $timeout
46
-     * @return resource
47
-     */
48
-    public function fsockopen($hostname, $port = -1, &$errno = 0, &$errstr = '', $timeout = null)
49
-    {
50
-        $this->handle = fsockopen($hostname, $port, $errno, $errstr, (is_null($timeout) ? ini_get("default_socket_timeout") : $timeout));
37
+	/**
38
+	 * fsockopen
39
+	 * 
40
+	 * @see http://php.net/fsockopen
41
+	 * @param string $hostname
42
+	 * @param int $port
43
+	 * @param int $errno
44
+	 * @param string $errstr
45
+	 * @param float $timeout
46
+	 * @return resource
47
+	 */
48
+	public function fsockopen($hostname, $port = -1, &$errno = 0, &$errstr = '', $timeout = null)
49
+	{
50
+		$this->handle = fsockopen($hostname, $port, $errno, $errstr, (is_null($timeout) ? ini_get("default_socket_timeout") : $timeout));
51 51
 
52
-        if ($this->handle != false && $errno === 0 && $errstr === '') {
53
-            return $this->handle;
54
-        } else {
55
-            return false;
56
-        }
57
-    }
52
+		if ($this->handle != false && $errno === 0 && $errstr === '') {
53
+			return $this->handle;
54
+		} else {
55
+			return false;
56
+		}
57
+	}
58 58
 
59
-    /**
60
-     * fwrite
61
-     * 
62
-     * @see http://php.net/fwrite
63
-     * @param string $string
64
-     * @param int $length
65
-     * @return int | bool
66
-     */
67
-    public function fwrite($string, $length = null)
68
-    {
69
-        return fwrite($this->handle, $string, (is_null($length) ? strlen($string) : $length));
70
-    }
59
+	/**
60
+	 * fwrite
61
+	 * 
62
+	 * @see http://php.net/fwrite
63
+	 * @param string $string
64
+	 * @param int $length
65
+	 * @return int | bool
66
+	 */
67
+	public function fwrite($string, $length = null)
68
+	{
69
+		return fwrite($this->handle, $string, (is_null($length) ? strlen($string) : $length));
70
+	}
71 71
 
72
-    /**
73
-     * fgets
74
-     * 
75
-     * @see http://php.net/fgets
76
-     * @param int $length
77
-     */
78
-    public function fgets($length = null)
79
-    {
80
-        return fgets($this->handle, $length);
81
-    }
72
+	/**
73
+	 * fgets
74
+	 * 
75
+	 * @see http://php.net/fgets
76
+	 * @param int $length
77
+	 */
78
+	public function fgets($length = null)
79
+	{
80
+		return fgets($this->handle, $length);
81
+	}
82 82
 
83
-    /**
84
-     * feof
85
-     * 
86
-     * @see http://php.net/feof
87
-     * @return bool
88
-     */
89
-    public function feof()
90
-    {
91
-        return feof($this->handle);
92
-    }
83
+	/**
84
+	 * feof
85
+	 * 
86
+	 * @see http://php.net/feof
87
+	 * @return bool
88
+	 */
89
+	public function feof()
90
+	{
91
+		return feof($this->handle);
92
+	}
93 93
 
94
-    /**
95
-     * fclose
96
-     * 
97
-     * @see http://php.net/fclose
98
-     * @return bool
99
-     */
100
-    public function fclose()
101
-    {
102
-        return fclose($this->handle);
103
-    }
94
+	/**
95
+	 * fclose
96
+	 * 
97
+	 * @see http://php.net/fclose
98
+	 * @return bool
99
+	 */
100
+	public function fclose()
101
+	{
102
+		return fclose($this->handle);
103
+	}
104 104
 }
Please login to merge, or discard this patch.
admin/extend/events/templates/event_type_metabox_contents.template.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
4 4
 	</ul>
5 5
 	<div id="espresso_event_type-all" class="tabs-panel">
6 6
 		<?php
7
-        $name = 'tax_input[espresso_event_type]';
8
-        echo "<input type='hidden' name='{$name}[]' value='0' />"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.
9
-        ?>
7
+		$name = 'tax_input[espresso_event_type]';
8
+		echo "<input type='hidden' name='{$name}[]' value='0' />"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.
9
+		?>
10 10
 		<ul id="espresso_event_typechecklist" data-wp-lists="list:espresso_event_type" class="categorychecklist form-no-clear">
11 11
 			<?php echo $radio_list; ?>
12 12
 		</ul>
Please login to merge, or discard this patch.