@@ -40,86 +40,86 @@ discard block |
||
40 | 40 | <tr class="wpinv-item wpinv-item-<?php echo $invoice_status = $invoice->get_status(); ?>"> |
41 | 41 | <?php |
42 | 42 | |
43 | - foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) : |
|
43 | + foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) : |
|
44 | 44 | |
45 | - $column_id = sanitize_html_class( $column_id ); |
|
46 | - $class = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] ); |
|
45 | + $column_id = sanitize_html_class( $column_id ); |
|
46 | + $class = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] ); |
|
47 | 47 | |
48 | - echo "<td class='$column_id $class'>"; |
|
49 | - switch ( $column_id ) { |
|
48 | + echo "<td class='$column_id $class'>"; |
|
49 | + switch ( $column_id ) { |
|
50 | 50 | |
51 | - case 'invoice-number': |
|
52 | - echo wpinv_invoice_link( $invoice ); |
|
53 | - break; |
|
51 | + case 'invoice-number': |
|
52 | + echo wpinv_invoice_link( $invoice ); |
|
53 | + break; |
|
54 | 54 | |
55 | - case 'created-date': |
|
56 | - echo getpaid_format_date_value( $invoice->get_date_created() ); |
|
57 | - break; |
|
55 | + case 'created-date': |
|
56 | + echo getpaid_format_date_value( $invoice->get_date_created() ); |
|
57 | + break; |
|
58 | 58 | |
59 | - case 'payment-date': |
|
59 | + case 'payment-date': |
|
60 | 60 | |
61 | - if ( $invoice->needs_payment() ) { |
|
62 | - echo "—"; |
|
63 | - } else { |
|
64 | - echo getpaid_format_date_value( $invoice->get_date_completed() ); |
|
65 | - } |
|
61 | + if ( $invoice->needs_payment() ) { |
|
62 | + echo "—"; |
|
63 | + } else { |
|
64 | + echo getpaid_format_date_value( $invoice->get_date_completed() ); |
|
65 | + } |
|
66 | 66 | |
67 | - break; |
|
67 | + break; |
|
68 | 68 | |
69 | - case 'invoice-status': |
|
70 | - echo $invoice->get_status_label_html(); |
|
69 | + case 'invoice-status': |
|
70 | + echo $invoice->get_status_label_html(); |
|
71 | 71 | |
72 | - break; |
|
72 | + break; |
|
73 | 73 | |
74 | - case 'invoice-total': |
|
75 | - echo wpinv_price( $invoice->get_total(), $invoice->get_currency() ); |
|
74 | + case 'invoice-total': |
|
75 | + echo wpinv_price( $invoice->get_total(), $invoice->get_currency() ); |
|
76 | 76 | |
77 | - break; |
|
77 | + break; |
|
78 | 78 | |
79 | - case 'invoice-actions': |
|
79 | + case 'invoice-actions': |
|
80 | 80 | |
81 | - $actions = array( |
|
81 | + $actions = array( |
|
82 | 82 | |
83 | - 'pay' => array( |
|
84 | - 'url' => $invoice->get_checkout_payment_url(), |
|
85 | - 'name' => __( 'Pay Now', 'invoicing' ), |
|
83 | + 'pay' => array( |
|
84 | + 'url' => $invoice->get_checkout_payment_url(), |
|
85 | + 'name' => __( 'Pay Now', 'invoicing' ), |
|
86 | 86 | 'class' => 'btn-success' |
87 | - ), |
|
87 | + ), |
|
88 | 88 | |
89 | 89 | 'print' => array( |
90 | - 'url' => $invoice->get_view_url(), |
|
91 | - 'name' => __( 'View', 'invoicing' ), |
|
90 | + 'url' => $invoice->get_view_url(), |
|
91 | + 'name' => __( 'View', 'invoicing' ), |
|
92 | 92 | 'class' => 'btn-secondary', |
93 | 93 | 'attrs' => 'target="_blank"' |
94 | - ) |
|
95 | - ); |
|
94 | + ) |
|
95 | + ); |
|
96 | 96 | |
97 | - if ( ! $invoice->needs_payment() ) { |
|
98 | - unset( $actions['pay'] ); |
|
99 | - } |
|
97 | + if ( ! $invoice->needs_payment() ) { |
|
98 | + unset( $actions['pay'] ); |
|
99 | + } |
|
100 | 100 | |
101 | - $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice, $post_type ); |
|
101 | + $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice, $post_type ); |
|
102 | 102 | |
103 | - foreach ( $actions as $key => $action ) { |
|
104 | - $class = !empty($action['class']) ? sanitize_html_class($action['class']) : ''; |
|
105 | - 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>'; |
|
106 | - } |
|
103 | + foreach ( $actions as $key => $action ) { |
|
104 | + $class = !empty($action['class']) ? sanitize_html_class($action['class']) : ''; |
|
105 | + 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>'; |
|
106 | + } |
|
107 | 107 | |
108 | - break; |
|
108 | + break; |
|
109 | 109 | |
110 | - default: |
|
111 | - do_action( "wpinv_user_invoices_column_$column_id", $invoice ); |
|
112 | - break; |
|
110 | + default: |
|
111 | + do_action( "wpinv_user_invoices_column_$column_id", $invoice ); |
|
112 | + break; |
|
113 | 113 | |
114 | 114 | |
115 | - } |
|
115 | + } |
|
116 | 116 | |
117 | - do_action( "wpinv_user_invoices_column_after_$column_id", $invoice ); |
|
117 | + do_action( "wpinv_user_invoices_column_after_$column_id", $invoice ); |
|
118 | 118 | |
119 | - echo '</td>'; |
|
119 | + echo '</td>'; |
|
120 | 120 | |
121 | - endforeach; |
|
122 | - ?> |
|
121 | + endforeach; |
|
122 | + ?> |
|
123 | 123 | </tr> |
124 | 124 | |
125 | 125 | <?php endforeach; ?> |
@@ -132,14 +132,14 @@ discard block |
||
132 | 132 | <?php if ( 1 < $invoices->max_num_pages ) : ?> |
133 | 133 | <div class="invoicing-Pagination"> |
134 | 134 | <?php |
135 | - $big = 999999; |
|
136 | - |
|
137 | - echo paginate_links( array( |
|
138 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
139 | - 'format' => '?paged=%#%', |
|
140 | - 'total' => $invoices->max_num_pages, |
|
141 | - ) ); |
|
142 | - ?> |
|
135 | + $big = 999999; |
|
136 | + |
|
137 | + echo paginate_links( array( |
|
138 | + 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
139 | + 'format' => '?paged=%#%', |
|
140 | + 'total' => $invoices->max_num_pages, |
|
141 | + ) ); |
|
142 | + ?> |
|
143 | 143 | </div> |
144 | 144 | <?php endif; ?> |
145 | 145 |
@@ -7,25 +7,25 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Current page. |
13 | -$current_page = empty( $_GET[ 'page' ] ) ? 1 : absint( $_GET[ 'page' ] ); |
|
13 | +$current_page = empty($_GET['page']) ? 1 : absint($_GET['page']); |
|
14 | 14 | |
15 | 15 | // Fires before displaying user invoices. |
16 | -do_action( 'wpinv_before_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type ); |
|
16 | +do_action('wpinv_before_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type); |
|
17 | 17 | |
18 | 18 | ?> |
19 | 19 | |
20 | - <table class="table table-bordered table-hover getpaid-user-invoices <?php echo sanitize_html_class( $post_type ); ?>"> |
|
20 | + <table class="table table-bordered table-hover getpaid-user-invoices <?php echo sanitize_html_class($post_type); ?>"> |
|
21 | 21 | |
22 | 22 | |
23 | 23 | <thead> |
24 | 24 | <tr> |
25 | 25 | |
26 | - <?php foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) : ?> |
|
27 | - <th class="<?php echo sanitize_html_class( $column_id ); ?> <?php echo ( ! empty( $column_name['class'] ) ? sanitize_html_class( $column_name['class'] ) : '');?> border-bottom-0"> |
|
28 | - <span class="nobr"><?php echo esc_html( $column_name['title'] ); ?></span> |
|
26 | + <?php foreach (wpinv_get_user_invoices_columns($post_type) as $column_id => $column_name) : ?> |
|
27 | + <th class="<?php echo sanitize_html_class($column_id); ?> <?php echo (!empty($column_name['class']) ? sanitize_html_class($column_name['class']) : ''); ?> border-bottom-0"> |
|
28 | + <span class="nobr"><?php echo esc_html($column_name['title']); ?></span> |
|
29 | 29 | </th> |
30 | 30 | <?php endforeach; ?> |
31 | 31 | |
@@ -35,33 +35,33 @@ discard block |
||
35 | 35 | |
36 | 36 | |
37 | 37 | <tbody> |
38 | - <?php foreach ( $invoices->invoices as $invoice ) : ?> |
|
38 | + <?php foreach ($invoices->invoices as $invoice) : ?> |
|
39 | 39 | |
40 | 40 | <tr class="wpinv-item wpinv-item-<?php echo $invoice_status = $invoice->get_status(); ?>"> |
41 | 41 | <?php |
42 | 42 | |
43 | - foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) : |
|
43 | + foreach (wpinv_get_user_invoices_columns($post_type) as $column_id => $column_name) : |
|
44 | 44 | |
45 | - $column_id = sanitize_html_class( $column_id ); |
|
46 | - $class = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] ); |
|
45 | + $column_id = sanitize_html_class($column_id); |
|
46 | + $class = empty($column_name['class']) ? '' : sanitize_html_class($column_name['class']); |
|
47 | 47 | |
48 | 48 | echo "<td class='$column_id $class'>"; |
49 | - switch ( $column_id ) { |
|
49 | + switch ($column_id) { |
|
50 | 50 | |
51 | 51 | case 'invoice-number': |
52 | - echo wpinv_invoice_link( $invoice ); |
|
52 | + echo wpinv_invoice_link($invoice); |
|
53 | 53 | break; |
54 | 54 | |
55 | 55 | case 'created-date': |
56 | - echo getpaid_format_date_value( $invoice->get_date_created() ); |
|
56 | + echo getpaid_format_date_value($invoice->get_date_created()); |
|
57 | 57 | break; |
58 | 58 | |
59 | 59 | case 'payment-date': |
60 | 60 | |
61 | - if ( $invoice->needs_payment() ) { |
|
61 | + if ($invoice->needs_payment()) { |
|
62 | 62 | echo "—"; |
63 | 63 | } else { |
64 | - echo getpaid_format_date_value( $invoice->get_date_completed() ); |
|
64 | + echo getpaid_format_date_value($invoice->get_date_completed()); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | break; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | break; |
73 | 73 | |
74 | 74 | case 'invoice-total': |
75 | - echo wpinv_price( $invoice->get_total(), $invoice->get_currency() ); |
|
75 | + echo wpinv_price($invoice->get_total(), $invoice->get_currency()); |
|
76 | 76 | |
77 | 77 | break; |
78 | 78 | |
@@ -82,39 +82,39 @@ discard block |
||
82 | 82 | |
83 | 83 | 'pay' => array( |
84 | 84 | 'url' => $invoice->get_checkout_payment_url(), |
85 | - 'name' => __( 'Pay Now', 'invoicing' ), |
|
85 | + 'name' => __('Pay Now', 'invoicing'), |
|
86 | 86 | 'class' => 'btn-success' |
87 | 87 | ), |
88 | 88 | |
89 | 89 | 'print' => array( |
90 | 90 | 'url' => $invoice->get_view_url(), |
91 | - 'name' => __( 'View', 'invoicing' ), |
|
91 | + 'name' => __('View', 'invoicing'), |
|
92 | 92 | 'class' => 'btn-secondary', |
93 | 93 | 'attrs' => 'target="_blank"' |
94 | 94 | ) |
95 | 95 | ); |
96 | 96 | |
97 | - if ( ! $invoice->needs_payment() ) { |
|
98 | - unset( $actions['pay'] ); |
|
97 | + if (!$invoice->needs_payment()) { |
|
98 | + unset($actions['pay']); |
|
99 | 99 | } |
100 | 100 | |
101 | - $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice, $post_type ); |
|
101 | + $actions = apply_filters('wpinv_user_invoices_actions', $actions, $invoice, $post_type); |
|
102 | 102 | |
103 | - foreach ( $actions as $key => $action ) { |
|
103 | + foreach ($actions as $key => $action) { |
|
104 | 104 | $class = !empty($action['class']) ? sanitize_html_class($action['class']) : ''; |
105 | - 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>'; |
|
105 | + 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>'; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | break; |
109 | 109 | |
110 | 110 | default: |
111 | - do_action( "wpinv_user_invoices_column_$column_id", $invoice ); |
|
111 | + do_action("wpinv_user_invoices_column_$column_id", $invoice); |
|
112 | 112 | break; |
113 | 113 | |
114 | 114 | |
115 | 115 | } |
116 | 116 | |
117 | - do_action( "wpinv_user_invoices_column_after_$column_id", $invoice ); |
|
117 | + do_action("wpinv_user_invoices_column_after_$column_id", $invoice); |
|
118 | 118 | |
119 | 119 | echo '</td>'; |
120 | 120 | |
@@ -127,20 +127,20 @@ discard block |
||
127 | 127 | </tbody> |
128 | 128 | </table> |
129 | 129 | |
130 | - <?php do_action( 'wpinv_before_user_invoices_pagination' ); ?> |
|
130 | + <?php do_action('wpinv_before_user_invoices_pagination'); ?> |
|
131 | 131 | |
132 | - <?php if ( 1 < $invoices->max_num_pages ) : ?> |
|
132 | + <?php if (1 < $invoices->max_num_pages) : ?> |
|
133 | 133 | <div class="invoicing-Pagination"> |
134 | 134 | <?php |
135 | 135 | $big = 999999; |
136 | 136 | |
137 | - echo paginate_links( array( |
|
138 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
137 | + echo paginate_links(array( |
|
138 | + 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), |
|
139 | 139 | 'format' => '?paged=%#%', |
140 | 140 | 'total' => $invoices->max_num_pages, |
141 | - ) ); |
|
141 | + )); |
|
142 | 142 | ?> |
143 | 143 | </div> |
144 | 144 | <?php endif; ?> |
145 | 145 | |
146 | -<?php do_action( 'wpinv_after_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type ); ?> |
|
146 | +<?php do_action('wpinv_after_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type); ?> |
@@ -10,61 +10,61 @@ discard block |
||
10 | 10 | * @var array $columns |
11 | 11 | */ |
12 | 12 | |
13 | -defined( 'ABSPATH' ) || exit; |
|
13 | +defined('ABSPATH') || exit; |
|
14 | 14 | |
15 | -do_action( 'getpaid_before_invoice_line_item', $invoice, $item ); |
|
15 | +do_action('getpaid_before_invoice_line_item', $invoice, $item); |
|
16 | 16 | |
17 | 17 | ?> |
18 | 18 | |
19 | -<div class='getpaid-invoice-item item-<?php echo (int) $item->get_id(); ?> item-type-<?php echo sanitize_html_class( $item->get_type() ); ?> border-bottom'> |
|
19 | +<div class='getpaid-invoice-item item-<?php echo (int) $item->get_id(); ?> item-type-<?php echo sanitize_html_class($item->get_type()); ?> border-bottom'> |
|
20 | 20 | |
21 | 21 | <div class="form-row"> |
22 | 22 | |
23 | - <?php foreach ( array_keys( $columns ) as $column ): ?> |
|
23 | + <?php foreach (array_keys($columns) as $column): ?> |
|
24 | 24 | |
25 | - <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class( $column ); ?>"> |
|
25 | + <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class($column); ?>"> |
|
26 | 26 | |
27 | 27 | <?php |
28 | 28 | |
29 | 29 | // Fires before printing a line item column. |
30 | - do_action( "getpaid_invoice_line_item_before_$column", $item, $invoice ); |
|
30 | + do_action("getpaid_invoice_line_item_before_$column", $item, $invoice); |
|
31 | 31 | |
32 | 32 | // Item name. |
33 | - if ( 'name' == $column ) { |
|
33 | + if ('name' == $column) { |
|
34 | 34 | |
35 | 35 | // Display the name. |
36 | - echo '<div class="mb-1">' . sanitize_text_field( $item->get_name() ) . '</div>'; |
|
36 | + echo '<div class="mb-1">' . sanitize_text_field($item->get_name()) . '</div>'; |
|
37 | 37 | |
38 | 38 | // And an optional description. |
39 | 39 | $description = $item->get_description(); |
40 | 40 | |
41 | - if ( ! empty( $description ) ) { |
|
42 | - $description = wp_kses_post( $description ); |
|
41 | + if (!empty($description)) { |
|
42 | + $description = wp_kses_post($description); |
|
43 | 43 | echo "<small class='form-text text-muted pr-2 m-0'>$description</small>"; |
44 | 44 | } |
45 | 45 | |
46 | 46 | // Price help text. |
47 | - $description = getpaid_item_recurring_price_help_text( $item, $invoice->get_currency() ); |
|
48 | - if ( $description ) { |
|
47 | + $description = getpaid_item_recurring_price_help_text($item, $invoice->get_currency()); |
|
48 | + if ($description) { |
|
49 | 49 | echo "<small class='form-text text-muted pr-2 m-0'>$description</small>"; |
50 | 50 | } |
51 | 51 | |
52 | 52 | // Fires before printing the line item actions. |
53 | - do_action( "getpaid_before_invoice_line_item_actions", $item, $invoice ); |
|
53 | + do_action("getpaid_before_invoice_line_item_actions", $item, $invoice); |
|
54 | 54 | |
55 | - $actions = apply_filters( 'getpaid-invoice-page-line-item-actions', array(), $item, $invoice ); |
|
55 | + $actions = apply_filters('getpaid-invoice-page-line-item-actions', array(), $item, $invoice); |
|
56 | 56 | |
57 | - if ( ! empty( $actions ) ) { |
|
57 | + if (!empty($actions)) { |
|
58 | 58 | |
59 | - $sanitized = array(); |
|
60 | - foreach ( $actions as $key => $action ) { |
|
61 | - $key = sanitize_html_class( $key ); |
|
62 | - $action = wp_kses_post( $action ); |
|
59 | + $sanitized = array(); |
|
60 | + foreach ($actions as $key => $action) { |
|
61 | + $key = sanitize_html_class($key); |
|
62 | + $action = wp_kses_post($action); |
|
63 | 63 | $sanitized[] = "<span class='$key'>$action</span>"; |
64 | 64 | } |
65 | 65 | |
66 | 66 | echo "<small class='form-text getpaid-line-item-actions'>"; |
67 | - echo implode( ' | ', $sanitized ); |
|
67 | + echo implode(' | ', $sanitized); |
|
68 | 68 | echo '</small>'; |
69 | 69 | |
70 | 70 | } |
@@ -72,30 +72,30 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | // Item price. |
75 | - if ( 'price' == $column ) { |
|
75 | + if ('price' == $column) { |
|
76 | 76 | |
77 | 77 | // Display the item price (or recurring price if this is a renewal invoice) |
78 | 78 | $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price(); |
79 | - echo wpinv_price( $price, $invoice->get_currency() ); |
|
79 | + echo wpinv_price($price, $invoice->get_currency()); |
|
80 | 80 | |
81 | 81 | } |
82 | 82 | |
83 | 83 | // Item quantity. |
84 | - if ( 'quantity' == $column ) { |
|
84 | + if ('quantity' == $column) { |
|
85 | 85 | echo (int) $item->get_quantity(); |
86 | 86 | } |
87 | 87 | |
88 | 88 | // Item sub total. |
89 | - if ( 'subtotal' == $column ) { |
|
89 | + if ('subtotal' == $column) { |
|
90 | 90 | $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total(); |
91 | - echo wpinv_price( $subtotal, $invoice->get_currency() ); |
|
91 | + echo wpinv_price($subtotal, $invoice->get_currency()); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | // Fires when printing a line item column. |
95 | - do_action( "getpaid_invoice_line_item_$column", $item, $invoice ); |
|
95 | + do_action("getpaid_invoice_line_item_$column", $item, $invoice); |
|
96 | 96 | |
97 | 97 | // Fires after printing a line item column. |
98 | - do_action( "getpaid_invoice_line_item_after_$column", $item, $invoice ); |
|
98 | + do_action("getpaid_invoice_line_item_after_$column", $item, $invoice); |
|
99 | 99 | |
100 | 100 | ?> |
101 | 101 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * @var WPInv_Invoice $invoice |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | +defined('ABSPATH') || exit; |
|
12 | 12 | |
13 | 13 | ?> |
14 | 14 | |
@@ -21,43 +21,43 @@ discard block |
||
21 | 21 | $actions[] = sprintf( |
22 | 22 | '<a href="javascript:void(0)" class="btn btn-sm m-1 d-inline-block btn-secondary invoice-action-print d-none d-lg-inline-block" onclick="window.print();">%s</a>', |
23 | 23 | sprintf( |
24 | - __( 'Print %s', 'invoicing' ), |
|
25 | - ucfirst( $invoice->get_invoice_quote_type() ) |
|
24 | + __('Print %s', 'invoicing'), |
|
25 | + ucfirst($invoice->get_invoice_quote_type()) |
|
26 | 26 | ) |
27 | 27 | ); |
28 | 28 | |
29 | - if ( is_user_logged_in() ) { |
|
29 | + if (is_user_logged_in()) { |
|
30 | 30 | |
31 | 31 | $actions[] = sprintf( |
32 | 32 | '<a href="%s" class="btn btn-sm btn-secondary m-1 d-inline-block invoice-action-history">%s</a>', |
33 | - esc_url( wpinv_get_history_page_uri( $invoice->get_post_type() ) ), |
|
33 | + esc_url(wpinv_get_history_page_uri($invoice->get_post_type())), |
|
34 | 34 | sprintf( |
35 | - __( '%s History', 'invoicing' ), |
|
36 | - ucfirst( $invoice->get_invoice_quote_type() ) |
|
35 | + __('%s History', 'invoicing'), |
|
36 | + ucfirst($invoice->get_invoice_quote_type()) |
|
37 | 37 | ) |
38 | 38 | ); |
39 | 39 | |
40 | 40 | } |
41 | 41 | |
42 | - if ( wpinv_current_user_can_manage_invoicing() ) { |
|
42 | + if (wpinv_current_user_can_manage_invoicing()) { |
|
43 | 43 | |
44 | 44 | $actions[] = sprintf( |
45 | 45 | '<a href="%s" class="btn btn-sm btn-secondary m-1 d-inline-block invoice-action-edit">%s</a>', |
46 | - esc_url( get_edit_post_link( $invoice->get_id() ) ), |
|
46 | + esc_url(get_edit_post_link($invoice->get_id())), |
|
47 | 47 | sprintf( |
48 | - __( 'Edit %s', 'invoicing' ), |
|
49 | - ucfirst( $invoice->get_invoice_quote_type() ) |
|
48 | + __('Edit %s', 'invoicing'), |
|
49 | + ucfirst($invoice->get_invoice_quote_type()) |
|
50 | 50 | ) |
51 | 51 | ); |
52 | 52 | |
53 | 53 | } |
54 | 54 | |
55 | - $actions = apply_filters( 'getpaid_invoice_header_right_actions_array', $actions, $invoice ); |
|
56 | - echo implode( '', $actions ); |
|
55 | + $actions = apply_filters('getpaid_invoice_header_right_actions_array', $actions, $invoice); |
|
56 | + echo implode('', $actions); |
|
57 | 57 | |
58 | 58 | ?> |
59 | 59 | |
60 | - <?php do_action('wpinv_invoice_display_right_actions', $invoice ); ?> |
|
60 | + <?php do_action('wpinv_invoice_display_right_actions', $invoice); ?> |
|
61 | 61 | </div> |
62 | 62 | |
63 | 63 | <?php |
@@ -7,11 +7,11 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | <h2 class="h3 text-dark"> |
14 | - <?php echo apply_filters( 'getpaid_invoice_type_label', ucfirst( $invoice->get_invoice_quote_type() ), $invoice ); ?> |
|
14 | + <?php echo apply_filters('getpaid_invoice_type_label', ucfirst($invoice->get_invoice_quote_type()), $invoice); ?> |
|
15 | 15 | </h2> |
16 | 16 | |
17 | 17 | <?php |