@@ -5,25 +5,25 @@ |
||
5 | 5 | <table class="admin-primary-mbox-tbl"> |
6 | 6 | <thead> |
7 | 7 | <tr> |
8 | - <th class="jst-left"><?php _e( '#', 'event_espresso' );?></th> |
|
9 | - <th class="jst-left"><?php _e( 'Event Name and Ticket', 'event_espresso' );?></th> |
|
10 | - <th class="jst-left"><?php _e( 'Registrant', 'event_espresso' );?></th> |
|
11 | - <th class="jst-rght"><?php _e( 'Ticket Price', 'event_espresso' );?></th> |
|
12 | - <th class="jst-left"><?php _e( 'Email', 'event_espresso' );?></th> |
|
13 | - <th class="jst-left"><?php _e( 'Address', 'event_espresso' );?></th> |
|
8 | + <th class="jst-left"><?php _e('#', 'event_espresso'); ?></th> |
|
9 | + <th class="jst-left"><?php _e('Event Name and Ticket', 'event_espresso'); ?></th> |
|
10 | + <th class="jst-left"><?php _e('Registrant', 'event_espresso'); ?></th> |
|
11 | + <th class="jst-rght"><?php _e('Ticket Price', 'event_espresso'); ?></th> |
|
12 | + <th class="jst-left"><?php _e('Email', 'event_espresso'); ?></th> |
|
13 | + <th class="jst-left"><?php _e('Address', 'event_espresso'); ?></th> |
|
14 | 14 | </tr> |
15 | 15 | </thead> |
16 | 16 | <tbody> |
17 | - <?php if ( isset( $event_attendees ) && is_array( $event_attendees )) : ?> |
|
18 | - <?php foreach ( $event_attendees as $registration => $attendee ) : ?> |
|
17 | + <?php if (isset($event_attendees) && is_array($event_attendees)) : ?> |
|
18 | + <?php foreach ($event_attendees as $registration => $attendee) : ?> |
|
19 | 19 | <tr> |
20 | - <td class="jst-left"><?php echo $attendee['att_num'];?></td> |
|
21 | - <td class="jst-left"><?php echo $attendee['event_ticket_name'];?></td> |
|
20 | + <td class="jst-left"><?php echo $attendee['att_num']; ?></td> |
|
21 | + <td class="jst-left"><?php echo $attendee['event_ticket_name']; ?></td> |
|
22 | 22 | <td class="jst-left"> |
23 | 23 | <?php |
24 | - $att_link = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$registration), REG_ADMIN_URL ); |
|
24 | + $att_link = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$registration), REG_ADMIN_URL); |
|
25 | 25 | ?> |
26 | - <a href="<?php echo $att_link; ?>" title="<?php _e( 'View details for this registrant', 'event_espresso' );?>"> |
|
26 | + <a href="<?php echo $att_link; ?>" title="<?php _e('View details for this registrant', 'event_espresso'); ?>"> |
|
27 | 27 | <?php echo $attendee['attendee']?> |
28 | 28 | </a> |
29 | 29 | </td> |
@@ -141,10 +141,13 @@ |
||
141 | 141 | <th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo $overpaid . sprintf( __( 'Payments Total %s', 'event_espresso' ), '(' . EE_Registry::instance()->CFG->currency->code . ')' );?></span></th> |
142 | 142 | <th class=" jst-rght"><span id="txn-admin-payment-total"><?php echo EEH_Template::format_currency($payment_total, FALSE, FALSE);?></span></th> |
143 | 143 | </tr> |
144 | - <?php else : ?> |
|
144 | + <?php else { |
|
145 | + : ?> |
|
145 | 146 | <tr id="txn-admin-no-payments-tr" class="admin-primary-mbox-total-tr"> |
146 | 147 | <td class=" jst-rght" colspan="11"> |
147 | - <span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' ); ?></span> |
|
148 | + <span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' ); |
|
149 | +} |
|
150 | +?></span> |
|
148 | 151 | </td> |
149 | 152 | </tr> |
150 | 153 | <tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr hidden"> |
@@ -1,48 +1,48 @@ discard block |
||
1 | 1 | <div id="admin-primary-mbox-dv" class="admin-primary-mbox-dv"> |
2 | 2 | |
3 | 3 | <h4 class="admin-primary-mbox-h4 hdr-has-icon"> |
4 | - <span class="dashicons dashicons-cart"></span><?php _e( 'Transaction Items', 'event_espresso' );?> |
|
4 | + <span class="dashicons dashicons-cart"></span><?php _e('Transaction Items', 'event_espresso'); ?> |
|
5 | 5 | </h4> |
6 | 6 | |
7 | 7 | <div class="admin-primary-mbox-tbl-wrap"> |
8 | 8 | <table class="admin-primary-mbox-tbl"> |
9 | 9 | <thead> |
10 | 10 | <tr> |
11 | - <th class="jst-left"><?php _e( 'Line Item ID', 'event_espresso' );?></th> |
|
12 | - <th class="jst-left"><?php _e( 'Event Name', 'event_espresso' );?></th> |
|
13 | - <th class="jst-left"><?php _e( 'Ticket Option', 'event_espresso' );?></th> |
|
14 | - <th class="jst-cntr"><?php _e( 'Ticket Price', 'event_espresso' );?></th> |
|
15 | - <th class="jst-cntr"><?php _e( 'Qty', 'event_espresso' );?></th> |
|
16 | - <th class="jst-cntr"><?php _e( 'Line Total', 'event_espresso' );?></th> |
|
11 | + <th class="jst-left"><?php _e('Line Item ID', 'event_espresso'); ?></th> |
|
12 | + <th class="jst-left"><?php _e('Event Name', 'event_espresso'); ?></th> |
|
13 | + <th class="jst-left"><?php _e('Ticket Option', 'event_espresso'); ?></th> |
|
14 | + <th class="jst-cntr"><?php _e('Ticket Price', 'event_espresso'); ?></th> |
|
15 | + <th class="jst-cntr"><?php _e('Qty', 'event_espresso'); ?></th> |
|
16 | + <th class="jst-cntr"><?php _e('Line Total', 'event_espresso'); ?></th> |
|
17 | 17 | </tr> |
18 | 18 | </thead> |
19 | 19 | <tbody> |
20 | - <?php foreach ( $line_items as $item ) : ?> |
|
20 | + <?php foreach ($line_items as $item) : ?> |
|
21 | 21 | <?php |
22 | 22 | $event = $item->get_first_related('Transaction')->get_first_related('Registration')->get_first_related('Event'); |
23 | 23 | $event_name = $event->get('EVT_name'); |
24 | 24 | |
25 | 25 | ?> |
26 | 26 | <tr> |
27 | - <td class="jst-left"><?php echo $item->get('LIN_code');?></td> |
|
28 | - <td class="jst-left"><?php echo $event_name;?></td> |
|
29 | - <td class="jst-left"><?php echo $item->get('LIN_name');?></td> |
|
30 | - <td class="jst-rght"><?php echo EEH_Template::format_currency($item->get('LIN_unit_price'), FALSE, FALSE ); ?></td> |
|
31 | - <td class="jst-rght"><?php echo $item->get('LIN_quantity');?></td> |
|
32 | - <td class="jst-rght"><?php echo EEH_Template::format_currency($item->get('LIN_total'), FALSE, FALSE ); ?></td> |
|
27 | + <td class="jst-left"><?php echo $item->get('LIN_code'); ?></td> |
|
28 | + <td class="jst-left"><?php echo $event_name; ?></td> |
|
29 | + <td class="jst-left"><?php echo $item->get('LIN_name'); ?></td> |
|
30 | + <td class="jst-rght"><?php echo EEH_Template::format_currency($item->get('LIN_unit_price'), FALSE, FALSE); ?></td> |
|
31 | + <td class="jst-rght"><?php echo $item->get('LIN_quantity'); ?></td> |
|
32 | + <td class="jst-rght"><?php echo EEH_Template::format_currency($item->get('LIN_total'), FALSE, FALSE); ?></td> |
|
33 | 33 | </tr> |
34 | 34 | <?php endforeach; // $items?> |
35 | - <?php if ( is_array($taxes) ) : ?> |
|
36 | - <?php foreach ( $taxes as $tax ) : ?> |
|
35 | + <?php if (is_array($taxes)) : ?> |
|
36 | + <?php foreach ($taxes as $tax) : ?> |
|
37 | 37 | <tr class="admin-primary-mbox-taxes-tr"> |
38 | - <th class=" jst-rght" colspan="5"><?php echo $tax->get('LIN_name');?> (<?php echo $tax->get_pretty('LIN_percent'); ?>%)</th> |
|
39 | - <th class=" jst-rght"><?php echo EEH_Template::format_currency($tax->get('LIN_total'), FALSE, FALSE );?></th> |
|
38 | + <th class=" jst-rght" colspan="5"><?php echo $tax->get('LIN_name'); ?> (<?php echo $tax->get_pretty('LIN_percent'); ?>%)</th> |
|
39 | + <th class=" jst-rght"><?php echo EEH_Template::format_currency($tax->get('LIN_total'), FALSE, FALSE); ?></th> |
|
40 | 40 | </tr> |
41 | 41 | <?php endforeach; // $taxes?> |
42 | 42 | <?php endif; // $taxes?> |
43 | 43 | <tr class="admin-primary-mbox-total-tr"> |
44 | - <th class=" jst-rght" colspan="5"><?php printf( __( 'Transaction Total %s', 'event_espresso' ), '(' . EE_Registry::instance()->CFG->currency->code . ')');?></th> |
|
45 | - <th class=" jst-rght"><?php echo $grand_total;?></th> |
|
44 | + <th class=" jst-rght" colspan="5"><?php printf(__('Transaction Total %s', 'event_espresso'), '('.EE_Registry::instance()->CFG->currency->code.')'); ?></th> |
|
45 | + <th class=" jst-rght"><?php echo $grand_total; ?></th> |
|
46 | 46 | </tr> |
47 | 47 | </tbody> |
48 | 48 | </table> |
@@ -50,27 +50,27 @@ discard block |
||
50 | 50 | </div> |
51 | 51 | |
52 | 52 | <a id="display-additional-transaction-session-info" class="display-the-hidden smaller-text" rel="additional-transaction-session-info"> |
53 | - <span class="dashicons dashicons-plus-alt"></span><?php _e( 'view additional transaction session details', 'event_espresso' );?> |
|
53 | + <span class="dashicons dashicons-plus-alt"></span><?php _e('view additional transaction session details', 'event_espresso'); ?> |
|
54 | 54 | </a> |
55 | 55 | |
56 | 56 | <div id="additional-transaction-session-info-dv" class="hidden"> |
57 | 57 | |
58 | 58 | <a id="hide-additional-transaction-session-info" class="hide-the-displayed hidden smaller-text" rel="additional-transaction-session-info"> |
59 | - <span class="dashicons dashicons-dismiss"></span><?php _e( 'hide additional transaction session details', 'event_espresso' );?> |
|
59 | + <span class="dashicons dashicons-dismiss"></span><?php _e('hide additional transaction session details', 'event_espresso'); ?> |
|
60 | 60 | </a> |
61 | 61 | <br class="clear"/> |
62 | 62 | |
63 | - <h4 class="admin-primary-mbox-h4"><?php _e( 'Transaction Session Details', 'event_espresso' );?></h4> |
|
63 | + <h4 class="admin-primary-mbox-h4"><?php _e('Transaction Session Details', 'event_espresso'); ?></h4> |
|
64 | 64 | |
65 | 65 | <table id="admin-primary-mbox-txn-extra-session-info-tbl" class="form-table skinny-rows"> |
66 | 66 | <tbody> |
67 | - <?php foreach ( $txn_details as $key => $txn_detail ) : ?> |
|
67 | + <?php foreach ($txn_details as $key => $txn_detail) : ?> |
|
68 | 68 | <tr> |
69 | 69 | <th> |
70 | - <label for="<?php echo $key;?>"><?php echo $txn_detail['label'];?></label> |
|
70 | + <label for="<?php echo $key; ?>"><?php echo $txn_detail['label']; ?></label> |
|
71 | 71 | </th> |
72 | 72 | <td> |
73 | - <?php echo $txn_detail['value'];?> |
|
73 | + <?php echo $txn_detail['value']; ?> |
|
74 | 74 | </td> |
75 | 75 | </tr> |
76 | 76 | <?php endforeach; // $txn_details?> |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | <br class="clear"/> |
81 | 81 | |
82 | 82 | |
83 | - <?php if ( $attendee instanceof EE_Attendee && ( $grand_raw_total > 0 || $TXN_status != 'TCM' ) ) : ?> |
|
83 | + <?php if ($attendee instanceof EE_Attendee && ($grand_raw_total > 0 || $TXN_status != 'TCM')) : ?> |
|
84 | 84 | |
85 | 85 | <h4 class="admin-primary-mbox-h4 hdr-has-icon"> |
86 | - <span class="ee-icon ee-icon-cash"></span><?php _e( 'Payment Details', 'event_espresso' );?> |
|
86 | + <span class="ee-icon ee-icon-cash"></span><?php _e('Payment Details', 'event_espresso'); ?> |
|
87 | 87 | </h4> |
88 | 88 | |
89 | 89 | <div class="admin-primary-mbox-tbl-wrap"> |
@@ -92,74 +92,74 @@ discard block |
||
92 | 92 | <tr> |
93 | 93 | <th></th> |
94 | 94 | <th class="jst-cntr"></th> |
95 | - <th class="jst-cntr"><?php _e( 'ID', 'event_espresso' );?></th> |
|
96 | - <th class="jst-left"><?php _e( 'Date', 'event_espresso' );?></th> |
|
97 | - <th class="jst-cntr"><?php _e( 'Source', 'event_espresso' );?></th> |
|
98 | - <th class="jst-left"><?php _e( 'Method', 'event_espresso' );?></th> |
|
99 | - <th class="jst-left"><?php _e( 'Gateway Response', 'event_espresso' );?></th> |
|
100 | - <th class="jst-left"><?php _e( 'TXN ID / CHQ #', 'event_espresso' );?></th> |
|
101 | - <th class="jst-left"><?php _e( 'P.O. / S.O. #', 'event_espresso' );?></th> |
|
102 | - <th class="jst-left"><?php _e( 'Notes / Extra Accounting', 'event_espresso' );?></th> |
|
103 | - <!--<th class="jst-left"><?php _e( 'Details', 'event_espresso' );?></th>--> |
|
104 | - <th class="jst-cntr"><?php _e( 'Amount', 'event_espresso' );?></th> |
|
95 | + <th class="jst-cntr"><?php _e('ID', 'event_espresso'); ?></th> |
|
96 | + <th class="jst-left"><?php _e('Date', 'event_espresso'); ?></th> |
|
97 | + <th class="jst-cntr"><?php _e('Source', 'event_espresso'); ?></th> |
|
98 | + <th class="jst-left"><?php _e('Method', 'event_espresso'); ?></th> |
|
99 | + <th class="jst-left"><?php _e('Gateway Response', 'event_espresso'); ?></th> |
|
100 | + <th class="jst-left"><?php _e('TXN ID / CHQ #', 'event_espresso'); ?></th> |
|
101 | + <th class="jst-left"><?php _e('P.O. / S.O. #', 'event_espresso'); ?></th> |
|
102 | + <th class="jst-left"><?php _e('Notes / Extra Accounting', 'event_espresso'); ?></th> |
|
103 | + <!--<th class="jst-left"><?php _e('Details', 'event_espresso'); ?></th>--> |
|
104 | + <th class="jst-cntr"><?php _e('Amount', 'event_espresso'); ?></th> |
|
105 | 105 | </tr> |
106 | 106 | </thead> |
107 | 107 | <tbody> |
108 | - <?php if ( $payments ) : ?> |
|
108 | + <?php if ($payments) : ?> |
|
109 | 109 | <?php $payment_total = 0; ?> |
110 | - <?php foreach ( $payments as $PAY_ID => $payment ) : ?> |
|
111 | - <tr id="txn-admin-payment-tr-<?php echo $PAY_ID;?>"> |
|
110 | + <?php foreach ($payments as $PAY_ID => $payment) : ?> |
|
111 | + <tr id="txn-admin-payment-tr-<?php echo $PAY_ID; ?>"> |
|
112 | 112 | <td> |
113 | 113 | <span id="payment-status-<?php echo $PAY_ID; ?>" class="ee-status-strip-td ee-status-strip pymt-status-<?php echo $payment->STS_ID(); ?>"></span> |
114 | - <div id="payment-STS_ID-<?php echo $PAY_ID;?>" class="hidden"><?php echo $payment->STS_ID();?></div> |
|
114 | + <div id="payment-STS_ID-<?php echo $PAY_ID; ?>" class="hidden"><?php echo $payment->STS_ID(); ?></div> |
|
115 | 115 | </td> |
116 | 116 | <td class=" jst-cntr"> |
117 | 117 | <ul class="txn-overview-actions-ul"> |
118 | 118 | <li> |
119 | - <a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e( 'Edit Payment', 'event_espresso' );?>" rel="<?php echo $PAY_ID;?>"> |
|
119 | + <a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e('Edit Payment', 'event_espresso'); ?>" rel="<?php echo $PAY_ID; ?>"> |
|
120 | 120 | <div class="dashicons dashicons-edit" style="margin: 0;"></div> |
121 | 121 | </a> |
122 | 122 | </li> |
123 | 123 | <li> |
124 | - <a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e( 'Delete Payment', 'event_espresso' );?>" rel="<?php echo $PAY_ID;?>"> |
|
124 | + <a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e('Delete Payment', 'event_espresso'); ?>" rel="<?php echo $PAY_ID; ?>"> |
|
125 | 125 | <div class="dashicons dashicons-trash" style="margin: 0;"></div> |
126 | 126 | </a> |
127 | 127 | </li> |
128 | 128 | </ul> |
129 | 129 | </td> |
130 | 130 | <td class=" jst-rght"> |
131 | - <div id="payment-id-<?php echo $PAY_ID;?>"><?php echo $PAY_ID;?></div> |
|
131 | + <div id="payment-id-<?php echo $PAY_ID; ?>"><?php echo $PAY_ID; ?></div> |
|
132 | 132 | </td> |
133 | 133 | <td class=" jst-left"> |
134 | - <div id="payment-date-<?php echo $PAY_ID;?>" class="payment-date-dv"><?php echo $payment->timestamp('Y-m-d', 'h:i a');?></div> |
|
134 | + <div id="payment-date-<?php echo $PAY_ID; ?>" class="payment-date-dv"><?php echo $payment->timestamp('Y-m-d', 'h:i a'); ?></div> |
|
135 | 135 | </td> |
136 | 136 | <td class=" jst-cntr"> |
137 | - <div id="payment-method-<?php echo $PAY_ID;?>"> |
|
138 | - <?php echo $payment->source();?> |
|
137 | + <div id="payment-method-<?php echo $PAY_ID; ?>"> |
|
138 | + <?php echo $payment->source(); ?> |
|
139 | 139 | </div> |
140 | 140 | </td> |
141 | 141 | <td class=" jst-left"> |
142 | - <div id="payment-gateway-<?php echo $PAY_ID;?>"> |
|
143 | - <?php echo $payment->payment_method() ? $payment->payment_method()->admin_name() : __("Unknown", 'event_espresso');?> |
|
142 | + <div id="payment-gateway-<?php echo $PAY_ID; ?>"> |
|
143 | + <?php echo $payment->payment_method() ? $payment->payment_method()->admin_name() : __("Unknown", 'event_espresso'); ?> |
|
144 | 144 | </div> |
145 | - <div id="payment-gateway-id-<?php echo $PAY_ID;?>" class="hidden"><?php echo $payment->payment_method() ? $payment->payment_method()->ID() : 0;?></div> |
|
145 | + <div id="payment-gateway-id-<?php echo $PAY_ID; ?>" class="hidden"><?php echo $payment->payment_method() ? $payment->payment_method()->ID() : 0; ?></div> |
|
146 | 146 | </td> |
147 | 147 | <td class=" jst-left"> |
148 | - <div id="payment-response-<?php echo $PAY_ID;?>"><?php echo $payment->gateway_response();?></div> |
|
148 | + <div id="payment-response-<?php echo $PAY_ID; ?>"><?php echo $payment->gateway_response(); ?></div> |
|
149 | 149 | </td> |
150 | 150 | <td class=" jst-left"> |
151 | - <div id="payment-txn-id-chq-nmbr-<?php echo $PAY_ID;?>"><?php echo $payment->txn_id_chq_nmbr();?></div> |
|
151 | + <div id="payment-txn-id-chq-nmbr-<?php echo $PAY_ID; ?>"><?php echo $payment->txn_id_chq_nmbr(); ?></div> |
|
152 | 152 | </td> |
153 | 153 | <td class=" jst-left"> |
154 | - <div id="payment-po-nmbr-<?php echo $PAY_ID;?>"><?php echo $payment->po_number();?></div> |
|
154 | + <div id="payment-po-nmbr-<?php echo $PAY_ID; ?>"><?php echo $payment->po_number(); ?></div> |
|
155 | 155 | </td> |
156 | 156 | <td class=" jst-left"> |
157 | - <div id="payment-accntng-<?php echo $PAY_ID;?>"><?php echo $payment->extra_accntng();?></div> |
|
157 | + <div id="payment-accntng-<?php echo $PAY_ID; ?>"><?php echo $payment->extra_accntng(); ?></div> |
|
158 | 158 | </td> |
159 | 159 | <td class=" jst-rght"> |
160 | - <?php $payment_class = $payment->amount() > 0 ? 'txn-admin-payment-status-' . $payment->STS_ID() : 'txn-admin-payment-status-PDC'; ?> |
|
161 | - <span class="<?php echo $payment_class;?>"> |
|
162 | - <div id="payment-amount-<?php echo $PAY_ID;?>" style="display:inline;"><?php echo EEH_Template::format_currency($payment->amount(), FALSE, FALSE ); ?></div> |
|
160 | + <?php $payment_class = $payment->amount() > 0 ? 'txn-admin-payment-status-'.$payment->STS_ID() : 'txn-admin-payment-status-PDC'; ?> |
|
161 | + <span class="<?php echo $payment_class; ?>"> |
|
162 | + <div id="payment-amount-<?php echo $PAY_ID; ?>" style="display:inline;"><?php echo EEH_Template::format_currency($payment->amount(), FALSE, FALSE); ?></div> |
|
163 | 163 | </span> |
164 | 164 | </td> |
165 | 165 | </tr> |
@@ -169,25 +169,25 @@ discard block |
||
169 | 169 | <?php endforeach; // $payment?> |
170 | 170 | <?php |
171 | 171 | $pay_totals_class = $payment_total > $grand_raw_total ? ' important-notice' : ''; |
172 | - $overpaid = $payment_total > $grand_raw_total ? '<span id="overpaid">' . __( 'This transaction has been overpaid ! ', 'event_espresso' ) . '</span>' : ''; |
|
172 | + $overpaid = $payment_total > $grand_raw_total ? '<span id="overpaid">'.__('This transaction has been overpaid ! ', 'event_espresso').'</span>' : ''; |
|
173 | 173 | ?> |
174 | 174 | <tr id="txn-admin-no-payments-tr" class="admin-primary-mbox-total-tr hidden"> |
175 | 175 | <td class=" jst-rght" colspan="11"> |
176 | - <span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' ); ?></span> |
|
176 | + <span class="important-notice"><?php _e('No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso'); ?></span> |
|
177 | 177 | </td> |
178 | 178 | </tr> |
179 | - <tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr<?php echo $pay_totals_class;?>"> |
|
180 | - <th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo $overpaid . sprintf( __( 'Payments Total %s', 'event_espresso' ), '(' . EE_Registry::instance()->CFG->currency->code . ')' );?></span></th> |
|
181 | - <th class=" jst-rght"><span id="txn-admin-payment-total"><?php echo EEH_Template::format_currency($payment_total, FALSE, FALSE);?></span></th> |
|
179 | + <tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr<?php echo $pay_totals_class; ?>"> |
|
180 | + <th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo $overpaid.sprintf(__('Payments Total %s', 'event_espresso'), '('.EE_Registry::instance()->CFG->currency->code.')'); ?></span></th> |
|
181 | + <th class=" jst-rght"><span id="txn-admin-payment-total"><?php echo EEH_Template::format_currency($payment_total, FALSE, FALSE); ?></span></th> |
|
182 | 182 | </tr> |
183 | 183 | <?php else : ?> |
184 | 184 | <tr id="txn-admin-no-payments-tr" class="admin-primary-mbox-total-tr"> |
185 | 185 | <td class=" jst-rght" colspan="11"> |
186 | - <span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' ); ?></span> |
|
186 | + <span class="important-notice"><?php _e('No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso'); ?></span> |
|
187 | 187 | </td> |
188 | 188 | </tr> |
189 | 189 | <tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr hidden"> |
190 | - <th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo __( 'Payments Total', 'event_espresso' );?></span></th> |
|
190 | + <th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo __('Payments Total', 'event_espresso'); ?></span></th> |
|
191 | 191 | <th class=" jst-rght"><span id="txn-admin-payment-total"></span></th> |
192 | 192 | </tr> |
193 | 193 | <?php endif; // $payments?> |
@@ -200,12 +200,12 @@ discard block |
||
200 | 200 | <td class=" jst-cntr"> |
201 | 201 | <ul class="txn-overview-actions-ul"> |
202 | 202 | <li> |
203 | - <a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e( 'Edit Payment', 'event_espresso' );?>" rel="PAY_ID"> |
|
203 | + <a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e('Edit Payment', 'event_espresso'); ?>" rel="PAY_ID"> |
|
204 | 204 | <div class="dashicons dashicons-edit" style="margin: 0;"></div> |
205 | 205 | </a> |
206 | 206 | </li> |
207 | 207 | <li> |
208 | - <a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e( 'Delete Payment', 'event_espresso' );?>" rel="PAY_ID"> |
|
208 | + <a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e('Delete Payment', 'event_espresso'); ?>" rel="PAY_ID"> |
|
209 | 209 | <div class="dashicons dashicons-trash" style="margin: 0;"></div> |
210 | 210 | </a> |
211 | 211 | </li> |
@@ -252,12 +252,12 @@ discard block |
||
252 | 252 | <ul id="txn-admin-payment-options-ul"> |
253 | 253 | <li> |
254 | 254 | <a id="display-txn-admin-apply-payment" class="button-primary no-icon no-hide" rel="txn-admin-apply-payment" > <!--display-the-hidden --> |
255 | - <?php _e( 'Apply Payment', 'event_espresso' );?> |
|
255 | + <?php _e('Apply Payment', 'event_espresso'); ?> |
|
256 | 256 | </a> |
257 | 257 | </li> |
258 | 258 | <li> |
259 | 259 | <a id="display-txn-admin-apply-refund" class="button-secondary no-icon no-hide" rel="txn-admin-apply-refund" > <!--display-the-hidden --> |
260 | - <?php _e( 'Apply Refund', 'event_espresso' );?> |
|
260 | + <?php _e('Apply Refund', 'event_espresso'); ?> |
|
261 | 261 | </a> |
262 | 262 | </li> |
263 | 263 | </ul> |
@@ -267,14 +267,14 @@ discard block |
||
267 | 267 | |
268 | 268 | <h2 id="admin-modal-dialog-apply-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;"> |
269 | 269 | <div class="ee-icon ee-icon-cash-add float-left"></div> |
270 | - <?php echo __( 'Apply a Payment to Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?> |
|
270 | + <?php echo __('Apply a Payment to Transaction #', 'event_espresso').$txn_nmbr['value']; ?> |
|
271 | 271 | </h2> |
272 | 272 | |
273 | 273 | <h2 id="admin-modal-dialog-edit-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;"> |
274 | 274 | <div class="ee-icon ee-icon-cash-edit float-left"></div> |
275 | 275 | <?php |
276 | 276 | echo sprintf( |
277 | - __( 'Edit Payment #%s for Transaction #%s', 'event_espresso' ), |
|
277 | + __('Edit Payment #%s for Transaction #%s', 'event_espresso'), |
|
278 | 278 | '<span></span>', |
279 | 279 | $txn_nmbr['value'] |
280 | 280 | ); |
@@ -283,14 +283,14 @@ discard block |
||
283 | 283 | |
284 | 284 | <h2 id="admin-modal-dialog-apply-refund-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;"> |
285 | 285 | <div class="ee-icon ee-icon-cash-remove float-left"></div> |
286 | - <?php echo __( 'Apply a Refund to Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?> |
|
286 | + <?php echo __('Apply a Refund to Transaction #', 'event_espresso').$txn_nmbr['value']; ?> |
|
287 | 287 | </h2> |
288 | 288 | |
289 | 289 | <form name="txn-admin-apply-payment-frm" id="txn-admin-apply-payment-frm" action="<?php echo $apply_payment_form_url; ?>"> |
290 | 290 | <div class="admin-modal-dialog-wrap"> |
291 | 291 | <div class="admin-modal-dialog-inner"> |
292 | 292 | |
293 | - <input type="hidden" name="espresso_apply_payment_nonce" id="espresso_apply_payment_nonce" value="<?php echo wp_create_nonce( 'espresso_apply_payment_nonce' );?>"/> |
|
293 | + <input type="hidden" name="espresso_apply_payment_nonce" id="espresso_apply_payment_nonce" value="<?php echo wp_create_nonce('espresso_apply_payment_nonce'); ?>"/> |
|
294 | 294 | <input type="hidden" name="espresso_ajax" id="espresso-ajax" value="0"/> |
295 | 295 | <input type="hidden" name="noheader" id="txn-admin-noheader-inp" value="0"/> |
296 | 296 | <input type="hidden" name="txn_admin_payment[PAY_ID]" id="txn-admin-payment-payment-id-inp" class="txn-admin-apply-payment-inp" value="0"/> |
@@ -298,98 +298,98 @@ discard block |
||
298 | 298 | <input type="hidden" name="txn_admin_payment[type]" id="txn-admin-payment-type-inp" value="1"/> |
299 | 299 | <input type="hidden" name="txn_admin_payment[details]" id="txn-admin-payment-details-inp" value=""/> |
300 | 300 | <input type="hidden" name="txn_admin_delete_payment_form_url" id="txn-admin-delete-payment-form-url-inp" value="<?php echo $delete_payment_form_url; ?>"/> |
301 | - <input type="hidden" name="txn_admin_todays_date" id="txn-admin-todays-date-inp" value="<?php echo date( 'Y-m-d h:i a', current_time( 'timestamp' )); ?>"/> |
|
301 | + <input type="hidden" name="txn_admin_todays_date" id="txn-admin-todays-date-inp" value="<?php echo date('Y-m-d h:i a', current_time('timestamp')); ?>"/> |
|
302 | 302 | |
303 | 303 | <div class="txn-admin-apply-payment-date-dv admin-modal-dialog-row"> |
304 | - <div class="validation-notice-dv"><?php _e( 'The following is a required field', 'event_espresso' );?></div> |
|
305 | - <label for="txn-admin-payment-date-inp" class=""><?php _e( 'Payment Date', 'event_espresso' );?></label> |
|
306 | - <input name="txn_admin_payment[date]" id="txn-admin-payment-date-inp" class="txn-admin-apply-payment-inp required" type="text" value="<?php echo date( 'Y-m-d h:i a', current_time( 'timestamp' )); ?>"/> |
|
304 | + <div class="validation-notice-dv"><?php _e('The following is a required field', 'event_espresso'); ?></div> |
|
305 | + <label for="txn-admin-payment-date-inp" class=""><?php _e('Payment Date', 'event_espresso'); ?></label> |
|
306 | + <input name="txn_admin_payment[date]" id="txn-admin-payment-date-inp" class="txn-admin-apply-payment-inp required" type="text" value="<?php echo date('Y-m-d h:i a', current_time('timestamp')); ?>"/> |
|
307 | 307 | <br/> |
308 | - <p class="description"><?php _e( 'The date the payment was actually made on', 'event_espresso' );?></p> |
|
308 | + <p class="description"><?php _e('The date the payment was actually made on', 'event_espresso'); ?></p> |
|
309 | 309 | </div> |
310 | 310 | |
311 | 311 | <div class="txn-admin-apply-payment-amount-dv admin-modal-dialog-row"> |
312 | - <div class="validation-notice-dv"><?php _e( 'The following is a required field', 'event_espresso' );?></div> |
|
313 | - <label for="txn-admin-payment-amount-inp" class=""><?php _e( 'Amount', 'event_espresso' );?></label> |
|
312 | + <div class="validation-notice-dv"><?php _e('The following is a required field', 'event_espresso'); ?></div> |
|
313 | + <label for="txn-admin-payment-amount-inp" class=""><?php _e('Amount', 'event_espresso'); ?></label> |
|
314 | 314 | <input name="txn_admin_payment[amount]" id="txn-admin-payment-amount-inp" class="txn-admin-apply-payment-inp required" type="text" value=""/> |
315 | 315 | <br/> |
316 | - <p class="description"><?php _e( 'The amount of the payment', 'event_espresso' );?></p> |
|
316 | + <p class="description"><?php _e('The amount of the payment', 'event_espresso'); ?></p> |
|
317 | 317 | </div> |
318 | 318 | |
319 | 319 | <div class="txn-admin-apply-payment-method-dv admin-modal-dialog-row"> |
320 | - <div class="validation-notice-dv"><?php _e( 'The following is a required field', 'event_espresso' );?></div> |
|
321 | - <label for="txn-admin-payment-method-inp" class=""><?php _e( 'Method of Payment', 'event_espresso' );?></label> |
|
320 | + <div class="validation-notice-dv"><?php _e('The following is a required field', 'event_espresso'); ?></div> |
|
321 | + <label for="txn-admin-payment-method-inp" class=""><?php _e('Method of Payment', 'event_espresso'); ?></label> |
|
322 | 322 | <select name="txn_admin_payment[PMD_ID]" id="txn-admin-payment-method-slct" class="txn-admin-apply-payment-slct required" type="text" > |
323 | - <?php foreach ( $payment_methods as $method ) : ?> |
|
323 | + <?php foreach ($payment_methods as $method) : ?> |
|
324 | 324 | <?php $selected = $method->slug() == 'cash' ? ' selected="selected"' : ''; ?> |
325 | - <option id="payment-method-opt-<?php echo $method->slug(); ?>" value="<?php echo $method->ID(); ?>"<?php echo $selected; ?>><?php echo sanitize_key( $method->admin_desc() ) ? substr( $method->admin_desc(), 0, 128) : $method->admin_name() ; ?> </option> |
|
325 | + <option id="payment-method-opt-<?php echo $method->slug(); ?>" value="<?php echo $method->ID(); ?>"<?php echo $selected; ?>><?php echo sanitize_key($method->admin_desc()) ? substr($method->admin_desc(), 0, 128) : $method->admin_name(); ?> </option> |
|
326 | 326 | <?php endforeach; ?> |
327 | 327 | </select> |
328 | 328 | <br/> |
329 | - <p class="description"><?php _e( 'Whether the payment was made via PayPal, Credit Card, Cheque, or Cash', 'event_espresso' );?></p> |
|
329 | + <p class="description"><?php _e('Whether the payment was made via PayPal, Credit Card, Cheque, or Cash', 'event_espresso'); ?></p> |
|
330 | 330 | </div> |
331 | 331 | |
332 | 332 | <div class="mop-PP mop-CC mop-CHQ mop"> |
333 | 333 | <div class="txn-admin-apply-payment-gw-txn-id-dv admin-modal-dialog-row"> |
334 | - <label for="txn-admin-payment-txn-id-inp" class=""><?php _e( 'TXN ID / CHQ #', 'event_espresso' );?></label> |
|
334 | + <label for="txn-admin-payment-txn-id-inp" class=""><?php _e('TXN ID / CHQ #', 'event_espresso'); ?></label> |
|
335 | 335 | <input name="txn_admin_payment[txn_id_chq_nmbr]" id="txn-admin-payment-txn-id-chq-nmbr-inp" class="txn-admin-apply-payment-inp" type="text"/> |
336 | 336 | <br/> |
337 | - <p class="description"><?php _e( 'The Transaction ID sent back from the payment gateway, or the Cheque #', 'event_espresso' );?></p> |
|
337 | + <p class="description"><?php _e('The Transaction ID sent back from the payment gateway, or the Cheque #', 'event_espresso'); ?></p> |
|
338 | 338 | </div> |
339 | 339 | </div> |
340 | 340 | |
341 | 341 | <div class="mop-CC mop" style="display:none"> |
342 | 342 | <div class="txn-admin-apply-payment-response-dv admin-modal-dialog-row"> |
343 | - <label for="txn-admin-payment-gateway-response-inp" class=""><?php _e( 'Gateway Response', 'event_espresso' );?></label> |
|
343 | + <label for="txn-admin-payment-gateway-response-inp" class=""><?php _e('Gateway Response', 'event_espresso'); ?></label> |
|
344 | 344 | <input name="txn_admin_payment[gateway_response]" id="txn-admin-payment-gateway-response-inp" class="txn-admin-apply-payment-inp" type="text"/> |
345 | 345 | <br/> |
346 | - <p class="description"><?php _e( 'The gateway response string (optional)', 'event_espresso' );?></p> |
|
346 | + <p class="description"><?php _e('The gateway response string (optional)', 'event_espresso'); ?></p> |
|
347 | 347 | </div> |
348 | 348 | </div> |
349 | 349 | |
350 | 350 | <div class="mop-PP mop-CC mop"> |
351 | 351 | <div class="txn-admin-apply-payment-status-dv admin-modal-dialog-row"> |
352 | - <label for="txn-admin-payment-status-inp" class=""><?php _e( 'Payment Status', 'event_espresso' );?></label> |
|
352 | + <label for="txn-admin-payment-status-inp" class=""><?php _e('Payment Status', 'event_espresso'); ?></label> |
|
353 | 353 | <select name="txn_admin_payment[status]" id="txn-admin-payment-status-slct" class="txn-admin-apply-payment-slct" type="text" > |
354 | - <?php foreach ( $payment_status as $STS_ID => $STS_code ) : ?> |
|
354 | + <?php foreach ($payment_status as $STS_ID => $STS_code) : ?> |
|
355 | 355 | <?php $selected = $STS_ID == 'PAP' ? ' selected="selected"' : ''; ?> |
356 | 356 | <option id="payment-status-opt-<?php echo $STS_ID; ?>" value="<?php echo $STS_ID; ?>"<?php echo $selected; ?>><?php echo $STS_code; ?> </option> |
357 | 357 | <?php endforeach; ?> |
358 | 358 | </select> |
359 | 359 | <br/> |
360 | - <p class="description"><?php _e( 'Whether the payment was approved, cancelled, declined or failed after submission to the gateway', 'event_espresso' );?></p> |
|
360 | + <p class="description"><?php _e('Whether the payment was approved, cancelled, declined or failed after submission to the gateway', 'event_espresso'); ?></p> |
|
361 | 361 | </div> |
362 | 362 | </div> |
363 | 363 | |
364 | 364 | <div class="txn-admin-apply-payment-po-nmbr-dv admin-modal-dialog-row"> |
365 | - <label for="txn-admin-payment-po-nmbr-inp" class=""><?php _e( 'P.O. / S.O. #', 'event_espresso' );?></label> |
|
365 | + <label for="txn-admin-payment-po-nmbr-inp" class=""><?php _e('P.O. / S.O. #', 'event_espresso'); ?></label> |
|
366 | 366 | <input name="txn_admin_payment[po_number]" id="txn-admin-payment-po-nmbr-inp" class="txn-admin-apply-payment-inp" type="text"/> |
367 | 367 | <br/> |
368 | - <p class="description"><?php _e( 'The Purchase or Sales Order Number if any (optional)', 'event_espresso' );?></p> |
|
368 | + <p class="description"><?php _e('The Purchase or Sales Order Number if any (optional)', 'event_espresso'); ?></p> |
|
369 | 369 | </div> |
370 | 370 | |
371 | 371 | <div class="txn-admin-apply-payment-accounting-dv admin-modal-dialog-row"> |
372 | - <label for="txn-admin-payment-accounting-inp" class="last"><?php _e( 'Notes / Extra Accounting', 'event_espresso' );?></label> |
|
372 | + <label for="txn-admin-payment-accounting-inp" class="last"><?php _e('Notes / Extra Accounting', 'event_espresso'); ?></label> |
|
373 | 373 | <input name="txn_admin_payment[accounting]" id="txn-admin-payment-accounting-inp" class="txn-admin-apply-payment-inp" type="text" value="<?php echo $REG_code; ?>"/> <input type="hidden" id="txn-admin-reg-code-inp" value="<?php echo $REG_code; ?>"/> |
374 | 374 | <br/> |
375 | - <p class="description"><?php _e( 'An extra field you may use for accounting purposes or simple notes. Defaults to the primary registrant\'s registration code.', 'event_espresso' );?></p><br/> |
|
375 | + <p class="description"><?php _e('An extra field you may use for accounting purposes or simple notes. Defaults to the primary registrant\'s registration code.', 'event_espresso'); ?></p><br/> |
|
376 | 376 | </div> |
377 | 377 | |
378 | 378 | <div class="txn-admin-apply-payment-accounting-dv admin-modal-dialog-row"> |
379 | - <label for="txn-admin-payment-accounting-inp" class="last"><?php _e( 'Change Registration Status?', 'event_espresso' );?></label> |
|
379 | + <label for="txn-admin-payment-accounting-inp" class="last"><?php _e('Change Registration Status?', 'event_espresso'); ?></label> |
|
380 | 380 | <?php echo $status_change_select; ?> |
381 | 381 | <br/> |
382 | 382 | <br /> |
383 | - <p class="description"><?php printf( __('If you wish to change the status of all the registrations associated with this transaction after submit, then select which status from this dropdown. %sNote: ALL registrations associated with this transaction will be updated to this new status.%s', 'event_espresso'), '<strong>', '</strong>' ); ?></p><br/> |
|
383 | + <p class="description"><?php printf(__('If you wish to change the status of all the registrations associated with this transaction after submit, then select which status from this dropdown. %sNote: ALL registrations associated with this transaction will be updated to this new status.%s', 'event_espresso'), '<strong>', '</strong>'); ?></p><br/> |
|
384 | 384 | <label></label> |
385 | 385 | </div> |
386 | 386 | |
387 | 387 | <div class="ee-attention txn-admin-apply-payment-accounting-dv admin-modal-dialog-row"> |
388 | - <label for="txn-admin-payment-accounting-inp" class="last"><?php _e( 'Send Related Messages?', 'event_espresso' );?></label> |
|
388 | + <label for="txn-admin-payment-accounting-inp" class="last"><?php _e('Send Related Messages?', 'event_espresso'); ?></label> |
|
389 | 389 | <input type="checkbox" value="1" name="txn_reg_status_change[send_notifications]"> |
390 | 390 | <br/> |
391 | 391 | <br /> |
392 | - <p class="description"><?php printf( __('By default a payment message %sis%s sent to the primary registrant after submitting this form. However, if you check this box, the system will also send any related messages matching the status of the registrations to each registration for this transaction.', 'event_espresso'), '<strong>', '</strong>' ); ?></p><br/> |
|
392 | + <p class="description"><?php printf(__('By default a payment message %sis%s sent to the primary registrant after submitting this form. However, if you check this box, the system will also send any related messages matching the status of the registrations to each registration for this transaction.', 'event_espresso'), '<strong>', '</strong>'); ?></p><br/> |
|
393 | 393 | <label></label> |
394 | 394 | </div> |
395 | 395 | <div class="clear"></div> |
@@ -400,22 +400,22 @@ discard block |
||
400 | 400 | <ul id="admin-modal-dialog-options-ul"> |
401 | 401 | <li> |
402 | 402 | <a id="txn-admin-modal-dialog-apply-payment-lnk" class="button-primary no-icon" style="display:none;" > |
403 | - <?php _e( 'Apply Payment', 'event_espresso' );?> |
|
403 | + <?php _e('Apply Payment', 'event_espresso'); ?> |
|
404 | 404 | </a> |
405 | 405 | </li> |
406 | 406 | <li> |
407 | 407 | <a id="txn-admin-modal-dialog-edit-payment-lnk" class="button-primary no-icon" style="display:none;" > |
408 | - <?php _e( 'Save Payment Details', 'event_espresso' );?> |
|
408 | + <?php _e('Save Payment Details', 'event_espresso'); ?> |
|
409 | 409 | </a> |
410 | 410 | </li> |
411 | 411 | <li> |
412 | 412 | <a id="txn-admin-modal-dialog-apply-refund-lnk" class="button-primary no-icon" style="display:none;" > |
413 | - <?php _e( 'Apply Refund', 'event_espresso' );?> |
|
413 | + <?php _e('Apply Refund', 'event_espresso'); ?> |
|
414 | 414 | </a> |
415 | 415 | </li> |
416 | 416 | <li> |
417 | 417 | <a id="txn-admin-modal-dialog-cancel-lnk" class="button-secondary no-icon" > |
418 | - <?php _e( 'Cancel', 'event_espresso' );?> |
|
418 | + <?php _e('Cancel', 'event_espresso'); ?> |
|
419 | 419 | </a> |
420 | 420 | </li> |
421 | 421 | <li> |
@@ -432,34 +432,34 @@ discard block |
||
432 | 432 | |
433 | 433 | <h2 id="admin-modal-dialog-delete-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;"> |
434 | 434 | <span class="ee-icon ee-icon-cash-add"></span> |
435 | - <?php echo __( 'Delete Payment/Refund for Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?> |
|
435 | + <?php echo __('Delete Payment/Refund for Transaction #', 'event_espresso').$txn_nmbr['value']; ?> |
|
436 | 436 | </h2> |
437 | 437 | |
438 | 438 | <form name="txn-admin-delete-payment-frm" id="txn-admin-delete-payment-frm" action="<?php echo $delete_payment_url; ?>"> |
439 | 439 | <div class="admin-modal-dialog-wrap"> |
440 | 440 | <div class="admin-modal-dialog-inner"> |
441 | 441 | |
442 | - <input type="hidden" name="espresso_delete_payment_nonce" id="espresso_delete_payment_nonce" value="<?php echo wp_create_nonce( 'espresso_delete_payment_nonce' );?>"/> |
|
442 | + <input type="hidden" name="espresso_delete_payment_nonce" id="espresso_delete_payment_nonce" value="<?php echo wp_create_nonce('espresso_delete_payment_nonce'); ?>"/> |
|
443 | 443 | <input type="hidden" name="delete_espresso_ajax" id="delete-espresso-ajax" value="0"/> |
444 | 444 | <input type="hidden" name="delete_noheader" id="delete-txn-admin-noheader-inp" value="0"/> |
445 | 445 | <input type="hidden" name="delete_txn_admin_payment[PAY_ID]" id="delete-txn-admin-payment-payment-id-inp" class="txn-admin-apply-payment-inp" value="0"/> |
446 | 446 | <input type="hidden" name="delete_txn_admin_payment[TXN_ID]" id="delete-txn-admin-payment-txn-id-inp" value="<?php echo $txn_nmbr['value']; ?>"/> |
447 | 447 | |
448 | 448 | <div class="txn-admin-apply-payment-accounting-dv admin-modal-dialog-row"> |
449 | - <label for="delete-txn-admin-payment-accounting-inp" class="last"><?php _e( 'Change Registration Status?', 'event_espresso' );?></label> |
|
449 | + <label for="delete-txn-admin-payment-accounting-inp" class="last"><?php _e('Change Registration Status?', 'event_espresso'); ?></label> |
|
450 | 450 | <?php echo $delete_status_change_select; ?> |
451 | 451 | <br/> |
452 | 452 | <br /> |
453 | - <p class="description"><?php printf( __('If you wish to change the status of all the registrations associated with this transaction after deleting this payment/refund, then select which status from this dropdown. %sNote: ALL registrations associated with this transaction will be updated to this new status.%s', 'event_espresso'), '<strong>', '</strong>' ); ?></p><br/> |
|
453 | + <p class="description"><?php printf(__('If you wish to change the status of all the registrations associated with this transaction after deleting this payment/refund, then select which status from this dropdown. %sNote: ALL registrations associated with this transaction will be updated to this new status.%s', 'event_espresso'), '<strong>', '</strong>'); ?></p><br/> |
|
454 | 454 | <label></label> |
455 | 455 | </div> |
456 | 456 | |
457 | 457 | <div class="ee-attention txn-admin-apply-payment-accounting-dv admin-modal-dialog-row"> |
458 | - <label for="delete-txn-admin-payment-accounting-inp" class="last"><?php _e( 'Send Related Messages?', 'event_espresso' );?></label> |
|
458 | + <label for="delete-txn-admin-payment-accounting-inp" class="last"><?php _e('Send Related Messages?', 'event_espresso'); ?></label> |
|
459 | 459 | <input type="checkbox" value="1" name="delete_txn_reg_status_change[send_notifications]"> |
460 | 460 | <br/> |
461 | 461 | <br /> |
462 | - <p class="description"><?php _e( 'If you check this box, the system will send any related messages matching the status of the registrations to each registration for this transaction.', 'event_espresso' );?></p><br/> |
|
462 | + <p class="description"><?php _e('If you check this box, the system will send any related messages matching the status of the registrations to each registration for this transaction.', 'event_espresso'); ?></p><br/> |
|
463 | 463 | <label></label> |
464 | 464 | </div> |
465 | 465 | <div class="clear"></div> |
@@ -470,12 +470,12 @@ discard block |
||
470 | 470 | <ul id="del-admin-modal-dialog-options-ul"> |
471 | 471 | <li> |
472 | 472 | <a id="txn-admin-modal-dialog-delete-lnk" class="button-primary no-icon" style="display:none;" > |
473 | - <?php _e( 'Delete', 'event_espresso' );?> |
|
473 | + <?php _e('Delete', 'event_espresso'); ?> |
|
474 | 474 | </a> |
475 | 475 | </li> |
476 | 476 | <li> |
477 | 477 | <a id="del-txn-admin-modal-dialog-cancel-lnk" class="button-secondary no-icon" > |
478 | - <?php _e( 'Cancel', 'event_espresso' );?> |
|
478 | + <?php _e('Cancel', 'event_espresso'); ?> |
|
479 | 479 | </a> |
480 | 480 | </li> |
481 | 481 | <li> |
@@ -491,30 +491,30 @@ discard block |
||
491 | 491 | <?php endif; // $grand_raw_total > 0?> |
492 | 492 | |
493 | 493 | <?php |
494 | - if ( WP_DEBUG ) { |
|
495 | - $delivered_messages = get_option( 'EED_Messages__payment', array() ); |
|
496 | - if ( isset( $delivered_messages[ $TXN_ID ] )) { |
|
494 | + if (WP_DEBUG) { |
|
495 | + $delivered_messages = get_option('EED_Messages__payment', array()); |
|
496 | + if (isset($delivered_messages[$TXN_ID])) { |
|
497 | 497 | ?> |
498 | - <h4 class="admin-primary-mbox-h4 hdr-has-icon"><span class="dashicons dashicons-email-alt"></span><?php _e( 'Messages Sent to Primary Registrant', 'event_espresso' );?></h4> |
|
498 | + <h4 class="admin-primary-mbox-h4 hdr-has-icon"><span class="dashicons dashicons-email-alt"></span><?php _e('Messages Sent to Primary Registrant', 'event_espresso'); ?></h4> |
|
499 | 499 | |
500 | 500 | <div class="admin-primary-mbox-tbl-wrap"> |
501 | 501 | <table class="admin-primary-mbox-tbl"> |
502 | 502 | <thead> |
503 | 503 | <tr> |
504 | - <th class="jst-left"><?php _e( 'Date & Time', 'event_espresso' );?></th> |
|
505 | - <th class="jst-left"><?php _e( 'Message Type', 'event_espresso' );?></th> |
|
506 | - <th class="jst-left"><?php _e( 'Payment Status Upon Sending', 'event_espresso' );?></th> |
|
507 | - <th class="jst-left"><?php _e( 'TXN Status Upon Sending', 'event_espresso' );?></th> |
|
504 | + <th class="jst-left"><?php _e('Date & Time', 'event_espresso'); ?></th> |
|
505 | + <th class="jst-left"><?php _e('Message Type', 'event_espresso'); ?></th> |
|
506 | + <th class="jst-left"><?php _e('Payment Status Upon Sending', 'event_espresso'); ?></th> |
|
507 | + <th class="jst-left"><?php _e('TXN Status Upon Sending', 'event_espresso'); ?></th> |
|
508 | 508 | </tr> |
509 | 509 | </thead> |
510 | 510 | <tbody> |
511 | - <?php foreach ( $delivered_messages[ $TXN_ID ] as $timestamp => $delivered_message ) : |
|
511 | + <?php foreach ($delivered_messages[$TXN_ID] as $timestamp => $delivered_message) : |
|
512 | 512 | ?> |
513 | 513 | <tr> |
514 | - <td class="jst-left"><?php echo gmdate( get_option('date_format') . ' ' . get_option('time_format'), ( $timestamp + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) );?></td> |
|
515 | - <td class="jst-left"><?php echo isset( $delivered_message['message_type'] ) ? $delivered_message['message_type'] : '';?></td> |
|
516 | - <td class="jst-left"><?php echo isset( $delivered_message['pay_status'] ) ? $delivered_message['pay_status'] : '';?></td> |
|
517 | - <td class="jst-left"><?php echo isset( $delivered_message['txn_status'] ) ? $delivered_message['txn_status'] : '';?></td> |
|
514 | + <td class="jst-left"><?php echo gmdate(get_option('date_format').' '.get_option('time_format'), ($timestamp + (get_option('gmt_offset') * HOUR_IN_SECONDS))); ?></td> |
|
515 | + <td class="jst-left"><?php echo isset($delivered_message['message_type']) ? $delivered_message['message_type'] : ''; ?></td> |
|
516 | + <td class="jst-left"><?php echo isset($delivered_message['pay_status']) ? $delivered_message['pay_status'] : ''; ?></td> |
|
517 | + <td class="jst-left"><?php echo isset($delivered_message['txn_status']) ? $delivered_message['txn_status'] : ''; ?></td> |
|
518 | 518 | </tr> |
519 | 519 | <?php endforeach; // $delivered_messages?> |
520 | 520 | </tbody> |
@@ -2,13 +2,13 @@ |
||
2 | 2 | |
3 | 3 | <table id="admin-primary-mbox-txn-details-tbl" class="form-table"> |
4 | 4 | <tbody> |
5 | - <?php foreach ( $txn_details as $key => $txn_detail ) : ?> |
|
5 | + <?php foreach ($txn_details as $key => $txn_detail) : ?> |
|
6 | 6 | <tr> |
7 | 7 | <th> |
8 | - <label for="<?php echo $key;?>"><?php echo $txn_detail['label'];?></label> |
|
8 | + <label for="<?php echo $key; ?>"><?php echo $txn_detail['label']; ?></label> |
|
9 | 9 | </th> |
10 | 10 | <td> |
11 | - <?php echo $txn_detail['value'];?> |
|
11 | + <?php echo $txn_detail['value']; ?> |
|
12 | 12 | </td> |
13 | 13 | </tr> |
14 | 14 | <?php endforeach; // $txn_details?> |
@@ -1,19 +1,19 @@ |
||
1 | 1 | |
2 | 2 | <ul class="subsubsub"> |
3 | - <li class="all"><a class="current" href="<?php echo $view_all_url;?>">View All <span class="count">(<?php echo $table_rows; ?>)</span></a></li> |
|
3 | + <li class="all"><a class="current" href="<?php echo $view_all_url; ?>">View All <span class="count">(<?php echo $table_rows; ?>)</span></a></li> |
|
4 | 4 | </ul> |
5 | 5 | |
6 | 6 | <div id="txn-filters-dv"> |
7 | - <form id="txn-filters-frm" action="<?php echo $txn_overview_url;?>" method="post" name="txn-filters-frm"> |
|
8 | - <label for="txn-filter-start-date"><?php _e( 'Display Transactions from ', 'event_espresso' ); ?></label> |
|
7 | + <form id="txn-filters-frm" action="<?php echo $txn_overview_url; ?>" method="post" name="txn-filters-frm"> |
|
8 | + <label for="txn-filter-start-date"><?php _e('Display Transactions from ', 'event_espresso'); ?></label> |
|
9 | 9 | <input id="txn-filter-start-date" class="datepicker" type="text" value="<?php echo $start_date; ?>" name="txn-filter-start-date" size="15"/> |
10 | - <label for="txn-filter-end-date"> <?php _e( 'until', 'event_espresso' ); ?> </label> |
|
10 | + <label for="txn-filter-end-date"> <?php _e('until', 'event_espresso'); ?> </label> |
|
11 | 11 | <input id="txn-filter-end-date" class="datepicker" type="text" value="<?php echo $end_date; ?>" name="txn-filter-end-date" size="15"/> |
12 | 12 | <input id="submit-txn-filters-sbmt" class="button-secondary" type="submit" value="Filter Months"> |
13 | 13 | </form> |
14 | 14 | </div> |
15 | 15 | |
16 | - <form id="transactions-overview-frm" action="<?php echo $txn_overview_url;?>" method="get"> |
|
16 | + <form id="transactions-overview-frm" action="<?php echo $txn_overview_url; ?>" method="get"> |
|
17 | 17 | <input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" /> |
18 | 18 | <input type="hidden" id="per_page" name="per_page" value="" /> |
19 | 19 | <?php echo $list_table->display(); ?> |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <div class="wrap"> |
2 | 2 | |
3 | - <h2><?php esc_attr_e( 'Event Espresso', 'event_espresso' ); ?> - <?php esc_attr_e( $admin_page_title, 'event_espresso' ); ?></h2> |
|
3 | + <h2><?php esc_attr_e('Event Espresso', 'event_espresso'); ?> - <?php esc_attr_e($admin_page_title, 'event_espresso'); ?></h2> |
|
4 | 4 | |
5 | 5 | <h2 class="nav-tab-wrapper"> |
6 | 6 | <a class="nav-tab<?php echo $tab_active_overview; ?>" href="<?php echo $tab_url_overview; ?>"><?php echo $tab_lnk_overview; ?></a> |
7 | - <?php if ( $tab_details ) : ?> |
|
7 | + <?php if ($tab_details) : ?> |
|
8 | 8 | <a class="nav-tab<?php echo $tab_active_details; ?>" href="<?php echo $tab_url_details; ?>"><?php echo $tab_lnk_details; ?></a> |
9 | 9 | <?php endif; ?> |
10 | 10 | <a class="nav-tab<?php echo $tab_active_reports; ?>" href="<?php echo $tab_url_reports; ?>"><?php echo $tab_lnk_reports; ?></a> |
@@ -1,25 +1,25 @@ |
||
1 | 1 | <div class="changelog point-releases"> |
2 | - <!-- <h3><?php echo _n( 'Minor Release Information', 'Minor Releases', 1 ); ?></h3> --> |
|
3 | - <h3><?php echo _n( 'Major Release Information', 'Major Releases', 1 ); ?></h3> |
|
2 | + <!-- <h3><?php echo _n('Minor Release Information', 'Minor Releases', 1); ?></h3> --> |
|
3 | + <h3><?php echo _n('Major Release Information', 'Major Releases', 1); ?></h3> |
|
4 | 4 | <?php //$type = 'minor'; ?> |
5 | 5 | <?php $type = 'major'; ?> |
6 | - <p><?php printf( __( '<strong>Version %1$s</strong> is a %2$s release.', 'event_espresso'), EVENT_ESPRESSO_VERSION, $type ); ?> |
|
6 | + <p><?php printf(__('<strong>Version %1$s</strong> is a %2$s release.', 'event_espresso'), EVENT_ESPRESSO_VERSION, $type); ?> |
|
7 | 7 | <?php |
8 | - $ver = explode( '.', EVENT_ESPRESSO_VERSION ); |
|
9 | - array_pop( $ver ); |
|
10 | - $ver = implode( '.', $ver ); |
|
8 | + $ver = explode('.', EVENT_ESPRESSO_VERSION); |
|
9 | + array_pop($ver); |
|
10 | + $ver = implode('.', $ver); |
|
11 | 11 | ?> |
12 | - <?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://eventespresso.com/wiki/ee4-changelog/#' . $ver ); ?> |
|
12 | + <?php printf(__('For more information, see <a href="%s">the release notes</a>.'), 'http://eventespresso.com/wiki/ee4-changelog/#'.$ver); ?> |
|
13 | 13 | </p> |
14 | 14 | </div> |
15 | 15 | |
16 | 16 | <div class="changelog"> |
17 | 17 | <?php |
18 | 18 | //maintenance mode on? |
19 | - if ( EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance ) { |
|
19 | + if (EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance) { |
|
20 | 20 | ?> |
21 | 21 | <div class="ee-attention"> |
22 | - <h2 class="ee-maintenance-mode-callout"><?php _e('Event Espresso is in full maintenance mode.' , 'event_espresso'); ?></h2> |
|
22 | + <h2 class="ee-maintenance-mode-callout"><?php _e('Event Espresso is in full maintenance mode.', 'event_espresso'); ?></h2> |
|
23 | 23 | <p> |
24 | 24 | <?php |
25 | 25 | printf( |
@@ -17,14 +17,14 @@ |
||
17 | 17 | */ |
18 | 18 | class Extend_Events_Admin_List_Table extends Events_Admin_List_Table { |
19 | 19 | |
20 | - protected function _column_name_action_setup( EE_Event $item ) { |
|
20 | + protected function _column_name_action_setup(EE_Event $item) { |
|
21 | 21 | $export_query_args = array( |
22 | 22 | 'action' => 'export_events', |
23 | 23 | 'EVT_ID' => $item->ID() |
24 | 24 | ); |
25 | - $export_event_link = EE_Admin_Page::add_query_args_and_nonce( $export_query_args, EVENTS_ADMIN_URL ); |
|
25 | + $export_event_link = EE_Admin_Page::add_query_args_and_nonce($export_query_args, EVENTS_ADMIN_URL); |
|
26 | 26 | |
27 | - $actions = parent::_column_name_action_setup( $item ); |
|
27 | + $actions = parent::_column_name_action_setup($item); |
|
28 | 28 | // $actions['export'] = '<a href="' . $export_event_link . '" title="' . __('Export Event', 'event_espresso') . '">' . __('Export', 'event_espresso') . '</a>'; |
29 | 29 | return $actions; |
30 | 30 | } |
@@ -5,7 +5,9 @@ |
||
5 | 5 | * @subpackage admin |
6 | 6 | * @since 4.4.9 |
7 | 7 | */ |
8 | -if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
8 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
9 | + exit('No direct script access allowed'); |
|
10 | +} |
|
9 | 11 | |
10 | 12 | /** |
11 | 13 | * This is the caffeinated class for the event list table. It is only loaded in caffeinated versions of Event |
@@ -1,6 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -435,8 +436,9 @@ discard block |
||
435 | 436 | //k we've got EVT_ID so let's use that to get the event we'll duplicate |
436 | 437 | $orig_event = EEM_Event::instance()->get_one_by_ID( $this->_req_data['EVT_ID'] ); |
437 | 438 | |
438 | - if ( ! $orig_event instanceof EE_Event ) |
|
439 | - throw new EE_Error( sprintf( __('An EE_Event object could not be retrieved for the given ID (%s)', 'event_espresso '), $this->_req_data['EVT_ID'] ) ); |
|
439 | + if ( ! $orig_event instanceof EE_Event ) { |
|
440 | + throw new EE_Error( sprintf( __('An EE_Event object could not be retrieved for the given ID (%s)', 'event_espresso '), $this->_req_data['EVT_ID'] ) ); |
|
441 | + } |
|
440 | 442 | |
441 | 443 | //k now let's clone the $orig_event before getting relations |
442 | 444 | $new_event = clone $orig_event; |
@@ -510,8 +512,9 @@ discard block |
||
510 | 512 | //now let's get the ticket relations setup. |
511 | 513 | foreach ( (array) $orig_tkts as $orig_tkt ) { |
512 | 514 | //it's possible a datetime will have no tickets so let's verify we HAVE a ticket first. |
513 | - if ( ! $orig_tkt instanceof EE_Ticket ) |
|
514 | - continue; |
|
515 | + if ( ! $orig_tkt instanceof EE_Ticket ) { |
|
516 | + continue; |
|
517 | + } |
|
515 | 518 | |
516 | 519 | //is this ticket archived? If it is then let's skip |
517 | 520 | if ( $orig_tkt->get( 'TKT_deleted' ) ) { |
@@ -620,9 +623,9 @@ discard block |
||
620 | 623 | protected function _events_export() { |
621 | 624 | if(isset($this->_req_data['EVT_ID'])){ |
622 | 625 | $event_ids = $this->_req_data['EVT_ID']; |
623 | - }elseif(isset($this->_req_data['EVT_IDs'])){ |
|
626 | + } elseif(isset($this->_req_data['EVT_IDs'])){ |
|
624 | 627 | $event_ids = $this->_req_data['EVT_IDs']; |
625 | - }else{ |
|
628 | + } else{ |
|
626 | 629 | $event_ids = NULL; |
627 | 630 | } |
628 | 631 | //todo: I don't like doing this but it'll do until we modify EE_Export Class. |
@@ -811,8 +814,9 @@ discard block |
||
811 | 814 | |
812 | 815 | extract( wp_parse_args($args, $defaults), EXTR_SKIP ); |
813 | 816 | |
814 | - if ( empty($walker) || !is_a($walker, 'Walker') ) |
|
815 | - $walker = new Walker_Radio_Checklist; |
|
817 | + if ( empty($walker) || !is_a($walker, 'Walker') ) { |
|
818 | + $walker = new Walker_Radio_Checklist; |
|
819 | + } |
|
816 | 820 | |
817 | 821 | $descendants_and_self = (int) $descendants_and_self; |
818 | 822 | |
@@ -821,17 +825,19 @@ discard block |
||
821 | 825 | $tax = get_taxonomy($taxonomy); |
822 | 826 | $args['disabled'] = !current_user_can($tax->cap->assign_terms); |
823 | 827 | |
824 | - if ( is_array( $selected_cats ) ) |
|
825 | - $args['selected_cats'] = $selected_cats; |
|
826 | - elseif ( $post_id ) |
|
827 | - $args['selected_cats'] = wp_get_object_terms($post_id, $taxonomy, array_merge($args, array('fields' => 'ids'))); |
|
828 | - else |
|
829 | - $args['selected_cats'] = array(); |
|
828 | + if ( is_array( $selected_cats ) ) { |
|
829 | + $args['selected_cats'] = $selected_cats; |
|
830 | + } elseif ( $post_id ) { |
|
831 | + $args['selected_cats'] = wp_get_object_terms($post_id, $taxonomy, array_merge($args, array('fields' => 'ids'))); |
|
832 | + } else { |
|
833 | + $args['selected_cats'] = array(); |
|
834 | + } |
|
830 | 835 | |
831 | - if ( is_array( $popular_cats ) ) |
|
832 | - $args['popular_cats'] = $popular_cats; |
|
833 | - else |
|
834 | - $args['popular_cats'] = get_terms( $taxonomy, array( 'fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) ); |
|
836 | + if ( is_array( $popular_cats ) ) { |
|
837 | + $args['popular_cats'] = $popular_cats; |
|
838 | + } else { |
|
839 | + $args['popular_cats'] = get_terms( $taxonomy, array( 'fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) ); |
|
840 | + } |
|
835 | 841 | |
836 | 842 | if ( $descendants_and_self ) { |
837 | 843 | $categories = (array) get_terms($taxonomy, array( 'child_of' => $descendants_and_self, 'hierarchical' => 0, 'hide_empty' => 0 ) ); |
@@ -884,8 +890,9 @@ discard block |
||
884 | 890 | $status = isset( $this->_req_data['status'] ) ? $this->_req_data['status'] : NULL; |
885 | 891 | |
886 | 892 | //active status dropdown |
887 | - if ( $status !== 'draft' ) |
|
888 | - $filter[] = $this->active_status_dropdown( isset( $this->_req_data['active_status'] ) ? $this->_req_data['active_status'] : '' ); |
|
893 | + if ( $status !== 'draft' ) { |
|
894 | + $filter[] = $this->active_status_dropdown( isset( $this->_req_data['active_status'] ) ? $this->_req_data['active_status'] : '' ); |
|
895 | + } |
|
889 | 896 | |
890 | 897 | //category filter |
891 | 898 | $filters[] = $this->category_dropdown(); |
@@ -1064,7 +1071,7 @@ discard block |
||
1064 | 1071 | |
1065 | 1072 | if($count){ |
1066 | 1073 | return EEM_Ticket::instance()->count_deleted_and_undeleted(array($_where)); |
1067 | - }else{ |
|
1074 | + } else{ |
|
1068 | 1075 | return EEM_Ticket::instance()->get_all_deleted_and_undeleted($query_params); |
1069 | 1076 | } |
1070 | 1077 | |
@@ -1087,11 +1094,13 @@ discard block |
||
1087 | 1094 | //cycle thru the boxes |
1088 | 1095 | while ( list( $TKT_ID, $value ) = each( $this->_req_data['checkbox'] ) ) { |
1089 | 1096 | if ( $trash ) { |
1090 | - if ( ! $TKT->delete_by_ID( $TKT_ID ) ) |
|
1091 | - $success = 0; |
|
1097 | + if ( ! $TKT->delete_by_ID( $TKT_ID ) ) { |
|
1098 | + $success = 0; |
|
1099 | + } |
|
1092 | 1100 | } else { |
1093 | - if ( ! $TKT->restore_by_ID( $TKT_ID ) ) |
|
1094 | - $success = 0; |
|
1101 | + if ( ! $TKT->restore_by_ID( $TKT_ID ) ) { |
|
1102 | + $success = 0; |
|
1103 | + } |
|
1095 | 1104 | } |
1096 | 1105 | } |
1097 | 1106 | } else { |
@@ -1099,11 +1108,13 @@ discard block |
||
1099 | 1108 | $TKT_ID = absint( $this->_req_data['TKT_ID'] ); |
1100 | 1109 | |
1101 | 1110 | if ( $trash ) { |
1102 | - if ( ! $TKT->delete_by_ID( $TKT_ID ) ) |
|
1103 | - $success = 0; |
|
1111 | + if ( ! $TKT->delete_by_ID( $TKT_ID ) ) { |
|
1112 | + $success = 0; |
|
1113 | + } |
|
1104 | 1114 | } else { |
1105 | - if ( ! $TKT->restore_by_ID( $TKT_ID ) ) |
|
1106 | - $success = 0; |
|
1115 | + if ( ! $TKT->restore_by_ID( $TKT_ID ) ) { |
|
1116 | + $success = 0; |
|
1117 | + } |
|
1107 | 1118 | } |
1108 | 1119 | } |
1109 | 1120 | |
@@ -1151,8 +1162,9 @@ discard block |
||
1151 | 1162 | ); |
1152 | 1163 | |
1153 | 1164 | //failsafe. If the default ticket count === 1 then we need to redirect to event overview. |
1154 | - if ( EEM_Ticket::instance()->count_deleted_and_undeleted( array( array( 'TKT_is_default' => 1 ) ), 'TKT_ID', TRUE ) ) |
|
1155 | - $query_args = array(); |
|
1165 | + if ( EEM_Ticket::instance()->count_deleted_and_undeleted( array( array( 'TKT_is_default' => 1 ) ), 'TKT_ID', TRUE ) ) { |
|
1166 | + $query_args = array(); |
|
1167 | + } |
|
1156 | 1168 | $this->_redirect_after_action( $success, 'Tickets', $action_desc, $query_args ); |
1157 | 1169 | } |
1158 | 1170 | |
@@ -1176,13 +1188,15 @@ discard block |
||
1176 | 1188 | |
1177 | 1189 | function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { |
1178 | 1190 | extract($args); |
1179 | - if ( empty($taxonomy) ) |
|
1180 | - $taxonomy = 'category'; |
|
1191 | + if ( empty($taxonomy) ) { |
|
1192 | + $taxonomy = 'category'; |
|
1193 | + } |
|
1181 | 1194 | |
1182 | - if ( $taxonomy == 'category' ) |
|
1183 | - $name = 'post_category'; |
|
1184 | - else |
|
1185 | - $name = 'tax_input['.$taxonomy.']'; |
|
1195 | + if ( $taxonomy == 'category' ) { |
|
1196 | + $name = 'post_category'; |
|
1197 | + } else { |
|
1198 | + $name = 'tax_input['.$taxonomy.']'; |
|
1199 | + } |
|
1186 | 1200 | |
1187 | 1201 | $class = ''; |
1188 | 1202 | $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="radio" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>'; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -30,25 +30,25 @@ discard block |
||
30 | 30 | class Extend_Events_Admin_Page extends Events_Admin_Page { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $routing = TRUE ) { |
|
34 | - parent::__construct( $routing ); |
|
35 | - define( 'EVENTS_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'events/templates/'); |
|
36 | - define( 'EVENTS_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND . 'events/assets/'); |
|
37 | - define( 'EVENTS_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'events/assets/'); |
|
33 | + public function __construct($routing = TRUE) { |
|
34 | + parent::__construct($routing); |
|
35 | + define('EVENTS_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'events/templates/'); |
|
36 | + define('EVENTS_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND.'events/assets/'); |
|
37 | + define('EVENTS_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'events/assets/'); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
41 | 41 | protected function _extend_page_config() { |
42 | 42 | |
43 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'events'; |
|
43 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'events'; |
|
44 | 44 | $default_espresso_boxes = $this->_default_espresso_metaboxes; |
45 | 45 | |
46 | 46 | //is there a evt_id in the request? |
47 | - $evt_id = ! empty( $this->_req_data['EVT_ID'] ) && ! is_array( $this->_req_data['EVT_ID'] ) ? $this->_req_data['EVT_ID'] : 0; |
|
48 | - $evt_id = ! empty( $this->_req_data['post'] ) ? $this->_req_data['post'] : $evt_id; |
|
47 | + $evt_id = ! empty($this->_req_data['EVT_ID']) && ! is_array($this->_req_data['EVT_ID']) ? $this->_req_data['EVT_ID'] : 0; |
|
48 | + $evt_id = ! empty($this->_req_data['post']) ? $this->_req_data['post'] : $evt_id; |
|
49 | 49 | |
50 | 50 | //tkt_id? |
51 | - $tkt_id = !empty( $this->_req_data['TKT_ID'] ) && ! is_array( $this->_req_data['TKT_ID'] ) ? $this->_req_data['TKT_ID'] : 0; |
|
51 | + $tkt_id = ! empty($this->_req_data['TKT_ID']) && ! is_array($this->_req_data['TKT_ID']) ? $this->_req_data['TKT_ID'] : 0; |
|
52 | 52 | |
53 | 53 | $new_page_routes = array( |
54 | 54 | 'duplicate_event' => array( |
@@ -66,13 +66,13 @@ discard block |
||
66 | 66 | 'capability' => 'ee_delete_default_ticket', |
67 | 67 | 'obj_id' => $tkt_id, |
68 | 68 | 'noheader' => TRUE, |
69 | - 'args' => array( 'trash' => TRUE ) |
|
69 | + 'args' => array('trash' => TRUE) |
|
70 | 70 | ), |
71 | 71 | 'trash_tickets' => array( |
72 | 72 | 'func' => '_trash_or_restore_ticket', |
73 | 73 | 'capability' => 'ee_delete_default_tickets', |
74 | 74 | 'noheader' => TRUE, |
75 | - 'args' => array( 'trash' => TRUE ) |
|
75 | + 'args' => array('trash' => TRUE) |
|
76 | 76 | ), |
77 | 77 | 'restore_ticket' => array( |
78 | 78 | 'func' => '_trash_or_restore_ticket', |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | ) |
128 | 128 | ); |
129 | 129 | |
130 | - $this->_page_routes = array_merge( $this->_page_routes, $new_page_routes ); |
|
130 | + $this->_page_routes = array_merge($this->_page_routes, $new_page_routes); |
|
131 | 131 | |
132 | 132 | |
133 | 133 | //partial route/config override |
@@ -139,8 +139,8 @@ discard block |
||
139 | 139 | $this->_page_config['default']['list_table'] = 'Extend_Events_Admin_List_Table'; |
140 | 140 | |
141 | 141 | //add tickets tab but only if there are more than one default ticket! |
142 | - $tkt_count = EEM_Ticket::instance()->count_deleted_and_undeleted(array( array('TKT_is_default' => 1 ) ), 'TKT_ID', TRUE ); |
|
143 | - if ( $tkt_count > 1 ) { |
|
142 | + $tkt_count = EEM_Ticket::instance()->count_deleted_and_undeleted(array(array('TKT_is_default' => 1)), 'TKT_ID', TRUE); |
|
143 | + if ($tkt_count > 1) { |
|
144 | 144 | $new_page_config = array( |
145 | 145 | 'ticket_list_table' => array( |
146 | 146 | 'nav' => array( |
@@ -168,24 +168,24 @@ discard block |
||
168 | 168 | 'metaboxes' => $default_espresso_boxes, |
169 | 169 | 'require_nonce' => FALSE |
170 | 170 | ); |
171 | - $this->_page_config = array_merge( $this->_page_config, $new_page_config ); |
|
171 | + $this->_page_config = array_merge($this->_page_config, $new_page_config); |
|
172 | 172 | |
173 | 173 | //add filters and actions |
174 | 174 | //modifying _views |
175 | - add_filter('FHEE_event_datetime_metabox_add_additional_date_time_template', array( $this, 'add_additional_datetime_button' ), 10, 2 ); |
|
176 | - add_filter('FHEE_event_datetime_metabox_clone_button_template', array( $this, 'add_datetime_clone_button' ), 10, 2 ); |
|
177 | - add_filter('FHEE_event_datetime_metabox_timezones_template', array( $this, 'datetime_timezones_template'), 10, 2 ); |
|
175 | + add_filter('FHEE_event_datetime_metabox_add_additional_date_time_template', array($this, 'add_additional_datetime_button'), 10, 2); |
|
176 | + add_filter('FHEE_event_datetime_metabox_clone_button_template', array($this, 'add_datetime_clone_button'), 10, 2); |
|
177 | + add_filter('FHEE_event_datetime_metabox_timezones_template', array($this, 'datetime_timezones_template'), 10, 2); |
|
178 | 178 | |
179 | 179 | |
180 | 180 | //filters for event list table |
181 | - add_filter('FHEE__Extend_Events_Admin_List_Table__filters', array( $this, 'list_table_filters'), 10, 2); |
|
182 | - add_filter('FHEE__Extend_Events_Admin_List_Table__column_actions__action_links', array( $this, 'extra_list_table_actions'), 10, 2 ); |
|
181 | + add_filter('FHEE__Extend_Events_Admin_List_Table__filters', array($this, 'list_table_filters'), 10, 2); |
|
182 | + add_filter('FHEE__Extend_Events_Admin_List_Table__column_actions__action_links', array($this, 'extra_list_table_actions'), 10, 2); |
|
183 | 183 | |
184 | 184 | //legend item |
185 | - add_filter('FHEE__Events_Admin_Page___event_legend_items__items', array( $this, 'additional_legend_items') ); |
|
185 | + add_filter('FHEE__Events_Admin_Page___event_legend_items__items', array($this, 'additional_legend_items')); |
|
186 | 186 | |
187 | 187 | //heartbeat stuff |
188 | - add_filter( 'heartbeat_received', array( $this, 'heartbeat_response' ), 10, 2 ); |
|
188 | + add_filter('heartbeat_received', array($this, 'heartbeat_response'), 10, 2); |
|
189 | 189 | |
190 | 190 | } |
191 | 191 | |
@@ -199,12 +199,12 @@ discard block |
||
199 | 199 | * |
200 | 200 | * @return array possibly appended response. |
201 | 201 | */ |
202 | - public function heartbeat_response( $response, $data ) { |
|
202 | + public function heartbeat_response($response, $data) { |
|
203 | 203 | /** |
204 | 204 | * check whether count of tickets is approaching the potential |
205 | 205 | * limits for the server. |
206 | 206 | */ |
207 | - if ( ! empty( $data['input_count'] ) ) { |
|
207 | + if ( ! empty($data['input_count'])) { |
|
208 | 208 | $response['max_input_vars_check'] = EE_Registry::instance()->CFG->environment->max_input_vars_limit_check($data['input_count']); |
209 | 209 | } |
210 | 210 | |
@@ -219,13 +219,13 @@ discard block |
||
219 | 219 | |
220 | 220 | |
221 | 221 | |
222 | - public function extra_permalink_field_buttons( $return, $id, $new_title, $new_slug ) { |
|
223 | - $return = parent::extra_permalink_field_buttons( $return, $id, $new_title, $new_slug ); |
|
222 | + public function extra_permalink_field_buttons($return, $id, $new_title, $new_slug) { |
|
223 | + $return = parent::extra_permalink_field_buttons($return, $id, $new_title, $new_slug); |
|
224 | 224 | //make sure this is only when editing |
225 | - if ( !empty( $id ) ) { |
|
226 | - $href = EE_Admin_Page::add_query_args_and_nonce( array('action' => 'duplicate_event', 'EVT_ID' => $id), $this->_admin_base_url ); |
|
225 | + if ( ! empty($id)) { |
|
226 | + $href = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'duplicate_event', 'EVT_ID' => $id), $this->_admin_base_url); |
|
227 | 227 | $title = esc_attr__('Duplicate Event', 'event_espresso'); |
228 | - $return .= '<a href="' . $href . '" title="' . $title . '" id="ee-duplicate-event-button" class="button button-small" value="duplicate_event">' . $title . '</button>'; |
|
228 | + $return .= '<a href="'.$href.'" title="'.$title.'" id="ee-duplicate-event-button" class="button button-small" value="duplicate_event">'.$title.'</button>'; |
|
229 | 229 | } |
230 | 230 | return $return; |
231 | 231 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | 'label' => __('Trash', 'event_espresso'), |
249 | 249 | 'count' => 0, |
250 | 250 | 'bulk_action' => array( |
251 | - 'restore_tickets' => __('Restore from Trash' , 'event_espresso'), |
|
251 | + 'restore_tickets' => __('Restore from Trash', 'event_espresso'), |
|
252 | 252 | 'delete_tickets' => __('Delete Permanently', 'event_espresso') |
253 | 253 | ) |
254 | 254 | ) |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | |
259 | 259 | |
260 | 260 | public function load_scripts_styles_edit() { |
261 | - wp_register_script( 'ee-event-editor-heartbeat', EVENTS_CAF_ASSETS_URL . 'event-editor-heartbeat.js', array( 'ee_admin_js', 'heartbeat' ), EVENT_ESPRESSO_VERSION, TRUE ); |
|
261 | + wp_register_script('ee-event-editor-heartbeat', EVENTS_CAF_ASSETS_URL.'event-editor-heartbeat.js', array('ee_admin_js', 'heartbeat'), EVENT_ESPRESSO_VERSION, TRUE); |
|
262 | 262 | |
263 | 263 | /** |
264 | 264 | * load accounting js. |
@@ -278,8 +278,8 @@ discard block |
||
278 | 278 | 'event_clone_dt_msg' => __('Clone this Event Date and Time', 'event_espresso'), |
279 | 279 | 'remove_event_dt_msg' => __('Remove this Event Time', 'event_espresso') |
280 | 280 | ); |
281 | - EE_Registry::$i18n_js_strings = array_merge( EE_Registry::$i18n_js_strings, $new_strings); |
|
282 | - wp_localize_script( 'event_editor_js', 'eei18n', EE_Registry::$i18n_js_strings ); |
|
281 | + EE_Registry::$i18n_js_strings = array_merge(EE_Registry::$i18n_js_strings, $new_strings); |
|
282 | + wp_localize_script('event_editor_js', 'eei18n', EE_Registry::$i18n_js_strings); |
|
283 | 283 | |
284 | 284 | } |
285 | 285 | |
@@ -288,20 +288,20 @@ discard block |
||
288 | 288 | |
289 | 289 | |
290 | 290 | |
291 | - public function add_additional_datetime_button( $template, $template_args ) { |
|
292 | - return EEH_Template::display_template( EVENTS_CAF_TEMPLATE_PATH . 'event_datetime_add_additional_time.template.php', $template_args, TRUE); |
|
291 | + public function add_additional_datetime_button($template, $template_args) { |
|
292 | + return EEH_Template::display_template(EVENTS_CAF_TEMPLATE_PATH.'event_datetime_add_additional_time.template.php', $template_args, TRUE); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | |
296 | 296 | |
297 | - public function add_datetime_clone_button( $template, $template_args ) { |
|
298 | - return EEH_Template::display_template( EVENTS_CAF_TEMPLATE_PATH . 'event_datetime_metabox_clone_button.template.php', $template_args, TRUE ); |
|
297 | + public function add_datetime_clone_button($template, $template_args) { |
|
298 | + return EEH_Template::display_template(EVENTS_CAF_TEMPLATE_PATH.'event_datetime_metabox_clone_button.template.php', $template_args, TRUE); |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | |
302 | 302 | |
303 | - public function datetime_timezones_template( $template, $template_args ) { |
|
304 | - return EEH_Template::display_template( EVENTS_CAF_TEMPLATE_PATH . 'event_datetime_timezones.template.php', $template_args, TRUE ); |
|
303 | + public function datetime_timezones_template($template, $template_args) { |
|
304 | + return EEH_Template::display_template(EVENTS_CAF_TEMPLATE_PATH.'event_datetime_timezones.template.php', $template_args, TRUE); |
|
305 | 305 | } |
306 | 306 | |
307 | 307 | |
@@ -310,11 +310,11 @@ discard block |
||
310 | 310 | protected function _set_list_table_views_default() { |
311 | 311 | parent::_set_list_table_views_default(); |
312 | 312 | $export_label = __('Export Events', 'event_espresso'); |
313 | - if ( EE_Registry::instance()->CAP->current_user_can( 'export', 'espresso_events_export' ) ) { |
|
313 | + if (EE_Registry::instance()->CAP->current_user_can('export', 'espresso_events_export')) { |
|
314 | 314 | // $this->_views['all']['bulk_action']['export_events'] = $export_label; |
315 | 315 | // $this->_views['draft']['bulk_action']['export_events'] = $export_label; |
316 | 316 | |
317 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_events', 'espresso_events_trash_events' ) ) { |
|
317 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_events', 'espresso_events_trash_events')) { |
|
318 | 318 | // $this->_views['trash']['bulk_action']['export_events'] = $export_label; |
319 | 319 | } |
320 | 320 | } |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | ) |
341 | 341 | ); |
342 | 342 | |
343 | - $this->_views = array_merge( $this->_views, $new_views); |
|
343 | + $this->_views = array_merge($this->_views, $new_views); |
|
344 | 344 | } |
345 | 345 | |
346 | 346 | |
@@ -354,14 +354,14 @@ discard block |
||
354 | 354 | |
355 | 355 | |
356 | 356 | |
357 | - public function extra_list_table_actions( $actionlinks, $event ) { |
|
358 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'espresso_registrations_reports', $event->ID() ) ) { |
|
357 | + public function extra_list_table_actions($actionlinks, $event) { |
|
358 | + if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'espresso_registrations_reports', $event->ID())) { |
|
359 | 359 | $reports_query_args = array( |
360 | 360 | 'action' => 'reports', |
361 | 361 | 'EVT_ID' => $event->ID() |
362 | 362 | ); |
363 | - $reports_link = EE_Admin_Page::add_query_args_and_nonce( $reports_query_args, REG_ADMIN_URL ); |
|
364 | - $actionlinks[] = '<a href="' . $reports_link . '" title="' . esc_attr__('View Report', 'event_espresso') . '"><div class="dashicons dashicons-chart-bar"></div></a>' . "\n\t"; |
|
363 | + $reports_link = EE_Admin_Page::add_query_args_and_nonce($reports_query_args, REG_ADMIN_URL); |
|
364 | + $actionlinks[] = '<a href="'.$reports_link.'" title="'.esc_attr__('View Report', 'event_espresso').'"><div class="dashicons dashicons-chart-bar"></div></a>'."\n\t"; |
|
365 | 365 | } |
366 | 366 | return $actionlinks; |
367 | 367 | } |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | |
370 | 370 | |
371 | 371 | public function additional_legend_items($items) { |
372 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'espresso_registrations_reports' ) ) { |
|
372 | + if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'espresso_registrations_reports')) { |
|
373 | 373 | $items['reports'] = array( |
374 | 374 | 'class' => 'dashicons dashicons-chart-bar', |
375 | 375 | 'desc' => __('Event Reports', 'event_espresso') |
@@ -394,17 +394,17 @@ discard block |
||
394 | 394 | */ |
395 | 395 | protected function _duplicate_event() { |
396 | 396 | //first make sure the ID for the event is in the request. If it isnt' then we need to bail and redirect back to overview list table (cause how did we get here?) |
397 | - if ( !isset( $this->_req_data['EVT_ID'] ) ) { |
|
398 | - EE_Error::add_error( __('In order to duplicate an event an Event ID is required. None was given.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ ); |
|
399 | - $this->_redirect_after_action( FALSE, '', '', array(), TRUE ); |
|
397 | + if ( ! isset($this->_req_data['EVT_ID'])) { |
|
398 | + EE_Error::add_error(__('In order to duplicate an event an Event ID is required. None was given.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
399 | + $this->_redirect_after_action(FALSE, '', '', array(), TRUE); |
|
400 | 400 | return; |
401 | 401 | } |
402 | 402 | |
403 | 403 | //k we've got EVT_ID so let's use that to get the event we'll duplicate |
404 | - $orig_event = EEM_Event::instance()->get_one_by_ID( $this->_req_data['EVT_ID'] ); |
|
404 | + $orig_event = EEM_Event::instance()->get_one_by_ID($this->_req_data['EVT_ID']); |
|
405 | 405 | |
406 | - if ( ! $orig_event instanceof EE_Event ) |
|
407 | - throw new EE_Error( sprintf( __('An EE_Event object could not be retrieved for the given ID (%s)', 'event_espresso '), $this->_req_data['EVT_ID'] ) ); |
|
406 | + if ( ! $orig_event instanceof EE_Event) |
|
407 | + throw new EE_Error(sprintf(__('An EE_Event object could not be retrieved for the given ID (%s)', 'event_espresso '), $this->_req_data['EVT_ID'])); |
|
408 | 408 | |
409 | 409 | //k now let's clone the $orig_event before getting relations |
410 | 410 | $new_event = clone $orig_event; |
@@ -417,43 +417,43 @@ discard block |
||
417 | 417 | |
418 | 418 | |
419 | 419 | //reset the ID and modify other details to make it clear this is a dupe |
420 | - $new_event->set( 'EVT_ID', 0 ); |
|
421 | - $new_name = $new_event->name() . ' ' . __('**DUPLICATE**', 'event_espresso'); |
|
422 | - $new_event->set( 'EVT_name', $new_name ); |
|
423 | - $new_event->set( 'EVT_slug', sanitize_title_with_dashes( $new_name ) ); |
|
424 | - $new_event->set( 'status', 'draft' ); |
|
420 | + $new_event->set('EVT_ID', 0); |
|
421 | + $new_name = $new_event->name().' '.__('**DUPLICATE**', 'event_espresso'); |
|
422 | + $new_event->set('EVT_name', $new_name); |
|
423 | + $new_event->set('EVT_slug', sanitize_title_with_dashes($new_name)); |
|
424 | + $new_event->set('status', 'draft'); |
|
425 | 425 | |
426 | 426 | //duplicate discussion settings |
427 | - $new_event->set( 'comment_status', $orig_event->get('comment_status') ); |
|
428 | - $new_event->set( 'ping_status', $orig_event->get( 'ping_status' ) ); |
|
427 | + $new_event->set('comment_status', $orig_event->get('comment_status')); |
|
428 | + $new_event->set('ping_status', $orig_event->get('ping_status')); |
|
429 | 429 | |
430 | 430 | //save the new event |
431 | 431 | $new_event->save(); |
432 | 432 | |
433 | 433 | //venues |
434 | - foreach( $orig_ven as $ven ) { |
|
435 | - $new_event->_add_relation_to( $ven, 'Venue' ); |
|
434 | + foreach ($orig_ven as $ven) { |
|
435 | + $new_event->_add_relation_to($ven, 'Venue'); |
|
436 | 436 | } |
437 | 437 | $new_event->save(); |
438 | 438 | |
439 | 439 | |
440 | 440 | //now we need to get the question group relations and handle that |
441 | 441 | //first primary question groups |
442 | - $orig_primary_qgs = $orig_event->get_many_related('Question_Group', array( array('Event_Question_Group.EQG_primary' => 1 ) ) ); |
|
443 | - if ( !empty( $orig_primary_qgs ) ) { |
|
444 | - foreach ( $orig_primary_qgs as $id => $obj ) { |
|
445 | - if ( $obj instanceof EE_Question_Group ) { |
|
446 | - $new_event->_add_relation_to( $obj, 'Question_Group', array( 'EQG_primary' => 1 ) ); |
|
442 | + $orig_primary_qgs = $orig_event->get_many_related('Question_Group', array(array('Event_Question_Group.EQG_primary' => 1))); |
|
443 | + if ( ! empty($orig_primary_qgs)) { |
|
444 | + foreach ($orig_primary_qgs as $id => $obj) { |
|
445 | + if ($obj instanceof EE_Question_Group) { |
|
446 | + $new_event->_add_relation_to($obj, 'Question_Group', array('EQG_primary' => 1)); |
|
447 | 447 | } |
448 | 448 | } |
449 | 449 | } |
450 | 450 | |
451 | 451 | //next additional attendee question groups |
452 | - $orig_additional_qgs = $orig_event->get_many_related('Question_Group', array( array('Event_Question_Group.EQG_primary' => 0 ) ) ); |
|
453 | - if ( !empty( $orig_additional_qgs ) ) { |
|
454 | - foreach ( $orig_additional_qgs as $id => $obj ) { |
|
455 | - if ( $obj instanceof EE_Question_Group ) { |
|
456 | - $new_event->_add_relation_to( $obj, 'Question_Group', array( 'EQG_primary' => 0 ) ); |
|
452 | + $orig_additional_qgs = $orig_event->get_many_related('Question_Group', array(array('Event_Question_Group.EQG_primary' => 0))); |
|
453 | + if ( ! empty($orig_additional_qgs)) { |
|
454 | + foreach ($orig_additional_qgs as $id => $obj) { |
|
455 | + if ($obj instanceof EE_Question_Group) { |
|
456 | + $new_event->_add_relation_to($obj, 'Question_Group', array('EQG_primary' => 0)); |
|
457 | 457 | } |
458 | 458 | } |
459 | 459 | } |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | |
465 | 465 | //k now that we have the new event saved we can loop through the datetimes and start adding relations. |
466 | 466 | $cloned_tickets = array(); |
467 | - foreach ( $orig_datetimes as $orig_dtt ) { |
|
467 | + foreach ($orig_datetimes as $orig_dtt) { |
|
468 | 468 | $new_dtt = clone $orig_dtt; |
469 | 469 | $orig_tkts = $orig_dtt->tickets(); |
470 | 470 | |
@@ -472,22 +472,22 @@ discard block |
||
472 | 472 | $new_dtt->set('DTT_ID', 0); |
473 | 473 | $new_dtt->set('DTT_sold', 0); |
474 | 474 | $new_dtt->save(); |
475 | - $new_event->_add_relation_to( $new_dtt, 'Datetime'); |
|
475 | + $new_event->_add_relation_to($new_dtt, 'Datetime'); |
|
476 | 476 | $new_event->save(); |
477 | 477 | |
478 | 478 | //now let's get the ticket relations setup. |
479 | - foreach ( (array) $orig_tkts as $orig_tkt ) { |
|
479 | + foreach ((array) $orig_tkts as $orig_tkt) { |
|
480 | 480 | //it's possible a datetime will have no tickets so let's verify we HAVE a ticket first. |
481 | - if ( ! $orig_tkt instanceof EE_Ticket ) |
|
481 | + if ( ! $orig_tkt instanceof EE_Ticket) |
|
482 | 482 | continue; |
483 | 483 | |
484 | 484 | //is this ticket archived? If it is then let's skip |
485 | - if ( $orig_tkt->get( 'TKT_deleted' ) ) { |
|
485 | + if ($orig_tkt->get('TKT_deleted')) { |
|
486 | 486 | continue; |
487 | 487 | } |
488 | 488 | |
489 | 489 | //does this original ticket already exist in the clone_tickets cache? If so we'll just use the new ticket from it. |
490 | - if ( isset( $cloned_tickets[$orig_tkt->ID()] ) ) { |
|
490 | + if (isset($cloned_tickets[$orig_tkt->ID()])) { |
|
491 | 491 | $new_tkt = $cloned_tickets[$orig_tkt->ID()]; |
492 | 492 | } else { |
493 | 493 | $new_tkt = clone $orig_tkt; |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | $new_tkt->save(); //make sure new ticket has ID. |
500 | 500 | |
501 | 501 | //price relations on new ticket need to be setup. |
502 | - foreach ( $orig_prices as $orig_price ) { |
|
502 | + foreach ($orig_prices as $orig_price) { |
|
503 | 503 | $new_price = clone $orig_price; |
504 | 504 | $new_price->set('PRC_ID', 0); |
505 | 505 | $new_price->save(); |
@@ -516,39 +516,39 @@ discard block |
||
516 | 516 | } |
517 | 517 | |
518 | 518 | //clone taxonomy information |
519 | - $taxonomies_to_clone_with = apply_filters( 'FHEE__Extend_Events_Admin_Page___duplicate_event__taxonomies_to_clone', array( 'espresso_event_categories', 'espresso_event_type', 'post_tag' ) ); |
|
519 | + $taxonomies_to_clone_with = apply_filters('FHEE__Extend_Events_Admin_Page___duplicate_event__taxonomies_to_clone', array('espresso_event_categories', 'espresso_event_type', 'post_tag')); |
|
520 | 520 | |
521 | 521 | //get terms for original event (notice) |
522 | - $orig_terms = wp_get_object_terms( $orig_event->ID(), $taxonomies_to_clone_with ); |
|
522 | + $orig_terms = wp_get_object_terms($orig_event->ID(), $taxonomies_to_clone_with); |
|
523 | 523 | |
524 | 524 | //loop through terms and add them to new event. |
525 | - foreach ( $orig_terms as $term ) { |
|
526 | - wp_set_object_terms( $new_event->ID(), $term->term_id, $term->taxonomy, true ); |
|
525 | + foreach ($orig_terms as $term) { |
|
526 | + wp_set_object_terms($new_event->ID(), $term->term_id, $term->taxonomy, true); |
|
527 | 527 | } |
528 | 528 | |
529 | 529 | |
530 | - do_action( 'AHEE__Extend_Events_Admin_Page___duplicate_event__after', $new_event, $orig_event ); |
|
530 | + do_action('AHEE__Extend_Events_Admin_Page___duplicate_event__after', $new_event, $orig_event); |
|
531 | 531 | |
532 | 532 | //now let's redirect to the edit page for this duplicated event if we have a new event id. |
533 | - if ( $new_event->ID() ) { |
|
533 | + if ($new_event->ID()) { |
|
534 | 534 | $redirect_args = array( |
535 | 535 | 'post' => $new_event->ID(), |
536 | 536 | 'action' => 'edit' |
537 | 537 | ); |
538 | - EE_Error::add_success( __('Event successfully duplicated. Please review the details below and make any necessary edits', 'event_espresso') ); |
|
538 | + EE_Error::add_success(__('Event successfully duplicated. Please review the details below and make any necessary edits', 'event_espresso')); |
|
539 | 539 | } else { |
540 | 540 | $redirect_args = array( |
541 | 541 | 'action' => 'default' |
542 | 542 | ); |
543 | - EE_Error::add_error( __('Not able to duplicate event. Something went wrong.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ ); |
|
543 | + EE_Error::add_error(__('Not able to duplicate event. Something went wrong.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
544 | 544 | } |
545 | 545 | |
546 | - $this->_redirect_after_action(FALSE, '', '', $redirect_args, TRUE ); |
|
546 | + $this->_redirect_after_action(FALSE, '', '', $redirect_args, TRUE); |
|
547 | 547 | } |
548 | 548 | |
549 | 549 | |
550 | 550 | |
551 | - protected function _import_page(){ |
|
551 | + protected function _import_page() { |
|
552 | 552 | |
553 | 553 | $title = __('Import', 'event_espresso'); |
554 | 554 | $intro = __('If you have a previously exported Event Espresso 4 information in a Comma Separated Value (CSV) file format, you can upload the file here: ', 'event_espresso'); |
@@ -556,8 +556,8 @@ discard block |
||
556 | 556 | $action = 'import_events'; |
557 | 557 | $type = 'csv'; |
558 | 558 | $this->_template_args['form'] = EE_Import::instance()->upload_form($title, $intro, $form_url, $action, $type); |
559 | - $this->_template_args['sample_file_link'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'sample_export_file'),$this->_admin_base_url); |
|
560 | - $content = EEH_Template::display_template(EVENTS_CAF_TEMPLATE_PATH . 'import_page.template.php',$this->_template_args,true); |
|
559 | + $this->_template_args['sample_file_link'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'sample_export_file'), $this->_admin_base_url); |
|
560 | + $content = EEH_Template::display_template(EVENTS_CAF_TEMPLATE_PATH.'import_page.template.php', $this->_template_args, true); |
|
561 | 561 | |
562 | 562 | |
563 | 563 | $this->_template_args['admin_page_content'] = $content; |
@@ -570,9 +570,9 @@ discard block |
||
570 | 570 | * @return string html |
571 | 571 | */ |
572 | 572 | protected function _import_events() { |
573 | - require_once(EE_CLASSES . 'EE_Import.class.php'); |
|
573 | + require_once(EE_CLASSES.'EE_Import.class.php'); |
|
574 | 574 | $success = EE_Import::instance()->import(); |
575 | - $this->_redirect_after_action($success, 'Import File', 'ran', array('action' => 'import_page'),true); |
|
575 | + $this->_redirect_after_action($success, 'Import File', 'ran', array('action' => 'import_page'), true); |
|
576 | 576 | |
577 | 577 | } |
578 | 578 | |
@@ -586,24 +586,24 @@ discard block |
||
586 | 586 | * @return file |
587 | 587 | */ |
588 | 588 | protected function _events_export() { |
589 | - if(isset($this->_req_data['EVT_ID'])){ |
|
589 | + if (isset($this->_req_data['EVT_ID'])) { |
|
590 | 590 | $event_ids = $this->_req_data['EVT_ID']; |
591 | - }elseif(isset($this->_req_data['EVT_IDs'])){ |
|
591 | + }elseif (isset($this->_req_data['EVT_IDs'])) { |
|
592 | 592 | $event_ids = $this->_req_data['EVT_IDs']; |
593 | - }else{ |
|
593 | + } else { |
|
594 | 594 | $event_ids = NULL; |
595 | 595 | } |
596 | 596 | //todo: I don't like doing this but it'll do until we modify EE_Export Class. |
597 | 597 | $new_request_args = array( |
598 | 598 | 'export' => 'report', |
599 | 599 | 'action' => 'all_event_data', |
600 | - 'EVT_ID' => $event_ids , |
|
600 | + 'EVT_ID' => $event_ids, |
|
601 | 601 | ); |
602 | 602 | $this->_req_data = array_merge($this->_req_data, $new_request_args); |
603 | 603 | |
604 | - EE_Registry::instance()->load_helper( 'File' ); |
|
605 | - if ( is_readable(EE_CLASSES . 'EE_Export.class.php')) { |
|
606 | - require_once(EE_CLASSES . 'EE_Export.class.php'); |
|
604 | + EE_Registry::instance()->load_helper('File'); |
|
605 | + if (is_readable(EE_CLASSES.'EE_Export.class.php')) { |
|
606 | + require_once(EE_CLASSES.'EE_Export.class.php'); |
|
607 | 607 | $EE_Export = EE_Export::instance($this->_req_data); |
608 | 608 | $EE_Export->export(); |
609 | 609 | } |
@@ -625,12 +625,12 @@ discard block |
||
625 | 625 | 'category_ids' => $this->_req_data['EVT_CAT_ID'] |
626 | 626 | ); |
627 | 627 | |
628 | - $this->_req_data = array_merge( $this->_req_data, $new_request_args ); |
|
628 | + $this->_req_data = array_merge($this->_req_data, $new_request_args); |
|
629 | 629 | |
630 | - EE_Registry::instance()->load_helper( 'File' ); |
|
631 | - if ( is_readable( EE_CLASSES . 'EE_Export.class.php') ) { |
|
632 | - require_once( EE_CLASSES . 'EE_Export.class.php'); |
|
633 | - $EE_Export = EE_Export::instance( $this->_req_data ); |
|
630 | + EE_Registry::instance()->load_helper('File'); |
|
631 | + if (is_readable(EE_CLASSES.'EE_Export.class.php')) { |
|
632 | + require_once(EE_CLASSES.'EE_Export.class.php'); |
|
633 | + $EE_Export = EE_Export::instance($this->_req_data); |
|
634 | 634 | $EE_Export->export(); |
635 | 635 | } |
636 | 636 | |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | /** |
642 | 642 | * Creates a sample CSV file for importing |
643 | 643 | */ |
644 | - protected function _sample_export_file(){ |
|
644 | + protected function _sample_export_file() { |
|
645 | 645 | // require_once(EE_CLASSES . 'EE_Export.class.php'); |
646 | 646 | EE_Export::instance()->export_sample(); |
647 | 647 | } |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | |
660 | 660 | $this->verify_cpt_object(); |
661 | 661 | |
662 | - add_meta_box('espresso_event_editor_event_options', __('Event Registration Options', 'event_espresso'), array( $this, 'registration_options_meta_box' ), $this->page_slug, 'side', 'core'); |
|
662 | + add_meta_box('espresso_event_editor_event_options', __('Event Registration Options', 'event_espresso'), array($this, 'registration_options_meta_box'), $this->page_slug, 'side', 'core'); |
|
663 | 663 | //add_meta_box('espresso_event_types', __('Event Type', 'event_espresso'), array( $this, 'event_type_meta_box' ), $this->page_slug, 'side', 'default' ); //add this back in when the feature is ready. |
664 | 664 | |
665 | 665 | //todo feature in progress |
@@ -683,16 +683,16 @@ discard block |
||
683 | 683 | array('id' => true, 'text' => __('Yes', 'event_espresso')), |
684 | 684 | array('id' => false, 'text' => __('No', 'event_espresso')) |
685 | 685 | ); |
686 | - $default_reg_status_values = EEM_Registration::reg_status_array(array(EEM_Registration::status_id_cancelled, EEM_Registration::status_id_declined, EEM_Registration::status_id_incomplete ), TRUE); |
|
686 | + $default_reg_status_values = EEM_Registration::reg_status_array(array(EEM_Registration::status_id_cancelled, EEM_Registration::status_id_declined, EEM_Registration::status_id_incomplete), TRUE); |
|
687 | 687 | $template_args['active_status'] = $this->_cpt_model_obj->pretty_active_status(FALSE); |
688 | 688 | $template_args['_event'] = $this->_cpt_model_obj; |
689 | 689 | $template_args['additional_limit'] = $this->_cpt_model_obj->additional_limit(); |
690 | 690 | $template_args['default_registration_status'] = EEH_Form_Fields::select_input('default_reg_status', $default_reg_status_values, $this->_cpt_model_obj->default_registration_status()); |
691 | 691 | $template_args['display_description'] = EEH_Form_Fields::select_input('display_desc', $yes_no_values, $this->_cpt_model_obj->display_description()); |
692 | 692 | $template_args['display_ticket_selector'] = EEH_Form_Fields::select_input('display_ticket_selector', $yes_no_values, $this->_cpt_model_obj->display_ticket_selector(), '', '', false); |
693 | - $template_args['EVT_default_registration_status'] = EEH_Form_Fields::select_input('EVT_default_registration_status', $default_reg_status_values, $this->_cpt_model_obj->default_registration_status() ); |
|
694 | - $template_args['additional_registration_options'] = apply_filters( 'FHEE__Events_Admin_Page__registration_options_meta_box__additional_registration_options', '', $template_args, $yes_no_values, $default_reg_status_values ); |
|
695 | - $templatepath = EVENTS_CAF_TEMPLATE_PATH . 'event_registration_options.template.php'; |
|
693 | + $template_args['EVT_default_registration_status'] = EEH_Form_Fields::select_input('EVT_default_registration_status', $default_reg_status_values, $this->_cpt_model_obj->default_registration_status()); |
|
694 | + $template_args['additional_registration_options'] = apply_filters('FHEE__Events_Admin_Page__registration_options_meta_box__additional_registration_options', '', $template_args, $yes_no_values, $default_reg_status_values); |
|
695 | + $templatepath = EVENTS_CAF_TEMPLATE_PATH.'event_registration_options.template.php'; |
|
696 | 696 | EEH_Template::display_template($templatepath, $template_args); |
697 | 697 | } |
698 | 698 | |
@@ -705,9 +705,9 @@ discard block |
||
705 | 705 | * @param array $box metabox args |
706 | 706 | * @return string metabox contents |
707 | 707 | */ |
708 | - public function event_type_meta_box( $post, $box ) { |
|
709 | - $template_args['radio_list'] = $this->wp_terms_radio($post->ID, array( 'taxonomy' => 'espresso_event_type' ) ); |
|
710 | - $template = EVENTS_CAF_TEMPLATE_PATH . 'event_type_metabox_contents.template.php'; |
|
708 | + public function event_type_meta_box($post, $box) { |
|
709 | + $template_args['radio_list'] = $this->wp_terms_radio($post->ID, array('taxonomy' => 'espresso_event_type')); |
|
710 | + $template = EVENTS_CAF_TEMPLATE_PATH.'event_type_metabox_contents.template.php'; |
|
711 | 711 | EEH_Template::display_template($template, $template_args); |
712 | 712 | } |
713 | 713 | |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | |
718 | 718 | |
719 | 719 | |
720 | - public function wp_terms_radio( $post_id = 0, $args = array() ) { |
|
720 | + public function wp_terms_radio($post_id = 0, $args = array()) { |
|
721 | 721 | $defaults = array( |
722 | 722 | 'descendants_and_self' => 0, |
723 | 723 | 'selected_cats' => false, |
@@ -726,11 +726,11 @@ discard block |
||
726 | 726 | 'taxonomy' => 'category', |
727 | 727 | 'checked_ontop' => true |
728 | 728 | ); |
729 | - $args = apply_filters( 'wp_terms_checklist_args', $args, $post_id ); |
|
729 | + $args = apply_filters('wp_terms_checklist_args', $args, $post_id); |
|
730 | 730 | |
731 | - extract( wp_parse_args($args, $defaults), EXTR_SKIP ); |
|
731 | + extract(wp_parse_args($args, $defaults), EXTR_SKIP); |
|
732 | 732 | |
733 | - if ( empty($walker) || !is_a($walker, 'Walker') ) |
|
733 | + if (empty($walker) || ! is_a($walker, 'Walker')) |
|
734 | 734 | $walker = new Walker_Radio_Checklist; |
735 | 735 | |
736 | 736 | $descendants_and_self = (int) $descendants_and_self; |
@@ -738,37 +738,37 @@ discard block |
||
738 | 738 | $args = array('taxonomy' => $taxonomy); |
739 | 739 | |
740 | 740 | $tax = get_taxonomy($taxonomy); |
741 | - $args['disabled'] = !current_user_can($tax->cap->assign_terms); |
|
741 | + $args['disabled'] = ! current_user_can($tax->cap->assign_terms); |
|
742 | 742 | |
743 | - if ( is_array( $selected_cats ) ) |
|
743 | + if (is_array($selected_cats)) |
|
744 | 744 | $args['selected_cats'] = $selected_cats; |
745 | - elseif ( $post_id ) |
|
745 | + elseif ($post_id) |
|
746 | 746 | $args['selected_cats'] = wp_get_object_terms($post_id, $taxonomy, array_merge($args, array('fields' => 'ids'))); |
747 | 747 | else |
748 | 748 | $args['selected_cats'] = array(); |
749 | 749 | |
750 | - if ( is_array( $popular_cats ) ) |
|
750 | + if (is_array($popular_cats)) |
|
751 | 751 | $args['popular_cats'] = $popular_cats; |
752 | 752 | else |
753 | - $args['popular_cats'] = get_terms( $taxonomy, array( 'fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) ); |
|
753 | + $args['popular_cats'] = get_terms($taxonomy, array('fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false)); |
|
754 | 754 | |
755 | - if ( $descendants_and_self ) { |
|
756 | - $categories = (array) get_terms($taxonomy, array( 'child_of' => $descendants_and_self, 'hierarchical' => 0, 'hide_empty' => 0 ) ); |
|
757 | - $self = get_term( $descendants_and_self, $taxonomy ); |
|
758 | - array_unshift( $categories, $self ); |
|
755 | + if ($descendants_and_self) { |
|
756 | + $categories = (array) get_terms($taxonomy, array('child_of' => $descendants_and_self, 'hierarchical' => 0, 'hide_empty' => 0)); |
|
757 | + $self = get_term($descendants_and_self, $taxonomy); |
|
758 | + array_unshift($categories, $self); |
|
759 | 759 | } else { |
760 | 760 | $categories = (array) get_terms($taxonomy, array('get' => 'all')); |
761 | 761 | } |
762 | 762 | |
763 | - if ( $checked_ontop ) { |
|
763 | + if ($checked_ontop) { |
|
764 | 764 | // Post process $categories rather than adding an exclude to the get_terms() query to keep the query the same across all posts (for any query cache) |
765 | 765 | $checked_categories = array(); |
766 | - $keys = array_keys( $categories ); |
|
766 | + $keys = array_keys($categories); |
|
767 | 767 | |
768 | - foreach( $keys as $k ) { |
|
769 | - if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) { |
|
768 | + foreach ($keys as $k) { |
|
769 | + if (in_array($categories[$k]->term_id, $args['selected_cats'])) { |
|
770 | 770 | $checked_categories[] = $categories[$k]; |
771 | - unset( $categories[$k] ); |
|
771 | + unset($categories[$k]); |
|
772 | 772 | } |
773 | 773 | } |
774 | 774 | |
@@ -793,18 +793,18 @@ discard block |
||
793 | 793 | * @param array $list_table_obj the list table object |
794 | 794 | * @return array new filters |
795 | 795 | */ |
796 | - public function list_table_filters( $oldfilters, $list_table_obj ) { |
|
796 | + public function list_table_filters($oldfilters, $list_table_obj) { |
|
797 | 797 | $filters = array(); |
798 | 798 | |
799 | 799 | //first month/year filters |
800 | 800 | $filters[] = $this->espresso_event_months_dropdown(); |
801 | 801 | |
802 | 802 | |
803 | - $status = isset( $this->_req_data['status'] ) ? $this->_req_data['status'] : NULL; |
|
803 | + $status = isset($this->_req_data['status']) ? $this->_req_data['status'] : NULL; |
|
804 | 804 | |
805 | 805 | //active status dropdown |
806 | - if ( $status !== 'draft' ) |
|
807 | - $filter[] = $this->active_status_dropdown( isset( $this->_req_data['active_status'] ) ? $this->_req_data['active_status'] : '' ); |
|
806 | + if ($status !== 'draft') |
|
807 | + $filter[] = $this->active_status_dropdown(isset($this->_req_data['active_status']) ? $this->_req_data['active_status'] : ''); |
|
808 | 808 | |
809 | 809 | //category filter |
810 | 810 | $filters[] = $this->category_dropdown(); |
@@ -826,17 +826,17 @@ discard block |
||
826 | 826 | */ |
827 | 827 | public function espresso_event_months_dropdown() { |
828 | 828 | //what we need to do is get all PRIMARY datetimes for all events to filter on. Note we need to include any other filters that are set! |
829 | - $status = isset( $this->_req_data['status'] ) ? $this->_req_data['status'] : NULL; |
|
829 | + $status = isset($this->_req_data['status']) ? $this->_req_data['status'] : NULL; |
|
830 | 830 | |
831 | 831 | //categories? |
832 | - $category = isset( $this->_req_data['EVT_CAT'] ) && $this->_req_data['EVT_CAT'] > 0 ? $this->_req_data['EVT_CAT'] : NULL; |
|
832 | + $category = isset($this->_req_data['EVT_CAT']) && $this->_req_data['EVT_CAT'] > 0 ? $this->_req_data['EVT_CAT'] : NULL; |
|
833 | 833 | |
834 | 834 | //active status? |
835 | - $active_status = isset( $this->_req_data['active_status'] ) ? $this->_req_data['active_status'] : NULL; |
|
835 | + $active_status = isset($this->_req_data['active_status']) ? $this->_req_data['active_status'] : NULL; |
|
836 | 836 | |
837 | 837 | $cur_date = isset($this->_req_data['month_range']) ? $this->_req_data['month_range'] : ''; |
838 | 838 | |
839 | - return EEH_Form_Fields::generate_event_months_dropdown( $cur_date, $status, $category, $active_status ); |
|
839 | + return EEH_Form_Fields::generate_event_months_dropdown($cur_date, $status, $category, $active_status); |
|
840 | 840 | } |
841 | 841 | |
842 | 842 | |
@@ -847,12 +847,12 @@ discard block |
||
847 | 847 | * @param string $current_value whatever the ucrrent active status is |
848 | 848 | * @return string html dropdown. |
849 | 849 | */ |
850 | - public function active_status_dropdown( $current_value = '' ) { |
|
850 | + public function active_status_dropdown($current_value = '') { |
|
851 | 851 | $select_name = 'active_status'; |
852 | - $values = array('none' => __('Show Active/Inactive', 'event_espresso'), 'active' => __('Active', 'event_espresso'), 'upcoming' => __('Upcoming', 'event_espresso'), 'expired' => __('Expired', 'event_espresso'), 'inactive' => __('Inactive', 'event_espresso') ); |
|
852 | + $values = array('none' => __('Show Active/Inactive', 'event_espresso'), 'active' => __('Active', 'event_espresso'), 'upcoming' => __('Upcoming', 'event_espresso'), 'expired' => __('Expired', 'event_espresso'), 'inactive' => __('Inactive', 'event_espresso')); |
|
853 | 853 | $id = 'id="espresso-active-status-dropdown-filter"'; |
854 | 854 | $class = 'wide'; |
855 | - echo EEH_Form_Fields::select_input( $select_name, $values, $current_value, $id, $class ); |
|
855 | + echo EEH_Form_Fields::select_input($select_name, $values, $current_value, $id, $class); |
|
856 | 856 | } |
857 | 857 | |
858 | 858 | |
@@ -864,9 +864,9 @@ discard block |
||
864 | 864 | * @return string html |
865 | 865 | */ |
866 | 866 | public function category_dropdown() { |
867 | - $cur_cat = isset( $this->_req_data['EVT_CAT'] ) ? $this->_req_data['EVT_CAT'] : -1; |
|
867 | + $cur_cat = isset($this->_req_data['EVT_CAT']) ? $this->_req_data['EVT_CAT'] : -1; |
|
868 | 868 | |
869 | - return EEH_Form_Fields::generate_event_category_dropdown( $cur_cat ); |
|
869 | + return EEH_Form_Fields::generate_event_category_dropdown($cur_cat); |
|
870 | 870 | } |
871 | 871 | |
872 | 872 | |
@@ -882,10 +882,10 @@ discard block |
||
882 | 882 | $end = ' 23:59:59'; |
883 | 883 | |
884 | 884 | $where = array( |
885 | - 'Datetime.DTT_EVT_start' => array( 'BETWEEN', array(strtotime(date('Y-m-d') . $start), strtotime(date('Y-m-d') . $end) ) ) |
|
885 | + 'Datetime.DTT_EVT_start' => array('BETWEEN', array(strtotime(date('Y-m-d').$start), strtotime(date('Y-m-d').$end))) |
|
886 | 886 | ); |
887 | 887 | |
888 | - $count = EEM_Event::instance()->count( array( $where ), 'EVT_ID' ); |
|
888 | + $count = EEM_Event::instance()->count(array($where), 'EVT_ID'); |
|
889 | 889 | return $count; |
890 | 890 | } |
891 | 891 | |
@@ -904,10 +904,10 @@ discard block |
||
904 | 904 | $end = ' 23:59:59'; |
905 | 905 | |
906 | 906 | $where = array( |
907 | - 'Datetime.DTT_EVT_start' => array( 'BETWEEN', array(strtotime($this_year_r . '-' . $this_month_r . '-01' . $start), strtotime($this_year_r . '-' . $this_month_r . '-' . $days_this_month . $end) ) ) |
|
907 | + 'Datetime.DTT_EVT_start' => array('BETWEEN', array(strtotime($this_year_r.'-'.$this_month_r.'-01'.$start), strtotime($this_year_r.'-'.$this_month_r.'-'.$days_this_month.$end))) |
|
908 | 908 | ); |
909 | 909 | |
910 | - $count = EEM_Event::instance()->count( array( $where ), 'EVT_ID', TRUE ); |
|
910 | + $count = EEM_Event::instance()->count(array($where), 'EVT_ID', TRUE); |
|
911 | 911 | return $count; |
912 | 912 | } |
913 | 913 | |
@@ -924,53 +924,53 @@ discard block |
||
924 | 924 | |
925 | 925 | |
926 | 926 | |
927 | - public function get_default_tickets( $per_page = 10, $count = FALSE, $trashed = FALSE ) { |
|
927 | + public function get_default_tickets($per_page = 10, $count = FALSE, $trashed = FALSE) { |
|
928 | 928 | |
929 | - $orderby= empty( $this->_req_data['orderby'] ) ? 'TKT_name' : $this->_req_data['orderby']; |
|
930 | - $order = empty( $this->_req_data['order'] ) ? 'ASC' : $this->_req_data['order']; |
|
929 | + $orderby = empty($this->_req_data['orderby']) ? 'TKT_name' : $this->_req_data['orderby']; |
|
930 | + $order = empty($this->_req_data['order']) ? 'ASC' : $this->_req_data['order']; |
|
931 | 931 | |
932 | - switch ( $orderby ) { |
|
932 | + switch ($orderby) { |
|
933 | 933 | case 'TKT_name' : |
934 | - $orderby = array( 'TKT_name' => $order ); |
|
934 | + $orderby = array('TKT_name' => $order); |
|
935 | 935 | break; |
936 | 936 | |
937 | 937 | case 'TKT_price' : |
938 | - $orderby = array( 'TKT_price' => $order ); |
|
938 | + $orderby = array('TKT_price' => $order); |
|
939 | 939 | break; |
940 | 940 | |
941 | 941 | case 'TKT_uses' : |
942 | - $orderby = array( 'TKT_uses' => $order ); |
|
942 | + $orderby = array('TKT_uses' => $order); |
|
943 | 943 | break; |
944 | 944 | |
945 | 945 | case 'TKT_min' : |
946 | - $orderby = array( 'TKT_min' => $order ); |
|
946 | + $orderby = array('TKT_min' => $order); |
|
947 | 947 | break; |
948 | 948 | |
949 | 949 | case 'TKT_max' : |
950 | - $orderby = array( 'TKT_max' => $order ); |
|
950 | + $orderby = array('TKT_max' => $order); |
|
951 | 951 | break; |
952 | 952 | |
953 | 953 | case 'TKT_qty' : |
954 | - $orderby = array( 'TKT_qty' => $order ); |
|
954 | + $orderby = array('TKT_qty' => $order); |
|
955 | 955 | break; |
956 | 956 | } |
957 | 957 | |
958 | - $current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1; |
|
959 | - $per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page; |
|
958 | + $current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1; |
|
959 | + $per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page; |
|
960 | 960 | |
961 | 961 | $_where = array( |
962 | 962 | 'TKT_is_default' => 1, |
963 | 963 | 'TKT_deleted' => $trashed |
964 | 964 | ); |
965 | 965 | |
966 | - $offset = ($current_page-1)*$per_page; |
|
967 | - $limit = array( $offset, $per_page ); |
|
966 | + $offset = ($current_page - 1) * $per_page; |
|
967 | + $limit = array($offset, $per_page); |
|
968 | 968 | |
969 | - if ( isset( $this->_req_data['s'] ) ) { |
|
970 | - $sstr = '%' . $this->_req_data['s'] . '%'; |
|
969 | + if (isset($this->_req_data['s'])) { |
|
970 | + $sstr = '%'.$this->_req_data['s'].'%'; |
|
971 | 971 | $_where['OR'] = array( |
972 | - 'TKT_name' => array('LIKE',$sstr ), |
|
973 | - 'TKT_description' => array('LIKE',$sstr ) |
|
972 | + 'TKT_name' => array('LIKE', $sstr), |
|
973 | + 'TKT_description' => array('LIKE', $sstr) |
|
974 | 974 | ); |
975 | 975 | } |
976 | 976 | |
@@ -981,9 +981,9 @@ discard block |
||
981 | 981 | 'group_by'=>'TKT_ID' |
982 | 982 | ); |
983 | 983 | |
984 | - if($count){ |
|
984 | + if ($count) { |
|
985 | 985 | return EEM_Ticket::instance()->count_deleted_and_undeleted(array($_where)); |
986 | - }else{ |
|
986 | + } else { |
|
987 | 987 | return EEM_Ticket::instance()->get_all_deleted_and_undeleted($query_params); |
988 | 988 | } |
989 | 989 | |
@@ -993,35 +993,35 @@ discard block |
||
993 | 993 | |
994 | 994 | |
995 | 995 | |
996 | - protected function _trash_or_restore_ticket( $trash = FALSE ) { |
|
996 | + protected function _trash_or_restore_ticket($trash = FALSE) { |
|
997 | 997 | $success = 1; |
998 | 998 | |
999 | 999 | $TKT = EEM_Ticket::instance(); |
1000 | 1000 | |
1001 | 1001 | //checkboxes? |
1002 | - if ( !empty( $this->_req_data['checkbox'] ) && is_array( $this->_req_data['checkbox'] ) ) { |
|
1002 | + if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) { |
|
1003 | 1003 | //if array has more than one element then success message should be plural |
1004 | - $success = count( $this->_req_data['checkbox'] ) > 1 ? 2 : 1; |
|
1004 | + $success = count($this->_req_data['checkbox']) > 1 ? 2 : 1; |
|
1005 | 1005 | |
1006 | 1006 | //cycle thru the boxes |
1007 | - while ( list( $TKT_ID, $value ) = each( $this->_req_data['checkbox'] ) ) { |
|
1008 | - if ( $trash ) { |
|
1009 | - if ( ! $TKT->delete_by_ID( $TKT_ID ) ) |
|
1007 | + while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) { |
|
1008 | + if ($trash) { |
|
1009 | + if ( ! $TKT->delete_by_ID($TKT_ID)) |
|
1010 | 1010 | $success = 0; |
1011 | 1011 | } else { |
1012 | - if ( ! $TKT->restore_by_ID( $TKT_ID ) ) |
|
1012 | + if ( ! $TKT->restore_by_ID($TKT_ID)) |
|
1013 | 1013 | $success = 0; |
1014 | 1014 | } |
1015 | 1015 | } |
1016 | 1016 | } else { |
1017 | 1017 | //grab single id and trash |
1018 | - $TKT_ID = absint( $this->_req_data['TKT_ID'] ); |
|
1018 | + $TKT_ID = absint($this->_req_data['TKT_ID']); |
|
1019 | 1019 | |
1020 | - if ( $trash ) { |
|
1021 | - if ( ! $TKT->delete_by_ID( $TKT_ID ) ) |
|
1020 | + if ($trash) { |
|
1021 | + if ( ! $TKT->delete_by_ID($TKT_ID)) |
|
1022 | 1022 | $success = 0; |
1023 | 1023 | } else { |
1024 | - if ( ! $TKT->restore_by_ID( $TKT_ID ) ) |
|
1024 | + if ( ! $TKT->restore_by_ID($TKT_ID)) |
|
1025 | 1025 | $success = 0; |
1026 | 1026 | } |
1027 | 1027 | } |
@@ -1031,7 +1031,7 @@ discard block |
||
1031 | 1031 | 'action' => 'ticket_list_table', |
1032 | 1032 | 'status' => $trash ? '' : 'trashed' |
1033 | 1033 | ); |
1034 | - $this->_redirect_after_action( $success, 'Tickets', $action_desc, $query_args ); |
|
1034 | + $this->_redirect_after_action($success, 'Tickets', $action_desc, $query_args); |
|
1035 | 1035 | } |
1036 | 1036 | |
1037 | 1037 | |
@@ -1044,21 +1044,21 @@ discard block |
||
1044 | 1044 | $TKT = EEM_Ticket::instance(); |
1045 | 1045 | |
1046 | 1046 | //checkboxes? |
1047 | - if ( !empty( $this->_req_data['checkbox'] ) && is_array( $this->_req_data['checkbox'] ) ) { |
|
1047 | + if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) { |
|
1048 | 1048 | //if array has more than one element then success message should be plural |
1049 | - $success = count( $this->_req_data['checkbox'] ) > 1 ? 2 : 1; |
|
1049 | + $success = count($this->_req_data['checkbox']) > 1 ? 2 : 1; |
|
1050 | 1050 | |
1051 | 1051 | //cycle thru the boxes |
1052 | - while ( list( $TKT_ID, $value ) = each( $this->_req_data['checkbox'] ) ) { |
|
1052 | + while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) { |
|
1053 | 1053 | //delete |
1054 | - if ( ! $this->_delete_the_ticket( $TKT_ID ) ) { |
|
1054 | + if ( ! $this->_delete_the_ticket($TKT_ID)) { |
|
1055 | 1055 | $success = 0; |
1056 | 1056 | } |
1057 | 1057 | } |
1058 | 1058 | } else { |
1059 | 1059 | //grab single id and trash |
1060 | - $TKT_ID = absint( $this->_req_data['TKT_ID'] ); |
|
1061 | - if ( ! $this->_delete_the_ticket( $TKT_ID ) ) { |
|
1060 | + $TKT_ID = absint($this->_req_data['TKT_ID']); |
|
1061 | + if ( ! $this->_delete_the_ticket($TKT_ID)) { |
|
1062 | 1062 | $success = 0; |
1063 | 1063 | } |
1064 | 1064 | } |
@@ -1070,16 +1070,16 @@ discard block |
||
1070 | 1070 | ); |
1071 | 1071 | |
1072 | 1072 | //failsafe. If the default ticket count === 1 then we need to redirect to event overview. |
1073 | - if ( EEM_Ticket::instance()->count_deleted_and_undeleted( array( array( 'TKT_is_default' => 1 ) ), 'TKT_ID', TRUE ) ) |
|
1073 | + if (EEM_Ticket::instance()->count_deleted_and_undeleted(array(array('TKT_is_default' => 1)), 'TKT_ID', TRUE)) |
|
1074 | 1074 | $query_args = array(); |
1075 | - $this->_redirect_after_action( $success, 'Tickets', $action_desc, $query_args ); |
|
1075 | + $this->_redirect_after_action($success, 'Tickets', $action_desc, $query_args); |
|
1076 | 1076 | } |
1077 | 1077 | |
1078 | 1078 | |
1079 | 1079 | |
1080 | 1080 | |
1081 | - protected function _delete_the_ticket( $TKT_ID ) { |
|
1082 | - $tkt = EEM_Ticket::instance()->get_one_by_ID( $TKT_ID ); |
|
1081 | + protected function _delete_the_ticket($TKT_ID) { |
|
1082 | + $tkt = EEM_Ticket::instance()->get_one_by_ID($TKT_ID); |
|
1083 | 1083 | $tkt->_remove_relations('Datetime'); |
1084 | 1084 | //delete all related prices first |
1085 | 1085 | $tkt->delete_related_permanently('Price'); |
@@ -1090,20 +1090,20 @@ discard block |
||
1090 | 1090 | |
1091 | 1091 | } //end class Events_Admin_Page |
1092 | 1092 | |
1093 | -require_once ABSPATH . 'wp-admin/includes/template.php'; |
|
1093 | +require_once ABSPATH.'wp-admin/includes/template.php'; |
|
1094 | 1094 | class Walker_Radio_Checklist extends Walker_Category_Checklist { |
1095 | 1095 | |
1096 | - function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { |
|
1096 | + function start_el(&$output, $category, $depth = 0, $args = array(), $id = 0) { |
|
1097 | 1097 | extract($args); |
1098 | - if ( empty($taxonomy) ) |
|
1098 | + if (empty($taxonomy)) |
|
1099 | 1099 | $taxonomy = 'category'; |
1100 | 1100 | |
1101 | - if ( $taxonomy == 'category' ) |
|
1101 | + if ($taxonomy == 'category') |
|
1102 | 1102 | $name = 'post_category'; |
1103 | 1103 | else |
1104 | 1104 | $name = 'tax_input['.$taxonomy.']'; |
1105 | 1105 | |
1106 | 1106 | $class = ''; |
1107 | - $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="radio" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>'; |
|
1107 | + $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>".'<label class="selectit"><input value="'.$category->term_id.'" type="radio" name="'.$name.'[]" id="in-'.$taxonomy.'-'.$category->term_id.'"'.checked(in_array($category->term_id, $selected_cats), true, false).disabled(empty($args['disabled']), false, false).' /> '.esc_html(apply_filters('the_category', $category->name)).'</label>'; |
|
1108 | 1108 | } |
1109 | 1109 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | 'TKT_taxable' => __('Taxable', 'event_espresso') |
60 | 60 | ); |
61 | 61 | |
62 | - $this->_sortable_columns = array( |
|
62 | + $this->_sortable_columns = array( |
|
63 | 63 | // TRUE means its already sorted |
64 | 64 | 'TKT_name' => array( 'TKT_name' => TRUE ), |
65 | 65 | 'TKT_description' => array( 'TKT_description' => FALSE ), |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | 'TKT_min' => array( 'TKT_min' => FALSE ), |
69 | 69 | 'TKT_max' => array( 'TKT_max' => FALSE ), |
70 | 70 | 'TKT_price' => array( 'TKT_price' => FALSE ) |
71 | - ); |
|
71 | + ); |
|
72 | 72 | |
73 | - $this->_hidden_columns = array( |
|
73 | + $this->_hidden_columns = array( |
|
74 | 74 | ); |
75 | 75 | |
76 | 76 | } |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | |
32 | 32 | protected function _setup_data() { |
33 | 33 | $trashed = $this->_admin_page->get_view() == 'trashed' ? TRUE : FALSE; |
34 | - $this->_data = $this->_admin_page->get_default_tickets( $this->_per_page, FALSE, $trashed ); |
|
35 | - $this->_all_data_count = $this->_admin_page->get_default_tickets( $this->_per_page, TRUE, FALSE ); |
|
36 | - $this->_trashed_count = $this->_admin_page->get_default_tickets( $this->_per_page, TRUE, TRUE ); |
|
34 | + $this->_data = $this->_admin_page->get_default_tickets($this->_per_page, FALSE, $trashed); |
|
35 | + $this->_all_data_count = $this->_admin_page->get_default_tickets($this->_per_page, TRUE, FALSE); |
|
36 | + $this->_trashed_count = $this->_admin_page->get_default_tickets($this->_per_page, TRUE, TRUE); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | |
@@ -61,13 +61,13 @@ discard block |
||
61 | 61 | |
62 | 62 | $this->_sortable_columns = array( |
63 | 63 | // TRUE means its already sorted |
64 | - 'TKT_name' => array( 'TKT_name' => TRUE ), |
|
65 | - 'TKT_description' => array( 'TKT_description' => FALSE ), |
|
66 | - 'TKT_qty' => array( 'TKT_qty' => FALSE ), |
|
67 | - 'TKT_uses' => array( 'TKT_uses' => FALSE ), |
|
68 | - 'TKT_min' => array( 'TKT_min' => FALSE ), |
|
69 | - 'TKT_max' => array( 'TKT_max' => FALSE ), |
|
70 | - 'TKT_price' => array( 'TKT_price' => FALSE ) |
|
64 | + 'TKT_name' => array('TKT_name' => TRUE), |
|
65 | + 'TKT_description' => array('TKT_description' => FALSE), |
|
66 | + 'TKT_qty' => array('TKT_qty' => FALSE), |
|
67 | + 'TKT_uses' => array('TKT_uses' => FALSE), |
|
68 | + 'TKT_min' => array('TKT_min' => FALSE), |
|
69 | + 'TKT_max' => array('TKT_max' => FALSE), |
|
70 | + 'TKT_price' => array('TKT_price' => FALSE) |
|
71 | 71 | ); |
72 | 72 | |
73 | 73 | $this->_hidden_columns = array( |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | |
95 | 95 | function column_cb($item) { |
96 | - return $item->ID() === 1 ? '<span class="ee-lock-icon"></span>' : sprintf( '<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID() ); |
|
96 | + return $item->ID() === 1 ? '<span class="ee-lock-icon"></span>' : sprintf('<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID()); |
|
97 | 97 | |
98 | 98 | } |
99 | 99 | |
@@ -104,21 +104,21 @@ discard block |
||
104 | 104 | $actions = array(); |
105 | 105 | |
106 | 106 | //trash links |
107 | - if ( $item->ID() !== 1 ) { |
|
108 | - if ( $this->_view == 'all' ) { |
|
109 | - $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'trash_ticket', 'TKT_ID' => $item->ID() ), EVENTS_ADMIN_URL ); |
|
110 | - $actions['trash'] = '<a href="' . $trash_lnk_url . '" title="' . esc_attr__('Move Ticket to trash', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>'; |
|
107 | + if ($item->ID() !== 1) { |
|
108 | + if ($this->_view == 'all') { |
|
109 | + $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'trash_ticket', 'TKT_ID' => $item->ID()), EVENTS_ADMIN_URL); |
|
110 | + $actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Move Ticket to trash', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>'; |
|
111 | 111 | } else { |
112 | 112 | // restore price link |
113 | - $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_ticket', 'TKT_ID'=>$item->ID() ), EVENTS_ADMIN_URL ); |
|
114 | - $actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Ticket', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>'; |
|
113 | + $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_ticket', 'TKT_ID'=>$item->ID()), EVENTS_ADMIN_URL); |
|
114 | + $actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Ticket', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>'; |
|
115 | 115 | // delete price link |
116 | - $delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'delete_ticket', 'TKT_ID'=>$item->ID() ), EVENTS_ADMIN_URL ); |
|
117 | - $actions['delete'] = '<a href="'.$delete_lnk_url.'" title="' . esc_attr__( 'Delete Ticket Permanently', 'event_espresso' ) . '">' . __( 'Delete Permanently', 'event_espresso' ) . '</a>'; |
|
116 | + $delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'delete_ticket', 'TKT_ID'=>$item->ID()), EVENTS_ADMIN_URL); |
|
117 | + $actions['delete'] = '<a href="'.$delete_lnk_url.'" title="'.esc_attr__('Delete Ticket Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>'; |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | |
121 | - return $item->get('TKT_name') . $this->row_actions( $actions ); |
|
121 | + return $item->get('TKT_name').$this->row_actions($actions); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | |
@@ -131,13 +131,13 @@ discard block |
||
131 | 131 | |
132 | 132 | |
133 | 133 | function column_TKT_qty($item) { |
134 | - return $item->get_pretty('TKT_qty','text'); |
|
134 | + return $item->get_pretty('TKT_qty', 'text'); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | |
138 | 138 | |
139 | 139 | function column_TKT_uses($item) { |
140 | - return $item->get_pretty('TKT_uses','text'); |
|
140 | + return $item->get_pretty('TKT_uses', 'text'); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | |
149 | 149 | |
150 | 150 | function column_TKT_max($item) { |
151 | - return $item->get_pretty('TKT_max','text'); |
|
151 | + return $item->get_pretty('TKT_max', 'text'); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | |
3 | 5 | /** |
4 | 6 | * Event Espresso |