@@ -42,86 +42,86 @@ discard block |
||
42 | 42 | <tr class="wpinv-item wpinv-item-<?php echo $invoice_status = $invoice->get_status(); ?>"> |
43 | 43 | <?php |
44 | 44 | |
45 | - foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) : |
|
45 | + foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) : |
|
46 | 46 | |
47 | - $column_id = sanitize_html_class( $column_id ); |
|
48 | - $class = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] ); |
|
47 | + $column_id = sanitize_html_class( $column_id ); |
|
48 | + $class = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] ); |
|
49 | 49 | |
50 | - echo "<td class='$column_id $class'>"; |
|
51 | - switch ( $column_id ) { |
|
50 | + echo "<td class='$column_id $class'>"; |
|
51 | + switch ( $column_id ) { |
|
52 | 52 | |
53 | - case 'invoice-number': |
|
54 | - echo wpinv_invoice_link( $invoice ); |
|
55 | - break; |
|
53 | + case 'invoice-number': |
|
54 | + echo wpinv_invoice_link( $invoice ); |
|
55 | + break; |
|
56 | 56 | |
57 | - case 'created-date': |
|
58 | - echo getpaid_format_date_value( $invoice->get_date_created() ); |
|
59 | - break; |
|
57 | + case 'created-date': |
|
58 | + echo getpaid_format_date_value( $invoice->get_date_created() ); |
|
59 | + break; |
|
60 | 60 | |
61 | - case 'payment-date': |
|
61 | + case 'payment-date': |
|
62 | 62 | |
63 | - if ( $invoice->needs_payment() ) { |
|
64 | - echo "—"; |
|
65 | - } else { |
|
66 | - echo getpaid_format_date_value( $invoice->get_date_completed() ); |
|
67 | - } |
|
63 | + if ( $invoice->needs_payment() ) { |
|
64 | + echo "—"; |
|
65 | + } else { |
|
66 | + echo getpaid_format_date_value( $invoice->get_date_completed() ); |
|
67 | + } |
|
68 | 68 | |
69 | - break; |
|
69 | + break; |
|
70 | 70 | |
71 | - case 'invoice-status': |
|
72 | - echo $invoice->get_status_label_html(); |
|
71 | + case 'invoice-status': |
|
72 | + echo $invoice->get_status_label_html(); |
|
73 | 73 | |
74 | - break; |
|
74 | + break; |
|
75 | 75 | |
76 | - case 'invoice-total': |
|
77 | - echo wpinv_price( $invoice->get_total(), $invoice->get_currency() ); |
|
76 | + case 'invoice-total': |
|
77 | + echo wpinv_price( $invoice->get_total(), $invoice->get_currency() ); |
|
78 | 78 | |
79 | - break; |
|
79 | + break; |
|
80 | 80 | |
81 | - case 'invoice-actions': |
|
81 | + case 'invoice-actions': |
|
82 | 82 | |
83 | - $actions = array( |
|
83 | + $actions = array( |
|
84 | 84 | |
85 | - 'pay' => array( |
|
86 | - 'url' => $invoice->get_checkout_payment_url(), |
|
87 | - 'name' => __( 'Pay Now', 'invoicing' ), |
|
88 | - 'class' => 'btn-success' |
|
89 | - ), |
|
85 | + 'pay' => array( |
|
86 | + 'url' => $invoice->get_checkout_payment_url(), |
|
87 | + 'name' => __( 'Pay Now', 'invoicing' ), |
|
88 | + 'class' => 'btn-success' |
|
89 | + ), |
|
90 | 90 | |
91 | - 'print' => array( |
|
92 | - 'url' => $invoice->get_view_url(), |
|
93 | - 'name' => __( 'View', 'invoicing' ), |
|
94 | - 'class' => 'btn-secondary', |
|
95 | - 'attrs' => 'target="_blank"' |
|
96 | - ) |
|
97 | - ); |
|
91 | + 'print' => array( |
|
92 | + 'url' => $invoice->get_view_url(), |
|
93 | + 'name' => __( 'View', 'invoicing' ), |
|
94 | + 'class' => 'btn-secondary', |
|
95 | + 'attrs' => 'target="_blank"' |
|
96 | + ) |
|
97 | + ); |
|
98 | 98 | |
99 | - if ( ! $invoice->needs_payment() ) { |
|
100 | - unset( $actions['pay'] ); |
|
101 | - } |
|
99 | + if ( ! $invoice->needs_payment() ) { |
|
100 | + unset( $actions['pay'] ); |
|
101 | + } |
|
102 | 102 | |
103 | - $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice, $post_type ); |
|
103 | + $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice, $post_type ); |
|
104 | 104 | |
105 | - foreach ( $actions as $key => $action ) { |
|
106 | - $class = !empty($action['class']) ? sanitize_html_class($action['class']) : ''; |
|
107 | - echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm btn-block ' . $class . ' ' . sanitize_html_class( $key ) . '" ' . ( !empty($action['attrs']) ? $action['attrs'] : '' ) . '>' . $action['name'] . '</a>'; |
|
108 | - } |
|
105 | + foreach ( $actions as $key => $action ) { |
|
106 | + $class = !empty($action['class']) ? sanitize_html_class($action['class']) : ''; |
|
107 | + echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm btn-block ' . $class . ' ' . sanitize_html_class( $key ) . '" ' . ( !empty($action['attrs']) ? $action['attrs'] : '' ) . '>' . $action['name'] . '</a>'; |
|
108 | + } |
|
109 | 109 | |
110 | - break; |
|
110 | + break; |
|
111 | 111 | |
112 | - default: |
|
113 | - do_action( "wpinv_user_invoices_column_$column_id", $invoice ); |
|
114 | - break; |
|
112 | + default: |
|
113 | + do_action( "wpinv_user_invoices_column_$column_id", $invoice ); |
|
114 | + break; |
|
115 | 115 | |
116 | 116 | |
117 | - } |
|
117 | + } |
|
118 | 118 | |
119 | - do_action( "wpinv_user_invoices_column_after_$column_id", $invoice ); |
|
119 | + do_action( "wpinv_user_invoices_column_after_$column_id", $invoice ); |
|
120 | 120 | |
121 | - echo '</td>'; |
|
121 | + echo '</td>'; |
|
122 | 122 | |
123 | - endforeach; |
|
124 | - ?> |
|
123 | + endforeach; |
|
124 | + ?> |
|
125 | 125 | </tr> |
126 | 126 | |
127 | 127 | <?php endforeach; ?> |
@@ -135,14 +135,14 @@ discard block |
||
135 | 135 | <?php if ( 1 < $invoices->max_num_pages ) : ?> |
136 | 136 | <div class="invoicing-Pagination"> |
137 | 137 | <?php |
138 | - $big = 999999; |
|
139 | - |
|
140 | - echo paginate_links( array( |
|
141 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
142 | - 'format' => '?paged=%#%', |
|
143 | - 'total' => $invoices->max_num_pages, |
|
144 | - ) ); |
|
145 | - ?> |
|
138 | + $big = 999999; |
|
139 | + |
|
140 | + echo paginate_links( array( |
|
141 | + 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
142 | + 'format' => '?paged=%#%', |
|
143 | + 'total' => $invoices->max_num_pages, |
|
144 | + ) ); |
|
145 | + ?> |
|
146 | 146 | </div> |
147 | 147 | <?php endif; ?> |
148 | 148 |