Completed
Branch fix/kses-7 (2ed150)
by
unknown
19:35 queued 17:32
created
modules/ticket_selector/templates/ticket_details.template.php 2 patches
Indentation   +122 added lines, -122 removed lines patch added patch discarded remove patch
@@ -21,28 +21,28 @@  discard block
 block discarded – undo
21 21
 use EventEspresso\modules\ticket_selector\TicketDetails;
22 22
 
23 23
 $event_date_label = apply_filters(
24
-    'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date',
25
-    esc_html__('Event Date ', 'event_espresso')
24
+	'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date',
25
+	esc_html__('Event Date ', 'event_espresso')
26 26
 );
27 27
 
28 28
 $sold_label = apply_filters(
29
-    'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold',
30
-    esc_html__('Sold', 'event_espresso')
29
+	'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold',
30
+	esc_html__('Sold', 'event_espresso')
31 31
 );
32 32
 
33 33
 $remaining_label = apply_filters(
34
-    'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left',
35
-    esc_html__('Remaining', 'event_espresso')
34
+	'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left',
35
+	esc_html__('Remaining', 'event_espresso')
36 36
 );
37 37
 
38 38
 $total_sold_label = apply_filters(
39
-    'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold',
40
-    esc_html__('Total Sold', 'event_espresso')
39
+	'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold',
40
+	esc_html__('Total Sold', 'event_espresso')
41 41
 );
42 42
 
43 43
 $spaces_left_label = apply_filters(
44
-    'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left',
45
-    esc_html__('Total Spaces Left', 'event_espresso')
44
+	'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left',
45
+	esc_html__('Total Spaces Left', 'event_espresso')
46 46
 );
47 47
 
48 48
 ?>
@@ -56,32 +56,32 @@  discard block
 block discarded – undo
56 56
                     <p><?php echo wp_kses($ticket->description(), AllowedTags::getAllowedTags()); ?></p>
57 57
 
58 58
                     <?php
59
-                    do_action(
60
-                        'AHEE__ticket_selector_chart_template__ticket_details__after_description',
61
-                        $ticket,
62
-                        $ticket_price,
63
-                        $display_ticket_price
64
-                    );
65
-                    ?>
59
+					do_action(
60
+						'AHEE__ticket_selector_chart_template__ticket_details__after_description',
61
+						$ticket,
62
+						$ticket_price,
63
+						$display_ticket_price
64
+					);
65
+					?>
66 66
                     <section class="tckt-slctr-tkt-sale-dates-sctn">
67 67
                         <h5>
68 68
                             <?php echo apply_filters(
69
-                                'FHEE__ticket_selector_chart_template__ticket_details_sales_date_heading',
70
-                                esc_html__('Sale Dates', 'event_espresso')
71
-                            ); ?>
69
+								'FHEE__ticket_selector_chart_template__ticket_details_sales_date_heading',
70
+								esc_html__('Sale Dates', 'event_espresso')
71
+							); ?>
72 72
                         </h5>
73 73
                         <span class="drk-grey-text small-text no-bold"> -
74 74
                             <?php echo apply_filters(
75
-                                'FHEE__ticket_selector_chart_template__ticket_details_dates_available_message',
76
-                                esc_html__('The dates when this option is available for purchase.', 'event_espresso')
77
-                            ); ?>
75
+								'FHEE__ticket_selector_chart_template__ticket_details_dates_available_message',
76
+								esc_html__('The dates when this option is available for purchase.', 'event_espresso')
77
+							); ?>
78 78
                         </span>
79 79
                         <br />
80 80
                         <span class="ticket-details-label-spn drk-grey-text">
81 81
                             <?php echo apply_filters(
82
-                                'FHEE__ticket_selector_chart_template__ticket_details_goes_on_sale',
83
-                                esc_html__('Goes On Sale:', 'event_espresso')
84
-                            ); ?>
82
+								'FHEE__ticket_selector_chart_template__ticket_details_goes_on_sale',
83
+								esc_html__('Goes On Sale:', 'event_espresso')
84
+							); ?>
85 85
                         </span>
86 86
                         <span class="dashicons dashicons-calendar"></span>
87 87
                         <?php echo esc_html($ticket->get_i18n_datetime('TKT_start_date', $date_format)) . ' &nbsp; '; ?>
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
                         <br />
91 91
                         <span class="ticket-details-label-spn drk-grey-text">
92 92
                             <?php echo apply_filters(
93
-                                'FHEE__ticket_selector_chart_template__ticket_details_sales_end',
94
-                                esc_html__('Sales End:', 'event_espresso')
95
-                            ); ?>
93
+								'FHEE__ticket_selector_chart_template__ticket_details_sales_end',
94
+								esc_html__('Sales End:', 'event_espresso')
95
+							); ?>
96 96
                         </span>
97 97
                         <span class="dashicons dashicons-calendar"></span>
98 98
                         <?php echo esc_html($ticket->get_i18n_datetime('TKT_end_date', $date_format)) . ' &nbsp; '; ?>
@@ -108,53 +108,53 @@  discard block
 block discarded – undo
108 108
                         <section class="tckt-slctr-tkt-quantities-sctn">
109 109
                             <h5>
110 110
                                 <?php echo apply_filters(
111
-                                    'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_heading',
112
-                                    esc_html__('Purchasable Quantities', 'event_espresso')
113
-                                ); ?>
111
+									'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_heading',
112
+									esc_html__('Purchasable Quantities', 'event_espresso')
113
+								); ?>
114 114
                             </h5>
115 115
                             <span class="drk-grey-text small-text no-bold"> -
116 116
                                 <?php echo apply_filters(
117
-                                    'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_message',
118
-                                    esc_html__(
119
-                                        'The number of tickets that can be purchased per transaction (if available).',
120
-                                        'event_espresso'
121
-                                    )
122
-                                ); ?>
117
+									'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_message',
118
+									esc_html__(
119
+										'The number of tickets that can be purchased per transaction (if available).',
120
+										'event_espresso'
121
+									)
122
+								); ?>
123 123
                             </span>
124 124
                             <br />
125 125
                             <span class="ticket-details-label-spn drk-grey-text">
126 126
                                 <?php echo apply_filters(
127
-                                    'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty',
128
-                                    esc_html__('Minimum Qty:', 'event_espresso')
129
-                                ); ?>
127
+									'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty',
128
+									esc_html__('Minimum Qty:', 'event_espresso')
129
+								); ?>
130 130
                             </span>
131 131
                             <?php
132
-                            echo ($ticket->min() > 0 ? $ticket->min() : 0);
132
+							echo ($ticket->min() > 0 ? $ticket->min() : 0);
133 133
 
134
-                            if ($ticket->min() > $remaining) {
135
-                                ?> &nbsp;
134
+							if ($ticket->min() > $remaining) {
135
+								?> &nbsp;
136 136
                                 <span class="important-notice small-text">
137 137
                                 <?php echo apply_filters(
138
-                                    'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty_message',
139
-                                    esc_html__(
140
-                                        'The Minimum Quantity purchasable for this ticket exceeds the number of spaces remaining',
141
-                                        'event_espresso'
142
-                                    )
143
-                                ); ?>
138
+									'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty_message',
139
+									esc_html__(
140
+										'The Minimum Quantity purchasable for this ticket exceeds the number of spaces remaining',
141
+										'event_espresso'
142
+									)
143
+								); ?>
144 144
                                 </span>
145 145
                             <?php } ?>
146 146
                             <br />
147 147
                             <?php // $max = min( $max, $max_atndz );?>
148 148
                             <span class="ticket-details-label-spn drk-grey-text">
149 149
                                 <?php echo apply_filters(
150
-                                    'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_max_qty',
151
-                                    esc_html__('Maximum Qty:', 'event_espresso')
152
-                                ); ?>
150
+									'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_max_qty',
151
+									esc_html__('Maximum Qty:', 'event_espresso')
152
+								); ?>
153 153
                             </span>
154 154
                             <?php echo ($ticket->max() === EE_INF
155
-                                ? esc_html__('no limit', 'event_espresso')
156
-                                : max($ticket->max(), 1));
157
-                            ?>
155
+								? esc_html__('no limit', 'event_espresso')
156
+								: max($ticket->max(), 1));
157
+							?>
158 158
                             <br />
159 159
                         </section>
160 160
                         <br />
@@ -164,31 +164,31 @@  discard block
 block discarded – undo
164 164
                         <section class="tckt-slctr-tkt-uses-sctn">
165 165
                             <h5>
166 166
                                 <?php echo apply_filters(
167
-                                    'FHEE__ticket_selector_chart_template__ticket_details_event_date_ticket_uses_heading',
168
-                                    esc_html__('Event Date Ticket Uses', 'event_espresso')
169
-                                ); ?>
167
+									'FHEE__ticket_selector_chart_template__ticket_details_event_date_ticket_uses_heading',
168
+									esc_html__('Event Date Ticket Uses', 'event_espresso')
169
+								); ?>
170 170
                             </h5>
171 171
                             <span class="drk-grey-text small-text no-bold"> -
172 172
                                 <?php echo apply_filters(
173
-                                    'FHEE__ticket_selector_chart_template__ticket_details_event_date_ticket_uses_message',
174
-                                    sprintf(
175
-                                        esc_html__(
176
-                                            'The number of separate event datetimes (see table below) that this ticket can be used to gain admittance to.%1$s%2$sAdmission is always one person per ticket.%3$s',
177
-                                            'event_espresso'
178
-                                        ),
179
-                                        '<br/>',
180
-                                        '<strong>',
181
-                                        '</strong>'
182
-                                    )
183
-                                );
184
-                                ?>
173
+									'FHEE__ticket_selector_chart_template__ticket_details_event_date_ticket_uses_message',
174
+									sprintf(
175
+										esc_html__(
176
+											'The number of separate event datetimes (see table below) that this ticket can be used to gain admittance to.%1$s%2$sAdmission is always one person per ticket.%3$s',
177
+											'event_espresso'
178
+										),
179
+										'<br/>',
180
+										'<strong>',
181
+										'</strong>'
182
+									)
183
+								);
184
+								?>
185 185
                             </span>
186 186
                             <br />
187 187
                             <span class="ticket-details-label-spn drk-grey-text">
188 188
                                 <?php echo apply_filters(
189
-                                    'FHEE__ticket_selector_chart_template__ticket_details_event_date_number_datetimes',
190
-                                    esc_html__('# Datetimes:', 'event_espresso')
191
-                                ); ?>
189
+									'FHEE__ticket_selector_chart_template__ticket_details_event_date_number_datetimes',
190
+									esc_html__('# Datetimes:', 'event_espresso')
191
+								); ?>
192 192
                             </span>
193 193
                             <?php echo wp_kses($ticket->uses(), AllowedTags::getAllowedTags()); ?>
194 194
                             <br />
@@ -196,24 +196,24 @@  discard block
 block discarded – undo
196 196
                     <?php } ?>
197 197
 
198 198
                     <?php
199
-                    $datetimes          = $ticket->datetimes_ordered($event_is_expired, false);
200
-                    $chart_column_width = $show_ticket_sale_columns ? ' ee-fourth-width' : ' ee-half-width';
201
-                    if (! empty($datetimes)) { ?>
199
+					$datetimes          = $ticket->datetimes_ordered($event_is_expired, false);
200
+					$chart_column_width = $show_ticket_sale_columns ? ' ee-fourth-width' : ' ee-half-width';
201
+					if (! empty($datetimes)) { ?>
202 202
                         <section class="tckt-slctr-tkt-datetimes-sctn">
203 203
                             <h5>
204 204
                                 <?php echo apply_filters(
205
-                                    'FHEE__ticket_selector_chart_template__ticket_details_event_access_heading',
206
-                                    esc_html__('Access', 'event_espresso')
207
-                                ); ?>
205
+									'FHEE__ticket_selector_chart_template__ticket_details_event_access_heading',
206
+									esc_html__('Access', 'event_espresso')
207
+								); ?>
208 208
                             </h5>
209 209
                             <span class="drk-grey-text small-text no-bold"> -
210 210
                                 <?php echo apply_filters(
211
-                                    'FHEE__ticket_selector_chart_template__ticket_details_event_access_message',
212
-                                    esc_html__(
213
-                                        'This option allows access to the following dates and times.',
214
-                                        'event_espresso'
215
-                                    )
216
-                                ); ?>
211
+									'FHEE__ticket_selector_chart_template__ticket_details_event_access_message',
212
+									esc_html__(
213
+										'This option allows access to the following dates and times.',
214
+										'event_espresso'
215
+									)
216
+								); ?>
217 217
                             </span>
218 218
                         <div class="tckt-slctr-tkt-details-tbl-wrap-dv">
219 219
                             <table class="tckt-slctr-tkt-details-tbl">
@@ -223,9 +223,9 @@  discard block
 block discarded – undo
223 223
                                             <span class="dashicons dashicons-calendar"></span>
224 224
                                             <span class="small-text">
225 225
                                             <?php echo apply_filters(
226
-                                                'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date',
227
-                                                esc_html__('Date ', 'event_espresso')
228
-                                            ); ?>
226
+												'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date',
227
+												esc_html__('Date ', 'event_espresso')
228
+											); ?>
229 229
                                         </span>
230 230
                                         </th>
231 231
                                         <th class="tckt-slctr-tkt-details-time-th <?php echo esc_attr($chart_column_width); ?>">
@@ -238,33 +238,33 @@  discard block
 block discarded – undo
238 238
                                         <th class="tckt-slctr-tkt-details-this-ticket-sold-th ee-fourth-width cntr">
239 239
                                             <span class="smaller-text">
240 240
                                                 <?php echo apply_filters(
241
-                                                    'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold',
242
-                                                    sprintf(esc_html__('Sold', 'event_espresso'), '<br/>')
243
-                                                ); ?>
241
+													'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold',
242
+													sprintf(esc_html__('Sold', 'event_espresso'), '<br/>')
243
+												); ?>
244 244
                                             </span>
245 245
                                         </th>
246 246
                                         <th class="tckt-slctr-tkt-details-this-ticket-left-th ee-fourth-width cntr">
247 247
                                             <span class="smaller-text">
248 248
                                                 <?php echo apply_filters(
249
-                                                    'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left',
250
-                                                    sprintf(esc_html__('Remaining', 'event_espresso'), '<br/>')
251
-                                                ); ?>
249
+													'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left',
250
+													sprintf(esc_html__('Remaining', 'event_espresso'), '<br/>')
251
+												); ?>
252 252
                                             </span>
253 253
                                         </th>
254 254
                                         <th class="tckt-slctr-tkt-details-total-tickets-sold-th ee-fourth-width cntr">
255 255
                                             <span class="smaller-text">
256 256
                                                 <?php echo apply_filters(
257
-                                                    'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold',
258
-                                                    sprintf(esc_html__('Total%sSold', 'event_espresso'), '<br/>')
259
-                                                ); ?>
257
+													'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold',
258
+													sprintf(esc_html__('Total%sSold', 'event_espresso'), '<br/>')
259
+												); ?>
260 260
                                             </span>
261 261
                                         </th>
262 262
                                         <th class="tckt-slctr-tkt-details-total-tickets-left-th ee-fourth-width cntr">
263 263
                                             <span class="smaller-text">
264 264
                                                 <?php echo apply_filters(
265
-                                                    'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left',
266
-                                                    sprintf(esc_html__('Total Spaces%sLeft', 'event_espresso'), '<br/>')
267
-                                                ); ?>
265
+													'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left',
266
+													sprintf(esc_html__('Total Spaces%sLeft', 'event_espresso'), '<br/>')
267
+												); ?>
268 268
                                             </span>
269 269
                                         </th>
270 270
                                         <?php endif; // end $show_ticket_sale_columns conditional ?>
@@ -272,25 +272,25 @@  discard block
 block discarded – undo
272 272
                                 </thead>
273 273
                                 <tbody>
274 274
                                 <?php foreach ($datetimes as $datetime) {
275
-                                    if ($datetime instanceof EE_Datetime) { ?>
275
+									if ($datetime instanceof EE_Datetime) { ?>
276 276
                                     <tr>
277 277
                                         <td data-th="<?php echo esc_attr($event_date_label); ?>" class="small-text">
278 278
                                             <?php $datetime_name = $datetime->name(); ?>
279 279
                                             <?php echo ! empty($datetime_name)
280
-                                            ? '<b>' . esc_html($datetime_name) . '</b><br/>'
281
-                                            : ''; ?>
280
+											? '<b>' . esc_html($datetime_name) . '</b><br/>'
281
+											: ''; ?>
282 282
                                             <?php echo esc_html($datetime->date_range(
283
-                                                $date_format,
284
-                                                esc_html__(' to  ', 'event_espresso')
285
-                                            )); ?>
283
+												$date_format,
284
+												esc_html__(' to  ', 'event_espresso')
285
+											)); ?>
286 286
                                         </td>
287 287
                                         <td data-th="<?php esc_html_e('Time ', 'event_espresso'); ?>"
288 288
                                             class="cntr small-text"
289 289
                                         >
290 290
                                             <?php echo esc_html($datetime->time_range(
291
-                                                $time_format,
292
-                                                esc_html__(' to  ', 'event_espresso')
293
-                                            )); ?>
291
+												$time_format,
292
+												esc_html__(' to  ', 'event_espresso')
293
+											)); ?>
294 294
                                         </td>
295 295
                                         <?php if ($show_ticket_sale_columns) : ?>
296 296
                                         <td data-th="<?php echo esc_attr($sold_label); ?>" class="cntr small-text">
@@ -298,25 +298,25 @@  discard block
 block discarded – undo
298 298
                                         </td>
299 299
                                         <td data-th="<?php echo esc_attr($remaining_label); ?>" class="cntr small-text">
300 300
                                             <?php echo ($remaining === EE_INF
301
-                                                ? '<span class="smaller-text">'
302
-                                                  . esc_html__('unlimited ', 'event_espresso')
303
-                                                  . '</span>'
304
-                                                : $remaining); ?>
301
+												? '<span class="smaller-text">'
302
+												  . esc_html__('unlimited ', 'event_espresso')
303
+												  . '</span>'
304
+												: $remaining); ?>
305 305
                                         </td>
306 306
                                         <td data-th="<?php echo esc_attr($total_sold_label); ?>" class="cntr small-text">
307 307
                                             <?php echo esc_html($datetime->sold()); ?>
308 308
                                         </td>
309 309
                                             <?php $tkts_left = $datetime->sold_out()
310
-                                                ? '<span class="sold-out smaller-text">'
311
-                                                  . esc_html__('Sold&nbsp;Out', 'event_espresso')
312
-                                                  . '</span>'
313
-                                                : $datetime->spaces_remaining(); ?>
310
+												? '<span class="sold-out smaller-text">'
311
+												  . esc_html__('Sold&nbsp;Out', 'event_espresso')
312
+												  . '</span>'
313
+												: $datetime->spaces_remaining(); ?>
314 314
                                         <td data-th="<?php echo esc_attr($spaces_left_label); ?>" class="cntr small-text">
315 315
                                             <?php echo ($tkts_left === EE_INF
316
-                                                ? '<span class="smaller-text">'
317
-                                                  . esc_html__('unlimited ', 'event_espresso')
318
-                                                  . '</span>'
319
-                                                : $tkts_left); ?>
316
+												? '<span class="smaller-text">'
317
+												  . esc_html__('unlimited ', 'event_espresso')
318
+												  . '</span>'
319
+												: $tkts_left); ?>
320 320
                                         </td>
321 321
                                         <?php endif; // end $show_ticket_sale_columns conditional ?>
322 322
                                     </tr>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                             ); ?>
85 85
                         </span>
86 86
                         <span class="dashicons dashicons-calendar"></span>
87
-                        <?php echo esc_html($ticket->get_i18n_datetime('TKT_start_date', $date_format)) . ' &nbsp; '; ?>
87
+                        <?php echo esc_html($ticket->get_i18n_datetime('TKT_start_date', $date_format)).' &nbsp; '; ?>
88 88
                         <span class="dashicons dashicons-clock"></span>
89 89
                         <?php echo esc_html($ticket->get_i18n_datetime('TKT_start_date', $time_format)); ?>
90 90
                         <br />
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                             ); ?>
96 96
                         </span>
97 97
                         <span class="dashicons dashicons-calendar"></span>
98
-                        <?php echo esc_html($ticket->get_i18n_datetime('TKT_end_date', $date_format)) . ' &nbsp; '; ?>
98
+                        <?php echo esc_html($ticket->get_i18n_datetime('TKT_end_date', $date_format)).' &nbsp; '; ?>
99 99
                         <span class="dashicons dashicons-clock"></span>
100 100
                         <?php echo esc_html($ticket->get_i18n_datetime('TKT_end_date', $time_format)); ?>
101 101
                         <br />
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                         <br />
161 161
                     <?php } ?>
162 162
 
163
-                    <?php if ((! defined('EE_DECAF') || EE_DECAF !== true) && $ticket->uses() !== EE_INF) { ?>
163
+                    <?php if (( ! defined('EE_DECAF') || EE_DECAF !== true) && $ticket->uses() !== EE_INF) { ?>
164 164
                         <section class="tckt-slctr-tkt-uses-sctn">
165 165
                             <h5>
166 166
                                 <?php echo apply_filters(
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     <?php
199 199
                     $datetimes          = $ticket->datetimes_ordered($event_is_expired, false);
200 200
                     $chart_column_width = $show_ticket_sale_columns ? ' ee-fourth-width' : ' ee-half-width';
201
-                    if (! empty($datetimes)) { ?>
201
+                    if ( ! empty($datetimes)) { ?>
202 202
                         <section class="tckt-slctr-tkt-datetimes-sctn">
203 203
                             <h5>
204 204
                                 <?php echo apply_filters(
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
                                         <td data-th="<?php echo esc_attr($event_date_label); ?>" class="small-text">
278 278
                                             <?php $datetime_name = $datetime->name(); ?>
279 279
                                             <?php echo ! empty($datetime_name)
280
-                                            ? '<b>' . esc_html($datetime_name) . '</b><br/>'
280
+                                            ? '<b>'.esc_html($datetime_name).'</b><br/>'
281 281
                                             : ''; ?>
282 282
                                             <?php echo esc_html($datetime->date_range(
283 283
                                                 $date_format,
@@ -334,4 +334,4 @@  discard block
 block discarded – undo
334 334
             </div>
335 335
         </td>
336 336
     </tr>
337
-<?php endif;  // end template_settings->show_ticket_details check
337
+<?php endif; // end template_settings->show_ticket_details check
Please login to merge, or discard this patch.
modules/bot_trap/EED_Bot_Trap.module.php 2 patches
Indentation   +276 added lines, -276 removed lines patch added patch discarded remove patch
@@ -18,305 +18,305 @@
 block discarded – undo
18 18
 class EED_Bot_Trap extends EED_Module
19 19
 {
20 20
 
21
-    /**
22
-     * @return EED_Module|EED_Bot_Trap
23
-     * @throws EE_Error
24
-     * @throws ReflectionException
25
-     */
26
-    public static function instance()
27
-    {
28
-        return parent::get_instance(__CLASS__);
29
-    }
21
+	/**
22
+	 * @return EED_Module|EED_Bot_Trap
23
+	 * @throws EE_Error
24
+	 * @throws ReflectionException
25
+	 */
26
+	public static function instance()
27
+	{
28
+		return parent::get_instance(__CLASS__);
29
+	}
30 30
 
31 31
 
32
-    /**
33
-     * set_hooks - for hooking into EE Core, other modules, etc
34
-     *
35
-     * @return void
36
-     */
37
-    public static function set_hooks()
38
-    {
39
-        if (
40
-            apply_filters('FHEE__EED_Bot_Trap__set_hooks__use_bot_trap', true) &&
41
-            EE_Registry::instance()->CFG->registration->use_bot_trap
42
-        ) {
43
-            EED_Bot_Trap::set_trap();
44
-            // redirect bots to bogus success page
45
-            EE_Config::register_route(
46
-                'ticket_selection_received',
47
-                'EED_Bot_Trap',
48
-                'display_bot_trap_success'
49
-            );
50
-        }
51
-    }
32
+	/**
33
+	 * set_hooks - for hooking into EE Core, other modules, etc
34
+	 *
35
+	 * @return void
36
+	 */
37
+	public static function set_hooks()
38
+	{
39
+		if (
40
+			apply_filters('FHEE__EED_Bot_Trap__set_hooks__use_bot_trap', true) &&
41
+			EE_Registry::instance()->CFG->registration->use_bot_trap
42
+		) {
43
+			EED_Bot_Trap::set_trap();
44
+			// redirect bots to bogus success page
45
+			EE_Config::register_route(
46
+				'ticket_selection_received',
47
+				'EED_Bot_Trap',
48
+				'display_bot_trap_success'
49
+			);
50
+		}
51
+	}
52 52
 
53 53
 
54
-    /**
55
-     * set_hooks_admin - for hooking into EE Admin Core, other modules, etc
56
-     *
57
-     * @return void
58
-     */
59
-    public static function set_trap()
60
-    {
61
-        define('EE_BOT_TRAP_BASE_URL', plugin_dir_url(__FILE__) . '/');
62
-        add_action(
63
-            'AHEE__ticket_selector_chart__template__after_ticket_selector',
64
-            array('EED_Bot_Trap', 'generate_bot_trap'),
65
-            10,
66
-            2
67
-        );
68
-        add_action(
69
-            'EED_Ticket_Selector__process_ticket_selections__before',
70
-            array('EED_Bot_Trap', 'process_bot_trap'),
71
-            1,
72
-            2
73
-        );
74
-    }
54
+	/**
55
+	 * set_hooks_admin - for hooking into EE Admin Core, other modules, etc
56
+	 *
57
+	 * @return void
58
+	 */
59
+	public static function set_trap()
60
+	{
61
+		define('EE_BOT_TRAP_BASE_URL', plugin_dir_url(__FILE__) . '/');
62
+		add_action(
63
+			'AHEE__ticket_selector_chart__template__after_ticket_selector',
64
+			array('EED_Bot_Trap', 'generate_bot_trap'),
65
+			10,
66
+			2
67
+		);
68
+		add_action(
69
+			'EED_Ticket_Selector__process_ticket_selections__before',
70
+			array('EED_Bot_Trap', 'process_bot_trap'),
71
+			1,
72
+			2
73
+		);
74
+	}
75 75
 
76 76
 
77
-    /**
78
-     * set_hooks_admin - for hooking into EE Admin Core, other modules, etc
79
-     *
80
-     * @return void
81
-     */
82
-    public static function set_hooks_admin()
83
-    {
84
-        if (
85
-            EED_Bot_Trap::getRequest()->isAjax()
86
-            && apply_filters('FHEE__EED_Bot_Trap__set_hooks__use_bot_trap', true)
87
-            && EE_Registry::instance()->CFG->registration->use_bot_trap
88
-        ) {
89
-            EED_Bot_Trap::set_trap();
90
-        }
91
-        add_action(
92
-            'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template',
93
-            array('EED_Bot_Trap', 'bot_trap_settings_form'),
94
-            5
95
-        );
96
-        add_filter(
97
-            'FHEE__Extend_Registration_Form_Admin_Page___update_reg_form_settings__CFG_registration',
98
-            array('EED_Bot_Trap', 'update_bot_trap_settings_form'),
99
-            10,
100
-            1
101
-        );
102
-    }
77
+	/**
78
+	 * set_hooks_admin - for hooking into EE Admin Core, other modules, etc
79
+	 *
80
+	 * @return void
81
+	 */
82
+	public static function set_hooks_admin()
83
+	{
84
+		if (
85
+			EED_Bot_Trap::getRequest()->isAjax()
86
+			&& apply_filters('FHEE__EED_Bot_Trap__set_hooks__use_bot_trap', true)
87
+			&& EE_Registry::instance()->CFG->registration->use_bot_trap
88
+		) {
89
+			EED_Bot_Trap::set_trap();
90
+		}
91
+		add_action(
92
+			'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template',
93
+			array('EED_Bot_Trap', 'bot_trap_settings_form'),
94
+			5
95
+		);
96
+		add_filter(
97
+			'FHEE__Extend_Registration_Form_Admin_Page___update_reg_form_settings__CFG_registration',
98
+			array('EED_Bot_Trap', 'update_bot_trap_settings_form'),
99
+			10,
100
+			1
101
+		);
102
+	}
103 103
 
104 104
 
105
-    /**
106
-     * run - initial module setup
107
-     *
108
-     * @param WP $WP
109
-     * @return void
110
-     */
111
-    public function run($WP)
112
-    {
113
-    }
105
+	/**
106
+	 * run - initial module setup
107
+	 *
108
+	 * @param WP $WP
109
+	 * @return void
110
+	 */
111
+	public function run($WP)
112
+	{
113
+	}
114 114
 
115 115
 
116
-    /**
117
-     * generate_bot_trap
118
-     *
119
-     * @return void
120
-     * @throws RuntimeException
121
-     */
122
-    public static function generate_bot_trap()
123
-    {
124
-        $time = microtime(true);
125
-        $html = '<div class="tkt-slctr-request-processor-dv" style="float:left; margin:0 0 0 -999em; height: 0;">';
126
-        $html .= '<label for="tkt-slctr-request-processor-email-' . esc_attr($time) . '">' . esc_html__('please do not enter anything in this input', 'event_espresso') . '</label>';
127
-        $html .= '<input type="email" id="tkt-slctr-request-processor-email-';
128
-        $html .= esc_attr($time) . '" name="tkt-slctr-request-processor-email" value=""/>';
129
-        $html .= '</div>';
130
-        echo wp_kses($html, AllowedTags::getWithFormTags());
131
-    }
116
+	/**
117
+	 * generate_bot_trap
118
+	 *
119
+	 * @return void
120
+	 * @throws RuntimeException
121
+	 */
122
+	public static function generate_bot_trap()
123
+	{
124
+		$time = microtime(true);
125
+		$html = '<div class="tkt-slctr-request-processor-dv" style="float:left; margin:0 0 0 -999em; height: 0;">';
126
+		$html .= '<label for="tkt-slctr-request-processor-email-' . esc_attr($time) . '">' . esc_html__('please do not enter anything in this input', 'event_espresso') . '</label>';
127
+		$html .= '<input type="email" id="tkt-slctr-request-processor-email-';
128
+		$html .= esc_attr($time) . '" name="tkt-slctr-request-processor-email" value=""/>';
129
+		$html .= '</div>';
130
+		echo wp_kses($html, AllowedTags::getWithFormTags());
131
+	}
132 132
 
133 133
 
134
-    /**
135
-     * process_bot_trap
136
-     *
137
-     * @param array|string $triggered_trap_callback Callback that will be executed for handling the
138
-     *                                              response if the bot trap is triggered.
139
-     *                                              It should receive one argument: a boolean indicating
140
-     *                                              whether the trap was triggered by suspicious timing or not.
141
-     * @throws RuntimeException
142
-     */
143
-    public static function process_bot_trap($triggered_trap_callback = array())
144
-    {
145
-        // what's your email address Mr. Bot ?
146
-        $empty_trap = EED_Bot_Trap::getRequest()->getRequestParam('tkt-slctr-request-processor-email') === '';
147
-        // are we human ?
148
-        if ($empty_trap) {
149
-            do_action('AHEE__EED_Bot_Trap__process_bot_trap__trap_not_triggered');
150
-            return;
151
-        }
152
-        // check the given callback is valid first before executing
153
-        if (! is_callable($triggered_trap_callback)) {
154
-            // invalid callback so lets just sub in our default.
155
-            $triggered_trap_callback = array('EED_Bot_Trap', 'triggered_trap_response');
156
-        }
157
-        call_user_func($triggered_trap_callback);
158
-    }
134
+	/**
135
+	 * process_bot_trap
136
+	 *
137
+	 * @param array|string $triggered_trap_callback Callback that will be executed for handling the
138
+	 *                                              response if the bot trap is triggered.
139
+	 *                                              It should receive one argument: a boolean indicating
140
+	 *                                              whether the trap was triggered by suspicious timing or not.
141
+	 * @throws RuntimeException
142
+	 */
143
+	public static function process_bot_trap($triggered_trap_callback = array())
144
+	{
145
+		// what's your email address Mr. Bot ?
146
+		$empty_trap = EED_Bot_Trap::getRequest()->getRequestParam('tkt-slctr-request-processor-email') === '';
147
+		// are we human ?
148
+		if ($empty_trap) {
149
+			do_action('AHEE__EED_Bot_Trap__process_bot_trap__trap_not_triggered');
150
+			return;
151
+		}
152
+		// check the given callback is valid first before executing
153
+		if (! is_callable($triggered_trap_callback)) {
154
+			// invalid callback so lets just sub in our default.
155
+			$triggered_trap_callback = array('EED_Bot_Trap', 'triggered_trap_response');
156
+		}
157
+		call_user_func($triggered_trap_callback);
158
+	}
159 159
 
160 160
 
161
-    /**
162
-     * This is the default callback executed by EED_Bot_Trap::process_bot_trap that handles the response.
163
-     *
164
-     * @throws InvalidArgumentException
165
-     * @throws InvalidDataTypeException
166
-     * @throws InvalidInterfaceException
167
-     */
168
-    public static function triggered_trap_response()
169
-    {
170
-        // UH OH...
171
-        $redirect_url = apply_filters(
172
-            'FHEE__EED_Bot_Trap__process_bot_trap__redirect_url',
173
-            add_query_arg(
174
-                array('ee' => 'ticket_selection_received'),
175
-                EE_Registry::instance()->CFG->core->reg_page_url()
176
-            )
177
-        );
178
-        // if AJAX, return the redirect URL
179
-        if (EED_Bot_Trap::getRequest()->isAjax()) {
180
-            echo wp_json_encode(
181
-                array_merge(
182
-                    EE_Error::get_notices(false),
183
-                    array(
184
-                        'redirect_url' => $redirect_url,
185
-                    )
186
-                )
187
-            );
188
-            exit();
189
-        }
190
-        wp_safe_redirect($redirect_url);
191
-        exit();
192
-    }
161
+	/**
162
+	 * This is the default callback executed by EED_Bot_Trap::process_bot_trap that handles the response.
163
+	 *
164
+	 * @throws InvalidArgumentException
165
+	 * @throws InvalidDataTypeException
166
+	 * @throws InvalidInterfaceException
167
+	 */
168
+	public static function triggered_trap_response()
169
+	{
170
+		// UH OH...
171
+		$redirect_url = apply_filters(
172
+			'FHEE__EED_Bot_Trap__process_bot_trap__redirect_url',
173
+			add_query_arg(
174
+				array('ee' => 'ticket_selection_received'),
175
+				EE_Registry::instance()->CFG->core->reg_page_url()
176
+			)
177
+		);
178
+		// if AJAX, return the redirect URL
179
+		if (EED_Bot_Trap::getRequest()->isAjax()) {
180
+			echo wp_json_encode(
181
+				array_merge(
182
+					EE_Error::get_notices(false),
183
+					array(
184
+						'redirect_url' => $redirect_url,
185
+					)
186
+				)
187
+			);
188
+			exit();
189
+		}
190
+		wp_safe_redirect($redirect_url);
191
+		exit();
192
+	}
193 193
 
194 194
 
195
-    /**
196
-     * display_bot_trap_success
197
-     * shows a "success" screen to bots so that they (ie: the ppl managing them)
198
-     * think the form was submitted successfully
199
-     *
200
-     * @return void
201
-     */
202
-    public static function display_bot_trap_success()
203
-    {
204
-        add_filter('FHEE__EED_Single_Page_Checkout__run', '__return_false');
205
-        $bot_notice = EED_Bot_Trap::getRequest()->getRequestParam(
206
-            'ee-notice',
207
-            esc_html__(
208
-                'Thank you so much. Your ticket selections have been received for consideration.',
209
-                'event_espresso'
210
-            )
211
-        );
212
-        EED_Bot_Trap::getResponse()->addOutput(EEH_HTML::div($bot_notice, '', 'ee-attention'));
213
-    }
195
+	/**
196
+	 * display_bot_trap_success
197
+	 * shows a "success" screen to bots so that they (ie: the ppl managing them)
198
+	 * think the form was submitted successfully
199
+	 *
200
+	 * @return void
201
+	 */
202
+	public static function display_bot_trap_success()
203
+	{
204
+		add_filter('FHEE__EED_Single_Page_Checkout__run', '__return_false');
205
+		$bot_notice = EED_Bot_Trap::getRequest()->getRequestParam(
206
+			'ee-notice',
207
+			esc_html__(
208
+				'Thank you so much. Your ticket selections have been received for consideration.',
209
+				'event_espresso'
210
+			)
211
+		);
212
+		EED_Bot_Trap::getResponse()->addOutput(EEH_HTML::div($bot_notice, '', 'ee-attention'));
213
+	}
214 214
 
215 215
 
216 216
 
217
-    /***********************************    ADMIN    **********************************/
217
+	/***********************************    ADMIN    **********************************/
218 218
 
219 219
 
220
-    /**
221
-     * bot_trap_settings_form
222
-     *
223
-     * @return void
224
-     * @throws EE_Error
225
-     * @throws InvalidArgumentException
226
-     * @throws InvalidDataTypeException
227
-     * @throws InvalidInterfaceException
228
-     */
229
-    public static function bot_trap_settings_form()
230
-    {
231
-        EED_Bot_Trap::_bot_trap_settings_form()->enqueue_js();
232
-        echo EED_Bot_Trap::_bot_trap_settings_form()->get_html(); // already escaped
233
-    }
220
+	/**
221
+	 * bot_trap_settings_form
222
+	 *
223
+	 * @return void
224
+	 * @throws EE_Error
225
+	 * @throws InvalidArgumentException
226
+	 * @throws InvalidDataTypeException
227
+	 * @throws InvalidInterfaceException
228
+	 */
229
+	public static function bot_trap_settings_form()
230
+	{
231
+		EED_Bot_Trap::_bot_trap_settings_form()->enqueue_js();
232
+		echo EED_Bot_Trap::_bot_trap_settings_form()->get_html(); // already escaped
233
+	}
234 234
 
235 235
 
236
-    /**
237
-     * _bot_trap_settings_form
238
-     *
239
-     * @return EE_Form_Section_Proper
240
-     * @throws EE_Error
241
-     */
242
-    protected static function _bot_trap_settings_form()
243
-    {
244
-        return new EE_Form_Section_Proper(
245
-            array(
246
-                'name'            => 'bot_trap_settings',
247
-                'html_id'         => 'bot_trap_settings',
248
-                'layout_strategy' => new EE_Admin_Two_Column_Layout(),
249
-                'subsections'     => array(
250
-                    'bot_trap_hdr' => new EE_Form_Section_HTML(
251
-                        EEH_HTML::h2(esc_html__('Bot Trap Settings', 'event_espresso'))
252
-                    ),
253
-                    'use_bot_trap' => new EE_Yes_No_Input(
254
-                        array(
255
-                            'html_label_text' => esc_html__('Enable Bot Trap', 'event_espresso'),
256
-                            'html_help_text'  => esc_html__(
257
-                                'The Event Espresso Bot Trap will insert a fake input into your Ticket Selector forms that is hidden from regular site visitors, but visible to spam bots. Because the input asks for an email address, it is irresistible to spam bots who will of course enter text into it. Since regular site visitors can not see this input, any value detected during form submission means a bot has been detected, which will then be blocked from submitting the form.',
258
-                                'event_espresso'
259
-                            ),
260
-                            'default'         => EE_Registry::instance()->CFG->registration->use_bot_trap !== null
261
-                                ? EE_Registry::instance()->CFG->registration->use_bot_trap
262
-                                : true,
263
-                            'required'        => false,
264
-                        )
265
-                    ),
266
-                ),
267
-            )
268
-        );
269
-    }
236
+	/**
237
+	 * _bot_trap_settings_form
238
+	 *
239
+	 * @return EE_Form_Section_Proper
240
+	 * @throws EE_Error
241
+	 */
242
+	protected static function _bot_trap_settings_form()
243
+	{
244
+		return new EE_Form_Section_Proper(
245
+			array(
246
+				'name'            => 'bot_trap_settings',
247
+				'html_id'         => 'bot_trap_settings',
248
+				'layout_strategy' => new EE_Admin_Two_Column_Layout(),
249
+				'subsections'     => array(
250
+					'bot_trap_hdr' => new EE_Form_Section_HTML(
251
+						EEH_HTML::h2(esc_html__('Bot Trap Settings', 'event_espresso'))
252
+					),
253
+					'use_bot_trap' => new EE_Yes_No_Input(
254
+						array(
255
+							'html_label_text' => esc_html__('Enable Bot Trap', 'event_espresso'),
256
+							'html_help_text'  => esc_html__(
257
+								'The Event Espresso Bot Trap will insert a fake input into your Ticket Selector forms that is hidden from regular site visitors, but visible to spam bots. Because the input asks for an email address, it is irresistible to spam bots who will of course enter text into it. Since regular site visitors can not see this input, any value detected during form submission means a bot has been detected, which will then be blocked from submitting the form.',
258
+								'event_espresso'
259
+							),
260
+							'default'         => EE_Registry::instance()->CFG->registration->use_bot_trap !== null
261
+								? EE_Registry::instance()->CFG->registration->use_bot_trap
262
+								: true,
263
+							'required'        => false,
264
+						)
265
+					),
266
+				),
267
+			)
268
+		);
269
+	}
270 270
 
271 271
 
272
-    /**
273
-     * update_bot_trap_settings_form
274
-     *
275
-     * @param EE_Registration_Config $EE_Registration_Config
276
-     * @return EE_Registration_Config
277
-     * @throws EE_Error
278
-     * @throws InvalidArgumentException
279
-     * @throws ReflectionException
280
-     * @throws InvalidDataTypeException
281
-     * @throws InvalidInterfaceException
282
-     */
283
-    public static function update_bot_trap_settings_form(EE_Registration_Config $EE_Registration_Config)
284
-    {
285
-        try {
286
-            $bot_trap_settings_form = EED_Bot_Trap::_bot_trap_settings_form();
287
-            // if not displaying a form, then check for form submission
288
-            if ($bot_trap_settings_form->was_submitted()) {
289
-                // capture form data
290
-                $bot_trap_settings_form->receive_form_submission();
291
-                // validate form data
292
-                if ($bot_trap_settings_form->is_valid()) {
293
-                    // grab validated data from form
294
-                    $valid_data = $bot_trap_settings_form->valid_data();
295
-                    if (isset($valid_data['use_bot_trap'])) {
296
-                        $EE_Registration_Config->use_bot_trap = $valid_data['use_bot_trap'];
297
-                    } else {
298
-                        EE_Error::add_error(
299
-                            esc_html__(
300
-                                'Invalid or missing Bot Trap settings. Please refresh the form and try again.',
301
-                                'event_espresso'
302
-                            ),
303
-                            __FILE__,
304
-                            __FUNCTION__,
305
-                            __LINE__
306
-                        );
307
-                    }
308
-                } elseif ($bot_trap_settings_form->submission_error_message() !== '') {
309
-                    EE_Error::add_error(
310
-                        $bot_trap_settings_form->submission_error_message(),
311
-                        __FILE__,
312
-                        __FUNCTION__,
313
-                        __LINE__
314
-                    );
315
-                }
316
-            }
317
-        } catch (EE_Error $e) {
318
-            $e->get_error();
319
-        }
320
-        return $EE_Registration_Config;
321
-    }
272
+	/**
273
+	 * update_bot_trap_settings_form
274
+	 *
275
+	 * @param EE_Registration_Config $EE_Registration_Config
276
+	 * @return EE_Registration_Config
277
+	 * @throws EE_Error
278
+	 * @throws InvalidArgumentException
279
+	 * @throws ReflectionException
280
+	 * @throws InvalidDataTypeException
281
+	 * @throws InvalidInterfaceException
282
+	 */
283
+	public static function update_bot_trap_settings_form(EE_Registration_Config $EE_Registration_Config)
284
+	{
285
+		try {
286
+			$bot_trap_settings_form = EED_Bot_Trap::_bot_trap_settings_form();
287
+			// if not displaying a form, then check for form submission
288
+			if ($bot_trap_settings_form->was_submitted()) {
289
+				// capture form data
290
+				$bot_trap_settings_form->receive_form_submission();
291
+				// validate form data
292
+				if ($bot_trap_settings_form->is_valid()) {
293
+					// grab validated data from form
294
+					$valid_data = $bot_trap_settings_form->valid_data();
295
+					if (isset($valid_data['use_bot_trap'])) {
296
+						$EE_Registration_Config->use_bot_trap = $valid_data['use_bot_trap'];
297
+					} else {
298
+						EE_Error::add_error(
299
+							esc_html__(
300
+								'Invalid or missing Bot Trap settings. Please refresh the form and try again.',
301
+								'event_espresso'
302
+							),
303
+							__FILE__,
304
+							__FUNCTION__,
305
+							__LINE__
306
+						);
307
+					}
308
+				} elseif ($bot_trap_settings_form->submission_error_message() !== '') {
309
+					EE_Error::add_error(
310
+						$bot_trap_settings_form->submission_error_message(),
311
+						__FILE__,
312
+						__FUNCTION__,
313
+						__LINE__
314
+					);
315
+				}
316
+			}
317
+		} catch (EE_Error $e) {
318
+			$e->get_error();
319
+		}
320
+		return $EE_Registration_Config;
321
+	}
322 322
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public static function set_trap()
60 60
     {
61
-        define('EE_BOT_TRAP_BASE_URL', plugin_dir_url(__FILE__) . '/');
61
+        define('EE_BOT_TRAP_BASE_URL', plugin_dir_url(__FILE__).'/');
62 62
         add_action(
63 63
             'AHEE__ticket_selector_chart__template__after_ticket_selector',
64 64
             array('EED_Bot_Trap', 'generate_bot_trap'),
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
     {
124 124
         $time = microtime(true);
125 125
         $html = '<div class="tkt-slctr-request-processor-dv" style="float:left; margin:0 0 0 -999em; height: 0;">';
126
-        $html .= '<label for="tkt-slctr-request-processor-email-' . esc_attr($time) . '">' . esc_html__('please do not enter anything in this input', 'event_espresso') . '</label>';
126
+        $html .= '<label for="tkt-slctr-request-processor-email-'.esc_attr($time).'">'.esc_html__('please do not enter anything in this input', 'event_espresso').'</label>';
127 127
         $html .= '<input type="email" id="tkt-slctr-request-processor-email-';
128
-        $html .= esc_attr($time) . '" name="tkt-slctr-request-processor-email" value=""/>';
128
+        $html .= esc_attr($time).'" name="tkt-slctr-request-processor-email" value=""/>';
129 129
         $html .= '</div>';
130 130
         echo wp_kses($html, AllowedTags::getWithFormTags());
131 131
     }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             return;
151 151
         }
152 152
         // check the given callback is valid first before executing
153
-        if (! is_callable($triggered_trap_callback)) {
153
+        if ( ! is_callable($triggered_trap_callback)) {
154 154
             // invalid callback so lets just sub in our default.
155 155
             $triggered_trap_callback = array('EED_Bot_Trap', 'triggered_trap_response');
156 156
         }
Please login to merge, or discard this patch.
single_page_checkout/templates/registration_page_wrapper.template.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -16,38 +16,38 @@  discard block
 block discarded – undo
16 16
 
17 17
 <div id="ee-single-page-checkout-dv" class="">
18 18
     <?php
19
-    if (! $empty_cart) {
20
-        if (apply_filters('FHEE__registration_page_wrapper_template__display_time_limit', false)) { ?>
19
+	if (! $empty_cart) {
20
+		if (apply_filters('FHEE__registration_page_wrapper_template__display_time_limit', false)) { ?>
21 21
             <p id="spco-registration-time-limit-pg" class="spco-steps-pg ee-attention important-notice"
22 22
                style="display: none;">
23 23
                 <?php echo sprintf(
24
-                    apply_filters(
25
-                        'FHEE__registration_page_wrapper_template___time_limit',
26
-                        esc_html__('You have %1$s to complete your registration.', 'event_espresso')
27
-                    ),
28
-                    '<span id="spco-registration-time-limit-spn" class="spco-registration-time-limit-spn">'
29
-                    . $registration_time_limit
30
-                    . '</span>'
31
-                );
32
-                ?>
24
+					apply_filters(
25
+						'FHEE__registration_page_wrapper_template___time_limit',
26
+						esc_html__('You have %1$s to complete your registration.', 'event_espresso')
27
+					),
28
+					'<span id="spco-registration-time-limit-spn" class="spco-registration-time-limit-spn">'
29
+					. $registration_time_limit
30
+					. '</span>'
31
+				);
32
+				?>
33 33
                 <span id="spco-registration-expiration-spn" class="" style="display:none;"></span>
34 34
             </p>
35 35
         <?php }
36
-        if (! $revisit && apply_filters('FHEE__registration_page_wrapper_template__steps_display', true)) {
37
-            ?>
36
+		if (! $revisit && apply_filters('FHEE__registration_page_wrapper_template__steps_display', true)) {
37
+			?>
38 38
             <h2 id="spco-steps-big-hdr" class="spco-steps-big-hdr">
39 39
                 <?php esc_html_e(' Steps', 'event_espresso'); ?>
40 40
             </h2>
41 41
 
42 42
             <div id="spco-steps-display-dv">
43 43
                 <?php
44
-                $step_nmbr = 1;
45
-                $total_steps = count($reg_steps) - 1;
46
-                foreach ($reg_steps as $reg_step) {
47
-                    if ($reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration') {
48
-                        $slug = $reg_step->slug();
49
-                        $step_display_dv_class = $reg_step->is_current_step() ? 'active-step' : 'inactive-step';
50
-                        ?>
44
+				$step_nmbr = 1;
45
+				$total_steps = count($reg_steps) - 1;
46
+				foreach ($reg_steps as $reg_step) {
47
+					if ($reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration') {
48
+						$slug = $reg_step->slug();
49
+						$step_display_dv_class = $reg_step->is_current_step() ? 'active-step' : 'inactive-step';
50
+						?>
51 51
                         <div id="spco-step-<?php echo esc_attr($slug); ?>-display-dv"
52 52
                              class="spco-step-display-dv <?php echo esc_attr($step_display_dv_class); ?> steps-<?php echo esc_attr($total_steps); ?>"
53 53
                         >
@@ -60,28 +60,28 @@  discard block
 block discarded – undo
60 60
                         </div>
61 61
 
62 62
                         <?php
63
-                        if ($step_nmbr < $total_steps) { ?>
63
+						if ($step_nmbr < $total_steps) { ?>
64 64
                             <div class="spco-step-arrow-dv">&raquo;</div>
65 65
                             <?php
66
-                        }
67
-                        $step_nmbr++;
68
-                    }
69
-                }
70
-                ?>
66
+						}
67
+						$step_nmbr++;
68
+					}
69
+				}
70
+				?>
71 71
                 <div class="clear-float"></div>
72 72
             </div>
73 73
 
74 74
             <?php
75
-        }
75
+		}
76 76
 
77
-        do_action('AHEE__SPCO__before_registration_steps');
78
-        $step_nmbr = 1;
79
-        foreach ($reg_steps as $reg_step) {
80
-            if ($reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration') {
81
-                $slug = $reg_step->slug();
82
-                do_action('AHEE__' . $slug . '__reg_step_start', $reg_step);
83
-                // todo: deprecate hook AHEE__registration_page_attendee_information__start
84
-                ?>
77
+		do_action('AHEE__SPCO__before_registration_steps');
78
+		$step_nmbr = 1;
79
+		foreach ($reg_steps as $reg_step) {
80
+			if ($reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration') {
81
+				$slug = $reg_step->slug();
82
+				do_action('AHEE__' . $slug . '__reg_step_start', $reg_step);
83
+				// todo: deprecate hook AHEE__registration_page_attendee_information__start
84
+				?>
85 85
                 <div id="spco-<?php echo esc_attr($slug); ?>-dv"
86 86
                      class="spco-step-dv <?php echo esc_attr($reg_step->div_class()); ?>"
87 87
                 >
@@ -89,20 +89,20 @@  discard block
 block discarded – undo
89 89
                     <?php do_action('AHEE__SPCO_after_reg_step_form', $slug, $next_step); ?>
90 90
                 </div>
91 91
                 <?php $step_nmbr++;
92
-            }
93
-        }
94
-        do_action('AHEE__SPCO__after_registration_steps');
95
-    } else {
96
-        ?>
92
+			}
93
+		}
94
+		do_action('AHEE__SPCO__after_registration_steps');
95
+	} else {
96
+		?>
97 97
         <h3 id="spco-empty-cart-hdr" class="spco-step-title-hdr">
98 98
             <?php esc_html_e('Nothing in your Event Queue', 'event_espresso'); ?>
99 99
         </h3>
100 100
         <p><?php echo wp_kses($empty_msg, AllowedTags::getWithFormTags()); ?></p>
101 101
         <?php echo wp_kses($cookies_not_set_msg, AllowedTags::getWithFormTags()); ?>
102 102
         <?php
103
-    }
104
-    do_action('AHEE__SPCO__reg_form_footer');
105
-    ?>
103
+	}
104
+	do_action('AHEE__SPCO__reg_form_footer');
105
+	?>
106 106
 
107 107
 </div>
108 108
 
Please login to merge, or discard this patch.
reg_steps/attendee_information/copy_attendee_info.template.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
     <p class="spco-copy-all-attendee-pg">
13 13
         <label class="ee-checkbox-label-before ee-checkbox-label-wide">
14 14
             <?php esc_html_e(
15
-                'Use Attendee #1\'s information for ALL attendees',
16
-                'event_espresso'
17
-            ); ?>
15
+				'Use Attendee #1\'s information for ALL attendees',
16
+				'event_espresso'
17
+			); ?>
18 18
             <input class='spco-copy-all-attendee-chk ee-do-not-validate'
19 19
                    id="spco-copy-all-attendee-chk"
20 20
                    type="checkbox"
@@ -25,16 +25,16 @@  discard block
 block discarded – undo
25 25
 
26 26
     <p class="spco-copy-attendee-pg">
27 27
         <?php echo apply_filters(
28
-            'FHEE__registration_page_attendee_information__copy_attendee_pg',
29
-            sprintf(
30
-                esc_html__(
31
-                    'This option allows you to use the above information for all additional attendee question fields. %sPlease note:%s some events may have additional questions that you may still be required to answer in order to complete your registration.',
32
-                    'event_espresso'
33
-                ),
34
-                '<strong>',
35
-                '</strong>'
36
-            )
37
-        ); ?></p>
28
+			'FHEE__registration_page_attendee_information__copy_attendee_pg',
29
+			sprintf(
30
+				esc_html__(
31
+					'This option allows you to use the above information for all additional attendee question fields. %sPlease note:%s some events may have additional questions that you may still be required to answer in order to complete your registration.',
32
+					'event_espresso'
33
+				),
34
+				'<strong>',
35
+				'</strong>'
36
+			)
37
+		); ?></p>
38 38
 
39 39
     <a class='display-the-hidden smaller-text float-right'
40 40
        id="display-more-attendee-copy-options"
@@ -54,15 +54,15 @@  discard block
 block discarded – undo
54 54
     <div id="more-attendee-copy-options-dv" class="" style="display: none;">
55 55
         <p class="spco-copy-attendee-pg">
56 56
             <?php esc_html_e(
57
-                'Only copy the above information to the following selected additional attendees.',
58
-                'event_espresso'
59
-            ); ?>
57
+				'Only copy the above information to the following selected additional attendees.',
58
+				'event_espresso'
59
+			); ?>
60 60
         </p>
61 61
 
62 62
         <?php
63
-        foreach ($spco_copy_attendee_chk as $spco_copy_chk) {
64
-            echo wp_kses($spco_copy_chk, AllowedTags::getWithFormTags());
65
-        } ?>
63
+		foreach ($spco_copy_attendee_chk as $spco_copy_chk) {
64
+			echo wp_kses($spco_copy_chk, AllowedTags::getWithFormTags());
65
+		} ?>
66 66
 
67 67
     </div>
68 68
     <div class="clear-float"></div>
Please login to merge, or discard this patch.
reg_steps/attendee_information/attendee_info_single.template.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -14,16 +14,16 @@  discard block
 block discarded – undo
14 14
 <?php if (! is_admin()) : ?>
15 15
     <p id="spco-attendee_information-pg" class="spco-steps-pg small-text drk-grey-text">
16 16
         <?php echo apply_filters(
17
-            'FHEE__registration_page_attendee_information__attendee_information_pg',
18
-            sprintf(
19
-                esc_html__(
20
-                    'In order to process your registration, we ask you to provide the following information.%1$sPlease note that all fields marked with an asterisk (%2$s) are required.',
21
-                    'event_espresso'
22
-                ),
23
-                '<br />',
24
-                '<span class="asterisk">*</span>'
25
-            )
26
-        ); ?>
17
+			'FHEE__registration_page_attendee_information__attendee_information_pg',
18
+			sprintf(
19
+				esc_html__(
20
+					'In order to process your registration, we ask you to provide the following information.%1$sPlease note that all fields marked with an asterisk (%2$s) are required.',
21
+					'event_espresso'
22
+				),
23
+				'<br />',
24
+				'<span class="asterisk">*</span>'
25
+			)
26
+		); ?>
27 27
     </p>
28 28
 <?php endif; ?>
29 29
 
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 $prev_ticket = 0;
34 34
 
35 35
 if (count($registrations) > 0) {
36
-    $ticketID = esc_attr(key($template_args['ticket_count']));
37
-    ?>
36
+	$ticketID = esc_attr(key($template_args['ticket_count']));
37
+	?>
38 38
 
39 39
     <div id="spco-attendee-panel-dv-<?php echo esc_attr($ticketID); ?>"
40 40
          class="spco-attendee-panel-dv spco-attendee-ticket-<?php echo sanitize_html_class($ticketID); ?>"
@@ -62,37 +62,37 @@  discard block
 block discarded – undo
62 62
                 </thead>
63 63
                 <tbody>
64 64
                     <?php
65
-                    // Store previous values to avoid duplicated rows.
66
-                    $prev_ticket = 0;
67
-                    // Display all tickets inside.
68
-                    foreach ($registrations as $registration) {
69
-                        if ($registration instanceof EE_Registration) {
70
-                            if ($registration->ticket()->ID() !== $prev_ticket) {
71
-                                echo wp_kses($ticket_line_item[ $registration->ticket()->ID() ], AllowedTags::getWithFormTags());
72
-                            }
65
+					// Store previous values to avoid duplicated rows.
66
+					$prev_ticket = 0;
67
+					// Display all tickets inside.
68
+					foreach ($registrations as $registration) {
69
+						if ($registration instanceof EE_Registration) {
70
+							if ($registration->ticket()->ID() !== $prev_ticket) {
71
+								echo wp_kses($ticket_line_item[ $registration->ticket()->ID() ], AllowedTags::getWithFormTags());
72
+							}
73 73
 
74
-                            $prev_ticket = $registration->ticket()->ID();
75
-                        }
76
-                    }
77
-                    ?>
74
+							$prev_ticket = $registration->ticket()->ID();
75
+						}
76
+					}
77
+					?>
78 78
                 </tbody>
79 79
             </table>
80 80
         </div><!-- close spco-ticket-info-dv -->
81 81
 
82 82
         <?php
83
-        // Display the forms below the table.
84
-        foreach ($registrations as $registration) {
85
-            if ($registration instanceof EE_Registration) {
86
-                // Attendee Questions.
87
-                $reg_form = EE_Template_Layout::get_subform_name($registration->reg_url_link());
88
-                echo wp_kses(${$reg_form}, AllowedTags::getWithFormTags());
89
-            } // if ( $registration instanceof EE_Registration )
90
-        } // end foreach ( $registrations as $registration )
83
+		// Display the forms below the table.
84
+		foreach ($registrations as $registration) {
85
+			if ($registration instanceof EE_Registration) {
86
+				// Attendee Questions.
87
+				$reg_form = EE_Template_Layout::get_subform_name($registration->reg_url_link());
88
+				echo wp_kses(${$reg_form}, AllowedTags::getWithFormTags());
89
+			} // if ( $registration instanceof EE_Registration )
90
+		} // end foreach ( $registrations as $registration )
91 91
 
92
-        ?>
92
+		?>
93 93
     </div><!-- close spco-attendee-panel-dv -->
94 94
     <?php
95
-    echo wp_kses($default_hidden_inputs, AllowedTags::getWithFormTags());
95
+	echo wp_kses($default_hidden_inputs, AllowedTags::getWithFormTags());
96 96
 } // end if ( count( $registrations ) > 0 )
97 97
 
98 98
 ?>
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 use EventEspresso\core\services\request\sanitizers\AllowedTags;
12 12
 
13 13
 ?>
14
-<?php if (! is_admin()) : ?>
14
+<?php if ( ! is_admin()) : ?>
15 15
     <p id="spco-attendee_information-pg" class="spco-steps-pg small-text drk-grey-text">
16 16
         <?php echo apply_filters(
17 17
             'FHEE__registration_page_attendee_information__attendee_information_pg',
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
          class="spco-attendee-panel-dv spco-attendee-ticket-<?php echo sanitize_html_class($ticketID); ?>"
41 41
     >
42 42
         <div class="spco-ticket-info-dv small-text">
43
-            <?php if (! is_admin()) : ?>
43
+            <?php if ( ! is_admin()) : ?>
44 44
                 <h5><?php esc_html_e('Details', 'event_espresso'); ?></h5>
45 45
             <?php endif; ?>
46 46
             <table class="spco-ticket-details">
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                     foreach ($registrations as $registration) {
69 69
                         if ($registration instanceof EE_Registration) {
70 70
                             if ($registration->ticket()->ID() !== $prev_ticket) {
71
-                                echo wp_kses($ticket_line_item[ $registration->ticket()->ID() ], AllowedTags::getWithFormTags());
71
+                                echo wp_kses($ticket_line_item[$registration->ticket()->ID()], AllowedTags::getWithFormTags());
72 72
                             }
73 73
 
74 74
                             $prev_ticket = $registration->ticket()->ID();
Please login to merge, or discard this patch.
reg_steps/attendee_information/attendee_info_main.template.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -13,16 +13,16 @@  discard block
 block discarded – undo
13 13
 <?php if (! is_admin()) : ?>
14 14
     <p id="spco-attendee_information-pg" class="spco-steps-pg small-text drk-grey-text">
15 15
         <?php echo apply_filters(
16
-            'FHEE__registration_page_attendee_information__attendee_information_pg',
17
-            sprintf(
18
-                esc_html__(
19
-                    'In order to process your registration, we ask you to provide the following information.%1$sPlease note that all fields marked with an asterisk (%2$s) are required.',
20
-                    'event_espresso'
21
-                ),
22
-                '<br />',
23
-                '<span class="asterisk">*</span>'
24
-            )
25
-        ); ?>
16
+			'FHEE__registration_page_attendee_information__attendee_information_pg',
17
+			sprintf(
18
+				esc_html__(
19
+					'In order to process your registration, we ask you to provide the following information.%1$sPlease note that all fields marked with an asterisk (%2$s) are required.',
20
+					'event_espresso'
21
+				),
22
+				'<br />',
23
+				'<span class="asterisk">*</span>'
24
+			)
25
+		); ?>
26 26
     </p>
27 27
 <?php endif; ?>
28 28
 
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
 $prev_ticket = 0;
33 33
 
34 34
 if (count($registrations) > 0) {
35
-    foreach ($registrations as $registration) {
36
-        if ($registration instanceof EE_Registration) {
37
-            $att_nmbr++;
38
-            ?>
35
+	foreach ($registrations as $registration) {
36
+		if ($registration instanceof EE_Registration) {
37
+			$att_nmbr++;
38
+			?>
39 39
 
40 40
             <div id="spco-attendee-panel-dv-<?php echo esc_url_raw($registration->reg_url_link()); ?>"
41 41
                  class="spco-attendee-panel-dv spco-attendee-ticket-<?php echo esc_attr($registration->ticket()->ID());
42
-                    ?>"
42
+					?>"
43 43
             >
44 44
 
45 45
                 <?php if (! is_admin() && $registration->event()->ID() !== $prev_event) { ?>
@@ -81,19 +81,19 @@  discard block
 block discarded – undo
81 81
                 <?php } ?>
82 82
 
83 83
                 <?php
84
-                // ATTENDEE QUESTIONS
85
-                $reg_form = EE_Template_Layout::get_subform_name($registration->reg_url_link());
86
-                echo wp_kses(${$reg_form}, AllowedTags::getWithFormTags());
87
-                ?>
84
+				// ATTENDEE QUESTIONS
85
+				$reg_form = EE_Template_Layout::get_subform_name($registration->reg_url_link());
86
+				echo wp_kses(${$reg_form}, AllowedTags::getWithFormTags());
87
+				?>
88 88
 
89 89
             </div>
90 90
             <?php
91
-            $prev_event  = $registration->event()->ID();
92
-            $prev_ticket = $registration->ticket()->ID();
93
-        } // if ( $registration instanceof EE_Registration )
94
-    } // end foreach ( $registrations as $registration )
91
+			$prev_event  = $registration->event()->ID();
92
+			$prev_ticket = $registration->ticket()->ID();
93
+		} // if ( $registration instanceof EE_Registration )
94
+	} // end foreach ( $registrations as $registration )
95 95
 
96
-    echo wp_kses($default_hidden_inputs, AllowedTags::getWithFormTags());
96
+	echo wp_kses($default_hidden_inputs, AllowedTags::getWithFormTags());
97 97
 } // end if ( count( $registrations ) > 0 )
98 98
 
99 99
 ?>
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 use EventEspresso\core\services\request\sanitizers\AllowedTags;
11 11
 
12 12
 ?>
13
-<?php if (! is_admin()) : ?>
13
+<?php if ( ! is_admin()) : ?>
14 14
     <p id="spco-attendee_information-pg" class="spco-steps-pg small-text drk-grey-text">
15 15
         <?php echo apply_filters(
16 16
             'FHEE__registration_page_attendee_information__attendee_information_pg',
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
                     ?>"
43 43
             >
44 44
 
45
-                <?php if (! is_admin() && $registration->event()->ID() !== $prev_event) { ?>
45
+                <?php if ( ! is_admin() && $registration->event()->ID() !== $prev_event) { ?>
46 46
                     <h4 id="event_title-<?php echo esc_attr($registration->event()->ID()) ?>"
47 47
                         class="big-event-title-hdr"
48 48
                     >
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
                     </h4>
51 51
                 <?php } ?>
52 52
                 <?php if ($registration->ticket()->ID() !== $prev_ticket) { ?>
53
-                    <?php if (! $revisit) { ?>
53
+                    <?php if ( ! $revisit) { ?>
54 54
                         <div class="spco-ticket-info-dv small-text">
55
-                            <?php if (! is_admin()) : ?>
55
+                            <?php if ( ! is_admin()) : ?>
56 56
                                 <h5><?php esc_html_e('Details', 'event_espresso'); ?></h5>
57 57
                             <?php endif; ?>
58 58
                             <table class="spco-ticket-details">
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                                     </tr>
74 74
                                 </thead>
75 75
                                 <tbody>
76
-                                    <?php echo wp_kses($ticket_line_item[ $registration->ticket()->ID() ], AllowedTags::getWithFormTags()); ?>
76
+                                    <?php echo wp_kses($ticket_line_item[$registration->ticket()->ID()], AllowedTags::getWithFormTags()); ?>
77 77
                                 </tbody>
78 78
                             </table>
79 79
                         </div>
Please login to merge, or discard this patch.
modules/invalid_checkout_access/EED_Invalid_Checkout_Access.module.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -14,84 +14,84 @@
 block discarded – undo
14 14
 class EED_Invalid_Checkout_Access extends EED_Module
15 15
 {
16 16
 
17
-    /**
18
-     * @var InvalidCheckoutAccess $invalid_checkout_access_form
19
-     */
20
-    private static $invalid_checkout_access_form;
17
+	/**
18
+	 * @var InvalidCheckoutAccess $invalid_checkout_access_form
19
+	 */
20
+	private static $invalid_checkout_access_form;
21 21
 
22
-    /**
23
-     * set_hooks - for hooking into EE Core, other modules, etc
24
-     */
25
-    public static function set_hooks()
26
-    {
27
-    }
22
+	/**
23
+	 * set_hooks - for hooking into EE Core, other modules, etc
24
+	 */
25
+	public static function set_hooks()
26
+	{
27
+	}
28 28
 
29 29
 
30
-    /**
31
-     * set_hooks_admin - for hooking into EE Admin Core, other modules, etc
32
-     */
33
-    public static function set_hooks_admin()
34
-    {
35
-        add_action(
36
-            'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template',
37
-            array('EED_Invalid_Checkout_Access', 'display_invalid_checkout_access_form'),
38
-            15
39
-        );
40
-        add_filter(
41
-            'FHEE__Extend_Registration_Form_Admin_Page___update_reg_form_settings__CFG_registration',
42
-            array('EED_Invalid_Checkout_Access', 'process_invalid_checkout_access_form')
43
-        );
44
-    }
30
+	/**
31
+	 * set_hooks_admin - for hooking into EE Admin Core, other modules, etc
32
+	 */
33
+	public static function set_hooks_admin()
34
+	{
35
+		add_action(
36
+			'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template',
37
+			array('EED_Invalid_Checkout_Access', 'display_invalid_checkout_access_form'),
38
+			15
39
+		);
40
+		add_filter(
41
+			'FHEE__Extend_Registration_Form_Admin_Page___update_reg_form_settings__CFG_registration',
42
+			array('EED_Invalid_Checkout_Access', 'process_invalid_checkout_access_form')
43
+		);
44
+	}
45 45
 
46 46
 
47
-    /**
48
-     * run - initial module setup
49
-     * this method is primarily used for activating resources in the EE_Front_Controller thru the use of filters
50
-     *
51
-     * @var WP $WP
52
-     */
53
-    public function run($WP)
54
-    {
55
-        // TODO: Implement run() method.
56
-    }
47
+	/**
48
+	 * run - initial module setup
49
+	 * this method is primarily used for activating resources in the EE_Front_Controller thru the use of filters
50
+	 *
51
+	 * @var WP $WP
52
+	 */
53
+	public function run($WP)
54
+	{
55
+		// TODO: Implement run() method.
56
+	}
57 57
 
58 58
 
59
-    /**
60
-     * @return InvalidCheckoutAccess
61
-     */
62
-    public static function getInvalidCheckoutAccess()
63
-    {
64
-        if (! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess) {
65
-            self::$invalid_checkout_access_form = new InvalidCheckoutAccess();
66
-        }
67
-        return self::$invalid_checkout_access_form;
68
-    }
59
+	/**
60
+	 * @return InvalidCheckoutAccess
61
+	 */
62
+	public static function getInvalidCheckoutAccess()
63
+	{
64
+		if (! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess) {
65
+			self::$invalid_checkout_access_form = new InvalidCheckoutAccess();
66
+		}
67
+		return self::$invalid_checkout_access_form;
68
+	}
69 69
 
70 70
 
71
-    /**
72
-     * email_validation_settings_form
73
-     *
74
-     * @return    void
75
-     * @throws EE_Error
76
-     */
77
-    public static function display_invalid_checkout_access_form()
78
-    {
79
-        $invalid_checkout_access_form = EED_Invalid_Checkout_Access::getInvalidCheckoutAccess();
80
-        echo wp_kses($invalid_checkout_access_form->getForm()->get_html(), AllowedTags::getWithFormTags());
81
-    }
71
+	/**
72
+	 * email_validation_settings_form
73
+	 *
74
+	 * @return    void
75
+	 * @throws EE_Error
76
+	 */
77
+	public static function display_invalid_checkout_access_form()
78
+	{
79
+		$invalid_checkout_access_form = EED_Invalid_Checkout_Access::getInvalidCheckoutAccess();
80
+		echo wp_kses($invalid_checkout_access_form->getForm()->get_html(), AllowedTags::getWithFormTags());
81
+	}
82 82
 
83 83
 
84
-    /**
85
-     * email_validation_settings_form
86
-     *
87
-     * @param EE_Registration_Config $EE_Registration_Config
88
-     * @return EE_Registration_Config
89
-     * @throws EE_Error
90
-     * @throws ReflectionException
91
-     */
92
-    public static function process_invalid_checkout_access_form(EE_Registration_Config $EE_Registration_Config)
93
-    {
94
-        $invalid_checkout_access_form = EED_Invalid_Checkout_Access::getInvalidCheckoutAccess();
95
-        return $invalid_checkout_access_form->processForm($EE_Registration_Config);
96
-    }
84
+	/**
85
+	 * email_validation_settings_form
86
+	 *
87
+	 * @param EE_Registration_Config $EE_Registration_Config
88
+	 * @return EE_Registration_Config
89
+	 * @throws EE_Error
90
+	 * @throws ReflectionException
91
+	 */
92
+	public static function process_invalid_checkout_access_form(EE_Registration_Config $EE_Registration_Config)
93
+	{
94
+		$invalid_checkout_access_form = EED_Invalid_Checkout_Access::getInvalidCheckoutAccess();
95
+		return $invalid_checkout_access_form->processForm($EE_Registration_Config);
96
+	}
97 97
 }
Please login to merge, or discard this patch.
thank_you_page/templates/thank-you-page-registration-details.template.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -14,24 +14,24 @@  discard block
 block discarded – undo
14 14
 
15 15
 <div class="ee-registration-details-dv">
16 16
     <?php
17
-    $registrations = $transaction->registrations();
18
-    $registrations = is_array($registrations) ? $registrations : [];
19
-    $reg_count     = count($registrations);
20
-    $reg_cntr      = 0;
21
-    $event_name    = '';
22
-    $wait_list     = false;
23
-    foreach ($registrations as $registration) {
24
-        if (! $registration instanceof EE_Registration) {
25
-            continue;
26
-        }
27
-        if ($event_name != $registration->event_name() && ! empty($event_name)) { ?>
17
+	$registrations = $transaction->registrations();
18
+	$registrations = is_array($registrations) ? $registrations : [];
19
+	$reg_count     = count($registrations);
20
+	$reg_cntr      = 0;
21
+	$event_name    = '';
22
+	$wait_list     = false;
23
+	foreach ($registrations as $registration) {
24
+		if (! $registration instanceof EE_Registration) {
25
+			continue;
26
+		}
27
+		if ($event_name != $registration->event_name() && ! empty($event_name)) { ?>
28 28
             </tbody>
29 29
             </table>
30 30
             <?php
31
-        }
32
-        $reg_cntr++;
33
-        if ($event_name != $registration->event_name()) {
34
-            ?>
31
+		}
32
+		$reg_cntr++;
33
+		if ($event_name != $registration->event_name()) {
34
+			?>
35 35
             <h5>
36 36
                 <span class="smaller-text grey-text">
37 37
                     <?php esc_html_e('for', 'event_espresso'); ?> :
@@ -54,23 +54,23 @@  discard block
 block discarded – undo
54 54
             </thead>
55 55
             <tbody>
56 56
             <?php
57
-        }
58
-        if ($is_primary || (! $is_primary && $reg_url_link == $registration->reg_url_link())) { ?>
57
+		}
58
+		if ($is_primary || (! $is_primary && $reg_url_link == $registration->reg_url_link())) { ?>
59 59
             <tr>
60 60
                 <td width="40%">
61 61
                     <?php
62
-                    if ($registration->attendee() instanceof EE_Attendee) {
63
-                        echo esc_html($registration->attendee()->full_name(true));
64
-                    }
65
-                    ?>
62
+					if ($registration->attendee() instanceof EE_Attendee) {
63
+						echo esc_html($registration->attendee()->full_name(true));
64
+					}
65
+					?>
66 66
                     <p class="tiny-text" style="margin: .75em 0 0;">
67 67
                         <?php if ($registration->count_question_groups()) { ?>
68 68
                             <a class="ee-icon-only-lnk"
69 69
                                href="<?php echo esc_url_raw($registration->edit_attendee_information_url()); ?>"
70 70
                                title="<?php esc_attr_e(
71
-                                   'Click here to edit Attendee Information',
72
-                                   'event_espresso'
73
-                               ); ?>"
71
+								   'Click here to edit Attendee Information',
72
+								   'event_espresso'
73
+							   ); ?>"
74 74
                             >
75 75
                                 <span class="ee-icon ee-icon-user-edit"></span>
76 76
                                 <?php esc_html_e('edit info', 'event_espresso'); ?>
@@ -78,15 +78,15 @@  discard block
 block discarded – undo
78 78
                         <?php } ?>
79 79
                         <a class="ee-resend-reg-confirmation-email ee-icon-only-lnk"
80 80
                            href="<?php echo esc_url_raw(
81
-                               add_query_arg(
82
-                                   ['token' => $registration->reg_url_link(), 'resend_reg_confirmation' => 'true'],
83
-                                   EE_Registry::instance()->CFG->core->thank_you_page_url()
84
-                               )
85
-                           ); ?>"
81
+							   add_query_arg(
82
+								   ['token' => $registration->reg_url_link(), 'resend_reg_confirmation' => 'true'],
83
+								   EE_Registry::instance()->CFG->core->thank_you_page_url()
84
+							   )
85
+						   ); ?>"
86 86
                            title="<?php esc_attr_e(
87
-                               'Click here to resend the Registration Confirmation email',
88
-                               'event_espresso'
89
-                           ); ?>"
87
+							   'Click here to resend the Registration Confirmation email',
88
+							   'event_espresso'
89
+						   ); ?>"
90 90
                            rel="<?php echo esc_attr($registration->reg_url_link()); ?>"
91 91
                         >
92 92
                             <span class="dashicons dashicons-email-alt"></span>
@@ -100,27 +100,27 @@  discard block
 block discarded – undo
100 100
                 <td width="35%" class="jst-left">
101 101
                     <?php $registration->e_pretty_status(true) ?>
102 102
                     <?php
103
-                    if ($registration->status_ID() === EEM_Registration::status_id_wait_list) {
104
-                        $wait_list = true;
105
-                    }
106
-                    ?>
103
+					if ($registration->status_ID() === EEM_Registration::status_id_wait_list) {
104
+						$wait_list = true;
105
+					}
106
+					?>
107 107
                 </td>
108 108
             </tr>
109 109
             <?php do_action(
110
-                'AHEE__thank_you_page_registration_details_template__after_registration_table_row',
111
-                $registration
112
-            ); ?>
110
+				'AHEE__thank_you_page_registration_details_template__after_registration_table_row',
111
+				$registration
112
+			); ?>
113 113
             <?php
114
-            $event_name = $registration->event_name();
115
-        }
116
-        if ($reg_cntr >= $reg_count) {
117
-            ?>
114
+			$event_name = $registration->event_name();
115
+		}
116
+		if ($reg_cntr >= $reg_count) {
117
+			?>
118 118
             </tbody>
119 119
             </table>
120 120
             <?php
121
-        }
122
-    }
123
-    ?>
121
+		}
122
+	}
123
+	?>
124 124
     <?php if ($is_primary && $SPCO_attendee_information_url) { ?>
125 125
         <p class="small-text jst-rght">
126 126
             <a href='<?php echo esc_url_raw($SPCO_attendee_information_url) ?>'>
@@ -129,22 +129,22 @@  discard block
 block discarded – undo
129 129
         </p>
130 130
     <?php } ?>
131 131
     <?php
132
-    if ($wait_list) {
133
-        echo apply_filters(
134
-            'AFEE__thank_you_page_registration_details_template__wait_list_notice',
135
-            sprintf(
136
-                esc_html__(
137
-                    '%1$sre: Wait List Registrations%2$sPlease note that the total cost listed below in the Transaction Details is for ALL registrations, including those that are on the wait list, even though they can not be currently paid for. If any spaces become available however, you may be notified by the Event admin and have the opportunity to secure the remaining tickets by making a payment for them.%3$s',
138
-                    'event_espresso'
139
-                ),
140
-                '<h6 class="" style="margin-bottom:.25em;"><span class="dashicons dashicons-clipboard ee-icon-size-16 purple-text"></span>',
141
-                '</h6 ><p class="ee-wait-list-notice">',
142
-                '</p ><br />'
143
-            )
144
-        );
145
-    }
146
-    do_action('AHEE__thank_you_page_registration_details_template__after_registration_details');
147
-    ?>
132
+	if ($wait_list) {
133
+		echo apply_filters(
134
+			'AFEE__thank_you_page_registration_details_template__wait_list_notice',
135
+			sprintf(
136
+				esc_html__(
137
+					'%1$sre: Wait List Registrations%2$sPlease note that the total cost listed below in the Transaction Details is for ALL registrations, including those that are on the wait list, even though they can not be currently paid for. If any spaces become available however, you may be notified by the Event admin and have the opportunity to secure the remaining tickets by making a payment for them.%3$s',
138
+					'event_espresso'
139
+				),
140
+				'<h6 class="" style="margin-bottom:.25em;"><span class="dashicons dashicons-clipboard ee-icon-size-16 purple-text"></span>',
141
+				'</h6 ><p class="ee-wait-list-notice">',
142
+				'</p ><br />'
143
+			)
144
+		);
145
+	}
146
+	do_action('AHEE__thank_you_page_registration_details_template__after_registration_details');
147
+	?>
148 148
 
149 149
 </div>
150 150
 <!-- end of .registration-details -->
Please login to merge, or discard this patch.
thank_you_page/templates/thank-you-page-payment-details.template.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 <div id="espresso-thank-you-page-payment-details-dv">
18 18
     <?php
19
-    if (! empty($payments)) { ?>
19
+	if (! empty($payments)) { ?>
20 20
         <table class="ee-table">
21 21
             <thead>
22 22
             <tr>
@@ -36,37 +36,37 @@  discard block
 block discarded – undo
36 36
             </thead>
37 37
             <tbody>
38 38
             <?php
39
-            foreach ($payments as $payment) {
40
-                echo wp_kses($payment, AllowedTags::getWithFormTags());
41
-            }
42
-            ?>
39
+			foreach ($payments as $payment) {
40
+				echo wp_kses($payment, AllowedTags::getWithFormTags());
41
+			}
42
+			?>
43 43
             </tbody>
44 44
         </table>
45 45
         <?php
46
-    } else {
47
-        if ($transaction->total()) {
48
-            echo apply_filters(
49
-                'FHEE__payment_overview_template__no_payments_made',
50
-                sprintf(
51
-                    esc_html__('%sNo payments towards this transaction have been received.%s', 'event_espresso'),
52
-                    '<p class="important-notice">',
53
-                    '</p>'
54
-                )
55
-            );
56
-            do_action('AHEE__thank_you_page_payment_details_template__no_payments_made', $transaction);
57
-        } else {
58
-            echo apply_filters(
59
-                'FHEE__payment_overview_template__no_payment_required',
60
-                sprintf(
61
-                    esc_html__('%sNo payment is required for this transaction.%s', 'event_espresso'),
62
-                    '<p>',
63
-                    '</p>'
64
-                )
65
-            );
66
-            do_action('AHEE__thank_you_page_payment_details_template__no_payment_required');
67
-        }
68
-    }
69
-    echo wp_kses($gateway_content, AllowedTags::getWithFormTags());
70
-    do_action('AHEE__thank_you_page_payment_details_template__after_gateway_content', $gateway_content);
71
-    echo '<br/>';
72
-    do_action('AHEE__thank_you_page_payment_details_template__after_payment_details');
46
+	} else {
47
+		if ($transaction->total()) {
48
+			echo apply_filters(
49
+				'FHEE__payment_overview_template__no_payments_made',
50
+				sprintf(
51
+					esc_html__('%sNo payments towards this transaction have been received.%s', 'event_espresso'),
52
+					'<p class="important-notice">',
53
+					'</p>'
54
+				)
55
+			);
56
+			do_action('AHEE__thank_you_page_payment_details_template__no_payments_made', $transaction);
57
+		} else {
58
+			echo apply_filters(
59
+				'FHEE__payment_overview_template__no_payment_required',
60
+				sprintf(
61
+					esc_html__('%sNo payment is required for this transaction.%s', 'event_espresso'),
62
+					'<p>',
63
+					'</p>'
64
+				)
65
+			);
66
+			do_action('AHEE__thank_you_page_payment_details_template__no_payment_required');
67
+		}
68
+	}
69
+	echo wp_kses($gateway_content, AllowedTags::getWithFormTags());
70
+	do_action('AHEE__thank_you_page_payment_details_template__after_gateway_content', $gateway_content);
71
+	echo '<br/>';
72
+	do_action('AHEE__thank_you_page_payment_details_template__after_payment_details');
Please login to merge, or discard this patch.