Completed
Branch BETA-4.9-messages-queue-fixed (941081)
by
unknown
33:43 queued 13:37
created
admin_pages/messages/templates/shortcode_selector_skeleton.template.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file contains the template for the Messages Shortcode selector.
4
- *
5
- * Template args available are:
6
- * @type    array   $shortcodes An array indexed by shortcode and the values are the labels.
7
- * @type    string  $fieldname  The name of the field the chooser is associated with.
8
- * @type    string  $linked_input_id The name of the input that the shortcode gets inserted to.
9
- */
3
+			 * This file contains the template for the Messages Shortcode selector.
4
+			 *
5
+			 * Template args available are:
6
+			 * @type    array   $shortcodes An array indexed by shortcode and the values are the labels.
7
+			 * @type    string  $fieldname  The name of the field the chooser is associated with.
8
+			 * @type    string  $linked_input_id The name of the input that the shortcode gets inserted to.
9
+			 */
10 10
 if ( ! empty( $shortcodes ) ) : ?>
11 11
 <span class="ee-messages-shortcodes-chooser js-open-list-trigger dashicons dashicons-menu">
12 12
 	<ul id="ee_shortcode_chooser_<?php echo $fieldname; ?>" class="ee_shortcode_chooser_container hidden">
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@
 block discarded – undo
7 7
  * @type    string  $fieldname  The name of the field the chooser is associated with.
8 8
  * @type    string  $linked_input_id The name of the input that the shortcode gets inserted to.
9 9
  */
10
-if ( ! empty( $shortcodes ) ) : ?>
10
+if ( ! empty($shortcodes)) : ?>
11 11
 <span class="ee-messages-shortcodes-chooser js-open-list-trigger dashicons dashicons-menu">
12 12
 	<ul id="ee_shortcode_chooser_<?php echo $fieldname; ?>" class="ee_shortcode_chooser_container hidden">
13
-		<?php foreach( $shortcodes as $shortcode => $label ) : ?>
13
+		<?php foreach ($shortcodes as $shortcode => $label) : ?>
14 14
 			<li>
15
-				<span class="js-shortcode-selection" data-value="<?php echo esc_attr( $shortcode ); ?>" data-linked-input-id="<?php echo esc_attr( $linked_input_id ); ?>"><?php echo $shortcode; ?></span>
15
+				<span class="js-shortcode-selection" data-value="<?php echo esc_attr($shortcode); ?>" data-linked-input-id="<?php echo esc_attr($linked_input_id); ?>"><?php echo $shortcode; ?></span>
16 16
 			</li>
17 17
 		<?php endforeach; ?>
18 18
 	</ul>
19 19
 </span>
20
-<?php endif ; ?>
21 20
\ No newline at end of file
21
+<?php endif; ?>
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
templates/txn_admin_details_main_meta_box_txn_details.template.php 1 patch
Spacing   +115 added lines, -115 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
 	<h4 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
 	</h4>
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
-		<h4 class="admin-primary-mbox-h4"><?php _e( 'Transaction Session Details', 'event_espresso' );?></h4>
23
+		<h4 class="admin-primary-mbox-h4"><?php _e('Transaction Session Details', 'event_espresso'); ?></h4>
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' ) ) : ?>
43
+	<?php if ($attendee instanceof EE_Attendee && ($grand_raw_total > 0 || $TXN_status != 'TCM')) : ?>
44 44
 
45 45
 	<h4 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
 	</h4>
48 48
 
49 49
 	<div class="admin-primary-mbox-tbl-wrap">
@@ -52,75 +52,75 @@  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
-				<tr id="txn-admin-payment-tr-<?php echo $PAY_ID;?>">
70
+			<?php foreach ($payments as $PAY_ID => $payment) : ?>
71
+				<tr id="txn-admin-payment-tr-<?php echo $PAY_ID; ?>">
72 72
 					<td>
73 73
 						<span id="payment-status-<?php echo $PAY_ID; ?>" class="ee-status-strip-td ee-status-strip pymt-status-<?php echo $payment->STS_ID(); ?>"></span>
74
-						<div id="payment-STS_ID-<?php echo $PAY_ID;?>" class="hidden"><?php echo $payment->STS_ID();?></div>
75
-						<div id="reg-payments-<?php echo $PAY_ID;?>" class="hidden"><?php echo json_encode( $existing_reg_payments[ $PAY_ID ] );?></div>
74
+						<div id="payment-STS_ID-<?php echo $PAY_ID; ?>" class="hidden"><?php echo $payment->STS_ID(); ?></div>
75
+						<div id="reg-payments-<?php echo $PAY_ID; ?>" class="hidden"><?php echo json_encode($existing_reg_payments[$PAY_ID]); ?></div>
76 76
 					</td>
77 77
 					<td class=" jst-cntr">
78 78
 						<ul class="txn-overview-actions-ul">
79 79
 							<li>
80
-								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e( 'Edit Payment', 'event_espresso' );?>" data-payment-id="<?php echo $PAY_ID;?>">
80
+								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e('Edit Payment', 'event_espresso'); ?>" data-payment-id="<?php echo $PAY_ID; ?>">
81 81
 									<div class="dashicons dashicons-edit" style="margin: 0;"></div>
82 82
 								</a>
83 83
 							</li>
84 84
 							<li>
85
-								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e( 'Delete Payment', 'event_espresso' );?>" data-payment-id="<?php echo $PAY_ID;?>">
85
+								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e('Delete Payment', 'event_espresso'); ?>" data-payment-id="<?php echo $PAY_ID; ?>">
86 86
 									<div class="dashicons dashicons-trash" style="margin: 0;"></div>
87 87
 								</a>
88 88
 							</li>
89 89
 						</ul>
90 90
 					</td>
91 91
 					<td class=" jst-rght">
92
-						<div id="payment-id-<?php echo $PAY_ID;?>"><?php echo $PAY_ID;?></div>
92
+						<div id="payment-id-<?php echo $PAY_ID; ?>"><?php echo $PAY_ID; ?></div>
93 93
 					</td>
94 94
 					<td class=" jst-left">
95
-						<div id="payment-date-<?php echo $PAY_ID;?>" class="payment-date-dv"><?php echo $payment->timestamp('Y-m-d', 'h:i a');?></div>
95
+						<div id="payment-date-<?php echo $PAY_ID; ?>" class="payment-date-dv"><?php echo $payment->timestamp('Y-m-d', 'h:i a'); ?></div>
96 96
 					</td>
97 97
 					<td class=" jst-cntr">
98
-						<div id="payment-method-<?php echo $PAY_ID;?>">
99
-							<?php echo $payment->source();?>
98
+						<div id="payment-method-<?php echo $PAY_ID; ?>">
99
+							<?php echo $payment->source(); ?>
100 100
 						</div>
101 101
 					</td>
102 102
 					<td class=" jst-left">
103
-						<div id="payment-gateway-<?php echo $PAY_ID;?>">
104
-							<?php echo $payment->payment_method() ?  $payment->payment_method()->admin_name() : __("Unknown", 'event_espresso');?>
103
+						<div id="payment-gateway-<?php echo $PAY_ID; ?>">
104
+							<?php echo $payment->payment_method() ? $payment->payment_method()->admin_name() : __("Unknown", 'event_espresso'); ?>
105 105
 						</div>
106
-						<div id="payment-gateway-id-<?php echo $PAY_ID;?>" class="hidden"><?php echo $payment->payment_method() ? $payment->payment_method()->ID() : 0;?></div>
106
+						<div id="payment-gateway-id-<?php echo $PAY_ID; ?>" class="hidden"><?php echo $payment->payment_method() ? $payment->payment_method()->ID() : 0; ?></div>
107 107
 					</td>
108 108
 					<td class=" jst-left">
109
-						<div id="payment-response-<?php echo $PAY_ID;?>"><?php echo $payment->gateway_response();?></div>
109
+						<div id="payment-response-<?php echo $PAY_ID; ?>"><?php echo $payment->gateway_response(); ?></div>
110 110
 					</td>
111 111
 					<td class=" jst-left">
112
-						<div id="payment-txn-id-chq-nmbr-<?php echo $PAY_ID;?>"><?php echo $payment->txn_id_chq_nmbr();?></div>
112
+						<div id="payment-txn-id-chq-nmbr-<?php echo $PAY_ID; ?>"><?php echo $payment->txn_id_chq_nmbr(); ?></div>
113 113
 					</td>
114 114
 					<td class=" jst-left">
115
-						<div id="payment-po-nmbr-<?php echo $PAY_ID;?>"><?php echo $payment->po_number();?></div>
115
+						<div id="payment-po-nmbr-<?php echo $PAY_ID; ?>"><?php echo $payment->po_number(); ?></div>
116 116
 					</td>
117 117
 					<td class=" jst-left">
118
-						<div id="payment-accntng-<?php echo $PAY_ID;?>"><?php echo $payment->extra_accntng();?></div>
118
+						<div id="payment-accntng-<?php echo $PAY_ID; ?>"><?php echo $payment->extra_accntng(); ?></div>
119 119
 					</td>
120 120
 					<td class=" jst-rght">
121
-						<?php $payment_class = $payment->amount() > 0 ? 'txn-admin-payment-status-' . $payment->STS_ID() : 'txn-admin-payment-status-PDC'; ?>
122
-						<span class="<?php echo $payment_class;?>">
123
-							<div id="payment-amount-<?php echo $PAY_ID;?>" style="display:inline;"><?php echo EEH_Template::format_currency($payment->amount(), FALSE, FALSE ); ?></div>
121
+						<?php $payment_class = $payment->amount() > 0 ? 'txn-admin-payment-status-'.$payment->STS_ID() : 'txn-admin-payment-status-PDC'; ?>
122
+						<span class="<?php echo $payment_class; ?>">
123
+							<div id="payment-amount-<?php echo $PAY_ID; ?>" style="display:inline;"><?php echo EEH_Template::format_currency($payment->amount(), FALSE, FALSE); ?></div>
124 124
 						</span>
125 125
 					</td>
126 126
 				</tr>
@@ -130,25 +130,25 @@  discard block
 block discarded – undo
130 130
 			<?php endforeach; // $payment?>
131 131
 			<?php
132 132
 				$pay_totals_class = $payment_total > $grand_raw_total ? ' important-notice' : '';
133
-				$overpaid = $payment_total > $grand_raw_total ? '<span id="overpaid">' . __( 'This transaction has been overpaid ! ', 'event_espresso' ) . '</span>' : '';
133
+				$overpaid = $payment_total > $grand_raw_total ? '<span id="overpaid">'.__('This transaction has been overpaid ! ', 'event_espresso').'</span>' : '';
134 134
 			?>
135 135
 				<tr id="txn-admin-no-payments-tr" class="admin-primary-mbox-total-tr hidden">
136 136
 					<td class=" jst-rght" colspan="11">
137
-						<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>
137
+						<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>
138 138
 					</td>
139 139
 				</tr>
140
-				<tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr<?php echo $pay_totals_class;?>">
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
-					<th class=" jst-rght"><span id="txn-admin-payment-total"><?php echo EEH_Template::format_currency($payment_total, FALSE, FALSE);?></span></th>
140
+				<tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr<?php echo $pay_totals_class; ?>">
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
+					<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 144
 		<?php else : ?>
145 145
 				<tr id="txn-admin-no-payments-tr" class="admin-primary-mbox-total-tr">
146 146
 					<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>
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 148
 					</td>
149 149
 				</tr>
150 150
 				<tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr hidden">
151
-					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo __( 'Payments Total', 'event_espresso' );?></span></th>
151
+					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo __('Payments Total', 'event_espresso'); ?></span></th>
152 152
 					<th class=" jst-rght"><span id="txn-admin-payment-total"></span></th>
153 153
 				</tr>
154 154
 		<?php endif; // $payments?>
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
 					<td class=" jst-cntr">
162 162
 						<ul class="txn-overview-actions-ul">
163 163
 							<li>
164
-								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e( 'Edit Payment', 'event_espresso' );?>" data-payment-id="PAY_ID">
164
+								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e('Edit Payment', 'event_espresso'); ?>" data-payment-id="PAY_ID">
165 165
 									<div class="dashicons dashicons-edit" style="margin: 0;"></div>
166 166
 								</a>
167 167
 							</li>
168 168
 							<li>
169
-								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e( 'Delete Payment', 'event_espresso' );?>" data-payment-id="PAY_ID">
169
+								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e('Delete Payment', 'event_espresso'); ?>" data-payment-id="PAY_ID">
170 170
 									<div class="dashicons dashicons-trash" style="margin: 0;"></div>
171 171
 								</a>
172 172
 							</li>
@@ -213,12 +213,12 @@  discard block
 block discarded – undo
213 213
 	<ul id="txn-admin-payment-options-ul">
214 214
 		<li>
215 215
 			<a id="display-txn-admin-apply-payment" class="button-primary no-icon no-hide" rel="txn-admin-apply-payment" > <!--display-the-hidden -->
216
-				<?php _e( 'Apply Payment', 'event_espresso' );?>
216
+				<?php _e('Apply Payment', 'event_espresso'); ?>
217 217
 			</a>
218 218
 		</li>
219 219
 		<li>
220 220
 			<a id="display-txn-admin-apply-refund" class="button-secondary no-icon no-hide" rel="txn-admin-apply-refund" >  <!--display-the-hidden -->
221
-				<?php _e( 'Apply Refund', 'event_espresso' );?>
221
+				<?php _e('Apply Refund', 'event_espresso'); ?>
222 222
 			</a>
223 223
 		</li>
224 224
 	</ul>
@@ -228,14 +228,14 @@  discard block
 block discarded – undo
228 228
 
229 229
 		<h2 id="admin-modal-dialog-apply-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
230 230
 			<div class="ee-icon ee-icon-cash-add float-left"></div>
231
-			<?php echo __( 'Apply a Payment to Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?>
231
+			<?php echo __('Apply a Payment to Transaction #', 'event_espresso').$txn_nmbr['value']; ?>
232 232
 		</h2>
233 233
 
234 234
 		<h2 id="admin-modal-dialog-edit-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
235 235
 			<div class="ee-icon ee-icon-cash-edit float-left"></div>
236 236
 			<?php
237 237
 			echo sprintf(
238
-				__( 'Edit Payment #%s for Transaction #%s', 'event_espresso' ),
238
+				__('Edit Payment #%s for Transaction #%s', 'event_espresso'),
239 239
 				'<span></span>',
240 240
 				$txn_nmbr['value']
241 241
 			);
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 			<div class="ee-icon ee-icon-cash-edit float-left"></div>
247 247
 			<?php
248 248
 			echo sprintf(
249
-				__( 'Edit Refund #%s for Transaction #%s', 'event_espresso' ),
249
+				__('Edit Refund #%s for Transaction #%s', 'event_espresso'),
250 250
 				'<span></span>',
251 251
 				$txn_nmbr['value']
252 252
 			);
@@ -255,14 +255,14 @@  discard block
 block discarded – undo
255 255
 
256 256
 		<h2 id="admin-modal-dialog-apply-refund-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
257 257
 			<div class="ee-icon ee-icon-cash-remove float-left"></div>
258
-			<?php echo __( 'Apply a Refund to Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?>
258
+			<?php echo __('Apply a Refund to Transaction #', 'event_espresso').$txn_nmbr['value']; ?>
259 259
 		</h2>
260 260
 
261 261
 		<form name="txn-admin-apply-payment-frm" id="txn-admin-apply-payment-frm" action="<?php echo $apply_payment_form_url; ?>">
262 262
 			<div class="admin-modal-dialog-wrap">
263 263
 				<div class="admin-modal-dialog-inner">
264 264
 
265
-					<input  type="hidden" name="espresso_apply_payment_nonce" id="espresso_apply_payment_nonce" value="<?php echo wp_create_nonce( 'espresso_apply_payment_nonce' );?>"/>
265
+					<input  type="hidden" name="espresso_apply_payment_nonce" id="espresso_apply_payment_nonce" value="<?php echo wp_create_nonce('espresso_apply_payment_nonce'); ?>"/>
266 266
 					<input  type="hidden" name="espresso_ajax" id="espresso-ajax" value="0"/>
267 267
 					<input  type="hidden" name="noheader" id="txn-admin-noheader-inp" value="0"/>
268 268
 					<input  type="hidden" name="txn_admin_payment[PAY_ID]" id="txn-admin-payment-payment-id-inp" class="txn-admin-apply-payment-inp" value="0"/>
@@ -270,108 +270,108 @@  discard block
 block discarded – undo
270 270
 					<input  type="hidden" name="txn_admin_payment[type]" id="txn-admin-payment-type-inp" value="1"/>
271 271
 					<input  type="hidden" name="txn_admin_payment[details]" id="txn-admin-payment-details-inp" value=""/>
272 272
 					<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; ?>"/>
273
-					<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' )); ?>"/>
273
+					<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')); ?>"/>
274 274
 
275 275
 					<div class="txn-admin-apply-payment-date-dv admin-modal-dialog-row">
276
-						<div class="validation-notice-dv"><?php _e( 'The following is  a required field', 'event_espresso' );?></div>
277
-						<label for="txn-admin-payment-date-inp" class=""><?php _e( 'Payment Date', 'event_espresso' );?></label>
278
-						<input name="txn_admin_payment[date]" id="txn-admin-payment-date-inp" class="txn-admin-apply-payment-inp required" type="text" value="<?php echo date( 'Y-m-d h:i a', current_time( 'timestamp' )); ?>"/>
279
-						<p class="description"><?php _e( 'The date the payment was actually made on', 'event_espresso' );?></p>
276
+						<div class="validation-notice-dv"><?php _e('The following is  a required field', 'event_espresso'); ?></div>
277
+						<label for="txn-admin-payment-date-inp" class=""><?php _e('Payment Date', 'event_espresso'); ?></label>
278
+						<input name="txn_admin_payment[date]" id="txn-admin-payment-date-inp" class="txn-admin-apply-payment-inp required" type="text" value="<?php echo date('Y-m-d h:i a', current_time('timestamp')); ?>"/>
279
+						<p class="description"><?php _e('The date the payment was actually made on', 'event_espresso'); ?></p>
280 280
 					</div>
281 281
 
282 282
 					<div class="txn-admin-apply-payment-amount-dv admin-modal-dialog-row">
283
-						<div class="validation-notice-dv"><?php _e( 'The following is  a required field', 'event_espresso' );?></div>
284
-						<label for="txn-admin-payment-amount-inp" class=""><?php _e( 'Amount', 'event_espresso' );?></label>
283
+						<div class="validation-notice-dv"><?php _e('The following is  a required field', 'event_espresso'); ?></div>
284
+						<label for="txn-admin-payment-amount-inp" class=""><?php _e('Amount', 'event_espresso'); ?></label>
285 285
 						<input name="txn_admin_payment[amount]" id="txn-admin-payment-amount-inp" class="txn-admin-apply-payment-inp required" type="text" value=""/>
286
-						<p class="description"><?php _e( 'The amount of the payment', 'event_espresso' );?></p>
286
+						<p class="description"><?php _e('The amount of the payment', 'event_espresso'); ?></p>
287 287
 					</div>
288 288
 
289 289
 					<div class="txn-admin-apply-payment-method-dv admin-modal-dialog-row">
290
-						<div class="validation-notice-dv"><?php _e( 'The following is  a required field', 'event_espresso' );?></div>
291
-						<label for="txn-admin-payment-method-inp" class=""><?php _e( 'Method of Payment', 'event_espresso' );?></label>
290
+						<div class="validation-notice-dv"><?php _e('The following is  a required field', 'event_espresso'); ?></div>
291
+						<label for="txn-admin-payment-method-inp" class=""><?php _e('Method of Payment', 'event_espresso'); ?></label>
292 292
 						<select name="txn_admin_payment[PMD_ID]" id="txn-admin-payment-method-slct" class="txn-admin-apply-payment-slct required" type="text" >
293
-						<?php foreach ( $payment_methods as $method ) : ?>
293
+						<?php foreach ($payment_methods as $method) : ?>
294 294
 							<?php $selected = $method->slug() == 'cash' ? ' selected="selected"' : ''; ?>
295
-							<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>
295
+							<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>
296 296
 						<?php endforeach; ?>
297 297
 						</select>
298
-						<p class="description"><?php _e( 'Whether the payment was made via PayPal, Credit Card, Cheque, or Cash', 'event_espresso' );?></p>
298
+						<p class="description"><?php _e('Whether the payment was made via PayPal, Credit Card, Cheque, or Cash', 'event_espresso'); ?></p>
299 299
 					</div>
300 300
 
301 301
 					<div class="mop-PP mop-CC mop-CHQ mop">
302 302
 						<div class="txn-admin-apply-payment-gw-txn-id-dv admin-modal-dialog-row">
303
-							<label for="txn-admin-payment-txn-id-inp" class=""><?php _e( 'TXN ID / CHQ #', 'event_espresso' );?></label>
303
+							<label for="txn-admin-payment-txn-id-inp" class=""><?php _e('TXN ID / CHQ #', 'event_espresso'); ?></label>
304 304
 							<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"/>
305
-							<p class="description"><?php _e( 'The Transaction ID sent back from the payment gateway, or the Cheque #', 'event_espresso' );?></p>
305
+							<p class="description"><?php _e('The Transaction ID sent back from the payment gateway, or the Cheque #', 'event_espresso'); ?></p>
306 306
 						</div>
307 307
 					</div>
308 308
 
309 309
 					<div class="mop-CC mop" style="display:none">
310 310
 						<div class="txn-admin-apply-payment-response-dv admin-modal-dialog-row">
311
-							<label for="txn-admin-payment-gateway-response-inp" class=""><?php _e( 'Gateway Response', 'event_espresso' );?></label>
311
+							<label for="txn-admin-payment-gateway-response-inp" class=""><?php _e('Gateway Response', 'event_espresso'); ?></label>
312 312
 							<input name="txn_admin_payment[gateway_response]" id="txn-admin-payment-gateway-response-inp" class="txn-admin-apply-payment-inp" type="text"/>
313
-							<p class="description"><?php _e( 'The gateway response string (optional)', 'event_espresso' );?></p>
313
+							<p class="description"><?php _e('The gateway response string (optional)', 'event_espresso'); ?></p>
314 314
 						</div>
315 315
 					</div>
316 316
 
317 317
 					<div class="mop-PP mop-CC mop">
318 318
 						<div class="txn-admin-apply-payment-status-dv admin-modal-dialog-row">
319
-							<label for="txn-admin-payment-status-inp" class=""><?php _e( 'Payment Status', 'event_espresso' );?></label>
319
+							<label for="txn-admin-payment-status-inp" class=""><?php _e('Payment Status', 'event_espresso'); ?></label>
320 320
 							<select name="txn_admin_payment[status]" id="txn-admin-payment-status-slct" class="txn-admin-apply-payment-slct" type="text" >
321
-							<?php foreach ( $payment_status as $STS_ID => $STS_code ) : ?>
321
+							<?php foreach ($payment_status as $STS_ID => $STS_code) : ?>
322 322
 								<?php $selected = $STS_ID == 'PAP' ? ' selected="selected"' : ''; ?>
323 323
 								<option id="payment-status-opt-<?php echo $STS_ID; ?>" value="<?php echo $STS_ID; ?>"<?php echo $selected; ?>><?php echo $STS_code; ?>&nbsp;&nbsp;</option>
324 324
 							<?php endforeach; ?>
325 325
 							</select>
326
-							<p class="description"><?php _e( 'Whether the payment was approved, cancelled, declined or failed after submission to the gateway', 'event_espresso' );?></p>
326
+							<p class="description"><?php _e('Whether the payment was approved, cancelled, declined or failed after submission to the gateway', 'event_espresso'); ?></p>
327 327
 						</div>
328 328
 					</div>
329 329
 
330 330
 					<div class="txn-admin-apply-payment-po-nmbr-dv admin-modal-dialog-row">
331
-						<label for="txn-admin-payment-po-nmbr-inp" class=""><?php _e( 'P.O. / S.O. #', 'event_espresso' );?></label>
331
+						<label for="txn-admin-payment-po-nmbr-inp" class=""><?php _e('P.O. / S.O. #', 'event_espresso'); ?></label>
332 332
 						<input name="txn_admin_payment[po_number]" id="txn-admin-payment-po-nmbr-inp" class="txn-admin-apply-payment-inp" type="text" maxlength="100"/>
333
-						<p class="description"><?php _e( 'The Purchase or Sales Order Number if any (optional)', 'event_espresso' );?></p>
333
+						<p class="description"><?php _e('The Purchase or Sales Order Number if any (optional)', 'event_espresso'); ?></p>
334 334
 					</div>
335 335
 
336 336
 					<div class="txn-admin-apply-payment-accounting-dv admin-modal-dialog-row">
337
-						<label for="txn-admin-payment-accounting-inp" class="last"><?php _e( 'Notes / Extra Accounting', 'event_espresso' );?></label>
337
+						<label for="txn-admin-payment-accounting-inp" class="last"><?php _e('Notes / Extra Accounting', 'event_espresso'); ?></label>
338 338
 						<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; ?>"/>
339
-						<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>
339
+						<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>
340 340
 					</div>
341 341
 
342 342
 					<div class="txn-admin-apply-payment-registrations-dv admin-modal-dialog-row">
343
-						<label for="txn-admin-payment-registrations-inp" class="last"><?php _e( 'Registrations to Apply Payment to:', 'event_espresso' ); ?></label>
343
+						<label for="txn-admin-payment-registrations-inp" class="last"><?php _e('Registrations to Apply Payment to:', 'event_espresso'); ?></label>
344 344
 						<label class="txn-admin-apply-payment-to-registrations-lbl">
345 345
 							<input type="radio" value="1" id="txn-admin-apply-payment-to-all-registrations-inp" name="txn_admin_payment[apply_to_all_registrations]"  checked="checked"/>
346
-							<?php _e( 'ALL Registrations', 'event_espresso' ); ?>
346
+							<?php _e('ALL Registrations', 'event_espresso'); ?>
347 347
 						</label>
348 348
 						<label class="txn-admin-apply-payment-to-registrations-lbl">
349 349
 							<input type="radio" value="0" id="txn-admin-apply-payment-to-some-registrations-inp" name="txn_admin_payment[apply_to_all_registrations]" />
350
-							<?php _e( 'Just the following Registrations', 'event_espresso' ); ?>
350
+							<?php _e('Just the following Registrations', 'event_espresso'); ?>
351 351
 						</label>
352 352
 						<?php echo $registrations_to_apply_payment_to; ?>
353 353
 					</div>
354 354
 
355 355
 					<div class="txn-admin-payment-reg-status-dv admin-modal-dialog-row">
356
-						<label for="txn-admin-payment-reg-status-inp" class="last"><?php _e( 'Change Registration Status?', 'event_espresso' );?></label>
356
+						<label for="txn-admin-payment-reg-status-inp" class="last"><?php _e('Change Registration Status?', 'event_espresso'); ?></label>
357 357
 						<?php echo $status_change_select; ?>
358
-						<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>
358
+						<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>
359 359
 						<br/>
360 360
 					</div>
361 361
 
362 362
 					<div class="txn-admin-apply-payment-send-notifications-dv admin-modal-dialog-row">
363 363
 
364
-						<label for="txn-admin-payment-send-notifications-inp" class="last"><?php _e( 'Send Related Messages?', 'event_espresso' );?></label>
364
+						<label for="txn-admin-payment-send-notifications-inp" class="last"><?php _e('Send Related Messages?', 'event_espresso'); ?></label>
365 365
 						<label class="txn-admin-payment-send-notifications-lbl">
366 366
 							<input type="checkbox" value="1" name="txn_payments[send_notifications]" checked="checked" aria-checked="true" style="vertical-align: middle;">
367
-							<?php _e( 'Payment Messages?', 'event_espresso' ); ?>
367
+							<?php _e('Payment Messages?', 'event_espresso'); ?>
368 368
 						</label>
369 369
 						<label class="txn-admin-payment-send-notifications-lbl">
370 370
 							<input type="checkbox" value="1" name="txn_reg_status_change[send_notifications]" style="vertical-align: middle;">
371
-							<?php _e( 'Registration Messages?', 'event_espresso' ); ?>
371
+							<?php _e('Registration Messages?', 'event_espresso'); ?>
372 372
 						</label>
373 373
 						<br class="clear-float"/>
374
-						<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>
374
+						<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>
375 375
 						<label></label>
376 376
 					</div>
377 377
 					<div class="clear"></div>
@@ -382,27 +382,27 @@  discard block
 block discarded – undo
382 382
 			<ul id="admin-modal-dialog-options-ul">
383 383
 				<li>
384 384
 					<a id="txn-admin-modal-dialog-apply-payment-lnk" class="button-primary no-icon" style="display:none;" >
385
-						<?php _e( 'Apply Payment', 'event_espresso' );?>
385
+						<?php _e('Apply Payment', 'event_espresso'); ?>
386 386
 					</a>
387 387
 				</li>
388 388
 				<li>
389 389
 					<a id="txn-admin-modal-dialog-edit-payment-lnk" class="button-primary no-icon" style="display:none;" >
390
-						<?php _e( 'Save Payment Details', 'event_espresso' );?>
390
+						<?php _e('Save Payment Details', 'event_espresso'); ?>
391 391
 					</a>
392 392
 				</li>
393 393
 				<li>
394 394
 					<a id="txn-admin-modal-dialog-edit-refund-lnk" class="button-primary no-icon" style="display:none;" >
395
-						<?php _e( 'Save Refund Details', 'event_espresso' );?>
395
+						<?php _e('Save Refund Details', 'event_espresso'); ?>
396 396
 					</a>
397 397
 				</li>
398 398
 				<li>
399 399
 					<a id="txn-admin-modal-dialog-apply-refund-lnk" class="button-primary no-icon" style="display:none;" >
400
-						<?php _e( 'Apply Refund', 'event_espresso' );?>
400
+						<?php _e('Apply Refund', 'event_espresso'); ?>
401 401
 					</a>
402 402
 				</li>
403 403
 				<li>
404 404
 					<a id="txn-admin-modal-dialog-cancel-lnk" class="button-secondary no-icon" >
405
-						<?php _e( 'Cancel', 'event_espresso' );?>
405
+						<?php _e('Cancel', 'event_espresso'); ?>
406 406
 					</a>
407 407
 				</li>
408 408
 				<li>
@@ -419,29 +419,29 @@  discard block
 block discarded – undo
419 419
 
420 420
 		<h2 id="admin-modal-dialog-delete-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
421 421
 			<span class="ee-icon ee-icon-cash-add"></span>
422
-			<?php echo __( 'Delete Payment/Refund for Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?>
422
+			<?php echo __('Delete Payment/Refund for Transaction #', 'event_espresso').$txn_nmbr['value']; ?>
423 423
 		</h2>
424 424
 
425 425
 		<form name="txn-admin-delete-payment-frm" id="txn-admin-delete-payment-frm" action="<?php echo $delete_payment_url; ?>">
426 426
 			<div class="admin-modal-dialog-wrap">
427 427
 				<div class="admin-modal-dialog-inner">
428 428
 
429
-					<input  type="hidden" name="espresso_delete_payment_nonce" id="espresso_delete_payment_nonce" value="<?php echo wp_create_nonce( 'espresso_delete_payment_nonce' );?>"/>
429
+					<input  type="hidden" name="espresso_delete_payment_nonce" id="espresso_delete_payment_nonce" value="<?php echo wp_create_nonce('espresso_delete_payment_nonce'); ?>"/>
430 430
 					<input  type="hidden" name="delete_espresso_ajax" id="delete-espresso-ajax" value="0"/>
431 431
 					<input  type="hidden" name="delete_noheader" id="delete-txn-admin-noheader-inp" value="0"/>
432 432
 					<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"/>
433 433
 					<input  type="hidden" name="delete_txn_admin_payment[TXN_ID]" id="delete-txn-admin-payment-txn-id-inp" value="<?php echo $txn_nmbr['value']; ?>"/>
434 434
 
435 435
 					<div class="txn-admin-apply-payment-accounting-dv admin-modal-dialog-row">
436
-						<label for="delete-txn-admin-payment-reg-status-inp" class="last"><?php _e( 'Change Registration Status?', 'event_espresso' );?></label>
436
+						<label for="delete-txn-admin-payment-reg-status-inp" class="last"><?php _e('Change Registration Status?', 'event_espresso'); ?></label>
437 437
 						<?php echo $delete_status_change_select; ?>
438
-						<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>
438
+						<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>
439 439
 					</div>
440 440
 
441 441
 					<div class="ee-attention txn-admin-apply-payment-accounting-dv admin-modal-dialog-row">
442
-						<label for="delete-txn-admin-payment-accounting-inp" class="last"><?php _e( 'Send Related Messages?', 'event_espresso' );?></label>
442
+						<label for="delete-txn-admin-payment-accounting-inp" class="last"><?php _e('Send Related Messages?', 'event_espresso'); ?></label>
443 443
 						<input type="checkbox" value="1" name="delete_txn_reg_status_change[send_notifications]">
444
-						<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>
444
+						<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>
445 445
 					</div>
446 446
 					<div class="clear"></div>
447 447
 
@@ -451,12 +451,12 @@  discard block
 block discarded – undo
451 451
 			<ul id="del-admin-modal-dialog-options-ul">
452 452
 				<li>
453 453
 					<a id="txn-admin-modal-dialog-delete-lnk" class="button-primary no-icon" style="display:none;" >
454
-						<?php _e( 'Delete', 'event_espresso' );?>
454
+						<?php _e('Delete', 'event_espresso'); ?>
455 455
 					</a>
456 456
 				</li>
457 457
 				<li>
458 458
 					<a id="del-txn-admin-modal-dialog-cancel-lnk" class="button-secondary no-icon" >
459
-						<?php _e( 'Cancel', 'event_espresso' );?>
459
+						<?php _e('Cancel', 'event_espresso'); ?>
460 460
 					</a>
461 461
 				</li>
462 462
 				<li>
@@ -472,30 +472,30 @@  discard block
 block discarded – undo
472 472
 	<?php endif; // $grand_raw_total > 0?>
473 473
 
474 474
 	<?php
475
-	if ( WP_DEBUG ) {
476
-		$delivered_messages = get_option( 'EED_Messages__payment', array() );
477
-		if ( isset( $delivered_messages[ $TXN_ID ] )) {
475
+	if (WP_DEBUG) {
476
+		$delivered_messages = get_option('EED_Messages__payment', array());
477
+		if (isset($delivered_messages[$TXN_ID])) {
478 478
 			?>
479
-			<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>
479
+			<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>
480 480
 
481 481
 			<div class="admin-primary-mbox-tbl-wrap">
482 482
 				<table class="admin-primary-mbox-tbl">
483 483
 					<thead>
484 484
 						<tr>
485
-							<th class="jst-left"><?php _e( 'Date & Time', 'event_espresso' );?></th>
486
-							<th class="jst-left"><?php _e( 'Message Type', 'event_espresso' );?></th>
487
-							<th class="jst-left"><?php _e( 'Payment Status Upon Sending', 'event_espresso' );?></th>
488
-							<th class="jst-left"><?php _e( 'TXN Status Upon Sending', 'event_espresso' );?></th>
485
+							<th class="jst-left"><?php _e('Date & Time', 'event_espresso'); ?></th>
486
+							<th class="jst-left"><?php _e('Message Type', 'event_espresso'); ?></th>
487
+							<th class="jst-left"><?php _e('Payment Status Upon Sending', 'event_espresso'); ?></th>
488
+							<th class="jst-left"><?php _e('TXN Status Upon Sending', 'event_espresso'); ?></th>
489 489
 						</tr>
490 490
 					</thead>
491 491
 					<tbody>
492
-						<?php foreach ( $delivered_messages[ $TXN_ID ] as $timestamp => $delivered_message ) :
492
+						<?php foreach ($delivered_messages[$TXN_ID] as $timestamp => $delivered_message) :
493 493
 							?>
494 494
 							<tr>
495
-								<td class="jst-left"><?php echo gmdate( get_option('date_format') . ' ' . get_option('time_format'), ( $timestamp + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) );?></td>
496
-								<td class="jst-left"><?php echo isset( $delivered_message['message_type'] ) ? $delivered_message['message_type'] : '';?></td>
497
-								<td class="jst-left"><?php echo isset( $delivered_message['pay_status'] ) ? $delivered_message['pay_status'] : '';?></td>
498
-								<td class="jst-left"><?php echo isset( $delivered_message['txn_status'] ) ? $delivered_message['txn_status'] : '';?></td>
495
+								<td class="jst-left"><?php echo gmdate(get_option('date_format').' '.get_option('time_format'), ($timestamp + (get_option('gmt_offset') * HOUR_IN_SECONDS))); ?></td>
496
+								<td class="jst-left"><?php echo isset($delivered_message['message_type']) ? $delivered_message['message_type'] : ''; ?></td>
497
+								<td class="jst-left"><?php echo isset($delivered_message['pay_status']) ? $delivered_message['pay_status'] : ''; ?></td>
498
+								<td class="jst-left"><?php echo isset($delivered_message['txn_status']) ? $delivered_message['txn_status'] : ''; ?></td>
499 499
 							</tr>
500 500
 						<?php endforeach; // $delivered_messages?>
501 501
 					</tbody>
Please login to merge, or discard this patch.
admin_pages/venues/Venues_Admin_Page_Init.core.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
 
33 33
 	public function __construct() {
34 34
 		//define some event categories related constants
35
-		define( 'EE_VENUES_PG_SLUG', 'espresso_venues' );
36
-		define( 'EE_VENUES_ADMIN_URL', admin_url('admin.php?page=' . EE_VENUES_PG_SLUG ));
37
-		define( 'EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'venues/assets/');
38
-		define( 'EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES . 'venues/templates/' );
35
+		define('EE_VENUES_PG_SLUG', 'espresso_venues');
36
+		define('EE_VENUES_ADMIN_URL', admin_url('admin.php?page='.EE_VENUES_PG_SLUG));
37
+		define('EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL.'venues/assets/');
38
+		define('EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES.'venues/templates/');
39 39
 
40 40
 		parent::__construct();
41
-		$this->_folder_path = EE_ADMIN_PAGES . $this->_folder_name . DS;
41
+		$this->_folder_path = EE_ADMIN_PAGES.$this->_folder_name.DS;
42 42
 	}
43 43
 
44 44
 	protected function _set_init_properties() {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 
51 51
 	protected function _set_menu_map() {
52
-		$this->_menu_map = new EE_Admin_Page_Sub_Menu( array(
52
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(array(
53 53
 			'menu_group' => 'management',
54 54
 			'menu_order' => 40,
55 55
 			'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
Please login to merge, or discard this patch.
admin_pages/venues/espresso_events_Venues_Hooks.class.php 1 patch
Spacing   +35 added lines, -35 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
 /**
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 	protected $_event;
34 34
 
35 35
 
36
-	public function __construct( EE_Admin_Page $admin_page ) {
37
-		parent::__construct( $admin_page );
36
+	public function __construct(EE_Admin_Page $admin_page) {
37
+		parent::__construct($admin_page);
38 38
 	}
39 39
 
40 40
 
@@ -49,18 +49,18 @@  discard block
 block discarded – undo
49 49
 				'priority' => 'high',
50 50
 				'context' => 'normal'
51 51
 				)
52
-		);/**/
52
+		); /**/
53 53
 
54 54
 		$this->_scripts_styles = array(
55 55
 			'registers' => array(
56 56
 				'ee_event_venues' => array(
57 57
 					'type' => 'js',
58
-					'url' => EE_VENUES_ASSETS_URL . 'ee-event-venues-admin.js',
58
+					'url' => EE_VENUES_ASSETS_URL.'ee-event-venues-admin.js',
59 59
 					'depends' => array('jquery')
60 60
 					),
61 61
 				'ee_event_venues_css' => array(
62 62
 					'type' => 'css',
63
-					'url' => EE_VENUES_ASSETS_URL . 'ee-event-venues-admin.css',
63
+					'url' => EE_VENUES_ASSETS_URL.'ee-event-venues-admin.css',
64 64
 					)
65 65
 				),
66 66
 			'enqueues' => array(
@@ -70,24 +70,24 @@  discard block
 block discarded – undo
70 70
 			);
71 71
 
72 72
 		//hook into the handler for saving venue
73
-		add_filter( 'FHEE__Events_Admin_Page___insert_update_cpt_item__event_update_callbacks', array( $this, 'modify_callbacks' ), 10 );
73
+		add_filter('FHEE__Events_Admin_Page___insert_update_cpt_item__event_update_callbacks', array($this, 'modify_callbacks'), 10);
74 74
 
75 75
 		//remove default ee_autosave returns for DECAF venues (not needed for CAF venues cause we have a dropdown selector)
76
-		add_filter( 'FHEE__Events_Admin_Page__ee_autosave_edit_do_decaf_venue_save', '__return_false' );
76
+		add_filter('FHEE__Events_Admin_Page__ee_autosave_edit_do_decaf_venue_save', '__return_false');
77 77
 
78 78
 	}
79 79
 
80 80
 
81
-	public function modify_callbacks( $callbacks ) {
81
+	public function modify_callbacks($callbacks) {
82 82
 		// first remove default venue callback
83
-		foreach ( $callbacks as $key => $callback ) {
84
-			if ( $callback[1] == '_default_venue_update' ) {
85
-				unset( $callbacks[$key] );
83
+		foreach ($callbacks as $key => $callback) {
84
+			if ($callback[1] == '_default_venue_update') {
85
+				unset($callbacks[$key]);
86 86
 			}
87 87
 		}
88 88
 
89 89
 		//now let's add the caf version
90
-		$callbacks[] = array( $this, 'caf_venue_update' );
90
+		$callbacks[] = array($this, 'caf_venue_update');
91 91
 		return $callbacks;
92 92
 	}
93 93
 
@@ -103,69 +103,69 @@  discard block
 block discarded – undo
103 103
 		$evt_id = $evt_obj->ID();
104 104
 
105 105
 		//first let's see if we have a venue already
106
-		$evt_venues = !empty( $evt_id ) ? $evt_obj->venues() : array();
107
-		$evt_venue = $evt_venues && is_array( $evt_venues ) ? reset( $evt_venues ) : null;
106
+		$evt_venues = ! empty($evt_id) ? $evt_obj->venues() : array();
107
+		$evt_venue = $evt_venues && is_array($evt_venues) ? reset($evt_venues) : null;
108 108
 		$evt_venue_id = $evt_venue instanceof EE_Venue ? $evt_venue->ID() : null;
109 109
 
110 110
 		//possibly private venues.
111
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_venues', 'get_venues' ) ) {
112
-			$vnu_where['status']= array( 'IN' , array( 'publish', 'private' ) );
111
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_private_venues', 'get_venues')) {
112
+			$vnu_where['status'] = array('IN', array('publish', 'private'));
113 113
 		} else {
114 114
 			$vnu_where['status'] = 'publish';
115 115
 		}
116 116
 
117 117
 		//cap checks
118
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_venues', 'get_venues' ) ) {
118
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_venues', 'get_venues')) {
119 119
 			$vnu_where['VNU_wp_user'] = get_current_user_id();
120 120
 		}
121 121
 
122
-		$vnumdl = EE_Registry::instance()->load_model( 'Venue' );
123
-		$venues = $vnumdl->get_all( array( $vnu_where, 'order_by' => array( 'VNU_name' => 'ASC' ) ) );
122
+		$vnumdl = EE_Registry::instance()->load_model('Venue');
123
+		$venues = $vnumdl->get_all(array($vnu_where, 'order_by' => array('VNU_name' => 'ASC')));
124 124
 
125 125
 		$ven_select = array();
126 126
 		$ven_select[0] = __('Select a Venue', 'event_espresso');
127 127
 		//setup venues for selector
128
-		foreach ( $venues as $venue ) {
128
+		foreach ($venues as $venue) {
129 129
 			$ven_select[$venue->ID()] = $venue->name();
130 130
 		}
131 131
 
132 132
 		//if $ven_select does not have the existing venue attached to event then let's add that because we'll always
133 133
 		//show existing attached venues even if it's trashed (or some other restricted status).
134 134
 
135
-		if ( $evt_venue_id && ! isset( $ven_select[$evt_venue_id] ) ) {
135
+		if ($evt_venue_id && ! isset($ven_select[$evt_venue_id])) {
136 136
 			$ven_select[$evt_venue_id] = $evt_venue->name();
137
-			$venues = array_merge( $venues, array( $evt_venue ) );
137
+			$venues = array_merge($venues, array($evt_venue));
138 138
 		}
139 139
 
140 140
 		$template_args['venues'] = $venues;
141 141
 		$template_args['evt_venue_id'] = $evt_venue_id;
142
-		$template_args['venue_selector'] = EEH_Form_Fields::select_input('venue_id', $ven_select, $evt_venue_id, 'id="venue_id"' );
143
-		$template_args['enable_for_gmap'] = EEH_Form_Fields::select_input('enable_for_gmap', $values, is_object( $evt_venue ) ? $evt_venue->enable_for_gmap() : NULL, 'id="enable_for_gmap"');
144
-		$template_path = empty( $venues ) ? EE_VENUES_TEMPLATE_PATH . 'event_venues_metabox_content.template.php' : EE_VENUES_TEMPLATE_PATH . 'event_venues_metabox_content_from_manager.template.php';
145
-		EEH_Template::display_template( $template_path, $template_args );
142
+		$template_args['venue_selector'] = EEH_Form_Fields::select_input('venue_id', $ven_select, $evt_venue_id, 'id="venue_id"');
143
+		$template_args['enable_for_gmap'] = EEH_Form_Fields::select_input('enable_for_gmap', $values, is_object($evt_venue) ? $evt_venue->enable_for_gmap() : NULL, 'id="enable_for_gmap"');
144
+		$template_path = empty($venues) ? EE_VENUES_TEMPLATE_PATH.'event_venues_metabox_content.template.php' : EE_VENUES_TEMPLATE_PATH.'event_venues_metabox_content_from_manager.template.php';
145
+		EEH_Template::display_template($template_path, $template_args);
146 146
 	}
147 147
 
148 148
 
149 149
 
150 150
 
151
-	public function caf_venue_update( $evtobj, $data ) {
151
+	public function caf_venue_update($evtobj, $data) {
152 152
 		EE_Registry::instance()->load_model('Venue');
153
-		$venue_id = !empty( $data['venue_id'] ) ? $data['venue_id'] : NULL;
153
+		$venue_id = ! empty($data['venue_id']) ? $data['venue_id'] : NULL;
154 154
 
155 155
 
156 156
 		//first let's check if the selected venue matches any existing venue attached to the event
157 157
 		$evt_venue = $evtobj->venues();
158
-		$evt_venue = !empty( $evt_venue ) ? array_shift( $evt_venue ) : NULL;
158
+		$evt_venue = ! empty($evt_venue) ? array_shift($evt_venue) : NULL;
159 159
 
160
-		if ( !empty( $evt_venue ) && $evt_venue->ID() != $venue_id )
161
-			$evtobj->_remove_relation_to( $evt_venue->ID(), 'Venue' );
160
+		if ( ! empty($evt_venue) && $evt_venue->ID() != $venue_id)
161
+			$evtobj->_remove_relation_to($evt_venue->ID(), 'Venue');
162 162
 
163
-		if ( empty( $venue_id ) )
163
+		if (empty($venue_id))
164 164
 			return TRUE; //no venue to attach
165 165
 
166 166
 		// this should take care of adding to revisions as well as main post object
167
-		$success = $evtobj->_add_relation_to( $venue_id, 'Venue' );
168
-		return !empty($success) ? TRUE : FALSE;
167
+		$success = $evtobj->_add_relation_to($venue_id, 'Venue');
168
+		return ! empty($success) ? TRUE : FALSE;
169 169
 	}
170 170
 
171 171
 
Please login to merge, or discard this patch.
admin/extend/messages/espresso_events_Messages_Hooks_Extend.class.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -30,15 +30,15 @@  discard block
 block discarded – undo
30 30
 class espresso_events_Messages_Hooks_Extend extends espresso_events_Messages_Hooks {
31 31
 
32 32
 
33
-	public function __construct( EE_Admin_Page $adminpage ) {
33
+	public function __construct(EE_Admin_Page $adminpage) {
34 34
 		/**
35 35
 		 * Add cap restriction ... metaboxes should not show if user does not have the ability to edit_custom_messages
36 36
 		 */
37
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_edit_messages', 'messages_events_editor_metabox' ) ) {
37
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_edit_messages', 'messages_events_editor_metabox')) {
38 38
 			return;
39 39
 		}
40
-		add_filter('FHEE__Events_Admin_Page___insert_update_cpt_item__event_update_callbacks', array( $this, 'caf_updates' ), 10 );
41
-		parent::__construct( $adminpage );
40
+		add_filter('FHEE__Events_Admin_Page___insert_update_cpt_item__event_update_callbacks', array($this, 'caf_updates'), 10);
41
+		parent::__construct($adminpage);
42 42
 	}
43 43
 
44 44
 	/**
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
 	 */
50 50
 	protected function _extend_properties() {
51 51
 
52
-		define( 'EE_MSGS_EXTEND_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/' );
52
+		define('EE_MSGS_EXTEND_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/assets/');
53 53
 		$this->_ajax_func = array(
54 54
 			'ee_msgs_create_new_custom' => 'create_new_custom'
55 55
 			);
56 56
 		$this->_metaboxes = array(
57 57
 			0 => array(
58
-				'page_route' => array('edit','create_new'),
58
+				'page_route' => array('edit', 'create_new'),
59 59
 				'func' => 'messages_metabox',
60 60
 				'label' => __('Notifications', 'event_espresso'),
61 61
 				'priority' => 'high'
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
 		$this->_scripts_styles = array(
67 67
 			'registers' => array(
68 68
 				'events_msg_admin' => array(
69
-					'url' => EE_MSGS_EXTEND_ASSETS_URL . 'events_messages_admin.js',
69
+					'url' => EE_MSGS_EXTEND_ASSETS_URL.'events_messages_admin.js',
70 70
 					'depends' => array('ee-dialog', 'ee-parse-uri', 'ee-serialize-full-array')
71 71
 					),
72 72
 				'events_msg_admin_css' => array(
73
-					'url' => EE_MSGS_EXTEND_ASSETS_URL . 'ee_msg_events_admin.css',
73
+					'url' => EE_MSGS_EXTEND_ASSETS_URL.'ee_msg_events_admin.css',
74 74
 					'type' => 'css'
75 75
 					)
76 76
 				),
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
 	}
83 83
 
84 84
 
85
-	public function caf_updates( $update_callbacks ) {
86
-		$update_callbacks[] = array( $this, 'attach_evt_message_templates' );
85
+	public function caf_updates($update_callbacks) {
86
+		$update_callbacks[] = array($this, 'attach_evt_message_templates');
87 87
 		return $update_callbacks;
88 88
 	}
89 89
 
@@ -96,13 +96,13 @@  discard block
 block discarded – undo
96 96
 	 * @param  array       $data   The request data from the form
97 97
 	 * @return bool         success or fail
98 98
 	 */
99
-	public function attach_evt_message_templates( $evtobj, $data ) {
99
+	public function attach_evt_message_templates($evtobj, $data) {
100 100
 		//first we remove all existing relations on the Event for message types.
101 101
 		$evtobj->_remove_relations('Message_Template_Group');
102 102
 
103 103
 		//now let's just loop throught the selected templates and add relations!
104
-		foreach( $data['event_message_templates_relation'] as $grp_ID ) {
105
-			$evtobj->_add_relation_to( $grp_ID, 'Message_Template_Group' );
104
+		foreach ($data['event_message_templates_relation'] as $grp_ID) {
105
+			$evtobj->_add_relation_to($grp_ID, 'Message_Template_Group');
106 106
 		}
107 107
 
108 108
 		//now save
@@ -115,10 +115,10 @@  discard block
 block discarded – undo
115 115
 
116 116
 		//let's get the active messengers (b/c messenger objects have the active message templates)
117 117
 		//convert 'evt_id' to 'EVT_ID'
118
-		$this->_req_data['EVT_ID'] = isset( $this->_req_data['EVT_ID'] ) ? $this->_req_data['EVT_ID'] : NULL;
119
-		$this->_req_data['EVT_ID'] = isset( $this->_req_data['post'] ) && empty( $this->_req_data['EVT_ID'] ) ? $this->_req_data['post'] : $this->_req_data['EVT_ID'];
118
+		$this->_req_data['EVT_ID'] = isset($this->_req_data['EVT_ID']) ? $this->_req_data['EVT_ID'] : NULL;
119
+		$this->_req_data['EVT_ID'] = isset($this->_req_data['post']) && empty($this->_req_data['EVT_ID']) ? $this->_req_data['post'] : $this->_req_data['EVT_ID'];
120 120
 
121
-		$this->_req_data['EVT_ID'] = empty($this->_req_data['EVT_ID'] ) && isset($this->_req_data['evt_id'] ) ? $this->_req_data['evt_id'] : $this->_req_data['EVT_ID'];
121
+		$this->_req_data['EVT_ID'] = empty($this->_req_data['EVT_ID']) && isset($this->_req_data['evt_id']) ? $this->_req_data['evt_id'] : $this->_req_data['EVT_ID'];
122 122
 
123 123
 
124 124
 		$EEM_controller = new EE_messages;
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
 
128 128
 		//empty messengers?
129 129
 		//Note message types will always have at least one available because every messenger has a default message type associated with it (payment) if no other message types are selected.
130
-		if ( empty( $active_messengers ) ) {
131
-			$msg_activate_url = EE_Admin_Page::add_query_args_and_nonce( array('action' => 'settings'), EE_MSG_ADMIN_URL );
132
-			$error_msg = sprintf( __('There are no active messengers. So no notifications will go out for <strong>any</strong> events.  You will want to %sActivate a Messenger%s.', 'event_espresso'), '<a href="' . $msg_activate_url . '">', '</a>');
133
-			$error_content = '<div class="error"><p>' . $error_msg . '</p></div>';
134
-			$internal_content = '<div id="messages-error"><p>' . $error_msg . '</p></div>';
130
+		if (empty($active_messengers)) {
131
+			$msg_activate_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'settings'), EE_MSG_ADMIN_URL);
132
+			$error_msg = sprintf(__('There are no active messengers. So no notifications will go out for <strong>any</strong> events.  You will want to %sActivate a Messenger%s.', 'event_espresso'), '<a href="'.$msg_activate_url.'">', '</a>');
133
+			$error_content = '<div class="error"><p>'.$error_msg.'</p></div>';
134
+			$internal_content = '<div id="messages-error"><p>'.$error_msg.'</p></div>';
135 135
 
136 136
 			echo $error_content;
137 137
 			echo $internal_content;
@@ -140,39 +140,39 @@  discard block
 block discarded – undo
140 140
 
141 141
 		$event_id = isset($this->_req_data['EVT_ID']) ? $this->_req_data['EVT_ID'] : NULL;
142 142
 		//get content for active messengers
143
-		foreach ( $active_messengers as $name => $messenger ) {
143
+		foreach ($active_messengers as $name => $messenger) {
144 144
 			//first check if there are any active message types for this messenger.
145
-			$active_mts = $EEM_controller->get_active_message_types_per_messenger( $name );
146
-			if ( empty( $active_mts ) ) {
145
+			$active_mts = $EEM_controller->get_active_message_types_per_messenger($name);
146
+			if (empty($active_mts)) {
147 147
 				continue;
148 148
 			}
149 149
 
150
-			$tcont = $messenger->get_messenger_admin_page_content('events', 'edit', array('event' => $event_id) );
150
+			$tcont = $messenger->get_messenger_admin_page_content('events', 'edit', array('event' => $event_id));
151 151
 
152
-			if ( ! empty( $tcont ) ) {
152
+			if ( ! empty($tcont)) {
153 153
 				$tabs[$name] = $tcont;
154 154
 			}
155 155
 		}
156 156
 
157 157
 
158
-		EE_Registry::instance()->load_helper( 'Tabbed_Content' );
158
+		EE_Registry::instance()->load_helper('Tabbed_Content');
159 159
 		//we want this to be tabbed content so let's use the EEH_Tabbed_Content::display helper.
160 160
 		$tabbed_content = EEH_Tabbed_Content::display($tabs);
161
-		if ( is_wp_error($tabbed_content) ) {
161
+		if (is_wp_error($tabbed_content)) {
162 162
 			$tabbed_content = $tabbed_content->get_error_message();
163 163
 		}
164 164
 
165 165
 		$notices = '<div id="espresso-ajax-loading" class="ajax-loader-grey">
166
-				<span class="ee-spinner ee-spin"></span><span class="hidden">' . __('loading...', 'event_espresso') . '</span>
166
+				<span class="ee-spinner ee-spin"></span><span class="hidden">' . __('loading...', 'event_espresso').'</span>
167 167
 			</div><div class="ee-notices"></div>';
168 168
 
169
-		if ( defined('DOING_AJAX' ) ) {
169
+		if (defined('DOING_AJAX')) {
170 170
 			return $tabbed_content;
171 171
 		}
172 172
 
173
-		do_action( 'AHEE__espresso_events_Messages_Hooks_Extend__messages_metabox__before_content' );
174
-		echo $notices . '<div class="messages-tabs-content">' . $tabbed_content . '</div>';
175
-		do_action( 'AHEE__espresso_events_Messages_Hooks_Extend__messages_metabox__after_content' );
173
+		do_action('AHEE__espresso_events_Messages_Hooks_Extend__messages_metabox__before_content');
174
+		echo $notices.'<div class="messages-tabs-content">'.$tabbed_content.'</div>';
175
+		do_action('AHEE__espresso_events_Messages_Hooks_Extend__messages_metabox__after_content');
176 176
 
177 177
 	}
178 178
 
@@ -186,22 +186,22 @@  discard block
 block discarded – undo
186 186
 	 */
187 187
 	public function create_new_custom() {
188 188
 
189
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_edit_messages', 'create_new_custom_ajax' ) ) {
190
-			wp_die( __('You don\'t have privileges to do this action', 'event_espresso' ) );
189
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_edit_messages', 'create_new_custom_ajax')) {
190
+			wp_die(__('You don\'t have privileges to do this action', 'event_espresso'));
191 191
 		}
192 192
 
193 193
 		//let's clean up the _POST global a bit for downstream usage of name and description.
194
-		$_POST['templateName'] = !empty( $this->_req_data['custom_template_args']['MTP_name'] ) ? $this->_req_data['custom_template_args']['MTP_name'] : '';
195
-		$_POST['templateDescription'] = !empty( $this->_req_data['custom_template_args']['MTP_description'] ) ? $this->_req_data['custom_template_args']['MTP_description'] : '';
194
+		$_POST['templateName'] = ! empty($this->_req_data['custom_template_args']['MTP_name']) ? $this->_req_data['custom_template_args']['MTP_name'] : '';
195
+		$_POST['templateDescription'] = ! empty($this->_req_data['custom_template_args']['MTP_description']) ? $this->_req_data['custom_template_args']['MTP_description'] : '';
196 196
 
197 197
 
198 198
 		//set EE_Admin_Page object (see method details in EE_Admin_Hooks parent
199 199
 		$this->_set_page_object();
200 200
 
201 201
 		//is this a template switch if so EE_Admin_Page child needs this object
202
-		$this->_page_object->set_hook_object( $this );
202
+		$this->_page_object->set_hook_object($this);
203 203
 
204
-		$this->_page_object->add_message_template( $this->_req_data['messageType'], $this->_req_data['messenger'], $this->_req_data['group_ID'] );
204
+		$this->_page_object->add_message_template($this->_req_data['messageType'], $this->_req_data['messenger'], $this->_req_data['group_ID']);
205 205
 	}
206 206
 
207 207
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 * @return string (admin_footer contents)
217 217
 	 */
218 218
 	public function edit_admin_footer() {
219
-		$template_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/create_custom_template_form.template.php';
219
+		$template_path = EE_CORE_CAF_ADMIN_EXTEND.'messages/templates/create_custom_template_form.template.php';
220 220
 		EEH_Template::display_template($template_path, array());
221 221
 	}
222 222
 
Please login to merge, or discard this patch.
Extend_Registration_Form_Questions_Admin_List_Table.class.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -31,15 +31,15 @@  discard block
 block discarded – undo
31 31
 
32 32
 class Extend_Registration_Form_Questions_Admin_List_Table extends Registration_Form_Questions_Admin_List_Table {
33 33
 
34
-	public function __construct( $admin_page ) {
35
-		parent::__construct( $admin_page );
34
+	public function __construct($admin_page) {
35
+		parent::__construct($admin_page);
36 36
 	}
37 37
 
38 38
 	public function column_display_text(EE_Question $item) {
39 39
 		$system_question = $item->is_system_question();
40 40
 		$actions = array();
41 41
 
42
-		if ( !defined('REG_ADMIN_URL') )
42
+		if ( ! defined('REG_ADMIN_URL'))
43 43
 			define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
44 44
 
45 45
 		$edit_query_args = array(
@@ -67,35 +67,35 @@  discard block
 block discarded – undo
67 67
 				'QST_ID' => $item->ID()
68 68
 			);
69 69
 
70
-		$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_FORMS_ADMIN_URL );
71
-		$trash_link = EE_Admin_Page::add_query_args_and_nonce( $trash_query_args, EE_FORMS_ADMIN_URL );
72
-		$restore_link = EE_Admin_Page::add_query_args_and_nonce( $restore_query_args, EE_FORMS_ADMIN_URL );
73
-		$delete_link = EE_Admin_Page::add_query_args_and_nonce( $delete_query_args, EE_FORMS_ADMIN_URL );
74
-		$duplicate_link = EE_Admin_Page::add_query_args_and_nonce( $duplicate_query_args, EE_FORMS_ADMIN_URL );
70
+		$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_FORMS_ADMIN_URL);
71
+		$trash_link = EE_Admin_Page::add_query_args_and_nonce($trash_query_args, EE_FORMS_ADMIN_URL);
72
+		$restore_link = EE_Admin_Page::add_query_args_and_nonce($restore_query_args, EE_FORMS_ADMIN_URL);
73
+		$delete_link = EE_Admin_Page::add_query_args_and_nonce($delete_query_args, EE_FORMS_ADMIN_URL);
74
+		$duplicate_link = EE_Admin_Page::add_query_args_and_nonce($duplicate_query_args, EE_FORMS_ADMIN_URL);
75 75
 
76
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_question', 'espresso_registration_form_edit_question', $item->ID() ) ) {
76
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_question', 'espresso_registration_form_edit_question', $item->ID())) {
77 77
 			$actions = array(
78
-				'edit' => '<a href="' . $edit_link . '" title="' . __('Edit Question', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>'
78
+				'edit' => '<a href="'.$edit_link.'" title="'.__('Edit Question', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>'
79 79
 			);
80 80
 		}
81 81
 
82
-		if ( ! $system_question && $this->_view != 'trash' && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_question', 'espresso_registration_form_trash_question', $item->ID() ) ) {
83
-			$actions['delete'] = '<a href="' . $trash_link . '" title="' . __('Trash Question', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>';
82
+		if ( ! $system_question && $this->_view != 'trash' && EE_Registry::instance()->CAP->current_user_can('ee_delete_question', 'espresso_registration_form_trash_question', $item->ID())) {
83
+			$actions['delete'] = '<a href="'.$trash_link.'" title="'.__('Trash Question', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>';
84 84
 		}
85 85
 
86
-		if ( $this->_view == 'trash' ) {
87
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_question', 'espresso_registration_form_restore_question', $item->ID() ) ) {
88
-				$actions['restore'] = '<a href="' . $restore_link . '" title="' . __('Restore Question', 'event_espresso') . '">' . __('Restore', 'event_espresso') . '</a>';
86
+		if ($this->_view == 'trash') {
87
+			if (EE_Registry::instance()->CAP->current_user_can('ee_delete_question', 'espresso_registration_form_restore_question', $item->ID())) {
88
+				$actions['restore'] = '<a href="'.$restore_link.'" title="'.__('Restore Question', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>';
89 89
 			}
90
-			if ( $item->count_related('Answer') === 0 && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_question', 'espresso_registration_form_delete_questions', $item->ID() ) ) {
91
-				$actions['delete'] = '<a href="' . $delete_link . '" title="' . __('Delete Question Permanently', 'event_espresso') . '">' . __('Delete Permanently', 'event_espresso') . '</a>';
90
+			if ($item->count_related('Answer') === 0 && EE_Registry::instance()->CAP->current_user_can('ee_delete_question', 'espresso_registration_form_delete_questions', $item->ID())) {
91
+				$actions['delete'] = '<a href="'.$delete_link.'" title="'.__('Delete Question Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>';
92 92
 			}
93 93
 		}
94
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_questions', 'espresso_registration_form_edit_question' ) ) {
95
-			$actions[ 'duplicate' ] = '<a href="' . $duplicate_link . '" title="' . __('Duplicate Question', 'event_espresso') . '">' . __('Duplicate', 'event_espresso') . '</a>';
94
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_questions', 'espresso_registration_form_edit_question')) {
95
+			$actions['duplicate'] = '<a href="'.$duplicate_link.'" title="'.__('Duplicate Question', 'event_espresso').'">'.__('Duplicate', 'event_espresso').'</a>';
96 96
 		}
97 97
 
98
-		$content = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_question', 'espresso_registration_form_edit_question', $item->ID() ) ? '<strong><a class="row-title" href="' . $edit_link . '">' . $item->display_text() . '</a></strong>' : $item->display_text();
98
+		$content = EE_Registry::instance()->CAP->current_user_can('ee_edit_question', 'espresso_registration_form_edit_question', $item->ID()) ? '<strong><a class="row-title" href="'.$edit_link.'">'.$item->display_text().'</a></strong>' : $item->display_text();
99 99
 		$content .= $this->row_actions($actions);
100 100
 		return $content;
101 101
 	}
Please login to merge, or discard this patch.
Registration_Form_Question_Groups_Admin_List_Table.class.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 class Registration_Form_Question_Groups_Admin_List_Table extends EE_Admin_List_Table {
32 32
 
33 33
 
34
-	public function __construct( $admin_page ) {
34
+	public function __construct($admin_page) {
35 35
 		parent::__construct($admin_page);
36 36
 	}
37 37
 
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
 
41 41
 	protected function _setup_data() {
42
-		$this->_data = $this->_view != 'trash' ? $this->_admin_page->get_question_groups( $this->_per_page,$this->_current_page, FALSE ) : $this->_admin_page->get_trashed_question_groups( $this->_per_page,$this->_current_page, FALSE );
43
-		$this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_question_groups( $this->_per_page,$this->_current_page, TRUE ) : $this->_admin_page->get_trashed_question_groups( $this->_per_page,$this->_current_page, TRUE );
42
+		$this->_data = $this->_view != 'trash' ? $this->_admin_page->get_question_groups($this->_per_page, $this->_current_page, FALSE) : $this->_admin_page->get_trashed_question_groups($this->_per_page, $this->_current_page, FALSE);
43
+		$this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_question_groups($this->_per_page, $this->_current_page, TRUE) : $this->_admin_page->get_trashed_question_groups($this->_per_page, $this->_current_page, TRUE);
44 44
 	}
45 45
 
46 46
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 
50 50
 	protected function _set_properties() {
51 51
 		$this->_wp_list_args = array(
52
-			'singular' => __('question group', 'event_espresso' ),
53
-			'plural' => __('question groups', 'event_espresso' ),
52
+			'singular' => __('question group', 'event_espresso'),
53
+			'plural' => __('question groups', 'event_espresso'),
54 54
 			'ajax' => TRUE, //for now,
55 55
 			'screen' => $this->_admin_page->get_current_screen()->id
56 56
 			);
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 			);
66 66
 
67 67
 		$this->_sortable_columns = array(
68
-			'id' => array( 'QSG_ID' => FALSE ),
69
-			'name' => array( 'QSG_name' => FALSE )
68
+			'id' => array('QSG_ID' => FALSE),
69
+			'name' => array('QSG_name' => FALSE)
70 70
 			);
71 71
 
72 72
 		$this->_hidden_columns = array(
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
 
93 93
 
94 94
 	protected function _add_view_counts() {
95
-		$this->_views['all']['count'] = $this->_admin_page->get_question_groups( $this->_per_page,$this->_current_page, TRUE );
96
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_question_groups', 'espresso_registration_form_trash_question_group' ) ) {
97
-			$this->_views['trash']['count'] = $this->_admin_page->get_trashed_question_groups( $this->_per_page,$this->_current_page, TRUE );
95
+		$this->_views['all']['count'] = $this->_admin_page->get_question_groups($this->_per_page, $this->_current_page, TRUE);
96
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_question_groups', 'espresso_registration_form_trash_question_group')) {
97
+			$this->_views['trash']['count'] = $this->_admin_page->get_trashed_question_groups($this->_per_page, $this->_current_page, TRUE);
98 98
 		}
99 99
 	}
100 100
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		$system_group = $item->get('QSG_system');
108 108
 		$has_questions_with_answers = $item->has_questions_with_answers();
109 109
 		$lock_icon = $system_group === 0 && $this->_view == 'trash' && $has_questions_with_answers ? 'ee-lock-icon ee-alternate-color' : 'ee-lock-icon ee-system-lock';
110
-		return $system_group > 0 || ( $system_group === 0 && $this->_view == 'trash' && $has_questions_with_answers ) || ! EE_Registry::instance()->CAP->current_user_can( 'ee_delete_question_groups', 'espresso_registration_form_trash_question_groups' ) ? '<span class="' . $lock_icon . '"></span>'  . sprintf( '<input type="hidden" name="hdnchk[%1$d]" value="%1$d" />', $item->ID() )  : sprintf( '<input type="checkbox" id="QSG_ID[%1$d]" name="checkbox[%1$d]" value="%1$d" />', $item->ID() );
110
+		return $system_group > 0 || ($system_group === 0 && $this->_view == 'trash' && $has_questions_with_answers) || ! EE_Registry::instance()->CAP->current_user_can('ee_delete_question_groups', 'espresso_registration_form_trash_question_groups') ? '<span class="'.$lock_icon.'"></span>'.sprintf('<input type="hidden" name="hdnchk[%1$d]" value="%1$d" />', $item->ID()) : sprintf('<input type="checkbox" id="QSG_ID[%1$d]" name="checkbox[%1$d]" value="%1$d" />', $item->ID());
111 111
 	}
112 112
 
113 113
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 	public function column_id(EE_Question_Group $item) {
119 119
 		$content = $item->ID();
120
-		$content .= '  <span class="show-on-mobile-view-only">' .$item->name() . '</span>';
120
+		$content .= '  <span class="show-on-mobile-view-only">'.$item->name().'</span>';
121 121
 		return $content;
122 122
 	}
123 123
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		$actions = array();
128 128
 
129 129
 		//return $item->name();
130
-		if ( !defined('REG_ADMIN_URL') )
130
+		if ( ! defined('REG_ADMIN_URL'))
131 131
 			define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
132 132
 
133 133
 		$edit_query_args = array(
@@ -152,32 +152,32 @@  discard block
 block discarded – undo
152 152
 
153 153
 
154 154
 
155
-		$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_FORMS_ADMIN_URL );
156
-		$trash_link = EE_Admin_Page::add_query_args_and_nonce( $trash_query_args, EE_FORMS_ADMIN_URL );
157
-		$restore_link = EE_Admin_Page::add_query_args_and_nonce( $restore_query_args, EE_FORMS_ADMIN_URL );
158
-		$delete_link = EE_Admin_Page::add_query_args_and_nonce( $delete_query_args, EE_FORMS_ADMIN_URL );
155
+		$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_FORMS_ADMIN_URL);
156
+		$trash_link = EE_Admin_Page::add_query_args_and_nonce($trash_query_args, EE_FORMS_ADMIN_URL);
157
+		$restore_link = EE_Admin_Page::add_query_args_and_nonce($restore_query_args, EE_FORMS_ADMIN_URL);
158
+		$delete_link = EE_Admin_Page::add_query_args_and_nonce($delete_query_args, EE_FORMS_ADMIN_URL);
159 159
 
160
-		if (  EE_Registry::instance()->CAP->current_user_can( 'ee_edit_question_group', 'espresso_registration_form_edit_question_group', $item->ID() ) ) {
160
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_question_group', 'espresso_registration_form_edit_question_group', $item->ID())) {
161 161
 			$actions = array(
162
-				'edit' => '<a href="' . $edit_link . '" title="' . esc_attr__('Edit Question Group', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>'
162
+				'edit' => '<a href="'.$edit_link.'" title="'.esc_attr__('Edit Question Group', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>'
163 163
 			);
164 164
 		}
165
-		if ( $item->get('QSG_system') < 1 && $this->_view != 'trash' &&  EE_Registry::instance()->CAP->current_user_can( 'ee_delete_question_group', 'espresso_registration_form_trash_question_group', $item->ID() ) ) {
166
-			$actions['delete'] = '<a href="' . $trash_link . '" title="' . esc_attr__('Delete Question Group', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>';
165
+		if ($item->get('QSG_system') < 1 && $this->_view != 'trash' && EE_Registry::instance()->CAP->current_user_can('ee_delete_question_group', 'espresso_registration_form_trash_question_group', $item->ID())) {
166
+			$actions['delete'] = '<a href="'.$trash_link.'" title="'.esc_attr__('Delete Question Group', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>';
167 167
 		}
168 168
 
169
-		if ( $this->_view == 'trash' ) {
169
+		if ($this->_view == 'trash') {
170 170
 
171
-			if (  EE_Registry::instance()->CAP->current_user_can( 'ee_delete_question_group', 'espresso_registration_form_restore_question_group', $item->ID() ) ) {
172
-				$actions['restore'] = '<a href="' . $restore_link . '" title="' . esc_attr__('Restore Question Group', 'event_espresso') . '">' . __('Restore', 'event_espresso') . '</a>';
171
+			if (EE_Registry::instance()->CAP->current_user_can('ee_delete_question_group', 'espresso_registration_form_restore_question_group', $item->ID())) {
172
+				$actions['restore'] = '<a href="'.$restore_link.'" title="'.esc_attr__('Restore Question Group', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>';
173 173
 			}
174 174
 
175
-			if ( !$item->has_questions_with_answers() &&  EE_Registry::instance()->CAP->current_user_can( 'ee_delete_question_group', 'espresso_registration_form_delete_question_group', $item->ID() ) ) {
176
-				$actions['delete'] = '<a href="' . $delete_link . '" title="' . esc_attr__('Delete Question Group Permanently', 'event_espresso') . '">' . __('Delete Permanently', 'event_espresso') . '</a>';
175
+			if ( ! $item->has_questions_with_answers() && EE_Registry::instance()->CAP->current_user_can('ee_delete_question_group', 'espresso_registration_form_delete_question_group', $item->ID())) {
176
+				$actions['delete'] = '<a href="'.$delete_link.'" title="'.esc_attr__('Delete Question Group Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>';
177 177
 			}
178 178
 		}
179 179
 
180
-		$content =  EE_Registry::instance()->CAP->current_user_can( 'ee_edit_question_group', 'espresso_registration_form_edit_question_group', $item->ID() ) ? '<strong><a class="row-title" href="' . $edit_link . '">' . $item->name() . '</a></strong>' : $item->name();
180
+		$content = EE_Registry::instance()->CAP->current_user_can('ee_edit_question_group', 'espresso_registration_form_edit_question_group', $item->ID()) ? '<strong><a class="row-title" href="'.$edit_link.'">'.$item->name().'</a></strong>' : $item->name();
181 181
 		$content .= $this->row_actions($actions);
182 182
 		return $content;
183 183
 	}
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
 
199 199
 
200 200
 	public function column_show_group_name(EE_Question_Group $item) {
201
-		return $this->_yes_no[ $item->show_group_name() ];
201
+		return $this->_yes_no[$item->show_group_name()];
202 202
 	}
203 203
 
204 204
 
205 205
 
206 206
 	public function column_show_group_desc(EE_Question_Group $item) {
207
-		return $this->_yes_no[ $item->show_group_desc() ];
207
+		return $this->_yes_no[$item->show_group_desc()];
208 208
 	}
209 209
 
210 210
 
Please login to merge, or discard this patch.
registration_form/espresso_events_Registration_Form_Hooks_Extend.class.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 class espresso_events_Registration_Form_Hooks_Extend extends espresso_events_Registration_Form_Hooks {
31 31
 
32 32
 
33
-	public function __construct( EE_Admin_Page $admin_page ) {
33
+	public function __construct(EE_Admin_Page $admin_page) {
34 34
 		parent::__construct($admin_page);
35 35
 	}
36 36
 
@@ -54,31 +54,31 @@  discard block
 block discarded – undo
54 54
 				)
55 55
 			);
56 56
 
57
-		$this->_metaboxes = array_merge( $this->_metaboxes, $new_metaboxes);
57
+		$this->_metaboxes = array_merge($this->_metaboxes, $new_metaboxes);
58 58
 	}
59 59
 
60 60
 
61 61
 
62 62
 
63
-	public function modify_callbacks( $callbacks ) {
64
-		$callbacks = parent::modify_callbacks( $callbacks );
65
-		$callbacks[] = array( $this, 'additional_question_group_update' );
63
+	public function modify_callbacks($callbacks) {
64
+		$callbacks = parent::modify_callbacks($callbacks);
65
+		$callbacks[] = array($this, 'additional_question_group_update');
66 66
 		return $callbacks;
67 67
 	}
68 68
 
69 69
 
70 70
 
71
-	public function restore_revision( $post_id, $revision_id ) {
72
-		$post_evt = parent::restore_revision( $post_id, $revision_id );
71
+	public function restore_revision($post_id, $revision_id) {
72
+		$post_evt = parent::restore_revision($post_id, $revision_id);
73 73
 
74 74
 		//restore revision for additional questions
75
-		$post_evt->restore_revision( $revision_id, array('Question_Group'), array('Question_Group' => array('Event_Question_Group.EQG_primary' => 0 ) ) );
75
+		$post_evt->restore_revision($revision_id, array('Question_Group'), array('Question_Group' => array('Event_Question_Group.EQG_primary' => 0)));
76 76
 	}
77 77
 
78 78
 
79 79
 
80 80
 
81
-	public function additional_questions( $post_id, $post ) {
81
+	public function additional_questions($post_id, $post) {
82 82
 		$this->_event = $this->_adminpage_obj->get_event_object();
83 83
 		$event_id = $this->_event->ID();
84 84
 		?>
@@ -95,32 +95,32 @@  discard block
 block discarded – undo
95 95
 			<?php
96 96
 
97 97
 			$qsg_where['QSG_deleted'] = FALSE;
98
-			$query_params = array( $qsg_where, 'order_by' => array( 'QSG_order' => 'ASC' ) );
99
-			$QSGs = EEM_Question_Group::instance()->get_all( $query_params );
100
-			$EQGs = !empty( $event_id ) ? $this->_event->get_many_related('Question_Group', array(array('Event_Question_Group.EQG_primary' => 0 )) ) : array();
98
+			$query_params = array($qsg_where, 'order_by' => array('QSG_order' => 'ASC'));
99
+			$QSGs = EEM_Question_Group::instance()->get_all($query_params);
100
+			$EQGs = ! empty($event_id) ? $this->_event->get_many_related('Question_Group', array(array('Event_Question_Group.EQG_primary' => 0))) : array();
101 101
 			$EQGids = array_keys($EQGs);
102 102
 
103
-			if ( ! empty( $QSGs )) {
104
- 				$html = count( $QSGs ) > 10 ? '<div style="height:250px;overflow:auto;">' : '';
105
-				foreach ( $QSGs as $QSG ) {
103
+			if ( ! empty($QSGs)) {
104
+ 				$html = count($QSGs) > 10 ? '<div style="height:250px;overflow:auto;">' : '';
105
+				foreach ($QSGs as $QSG) {
106 106
 
107
-					$checked = in_array( $QSG->ID(), $EQGids ) ? ' checked="checked" ' : '';
108
-					$edit_link = $this->_adminpage_obj->add_query_args_and_nonce( array( 'action' => 'edit_question_group', 'QSG_ID' => $QSG->ID() ), EE_FORMS_ADMIN_URL );
107
+					$checked = in_array($QSG->ID(), $EQGids) ? ' checked="checked" ' : '';
108
+					$edit_link = $this->_adminpage_obj->add_query_args_and_nonce(array('action' => 'edit_question_group', 'QSG_ID' => $QSG->ID()), EE_FORMS_ADMIN_URL);
109 109
 
110 110
 					$html .= '
111
-					<p id="event-question-group-' . $QSG->ID() . '">
112
-						<input value="' . $QSG->ID() . '" type="checkbox" name="add_attendee_question_groups[' . $QSG->ID() . ']"' . $checked . ' />
113
-						<a href="' . $edit_link . '" title="' . sprintf( esc_attr__( 'Edit %s Group', 'event_espresso' ),  $QSG->get('QSG_name') ) . '" target="_blank">' . $QSG->get('QSG_name') . '</a>
111
+					<p id="event-question-group-' . $QSG->ID().'">
112
+						<input value="' . $QSG->ID().'" type="checkbox" name="add_attendee_question_groups['.$QSG->ID().']"'.$checked.' />
113
+						<a href="' . $edit_link.'" title="'.sprintf(esc_attr__('Edit %s Group', 'event_espresso'), $QSG->get('QSG_name')).'" target="_blank">'.$QSG->get('QSG_name').'</a>
114 114
 					</p>';
115 115
 				}
116
-				$html .= count( $QSGs ) > 10 ? '</div>' : '';
116
+				$html .= count($QSGs) > 10 ? '</div>' : '';
117 117
 
118 118
 				echo $html;
119 119
 
120 120
 			} else {
121 121
 				echo __('There seems to be a problem with your questions. Please contact [email protected]', 'event_espresso');
122 122
 			}
123
-			do_action( 'AHEE__espresso_events_Registration_Form_Hooks__additional_questions__after_content' );
123
+			do_action('AHEE__espresso_events_Registration_Form_Hooks__additional_questions__after_content');
124 124
 			?>
125 125
 		</div>
126 126
 		<?php
@@ -130,31 +130,31 @@  discard block
 block discarded – undo
130 130
 
131 131
 
132 132
 
133
-	public function additional_question_group_update( $evtobj, $data ) {
134
-		$question_groups = !empty( $data['add_attendee_question_groups'] ) ? (array) $data['add_attendee_question_groups'] : array();
133
+	public function additional_question_group_update($evtobj, $data) {
134
+		$question_groups = ! empty($data['add_attendee_question_groups']) ? (array) $data['add_attendee_question_groups'] : array();
135 135
 		$added_qgs = array_keys($question_groups);
136 136
 		$success = array();
137 137
 
138 138
 		//let's get all current question groups associated with this event.
139
-		$current_qgs = $evtobj->get_many_related('Question_Group', array(array('Event_Question_Group.EQG_primary' => 0) ) );
139
+		$current_qgs = $evtobj->get_many_related('Question_Group', array(array('Event_Question_Group.EQG_primary' => 0)));
140 140
 		$current_qgs = array_keys($current_qgs); //we just want the ids
141 141
 
142 142
 		//now let's get the groups selected in the editor and update (IF we have data)
143
-		if ( !empty( $question_groups ) ) {
144
-			foreach ( $question_groups as $id => $val ) {
143
+		if ( ! empty($question_groups)) {
144
+			foreach ($question_groups as $id => $val) {
145 145
 				//add to event
146
-				if ( $val )
147
-					$qg = $evtobj->_add_relation_to( $id, 'Question_Group', array('EQG_primary' => 0) );
148
-				$success[] = !empty($qg) ? 1 : 0;
146
+				if ($val)
147
+					$qg = $evtobj->_add_relation_to($id, 'Question_Group', array('EQG_primary' => 0));
148
+				$success[] = ! empty($qg) ? 1 : 0;
149 149
 			}
150 150
 		}
151 151
 
152 152
 		//wait a minute... are there question groups missing in the saved groups that ARE with the current event?
153
-		$removed_qgs = array_diff( $current_qgs, $added_qgs );
153
+		$removed_qgs = array_diff($current_qgs, $added_qgs);
154 154
 
155
-		foreach ( $removed_qgs as $qgid ) {
156
-			$qg = $evtobj->_remove_relation_to( $qgid, 'Question_Group', array('EQG_primary' => 0 ) );
157
-			$success[] = !empty($qg) ? 1 : 0;
155
+		foreach ($removed_qgs as $qgid) {
156
+			$qg = $evtobj->_remove_relation_to($qgid, 'Question_Group', array('EQG_primary' => 0));
157
+			$success[] = ! empty($qg) ? 1 : 0;
158 158
 		}
159 159
 
160 160
 
Please login to merge, or discard this patch.
registration_form/templates/question_groups_main_meta_box.template.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
 assert($question_group);
10 10
 assert($question_group instanceof EE_Question_Group);
11 11
 /* @var EE_Question[] $all_questions */
12
-assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions)));//list of unused questions
13
-foreach($all_questions as $unused_question){
12
+assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions))); //list of unused questions
13
+foreach ($all_questions as $unused_question) {
14 14
 	assert($unused_question);
15 15
 	assert($unused_question instanceof EE_Question);
16 16
 }
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 
20 20
 $QSG_system = $question_group->system_group();
21 21
 
22
-$disabled = ! empty( $QSG_system ) ? ' disabled="disabled"' : '';
23
-$id =  ! empty( $QST_system ) ? '_disabled' : '';
22
+$disabled = ! empty($QSG_system) ? ' disabled="disabled"' : '';
23
+$id = ! empty($QST_system) ? '_disabled' : '';
24 24
 ?>
25 25
 
26 26
 <div id="group-details" class="edit-group padding">
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 			<tr>
31 31
 				<th>
32 32
 					<label for="QSG_name">
33
-						<?php _e('Group Name','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_name_info');?>
33
+						<?php _e('Group Name', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_name_info'); ?>
34 34
 					</label>
35 35
 				</th>
36 36
 				<td>
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 			<tr>
43 43
 				<th>
44 44
 					<label for="QSG_identifier">
45
-						<?php _e('Group Identifier','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_identifier_info');?>
45
+						<?php _e('Group Identifier', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_identifier_info'); ?>
46 46
 					</label>
47 47
 				</th>
48 48
 				<td>
49 49
 					<input id="QSG_identifier" name="QSG_identifier<?php echo $id; ?>" value="<?php echo $question_group->identifier()?>" type="text" class="regular-text"<?php echo $disabled; ?>>
50
-					<?php if ( ! empty( $QSG_system )) { ?>
50
+					<?php if ( ! empty($QSG_system)) { ?>
51 51
 					<p><span class="description" style="color:#D54E21;">
52
-							<?php _e('System question group! This field cannot be changed.','event_espresso')?>
52
+							<?php _e('System question group! This field cannot be changed.', 'event_espresso')?>
53 53
 					</span><br/></p>
54 54
 					<?php } ?>
55 55
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			<tr>
59 59
 				<th>
60 60
 					<label for="QSG_desc">
61
-						<?php _e('Description','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_description_info');?>
61
+						<?php _e('Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_description_info'); ?>
62 62
 					</label>
63 63
 				</th>
64 64
 				<td>
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			<tr>
70 70
 				<th>
71 71
 					<label for="QSG_order">
72
-						<?php _e('Question Group Order','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_order_info');?>
72
+						<?php _e('Question Group Order', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_order_info'); ?>
73 73
 					</label>
74 74
 				</th>
75 75
 				<td>
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
 			<tr>
81 81
 				<th>
82 82
 					<label>
83
-						<?php _e('Show Name','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('show_group_name_info');?>
83
+						<?php _e('Show Name', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('show_group_name_info'); ?>
84 84
 					</label>
85 85
 				</th>
86 86
 				<td>
87 87
 					<label for="QSG_show_group_name">
88
-                        <?php echo EEH_Form_Fields::select_input( 'QSG_show_group_name', $values, $question_group->show_group_name() ); ?>
89
-						<p class="description"><?php _e('Show Group Name on Registration Page?','event_espresso');?></p>
88
+                        <?php echo EEH_Form_Fields::select_input('QSG_show_group_name', $values, $question_group->show_group_name()); ?>
89
+						<p class="description"><?php _e('Show Group Name on Registration Page?', 'event_espresso'); ?></p>
90 90
 					</label>
91 91
 				</td>
92 92
 			</tr>
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
 			<tr>
95 95
 				<th>
96 96
 					<label>
97
-						<?php _e(' Show Description','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('show_group_description_info');?>
97
+						<?php _e(' Show Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('show_group_description_info'); ?>
98 98
 					</label>
99 99
 				</th>
100 100
 				<td>
101 101
                     <label for="QSG_show_group_order">
102
-                        <?php echo EEH_Form_Fields::select_input( 'QSG_show_group_desc', $values, $question_group->show_group_desc() ); ?>
103
-                        <p class="description"><?php _e(' Show Group Description on Registration Page?','event_espresso');?></p>
102
+                        <?php echo EEH_Form_Fields::select_input('QSG_show_group_desc', $values, $question_group->show_group_desc()); ?>
103
+                        <p class="description"><?php _e(' Show Group Description on Registration Page?', 'event_espresso'); ?></p>
104 104
 					</label>
105 105
                     <input type="hidden" name="QSG_system" value="<?php echo $question_group->system_group(); ?>">
106 106
                 </td>
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 </div>
112 112
 
113 113
 <div id="group-questions" class="edit-group padding question-group-questions-container postbox">
114
-    <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'event_espresso' ); ?>"><br></div>
115
-    <h2 class="handle"><?php _e('Questions','event_espresso');?></h2>
114
+    <div class="handlediv" title="<?php esc_attr_e('Click to toggle', 'event_espresso'); ?>"><br></div>
115
+    <h2 class="handle"><?php _e('Questions', 'event_espresso'); ?></h2>
116 116
 	<div class="form-table question-group-questions inside">
117 117
         <div class="padding">
118 118
             <p><span class="description"><?php _e('Select which questions should be shown in this group by checking or unchecking boxes. You can drag and drop questions to reorder them. Your changes will be updated when you save.', 'event_espresso'); ?></span></p>
@@ -121,26 +121,26 @@  discard block
 block discarded – undo
121 121
                     <?php
122 122
 					$question_order = 0;
123 123
 					$question_group_questions = $question_group->questions();
124
-                    foreach( $all_questions as $question_ID => $question ){
125
-						if ( $question instanceof EE_Question ) {
124
+                    foreach ($all_questions as $question_ID => $question) {
125
+						if ($question instanceof EE_Question) {
126 126
 							/*@var $question EE_Question*/
127
-							$checked = isset( $question_group_questions[ $question_ID ] ) ? ' checked="checked"' : '';
127
+							$checked = isset($question_group_questions[$question_ID]) ? ' checked="checked"' : '';
128 128
 							// disable questions from the personal information question group
129 129
 							// is it required in the current question group? if so don't allow admins to remove it
130
-							$disabled = in_array( $question->system_ID(), EEM_Question::instance()->required_system_questions_in_system_question_group( $QSG_system ) ) ? 'disabled="disabled"' : '';
130
+							$disabled = in_array($question->system_ID(), EEM_Question::instance()->required_system_questions_in_system_question_group($QSG_system)) ? 'disabled="disabled"' : '';
131 131
 							//limit where system questions can appear
132 132
 							if (
133 133
 								$question->system_ID() &&
134
-								! in_array( $question->system_ID(), EEM_Question::instance()->allowed_system_questions_in_system_question_group( $QSG_system ) )
134
+								! in_array($question->system_ID(), EEM_Question::instance()->allowed_system_questions_in_system_question_group($QSG_system))
135 135
 							) {
136 136
 								continue; //skip over system question not assigned to this group except for the address system group cause we want the address questions to display even if they aren't selected (but still not show the personal system questions).  The third condition checks if we're displaying a non system question group and the question is a system question, then we skip because for non-system question groups we only want to show non-system questions.
137 137
 							}
138 138
 						?>
139 139
                     <li class="ee-question-sortable">
140 140
                         <label for="question-<?php echo $question_ID?>">
141
-                            <input type="checkbox" name="questions[<?php echo $question_ID;?>]" id="question-<?php echo $question_ID; ?>" value="<?php echo $question_ID;?>"<?php echo $disabled; ?><?php echo $checked; ?>/>
141
+                            <input type="checkbox" name="questions[<?php echo $question_ID; ?>]" id="question-<?php echo $question_ID; ?>" value="<?php echo $question_ID; ?>"<?php echo $disabled; ?><?php echo $checked; ?>/>
142 142
                             <span class="question-text">
143
-								<?php echo trim( $question->display_text() ) . ( 95 <= strlen( trim( $question->display_text() ) ) ? "&hellip;" : '' ); ?>
143
+								<?php echo trim($question->display_text()).(95 <= strlen(trim($question->display_text())) ? "&hellip;" : ''); ?>
144 144
 							</span>
145 145
                             <input class="question-group-QGQ_order" type="hidden" name="question_orders[<?php echo $question_ID; ?>]" value="<?php echo $question_order; ?>">
146 146
                         </label>
Please login to merge, or discard this patch.