Completed
Pull Request — Gutenberg/master (#499)
by Darren
53:58 queued 39:33
created
admin/new/pricing/templates/pricing_details_main_meta_box.template.php 2 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -4,40 +4,40 @@  discard block
 block discarded – undo
4 4
         <tbody>
5 5
         <tr valign="top">
6 6
             <th><label for="PRT_ID"><?php
7
-                    _e(
8
-                        'Type',
9
-                        'event_espresso'
10
-                    ); ?></label> <?php echo EEH_Template::get_help_tab_link('type_field_info'); ?></th>
7
+					_e(
8
+						'Type',
9
+						'event_espresso'
10
+					); ?></label> <?php echo EEH_Template::get_help_tab_link('type_field_info'); ?></th>
11 11
             <td>
12 12
                 <?php if ($price->type_obj() && $price->type_obj()->base_type() === 1) : ?>
13 13
                     <input type="hidden" name="PRT_ID" id="PRT_ID" value="<?php echo $price->type(); ?>"/>
14 14
                     <p><strong><?php _e('Price', 'event_espresso'); ?></strong></p>
15 15
                     <p class="description">
16 16
                         <?php
17
-                        _e(
18
-                            'This is the default base price. Every new ticket created will start off with this base price.',
19
-                            'event_espresso'
20
-                        );
21
-                        ?>
17
+						_e(
18
+							'This is the default base price. Every new ticket created will start off with this base price.',
19
+							'event_espresso'
20
+						);
21
+						?>
22 22
                     </p>
23 23
                 <?php else : ?>
24 24
                     <?php echo EEH_Form_Fields::select_input('PRT_ID', $price_types, $price->type(), 'id="PRT_ID"'); ?>
25 25
                     <p class="description">
26 26
                         <?php
27
-                            _e(
28
-                                'Price Modifier. Default items will apply to ALL new events you create.',
29
-                                'event_espresso'
30
-                            );
31
-                        ?></p>
27
+							_e(
28
+								'Price Modifier. Default items will apply to ALL new events you create.',
29
+								'event_espresso'
30
+							);
31
+						?></p>
32 32
                 <?php endif; ?>
33 33
             </td>
34 34
         </tr>
35 35
         <tr valign="top">
36 36
             <th><label for="PRC_name"><?php
37
-                    _e(
38
-                        'Name',
39
-                        'event_espresso'
40
-                    ); ?></label> <?php echo EEH_Template::get_help_tab_link('name_field_info'); ?></th>
37
+					_e(
38
+						'Name',
39
+						'event_espresso'
40
+					); ?></label> <?php echo EEH_Template::get_help_tab_link('name_field_info'); ?></th>
41 41
             <td>
42 42
                 <input class="regular-text" type="text" id="PRC_name" name="PRC_name"
43 43
                        value="<?php $price->f('PRC_name'); ?>"/>
@@ -45,22 +45,22 @@  discard block
 block discarded – undo
45 45
         </tr>
46 46
         <tr valign="top">
47 47
             <th><label for="PRC_desc"><?php
48
-                    _e(
49
-                        'Description',
50
-                        'event_espresso'
51
-                    ); ?></label> <?php echo EEH_Template::get_help_tab_link('description_field_info'); ?></th>
48
+					_e(
49
+						'Description',
50
+						'event_espresso'
51
+					); ?></label> <?php echo EEH_Template::get_help_tab_link('description_field_info'); ?></th>
52 52
             <td>
53 53
                     <textarea class="regular-text" id="PRC_desc" name="PRC_desc" rows="5"><?php
54
-                        $price->f('PRC_desc');
55
-                        ?></textarea><br/>
54
+						$price->f('PRC_desc');
55
+						?></textarea><br/>
56 56
             </td>
57 57
         </tr>
58 58
         <tr valign="top">
59 59
             <th><label for="PRC_amount"><?php
60
-                    _e(
61
-                        'Amount',
62
-                        'event_espresso'
63
-                    ); ?><?php echo EEH_Template::get_help_tab_link('amount_field_info'); ?></label></th>
60
+					_e(
61
+						'Amount',
62
+						'event_espresso'
63
+					); ?><?php echo EEH_Template::get_help_tab_link('amount_field_info'); ?></label></th>
64 64
             <td>
65 65
                 <input class="small-text ee-numeric" type="text" id="PRC_amount" name="PRC_amount"
66 66
                        value="<?php echo $price->amount(); ?>"/>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,11 @@
 block discarded – undo
20 20
                         );
21 21
                         ?>
22 22
                     </p>
23
-                <?php else : ?>
24
-                    <?php echo EEH_Form_Fields::select_input('PRT_ID', $price_types, $price->type(), 'id="PRT_ID"'); ?>
23
+                <?php else {
24
+	: ?>
25
+                    <?php echo EEH_Form_Fields::select_input('PRT_ID', $price_types, $price->type(), 'id="PRT_ID"');
26
+}
27
+?>
25 28
                     <p class="description">
26 29
                         <?php
27 30
                             _e(
Please login to merge, or discard this patch.
pricing/templates/event_tickets_datetime_attached_tickets_row.template.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -20,28 +20,28 @@  discard block
 block discarded – undo
20 20
 
21 21
             <div class="add-datetime-ticket-container">
22 22
                 <h4 class="datetime-tickets-heading"><?php
23
-                    esc_html_e(
24
-                        'Add New Ticket',
25
-                        'event_espresso'
26
-                    ); ?></h4><?php echo $add_new_datetime_ticket_help_link; ?><br>
23
+					esc_html_e(
24
+						'Add New Ticket',
25
+						'event_espresso'
26
+					); ?></h4><?php echo $add_new_datetime_ticket_help_link; ?><br>
27 27
                 <table class="add-new-ticket-table">
28 28
                     <thead>
29 29
                     <tr valign="top">
30 30
                         <td><span class="ANT_TKT_name_label"><?php
31
-                                esc_html_e(
32
-                                    'Ticket Name',
33
-                                    'event_espresso'
34
-                                ); ?></span></td>
31
+								esc_html_e(
32
+									'Ticket Name',
33
+									'event_espresso'
34
+								); ?></span></td>
35 35
                         <td><span class="ANT_TKT_goes_on_sale_label"><?php
36
-                                esc_html_e(
37
-                                    'Sale Starts',
38
-                                    'event_espresso'
39
-                                ); ?></span></td>
36
+								esc_html_e(
37
+									'Sale Starts',
38
+									'event_espresso'
39
+								); ?></span></td>
40 40
                         <td><span class="ANT_TKT_sell_until_label"><?php
41
-                                esc_html_e(
42
-                                    'Sell Until',
43
-                                    'event_espresso'
44
-                                ); ?></span></td>
41
+								esc_html_e(
42
+									'Sell Until',
43
+									'event_espresso'
44
+								); ?></span></td>
45 45
                         <td><span class="ANT_TKT_price_label"><?php esc_html_e('Price', 'event_espresso'); ?></span>
46 46
                         </td>
47 47
                         <td><span class="ANT_TKT_qty_label"><?php esc_html_e('Qty', 'event_espresso'); ?></span></td>
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
                 <div class="ee-editor-footer-container">
92 92
                     <div class="ee-editor-id-container">
93 93
                         <span class="ee-item-id"><?php
94
-                            echo $DTT_ID
95
-                                ? sprintf(
96
-                                    esc_html__('Datetime ID: %d', 'event_espresso'),
97
-                                    $DTT_ID
98
-                                )
99
-                                : ''; ?></span>
94
+							echo $DTT_ID
95
+								? sprintf(
96
+									esc_html__('Datetime ID: %d', 'event_espresso'),
97
+									$DTT_ID
98
+								)
99
+								: ''; ?></span>
100 100
                     </div>
101 101
                     <div class="save-cancel-button-container">
102 102
                         <button data-context="short-ticket" data-datetime-row="<?php echo $dtt_row; ?>"
Please login to merge, or discard this patch.
admin/new/pricing/templates/event_tickets_metabox_main.template.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@  discard block
 block discarded – undo
2 2
     <h3 class="event-tickets-datetimes-title"><span data-target=".event-datetimes-container"
3 3
                                                     class="clickable ee-collapsible<?php echo $ee_collapsible_status; ?>"><span
4 4
                 class="dashicons dashicons-clock ee-icon-size-20"></span><?php
5
-                _e(
6
-                    'Event Datetimes',
7
-                    'event_espresso'
8
-                ); ?></span></h3><?php echo $event_datetime_help_link; ?>
5
+				_e(
6
+					'Event Datetimes',
7
+					'event_espresso'
8
+				); ?></span></h3><?php echo $event_datetime_help_link; ?>
9 9
     <div class="event-datetimes-container">
10 10
         <div class="save-cancel-button-container">
11 11
             <button class="button-secondary ee-create-button datetime-create-button" data-context="datetime">
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
     </div> <!-- end .event-datetimes-container -->
40 40
     <div id="add-event-datetime" class="event-datetime-row add-dtt-row" style="display:none;">
41 41
         <h4 class="datetime-tickets-heading"><?php
42
-            _e(
43
-                'Add New Datetime',
44
-                'event_espresso'
45
-            ); ?></h4><?php echo $add_new_dtt_help_link; ?>
42
+			_e(
43
+				'Add New Datetime',
44
+				'event_espresso'
45
+			); ?></h4><?php echo $add_new_dtt_help_link; ?>
46 46
         <div>
47 47
             <table id="add-new-event-datetime-table" class="datetime-edit-table">
48 48
                 <tr>
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
                     <td class="event-datetime-column date-column">
57 57
                         <label class="add-new-event-datetime-DTT_EVT_start_label"
58 58
                                for="add-new-event-datetime-DTT_EVT_start"><?php
59
-                                _e(
60
-                                    'Event Start',
61
-                                    'event_espresso'
62
-                                ); ?></label>
59
+								_e(
60
+									'Event Start',
61
+									'event_espresso'
62
+								); ?></label>
63 63
                         <input type="text" name="add_new_datetime[DTT_EVT_start]"
64 64
                                id="add-new-event-datetime-DTT_EVT_start" class="ee-text-inp ee-datepicker"
65 65
                                data-context="start-dtt" data-date-field-context="#add-event-datetime"
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
                     <td class="event-datetime-column date-column">
70 70
                         <label class="add-new-event-datetime-DTT_EVT_end_label"
71 71
                                for="add-new-event-datetime-DTT_EVT_end"><?php
72
-                                _e(
73
-                                    'Event End',
74
-                                    'event_espresso'
75
-                                ); ?></label>
72
+								_e(
73
+									'Event End',
74
+									'event_espresso'
75
+								); ?></label>
76 76
                         <input type="text" name="add_new_datetime[DTT_EVT_end]" id="add-new-event-datetime-DTT_EVT_end"
77 77
                                class="ee-text-inp ee-datepicker" data-context="end-dtt"
78 78
                                data-date-field-context="#add-event-datetime"
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
                     <td class="event-datetime-column reg-limit-column">
83 83
                         <label class="add-new-event-datetime-DTT_EVT_end_label"
84 84
                                for="add-new-event-datetime-DTT_reg_limit"><?php
85
-                                _e(
86
-                                    'Limit',
87
-                                    'event_espresso'
88
-                                ); ?></label>
85
+								_e(
86
+									'Limit',
87
+									'event_espresso'
88
+								); ?></label>
89 89
                         <input type="text" name="add_new_datetime[DTT_reg_limit]"
90 90
                                id="add-new-event-datetime-DTT_reg_limit" class="ee-numeric ee-small-text-inp">
91 91
                     </td>
@@ -108,16 +108,16 @@  discard block
 block discarded – undo
108 108
         <h3 class="event-tickets-datetimes-title"><span data-target=".event-tickets-container"
109 109
                                                         class="clickable ee-collapsible<?php echo $ee_collapsible_status; ?>"><span
110 110
                     class="ee-icon ee-icon-tickets ee-icon-size-20"></span><?php
111
-                    _e(
112
-                        'Available Tickets',
113
-                        'event_espresso'
114
-                    ); ?></span></h3>
111
+					_e(
112
+						'Available Tickets',
113
+						'event_espresso'
114
+					); ?></span></h3>
115 115
         <div class="event-tickets-container ee-create-ticket-button"<?php echo $show_tickets_container; ?>>
116 116
             <button class="ee-create-ticket-button button-secondary ee-create-button" data-context="ticket"><?php
117
-                _e(
118
-                    'Create Ticket',
119
-                    'event_espresso'
120
-                ); ?></button>
117
+				_e(
118
+					'Create Ticket',
119
+					'event_espresso'
120
+				); ?></button>
121 121
         </div>
122 122
         <div style="clear:both"></div>
123 123
         <div class="event-tickets-container"<?php echo $show_tickets_container; ?>>
Please login to merge, or discard this patch.
admin/new/pricing/templates/event_tickets_datetime_ticket_row.template.php 3 patches
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <tr valign="top" class="ee-ticket-sortable ticket-row<?php echo $ticket_archive_class;
2 2
 if (WP_DEBUG) {
3
-    echo ' ee-wp-debug';
3
+	echo ' ee-wp-debug';
4 4
 } ?>" id="display-ticketrow-<?php echo $tkt_row; ?>">
5 5
     <!--<td class="ee-tkt-order-field"><span class="dashicons dashicons-sort<?php echo $tkt_status_class; ?>"><input type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_order]" class="edit-ticket-TKT_order" value ="<?php echo $TKT_order; ?>" ></span></td>-->
6 6
     <td class="ee-tkt-order-field"><span
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
                    class="edit-ticket-TKT_row" value="<?php echo $tkt_row; ?>">
108 108
 
109 109
             <!--<div class="total-price-container"><?php printf(
110
-                esc_html__('Total Final Price: %s', 'event_espresso'),
111
-                '<span class="ticket-price-amount">' . $TKT_price . '</span>'
112
-            ); ?> </div>-->
110
+				esc_html__('Total Final Price: %s', 'event_espresso'),
111
+				'<span class="ticket-price-amount">' . $TKT_price . '</span>'
112
+			); ?> </div>-->
113 113
             <textarea name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_description]"
114 114
                       class="edit-ticket-TKT_description ee-full-textarea-inp"
115 115
                       placeholder="Ticket Description"><?php echo $TKT_description; ?></textarea>
@@ -123,20 +123,20 @@  discard block
 block discarded – undo
123 123
                     <thead>
124 124
                     <tr valign="bottom">
125 125
                         <td><span class="TD_TKT_number_datetimes_label"><?php
126
-                                esc_html_e(
127
-                                    '# Datetimes',
128
-                                    'event_espresso'
129
-                                ); ?></span></td>
126
+								esc_html_e(
127
+									'# Datetimes',
128
+									'event_espresso'
129
+								); ?></span></td>
130 130
                         <td><span class="TD_TKT_min_qty_label"><?php
131
-                                esc_html_e(
132
-                                    'Minimum Quantity',
133
-                                    'event_espresso'
134
-                                ); ?></span></td>
131
+								esc_html_e(
132
+									'Minimum Quantity',
133
+									'event_espresso'
134
+								); ?></span></td>
135 135
                         <td><span class="TD_TKT_max_qty_label"><?php
136
-                                esc_html_e(
137
-                                    'Maximum Quantity',
138
-                                    'event_espresso'
139
-                                ); ?></span></td>
136
+								esc_html_e(
137
+									'Maximum Quantity',
138
+									'event_espresso'
139
+								); ?></span></td>
140 140
                     </tr>
141 141
                     </thead>
142 142
                     <tbody>
@@ -194,24 +194,24 @@  discard block
 block discarded – undo
194 194
                     <input type="checkbox"
195 195
                            name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_required]"
196 196
                            class="edit-ticket-TKT_required" value="1"<?php
197
-                            echo $TKT_required
198
-                                ? ' checked="checked"'
199
-                                : '';
200
-                            echo $disabled
201
-                                ? ' disabled'
202
-                                : ''; ?>>
197
+							echo $TKT_required
198
+								? ' checked="checked"'
199
+								: '';
200
+							echo $disabled
201
+								? ' disabled'
202
+								: ''; ?>>
203 203
                     <label for="edit-ticket-TKT_required"><?php
204
-                        esc_html_e(
205
-                            'This ticket is required (will appear first in frontend ticket lists).',
206
-                            'event_espresso'
207
-                        ); ?></label>
204
+						esc_html_e(
205
+							'This ticket is required (will appear first in frontend ticket lists).',
206
+							'event_espresso'
207
+						); ?></label>
208 208
                 </div>
209 209
                 <div class="ticket-is-taxable-container">
210 210
                     <?php if (! empty($tax_rows)) { ?>
211 211
                     <?php if ($disabled) : ?>
212 212
                         <?php
213
-                        $tax_value = ! empty($TKT_taxable) ? 1 : 0;
214
-                        ?>
213
+						$tax_value = ! empty($TKT_taxable) ? 1 : 0;
214
+						?>
215 215
                         <input class="TKT-taxable-checkbox" type="hidden"
216 216
                                name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_taxable]"
217 217
                                value="<?php echo $tax_value; ?>">
@@ -225,16 +225,16 @@  discard block
 block discarded – undo
225 225
                                value="1"<?php echo $TKT_taxable; ?>>
226 226
                     <?php endif; ?>
227 227
                     <label for="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>"> <?php
228
-                        esc_html_e('This ticket is taxable.', 'event_espresso'); ?>
228
+						esc_html_e('This ticket is taxable.', 'event_espresso'); ?>
229 229
                     <?php } //end tax_rows check ?>
230 230
                 </div>
231 231
             </div>
232 232
             <div class="price-table-container">
233 233
                 <h4 class="tickets-heading price-table-info"<?php echo $show_price_modifier; ?>><?php
234
-                    esc_html_e(
235
-                        'Price Modifiers',
236
-                        'event_espresso'
237
-                    ); ?></h4>
234
+					esc_html_e(
235
+						'Price Modifiers',
236
+						'event_espresso'
237
+					); ?></h4>
238 238
                 <table class="price-table">
239 239
                     <thead class="price-table-info"<?php echo $show_price_modifier; ?>>
240 240
                     <tr>
@@ -254,10 +254,10 @@  discard block
 block discarded – undo
254 254
                     <tr class="price-subtotal-row TKT-taxes-display"<?php echo $display_subtotal; ?>>
255 255
                         <td colspan="4" class="ee-numeric">
256 256
                             <span class="TKT-taxable-subtotal-label"><strong><?php
257
-                                    esc_html_e(
258
-                                        'Subtotal',
259
-                                        'event_espresso'
260
-                                    ); ?></strong></span>
257
+									esc_html_e(
258
+										'Subtotal',
259
+										'event_espresso'
260
+									); ?></strong></span>
261 261
                         </td>
262 262
                         <td class="ee-numeric">
263 263
                             <span
@@ -290,51 +290,51 @@  discard block
 block discarded – undo
290 290
             <div style="clear:both"></div>
291 291
             <h4 class="tickets-heading"><?php esc_html_e('Event Datetimes', 'event_espresso'); ?></h4>
292 292
             <p><?php
293
-                esc_html_e(
294
-                    'This ticket will be usable (allow entrance) for the following selected event datetimes (click to select).  The "# Datetimes" amount (above) indicates how many of the assigned datetimes the ticket holder can gain access to:',
295
-                    'event_espresso'
296
-                ); ?></p>
293
+				esc_html_e(
294
+					'This ticket will be usable (allow entrance) for the following selected event datetimes (click to select).  The "# Datetimes" amount (above) indicates how many of the assigned datetimes the ticket holder can gain access to:',
295
+					'event_espresso'
296
+				); ?></p>
297 297
             <ul class="datetime-tickets-list">
298 298
                 <?php echo $ticket_datetimes_list; ?>
299 299
             </ul>
300 300
 
301 301
             <?php do_action(
302
-                'AHEE__event_tickets_datetime_ticket_row_template__advanced_details_end',
303
-                $tkt_row,
304
-                $TKT_ID
305
-            ); ?>
302
+				'AHEE__event_tickets_datetime_ticket_row_template__advanced_details_end',
303
+				$tkt_row,
304
+				$TKT_ID
305
+			); ?>
306 306
             <div class="ee-editor-footer-container">
307 307
                 <div class="ee-editor-id-container">
308 308
                     <span class="ee-item-id"><?php echo
309
-                        $TKT_ID
310
-                            ? sprintf(
311
-                                esc_html__('Ticket ID: %d', 'event_espresso'),
312
-                                $TKT_ID
313
-                            )
314
-                            : ''; ?></span>
309
+						$TKT_ID
310
+							? sprintf(
311
+								esc_html__('Ticket ID: %d', 'event_espresso'),
312
+								$TKT_ID
313
+							)
314
+							: ''; ?></span>
315 315
                 </div>
316 316
                 <div class="save-cancel-button-container">
317 317
                     <label for="edit-ticket-TKT_is_default_selector"><?php
318
-                        esc_html_e(
319
-                            'use this new ticket as a default ticket for any new events',
320
-                            'event_espresso'
321
-                        ); ?></label>
318
+						esc_html_e(
319
+							'use this new ticket as a default ticket for any new events',
320
+							'event_espresso'
321
+						); ?></label>
322 322
                     <input type="checkbox"
323 323
                            name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_is_default_selector]"
324 324
                            class="edit-ticket-TKT_is_default_selector" value="1"<?php
325
-                            echo $disabled
326
-                                ? ' disabled'
327
-                                : ''; ?>>
325
+							echo $disabled
326
+								? ' disabled'
327
+								: ''; ?>>
328 328
                     <input type="hidden"
329 329
                            name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_is_default]"
330 330
                            class="edit-ticket-TKT_is_default" value="<?php echo $TKT_is_default; ?>">
331 331
                     <!--<button class="button-primary ee-save-button" data-context="ticket" data-ticket-row="<?php echo $tkt_row; ?>"><?php esc_html_e(
332
-                        'Update Ticket',
333
-                        'event_espresso'
334
-                    ); ?></button>-->
332
+						'Update Ticket',
333
+						'event_espresso'
334
+					); ?></button>-->
335 335
                     <button class="button-secondary ee-cancel-button" data-context="ticket"
336 336
                             data-ticket-row="<?php echo $tkt_row; ?>"><?php
337
-                                    esc_html_e('Close', 'event_espresso'); ?></button>
337
+									esc_html_e('Close', 'event_espresso'); ?></button>
338 338
                 </div>
339 339
             </div>
340 340
             <!-- these hidden inputs are for tracking changes in dtts attached to tickets during a js session -->
@@ -356,47 +356,47 @@  discard block
 block discarded – undo
356 356
 </tr>
357 357
 <?php
358 358
 /**
359
- * template args in use
360
- *
361
- * $tkt_row
362
- * $tkt_status_class
363
- * $TKT_name
364
- * $TKT_start_date
365
- * $TKT_end_date
366
- * $TKT_status
367
- * $TKT_price
368
- * $TKT_qty
369
- * $TKT_uses
370
- * $TKT_min
371
- * $TKT_max
372
- * $TKT_sold
373
- * $TKT_registrations
374
- * $TKT_ID
375
- * $TKT_description
376
- * $TKT_is_default
377
- * $TKT_price_rows
378
- * $TKT_base_price
379
- * $TKT_base_price_ID
380
- * $TKT_order
381
- * $disabled
382
- * $ticket_archive_class
383
- * $trash_icon
384
- * $trash_hidden
385
- * $clone_icon
386
- * $display_edit_tkt_row
387
- * $edit_tkt_expanded
388
- *
389
- * $TKT_taxable
390
- * $display_subtotal
391
- * $TKT_subtotal_amount
392
- * $tax_rows
393
- *
394
- * $show_price_modifier;
395
- * $total_price_rows
396
- * $ticket_datetimes_list
397
- * $starting_ticket_datetime_rows (datetimes attached to ticket on page load)
398
- * $existing_ticket_price_ids;
399
- * $ticket_template_id;
400
- * $show_price_modifier
401
- * $show_price_mod_button
402
- */
359
+									 * template args in use
360
+									 *
361
+									 * $tkt_row
362
+									 * $tkt_status_class
363
+									 * $TKT_name
364
+									 * $TKT_start_date
365
+									 * $TKT_end_date
366
+									 * $TKT_status
367
+									 * $TKT_price
368
+									 * $TKT_qty
369
+									 * $TKT_uses
370
+									 * $TKT_min
371
+									 * $TKT_max
372
+									 * $TKT_sold
373
+									 * $TKT_registrations
374
+									 * $TKT_ID
375
+									 * $TKT_description
376
+									 * $TKT_is_default
377
+									 * $TKT_price_rows
378
+									 * $TKT_base_price
379
+									 * $TKT_base_price_ID
380
+									 * $TKT_order
381
+									 * $disabled
382
+									 * $ticket_archive_class
383
+									 * $trash_icon
384
+									 * $trash_hidden
385
+									 * $clone_icon
386
+									 * $display_edit_tkt_row
387
+									 * $edit_tkt_expanded
388
+									 *
389
+									 * $TKT_taxable
390
+									 * $display_subtotal
391
+									 * $TKT_subtotal_amount
392
+									 * $tax_rows
393
+									 *
394
+									 * $show_price_modifier;
395
+									 * $total_price_rows
396
+									 * $ticket_datetimes_list
397
+									 * $starting_ticket_datetime_rows (datetimes attached to ticket on page load)
398
+									 * $existing_ticket_price_ids;
399
+									 * $ticket_template_id;
400
+									 * $show_price_modifier
401
+									 * $show_price_mod_button
402
+									 */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
             <!--<div class="total-price-container"><?php printf(
110 110
                 esc_html__('Total Final Price: %s', 'event_espresso'),
111
-                '<span class="ticket-price-amount">' . $TKT_price . '</span>'
111
+                '<span class="ticket-price-amount">'.$TKT_price.'</span>'
112 112
             ); ?> </div>-->
113 113
             <textarea name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_description]"
114 114
                       class="edit-ticket-TKT_description ee-full-textarea-inp"
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                         ); ?></label>
208 208
                 </div>
209 209
                 <div class="ticket-is-taxable-container">
210
-                    <?php if (! empty($tax_rows)) { ?>
210
+                    <?php if ( ! empty($tax_rows)) { ?>
211 211
                     <?php if ($disabled) : ?>
212 212
                         <?php
213 213
                         $tax_value = ! empty($TKT_taxable) ? 1 : 0;
Please login to merge, or discard this patch.
Braces   +40 added lines, -16 removed lines patch added patch discarded remove patch
@@ -19,8 +19,11 @@  discard block
 block discarded – undo
19 19
                    class="edit-ticket-TKT_start_date ee-text-inp" value="<?php echo $TKT_start_date; ?>">
20 20
             <input type="text" name="archived_ticket[TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp"
21 21
                    value="<?php echo $TKT_start_date; ?>" disabled>
22
-        <?php else : ?>
23
-            <input id="edit-ticket-TKT_start_date-<?php echo $tkt_row; ?>" type="text"
22
+        <?php else {
23
+	: ?>
24
+            <input id="edit-ticket-TKT_start_date-<?php echo $tkt_row;
25
+}
26
+?>" type="text"
24 27
                    name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_start_date]"
25 28
                    class="edit-ticket-TKT_start_date ee-text-inp ee-datepicker" value="<?php echo $TKT_start_date; ?>"
26 29
                    data-context="start-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>"
@@ -34,8 +37,11 @@  discard block
 block discarded – undo
34 37
                    class="edit-ticket-TKT_end_date ee-text-inp" value="<?php echo $TKT_end_date; ?>">
35 38
             <input type="text" name="archived_ticket[TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp"
36 39
                    value="<?php echo $TKT_end_date; ?>" disabled>
37
-        <?php else : ?>
38
-            <input id="edit-ticket-TKT_end_date-<?php echo $tkt_row; ?>" type="text"
40
+        <?php else {
41
+	: ?>
42
+            <input id="edit-ticket-TKT_end_date-<?php echo $tkt_row;
43
+}
44
+?>" type="text"
39 45
                    name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_end_date]"
40 46
                    class="edit-ticket-TKT_end_date ee-text-inp ee-datepicker" value="<?php echo $TKT_end_date; ?>"
41 47
                    data-context="end-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>"
@@ -51,8 +57,11 @@  discard block
 block discarded – undo
51 57
             <input type="text" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_base_price]"
52 58
                    class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric"
53 59
                    value="<?php echo $TKT_base_price; ?>" disabled>
54
-        <?php else : ?>
55
-            <input id="edit-ticket-TKT_base_price-<?php echo $tkt_row; ?>" type="text"
60
+        <?php else {
61
+	: ?>
62
+            <input id="edit-ticket-TKT_base_price-<?php echo $tkt_row;
63
+}
64
+?>" type="text"
56 65
                    name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price]"
57 66
                    class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric"
58 67
                    value="<?php echo $TKT_base_price; ?>">
@@ -69,8 +78,11 @@  discard block
 block discarded – undo
69 78
             <input type="text" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric"
70 79
                    name="archived_ticket[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>"
71 80
                    disabled>
72
-        <?php else : ?>
73
-            <input type="text" id="edit-ticket-TKT_qty-<?php echo $tkt_row; ?>"
81
+        <?php else {
82
+	: ?>
83
+            <input type="text" id="edit-ticket-TKT_qty-<?php echo $tkt_row;
84
+}
85
+?>"
74 86
                    class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric"
75 87
                    name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_qty]"
76 88
                    value="<?php echo $TKT_qty_for_input; ?>">
@@ -149,9 +161,12 @@  discard block
 block discarded – undo
149 161
                                 <input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric"
150 162
                                        name="archived_ticket[<?php echo $tkt_row; ?>][TKT_uses]"
151 163
                                        value="<?php echo $TKT_uses; ?>" disabled>
152
-                            <?php else : ?>
164
+                            <?php else {
165
+	: ?>
153 166
                                 <input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric"
154
-                                       name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_uses]"
167
+                                       name="<?php echo $edit_tickets_name;
168
+}
169
+?>[<?php echo $tkt_row; ?>][TKT_uses]"
155 170
                                        value="<?php echo $TKT_uses; ?>">
156 171
                             <?php endif; ?>
157 172
                         </td>
@@ -163,9 +178,12 @@  discard block
 block discarded – undo
163 178
                                 <input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric"
164 179
                                        name="archived_ticket[<?php echo $tkt_row; ?>][TKT_min]"
165 180
                                        value="<?php echo $TKT_min; ?>" disabled>
166
-                            <?php else : ?>
181
+                            <?php else {
182
+	: ?>
167 183
                                 <input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric"
168
-                                       name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_min]"
184
+                                       name="<?php echo $edit_tickets_name;
185
+}
186
+?>[<?php echo $tkt_row; ?>][TKT_min]"
169 187
                                        value="<?php echo $TKT_min; ?>">
170 188
                             <?php endif; ?>
171 189
                         </td>
@@ -177,9 +195,12 @@  discard block
 block discarded – undo
177 195
                                 <input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric"
178 196
                                        name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]"
179 197
                                        value="<?php echo $TKT_max; ?>" disabled>
180
-                            <?php else : ?>
198
+                            <?php else {
199
+	: ?>
181 200
                                 <input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric"
182
-                                       name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]"
201
+                                       name="<?php echo $edit_tickets_name;
202
+}
203
+?>[<?php echo $tkt_row; ?>][TKT_max]"
183 204
                                        value="<?php echo $TKT_max; ?>">
184 205
                             <?php endif; ?>
185 206
                         </td>
@@ -218,8 +239,11 @@  discard block
 block discarded – undo
218 239
                         <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>"
219 240
                                type="checkbox" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_taxable]"
220 241
                                value="1"<?php echo $TKT_taxable; ?> disabled>
221
-                    <?php else : ?>
222
-                        <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>"
242
+                    <?php else {
243
+	: ?>
244
+                        <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row;
245
+}
246
+?>"
223 247
                                type="checkbox"
224 248
                                name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_taxable]"
225 249
                                value="1"<?php echo $TKT_taxable; ?>>
Please login to merge, or discard this patch.
caffeinated/admin/new/pricing/Pricing_Admin_Page_Init.core.php 2 patches
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -14,52 +14,52 @@
 block discarded – undo
14 14
 {
15 15
 
16 16
 
17
-    /**
18
-     *        constructor
19
-     *
20
-     * @Constructor
21
-     * @access public
22
-     * @return Pricing_Admin_Page_Init
23
-     */
24
-    public function __construct()
25
-    {
17
+	/**
18
+	 *        constructor
19
+	 *
20
+	 * @Constructor
21
+	 * @access public
22
+	 * @return Pricing_Admin_Page_Init
23
+	 */
24
+	public function __construct()
25
+	{
26 26
 
27
-        do_action('AHEE_log', __FILE__, __FUNCTION__, '');
27
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
28 28
 
29
-        define('PRICING_PG_SLUG', 'pricing');
30
-        define('PRICING_LABEL', __('Pricing', 'event_espresso'));
31
-        define('PRICING_PG_NAME', ucwords(str_replace('_', '', PRICING_PG_SLUG)));
32
-        define('PRICING_ADMIN', EE_CORE_CAF_ADMIN . 'new' . DS . PRICING_PG_SLUG . DS);
33
-        define('PRICING_ADMIN_URL', admin_url('admin.php?page=' . PRICING_PG_SLUG));
34
-        define('PRICING_ASSETS_PATH', PRICING_ADMIN . 'assets' . DS);
35
-        define('PRICING_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . PRICING_PG_SLUG . '/assets/');
36
-        define('PRICING_TEMPLATE_PATH', PRICING_ADMIN . 'templates' . DS);
37
-        define('PRICING_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . PRICING_PG_SLUG . DS . 'templates/');
29
+		define('PRICING_PG_SLUG', 'pricing');
30
+		define('PRICING_LABEL', __('Pricing', 'event_espresso'));
31
+		define('PRICING_PG_NAME', ucwords(str_replace('_', '', PRICING_PG_SLUG)));
32
+		define('PRICING_ADMIN', EE_CORE_CAF_ADMIN . 'new' . DS . PRICING_PG_SLUG . DS);
33
+		define('PRICING_ADMIN_URL', admin_url('admin.php?page=' . PRICING_PG_SLUG));
34
+		define('PRICING_ASSETS_PATH', PRICING_ADMIN . 'assets' . DS);
35
+		define('PRICING_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . PRICING_PG_SLUG . '/assets/');
36
+		define('PRICING_TEMPLATE_PATH', PRICING_ADMIN . 'templates' . DS);
37
+		define('PRICING_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . PRICING_PG_SLUG . DS . 'templates/');
38 38
 
39
-        parent::__construct();
40
-        $this->_folder_path = EE_CORE_CAF_ADMIN . 'new' . DS . $this->_folder_name . DS;
41
-    }
39
+		parent::__construct();
40
+		$this->_folder_path = EE_CORE_CAF_ADMIN . 'new' . DS . $this->_folder_name . DS;
41
+	}
42 42
 
43 43
 
44
-    protected function _set_init_properties()
45
-    {
46
-        $this->label = PRICING_LABEL;
47
-    }
44
+	protected function _set_init_properties()
45
+	{
46
+		$this->label = PRICING_LABEL;
47
+	}
48 48
 
49 49
 
50
-    protected function _set_menu_map()
51
-    {
52
-        $this->_menu_map = new EE_Admin_Page_Sub_Menu(
53
-            array(
54
-                'menu_group'      => 'management',
55
-                'menu_order'      => 20,
56
-                'show_on_menu'    => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
57
-                'parent_slug'     => 'espresso_events',
58
-                'menu_slug'       => PRICING_PG_SLUG,
59
-                'menu_label'      => PRICING_LABEL,
60
-                'capability'      => 'ee_read_default_prices',
61
-                'admin_init_page' => $this,
62
-            )
63
-        );
64
-    }
50
+	protected function _set_menu_map()
51
+	{
52
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(
53
+			array(
54
+				'menu_group'      => 'management',
55
+				'menu_order'      => 20,
56
+				'show_on_menu'    => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
57
+				'parent_slug'     => 'espresso_events',
58
+				'menu_slug'       => PRICING_PG_SLUG,
59
+				'menu_label'      => PRICING_LABEL,
60
+				'capability'      => 'ee_read_default_prices',
61
+				'admin_init_page' => $this,
62
+			)
63
+		);
64
+	}
65 65
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@
 block discarded – undo
29 29
         define('PRICING_PG_SLUG', 'pricing');
30 30
         define('PRICING_LABEL', __('Pricing', 'event_espresso'));
31 31
         define('PRICING_PG_NAME', ucwords(str_replace('_', '', PRICING_PG_SLUG)));
32
-        define('PRICING_ADMIN', EE_CORE_CAF_ADMIN . 'new' . DS . PRICING_PG_SLUG . DS);
33
-        define('PRICING_ADMIN_URL', admin_url('admin.php?page=' . PRICING_PG_SLUG));
34
-        define('PRICING_ASSETS_PATH', PRICING_ADMIN . 'assets' . DS);
35
-        define('PRICING_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . PRICING_PG_SLUG . '/assets/');
36
-        define('PRICING_TEMPLATE_PATH', PRICING_ADMIN . 'templates' . DS);
37
-        define('PRICING_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . PRICING_PG_SLUG . DS . 'templates/');
32
+        define('PRICING_ADMIN', EE_CORE_CAF_ADMIN.'new'.DS.PRICING_PG_SLUG.DS);
33
+        define('PRICING_ADMIN_URL', admin_url('admin.php?page='.PRICING_PG_SLUG));
34
+        define('PRICING_ASSETS_PATH', PRICING_ADMIN.'assets'.DS);
35
+        define('PRICING_ASSETS_URL', EE_CORE_CAF_ADMIN_URL.'new'.DS.PRICING_PG_SLUG.'/assets/');
36
+        define('PRICING_TEMPLATE_PATH', PRICING_ADMIN.'templates'.DS);
37
+        define('PRICING_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL.'new'.DS.PRICING_PG_SLUG.DS.'templates/');
38 38
 
39 39
         parent::__construct();
40
-        $this->_folder_path = EE_CORE_CAF_ADMIN . 'new' . DS . $this->_folder_name . DS;
40
+        $this->_folder_path = EE_CORE_CAF_ADMIN.'new'.DS.$this->_folder_name.DS;
41 41
     }
42 42
 
43 43
 
Please login to merge, or discard this patch.
caffeinated/admin/new/tickets/Tickets_Admin_Page.core.php 2 patches
Indentation   +308 added lines, -308 removed lines patch added patch discarded remove patch
@@ -12,312 +12,312 @@
 block discarded – undo
12 12
 {
13 13
 
14 14
 
15
-    protected function _init_page_props()
16
-    {
17
-        $this->page_slug = TICKETS_PG_SLUG;
18
-        $this->page_label = TICKETS_LABEL;
19
-        $this->_admin_base_url = TICKETS_ADMIN_URL;
20
-        $this->_admin_base_path = TICKETS_ADMIN;
21
-    }
22
-
23
-
24
-    protected function _ajax_hooks()
25
-    {
26
-    }
27
-
28
-
29
-    protected function _define_page_props()
30
-    {
31
-        $this->_admin_page_title = TICKETS_LABEL;
32
-        $this->_labels = array(
33
-            'buttons' => array(
34
-                'add'    => __('Add New Default Ticket', 'event_espresso'),
35
-                'edit'   => __('Edit Default Ticket', 'event_espresso'),
36
-                'delete' => __('Delete Default Ticket', 'event_espresso'),
37
-            ),
38
-        );
39
-    }
40
-
41
-
42
-    protected function _set_page_routes()
43
-    {
44
-
45
-        $tkt_id = ! empty($this->_req_data['TKT_ID']) && ! is_array($this->_req_data['TKT_ID'])
46
-            ? $this->_req_data['TKT_ID'] : 0;
47
-
48
-        $this->_page_routes = array(
49
-            'default'         => array(
50
-                'func'       => '_tickets_overview_list_table',
51
-                'capability' => 'ee_read_default_tickets',
52
-            ),
53
-            'trash_ticket'    => array(
54
-                'func'       => '_trash_or_restore_ticket',
55
-                'noheader'   => true,
56
-                'args'       => array('trash' => true),
57
-                'capability' => 'ee_delete_default_ticket',
58
-                'obj_id'     => $tkt_id,
59
-            ),
60
-            'trash_tickets'   => array(
61
-                'func'       => '_trash_or_restore_ticket',
62
-                'noheader'   => true,
63
-                'args'       => array('trash' => true),
64
-                'capability' => 'ee_delete_default_tickets',
65
-            ),
66
-            'restore_ticket'  => array(
67
-                'func'       => '_trash_or_restore_ticket',
68
-                'noheader'   => true,
69
-                'capability' => 'ee_delete_default_ticket',
70
-                'obj_id'     => $tkt_id,
71
-            ),
72
-            'restore_tickets' => array(
73
-                'func'       => '_trash_or_restore_ticket',
74
-                'noheader'   => true,
75
-                'capability' => 'ee_delete_default_tickets',
76
-            ),
77
-            'delete_ticket'   => array(
78
-                'func'       => '_delete_ticket',
79
-                'noheader'   => true,
80
-                'capability' => 'ee_delete_default_ticket',
81
-                'obj_id'     => $tkt_id,
82
-            ),
83
-            'delete_tickets'  => array(
84
-                'func'       => '_delete_ticket',
85
-                'noheader'   => true,
86
-                'capability' => 'ee_delete_default_tickets',
87
-            ),
88
-        );
89
-    }
90
-
91
-
92
-    protected function _set_page_config()
93
-    {
94
-        $this->_page_config = array(
95
-            'default' => array(
96
-                'nav'           => array(
97
-                    'label' => __('Default Tickets', 'event_espresso'),
98
-                    'order' => 10,
99
-                ),
100
-                'list_table'    => 'Tickets_List_Table',
101
-                'require_nonce' => false,
102
-            ),
103
-        );
104
-    }
105
-
106
-
107
-    protected function _add_screen_options()
108
-    {
109
-    }
110
-
111
-    protected function _add_screen_options_default()
112
-    {
113
-        $this->_per_page_screen_option();
114
-    }
115
-
116
-
117
-    protected function _add_feature_pointers()
118
-    {
119
-    }
120
-
121
-    public function load_scripts_styles()
122
-    {
123
-    }
124
-
125
-    public function load_scripts_styles_default()
126
-    {
127
-    }
128
-
129
-    public function admin_footer_scripts()
130
-    {
131
-    }
132
-
133
-    public function admin_init()
134
-    {
135
-    }
136
-
137
-    public function admin_notices()
138
-    {
139
-    }
140
-
141
-
142
-    public function _set_list_table_views_default()
143
-    {
144
-        $this->_views = array(
145
-            'all'     => array(
146
-                'slug'        => 'all',
147
-                'label'       => __('All', 'event_espresso'),
148
-                'count'       => 0,
149
-                'bulk_action' => array(
150
-                    'trash_tickets' => __('Move to Trash', 'event_espresso'),
151
-                ),
152
-            ),
153
-            'trashed' => array(
154
-                'slug'        => 'trashed',
155
-                'label'       => __('Trash', 'event_espresso'),
156
-                'count'       => 0,
157
-                'bulk_action' => array(
158
-                    'restore_tickets' => __('Restore from Trash', 'event_espresso'),
159
-                    'delete_tickets'  => __('Delete Permanently', 'event_espresso'),
160
-                ),
161
-            ),
162
-        );
163
-    }
164
-
165
-
166
-    public function _tickets_overview_list_table()
167
-    {
168
-        $this->_search_btn_label = __('Tickets', 'event_espresso');
169
-        $this->display_admin_list_table_page_with_no_sidebar();
170
-    }
171
-
172
-
173
-    public function get_default_tickets($per_page = 10, $count = false, $trashed = false)
174
-    {
175
-
176
-        $orderby = empty($this->_req_data['orderby']) ? 'TKT_name' : $this->_req_data['orderby'];
177
-        $order = empty($this->_req_data['order']) ? 'ASC' : $order;
178
-
179
-        switch ($orderby) {
180
-            case 'TKT_name':
181
-                $orderby = array('TKT_name' => $order);
182
-                break;
183
-
184
-            case 'TKT_price':
185
-                $orderby = array('TKT_price' => $order);
186
-                break;
187
-
188
-            case 'TKT_uses':
189
-                $orderby = array('TKT_uses' => $order);
190
-                break;
191
-
192
-            case 'TKT_min':
193
-                $orderby = array('TKT_min' => $order);
194
-                break;
195
-
196
-            case 'TKT_max':
197
-                $orderby = array('TKT_max' => $order);
198
-                break;
199
-
200
-            case 'TKT_qty':
201
-                $orderby = array('TKT_qty' => $order);
202
-                break;
203
-        }
204
-
205
-        $current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged'])
206
-            ? $this->_req_data['paged'] : 1;
207
-        $per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage'])
208
-            ? $this->_req_data['perpage'] : $per_page;
209
-
210
-        $_where = array(
211
-            'TKT_is_default' => 1,
212
-            'TKT_deleted'    => $trashed,
213
-        );
214
-
215
-        $offset = ($current_page - 1) * $per_page;
216
-        $limit = array($offset, $per_page);
217
-
218
-        if (isset($this->_req_data['s'])) {
219
-            $sstr = '%' . $this->_req_data['s'] . '%';
220
-            $_where['OR'] = array(
221
-                'TKT_name'        => array('LIKE', $sstr),
222
-                'TKT_description' => array('LIKE', $sstr),
223
-            );
224
-        }
225
-
226
-        $query_params = array(
227
-            $_where,
228
-            'order_by' => $orderby,
229
-            'limit'    => $limit,
230
-            'group_by' => 'TKT_ID',
231
-        );
232
-
233
-        if ($count) {
234
-            return EEM_Ticket::instance()->count_deleted_and_undeleted(array($_where));
235
-        } else {
236
-            return EEM_Ticket::instance()->get_all_deleted_and_undeleted($query_params);
237
-        }
238
-    }
239
-
240
-
241
-    protected function _trash_or_restore_ticket($trash = false)
242
-    {
243
-        $success = 1;
244
-
245
-        $TKT = EEM_Ticket::instance();
246
-
247
-        // checkboxes?
248
-        if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
249
-            // if array has more than one element then success message should be plural
250
-            $success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
251
-
252
-            // cycle thru the boxes
253
-            while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
254
-                if ($trash) {
255
-                    if (! $TKT->delete_by_ID($TKT_ID)) {
256
-                        $success = 0;
257
-                    }
258
-                } else {
259
-                    if (! $TKT->restore_by_ID($TKT_ID)) {
260
-                        $success = 0;
261
-                    }
262
-                }
263
-            }
264
-        } else {
265
-            // grab single id and trash
266
-            $TKT_ID = absint($this->_req_data['TKT_ID']);
267
-
268
-            if ($trash) {
269
-                if (! $TKT->delete_by_ID($TKT_ID)) {
270
-                    $success = 0;
271
-                }
272
-            } else {
273
-                if (! $TKT->restore_by_ID($TKT_ID)) {
274
-                    $success = 0;
275
-                }
276
-            }
277
-        }
278
-
279
-        $action_desc = $trash ? 'moved to the trash' : 'restored';
280
-        $this->_redirect_after_action($success, 'Tickets', $action_desc, array());
281
-    }
282
-
283
-
284
-    protected function _delete_ticket()
285
-    {
286
-        $success = 1;
287
-
288
-        $TKT = EEM_Ticket::instance();
289
-
290
-        // checkboxes?
291
-        if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
292
-            // if array has more than one element then success message should be plural
293
-            $success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
294
-
295
-            // cycle thru the boxes
296
-            while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
297
-                // delete
298
-                if (! $this->_delete_the_ticket($TKT_ID)) {
299
-                    $success = 0;
300
-                }
301
-            }
302
-        } else {
303
-            // grab single id and trash
304
-            $TKT_ID = absint($this->_req_data['TKT_ID']);
305
-            if (! $this->_delete_the_ticket($TKT_ID)) {
306
-                $success = 0;
307
-            }
308
-        }
309
-
310
-        $action_desc = 'deleted';
311
-        $this->_redirect_after_action($success, 'Tickets', $action_desc, array());
312
-    }
313
-
314
-
315
-    protected function _delete_the_ticket($TKT_ID)
316
-    {
317
-        $tkt = EEM_Ticket::instance()->get_one_by_ID($TKT_ID);
318
-
319
-        // delete all related prices first
320
-        $tkt->delete_related_permanently('Price');
321
-        return $tkt->delete_permanently();
322
-    }
15
+	protected function _init_page_props()
16
+	{
17
+		$this->page_slug = TICKETS_PG_SLUG;
18
+		$this->page_label = TICKETS_LABEL;
19
+		$this->_admin_base_url = TICKETS_ADMIN_URL;
20
+		$this->_admin_base_path = TICKETS_ADMIN;
21
+	}
22
+
23
+
24
+	protected function _ajax_hooks()
25
+	{
26
+	}
27
+
28
+
29
+	protected function _define_page_props()
30
+	{
31
+		$this->_admin_page_title = TICKETS_LABEL;
32
+		$this->_labels = array(
33
+			'buttons' => array(
34
+				'add'    => __('Add New Default Ticket', 'event_espresso'),
35
+				'edit'   => __('Edit Default Ticket', 'event_espresso'),
36
+				'delete' => __('Delete Default Ticket', 'event_espresso'),
37
+			),
38
+		);
39
+	}
40
+
41
+
42
+	protected function _set_page_routes()
43
+	{
44
+
45
+		$tkt_id = ! empty($this->_req_data['TKT_ID']) && ! is_array($this->_req_data['TKT_ID'])
46
+			? $this->_req_data['TKT_ID'] : 0;
47
+
48
+		$this->_page_routes = array(
49
+			'default'         => array(
50
+				'func'       => '_tickets_overview_list_table',
51
+				'capability' => 'ee_read_default_tickets',
52
+			),
53
+			'trash_ticket'    => array(
54
+				'func'       => '_trash_or_restore_ticket',
55
+				'noheader'   => true,
56
+				'args'       => array('trash' => true),
57
+				'capability' => 'ee_delete_default_ticket',
58
+				'obj_id'     => $tkt_id,
59
+			),
60
+			'trash_tickets'   => array(
61
+				'func'       => '_trash_or_restore_ticket',
62
+				'noheader'   => true,
63
+				'args'       => array('trash' => true),
64
+				'capability' => 'ee_delete_default_tickets',
65
+			),
66
+			'restore_ticket'  => array(
67
+				'func'       => '_trash_or_restore_ticket',
68
+				'noheader'   => true,
69
+				'capability' => 'ee_delete_default_ticket',
70
+				'obj_id'     => $tkt_id,
71
+			),
72
+			'restore_tickets' => array(
73
+				'func'       => '_trash_or_restore_ticket',
74
+				'noheader'   => true,
75
+				'capability' => 'ee_delete_default_tickets',
76
+			),
77
+			'delete_ticket'   => array(
78
+				'func'       => '_delete_ticket',
79
+				'noheader'   => true,
80
+				'capability' => 'ee_delete_default_ticket',
81
+				'obj_id'     => $tkt_id,
82
+			),
83
+			'delete_tickets'  => array(
84
+				'func'       => '_delete_ticket',
85
+				'noheader'   => true,
86
+				'capability' => 'ee_delete_default_tickets',
87
+			),
88
+		);
89
+	}
90
+
91
+
92
+	protected function _set_page_config()
93
+	{
94
+		$this->_page_config = array(
95
+			'default' => array(
96
+				'nav'           => array(
97
+					'label' => __('Default Tickets', 'event_espresso'),
98
+					'order' => 10,
99
+				),
100
+				'list_table'    => 'Tickets_List_Table',
101
+				'require_nonce' => false,
102
+			),
103
+		);
104
+	}
105
+
106
+
107
+	protected function _add_screen_options()
108
+	{
109
+	}
110
+
111
+	protected function _add_screen_options_default()
112
+	{
113
+		$this->_per_page_screen_option();
114
+	}
115
+
116
+
117
+	protected function _add_feature_pointers()
118
+	{
119
+	}
120
+
121
+	public function load_scripts_styles()
122
+	{
123
+	}
124
+
125
+	public function load_scripts_styles_default()
126
+	{
127
+	}
128
+
129
+	public function admin_footer_scripts()
130
+	{
131
+	}
132
+
133
+	public function admin_init()
134
+	{
135
+	}
136
+
137
+	public function admin_notices()
138
+	{
139
+	}
140
+
141
+
142
+	public function _set_list_table_views_default()
143
+	{
144
+		$this->_views = array(
145
+			'all'     => array(
146
+				'slug'        => 'all',
147
+				'label'       => __('All', 'event_espresso'),
148
+				'count'       => 0,
149
+				'bulk_action' => array(
150
+					'trash_tickets' => __('Move to Trash', 'event_espresso'),
151
+				),
152
+			),
153
+			'trashed' => array(
154
+				'slug'        => 'trashed',
155
+				'label'       => __('Trash', 'event_espresso'),
156
+				'count'       => 0,
157
+				'bulk_action' => array(
158
+					'restore_tickets' => __('Restore from Trash', 'event_espresso'),
159
+					'delete_tickets'  => __('Delete Permanently', 'event_espresso'),
160
+				),
161
+			),
162
+		);
163
+	}
164
+
165
+
166
+	public function _tickets_overview_list_table()
167
+	{
168
+		$this->_search_btn_label = __('Tickets', 'event_espresso');
169
+		$this->display_admin_list_table_page_with_no_sidebar();
170
+	}
171
+
172
+
173
+	public function get_default_tickets($per_page = 10, $count = false, $trashed = false)
174
+	{
175
+
176
+		$orderby = empty($this->_req_data['orderby']) ? 'TKT_name' : $this->_req_data['orderby'];
177
+		$order = empty($this->_req_data['order']) ? 'ASC' : $order;
178
+
179
+		switch ($orderby) {
180
+			case 'TKT_name':
181
+				$orderby = array('TKT_name' => $order);
182
+				break;
183
+
184
+			case 'TKT_price':
185
+				$orderby = array('TKT_price' => $order);
186
+				break;
187
+
188
+			case 'TKT_uses':
189
+				$orderby = array('TKT_uses' => $order);
190
+				break;
191
+
192
+			case 'TKT_min':
193
+				$orderby = array('TKT_min' => $order);
194
+				break;
195
+
196
+			case 'TKT_max':
197
+				$orderby = array('TKT_max' => $order);
198
+				break;
199
+
200
+			case 'TKT_qty':
201
+				$orderby = array('TKT_qty' => $order);
202
+				break;
203
+		}
204
+
205
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged'])
206
+			? $this->_req_data['paged'] : 1;
207
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage'])
208
+			? $this->_req_data['perpage'] : $per_page;
209
+
210
+		$_where = array(
211
+			'TKT_is_default' => 1,
212
+			'TKT_deleted'    => $trashed,
213
+		);
214
+
215
+		$offset = ($current_page - 1) * $per_page;
216
+		$limit = array($offset, $per_page);
217
+
218
+		if (isset($this->_req_data['s'])) {
219
+			$sstr = '%' . $this->_req_data['s'] . '%';
220
+			$_where['OR'] = array(
221
+				'TKT_name'        => array('LIKE', $sstr),
222
+				'TKT_description' => array('LIKE', $sstr),
223
+			);
224
+		}
225
+
226
+		$query_params = array(
227
+			$_where,
228
+			'order_by' => $orderby,
229
+			'limit'    => $limit,
230
+			'group_by' => 'TKT_ID',
231
+		);
232
+
233
+		if ($count) {
234
+			return EEM_Ticket::instance()->count_deleted_and_undeleted(array($_where));
235
+		} else {
236
+			return EEM_Ticket::instance()->get_all_deleted_and_undeleted($query_params);
237
+		}
238
+	}
239
+
240
+
241
+	protected function _trash_or_restore_ticket($trash = false)
242
+	{
243
+		$success = 1;
244
+
245
+		$TKT = EEM_Ticket::instance();
246
+
247
+		// checkboxes?
248
+		if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
249
+			// if array has more than one element then success message should be plural
250
+			$success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
251
+
252
+			// cycle thru the boxes
253
+			while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
254
+				if ($trash) {
255
+					if (! $TKT->delete_by_ID($TKT_ID)) {
256
+						$success = 0;
257
+					}
258
+				} else {
259
+					if (! $TKT->restore_by_ID($TKT_ID)) {
260
+						$success = 0;
261
+					}
262
+				}
263
+			}
264
+		} else {
265
+			// grab single id and trash
266
+			$TKT_ID = absint($this->_req_data['TKT_ID']);
267
+
268
+			if ($trash) {
269
+				if (! $TKT->delete_by_ID($TKT_ID)) {
270
+					$success = 0;
271
+				}
272
+			} else {
273
+				if (! $TKT->restore_by_ID($TKT_ID)) {
274
+					$success = 0;
275
+				}
276
+			}
277
+		}
278
+
279
+		$action_desc = $trash ? 'moved to the trash' : 'restored';
280
+		$this->_redirect_after_action($success, 'Tickets', $action_desc, array());
281
+	}
282
+
283
+
284
+	protected function _delete_ticket()
285
+	{
286
+		$success = 1;
287
+
288
+		$TKT = EEM_Ticket::instance();
289
+
290
+		// checkboxes?
291
+		if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
292
+			// if array has more than one element then success message should be plural
293
+			$success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
294
+
295
+			// cycle thru the boxes
296
+			while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
297
+				// delete
298
+				if (! $this->_delete_the_ticket($TKT_ID)) {
299
+					$success = 0;
300
+				}
301
+			}
302
+		} else {
303
+			// grab single id and trash
304
+			$TKT_ID = absint($this->_req_data['TKT_ID']);
305
+			if (! $this->_delete_the_ticket($TKT_ID)) {
306
+				$success = 0;
307
+			}
308
+		}
309
+
310
+		$action_desc = 'deleted';
311
+		$this->_redirect_after_action($success, 'Tickets', $action_desc, array());
312
+	}
313
+
314
+
315
+	protected function _delete_the_ticket($TKT_ID)
316
+	{
317
+		$tkt = EEM_Ticket::instance()->get_one_by_ID($TKT_ID);
318
+
319
+		// delete all related prices first
320
+		$tkt->delete_related_permanently('Price');
321
+		return $tkt->delete_permanently();
322
+	}
323 323
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $limit = array($offset, $per_page);
217 217
 
218 218
         if (isset($this->_req_data['s'])) {
219
-            $sstr = '%' . $this->_req_data['s'] . '%';
219
+            $sstr = '%'.$this->_req_data['s'].'%';
220 220
             $_where['OR'] = array(
221 221
                 'TKT_name'        => array('LIKE', $sstr),
222 222
                 'TKT_description' => array('LIKE', $sstr),
@@ -245,18 +245,18 @@  discard block
 block discarded – undo
245 245
         $TKT = EEM_Ticket::instance();
246 246
 
247 247
         // checkboxes?
248
-        if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
248
+        if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
249 249
             // if array has more than one element then success message should be plural
250 250
             $success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
251 251
 
252 252
             // cycle thru the boxes
253 253
             while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
254 254
                 if ($trash) {
255
-                    if (! $TKT->delete_by_ID($TKT_ID)) {
255
+                    if ( ! $TKT->delete_by_ID($TKT_ID)) {
256 256
                         $success = 0;
257 257
                     }
258 258
                 } else {
259
-                    if (! $TKT->restore_by_ID($TKT_ID)) {
259
+                    if ( ! $TKT->restore_by_ID($TKT_ID)) {
260 260
                         $success = 0;
261 261
                     }
262 262
                 }
@@ -266,11 +266,11 @@  discard block
 block discarded – undo
266 266
             $TKT_ID = absint($this->_req_data['TKT_ID']);
267 267
 
268 268
             if ($trash) {
269
-                if (! $TKT->delete_by_ID($TKT_ID)) {
269
+                if ( ! $TKT->delete_by_ID($TKT_ID)) {
270 270
                     $success = 0;
271 271
                 }
272 272
             } else {
273
-                if (! $TKT->restore_by_ID($TKT_ID)) {
273
+                if ( ! $TKT->restore_by_ID($TKT_ID)) {
274 274
                     $success = 0;
275 275
                 }
276 276
             }
@@ -288,21 +288,21 @@  discard block
 block discarded – undo
288 288
         $TKT = EEM_Ticket::instance();
289 289
 
290 290
         // checkboxes?
291
-        if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
291
+        if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
292 292
             // if array has more than one element then success message should be plural
293 293
             $success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
294 294
 
295 295
             // cycle thru the boxes
296 296
             while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
297 297
                 // delete
298
-                if (! $this->_delete_the_ticket($TKT_ID)) {
298
+                if ( ! $this->_delete_the_ticket($TKT_ID)) {
299 299
                     $success = 0;
300 300
                 }
301 301
             }
302 302
         } else {
303 303
             // grab single id and trash
304 304
             $TKT_ID = absint($this->_req_data['TKT_ID']);
305
-            if (! $this->_delete_the_ticket($TKT_ID)) {
305
+            if ( ! $this->_delete_the_ticket($TKT_ID)) {
306 306
                 $success = 0;
307 307
             }
308 308
         }
Please login to merge, or discard this patch.
caffeinated/admin/new/tickets/Tickets_Admin_Page_Init.core.php 2 patches
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -28,51 +28,51 @@
 block discarded – undo
28 28
 {
29 29
 
30 30
 
31
-    /**
32
-     *        constructor
33
-     *
34
-     * @Constructor
35
-     * @access public
36
-     * @return void
37
-     */
38
-    public function __construct()
39
-    {
31
+	/**
32
+	 *        constructor
33
+	 *
34
+	 * @Constructor
35
+	 * @access public
36
+	 * @return void
37
+	 */
38
+	public function __construct()
39
+	{
40 40
 
41
-        do_action('AHEE_log', __FILE__, __FUNCTION__, '');
41
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
42 42
 
43
-        define('TICKETS_PG_SLUG', 'tickets');
44
-        define('TICKETS_LABEL', __('Default Tickets', 'event_espresso'));
45
-        define('TICKETS_ADMIN', EE_CORE_CAF_ADMIN . 'new' . DS . TICKETS_PG_SLUG . DS);
46
-        define('TICKETS_ADMIN_URL', admin_url('admin.php?page=' . TICKETS_PG_SLUG));
47
-        define('TICKETS_ASSETS_PATH', TICKETS_ADMIN . 'assets' . DS);
48
-        define('TICKETS_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . TICKETS_PG_SLUG . '/assets/');
49
-        define('TICKETS_TEMPLATE_PATH', TICKETS_ADMIN . 'templates' . DS);
50
-        define('TICKETS_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . TICKETS_PG_SLUG . DS . 'templates/');
43
+		define('TICKETS_PG_SLUG', 'tickets');
44
+		define('TICKETS_LABEL', __('Default Tickets', 'event_espresso'));
45
+		define('TICKETS_ADMIN', EE_CORE_CAF_ADMIN . 'new' . DS . TICKETS_PG_SLUG . DS);
46
+		define('TICKETS_ADMIN_URL', admin_url('admin.php?page=' . TICKETS_PG_SLUG));
47
+		define('TICKETS_ASSETS_PATH', TICKETS_ADMIN . 'assets' . DS);
48
+		define('TICKETS_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . TICKETS_PG_SLUG . '/assets/');
49
+		define('TICKETS_TEMPLATE_PATH', TICKETS_ADMIN . 'templates' . DS);
50
+		define('TICKETS_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . TICKETS_PG_SLUG . DS . 'templates/');
51 51
 
52
-        parent::__construct();
53
-        $this->_folder_path = EE_CORE_CAF_ADMIN . 'new' . DS . $this->_folder_name . DS;
54
-    }
52
+		parent::__construct();
53
+		$this->_folder_path = EE_CORE_CAF_ADMIN . 'new' . DS . $this->_folder_name . DS;
54
+	}
55 55
 
56 56
 
57
-    protected function _set_init_properties()
58
-    {
59
-        $this->label = TICKETS_LABEL;
60
-    }
57
+	protected function _set_init_properties()
58
+	{
59
+		$this->label = TICKETS_LABEL;
60
+	}
61 61
 
62 62
 
63
-    protected function _set_menu_map()
64
-    {
65
-        $this->_menu_map = new EE_Admin_Page_Sub_Menu(
66
-            array(
67
-                'menu_group'      => 'management',
68
-                'menu_order'      => 15,
69
-                'show_on_menu'    => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
70
-                'parent_slug'     => 'espresso_events',
71
-                'menu_slug'       => TICKETS_PG_SLUG,
72
-                'menu_label'      => TICKETS_LABEL,
73
-                'capability'      => 'ee_read_default_tickets',
74
-                'admin_init_page' => $this,
75
-            )
76
-        );
77
-    }
63
+	protected function _set_menu_map()
64
+	{
65
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(
66
+			array(
67
+				'menu_group'      => 'management',
68
+				'menu_order'      => 15,
69
+				'show_on_menu'    => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
70
+				'parent_slug'     => 'espresso_events',
71
+				'menu_slug'       => TICKETS_PG_SLUG,
72
+				'menu_label'      => TICKETS_LABEL,
73
+				'capability'      => 'ee_read_default_tickets',
74
+				'admin_init_page' => $this,
75
+			)
76
+		);
77
+	}
78 78
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@
 block discarded – undo
42 42
 
43 43
         define('TICKETS_PG_SLUG', 'tickets');
44 44
         define('TICKETS_LABEL', __('Default Tickets', 'event_espresso'));
45
-        define('TICKETS_ADMIN', EE_CORE_CAF_ADMIN . 'new' . DS . TICKETS_PG_SLUG . DS);
46
-        define('TICKETS_ADMIN_URL', admin_url('admin.php?page=' . TICKETS_PG_SLUG));
47
-        define('TICKETS_ASSETS_PATH', TICKETS_ADMIN . 'assets' . DS);
48
-        define('TICKETS_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . TICKETS_PG_SLUG . '/assets/');
49
-        define('TICKETS_TEMPLATE_PATH', TICKETS_ADMIN . 'templates' . DS);
50
-        define('TICKETS_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . TICKETS_PG_SLUG . DS . 'templates/');
45
+        define('TICKETS_ADMIN', EE_CORE_CAF_ADMIN.'new'.DS.TICKETS_PG_SLUG.DS);
46
+        define('TICKETS_ADMIN_URL', admin_url('admin.php?page='.TICKETS_PG_SLUG));
47
+        define('TICKETS_ASSETS_PATH', TICKETS_ADMIN.'assets'.DS);
48
+        define('TICKETS_ASSETS_URL', EE_CORE_CAF_ADMIN_URL.'new'.DS.TICKETS_PG_SLUG.'/assets/');
49
+        define('TICKETS_TEMPLATE_PATH', TICKETS_ADMIN.'templates'.DS);
50
+        define('TICKETS_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL.'new'.DS.TICKETS_PG_SLUG.DS.'templates/');
51 51
 
52 52
         parent::__construct();
53
-        $this->_folder_path = EE_CORE_CAF_ADMIN . 'new' . DS . $this->_folder_name . DS;
53
+        $this->_folder_path = EE_CORE_CAF_ADMIN.'new'.DS.$this->_folder_name.DS;
54 54
     }
55 55
 
56 56
 
Please login to merge, or discard this patch.
caffeinated/admin/extend/support/Extend_Support_Admin_Page.core.php 2 patches
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -12,71 +12,71 @@
 block discarded – undo
12 12
 class Extend_Support_Admin_Page extends Support_Admin_Page
13 13
 {
14 14
 
15
-    public function __construct($routing = true)
16
-    {
17
-        parent::__construct($routing);
18
-        define('EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'support/templates/');
19
-    }
15
+	public function __construct($routing = true)
16
+	{
17
+		parent::__construct($routing);
18
+		define('EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'support/templates/');
19
+	}
20 20
 
21 21
 
22
-    protected function _extend_page_config()
23
-    {
24
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'support';
25
-        // new routes and new configs (or overrides )
26
-        $new_page_routes = array(
27
-            'faq' => array(
28
-                'func'       => '_faq',
29
-                'capability' => 'ee_read_ee',
30
-            ),
31
-        );
32
-        $this->_page_routes = array_merge($this->_page_routes, $new_page_routes);
33
-        $new_page_config = array(
34
-            'faq' => array(
35
-                'nav'           => array(
36
-                    'label' => esc_html__('FAQ', 'event_espresso'),
37
-                    'order' => 40,
38
-                ),
39
-                'metaboxes'     => array('_espresso_news_post_box', '_espresso_links_post_box'),
40
-                'require_nonce' => false,
41
-            ),
42
-        );
43
-        $this->_page_config = array_merge($this->_page_config, $new_page_config);
44
-        $this->_page_config['default']['metaboxes'][] = '_installation_boxes';
45
-    }
22
+	protected function _extend_page_config()
23
+	{
24
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'support';
25
+		// new routes and new configs (or overrides )
26
+		$new_page_routes = array(
27
+			'faq' => array(
28
+				'func'       => '_faq',
29
+				'capability' => 'ee_read_ee',
30
+			),
31
+		);
32
+		$this->_page_routes = array_merge($this->_page_routes, $new_page_routes);
33
+		$new_page_config = array(
34
+			'faq' => array(
35
+				'nav'           => array(
36
+					'label' => esc_html__('FAQ', 'event_espresso'),
37
+					'order' => 40,
38
+				),
39
+				'metaboxes'     => array('_espresso_news_post_box', '_espresso_links_post_box'),
40
+				'require_nonce' => false,
41
+			),
42
+		);
43
+		$this->_page_config = array_merge($this->_page_config, $new_page_config);
44
+		$this->_page_config['default']['metaboxes'][] = '_installation_boxes';
45
+	}
46 46
 
47 47
 
48
-    protected function _faq()
49
-    {
50
-        $template_path = EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH . 'support_admin_details_faq.template.php';
51
-        $this->_template_args['admin_page_content'] = EEH_Template::display_template(
52
-            $template_path,
53
-            '',
54
-            true
55
-        );
56
-        $this->display_admin_page_with_sidebar();
57
-    }
48
+	protected function _faq()
49
+	{
50
+		$template_path = EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH . 'support_admin_details_faq.template.php';
51
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template(
52
+			$template_path,
53
+			'',
54
+			true
55
+		);
56
+		$this->display_admin_page_with_sidebar();
57
+	}
58 58
 
59 59
 
60
-    protected function _installation_boxes()
61
-    {
62
-        $callback_args = array(
63
-            'template_path' => EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH
64
-                               . 'support_admin_details_additional_information.template.php',
65
-        );
66
-        add_meta_box(
67
-            'espresso_additional_information_support',
68
-            esc_html__('Additional Information', 'event_espresso'),
69
-            function ($post, $metabox) {
70
-                echo EEH_Template::display_template(
71
-                    $metabox['args']['template_path'],
72
-                    '',
73
-                    true
74
-                );
75
-            },
76
-            $this->_current_screen->id,
77
-            'normal',
78
-            'high',
79
-            $callback_args
80
-        );
81
-    }
60
+	protected function _installation_boxes()
61
+	{
62
+		$callback_args = array(
63
+			'template_path' => EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH
64
+							   . 'support_admin_details_additional_information.template.php',
65
+		);
66
+		add_meta_box(
67
+			'espresso_additional_information_support',
68
+			esc_html__('Additional Information', 'event_espresso'),
69
+			function ($post, $metabox) {
70
+				echo EEH_Template::display_template(
71
+					$metabox['args']['template_path'],
72
+					'',
73
+					true
74
+				);
75
+			},
76
+			$this->_current_screen->id,
77
+			'normal',
78
+			'high',
79
+			$callback_args
80
+		);
81
+	}
82 82
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
     public function __construct($routing = true)
16 16
     {
17 17
         parent::__construct($routing);
18
-        define('EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'support/templates/');
18
+        define('EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'support/templates/');
19 19
     }
20 20
 
21 21
 
22 22
     protected function _extend_page_config()
23 23
     {
24
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'support';
24
+        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'support';
25 25
         // new routes and new configs (or overrides )
26 26
         $new_page_routes = array(
27 27
             'faq' => array(
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     protected function _faq()
49 49
     {
50
-        $template_path = EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH . 'support_admin_details_faq.template.php';
50
+        $template_path = EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH.'support_admin_details_faq.template.php';
51 51
         $this->_template_args['admin_page_content'] = EEH_Template::display_template(
52 52
             $template_path,
53 53
             '',
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         add_meta_box(
67 67
             'espresso_additional_information_support',
68 68
             esc_html__('Additional Information', 'event_espresso'),
69
-            function ($post, $metabox) {
69
+            function($post, $metabox) {
70 70
                 echo EEH_Template::display_template(
71 71
                     $metabox['args']['template_path'],
72 72
                     '',
Please login to merge, or discard this patch.
support/templates/support_admin_details_additional_information.template.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <div class="padding">
2 2
     <p><?php
3
-        printf(
4
-            esc_html__('Check out the %1$sroadmap for Event Espresso%2$s.', 'event_espresso'),
5
-            '<a href="https://trello.com/b/zg9DCIpe/event-espresso-public-roadmap" target="_blank">',
6
-            '</a>'
7
-        ); ?></p>
3
+		printf(
4
+			esc_html__('Check out the %1$sroadmap for Event Espresso%2$s.', 'event_espresso'),
5
+			'<a href="https://trello.com/b/zg9DCIpe/event-espresso-public-roadmap" target="_blank">',
6
+			'</a>'
7
+		); ?></p>
8 8
 </div>
9 9
\ No newline at end of file
Please login to merge, or discard this patch.