@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) { |
3 | - exit; |
|
3 | + exit; |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | if ( !( $user_id = get_current_user_id() ) ) { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | <tbody> |
32 | 32 | <?php foreach ( $user_invoices->invoices as $invoice ) { |
33 | - ?> |
|
33 | + ?> |
|
34 | 34 | <tr class="wpinv-item wpinv-item-<?php echo $invoice_status = $invoice->get_status(); ?>"> |
35 | 35 | <?php foreach ( wpinv_get_user_invoices_columns() as $column_id => $column_name ) : ?> |
36 | 36 | <td class="<?php echo esc_attr( $column_id ); ?> <?php echo (!empty($column_name['class']) ? $column_name['class'] : '');?>" data-title="<?php echo esc_attr( $column_name['title'] ); ?>"> |
@@ -53,31 +53,31 @@ discard block |
||
53 | 53 | |
54 | 54 | <?php elseif ( 'invoice-actions' === $column_id ) : ?> |
55 | 55 | <?php |
56 | - $actions = array( |
|
57 | - 'pay' => array( |
|
58 | - 'url' => $invoice->get_checkout_payment_url(), |
|
59 | - 'name' => __( 'Pay Now', 'invoicing' ), |
|
56 | + $actions = array( |
|
57 | + 'pay' => array( |
|
58 | + 'url' => $invoice->get_checkout_payment_url(), |
|
59 | + 'name' => __( 'Pay Now', 'invoicing' ), |
|
60 | 60 | 'class' => 'btn-success' |
61 | - ), |
|
61 | + ), |
|
62 | 62 | 'print' => array( |
63 | - 'url' => $invoice->get_view_url(), |
|
64 | - 'name' => __( 'Print', 'invoicing' ), |
|
63 | + 'url' => $invoice->get_view_url(), |
|
64 | + 'name' => __( 'Print', 'invoicing' ), |
|
65 | 65 | 'class' => 'btn-primary', |
66 | 66 | 'attrs' => 'target="_blank"' |
67 | - ) |
|
68 | - ); |
|
67 | + ) |
|
68 | + ); |
|
69 | 69 | |
70 | - if ( ! $invoice->needs_payment() ) { |
|
71 | - unset( $actions['pay'] ); |
|
72 | - } |
|
70 | + if ( ! $invoice->needs_payment() ) { |
|
71 | + unset( $actions['pay'] ); |
|
72 | + } |
|
73 | 73 | |
74 | - if ( $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice ) ) { |
|
75 | - foreach ( $actions as $key => $action ) { |
|
76 | - $class = !empty($action['class']) ? sanitize_html_class($action['class']) : ''; |
|
74 | + if ( $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice ) ) { |
|
75 | + foreach ( $actions as $key => $action ) { |
|
76 | + $class = !empty($action['class']) ? sanitize_html_class($action['class']) : ''; |
|
77 | 77 | echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm ' . $class . ' ' . sanitize_html_class( $key ) . '" ' . ( !empty($action['attrs']) ? $action['attrs'] : '' ) . '>' . $action['name'] . '</a>'; |
78 | - } |
|
79 | - } |
|
80 | - ?> |
|
78 | + } |
|
79 | + } |
|
80 | + ?> |
|
81 | 81 | <?php endif; ?> |
82 | 82 | </td> |
83 | 83 | <?php endforeach; ?> |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | <?php if ( 1 < $user_invoices->max_num_pages ) : ?> |
92 | 92 | <div class="invoicing-Pagination"> |
93 | 93 | <?php |
94 | - $big = 999999; |
|
94 | + $big = 999999; |
|
95 | 95 | $wpinv_cpt = $_REQUEST['wpinv-cpt']; |
96 | 96 | |
97 | 97 | if (get_query_var('paged') && 'wpi_invoice' == $wpinv_cpt) |
@@ -101,16 +101,16 @@ discard block |
||
101 | 101 | else |
102 | 102 | $current_page = 1; |
103 | 103 | |
104 | - echo paginate_links( array( |
|
105 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
106 | - 'format' => '?paged=%#%', |
|
107 | - 'current' => max( 1, $current_page ), |
|
108 | - 'total' => $user_invoices->max_num_pages, |
|
104 | + echo paginate_links( array( |
|
105 | + 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
106 | + 'format' => '?paged=%#%', |
|
107 | + 'current' => max( 1, $current_page ), |
|
108 | + 'total' => $user_invoices->max_num_pages, |
|
109 | 109 | 'add_args' => array( |
110 | 110 | 'wpinv-cpt' => 'wpi_invoice', |
111 | 111 | ) |
112 | - ) ); |
|
113 | - ?> |
|
112 | + ) ); |
|
113 | + ?> |
|
114 | 114 | </div> |
115 | 115 | <?php endif; ?> |
116 | 116 |