Completed
Branch BUG-9804-double-click-spco-sub... (c2cac1)
by
unknown
51:40 queued 26:35
created
templates/txn_admin_details_main_meta_box_txn_details.template.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,10 +141,13 @@
 block discarded – undo
141 141
 					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo $overpaid . sprintf( __( 'Payments Total %s', 'event_espresso' ), '(' . EE_Registry::instance()->CFG->currency->code . ')' );?></span></th>
142 142
 					<th class=" jst-rght"><span id="txn-admin-payment-total"><?php echo EEH_Template::format_currency($payment_total, FALSE, FALSE);?></span></th>
143 143
 				</tr>
144
-		<?php else : ?>
144
+		<?php else {
145
+	: ?>
145 146
 				<tr id="txn-admin-no-payments-tr" class="admin-primary-mbox-total-tr">
146 147
 					<td class=" jst-rght" colspan="11">
147
-						<span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' ); ?></span>
148
+						<span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' );
149
+}
150
+?></span>
148 151
 					</td>
149 152
 				</tr>
150 153
 				<tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr hidden">
Please login to merge, or discard this patch.
Spacing   +117 added lines, -117 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <div id="admin-primary-mbox-dv" class="admin-primary-mbox-dv">
2 2
 
3 3
 	<h3 class="admin-primary-mbox-h4 hdr-has-icon">
4
-		<span class="dashicons dashicons-cart"></span><?php _e( 'Transaction Items', 'event_espresso' );?>
4
+		<span class="dashicons dashicons-cart"></span><?php _e('Transaction Items', 'event_espresso'); ?>
5 5
 	</h3>
6 6
 
7 7
 	<div class="admin-primary-mbox-tbl-wrap">
@@ -10,27 +10,27 @@  discard block
 block discarded – undo
10 10
 	</div>
11 11
 
12 12
 	<a id="display-additional-transaction-session-info" class="display-the-hidden smaller-text" rel="additional-transaction-session-info">
13
-		<span class="dashicons dashicons-plus-alt"></span><?php _e( 'view additional transaction session details', 'event_espresso' );?>
13
+		<span class="dashicons dashicons-plus-alt"></span><?php _e('view additional transaction session details', 'event_espresso'); ?>
14 14
 	</a>
15 15
 
16 16
 	<div id="additional-transaction-session-info-dv" class="hidden">
17 17
 
18 18
 		<a id="hide-additional-transaction-session-info" class="hide-the-displayed hidden smaller-text" rel="additional-transaction-session-info">
19
-			<span class="dashicons dashicons-dismiss"></span><?php _e( 'hide additional transaction session details', 'event_espresso' );?>
19
+			<span class="dashicons dashicons-dismiss"></span><?php _e('hide additional transaction session details', 'event_espresso'); ?>
20 20
 		</a>
21 21
 	<br class="clear"/>
22 22
 
23
-		<h3 class="admin-primary-mbox-h4"><?php _e( 'Transaction Session Details', 'event_espresso' );?></h3>
23
+		<h3 class="admin-primary-mbox-h4"><?php _e('Transaction Session Details', 'event_espresso'); ?></h3>
24 24
 
25 25
 		<table id="admin-primary-mbox-txn-extra-session-info-tbl" class="form-table skinny-rows">
26 26
 			<tbody>
27
-			<?php foreach ( $txn_details as $key => $txn_detail ) : ?>
27
+			<?php foreach ($txn_details as $key => $txn_detail) : ?>
28 28
 				<tr>
29 29
 					<th>
30
-						<label for="<?php echo $key;?>"><?php echo $txn_detail['label'];?></label>
30
+						<label for="<?php echo $key; ?>"><?php echo $txn_detail['label']; ?></label>
31 31
 					</th>
32 32
 					<td>
33
-						<?php echo $txn_detail['value'];?>
33
+						<?php echo $txn_detail['value']; ?>
34 34
 					</td>
35 35
 				</tr>
36 36
 			<?php endforeach; // $txn_details?>
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 	<br class="clear"/>
41 41
 
42 42
 
43
-	<?php if ( $attendee instanceof EE_Attendee && ( $grand_raw_total > 0 || $TXN_status != 'TCM' || ! empty( $payments ) ) ) : ?>
43
+	<?php if ($attendee instanceof EE_Attendee && ($grand_raw_total > 0 || $TXN_status != 'TCM' || ! empty($payments))) : ?>
44 44
 
45 45
 	<h3 class="admin-primary-mbox-h4 hdr-has-icon">
46
-		<span class="ee-icon ee-icon-cash"></span><?php _e( 'Payment Details', 'event_espresso' );?>
46
+		<span class="ee-icon ee-icon-cash"></span><?php _e('Payment Details', 'event_espresso'); ?>
47 47
 	</h3>
48 48
 
49 49
 	<div class="admin-primary-mbox-tbl-wrap">
@@ -52,79 +52,79 @@  discard block
 block discarded – undo
52 52
 				<tr>
53 53
 					<th></th>
54 54
 					<th class="jst-cntr"></th>
55
-					<th class="jst-cntr"><?php _e( 'ID', 'event_espresso' );?></th>
56
-					<th class="jst-left"><?php _e( 'Date', 'event_espresso' );?></th>
57
-					<th class="jst-cntr"><?php _e( 'Source', 'event_espresso' );?></th>
58
-					<th class="jst-left"><?php _e( 'Method', 'event_espresso' );?></th>
59
-					<th class="jst-left"><?php _e( 'Gateway Response', 'event_espresso' );?></th>
60
-					<th class="jst-left"><?php _e( 'TXN&nbsp;ID / CHQ&nbsp;#', 'event_espresso' );?></th>
61
-					<th class="jst-left"><?php _e( 'P.O. / S.O.&nbsp;#', 'event_espresso' );?></th>
62
-					<th class="jst-left"><?php _e( 'Notes / Extra&nbsp;Accounting', 'event_espresso' );?></th>
63
-					<!--<th class="jst-left"><?php _e( 'Details', 'event_espresso' );?></th>-->
64
-					<th class="jst-cntr"><?php _e( 'Amount', 'event_espresso' );?></th>
55
+					<th class="jst-cntr"><?php _e('ID', 'event_espresso'); ?></th>
56
+					<th class="jst-left"><?php _e('Date', 'event_espresso'); ?></th>
57
+					<th class="jst-cntr"><?php _e('Source', 'event_espresso'); ?></th>
58
+					<th class="jst-left"><?php _e('Method', 'event_espresso'); ?></th>
59
+					<th class="jst-left"><?php _e('Gateway Response', 'event_espresso'); ?></th>
60
+					<th class="jst-left"><?php _e('TXN&nbsp;ID / CHQ&nbsp;#', 'event_espresso'); ?></th>
61
+					<th class="jst-left"><?php _e('P.O. / S.O.&nbsp;#', 'event_espresso'); ?></th>
62
+					<th class="jst-left"><?php _e('Notes / Extra&nbsp;Accounting', 'event_espresso'); ?></th>
63
+					<!--<th class="jst-left"><?php _e('Details', 'event_espresso'); ?></th>-->
64
+					<th class="jst-cntr"><?php _e('Amount', 'event_espresso'); ?></th>
65 65
 				</tr>
66 66
 			</thead>
67 67
 			<tbody>
68
-		<?php if ( $payments ) : ?>
68
+		<?php if ($payments) : ?>
69 69
 			<?php $payment_total = 0; ?>
70
-			<?php foreach ( $payments as $PAY_ID => $payment ) :
71
-				$existing_reg_payment_json = isset( $existing_reg_payments[ $PAY_ID ] )
72
-					? wp_json_encode( $existing_reg_payments[ $PAY_ID ] )
70
+			<?php foreach ($payments as $PAY_ID => $payment) :
71
+				$existing_reg_payment_json = isset($existing_reg_payments[$PAY_ID])
72
+					? wp_json_encode($existing_reg_payments[$PAY_ID])
73 73
 					: '{}';
74 74
 				?>
75
-				<tr id="txn-admin-payment-tr-<?php echo $PAY_ID;?>">
75
+				<tr id="txn-admin-payment-tr-<?php echo $PAY_ID; ?>">
76 76
 					<td>
77 77
 						<span id="payment-status-<?php echo $PAY_ID; ?>" class="ee-status-strip-td ee-status-strip pymt-status-<?php echo $payment->STS_ID(); ?>"></span>
78
-						<div id="payment-STS_ID-<?php echo $PAY_ID;?>" class="hidden"><?php echo $payment->STS_ID();?></div>
79
-						<div id="reg-payments-<?php echo $PAY_ID;?>" class="hidden"><?php echo $existing_reg_payment_json; ?></div>
78
+						<div id="payment-STS_ID-<?php echo $PAY_ID; ?>" class="hidden"><?php echo $payment->STS_ID(); ?></div>
79
+						<div id="reg-payments-<?php echo $PAY_ID; ?>" class="hidden"><?php echo $existing_reg_payment_json; ?></div>
80 80
 					</td>
81 81
 					<td class=" jst-cntr">
82 82
 						<ul class="txn-overview-actions-ul">
83 83
 							<li>
84
-								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e( 'Edit Payment', 'event_espresso' );?>" data-payment-id="<?php echo $PAY_ID;?>">
84
+								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e('Edit Payment', 'event_espresso'); ?>" data-payment-id="<?php echo $PAY_ID; ?>">
85 85
 									<div class="dashicons dashicons-edit" style="margin: 0;"></div>
86 86
 								</a>
87 87
 							</li>
88 88
 							<li>
89
-								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e( 'Delete Payment', 'event_espresso' );?>" data-payment-id="<?php echo $PAY_ID;?>">
89
+								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e('Delete Payment', 'event_espresso'); ?>" data-payment-id="<?php echo $PAY_ID; ?>">
90 90
 									<div class="dashicons dashicons-trash" style="margin: 0;"></div>
91 91
 								</a>
92 92
 							</li>
93 93
 						</ul>
94 94
 					</td>
95 95
 					<td class=" jst-rght">
96
-						<div id="payment-id-<?php echo $PAY_ID;?>"><?php echo $PAY_ID;?></div>
96
+						<div id="payment-id-<?php echo $PAY_ID; ?>"><?php echo $PAY_ID; ?></div>
97 97
 					</td>
98 98
 					<td class=" jst-left">
99
-						<div id="payment-date-<?php echo $PAY_ID;?>" class="payment-date-dv"><?php echo $payment->timestamp('Y-m-d', 'g:i a');?></div>
99
+						<div id="payment-date-<?php echo $PAY_ID; ?>" class="payment-date-dv"><?php echo $payment->timestamp('Y-m-d', 'g:i a'); ?></div>
100 100
 					</td>
101 101
 					<td class=" jst-cntr">
102
-						<div id="payment-method-<?php echo $PAY_ID;?>">
103
-							<?php echo $payment->source();?>
102
+						<div id="payment-method-<?php echo $PAY_ID; ?>">
103
+							<?php echo $payment->source(); ?>
104 104
 						</div>
105 105
 					</td>
106 106
 					<td class=" jst-left">
107
-						<div id="payment-gateway-<?php echo $PAY_ID;?>">
108
-							<?php echo $payment->payment_method() ?  $payment->payment_method()->admin_name() : __("Unknown", 'event_espresso');?>
107
+						<div id="payment-gateway-<?php echo $PAY_ID; ?>">
108
+							<?php echo $payment->payment_method() ? $payment->payment_method()->admin_name() : __("Unknown", 'event_espresso'); ?>
109 109
 						</div>
110
-						<div id="payment-gateway-id-<?php echo $PAY_ID;?>" class="hidden"><?php echo $payment->payment_method() ? $payment->payment_method()->ID() : 0;?></div>
110
+						<div id="payment-gateway-id-<?php echo $PAY_ID; ?>" class="hidden"><?php echo $payment->payment_method() ? $payment->payment_method()->ID() : 0; ?></div>
111 111
 					</td>
112 112
 					<td class=" jst-left">
113
-						<div id="payment-response-<?php echo $PAY_ID;?>"><?php echo $payment->gateway_response();?></div>
113
+						<div id="payment-response-<?php echo $PAY_ID; ?>"><?php echo $payment->gateway_response(); ?></div>
114 114
 					</td>
115 115
 					<td class=" jst-left">
116
-						<div id="payment-txn-id-chq-nmbr-<?php echo $PAY_ID;?>"><?php echo $payment->txn_id_chq_nmbr();?></div>
116
+						<div id="payment-txn-id-chq-nmbr-<?php echo $PAY_ID; ?>"><?php echo $payment->txn_id_chq_nmbr(); ?></div>
117 117
 					</td>
118 118
 					<td class=" jst-left">
119
-						<div id="payment-po-nmbr-<?php echo $PAY_ID;?>"><?php echo $payment->po_number();?></div>
119
+						<div id="payment-po-nmbr-<?php echo $PAY_ID; ?>"><?php echo $payment->po_number(); ?></div>
120 120
 					</td>
121 121
 					<td class=" jst-left">
122
-						<div id="payment-accntng-<?php echo $PAY_ID;?>"><?php echo $payment->extra_accntng();?></div>
122
+						<div id="payment-accntng-<?php echo $PAY_ID; ?>"><?php echo $payment->extra_accntng(); ?></div>
123 123
 					</td>
124 124
 					<td class=" jst-rght">
125
-						<?php $payment_class = $payment->amount() > 0 ? 'txn-admin-payment-status-' . $payment->STS_ID() : 'txn-admin-payment-status-PDC'; ?>
126
-						<span class="<?php echo $payment_class;?>">
127
-							<div id="payment-amount-<?php echo $PAY_ID;?>" style="display:inline;"><?php echo EEH_Template::format_currency($payment->amount(), FALSE, FALSE ); ?></div>
125
+						<?php $payment_class = $payment->amount() > 0 ? 'txn-admin-payment-status-'.$payment->STS_ID() : 'txn-admin-payment-status-PDC'; ?>
126
+						<span class="<?php echo $payment_class; ?>">
127
+							<div id="payment-amount-<?php echo $PAY_ID; ?>" style="display:inline;"><?php echo EEH_Template::format_currency($payment->amount(), FALSE, FALSE); ?></div>
128 128
 						</span>
129 129
 					</td>
130 130
 				</tr>
@@ -134,25 +134,25 @@  discard block
 block discarded – undo
134 134
 			<?php endforeach; // $payment?>
135 135
 			<?php
136 136
 				$pay_totals_class = $payment_total > $grand_raw_total ? ' important-notice' : '';
137
-				$overpaid = $payment_total > $grand_raw_total ? '<span id="overpaid">' . __( 'This transaction has been overpaid ! ', 'event_espresso' ) . '</span>' : '';
137
+				$overpaid = $payment_total > $grand_raw_total ? '<span id="overpaid">'.__('This transaction has been overpaid ! ', 'event_espresso').'</span>' : '';
138 138
 			?>
139 139
 				<tr id="txn-admin-no-payments-tr" class="admin-primary-mbox-total-tr hidden">
140 140
 					<td class=" jst-rght" colspan="11">
141
-						<span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' ); ?></span>
141
+						<span class="important-notice"><?php _e('No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso'); ?></span>
142 142
 					</td>
143 143
 				</tr>
144
-				<tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr<?php echo $pay_totals_class;?>">
145
-					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo $overpaid . sprintf( __( 'Payments Total %s', 'event_espresso' ), '(' . EE_Registry::instance()->CFG->currency->code . ')' );?></span></th>
146
-					<th class=" jst-rght"><span id="txn-admin-payment-total"><?php echo EEH_Template::format_currency($payment_total, FALSE, FALSE);?></span></th>
144
+				<tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr<?php echo $pay_totals_class; ?>">
145
+					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo $overpaid.sprintf(__('Payments Total %s', 'event_espresso'), '('.EE_Registry::instance()->CFG->currency->code.')'); ?></span></th>
146
+					<th class=" jst-rght"><span id="txn-admin-payment-total"><?php echo EEH_Template::format_currency($payment_total, FALSE, FALSE); ?></span></th>
147 147
 				</tr>
148 148
 		<?php else : ?>
149 149
 				<tr id="txn-admin-no-payments-tr" class="admin-primary-mbox-total-tr">
150 150
 					<td class=" jst-rght" colspan="11">
151
-						<span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' ); ?></span>
151
+						<span class="important-notice"><?php _e('No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso'); ?></span>
152 152
 					</td>
153 153
 				</tr>
154 154
 				<tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr hidden">
155
-					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo __( 'Payments Total', 'event_espresso' );?></span></th>
155
+					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo __('Payments Total', 'event_espresso'); ?></span></th>
156 156
 					<th class=" jst-rght"><span id="txn-admin-payment-total"></span></th>
157 157
 				</tr>
158 158
 		<?php endif; // $payments?>
@@ -165,12 +165,12 @@  discard block
 block discarded – undo
165 165
 					<td class=" jst-cntr">
166 166
 						<ul class="txn-overview-actions-ul">
167 167
 							<li>
168
-								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e( 'Edit Payment', 'event_espresso' );?>" data-payment-id="PAY_ID">
168
+								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e('Edit Payment', 'event_espresso'); ?>" data-payment-id="PAY_ID">
169 169
 									<div class="dashicons dashicons-edit" style="margin: 0;"></div>
170 170
 								</a>
171 171
 							</li>
172 172
 							<li>
173
-								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e( 'Delete Payment', 'event_espresso' );?>" data-payment-id="PAY_ID">
173
+								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e('Delete Payment', 'event_espresso'); ?>" data-payment-id="PAY_ID">
174 174
 									<div class="dashicons dashicons-trash" style="margin: 0;"></div>
175 175
 								</a>
176 176
 							</li>
@@ -217,12 +217,12 @@  discard block
 block discarded – undo
217 217
 	<ul id="txn-admin-payment-options-ul">
218 218
 		<li>
219 219
 			<a id="display-txn-admin-apply-payment" class="button-primary no-icon no-hide" rel="txn-admin-apply-payment" > <!--display-the-hidden -->
220
-				<?php _e( 'Apply Payment', 'event_espresso' );?>
220
+				<?php _e('Apply Payment', 'event_espresso'); ?>
221 221
 			</a>
222 222
 		</li>
223 223
 		<li>
224 224
 			<a id="display-txn-admin-apply-refund" class="button-secondary no-icon no-hide" rel="txn-admin-apply-refund" >  <!--display-the-hidden -->
225
-				<?php _e( 'Apply Refund', 'event_espresso' );?>
225
+				<?php _e('Apply Refund', 'event_espresso'); ?>
226 226
 			</a>
227 227
 		</li>
228 228
 	</ul>
@@ -232,14 +232,14 @@  discard block
 block discarded – undo
232 232
 
233 233
 		<h2 id="admin-modal-dialog-apply-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
234 234
 			<div class="ee-icon ee-icon-cash-add float-left"></div>
235
-			<?php echo __( 'Apply a Payment to Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?>
235
+			<?php echo __('Apply a Payment to Transaction #', 'event_espresso').$txn_nmbr['value']; ?>
236 236
 		</h2>
237 237
 
238 238
 		<h2 id="admin-modal-dialog-edit-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
239 239
 			<div class="ee-icon ee-icon-cash-edit float-left"></div>
240 240
 			<?php
241 241
 			echo sprintf(
242
-				__( 'Edit Payment #%s for Transaction #%s', 'event_espresso' ),
242
+				__('Edit Payment #%s for Transaction #%s', 'event_espresso'),
243 243
 				'<span></span>',
244 244
 				$txn_nmbr['value']
245 245
 			);
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 			<div class="ee-icon ee-icon-cash-edit float-left"></div>
251 251
 			<?php
252 252
 			echo sprintf(
253
-				__( 'Edit Refund #%s for Transaction #%s', 'event_espresso' ),
253
+				__('Edit Refund #%s for Transaction #%s', 'event_espresso'),
254 254
 				'<span></span>',
255 255
 				$txn_nmbr['value']
256 256
 			);
@@ -259,14 +259,14 @@  discard block
 block discarded – undo
259 259
 
260 260
 		<h2 id="admin-modal-dialog-apply-refund-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
261 261
 			<div class="ee-icon ee-icon-cash-remove float-left"></div>
262
-			<?php echo __( 'Apply a Refund to Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?>
262
+			<?php echo __('Apply a Refund to Transaction #', 'event_espresso').$txn_nmbr['value']; ?>
263 263
 		</h2>
264 264
 
265 265
 		<form name="txn-admin-apply-payment-frm" id="txn-admin-apply-payment-frm" action="<?php echo $apply_payment_form_url; ?>">
266 266
 			<div class="admin-modal-dialog-wrap">
267 267
 				<div class="admin-modal-dialog-inner">
268 268
 
269
-					<input  type="hidden" name="espresso_apply_payment_nonce" id="espresso_apply_payment_nonce" value="<?php echo wp_create_nonce( 'espresso_apply_payment_nonce' );?>"/>
269
+					<input  type="hidden" name="espresso_apply_payment_nonce" id="espresso_apply_payment_nonce" value="<?php echo wp_create_nonce('espresso_apply_payment_nonce'); ?>"/>
270 270
 					<input  type="hidden" name="espresso_ajax" id="espresso-ajax" value="0"/>
271 271
 					<input  type="hidden" name="noheader" id="txn-admin-noheader-inp" value="0"/>
272 272
 					<input  type="hidden" name="txn_admin_payment[PAY_ID]" id="txn-admin-payment-payment-id-inp" class="txn-admin-apply-payment-inp" value="0"/>
@@ -274,108 +274,108 @@  discard block
 block discarded – undo
274 274
 					<input  type="hidden" name="txn_admin_payment[type]" id="txn-admin-payment-type-inp" value="1"/>
275 275
 					<input  type="hidden" name="txn_admin_payment[details]" id="txn-admin-payment-details-inp" value=""/>
276 276
 					<input  type="hidden" name="txn_admin_delete_payment_form_url" id="txn-admin-delete-payment-form-url-inp" value="<?php echo $delete_payment_form_url; ?>"/>
277
-					<input  type="hidden" name="txn_admin_todays_date" id="txn-admin-todays-date-inp" value="<?php echo date( 'Y-m-d h:i a', current_time( 'timestamp' )); ?>"/>
277
+					<input  type="hidden" name="txn_admin_todays_date" id="txn-admin-todays-date-inp" value="<?php echo date('Y-m-d h:i a', current_time('timestamp')); ?>"/>
278 278
 
279 279
 					<div class="txn-admin-apply-payment-date-dv admin-modal-dialog-row">
280
-						<div class="validation-notice-dv"><?php _e( 'The following is  a required field', 'event_espresso' );?></div>
281
-						<label for="txn-admin-payment-date-inp" class=""><?php _e( 'Payment Date', 'event_espresso' );?></label>
282
-						<input name="[date]txn_admin_payment" id="txn-admin-payment-date-inp" class="txn-admin-apply-payment-inp required" type="text" value="<?php echo date( 'Y-m-d g:i a', current_time( 'timestamp' )); ?>"/>
283
-						<p class="description"><?php _e( 'The date the payment was actually made on', 'event_espresso' );?></p>
280
+						<div class="validation-notice-dv"><?php _e('The following is  a required field', 'event_espresso'); ?></div>
281
+						<label for="txn-admin-payment-date-inp" class=""><?php _e('Payment Date', 'event_espresso'); ?></label>
282
+						<input name="[date]txn_admin_payment" id="txn-admin-payment-date-inp" class="txn-admin-apply-payment-inp required" type="text" value="<?php echo date('Y-m-d g:i a', current_time('timestamp')); ?>"/>
283
+						<p class="description"><?php _e('The date the payment was actually made on', 'event_espresso'); ?></p>
284 284
 					</div>
285 285
 
286 286
 					<div class="txn-admin-apply-payment-amount-dv admin-modal-dialog-row">
287
-						<div class="validation-notice-dv"><?php _e( 'The following is  a required field', 'event_espresso' );?></div>
288
-						<label for="txn-admin-payment-amount-inp" class=""><?php _e( 'Amount', 'event_espresso' );?></label>
287
+						<div class="validation-notice-dv"><?php _e('The following is  a required field', 'event_espresso'); ?></div>
288
+						<label for="txn-admin-payment-amount-inp" class=""><?php _e('Amount', 'event_espresso'); ?></label>
289 289
 						<input name="txn_admin_payment[amount]" id="txn-admin-payment-amount-inp" class="txn-admin-apply-payment-inp required" type="text" value=""/>
290
-						<p class="description"><?php _e( 'The amount of the payment', 'event_espresso' );?></p>
290
+						<p class="description"><?php _e('The amount of the payment', 'event_espresso'); ?></p>
291 291
 					</div>
292 292
 
293 293
 					<div class="txn-admin-apply-payment-method-dv admin-modal-dialog-row">
294
-						<div class="validation-notice-dv"><?php _e( 'The following is  a required field', 'event_espresso' );?></div>
295
-						<label for="txn-admin-payment-method-inp" class=""><?php _e( 'Method of Payment', 'event_espresso' );?></label>
294
+						<div class="validation-notice-dv"><?php _e('The following is  a required field', 'event_espresso'); ?></div>
295
+						<label for="txn-admin-payment-method-inp" class=""><?php _e('Method of Payment', 'event_espresso'); ?></label>
296 296
 						<select name="txn_admin_payment[PMD_ID]" id="txn-admin-payment-method-slct" class="txn-admin-apply-payment-slct required" type="text" >
297
-						<?php foreach ( $payment_methods as $method ) : ?>
297
+						<?php foreach ($payment_methods as $method) : ?>
298 298
 							<?php $selected = $method->slug() == 'cash' ? ' selected="selected"' : ''; ?>
299
-							<option id="payment-method-opt-<?php echo $method->slug(); ?>" value="<?php echo $method->ID(); ?>"<?php echo $selected; ?>><?php echo sanitize_key( $method->admin_desc() ) ? substr( $method->admin_desc(), 0, 128) : $method->admin_name() ; ?>&nbsp;&nbsp;</option>
299
+							<option id="payment-method-opt-<?php echo $method->slug(); ?>" value="<?php echo $method->ID(); ?>"<?php echo $selected; ?>><?php echo sanitize_key($method->admin_desc()) ? substr($method->admin_desc(), 0, 128) : $method->admin_name(); ?>&nbsp;&nbsp;</option>
300 300
 						<?php endforeach; ?>
301 301
 						</select>
302
-						<p class="description"><?php _e( 'Whether the payment was made via PayPal, Credit Card, Cheque, or Cash', 'event_espresso' );?></p>
302
+						<p class="description"><?php _e('Whether the payment was made via PayPal, Credit Card, Cheque, or Cash', 'event_espresso'); ?></p>
303 303
 					</div>
304 304
 
305 305
 					<div class="mop-PP mop-CC mop-CHQ mop">
306 306
 						<div class="txn-admin-apply-payment-gw-txn-id-dv admin-modal-dialog-row">
307
-							<label for="txn-admin-payment-txn-id-inp" class=""><?php _e( 'TXN ID / CHQ #', 'event_espresso' );?></label>
307
+							<label for="txn-admin-payment-txn-id-inp" class=""><?php _e('TXN ID / CHQ #', 'event_espresso'); ?></label>
308 308
 							<input name="txn_admin_payment[txn_id_chq_nmbr]" id="txn-admin-payment-txn-id-chq-nmbr-inp" class="txn-admin-apply-payment-inp" type="text" maxlength="100"/>
309
-							<p class="description"><?php _e( 'The Transaction ID sent back from the payment gateway, or the Cheque #', 'event_espresso' );?></p>
309
+							<p class="description"><?php _e('The Transaction ID sent back from the payment gateway, or the Cheque #', 'event_espresso'); ?></p>
310 310
 						</div>
311 311
 					</div>
312 312
 
313 313
 					<div class="mop-CC mop" style="display:none">
314 314
 						<div class="txn-admin-apply-payment-response-dv admin-modal-dialog-row">
315
-							<label for="txn-admin-payment-gateway-response-inp" class=""><?php _e( 'Gateway Response', 'event_espresso' );?></label>
315
+							<label for="txn-admin-payment-gateway-response-inp" class=""><?php _e('Gateway Response', 'event_espresso'); ?></label>
316 316
 							<input name="txn_admin_payment[gateway_response]" id="txn-admin-payment-gateway-response-inp" class="txn-admin-apply-payment-inp" type="text"/>
317
-							<p class="description"><?php _e( 'The gateway response string (optional)', 'event_espresso' );?></p>
317
+							<p class="description"><?php _e('The gateway response string (optional)', 'event_espresso'); ?></p>
318 318
 						</div>
319 319
 					</div>
320 320
 
321 321
 					<div class="mop-PP mop-CC mop">
322 322
 						<div class="txn-admin-apply-payment-status-dv admin-modal-dialog-row">
323
-							<label for="txn-admin-payment-status-inp" class=""><?php _e( 'Payment Status', 'event_espresso' );?></label>
323
+							<label for="txn-admin-payment-status-inp" class=""><?php _e('Payment Status', 'event_espresso'); ?></label>
324 324
 							<select name="txn_admin_payment[status]" id="txn-admin-payment-status-slct" class="txn-admin-apply-payment-slct" type="text" >
325
-							<?php foreach ( $payment_status as $STS_ID => $STS_code ) : ?>
325
+							<?php foreach ($payment_status as $STS_ID => $STS_code) : ?>
326 326
 								<?php $selected = $STS_ID == 'PAP' ? ' selected="selected"' : ''; ?>
327 327
 								<option id="payment-status-opt-<?php echo $STS_ID; ?>" value="<?php echo $STS_ID; ?>"<?php echo $selected; ?>><?php echo $STS_code; ?>&nbsp;&nbsp;</option>
328 328
 							<?php endforeach; ?>
329 329
 							</select>
330
-							<p class="description"><?php _e( 'Whether the payment was approved, cancelled, declined or failed after submission to the gateway', 'event_espresso' );?></p>
330
+							<p class="description"><?php _e('Whether the payment was approved, cancelled, declined or failed after submission to the gateway', 'event_espresso'); ?></p>
331 331
 						</div>
332 332
 					</div>
333 333
 
334 334
 					<div class="txn-admin-apply-payment-po-nmbr-dv admin-modal-dialog-row">
335
-						<label for="txn-admin-payment-po-nmbr-inp" class=""><?php _e( 'P.O. / S.O. #', 'event_espresso' );?></label>
335
+						<label for="txn-admin-payment-po-nmbr-inp" class=""><?php _e('P.O. / S.O. #', 'event_espresso'); ?></label>
336 336
 						<input name="txn_admin_payment[po_number]" id="txn-admin-payment-po-nmbr-inp" class="txn-admin-apply-payment-inp" type="text" maxlength="100"/>
337
-						<p class="description"><?php _e( 'The Purchase or Sales Order Number if any (optional)', 'event_espresso' );?></p>
337
+						<p class="description"><?php _e('The Purchase or Sales Order Number if any (optional)', 'event_espresso'); ?></p>
338 338
 					</div>
339 339
 
340 340
 					<div class="txn-admin-apply-payment-accounting-dv admin-modal-dialog-row">
341
-						<label for="txn-admin-payment-accounting-inp" class="last"><?php _e( 'Notes / Extra Accounting', 'event_espresso' );?></label>
341
+						<label for="txn-admin-payment-accounting-inp" class="last"><?php _e('Notes / Extra Accounting', 'event_espresso'); ?></label>
342 342
 						<input name="txn_admin_payment[accounting]" id="txn-admin-payment-accounting-inp" class="txn-admin-apply-payment-inp" type="text" value="<?php echo $REG_code; ?>" maxlength="100"/>		<input type="hidden" id="txn-admin-reg-code-inp" value="<?php echo $REG_code; ?>"/>
343
-						<p class="description"><?php _e( 'An extra field you may use for accounting purposes or simple notes. Defaults to the primary registrant\'s registration code.', 'event_espresso' );?></p>
343
+						<p class="description"><?php _e('An extra field you may use for accounting purposes or simple notes. Defaults to the primary registrant\'s registration code.', 'event_espresso'); ?></p>
344 344
 					</div>
345 345
 
346 346
 					<div class="txn-admin-apply-payment-registrations-dv admin-modal-dialog-row">
347
-						<label for="txn-admin-payment-registrations-inp" class="last"><?php _e( 'Registrations to Apply Payment to:', 'event_espresso' ); ?></label>
347
+						<label for="txn-admin-payment-registrations-inp" class="last"><?php _e('Registrations to Apply Payment to:', 'event_espresso'); ?></label>
348 348
 						<label class="txn-admin-apply-payment-to-registrations-lbl">
349 349
 							<input type="radio" value="1" id="txn-admin-apply-payment-to-all-registrations-inp" name="txn_admin_payment[apply_to_all_registrations]"  checked="checked"/>
350
-							<?php _e( 'ALL Registrations', 'event_espresso' ); ?>
350
+							<?php _e('ALL Registrations', 'event_espresso'); ?>
351 351
 						</label>
352 352
 						<label class="txn-admin-apply-payment-to-registrations-lbl">
353 353
 							<input type="radio" value="0" id="txn-admin-apply-payment-to-some-registrations-inp" name="txn_admin_payment[apply_to_all_registrations]" />
354
-							<?php _e( 'Just the following Registrations', 'event_espresso' ); ?>
354
+							<?php _e('Just the following Registrations', 'event_espresso'); ?>
355 355
 						</label>
356 356
 						<?php echo $registrations_to_apply_payment_to; ?>
357 357
 					</div>
358 358
 
359 359
 					<div class="txn-admin-payment-reg-status-dv admin-modal-dialog-row">
360
-						<label for="txn-admin-payment-reg-status-inp" class="last"><?php _e( 'Change Registration Status?', 'event_espresso' );?></label>
360
+						<label for="txn-admin-payment-reg-status-inp" class="last"><?php _e('Change Registration Status?', 'event_espresso'); ?></label>
361 361
 						<?php echo $status_change_select; ?>
362
-						<p class="description"><?php _e( 'If you wish to change the status for the registrations selected above, then select which status from this dropdown.', 'event_espresso' ); ?></p>
362
+						<p class="description"><?php _e('If you wish to change the status for the registrations selected above, then select which status from this dropdown.', 'event_espresso'); ?></p>
363 363
 						<br/>
364 364
 					</div>
365 365
 
366 366
 					<div class="txn-admin-apply-payment-send-notifications-dv admin-modal-dialog-row">
367 367
 
368
-						<label for="txn-admin-payment-send-notifications-inp" class="last"><?php _e( 'Send Related Messages?', 'event_espresso' );?></label>
368
+						<label for="txn-admin-payment-send-notifications-inp" class="last"><?php _e('Send Related Messages?', 'event_espresso'); ?></label>
369 369
 						<label class="txn-admin-payment-send-notifications-lbl">
370 370
 							<input type="checkbox" value="1" name="txn_payments[send_notifications]" checked="checked" aria-checked="true" style="vertical-align: middle;">
371
-							<?php _e( 'Payment Messages?', 'event_espresso' ); ?>
371
+							<?php _e('Payment Messages?', 'event_espresso'); ?>
372 372
 						</label>
373 373
 						<label class="txn-admin-payment-send-notifications-lbl">
374 374
 							<input type="checkbox" value="1" name="txn_reg_status_change[send_notifications]" style="vertical-align: middle;">
375
-							<?php _e( 'Registration Messages?', 'event_espresso' ); ?>
375
+							<?php _e('Registration Messages?', 'event_espresso'); ?>
376 376
 						</label>
377 377
 						<br class="clear-float"/>
378
-						<p class="description"><?php printf( __('By default %1$sa payment message is sent to the primary registrant%2$s after submitting this form.%3$sHowever, if you check the "Registration Messages" box, the system will also send any related messages matching the status of the registrations to %1$seach registration for this transaction%2$s.', 'event_espresso'), '<strong>', '</strong>', '<br />' ); ?></p>
378
+						<p class="description"><?php printf(__('By default %1$sa payment message is sent to the primary registrant%2$s after submitting this form.%3$sHowever, if you check the "Registration Messages" box, the system will also send any related messages matching the status of the registrations to %1$seach registration for this transaction%2$s.', 'event_espresso'), '<strong>', '</strong>', '<br />'); ?></p>
379 379
 						<label></label>
380 380
 					</div>
381 381
 					<div class="clear"></div>
@@ -386,27 +386,27 @@  discard block
 block discarded – undo
386 386
 			<ul id="admin-modal-dialog-options-ul">
387 387
 				<li>
388 388
 					<a id="txn-admin-modal-dialog-apply-payment-lnk" class="button-primary no-icon" style="display:none;" >
389
-						<?php _e( 'Apply Payment', 'event_espresso' );?>
389
+						<?php _e('Apply Payment', 'event_espresso'); ?>
390 390
 					</a>
391 391
 				</li>
392 392
 				<li>
393 393
 					<a id="txn-admin-modal-dialog-edit-payment-lnk" class="button-primary no-icon" style="display:none;" >
394
-						<?php _e( 'Save Payment Details', 'event_espresso' );?>
394
+						<?php _e('Save Payment Details', 'event_espresso'); ?>
395 395
 					</a>
396 396
 				</li>
397 397
 				<li>
398 398
 					<a id="txn-admin-modal-dialog-edit-refund-lnk" class="button-primary no-icon" style="display:none;" >
399
-						<?php _e( 'Save Refund Details', 'event_espresso' );?>
399
+						<?php _e('Save Refund Details', 'event_espresso'); ?>
400 400
 					</a>
401 401
 				</li>
402 402
 				<li>
403 403
 					<a id="txn-admin-modal-dialog-apply-refund-lnk" class="button-primary no-icon" style="display:none;" >
404
-						<?php _e( 'Apply Refund', 'event_espresso' );?>
404
+						<?php _e('Apply Refund', 'event_espresso'); ?>
405 405
 					</a>
406 406
 				</li>
407 407
 				<li>
408 408
 					<a id="txn-admin-modal-dialog-cancel-lnk" class="button-secondary no-icon" >
409
-						<?php _e( 'Cancel', 'event_espresso' );?>
409
+						<?php _e('Cancel', 'event_espresso'); ?>
410 410
 					</a>
411 411
 				</li>
412 412
 				<li>
@@ -423,29 +423,29 @@  discard block
 block discarded – undo
423 423
 
424 424
 		<h2 id="admin-modal-dialog-delete-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
425 425
 			<span class="ee-icon ee-icon-cash-add"></span>
426
-			<?php echo __( 'Delete Payment/Refund for Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?>
426
+			<?php echo __('Delete Payment/Refund for Transaction #', 'event_espresso').$txn_nmbr['value']; ?>
427 427
 		</h2>
428 428
 
429 429
 		<form name="txn-admin-delete-payment-frm" id="txn-admin-delete-payment-frm" action="<?php echo $delete_payment_url; ?>">
430 430
 			<div class="admin-modal-dialog-wrap">
431 431
 				<div class="admin-modal-dialog-inner">
432 432
 
433
-					<input  type="hidden" name="espresso_delete_payment_nonce" id="espresso_delete_payment_nonce" value="<?php echo wp_create_nonce( 'espresso_delete_payment_nonce' );?>"/>
433
+					<input  type="hidden" name="espresso_delete_payment_nonce" id="espresso_delete_payment_nonce" value="<?php echo wp_create_nonce('espresso_delete_payment_nonce'); ?>"/>
434 434
 					<input  type="hidden" name="delete_espresso_ajax" id="delete-espresso-ajax" value="0"/>
435 435
 					<input  type="hidden" name="delete_noheader" id="delete-txn-admin-noheader-inp" value="0"/>
436 436
 					<input  type="hidden" name="delete_txn_admin_payment[PAY_ID]" id="delete-txn-admin-payment-payment-id-inp" class="txn-admin-apply-payment-inp" value="0"/>
437 437
 					<input  type="hidden" name="delete_txn_admin_payment[TXN_ID]" id="delete-txn-admin-payment-txn-id-inp" value="<?php echo $txn_nmbr['value']; ?>"/>
438 438
 
439 439
 					<div class="txn-admin-apply-payment-accounting-dv admin-modal-dialog-row">
440
-						<label for="delete-txn-admin-payment-reg-status-inp" class="last"><?php _e( 'Change Registration Status?', 'event_espresso' );?></label>
440
+						<label for="delete-txn-admin-payment-reg-status-inp" class="last"><?php _e('Change Registration Status?', 'event_espresso'); ?></label>
441 441
 						<?php echo $delete_status_change_select; ?>
442
-						<p class="description"><?php printf( __('If you wish to change the status of all the registrations associated with this transaction after deleting this payment/refund, then select which status from this dropdown. %sNote: ALL registrations associated with this transaction will be updated to this new status.%s', 'event_espresso'), '<strong>', '</strong>' ); ?></p>
442
+						<p class="description"><?php printf(__('If you wish to change the status of all the registrations associated with this transaction after deleting this payment/refund, then select which status from this dropdown. %sNote: ALL registrations associated with this transaction will be updated to this new status.%s', 'event_espresso'), '<strong>', '</strong>'); ?></p>
443 443
 					</div>
444 444
 
445 445
 					<div class="ee-attention txn-admin-apply-payment-accounting-dv admin-modal-dialog-row">
446
-						<label for="delete-txn-admin-payment-accounting-inp" class="last"><?php _e( 'Send Related Messages?', 'event_espresso' );?></label>
446
+						<label for="delete-txn-admin-payment-accounting-inp" class="last"><?php _e('Send Related Messages?', 'event_espresso'); ?></label>
447 447
 						<input type="checkbox" value="1" name="delete_txn_reg_status_change[send_notifications]">
448
-						<p class="description"><?php _e( 'If you check this box, the system will send any related registration messages matching the status of the registrations to each registration for this transaction. No Payment notifications are sent when deleting a payment.', 'event_espresso' );?></p>
448
+						<p class="description"><?php _e('If you check this box, the system will send any related registration messages matching the status of the registrations to each registration for this transaction. No Payment notifications are sent when deleting a payment.', 'event_espresso'); ?></p>
449 449
 					</div>
450 450
 					<div class="clear"></div>
451 451
 
@@ -455,12 +455,12 @@  discard block
 block discarded – undo
455 455
 			<ul id="del-admin-modal-dialog-options-ul">
456 456
 				<li>
457 457
 					<a id="txn-admin-modal-dialog-delete-lnk" class="button-primary no-icon" style="display:none;" >
458
-						<?php _e( 'Delete', 'event_espresso' );?>
458
+						<?php _e('Delete', 'event_espresso'); ?>
459 459
 					</a>
460 460
 				</li>
461 461
 				<li>
462 462
 					<a id="del-txn-admin-modal-dialog-cancel-lnk" class="button-secondary no-icon" >
463
-						<?php _e( 'Cancel', 'event_espresso' );?>
463
+						<?php _e('Cancel', 'event_espresso'); ?>
464 464
 					</a>
465 465
 				</li>
466 466
 				<li>
@@ -476,30 +476,30 @@  discard block
 block discarded – undo
476 476
 	<?php endif; // $grand_raw_total > 0?>
477 477
 
478 478
 	<?php
479
-	if ( WP_DEBUG ) {
480
-		$delivered_messages = get_option( 'EED_Messages__payment', array() );
481
-		if ( isset( $delivered_messages[ $TXN_ID ] )) {
479
+	if (WP_DEBUG) {
480
+		$delivered_messages = get_option('EED_Messages__payment', array());
481
+		if (isset($delivered_messages[$TXN_ID])) {
482 482
 			?>
483
-			<h4 class="admin-primary-mbox-h4 hdr-has-icon"><span class="dashicons dashicons-email-alt"></span><?php _e( 'Messages Sent to Primary Registrant', 'event_espresso' );?></h4>
483
+			<h4 class="admin-primary-mbox-h4 hdr-has-icon"><span class="dashicons dashicons-email-alt"></span><?php _e('Messages Sent to Primary Registrant', 'event_espresso'); ?></h4>
484 484
 
485 485
 			<div class="admin-primary-mbox-tbl-wrap">
486 486
 				<table class="admin-primary-mbox-tbl">
487 487
 					<thead>
488 488
 						<tr>
489
-							<th class="jst-left"><?php _e( 'Date & Time', 'event_espresso' );?></th>
490
-							<th class="jst-left"><?php _e( 'Message Type', 'event_espresso' );?></th>
491
-							<th class="jst-left"><?php _e( 'Payment Status Upon Sending', 'event_espresso' );?></th>
492
-							<th class="jst-left"><?php _e( 'TXN Status Upon Sending', 'event_espresso' );?></th>
489
+							<th class="jst-left"><?php _e('Date & Time', 'event_espresso'); ?></th>
490
+							<th class="jst-left"><?php _e('Message Type', 'event_espresso'); ?></th>
491
+							<th class="jst-left"><?php _e('Payment Status Upon Sending', 'event_espresso'); ?></th>
492
+							<th class="jst-left"><?php _e('TXN Status Upon Sending', 'event_espresso'); ?></th>
493 493
 						</tr>
494 494
 					</thead>
495 495
 					<tbody>
496
-						<?php foreach ( $delivered_messages[ $TXN_ID ] as $timestamp => $delivered_message ) :
496
+						<?php foreach ($delivered_messages[$TXN_ID] as $timestamp => $delivered_message) :
497 497
 							?>
498 498
 							<tr>
499
-								<td class="jst-left"><?php echo gmdate( get_option('date_format') . ' ' . get_option('time_format'), ( $timestamp + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) );?></td>
500
-								<td class="jst-left"><?php echo isset( $delivered_message['message_type'] ) ? $delivered_message['message_type'] : '';?></td>
501
-								<td class="jst-left"><?php echo isset( $delivered_message['pay_status'] ) ? $delivered_message['pay_status'] : '';?></td>
502
-								<td class="jst-left"><?php echo isset( $delivered_message['txn_status'] ) ? $delivered_message['txn_status'] : '';?></td>
499
+								<td class="jst-left"><?php echo gmdate(get_option('date_format').' '.get_option('time_format'), ($timestamp + (get_option('gmt_offset') * HOUR_IN_SECONDS))); ?></td>
500
+								<td class="jst-left"><?php echo isset($delivered_message['message_type']) ? $delivered_message['message_type'] : ''; ?></td>
501
+								<td class="jst-left"><?php echo isset($delivered_message['pay_status']) ? $delivered_message['pay_status'] : ''; ?></td>
502
+								<td class="jst-left"><?php echo isset($delivered_message['txn_status']) ? $delivered_message['txn_status'] : ''; ?></td>
503 503
 							</tr>
504 504
 						<?php endforeach; // $delivered_messages?>
505 505
 					</tbody>
Please login to merge, or discard this patch.
templates/txn_admin_details_side_meta_box_registrant.template.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,23 +9,23 @@  discard block
 block discarded – undo
9 9
 /** @type string $edit_attendee_url */
10 10
 ?>
11 11
 <div id="admin-side-mbox-primary-registrant-dv" class="admin-side-mbox-dv">
12
-<?php if ( ! empty( $no_attendee_message ) ) : ?>
12
+<?php if ( ! empty($no_attendee_message)) : ?>
13 13
 	<p class="clearfix">
14 14
 		<?php echo $no_attendee_message; ?>
15 15
 	</p>
16 16
 </div> <!-- end #admin-side-mbox-primary-registrant-dv -->
17 17
 <?php else : ?>
18 18
 	<p class="clearfix">
19
-		<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e( 'Name', 'event_espresso' );?></span><?php 	echo $prime_reg_fname . ' ' . $prime_reg_lname;?>
19
+		<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e('Name', 'event_espresso'); ?></span><?php 	echo $prime_reg_fname.' '.$prime_reg_lname; ?>
20 20
 	</p>
21 21
 	<p class="clearfix">
22
-		<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e( 'Email', 'event_espresso' );?></span><a href="mailto:<?php echo $prime_reg_email;?>"><?php echo $prime_reg_email;?></a>
22
+		<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e('Email', 'event_espresso'); ?></span><a href="mailto:<?php echo $prime_reg_email; ?>"><?php echo $prime_reg_email; ?></a>
23 23
 	</p>
24 24
 	<p class="clearfix">
25
-		<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e( 'Phone #', 'event_espresso' );?></span><?php echo $prime_reg_phone;?>
25
+		<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e('Phone #', 'event_espresso'); ?></span><?php echo $prime_reg_phone; ?>
26 26
 	</p>
27 27
 	<p class="clearfix">
28
-		<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e( 'Address', 'event_espresso' );?></span>
28
+		<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e('Address', 'event_espresso'); ?></span>
29 29
 		<div class="admin-side-mbox-text-dv">
30 30
 			<?php echo $formatted_address; ?>
31 31
 		</div>
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 
35 35
 
36 36
 <p style="text-align:right;">
37
-	<a class="button button-small" href="<?php echo $edit_attendee_url; ?>" title="<?php esc_attr_e( 'View details for this contact.', 'event_espresso' );?>">
37
+	<a class="button button-small" href="<?php echo $edit_attendee_url; ?>" title="<?php esc_attr_e('View details for this contact.', 'event_espresso'); ?>">
38 38
 		<span class="ee-icon ee-icon-user-edit"></span><?php _e('View / Edit this Contact', 'event_espresso'); ?>
39 39
 	</a>
40 40
 </p>
41
-<?php endif;  //end no attendee check?>
41
+<?php endif; //end no attendee check?>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,9 +14,12 @@
 block discarded – undo
14 14
 		<?php echo $no_attendee_message; ?>
15 15
 	</p>
16 16
 </div> <!-- end #admin-side-mbox-primary-registrant-dv -->
17
-<?php else : ?>
17
+<?php else {
18
+	: ?>
18 19
 	<p class="clearfix">
19
-		<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e( 'Name', 'event_espresso' );?></span><?php 	echo $prime_reg_fname . ' ' . $prime_reg_lname;?>
20
+		<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e( 'Name', 'event_espresso' );
21
+}
22
+?></span><?php 	echo $prime_reg_fname . ' ' . $prime_reg_lname;?>
20 23
 	</p>
21 24
 	<p class="clearfix">
22 25
 		<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e( 'Email', 'event_espresso' );?></span><a href="mailto:<?php echo $prime_reg_email;?>"><?php echo $prime_reg_email;?></a>
Please login to merge, or discard this patch.
templates/txn_admin_details_side_meta_box_txn_number.template.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,13 +2,13 @@
 block discarded – undo
2 2
 
3 3
 	<table id="admin-primary-mbox-txn-details-tbl" class="form-table">
4 4
 		<tbody>
5
-		<?php foreach ( $txn_details as $key => $txn_detail ) : ?>
5
+		<?php foreach ($txn_details as $key => $txn_detail) : ?>
6 6
 			<tr>
7 7
 				<th>
8
-					<label for="<?php echo $key;?>"><?php echo $txn_detail['label'];?></label>
8
+					<label for="<?php echo $key; ?>"><?php echo $txn_detail['label']; ?></label>
9 9
 				</th>
10 10
 				<td>
11
-					<?php echo $txn_detail['value'];?>
11
+					<?php echo $txn_detail['value']; ?>
12 12
 				</td>
13 13
 			</tr>
14 14
 		<?php endforeach; // $txn_details?>
Please login to merge, or discard this patch.
admin_pages/transactions/templates/txn_admin_overview.template.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 
2 2
 		<ul class="subsubsub">
3
-			<li class="all"><a class="current" href="<?php echo $view_all_url;?>">View All <span class="count">(<?php echo $table_rows; ?>)</span></a></li>
3
+			<li class="all"><a class="current" href="<?php echo $view_all_url; ?>">View All <span class="count">(<?php echo $table_rows; ?>)</span></a></li>
4 4
 		</ul>
5 5
 
6 6
 		<div id="txn-filters-dv">
7
-			<form id="txn-filters-frm" action="<?php echo $txn_overview_url;?>" method="post" name="txn-filters-frm">
8
-				<label for="txn-filter-start-date"><?php _e( 'Display Transactions from ', 'event_espresso' ); ?></label>
7
+			<form id="txn-filters-frm" action="<?php echo $txn_overview_url; ?>" method="post" name="txn-filters-frm">
8
+				<label for="txn-filter-start-date"><?php _e('Display Transactions from ', 'event_espresso'); ?></label>
9 9
 				<input id="txn-filter-start-date" class="datepicker" type="text" value="<?php echo $start_date; ?>" name="txn-filter-start-date" size="15"/>	
10
-				<label for="txn-filter-end-date"> <?php _e( 'until', 'event_espresso' ); ?> </label>
10
+				<label for="txn-filter-end-date"> <?php _e('until', 'event_espresso'); ?> </label>
11 11
 				<input id="txn-filter-end-date" class="datepicker" type="text" value="<?php echo $end_date; ?>" name="txn-filter-end-date" size="15"/>	
12 12
 				<input id="submit-txn-filters-sbmt" class="button-secondary" type="submit" value="Filter Months">
13 13
 			</form>
14 14
 		</div>
15 15
 
16
-        <form id="transactions-overview-frm" action="<?php echo $txn_overview_url;?>" method="get">
16
+        <form id="transactions-overview-frm" action="<?php echo $txn_overview_url; ?>" method="get">
17 17
             <input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
18 18
             <input type="hidden" id="per_page" name="per_page" value="" />
19 19
             <?php echo $list_table->display(); ?>
Please login to merge, or discard this patch.
admin_pages/transactions/templates/txn_admin_wrapper.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <div class="wrap">
2 2
 
3
-	<h2><?php esc_attr_e( 'Event Espresso', 'event_espresso' ); ?>&nbsp;-&nbsp;<?php esc_attr_e( $admin_page_title, 'event_espresso' ); ?></h2>
3
+	<h2><?php esc_attr_e('Event Espresso', 'event_espresso'); ?>&nbsp;-&nbsp;<?php esc_attr_e($admin_page_title, 'event_espresso'); ?></h2>
4 4
 
5 5
 	<h2 class="nav-tab-wrapper">
6 6
 		<a class="nav-tab<?php echo $tab_active_overview; ?>" href="<?php echo $tab_url_overview; ?>"><?php echo $tab_lnk_overview; ?></a>
7
-		<?php if ( $tab_details ) : ?>
7
+		<?php if ($tab_details) : ?>
8 8
 			<a class="nav-tab<?php echo $tab_active_details; ?>" href="<?php echo $tab_url_details; ?>"><?php echo $tab_lnk_details; ?></a>
9 9
 		<?php endif; ?>
10 10
 		<a class="nav-tab<?php echo $tab_active_reports; ?>" href="<?php echo $tab_url_reports; ?>"><?php echo $tab_lnk_reports; ?></a>
Please login to merge, or discard this patch.
caffeinated/EE_Caf_Messages.class.php 2 patches
Spacing   +142 added lines, -142 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * @since            4.3.2
16 16
  * @author          Darren Ethier
17 17
  */
18
-class EE_Caf_Messages  {
18
+class EE_Caf_Messages {
19 19
 
20 20
 
21 21
 	/**
@@ -34,36 +34,36 @@  discard block
 block discarded – undo
34 34
 	 * @return void
35 35
 	 */
36 36
 	private function _caf_hooks() {
37
-		add_filter('FHEE__EED_Messages___set_messages_paths___MSG_PATHS', array( $this, 'messages_autoload_paths'), 5 );
38
-		add_filter('FHEE__EE_Email_messenger__get_validator_config', array( $this, 'email_messenger_validator_config'), 5, 2 );
39
-		add_filter('FHEE__EE_Email_messenger__get_template_fields', array( $this, 'email_messenger_template_fields'), 5, 2 );
40
-		add_filter( 'FHEE__EE_Html_messenger__get_template_fields', array( $this, 'html_messenger_template_fields' ), 5, 2 );
41
-		add_filter( 'FHEE__EE_Html_messenger__get_validator_config', array( $this, 'html_messenger_validator_config' ), 5, 2 );
42
-		add_filter( 'FHEE__EE_Pdf_messenger__get_template_fields', array( $this, 'pdf_messenger_template_fields' ), 5, 2 );
43
-		add_filter( 'FHEE__EE_Pdf_messenger__get_validator_config', array( $this, 'pdf_messenger_validator_config' ), 5, 2 );
44
-		add_filter('FHEE__EE_Messages_Template_Pack__get_specific_template__contents', array( $this, 'new_default_templates'), 5, 7 );
45
-		add_filter('FHEE__EE_Messages_Base__get_valid_shortcodes', array( $this, 'message_types_valid_shortcodes'), 5, 2 );
37
+		add_filter('FHEE__EED_Messages___set_messages_paths___MSG_PATHS', array($this, 'messages_autoload_paths'), 5);
38
+		add_filter('FHEE__EE_Email_messenger__get_validator_config', array($this, 'email_messenger_validator_config'), 5, 2);
39
+		add_filter('FHEE__EE_Email_messenger__get_template_fields', array($this, 'email_messenger_template_fields'), 5, 2);
40
+		add_filter('FHEE__EE_Html_messenger__get_template_fields', array($this, 'html_messenger_template_fields'), 5, 2);
41
+		add_filter('FHEE__EE_Html_messenger__get_validator_config', array($this, 'html_messenger_validator_config'), 5, 2);
42
+		add_filter('FHEE__EE_Pdf_messenger__get_template_fields', array($this, 'pdf_messenger_template_fields'), 5, 2);
43
+		add_filter('FHEE__EE_Pdf_messenger__get_validator_config', array($this, 'pdf_messenger_validator_config'), 5, 2);
44
+		add_filter('FHEE__EE_Messages_Template_Pack__get_specific_template__contents', array($this, 'new_default_templates'), 5, 7);
45
+		add_filter('FHEE__EE_Messages_Base__get_valid_shortcodes', array($this, 'message_types_valid_shortcodes'), 5, 2);
46 46
 
47 47
 		//shortcode parsers
48
-		add_filter('FHEE__EE_Attendee_Shortcodes__shortcodes', array( $this, 'additional_attendee_shortcodes'), 5, 2 );
49
-		add_filter('FHEE__EE_Attendee_Shortcodes__parser_after', array( $this, 'additional_attendee_parser'), 5, 5 );
50
-		add_filter('FHEE__EE_Recipient_List_Shortcodes__shortcodes', array( $this, 'additional_recipient_details_shortcodes'), 5, 2 );
51
-		add_filter('FHEE__EE_Recipient_List_Shortcodes__parser_after', array( $this, 'additional_recipient_details_parser'), 5, 5 );
52
-		add_filter('FHEE__EE_Primary_Registration_List_Shortcodes__shortcodes', array( $this, 'additional_primary_registration_details_shortcodes'), 5, 2 );
53
-		add_filter('FHEE__EE_Primary_Registration_List_Shortcodes__parser_after', array( $this, 'additional_primary_registration_details_parser'), 5, 5 );
48
+		add_filter('FHEE__EE_Attendee_Shortcodes__shortcodes', array($this, 'additional_attendee_shortcodes'), 5, 2);
49
+		add_filter('FHEE__EE_Attendee_Shortcodes__parser_after', array($this, 'additional_attendee_parser'), 5, 5);
50
+		add_filter('FHEE__EE_Recipient_List_Shortcodes__shortcodes', array($this, 'additional_recipient_details_shortcodes'), 5, 2);
51
+		add_filter('FHEE__EE_Recipient_List_Shortcodes__parser_after', array($this, 'additional_recipient_details_parser'), 5, 5);
52
+		add_filter('FHEE__EE_Primary_Registration_List_Shortcodes__shortcodes', array($this, 'additional_primary_registration_details_shortcodes'), 5, 2);
53
+		add_filter('FHEE__EE_Primary_Registration_List_Shortcodes__parser_after', array($this, 'additional_primary_registration_details_parser'), 5, 5);
54 54
 
55 55
 		/**
56 56
 		 * @since 4.2.0
57 57
 		 */
58
-		add_filter( 'FHEE__EE_Datetime_Shortcodes__shortcodes', array( $this, 'additional_datetime_shortcodes'), 10, 2 );
59
-		add_filter( 'FHEE__EE_Datetime_Shortcodes__parser_after', array( $this, 'additional_datetime_parser'), 10, 5 );
58
+		add_filter('FHEE__EE_Datetime_Shortcodes__shortcodes', array($this, 'additional_datetime_shortcodes'), 10, 2);
59
+		add_filter('FHEE__EE_Datetime_Shortcodes__parser_after', array($this, 'additional_datetime_parser'), 10, 5);
60 60
 
61 61
 		/**
62 62
 		 * @since 4.3.0
63 63
 		 */
64 64
 		//eat our own dog food!
65
-		add_action('EE_Brewing_Regular___messages_caf', array( $this, 'register_caf_message_types' ) );
66
-		add_action('EE_Brewing_Regular___messages_caf', array( $this, 'register_caf_shortcodes' ) );
65
+		add_action('EE_Brewing_Regular___messages_caf', array($this, 'register_caf_message_types'));
66
+		add_action('EE_Brewing_Regular___messages_caf', array($this, 'register_caf_shortcodes'));
67 67
 		do_action('EE_Brewing_Regular___messages_caf');
68 68
 	}
69 69
 
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 	 * @param  array  $dir_ref original array of paths
75 75
 	 * @return array           appended paths
76 76
 	 */
77
-	public function messages_autoload_paths( $dir_ref ) {
78
-		$dir_ref[] = EE_CAF_LIBRARIES . 'shortcodes/';
77
+	public function messages_autoload_paths($dir_ref) {
78
+		$dir_ref[] = EE_CAF_LIBRARIES.'shortcodes/';
79 79
 		return $dir_ref;
80 80
 	}
81 81
 
82 82
 
83 83
 
84
-	public function email_messenger_validator_config( $validator_config, EE_Email_messenger $messenger ) {
84
+	public function email_messenger_validator_config($validator_config, EE_Email_messenger $messenger) {
85 85
 		$validator_config['attendee_list'] = array(
86 86
 				'shortcodes' => array('attendee', 'event_list', 'ticket_list', 'question_list'),
87 87
 				'required' => array('[ATTENDEE_LIST]')
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
 
97 97
 
98
-	public function html_messenger_validator_config( $validator_config, EE_Html_messenger $messenger ) {
98
+	public function html_messenger_validator_config($validator_config, EE_Html_messenger $messenger) {
99 99
 		$validator_config['attendee_list'] = array(
100 100
 			'shortcodes' => array('attendee', 'question_list'),
101 101
 			'required' => array('[ATTENDEE_LIST]')
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
 
111 111
 
112
-	public function pdf_messenger_validator_config( $validator_config, EE_Pdf_messenger $messenger ) {
112
+	public function pdf_messenger_validator_config($validator_config, EE_Pdf_messenger $messenger) {
113 113
 		$validator_config['attendee_list'] = array(
114 114
 			'shortcodes' => array('attendee', 'event_list', 'ticket_list', 'question_list'),
115 115
 			'required' => array('[ATTENDEE_LIST]')
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
 
126 126
 
127
-	public function email_messenger_template_fields( $template_fields, EE_Email_messenger $messenger ) {
127
+	public function email_messenger_template_fields($template_fields, EE_Email_messenger $messenger) {
128 128
 		$template_fields['extra']['content']['question_list'] = array(
129 129
 						'input' => 'textarea',
130 130
 						'label' => '[QUESTION_LIST]',
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	}
141 141
 
142 142
 
143
-	public function html_messenger_template_fields( $template_fields, EE_Html_messenger $messenger ) {
143
+	public function html_messenger_template_fields($template_fields, EE_Html_messenger $messenger) {
144 144
 		$template_fields['extra']['content']['question_list'] = array(
145 145
 			'input' => 'textarea',
146 146
 			'label' => '[QUESTION_LIST]',
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
 
159 159
 
160
-	public function pdf_messenger_template_fields( $template_fields, EE_Pdf_messenger $messenger ) {
160
+	public function pdf_messenger_template_fields($template_fields, EE_Pdf_messenger $messenger) {
161 161
 		$template_fields['extra']['content']['question_list'] = array(
162 162
 			'input' => 'textarea',
163 163
 			'label' => '[QUESTION_LIST]',
@@ -174,39 +174,39 @@  discard block
 block discarded – undo
174 174
 
175 175
 
176 176
 
177
-	public function new_default_templates( $contents, $actual_path, EE_messenger $messenger, EE_message_type $message_type, $field, $context, EE_Messages_Template_Pack $template_pack  ) {
177
+	public function new_default_templates($contents, $actual_path, EE_messenger $messenger, EE_message_type $message_type, $field, $context, EE_Messages_Template_Pack $template_pack) {
178 178
 
179 179
 		//we're only modifying templates for the default template pack
180
-		if ( ! $template_pack instanceof EE_Messages_Template_Pack_Default ) {
180
+		if ( ! $template_pack instanceof EE_Messages_Template_Pack_Default) {
181 181
 			return $contents;
182 182
 		}
183 183
 
184 184
 		//the template file name we're replacing contents for.
185
-		$template_file_prefix = $field . '_' . $context;
186
-		$msg_prefix = $messenger->name . '_' . $message_type->name . '_' ;
185
+		$template_file_prefix = $field.'_'.$context;
186
+		$msg_prefix = $messenger->name.'_'.$message_type->name.'_';
187 187
 
188
-		$base_path = EE_CAF_LIBRARIES . 'messages/defaults/default/';
188
+		$base_path = EE_CAF_LIBRARIES.'messages/defaults/default/';
189 189
 
190
-		if ( $messenger->name == 'email' && $message_type->name == 'registration' ) {
190
+		if ($messenger->name == 'email' && $message_type->name == 'registration') {
191 191
 
192
-			switch ( $template_file_prefix ) {
192
+			switch ($template_file_prefix) {
193 193
 
194 194
 				case 'question_list_admin' :
195 195
 				case 'question_list_attendee' :
196 196
 				case 'question_list_primary_attendee' :
197
-					$path = $base_path . $msg_prefix . 'question_list.template.php';
198
-					$contents = EEH_Template::display_template( $path, array(), true );
197
+					$path = $base_path.$msg_prefix.'question_list.template.php';
198
+					$contents = EEH_Template::display_template($path, array(), true);
199 199
 					break;
200 200
 
201 201
 				case 'attendee_list_primary_attendee' :
202
-					$path = $base_path . $msg_prefix . 'attendee_list.template.php';
203
-					$contents = EEH_Template::display_template( $path, array(), true );
202
+					$path = $base_path.$msg_prefix.'attendee_list.template.php';
203
+					$contents = EEH_Template::display_template($path, array(), true);
204 204
 					break;
205 205
 
206 206
 				case 'attendee_list_admin' :
207
-					$path = $base_path . $msg_prefix . 'attendee_list_admin.template.php';
208
-					$contents = EEH_Template::display_template( $path,
209
-						array(), true );
207
+					$path = $base_path.$msg_prefix.'attendee_list_admin.template.php';
208
+					$contents = EEH_Template::display_template($path,
209
+						array(), true);
210 210
 					break;
211 211
 
212 212
 				case 'attendee_list_attendee' :
@@ -214,33 +214,33 @@  discard block
 block discarded – undo
214 214
 					break;
215 215
 
216 216
 				case 'event_list_attendee' :
217
-					$path = $base_path . $msg_prefix . 'event_list_attendee.template.php';
218
-					$contents = EEH_Template::display_template( $path, array(), true );
217
+					$path = $base_path.$msg_prefix.'event_list_attendee.template.php';
218
+					$contents = EEH_Template::display_template($path, array(), true);
219 219
 					break;
220 220
 			}
221
-		} elseif ( $messenger->name == 'email' && $message_type->name == 'newsletter' ) {
222
-			switch( $template_file_prefix ) {
221
+		} elseif ($messenger->name == 'email' && $message_type->name == 'newsletter') {
222
+			switch ($template_file_prefix) {
223 223
 
224 224
 				case 'content_attendee' :
225
-					$path = $base_path . $msg_prefix . 'content.template.php';
226
-					$contents = EEH_Template::display_template( $path, array(), true );
225
+					$path = $base_path.$msg_prefix.'content.template.php';
226
+					$contents = EEH_Template::display_template($path, array(), true);
227 227
 					break;
228 228
 
229 229
 				case 'newsletter_content_attendee' :
230
-					$path = $base_path . $msg_prefix . 'newsletter_content.template.php';
231
-					$contents = EEH_Template::display_template( $path, array(), true );
230
+					$path = $base_path.$msg_prefix.'newsletter_content.template.php';
231
+					$contents = EEH_Template::display_template($path, array(), true);
232 232
 					break;
233 233
 
234 234
 				case 'newsletter_subject_attendee' :
235
-					$path = $base_path . $msg_prefix . 'subject.template.php';
236
-					$contents = EEH_Template::display_template( $path, array(), true );
235
+					$path = $base_path.$msg_prefix.'subject.template.php';
236
+					$contents = EEH_Template::display_template($path, array(), true);
237 237
 					break;
238 238
 			}
239
-		} elseif ( $messenger->name == 'html' && $message_type->name == 'receipt' ) {
240
-			switch  ( $template_file_prefix ) {
239
+		} elseif ($messenger->name == 'html' && $message_type->name == 'receipt') {
240
+			switch ($template_file_prefix) {
241 241
 				case 'attendee_list_purchaser' :
242
-					$path = $base_path . $msg_prefix . 'attendee_list.template.php';
243
-					$contents = EEH_Template::display_template( $path, array(), true );
242
+					$path = $base_path.$msg_prefix.'attendee_list.template.php';
243
+					$contents = EEH_Template::display_template($path, array(), true);
244 244
 					break;
245 245
 			}
246 246
 		}
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 
252 252
 
253 253
 
254
-	public function message_types_valid_shortcodes( $valid_shortcodes, EE_Messages_Base $msg ) {
254
+	public function message_types_valid_shortcodes($valid_shortcodes, EE_Messages_Base $msg) {
255 255
 		//make sure question_list and question are ONLY added for the core message types.  Any other message types will have to explicitly set question_list as a valid shortcode.
256 256
 		$include_with = array(
257 257
 			'registration',
@@ -268,9 +268,9 @@  discard block
 block discarded – undo
268 268
 			'invoice',
269 269
 			'receipt'
270 270
 			);
271
-		if ( $msg instanceof EE_message_type && in_array( $msg->name, $include_with )) {
271
+		if ($msg instanceof EE_message_type && in_array($msg->name, $include_with)) {
272 272
 			$contexts = array_keys($msg->get_contexts());
273
-				foreach ( $contexts as $context ) {
273
+				foreach ($contexts as $context) {
274 274
 					$valid_shortcodes[$context][] = 'question_list';
275 275
 					$valid_shortcodes[$context][] = 'question';
276 276
 				}
@@ -282,35 +282,35 @@  discard block
 block discarded – undo
282 282
 
283 283
 
284 284
 
285
-	public function additional_attendee_shortcodes( $shortcodes, $shortcode_parser ) {
285
+	public function additional_attendee_shortcodes($shortcodes, $shortcode_parser) {
286 286
 		$shortcodes['[ANSWER_*]'] = __('This is a special dynamic shortcode. Right after the "*", add the exact text of a existing question, and if there is an answer for that question for this registrant, that will take the place of this shortcode.', 'event_espresso');
287 287
 		return $shortcodes;
288 288
 	}
289 289
 
290 290
 
291 291
 
292
-	public function additional_attendee_parser( $parsed, $shortcode, $data, $extra_data, $shortcode_parser ) {
292
+	public function additional_attendee_parser($parsed, $shortcode, $data, $extra_data, $shortcode_parser) {
293 293
 
294
-		if ( strpos( $shortcode, '[ANSWER_*' ) === FALSE || !isset( $extra_data['data']->questions) || !isset( $extra_data['data']->registrations) )
294
+		if (strpos($shortcode, '[ANSWER_*') === FALSE || ! isset($extra_data['data']->questions) || ! isset($extra_data['data']->registrations))
295 295
 			return $parsed;
296 296
 
297 297
 		//let's get the question from the code.
298 298
 		$shortcode = str_replace('[ANSWER_*', '', $shortcode);
299
-		$shortcode = trim( str_replace(']', '', $shortcode) );
299
+		$shortcode = trim(str_replace(']', '', $shortcode));
300 300
 
301 301
 		$registration = $data instanceof EE_Registration ? $data : null;
302
-		$registration = ! $registration instanceof EE_Registration && is_array( $extra_data ) && isset( $extra_data['data'] ) && $extra_data['data'] instanceof EE_Registration ? $extra_data['data'] : $registration;
302
+		$registration = ! $registration instanceof EE_Registration && is_array($extra_data) && isset($extra_data['data']) && $extra_data['data'] instanceof EE_Registration ? $extra_data['data'] : $registration;
303 303
 
304 304
 		$aee = $data instanceof EE_Messages_Addressee ? $data : null;
305
-		$aee = ! $aee instanceof EE_Messages_Addressee && is_array( $extra_data ) && isset( $extra_data['data'] ) ? $extra_data['data'] : $aee;
305
+		$aee = ! $aee instanceof EE_Messages_Addressee && is_array($extra_data) && isset($extra_data['data']) ? $extra_data['data'] : $aee;
306 306
 
307
-		if ( ! $registration instanceof EE_Registration || ! $aee instanceof EE_Messages_Addressee ) {
307
+		if ( ! $registration instanceof EE_Registration || ! $aee instanceof EE_Messages_Addressee) {
308 308
 			return $parsed;
309 309
 		}
310 310
 
311 311
 		//now let's figure out which question has this text.
312
-		foreach ( $aee->questions as $ansid => $question ) {
313
-			if ( $question instanceof EE_Question && $question->display_text() == $shortcode && isset($aee->registrations[$registration->ID()]['ans_objs'][$ansid]) ) {
312
+		foreach ($aee->questions as $ansid => $question) {
313
+			if ($question instanceof EE_Question && $question->display_text() == $shortcode && isset($aee->registrations[$registration->ID()]['ans_objs'][$ansid])) {
314 314
 				return $aee->registrations[$registration->ID()]['ans_objs'][$ansid]->get_pretty('ANS_value', 'no_wpautop');
315 315
 			}
316 316
 		}
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 	 * @return array                   						array of shortcodes and
333 333
 	 *                                             			descriptions
334 334
 	 */
335
-	public function additional_datetime_shortcodes( $shortcodes, $shortcode_parser ) {
335
+	public function additional_datetime_shortcodes($shortcodes, $shortcode_parser) {
336 336
 		$shortcodes['[DTT_NAME]'] = __('This will be parsed to the Title given for a Datetime', 'event_espresso');
337 337
 		$shortcodes['[DTT_DESCRIPTION]'] = __('This will be parsed to the description for a Datetime', 'event_espresso');
338 338
 		$shortcodes['[DTT_NAME_OR_DATES]'] = __('When parsed, if the Datetime has a name, it is used, otherwise a formatted string including the start date and end date will be used.', 'event_espresso');
@@ -354,13 +354,13 @@  discard block
 block discarded – undo
354 354
 	 * @param  EE_Datetime_Shortcodes $shortcode_parser
355 355
 	 * @return string                   The new parsed string.
356 356
 	 */
357
-	public function additional_datetime_parser( $parsed, $shortcode, $data, $extra_data, $shortcode_parser ) {
357
+	public function additional_datetime_parser($parsed, $shortcode, $data, $extra_data, $shortcode_parser) {
358 358
 
359
-		if ( ! $data instanceof EE_Datetime ) {
359
+		if ( ! $data instanceof EE_Datetime) {
360 360
 			return ''; //get out because we can only parse with the datetime object.
361 361
 		}
362 362
 
363
-		switch ( $shortcode ) {
363
+		switch ($shortcode) {
364 364
 			case '[DTT_NAME]' :
365 365
 				return $data->name();
366 366
 				break;
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 				return $data->description();
369 369
 				break;
370 370
 			case '[DTT_NAME_OR_DATES]' :
371
-				return $data->get_dtt_display_name( TRUE );
371
+				return $data->get_dtt_display_name(TRUE);
372 372
 				break;
373 373
 			default :
374 374
 				return $parsed;
@@ -380,40 +380,40 @@  discard block
 block discarded – undo
380 380
 
381 381
 
382 382
 
383
-	public function additional_recipient_details_shortcodes( $shortcodes, $shortcode_parser ) {
383
+	public function additional_recipient_details_shortcodes($shortcodes, $shortcode_parser) {
384 384
 		$shortcodes['[RECIPIENT_QUESTION_LIST]'] = __('This is used to indicate where you want the list of questions and answers to show for the person receiving the message.', 'event_espresso');
385 385
 		return $shortcodes;
386 386
 	}
387 387
 
388 388
 
389
-	public function additional_recipient_details_parser( $parsed, $shortcode, $data, $extra_data, $shortcode_parser ) {
389
+	public function additional_recipient_details_parser($parsed, $shortcode, $data, $extra_data, $shortcode_parser) {
390 390
 
391
-		if ( array($data) && ! isset( $data['data'] ) )
391
+		if (array($data) && ! isset($data['data']))
392 392
 			return $parsed;
393 393
 
394 394
 		$recipient = $data['data'] instanceof EE_Messages_Addressee ? $data['data'] : NULL;
395
-		$recipient = ! $recipient instanceof EE_Messages_Addressee && array($extra_data) && isset( $extra_data['data'] ) && $extra_data['data'] instanceof EE_Messages_Addressee ? $extra_data['data'] : $recipient;
395
+		$recipient = ! $recipient instanceof EE_Messages_Addressee && array($extra_data) && isset($extra_data['data']) && $extra_data['data'] instanceof EE_Messages_Addressee ? $extra_data['data'] : $recipient;
396 396
 
397
-		if ( ! $recipient instanceof EE_Messages_Addressee )
397
+		if ( ! $recipient instanceof EE_Messages_Addressee)
398 398
 			return $parsed;
399 399
 
400
-		switch ( $shortcode ) {
400
+		switch ($shortcode) {
401 401
 			case '[RECIPIENT_QUESTION_LIST]' :
402 402
 				$att = $recipient->att_obj;
403 403
 				$registrations_on_attendee = $att instanceof EE_Attendee ? $recipient->attendees[$att->ID()]['reg_objs'] : array();
404
-				$registrations_on_attendee = empty( $registrations_on_attendee ) && $recipient->reg_obj instanceof EE_Registration ? array( $recipient->reg_obj ) : $registrations_on_attendee;
404
+				$registrations_on_attendee = empty($registrations_on_attendee) && $recipient->reg_obj instanceof EE_Registration ? array($recipient->reg_obj) : $registrations_on_attendee;
405 405
 				$answers = array();
406 406
 
407
-				$template = is_array($data['template'] ) && isset($data['template']['question_list']) ? $data['template']['question_list'] : $extra_data['template']['question_list'];
407
+				$template = is_array($data['template']) && isset($data['template']['question_list']) ? $data['template']['question_list'] : $extra_data['template']['question_list'];
408 408
 				$valid_shortcodes = array('question');
409 409
 
410 410
 				//if the context is main_content then get all answers for all registrations on this attendee
411
-				if ( $data['data'] instanceof EE_Messages_Addressee ) {
412
-					foreach ( $registrations_on_attendee as $reg ) {
413
-						if ( $reg instanceof EE_Registration ) {
414
-							$anss = !empty($recipient->registrations[$reg->ID()]['ans_objs']) ? $recipient->registrations[$reg->ID()]['ans_objs'] : array();
415
-							foreach( $anss as $ans ) {
416
-								if ( $ans instanceof EE_Answer ) {
411
+				if ($data['data'] instanceof EE_Messages_Addressee) {
412
+					foreach ($registrations_on_attendee as $reg) {
413
+						if ($reg instanceof EE_Registration) {
414
+							$anss = ! empty($recipient->registrations[$reg->ID()]['ans_objs']) ? $recipient->registrations[$reg->ID()]['ans_objs'] : array();
415
+							foreach ($anss as $ans) {
416
+								if ($ans instanceof EE_Answer) {
417 417
 									$answers[$ans->ID()] = $ans;
418 418
 								}
419 419
 							}
@@ -422,13 +422,13 @@  discard block
 block discarded – undo
422 422
 				}
423 423
 
424 424
 				//if the context is the event list parser, then let's return just the answers for all registrations attached to the recipient for that event.
425
-				if ( $data['data'] instanceof EE_Event ) {
425
+				if ($data['data'] instanceof EE_Event) {
426 426
 					$event = $data['data'];
427
-					foreach( $registrations_on_attendee as $reg ) {
428
-						if ( $reg instanceof EE_Registration && $reg->event_ID() == $event->ID() ) {
429
-							$anss = !empty($recipient->registrations[$reg->ID()]['ans_objs']) ? $recipient->registrations[$reg->ID()]['ans_objs'] : array();
430
-							foreach( $anss as $ans ) {
431
-								if ( $ans instanceof EE_Answer ) {
427
+					foreach ($registrations_on_attendee as $reg) {
428
+						if ($reg instanceof EE_Registration && $reg->event_ID() == $event->ID()) {
429
+							$anss = ! empty($recipient->registrations[$reg->ID()]['ans_objs']) ? $recipient->registrations[$reg->ID()]['ans_objs'] : array();
430
+							foreach ($anss as $ans) {
431
+								if ($ans instanceof EE_Answer) {
432 432
 									$answers[$ans->ID()] = $ans;
433 433
 								}
434 434
 							}
@@ -438,13 +438,13 @@  discard block
 block discarded – undo
438 438
 
439 439
 				$question_list = '';
440 440
 				$shortcode_helper = $shortcode_parser->get_shortcode_helper();
441
-				foreach ( $answers as $answer ) {
442
-					if ( $answer instanceof EE_Answer ) {
441
+				foreach ($answers as $answer) {
442
+					if ($answer instanceof EE_Answer) {
443 443
 						$question = $answer->question();
444
-						if ( ! $question instanceof EE_Question || ( $question instanceof EE_Question && $question->admin_only() ) ) {
444
+						if ( ! $question instanceof EE_Question || ($question instanceof EE_Question && $question->admin_only())) {
445 445
 							continue;
446 446
 						}
447
-						$question_list .= $shortcode_helper->parse_question_list_template( $template, $answer, $valid_shortcodes, $extra_data);
447
+						$question_list .= $shortcode_helper->parse_question_list_template($template, $answer, $valid_shortcodes, $extra_data);
448 448
 					}
449 449
 				}
450 450
 				return $question_list;
@@ -457,41 +457,41 @@  discard block
 block discarded – undo
457 457
 	}
458 458
 
459 459
 
460
-	public function additional_primary_registration_details_shortcodes( $shortcodes, $shortcode_parser ) {
460
+	public function additional_primary_registration_details_shortcodes($shortcodes, $shortcode_parser) {
461 461
 		$shortcodes['[PRIMARY_REGISTRANT_QUESTION_LIST]'] = __('This is used to indicate the questions and answers for the primary_registrant. It should be placed in the "[attendee_list]" field', 'event_espresso');
462 462
 		return $shortcodes;
463 463
 	}
464 464
 
465 465
 
466
-	public function additional_primary_registration_details_parser( $parsed, $shortcode, $data, $extra_data, $shortcode_parser ) {
467
-		if ( array($data) && ! isset( $data['data'] ) )
466
+	public function additional_primary_registration_details_parser($parsed, $shortcode, $data, $extra_data, $shortcode_parser) {
467
+		if (array($data) && ! isset($data['data']))
468 468
 			return $parsed;
469 469
 
470 470
 		$recipient = $data['data'] instanceof EE_Messages_Addressee ? $data['data'] : NULL;
471
-		$recipient = ! $recipient instanceof EE_Messages_Addressee && array($extra_data) && isset( $extra_data['data'] ) && $extra_data['data'] instanceof EE_Messages_Addressee ? $extra_data['data'] : $recipient;
471
+		$recipient = ! $recipient instanceof EE_Messages_Addressee && array($extra_data) && isset($extra_data['data']) && $extra_data['data'] instanceof EE_Messages_Addressee ? $extra_data['data'] : $recipient;
472 472
 
473
-		if ( ! $recipient instanceof EE_Messages_Addressee )
473
+		if ( ! $recipient instanceof EE_Messages_Addressee)
474 474
 			return $parsed;
475 475
 
476 476
 		$send_data = ! $data['data'] instanceof EE_Messages_Addressee ? $extra_data : $data;
477 477
 
478
-		switch ( $shortcode ) {
478
+		switch ($shortcode) {
479 479
 			case '[RECIPIENT_QUESTION_LIST]' :
480
-				if ( ! $recipient->primary_att_obj instanceof EE_Attendee || ! $recipient->primary_reg_obj instanceof EE_Registration )
480
+				if ( ! $recipient->primary_att_obj instanceof EE_Attendee || ! $recipient->primary_reg_obj instanceof EE_Registration)
481 481
 					return '';
482 482
 				$registration = $recipient->primary_reg_obj;
483
-				$template = is_array($data['template'] ) && isset($data['template']['question_list']) ? $data['template']['question_list'] : $extra_data['template']['question_list'];
483
+				$template = is_array($data['template']) && isset($data['template']['question_list']) ? $data['template']['question_list'] : $extra_data['template']['question_list'];
484 484
 				$valid_shortcodes = array('question');
485 485
 				$shortcode_helper = $shortcode_parser->get_shortcode_helper();
486 486
 				$answers = $recipient->registrations[$registration->ID()]['ans_objs'];
487 487
 				$question_list = '';
488
-				foreach ( $answers as $answer ) {
489
-					if ( $answer instanceof EE_Answer ) {
488
+				foreach ($answers as $answer) {
489
+					if ($answer instanceof EE_Answer) {
490 490
 						$question = $answer->question();
491
-						if ( $question instanceof EE_Question and $question->admin_only() ) {
491
+						if ($question instanceof EE_Question and $question->admin_only()) {
492 492
 							continue;
493 493
 						}
494
-						$question_list .= $shortcode_helper->parse_question_list_template( $template, $answer, $valid_shortcodes, $send_data);
494
+						$question_list .= $shortcode_helper->parse_question_list_template($template, $answer, $valid_shortcodes, $send_data);
495 495
 					}
496 496
 				}
497 497
 				return $question_list;
@@ -517,67 +517,67 @@  discard block
 block discarded – undo
517 517
 		$setup_args = array(
518 518
 			'mtfilename' => 'EE_Newsletter_message_type.class.php',
519 519
 			'autoloadpaths' => array(
520
-				EE_CAF_LIBRARIES . 'messages/message_type/newsletter/'
520
+				EE_CAF_LIBRARIES.'messages/message_type/newsletter/'
521 521
 				),
522
-			'messengers_to_activate_with' => array( 'email' ),
523
-			'messengers_to_validate_with' => array( 'email' )
522
+			'messengers_to_activate_with' => array('email'),
523
+			'messengers_to_validate_with' => array('email')
524 524
 			);
525
-		EE_Register_Message_Type::register( 'newsletter', $setup_args );
525
+		EE_Register_Message_Type::register('newsletter', $setup_args);
526 526
 
527 527
 		//register payment reminder message type
528 528
 		$setup_args = array(
529 529
 			'mtfilename' => 'EE_Payment_Reminder_message_type.class.php',
530
-			'autoloadpaths' => array( EE_CAF_LIBRARIES . 'messages/message_type/payment_reminder/' ),
531
-			'messengers_to_activate_with' => array( 'email' ),
532
-			'messengers_to_validate_with' => array( 'email' )
530
+			'autoloadpaths' => array(EE_CAF_LIBRARIES.'messages/message_type/payment_reminder/'),
531
+			'messengers_to_activate_with' => array('email'),
532
+			'messengers_to_validate_with' => array('email')
533 533
 			);
534
-		EE_Register_Message_Type::register( 'payment_reminder', $setup_args );
534
+		EE_Register_Message_Type::register('payment_reminder', $setup_args);
535 535
 
536 536
 		//register payment declined message type
537 537
 		$setup_args = array(
538 538
 			'mtfilename' => 'EE_Payment_Declined_message_type.class.php',
539
-			'autoloadpaths' => array( EE_CAF_LIBRARIES . 'messages/message_type/payment_declined/' ),
540
-			'messengers_to_activate_with' => array( 'email' ),
541
-			'messengers_to_validate_with' => array( 'email' )
539
+			'autoloadpaths' => array(EE_CAF_LIBRARIES.'messages/message_type/payment_declined/'),
540
+			'messengers_to_activate_with' => array('email'),
541
+			'messengers_to_validate_with' => array('email')
542 542
 			);
543
-		EE_Register_Message_Type::register( 'payment_declined', $setup_args );
543
+		EE_Register_Message_Type::register('payment_declined', $setup_args);
544 544
 
545 545
 		//register registration declined message type
546 546
 		$setup_args = array(
547 547
 			'mtfilename' => 'EE_Declined_Registration_message_type.class.php',
548
-			'autoloadpaths' => array( EE_CAF_LIBRARIES . 'messages/message_type/declined_registration/' ),
549
-			'messengers_to_activate_with' => array( 'email' ),
550
-			'messengers_to_validate_with' => array( 'email' )
548
+			'autoloadpaths' => array(EE_CAF_LIBRARIES.'messages/message_type/declined_registration/'),
549
+			'messengers_to_activate_with' => array('email'),
550
+			'messengers_to_validate_with' => array('email')
551 551
 			);
552
-		EE_Register_Message_Type::register( 'declined_registration', $setup_args );
552
+		EE_Register_Message_Type::register('declined_registration', $setup_args);
553 553
 
554 554
 		//register registration cancelled message type
555 555
 		$setup_args = array(
556 556
 			'mtfilename' => 'EE_Cancelled_Registration_message_type.class.php',
557
-			'autoloadpaths' => array( EE_CAF_LIBRARIES . 'messages/message_type/cancelled_registration/' ),
558
-			'messengers_to_activate_with' => array( 'email' ),
559
-			'messengers_to_validate_with' => array( 'email' )
557
+			'autoloadpaths' => array(EE_CAF_LIBRARIES.'messages/message_type/cancelled_registration/'),
558
+			'messengers_to_activate_with' => array('email'),
559
+			'messengers_to_validate_with' => array('email')
560 560
 			);
561
-		EE_Register_Message_Type::register( 'cancelled_registration', $setup_args );
561
+		EE_Register_Message_Type::register('cancelled_registration', $setup_args);
562 562
 
563 563
 
564 564
 		//register payment failed message type
565 565
 		$setup_args = array(
566 566
 			'mtfilename' => 'EE_Payment_Failed_message_type.class.php',
567
-			'autoloadpaths' => array( EE_CAF_LIBRARIES . 'messages/message_type/payment_failed/' ),
568
-			'messengers_to_activate_with' => array( 'email' ),
569
-			'messengers_to_validate_with' => array( 'email' )
567
+			'autoloadpaths' => array(EE_CAF_LIBRARIES.'messages/message_type/payment_failed/'),
568
+			'messengers_to_activate_with' => array('email'),
569
+			'messengers_to_validate_with' => array('email')
570 570
 			);
571
-		EE_Register_Message_Type::register( 'payment_failed', $setup_args );
571
+		EE_Register_Message_Type::register('payment_failed', $setup_args);
572 572
 
573 573
 		//register payment declined message type
574 574
 		$setup_args = array(
575 575
 			'mtfilename' => 'EE_Payment_Cancelled_message_type.class.php',
576
-			'autoloadpaths' => array( EE_CAF_LIBRARIES . 'messages/message_type/payment_cancelled/' ),
577
-			'messengers_to_activate_with' => array( 'email' ),
578
-			'messengers_to_validate_with' => array( 'email' )
576
+			'autoloadpaths' => array(EE_CAF_LIBRARIES.'messages/message_type/payment_cancelled/'),
577
+			'messengers_to_activate_with' => array('email'),
578
+			'messengers_to_validate_with' => array('email')
579 579
 			);
580
-		EE_Register_Message_Type::register( 'payment_cancelled', $setup_args );
580
+		EE_Register_Message_Type::register('payment_cancelled', $setup_args);
581 581
 	}
582 582
 
583 583
 
@@ -593,12 +593,12 @@  discard block
 block discarded – undo
593 593
 	public function register_caf_shortcodes() {
594 594
 		$setup_args = array(
595 595
 			'autoloadpaths' => array(
596
-				EE_CAF_LIBRARIES . 'shortcodes/'
596
+				EE_CAF_LIBRARIES.'shortcodes/'
597 597
 				),
598
-			'msgr_validator_callback' => array( 'EE_Newsletter_Shortcodes', 'messenger_validator_config' ),
599
-			'msgr_template_fields_callback' => array( 'EE_Newsletter_Shortcodes', 'messenger_template_fields' ),
600
-			'list_type_shortcodes' => array( '[NEWSLETTER_CONTENT]' )
598
+			'msgr_validator_callback' => array('EE_Newsletter_Shortcodes', 'messenger_validator_config'),
599
+			'msgr_template_fields_callback' => array('EE_Newsletter_Shortcodes', 'messenger_template_fields'),
600
+			'list_type_shortcodes' => array('[NEWSLETTER_CONTENT]')
601 601
 			);
602
-		EE_Register_Messages_Shortcode_Library::register( 'newsletter', $setup_args );
602
+		EE_Register_Messages_Shortcode_Library::register('newsletter', $setup_args);
603 603
 	}
604 604
 }
Please login to merge, or discard this patch.
Braces   +21 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@  discard block
 block discarded – undo
5 5
  * @subpackage plugin api, messages
6 6
  * @since           4.3.2
7 7
  */
8
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10
+}
9 11
 
10 12
 /**
11 13
  * Used to initialize all EE messages caffeinated functionality.
@@ -291,8 +293,9 @@  discard block
 block discarded – undo
291 293
 
292 294
 	public function additional_attendee_parser( $parsed, $shortcode, $data, $extra_data, $shortcode_parser ) {
293 295
 
294
-		if ( strpos( $shortcode, '[ANSWER_*' ) === FALSE || !isset( $extra_data['data']->questions) || !isset( $extra_data['data']->registrations) )
295
-			return $parsed;
296
+		if ( strpos( $shortcode, '[ANSWER_*' ) === FALSE || !isset( $extra_data['data']->questions) || !isset( $extra_data['data']->registrations) ) {
297
+					return $parsed;
298
+		}
296 299
 
297 300
 		//let's get the question from the code.
298 301
 		$shortcode = str_replace('[ANSWER_*', '', $shortcode);
@@ -388,14 +391,16 @@  discard block
 block discarded – undo
388 391
 
389 392
 	public function additional_recipient_details_parser( $parsed, $shortcode, $data, $extra_data, $shortcode_parser ) {
390 393
 
391
-		if ( array($data) && ! isset( $data['data'] ) )
392
-			return $parsed;
394
+		if ( array($data) && ! isset( $data['data'] ) ) {
395
+					return $parsed;
396
+		}
393 397
 
394 398
 		$recipient = $data['data'] instanceof EE_Messages_Addressee ? $data['data'] : NULL;
395 399
 		$recipient = ! $recipient instanceof EE_Messages_Addressee && array($extra_data) && isset( $extra_data['data'] ) && $extra_data['data'] instanceof EE_Messages_Addressee ? $extra_data['data'] : $recipient;
396 400
 
397
-		if ( ! $recipient instanceof EE_Messages_Addressee )
398
-			return $parsed;
401
+		if ( ! $recipient instanceof EE_Messages_Addressee ) {
402
+					return $parsed;
403
+		}
399 404
 
400 405
 		switch ( $shortcode ) {
401 406
 			case '[RECIPIENT_QUESTION_LIST]' :
@@ -464,21 +469,24 @@  discard block
 block discarded – undo
464 469
 
465 470
 
466 471
 	public function additional_primary_registration_details_parser( $parsed, $shortcode, $data, $extra_data, $shortcode_parser ) {
467
-		if ( array($data) && ! isset( $data['data'] ) )
468
-			return $parsed;
472
+		if ( array($data) && ! isset( $data['data'] ) ) {
473
+					return $parsed;
474
+		}
469 475
 
470 476
 		$recipient = $data['data'] instanceof EE_Messages_Addressee ? $data['data'] : NULL;
471 477
 		$recipient = ! $recipient instanceof EE_Messages_Addressee && array($extra_data) && isset( $extra_data['data'] ) && $extra_data['data'] instanceof EE_Messages_Addressee ? $extra_data['data'] : $recipient;
472 478
 
473
-		if ( ! $recipient instanceof EE_Messages_Addressee )
474
-			return $parsed;
479
+		if ( ! $recipient instanceof EE_Messages_Addressee ) {
480
+					return $parsed;
481
+		}
475 482
 
476 483
 		$send_data = ! $data['data'] instanceof EE_Messages_Addressee ? $extra_data : $data;
477 484
 
478 485
 		switch ( $shortcode ) {
479 486
 			case '[RECIPIENT_QUESTION_LIST]' :
480
-				if ( ! $recipient->primary_att_obj instanceof EE_Attendee || ! $recipient->primary_reg_obj instanceof EE_Registration )
481
-					return '';
487
+				if ( ! $recipient->primary_att_obj instanceof EE_Attendee || ! $recipient->primary_reg_obj instanceof EE_Registration ) {
488
+									return '';
489
+				}
482 490
 				$registration = $recipient->primary_reg_obj;
483 491
 				$template = is_array($data['template'] ) && isset($data['template']['question_list']) ? $data['template']['question_list'] : $extra_data['template']['question_list'];
484 492
 				$valid_shortcodes = array('question');
Please login to merge, or discard this patch.
caffeinated/admin/extend/about/Extend_About_Admin_Page.core.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
 
33 33
 
34 34
 
35
-	public function __construct( $routing = TRUE ) {
36
-		parent::__construct( $routing );
37
-		define( 'EE_ABOUT_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'about/templates/' );
35
+	public function __construct($routing = TRUE) {
36
+		parent::__construct($routing);
37
+		define('EE_ABOUT_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'about/templates/');
38 38
 	}
39 39
 
40 40
 
41 41
 
42 42
 	protected function _extend_page_config() {
43
-		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'about';
43
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'about';
44 44
 	}
45 45
 
46 46
 	protected function _set_page_routes() {
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
 	protected function _whats_new() {
90 90
 		$steps = EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance ? $this->_get_started_steps() : FALSE;
91 91
 		$steps = $steps !== FALSE ? $steps : '';
92
-		$this->_admin_page_title = sprintf( __('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION );
92
+		$this->_admin_page_title = sprintf(__('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION);
93 93
 		$settings_message = $steps;
94
-		$this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso'). $settings_message ;
95
-		$template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php' : EE_ABOUT_TEMPLATE_PATH . 'whats_new.template.php';
96
-		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE );
94
+		$this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso').$settings_message;
95
+		$template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH.'whats_new.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH.'whats_new.template.php' : EE_ABOUT_TEMPLATE_PATH.'whats_new.template.php';
96
+		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE);
97 97
 		$this->display_about_admin_page();
98 98
 	}
99 99
 
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
 	protected function _overview() {
102 102
 		$this->_admin_page_title = __('About Event Espresso', 'event_espresso');
103 103
 		$this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso');
104
-		$template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php' : EE_ABOUT_TEMPLATE_PATH . 'ee4-overview.template.php';
105
-		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE );
104
+		$template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH.'ee4-overview.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH.'ee4-overview.template.php' : EE_ABOUT_TEMPLATE_PATH.'ee4-overview.template.php';
105
+		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE);
106 106
 		$this->display_about_admin_page();
107 107
 	}
108 108
 
109 109
 	protected function _credits() {
110 110
 	//	$this->_template_args['admin_page_title'] = sprintf( __('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION );
111 111
 		$this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso');
112
-		$template = EE_ABOUT_TEMPLATE_PATH . 'credits.template.php';
113
-		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE );
112
+		$template = EE_ABOUT_TEMPLATE_PATH.'credits.template.php';
113
+		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE);
114 114
 		$this->display_about_admin_page();
115 115
 	}
116 116
 }
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.
caffeinated/admin/extend/events/Extend_Events_Admin_List_Table.class.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@
 block discarded – undo
17 17
  */
18 18
 class Extend_Events_Admin_List_Table extends Events_Admin_List_Table {
19 19
 
20
-	protected function _column_name_action_setup( EE_Event $item ) {
20
+	protected function _column_name_action_setup(EE_Event $item) {
21 21
 		$export_query_args = array(
22 22
 				'action' => 'export_events',
23 23
 				'EVT_ID' => $item->ID()
24 24
 			);
25
-		$export_event_link = EE_Admin_Page::add_query_args_and_nonce( $export_query_args, EVENTS_ADMIN_URL );
25
+		$export_event_link = EE_Admin_Page::add_query_args_and_nonce($export_query_args, EVENTS_ADMIN_URL);
26 26
 
27
-		$actions = parent::_column_name_action_setup( $item );
27
+		$actions = parent::_column_name_action_setup($item);
28 28
 //		$actions['export'] = '<a href="' . $export_event_link . '" title="' . __('Export Event', 'event_espresso') . '">' . __('Export', 'event_espresso') . '</a>';
29 29
 		return $actions;
30 30
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
  * @subpackage admin
6 6
  * @since           4.4.9
7 7
  */
8
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10
+}
9 11
 
10 12
 /**
11 13
  * This is the caffeinated class for the event list table.  It is only loaded in caffeinated versions of Event
Please login to merge, or discard this patch.
caffeinated/admin/extend/events/Tickets_List_Table.class.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 				'TKT_taxable' => __('Taxable', 'event_espresso')
60 60
 			);
61 61
 
62
-        $this->_sortable_columns = array(
62
+		$this->_sortable_columns = array(
63 63
 				// TRUE means its already sorted
64 64
 				'TKT_name' => array( 'TKT_name' => TRUE ),
65 65
 				'TKT_description' => array( 'TKT_description' => FALSE ),
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 				'TKT_min' => array( 'TKT_min' => FALSE ),
69 69
 				'TKT_max' => array( 'TKT_max' => FALSE ),
70 70
 				'TKT_price' => array( 'TKT_price' => FALSE )
71
-	        	);
71
+				);
72 72
 
73
-        $this->_hidden_columns = array(
73
+		$this->_hidden_columns = array(
74 74
 			);
75 75
 
76 76
 	}
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
 
32 32
 	protected function _setup_data() {
33 33
 		$trashed = $this->_admin_page->get_view() == 'trashed' ? TRUE : FALSE;
34
-		$this->_data = $this->_admin_page->get_default_tickets( $this->_per_page, FALSE, $trashed );
35
-		$this->_all_data_count = $this->_admin_page->get_default_tickets( $this->_per_page, TRUE, FALSE );
36
-		$this->_trashed_count = $this->_admin_page->get_default_tickets( $this->_per_page, TRUE, TRUE );
34
+		$this->_data = $this->_admin_page->get_default_tickets($this->_per_page, FALSE, $trashed);
35
+		$this->_all_data_count = $this->_admin_page->get_default_tickets($this->_per_page, TRUE, FALSE);
36
+		$this->_trashed_count = $this->_admin_page->get_default_tickets($this->_per_page, TRUE, TRUE);
37 37
 	}
38 38
 
39 39
 
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 
62 62
         $this->_sortable_columns = array(
63 63
 				// TRUE means its already sorted
64
-				'TKT_name' => array( 'TKT_name' => TRUE ),
65
-				'TKT_description' => array( 'TKT_description' => FALSE ),
66
-				'TKT_qty' => array( 'TKT_qty' => FALSE ),
67
-				'TKT_uses' => array( 'TKT_uses' => FALSE ),
68
-				'TKT_min' => array( 'TKT_min' => FALSE ),
69
-				'TKT_max' => array( 'TKT_max' => FALSE ),
70
-				'TKT_price' => array( 'TKT_price' => FALSE )
64
+				'TKT_name' => array('TKT_name' => TRUE),
65
+				'TKT_description' => array('TKT_description' => FALSE),
66
+				'TKT_qty' => array('TKT_qty' => FALSE),
67
+				'TKT_uses' => array('TKT_uses' => FALSE),
68
+				'TKT_min' => array('TKT_min' => FALSE),
69
+				'TKT_max' => array('TKT_max' => FALSE),
70
+				'TKT_price' => array('TKT_price' => FALSE)
71 71
 	        	);
72 72
 
73 73
         $this->_hidden_columns = array(
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
 
95 95
 	function column_cb($item) {
96
-		return $item->ID() === 1 ? '<span class="ee-lock-icon"></span>' : sprintf( '<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID() );
96
+		return $item->ID() === 1 ? '<span class="ee-lock-icon"></span>' : sprintf('<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID());
97 97
 
98 98
 	}
99 99
 
@@ -104,21 +104,21 @@  discard block
 block discarded – undo
104 104
 		$actions = array();
105 105
 
106 106
 		//trash links
107
-		if ( $item->ID() !== 1 ) {
108
-			if ( $this->_view == 'all' ) {
109
-				$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'trash_ticket', 'TKT_ID' => $item->ID() ), EVENTS_ADMIN_URL );
110
-				$actions['trash'] = '<a href="' . $trash_lnk_url . '" title="' . esc_attr__('Move Ticket to trash', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>';
107
+		if ($item->ID() !== 1) {
108
+			if ($this->_view == 'all') {
109
+				$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'trash_ticket', 'TKT_ID' => $item->ID()), EVENTS_ADMIN_URL);
110
+				$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Move Ticket to trash', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>';
111 111
 			} else {
112 112
 				// restore price link
113
-				$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_ticket', 'TKT_ID'=>$item->ID() ), EVENTS_ADMIN_URL );
114
-				$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Ticket', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>';
113
+				$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_ticket', 'TKT_ID'=>$item->ID()), EVENTS_ADMIN_URL);
114
+				$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Ticket', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>';
115 115
 				// delete price link
116
-				$delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'delete_ticket', 'TKT_ID'=>$item->ID() ), EVENTS_ADMIN_URL );
117
-				$actions['delete'] = '<a href="'.$delete_lnk_url.'" title="' . esc_attr__( 'Delete Ticket Permanently', 'event_espresso' ) . '">' . __( 'Delete Permanently', 'event_espresso' ) . '</a>';
116
+				$delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'delete_ticket', 'TKT_ID'=>$item->ID()), EVENTS_ADMIN_URL);
117
+				$actions['delete'] = '<a href="'.$delete_lnk_url.'" title="'.esc_attr__('Delete Ticket Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>';
118 118
 			}
119 119
 		}
120 120
 
121
-		return $item->get('TKT_name') . $this->row_actions( $actions );
121
+		return $item->get('TKT_name').$this->row_actions($actions);
122 122
 	}
123 123
 
124 124
 
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
 
132 132
 
133 133
 	function column_TKT_qty($item) {
134
-		return $item->get_pretty('TKT_qty','text');
134
+		return $item->get_pretty('TKT_qty', 'text');
135 135
 	}
136 136
 
137 137
 
138 138
 
139 139
 	function column_TKT_uses($item) {
140
-		return $item->get_pretty('TKT_uses','text');
140
+		return $item->get_pretty('TKT_uses', 'text');
141 141
 	}
142 142
 
143 143
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
 
150 150
 	function column_TKT_max($item) {
151
-		return $item->get_pretty('TKT_max','text');
151
+		return $item->get_pretty('TKT_max', 'text');
152 152
 	}
153 153
 
154 154
 
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
 /**
4 6
  * Event Espresso
Please login to merge, or discard this patch.