@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if ( ! defined( 'ABSPATH' ) ) { |
|
3 | +if (!defined('ABSPATH')) { |
|
4 | 4 | exit; // Exit if accessed directly |
5 | 5 | } |
6 | 6 | |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * |
19 | 19 | * @return string The rendered component. |
20 | 20 | */ |
21 | - public static function get($args = array()){ |
|
21 | + public static function get($args = array()) { |
|
22 | 22 | $defaults = array( |
23 | 23 | 'type' => 'a', // a, button, badge |
24 | 24 | 'href' => '#', |
@@ -42,38 +42,38 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * Parse incoming $args into an array and merge it with $defaults |
44 | 44 | */ |
45 | - $args = wp_parse_args( $args, $defaults ); |
|
45 | + $args = wp_parse_args($args, $defaults); |
|
46 | 46 | $output = ''; |
47 | - if ( ! empty( $args['type'] ) ) { |
|
47 | + if (!empty($args['type'])) { |
|
48 | 48 | $type = $args['type'] != 'a' ? esc_attr($args['type']) : 'a'; |
49 | 49 | |
50 | 50 | // open/type |
51 | - if($type=='a'){ |
|
51 | + if ($type == 'a') { |
|
52 | 52 | $new_window = !empty($args['new_window']) ? ' target="_blank" ' : ''; |
53 | - $output .= '<a href="' . $args['href'] . '"'.$new_window; |
|
54 | - }elseif($type=='badge'){ |
|
53 | + $output .= '<a href="' . $args['href'] . '"' . $new_window; |
|
54 | + }elseif ($type == 'badge') { |
|
55 | 55 | $output .= '<span '; |
56 | - }else{ |
|
56 | + } else { |
|
57 | 57 | $output .= '<button type="' . $type . '" '; |
58 | 58 | } |
59 | 59 | |
60 | 60 | // name |
61 | - if(!empty($args['name'])){ |
|
61 | + if (!empty($args['name'])) { |
|
62 | 62 | $output .= AUI_Component_Helper::name($args['name']); |
63 | 63 | } |
64 | 64 | |
65 | 65 | // id |
66 | - if(!empty($args['id'])){ |
|
66 | + if (!empty($args['id'])) { |
|
67 | 67 | $output .= AUI_Component_Helper::id($args['id']); |
68 | 68 | } |
69 | 69 | |
70 | 70 | // title |
71 | - if(!empty($args['title'])){ |
|
71 | + if (!empty($args['title'])) { |
|
72 | 72 | $output .= AUI_Component_Helper::title($args['title']); |
73 | 73 | } |
74 | 74 | |
75 | 75 | // value |
76 | - if(!empty($args['value'])){ |
|
76 | + if (!empty($args['value'])) { |
|
77 | 77 | $output .= AUI_Component_Helper::value($args['value']); |
78 | 78 | } |
79 | 79 | |
@@ -88,18 +88,18 @@ discard block |
||
88 | 88 | $output .= AUI_Component_Helper::aria_attributes($args); |
89 | 89 | |
90 | 90 | // extra attributes |
91 | - if(!empty($args['extra_attributes'])){ |
|
91 | + if (!empty($args['extra_attributes'])) { |
|
92 | 92 | $output .= AUI_Component_Helper::extra_attributes($args['extra_attributes']); |
93 | 93 | } |
94 | 94 | |
95 | 95 | // onclick, we don't escape this |
96 | - if(!empty($args['onclick'])){ |
|
97 | - $output .= ' onclick="'.$args['onclick'].'" '; |
|
96 | + if (!empty($args['onclick'])) { |
|
97 | + $output .= ' onclick="' . $args['onclick'] . '" '; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | // style, we don't escape this |
101 | - if(!empty($args['style'])){ |
|
102 | - $output .= ' style="'.$args['style'].'" '; |
|
101 | + if (!empty($args['style'])) { |
|
102 | + $output .= ' style="' . $args['style'] . '" '; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | // close opening tag |
@@ -108,37 +108,37 @@ discard block |
||
108 | 108 | |
109 | 109 | // hover content |
110 | 110 | $hover_content = false; |
111 | - if(!empty($args['hover_content']) || !empty($args['hover_icon'])){ |
|
112 | - $output .= "<span class='hover-content'>".AUI_Component_Helper::icon($args['hover_icon'],$args['hover_content']).$args['hover_content']."</span>"; |
|
111 | + if (!empty($args['hover_content']) || !empty($args['hover_icon'])) { |
|
112 | + $output .= "<span class='hover-content'>" . AUI_Component_Helper::icon($args['hover_icon'], $args['hover_content']) . $args['hover_content'] . "</span>"; |
|
113 | 113 | $hover_content = true; |
114 | 114 | } |
115 | 115 | |
116 | 116 | // content |
117 | - if($hover_content){$output .= "<span class='hover-content-original'>";} |
|
118 | - if(!empty($args['content']) || !empty($args['icon'])){ |
|
119 | - $output .= AUI_Component_Helper::icon($args['icon'],$args['content'],$args['icon_extra_attributes']).$args['content']; |
|
117 | + if ($hover_content) {$output .= "<span class='hover-content-original'>"; } |
|
118 | + if (!empty($args['content']) || !empty($args['icon'])) { |
|
119 | + $output .= AUI_Component_Helper::icon($args['icon'], $args['content'], $args['icon_extra_attributes']) . $args['content']; |
|
120 | 120 | } |
121 | - if($hover_content){$output .= "</span>";} |
|
121 | + if ($hover_content) {$output .= "</span>"; } |
|
122 | 122 | |
123 | 123 | |
124 | 124 | |
125 | 125 | // close |
126 | - if($type=='a'){ |
|
126 | + if ($type == 'a') { |
|
127 | 127 | $output .= '</a>'; |
128 | - }elseif($type=='badge'){ |
|
128 | + }elseif ($type == 'badge') { |
|
129 | 129 | $output .= '</span>'; |
130 | - }else{ |
|
130 | + } else { |
|
131 | 131 | $output .= '</button>'; |
132 | 132 | } |
133 | 133 | |
134 | 134 | // maybe new line after? This adds better spacing between buttons. |
135 | - if(!empty($args['new_line_after'])){ |
|
135 | + if (!empty($args['new_line_after'])) { |
|
136 | 136 | $output .= PHP_EOL; |
137 | 137 | } |
138 | 138 | |
139 | 139 | |
140 | 140 | // wrap |
141 | - if(!$args['no_wrap']){ |
|
141 | + if (!$args['no_wrap']) { |
|
142 | 142 | $output = AUI_Component_Input::wrap(array( |
143 | 143 | 'content' => $output, |
144 | 144 | )); |
@@ -7,22 +7,22 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Totals rows. |
13 | -$totals = getpaid_invoice_totals_rows( $invoice ); |
|
13 | +$totals = getpaid_invoice_totals_rows($invoice); |
|
14 | 14 | |
15 | -do_action( 'getpaid_before_email_line_totals', $invoice, $totals ); |
|
15 | +do_action('getpaid_before_email_line_totals', $invoice, $totals); |
|
16 | 16 | |
17 | 17 | ?> |
18 | 18 | |
19 | 19 | |
20 | -<?php if ( has_action( 'wpinv_email_footer_buttons' ) ) : ?> |
|
20 | +<?php if (has_action('wpinv_email_footer_buttons')) : ?> |
|
21 | 21 | |
22 | 22 | <tr class="wpinv_cart_footer_row"> |
23 | 23 | |
24 | - <td colspan="<?php echo ( (int) $column_count ); ?>"> |
|
25 | - <?php do_action( 'wpinv_email_footer_buttons' ); ?> |
|
24 | + <td colspan="<?php echo ((int) $column_count); ?>"> |
|
25 | + <?php do_action('wpinv_email_footer_buttons'); ?> |
|
26 | 26 | </td> |
27 | 27 | |
28 | 28 | </tr> |
@@ -30,40 +30,40 @@ discard block |
||
30 | 30 | <?php endif; ?> |
31 | 31 | |
32 | 32 | |
33 | -<?php foreach ( $totals as $key => $label ) : ?> |
|
33 | +<?php foreach ($totals as $key => $label) : ?> |
|
34 | 34 | |
35 | - <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo sanitize_html_class( $key ); ?>_row"> |
|
35 | + <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo sanitize_html_class($key); ?>_row"> |
|
36 | 36 | |
37 | - <td colspan="<?php echo ( $column_count - 1 ); ?>" class="wpinv_cart_<?php echo sanitize_html_class( $key ); ?>_label text-right"> |
|
38 | - <strong><?php echo sanitize_text_field( $label ); ?>:</strong> |
|
37 | + <td colspan="<?php echo ($column_count - 1); ?>" class="wpinv_cart_<?php echo sanitize_html_class($key); ?>_label text-right"> |
|
38 | + <strong><?php echo sanitize_text_field($label); ?>:</strong> |
|
39 | 39 | </td> |
40 | 40 | |
41 | - <td class="wpinv_cart_<?php echo sanitize_html_class( $key ); ?> text-right"> |
|
41 | + <td class="wpinv_cart_<?php echo sanitize_html_class($key); ?> text-right"> |
|
42 | 42 | |
43 | 43 | <?php |
44 | 44 | |
45 | 45 | // Total tax. |
46 | - if ( 'tax' == $key ) { |
|
47 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_tax() ), $invoice->get_currency() ); |
|
46 | + if ('tax' == $key) { |
|
47 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_tax()), $invoice->get_currency()); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | // Total discount. |
51 | - if ( 'discount' == $key ) { |
|
52 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_discount() ), $invoice->get_currency() ); |
|
51 | + if ('discount' == $key) { |
|
52 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_discount()), $invoice->get_currency()); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | // Sub total. |
56 | - if ( 'subtotal' == $key ) { |
|
57 | - echo wpinv_price( wpinv_format_amount( $invoice->get_subtotal() ), $invoice->get_currency() ); |
|
56 | + if ('subtotal' == $key) { |
|
57 | + echo wpinv_price(wpinv_format_amount($invoice->get_subtotal()), $invoice->get_currency()); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | // Total. |
61 | - if ( 'total' == $key ) { |
|
62 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total() ), $invoice->get_currency() ); |
|
61 | + if ('total' == $key) { |
|
62 | + echo wpinv_price(wpinv_format_amount($invoice->get_total()), $invoice->get_currency()); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | // Fires when printing a cart total in an email. |
66 | - do_action( "getpaid_email_cart_totals_$key", $invoice ); |
|
66 | + do_action("getpaid_email_cart_totals_$key", $invoice); |
|
67 | 67 | |
68 | 68 | ?> |
69 | 69 | |
@@ -75,4 +75,4 @@ discard block |
||
75 | 75 | |
76 | 76 | <?php |
77 | 77 | |
78 | - do_action( 'getpaid_after_email_line_totals', $invoice, $totals ); |
|
78 | + do_action('getpaid_after_email_line_totals', $invoice, $totals); |
@@ -7,63 +7,63 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | -<?php do_action( 'getpaid_before_email_line_item', $invoice, $item ); ?> |
|
14 | +<?php do_action('getpaid_before_email_line_item', $invoice, $item); ?> |
|
15 | 15 | |
16 | -<tr class="wpinv_cart_item item-type-<?php echo sanitize_html_class( $item->get_type() ); ?>"> |
|
16 | +<tr class="wpinv_cart_item item-type-<?php echo sanitize_html_class($item->get_type()); ?>"> |
|
17 | 17 | |
18 | - <?php foreach ( array_keys( $columns ) as $column ): ?> |
|
18 | + <?php foreach (array_keys($columns) as $column): ?> |
|
19 | 19 | |
20 | - <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right' ?> wpinv_cart_item_<?php echo sanitize_html_class( $column ); ?>"> |
|
20 | + <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right' ?> wpinv_cart_item_<?php echo sanitize_html_class($column); ?>"> |
|
21 | 21 | |
22 | 22 | <?php |
23 | 23 | |
24 | 24 | // Fires before printing a line item column. |
25 | - do_action( "getpaid_email_line_item_before_$column", $item, $invoice ); |
|
25 | + do_action("getpaid_email_line_item_before_$column", $item, $invoice); |
|
26 | 26 | |
27 | 27 | // Item name. |
28 | - if ( 'name' == $column ) { |
|
28 | + if ('name' == $column) { |
|
29 | 29 | |
30 | 30 | // Display the name. |
31 | - echo '<div class="wpinv_email_cart_item_title">' . sanitize_text_field( $item->get_name() ) . '</div>'; |
|
31 | + echo '<div class="wpinv_email_cart_item_title">' . sanitize_text_field($item->get_name()) . '</div>'; |
|
32 | 32 | |
33 | 33 | // And an optional description. |
34 | 34 | $description = $item->get_description(); |
35 | 35 | |
36 | - if ( ! empty( $description ) ) { |
|
37 | - $description = wp_kses_post( $description ); |
|
36 | + if (!empty($description)) { |
|
37 | + $description = wp_kses_post($description); |
|
38 | 38 | echo "<small class='form-text text-muted pr-2 m-0'>$description</small>"; |
39 | 39 | } |
40 | 40 | |
41 | 41 | } |
42 | 42 | |
43 | 43 | // Item price. |
44 | - if ( 'price' == $column ) { |
|
44 | + if ('price' == $column) { |
|
45 | 45 | |
46 | 46 | // Display the item price (or recurring price if this is a renewal invoice) |
47 | - if ( $invoice->is_recurring() && $invoice->is_renewal() ) { |
|
48 | - echo wpinv_price( wpinv_format_amount( $item->get_price() ), $invoice->get_currency() ); |
|
47 | + if ($invoice->is_recurring() && $invoice->is_renewal()) { |
|
48 | + echo wpinv_price(wpinv_format_amount($item->get_price()), $invoice->get_currency()); |
|
49 | 49 | } else { |
50 | - echo wpinv_price( wpinv_format_amount( $item->get_initial_price() ), $invoice->get_currency() ); |
|
50 | + echo wpinv_price(wpinv_format_amount($item->get_initial_price()), $invoice->get_currency()); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | } |
54 | 54 | |
55 | 55 | // Item quantity. |
56 | - if ( 'quantity' == $column ) { |
|
56 | + if ('quantity' == $column) { |
|
57 | 57 | echo (int) $item->get_qantity(); |
58 | 58 | } |
59 | 59 | |
60 | 60 | // Item sub total. |
61 | - if ( 'subtotal' == $column ) { |
|
62 | - echo wpinv_price( wpinv_format_amount( $item->get_sub_total() ), $invoice->get_currency() ); |
|
61 | + if ('subtotal' == $column) { |
|
62 | + echo wpinv_price(wpinv_format_amount($item->get_sub_total()), $invoice->get_currency()); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | // Fires when printing a line item column. |
66 | - do_action( "getpaid_email_line_item_$column", $item, $invoice ); |
|
66 | + do_action("getpaid_email_line_item_$column", $item, $invoice); |
|
67 | 67 | |
68 | 68 | ?> |
69 | 69 | |
@@ -73,4 +73,4 @@ discard block |
||
73 | 73 | |
74 | 74 | </tr> |
75 | 75 | |
76 | -<?php do_action( 'getpaid_after_email_line_item', $invoice, $item ); ?> |
|
76 | +<?php do_action('getpaid_after_email_line_item', $invoice, $item); ?> |
@@ -2,12 +2,12 @@ discard block |
||
2 | 2 | global $wpi_invoice; |
3 | 3 | |
4 | 4 | // Backwards compatibility. |
5 | -if ( empty( $invoice ) ) { |
|
5 | +if (empty($invoice)) { |
|
6 | 6 | $invoice = $wpi_invoice; |
7 | 7 | } |
8 | 8 | |
9 | 9 | $success_page_uri = wpinv_get_success_page_uri(); |
10 | -if ( !empty( $wpi_invoice ) ) { |
|
10 | +if (!empty($wpi_invoice)) { |
|
11 | 11 | $success_page_uri = $invoice->get_receipt_url(); |
12 | 12 | } |
13 | 13 | ?> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <?php |
18 | 18 | echo |
19 | 19 | wp_sprintf( |
20 | - __( 'Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing' ), |
|
20 | + __('Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing'), |
|
21 | 21 | $success_page_uri |
22 | 22 | ); |
23 | 23 | ?> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <script type="text/javascript"> |
28 | 28 | setTimeout( |
29 | 29 | function(){ |
30 | - window.location = '<?php echo esc_url( $success_page_uri ); ?>'; |
|
30 | + window.location = '<?php echo esc_url($success_page_uri); ?>'; |
|
31 | 31 | }, |
32 | 32 | 10000 |
33 | 33 | ); |
@@ -8,26 +8,26 @@ discard block |
||
8 | 8 | * @version 1.0.19 |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | +defined('ABSPATH') || exit; |
|
12 | 12 | |
13 | 13 | // Totals rows. |
14 | -$totals = getpaid_invoice_totals_rows( $invoice ); |
|
14 | +$totals = getpaid_invoice_totals_rows($invoice); |
|
15 | 15 | |
16 | -do_action( 'getpaid_before_invoice_line_totals', $invoice, $totals ); |
|
16 | +do_action('getpaid_before_invoice_line_totals', $invoice, $totals); |
|
17 | 17 | |
18 | 18 | ?> |
19 | 19 | <div class='border-top getpaid-invoice-line-totals'> |
20 | 20 | <div class="row"> |
21 | 21 | <div class="col-12 offset-sm-6 col-sm-6 border-left pl-0"> |
22 | 22 | |
23 | - <?php foreach ( $totals as $key => $label ) : ?> |
|
23 | + <?php foreach ($totals as $key => $label) : ?> |
|
24 | 24 | |
25 | - <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class( $key ); ?>"> |
|
25 | + <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class($key); ?>"> |
|
26 | 26 | |
27 | 27 | <div class="row"> |
28 | 28 | |
29 | 29 | <div class="col-12 col-sm-8 getpaid-invoice-line-totals-label"> |
30 | - <?php echo sanitize_text_field( $label ); ?> |
|
30 | + <?php echo sanitize_text_field($label); ?> |
|
31 | 31 | </div> |
32 | 32 | |
33 | 33 | <div class="col-12 col-sm-2 getpaid-invoice-line-totals-value"> |
@@ -35,27 +35,27 @@ discard block |
||
35 | 35 | <?php |
36 | 36 | |
37 | 37 | // Total tax. |
38 | - if ( 'tax' == $key ) { |
|
39 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_tax() ), $invoice->get_currency() ); |
|
38 | + if ('tax' == $key) { |
|
39 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_tax()), $invoice->get_currency()); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | // Total discount. |
43 | - if ( 'discount' == $key ) { |
|
44 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_discount() ), $invoice->get_currency() ); |
|
43 | + if ('discount' == $key) { |
|
44 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_discount()), $invoice->get_currency()); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | // Sub total. |
48 | - if ( 'subtotal' == $key ) { |
|
49 | - echo wpinv_price( wpinv_format_amount( $invoice->get_subtotal() ), $invoice->get_currency() ); |
|
48 | + if ('subtotal' == $key) { |
|
49 | + echo wpinv_price(wpinv_format_amount($invoice->get_subtotal()), $invoice->get_currency()); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | // Total. |
53 | - if ( 'total' == $key ) { |
|
54 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total() ), $invoice->get_currency() ); |
|
53 | + if ('total' == $key) { |
|
54 | + echo wpinv_price(wpinv_format_amount($invoice->get_total()), $invoice->get_currency()); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | // Fires when printing a cart total. |
58 | - do_action( "getpaid_invoice_cart_totals_$key", $invoice ); |
|
58 | + do_action("getpaid_invoice_cart_totals_$key", $invoice); |
|
59 | 59 | |
60 | 60 | ?> |
61 | 61 | |
@@ -69,4 +69,4 @@ discard block |
||
69 | 69 | </div> |
70 | 70 | </div> <!-- end .getpaid-invoice-line-totals --> |
71 | 71 | |
72 | -<?php do_action( 'getpaid_after_invoice_line_totals', $invoice, $totals ); ?> |
|
72 | +<?php do_action('getpaid_after_invoice_line_totals', $invoice, $totals); ?> |
@@ -7,35 +7,35 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <div class="getpaid-header-right-actions"> |
15 | 15 | |
16 | - <?php if ( $invoice->is_type( 'invoice' ) ) : ?> |
|
16 | + <?php if ($invoice->is_type('invoice')) : ?> |
|
17 | 17 | |
18 | 18 | <a class="btn btn-secondary invoice-action-print" onclick="window.print();" href="javascript:void(0)"> |
19 | - <?php _e( 'Print Invoice', 'invoicing' ); ?> |
|
19 | + <?php _e('Print Invoice', 'invoicing'); ?> |
|
20 | 20 | </a> |
21 | 21 | |
22 | - <?php if ( is_user_logged_in() ) : ?> |
|
22 | + <?php if (is_user_logged_in()) : ?> |
|
23 | 23 | |
24 | - <a class="btn btn-secondary invoice-action-history" href="<?php echo esc_url( wpinv_get_history_page_uri() ); ?>"> |
|
25 | - <?php _e( 'Invoice History', 'invoicing' ); ?> |
|
24 | + <a class="btn btn-secondary invoice-action-history" href="<?php echo esc_url(wpinv_get_history_page_uri()); ?>"> |
|
25 | + <?php _e('Invoice History', 'invoicing'); ?> |
|
26 | 26 | </a> |
27 | 27 | <?php endif; ?> |
28 | 28 | |
29 | - <?php if ( wpinv_current_user_can_manage_invoicing() ) : ?> |
|
29 | + <?php if (wpinv_current_user_can_manage_invoicing()) : ?> |
|
30 | 30 | |
31 | - <a class="btn btn-secondary invoice-action-edit" href="<?php echo esc_url( get_edit_post_link( $invoice->get_id() ) ); ?>"> |
|
32 | - <?php _e( 'Edit Invoice', 'invoicing' ); ?> |
|
31 | + <a class="btn btn-secondary invoice-action-edit" href="<?php echo esc_url(get_edit_post_link($invoice->get_id())); ?>"> |
|
32 | + <?php _e('Edit Invoice', 'invoicing'); ?> |
|
33 | 33 | </a> |
34 | 34 | <?php endif; ?> |
35 | 35 | |
36 | 36 | <?php endif; ?> |
37 | 37 | |
38 | - <?php do_action('wpinv_invoice_display_right_actions', $invoice ); ?> |
|
38 | + <?php do_action('wpinv_invoice_display_right_actions', $invoice); ?> |
|
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <?php |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @package Invoicing/data |
7 | 7 | */ |
8 | 8 | |
9 | -defined( 'ABSPATH' ) || exit; |
|
9 | +defined('ABSPATH') || exit; |
|
10 | 10 | |
11 | 11 | return array( |
12 | 12 | "AD" => "AD\d{3}", |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) { |
|
2 | +if (!defined('ABSPATH')) { |
|
3 | 3 | exit; |
4 | 4 | } |
5 | 5 | |
@@ -22,15 +22,15 @@ discard block |
||
22 | 22 | 'block-keywords'=> "['invoicing','history']", |
23 | 23 | 'class_name' => __CLASS__, |
24 | 24 | 'base_id' => 'wpinv_history', |
25 | - 'name' => __('GetPaid > Invoice History','invoicing'), |
|
25 | + 'name' => __('GetPaid > Invoice History', 'invoicing'), |
|
26 | 26 | 'widget_ops' => array( |
27 | 27 | 'classname' => 'wpinv-history-class bsui', |
28 | - 'description' => esc_html__('Displays invoice history.','invoicing'), |
|
28 | + 'description' => esc_html__('Displays invoice history.', 'invoicing'), |
|
29 | 29 | ), |
30 | 30 | 'arguments' => array( |
31 | 31 | 'title' => array( |
32 | - 'title' => __( 'Widget title', 'invoicing' ), |
|
33 | - 'desc' => __( 'Enter widget title.', 'invoicing' ), |
|
32 | + 'title' => __('Widget title', 'invoicing'), |
|
33 | + 'desc' => __('Enter widget title.', 'invoicing'), |
|
34 | 34 | 'type' => 'text', |
35 | 35 | 'desc_tip' => true, |
36 | 36 | 'default' => '', |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ); |
42 | 42 | |
43 | 43 | |
44 | - parent::__construct( $options ); |
|
44 | + parent::__construct($options); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return mixed|string|bool |
55 | 55 | */ |
56 | - public function output( $args = array(), $widget_args = array(), $content = '' ) { |
|
56 | + public function output($args = array(), $widget_args = array(), $content = '') { |
|
57 | 57 | return getpaid_invoice_history(); |
58 | 58 | } |
59 | 59 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) { |
|
2 | +if (!defined('ABSPATH')) { |
|
3 | 3 | exit; |
4 | 4 | } |
5 | 5 | |
@@ -22,15 +22,15 @@ discard block |
||
22 | 22 | 'block-keywords'=> "['invoicing','receipt']", |
23 | 23 | 'class_name' => __CLASS__, |
24 | 24 | 'base_id' => 'wpinv_receipt', |
25 | - 'name' => __('GetPaid > Invoice Receipt','invoicing'), |
|
25 | + 'name' => __('GetPaid > Invoice Receipt', 'invoicing'), |
|
26 | 26 | 'widget_ops' => array( |
27 | 27 | 'classname' => 'wpinv-receipt-class bsui', |
28 | - 'description' => esc_html__('Displays invoice receipt after checkout.','invoicing'), |
|
28 | + 'description' => esc_html__('Displays invoice receipt after checkout.', 'invoicing'), |
|
29 | 29 | ), |
30 | 30 | 'arguments' => array( |
31 | 31 | 'title' => array( |
32 | - 'title' => __( 'Widget title', 'invoicing' ), |
|
33 | - 'desc' => __( 'Enter widget title.', 'invoicing' ), |
|
32 | + 'title' => __('Widget title', 'invoicing'), |
|
33 | + 'desc' => __('Enter widget title.', 'invoicing'), |
|
34 | 34 | 'type' => 'text', |
35 | 35 | 'desc_tip' => true, |
36 | 36 | 'default' => '', |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ); |
42 | 42 | |
43 | 43 | |
44 | - parent::__construct( $options ); |
|
44 | + parent::__construct($options); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return mixed|string|bool |
55 | 55 | */ |
56 | - public function output( $args = array(), $widget_args = array(), $content = '' ) { |
|
56 | + public function output($args = array(), $widget_args = array(), $content = '') { |
|
57 | 57 | return wpinv_payment_receipt(); |
58 | 58 | } |
59 | 59 |