@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | |
3 | 3 | /** |
4 | 4 | * Displays invoice cart totals |
@@ -9,14 +9,14 @@ discard block |
||
9 | 9 | * @var WPInv_Invoice $invoice |
10 | 10 | */ |
11 | 11 | |
12 | -defined( 'ABSPATH' ) || exit; |
|
12 | + defined( 'ABSPATH' ) || exit; |
|
13 | 13 | |
14 | -// Totals rows. |
|
15 | -$totals = getpaid_invoice_totals_rows( $invoice ); |
|
14 | + // Totals rows. |
|
15 | + $totals = getpaid_invoice_totals_rows( $invoice ); |
|
16 | 16 | |
17 | -do_action( 'getpaid_before_invoice_line_totals', $invoice, $totals ); |
|
17 | + do_action( 'getpaid_before_invoice_line_totals', $invoice, $totals ); |
|
18 | 18 | |
19 | -?> |
|
19 | + ?> |
|
20 | 20 | <div class='getpaid-invoice-line-totals'> |
21 | 21 | <div class="row"> |
22 | 22 | <div class="col-12 offset-sm-6 col-sm-6 border-sm-left pl-sm-0"> |
@@ -35,65 +35,65 @@ discard block |
||
35 | 35 | |
36 | 36 | <?php |
37 | 37 | |
38 | - // Total tax. |
|
39 | - if ( 'tax' === $key ) { |
|
40 | - wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() ); |
|
38 | + // Total tax. |
|
39 | + if ( 'tax' === $key ) { |
|
40 | + wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() ); |
|
41 | 41 | |
42 | - if ( wpinv_use_taxes() && ! $invoice->get_disable_taxes() ) { |
|
42 | + if ( wpinv_use_taxes() && ! $invoice->get_disable_taxes() ) { |
|
43 | 43 | |
44 | - $taxes = $invoice->get_total_tax(); |
|
45 | - if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) { |
|
46 | - echo ' <em class="text-muted small">'; |
|
47 | - _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' ); |
|
48 | - echo '</em>'; |
|
44 | + $taxes = $invoice->get_total_tax(); |
|
45 | + if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) { |
|
46 | + echo ' <em class="text-muted small">'; |
|
47 | + _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' ); |
|
48 | + echo '</em>'; |
|
49 | + } |
|
49 | 50 | } |
50 | 51 | } |
51 | - } |
|
52 | 52 | |
53 | - // Check if field starts with tax__. |
|
54 | - if ( 0 === strpos( $key, 'tax__' ) ) { |
|
55 | - $tax_amount = $invoice->get_tax_total_by_name( str_replace( 'tax__', '', $key ) ); |
|
56 | - wpinv_the_price( $tax_amount, $invoice->get_currency() ); |
|
53 | + // Check if field starts with tax__. |
|
54 | + if ( 0 === strpos( $key, 'tax__' ) ) { |
|
55 | + $tax_amount = $invoice->get_tax_total_by_name( str_replace( 'tax__', '', $key ) ); |
|
56 | + wpinv_the_price( $tax_amount, $invoice->get_currency() ); |
|
57 | 57 | |
58 | - if ( wpinv_use_taxes() && ! $invoice->get_disable_taxes() ) { |
|
58 | + if ( wpinv_use_taxes() && ! $invoice->get_disable_taxes() ) { |
|
59 | 59 | |
60 | - if ( empty( $tax_amount ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) { |
|
61 | - echo ' <em class="text-muted small">'; |
|
62 | - _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' ); |
|
63 | - echo '</em>'; |
|
60 | + if ( empty( $tax_amount ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) { |
|
61 | + echo ' <em class="text-muted small">'; |
|
62 | + _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' ); |
|
63 | + echo '</em>'; |
|
64 | + } |
|
64 | 65 | } |
65 | 66 | } |
66 | - } |
|
67 | 67 | |
68 | - // Total Fee. |
|
69 | - if ( 'fee' === $key ) { |
|
70 | - wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() ); |
|
71 | - } |
|
68 | + // Total Fee. |
|
69 | + if ( 'fee' === $key ) { |
|
70 | + wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() ); |
|
71 | + } |
|
72 | 72 | |
73 | - // Total discount. |
|
74 | - if ( 'discount' === $key ) { |
|
75 | - wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() ); |
|
76 | - } |
|
73 | + // Total discount. |
|
74 | + if ( 'discount' === $key ) { |
|
75 | + wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() ); |
|
76 | + } |
|
77 | 77 | |
78 | - // Shipping. |
|
79 | - if ( 'shipping' === $key ) { |
|
80 | - wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() ); |
|
81 | - } |
|
78 | + // Shipping. |
|
79 | + if ( 'shipping' === $key ) { |
|
80 | + wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() ); |
|
81 | + } |
|
82 | 82 | |
83 | - // Sub total. |
|
84 | - if ( 'subtotal' === $key ) { |
|
85 | - wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() ); |
|
86 | - } |
|
83 | + // Sub total. |
|
84 | + if ( 'subtotal' === $key ) { |
|
85 | + wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() ); |
|
86 | + } |
|
87 | 87 | |
88 | - // Total. |
|
89 | - if ( 'total' === $key ) { |
|
90 | - wpinv_the_price( $invoice->get_total(), $invoice->get_currency() ); |
|
91 | - } |
|
88 | + // Total. |
|
89 | + if ( 'total' === $key ) { |
|
90 | + wpinv_the_price( $invoice->get_total(), $invoice->get_currency() ); |
|
91 | + } |
|
92 | 92 | |
93 | - // Fires when printing a cart total. |
|
94 | - do_action( "getpaid_invoice_cart_totals_$key", $invoice ); |
|
93 | + // Fires when printing a cart total. |
|
94 | + do_action( "getpaid_invoice_cart_totals_$key", $invoice ); |
|
95 | 95 | |
96 | - ?> |
|
96 | + ?> |
|
97 | 97 | |
98 | 98 | </div> |
99 | 99 | </div> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays a discount field in payment form |
4 | 4 | * |
@@ -8,25 +8,25 @@ discard block |
||
8 | 8 | * @var GetPaid_Payment_Form $form The current payment form |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | + defined( 'ABSPATH' ) || exit; |
|
12 | 12 | |
13 | -if ( ! getpaid_has_published_discount() ) { |
|
14 | - return; |
|
13 | + if ( ! getpaid_has_published_discount() ) { |
|
14 | + return; |
|
15 | 15 | } |
16 | 16 | |
17 | -if ( ! empty( $description ) ) { |
|
18 | - $description = "<small class='form-text text-muted'>$description</small>"; |
|
17 | + if ( ! empty( $description ) ) { |
|
18 | + $description = "<small class='form-text text-muted'>$description</small>"; |
|
19 | 19 | } else { |
20 | - $description = ''; |
|
20 | + $description = ''; |
|
21 | 21 | } |
22 | 22 | |
23 | -$discount_code = ''; |
|
24 | -if ( ! empty( $form->invoice ) ) { |
|
25 | - $discount_code = $form->invoice->get_discount_code(); |
|
23 | + $discount_code = ''; |
|
24 | + if ( ! empty( $form->invoice ) ) { |
|
25 | + $discount_code = $form->invoice->get_discount_code(); |
|
26 | 26 | } |
27 | 27 | |
28 | -$class = empty( $class ) ? 'btn-secondary' : sanitize_html_class( $class ); |
|
29 | -?> |
|
28 | + $class = empty( $class ) ? 'btn-secondary' : sanitize_html_class( $class ); |
|
29 | + ?> |
|
30 | 30 | |
31 | 31 | <div class="form-group mb-3"> |
32 | 32 | <div class="getpaid-discount-field border rounded p-3"> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays an invoice. |
4 | 4 | * |
@@ -7,9 +7,9 @@ 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 | 14 | <div class="bsui"> |
15 | 15 | |
@@ -17,28 +17,28 @@ discard block |
||
17 | 17 | |
18 | 18 | <?php |
19 | 19 | |
20 | - // Fires when printing the header. |
|
21 | - do_action( 'getpaid_invoice_header', $invoice ); |
|
20 | + // Fires when printing the header. |
|
21 | + do_action( 'getpaid_invoice_header', $invoice ); |
|
22 | 22 | |
23 | - // Print the opening wrapper. |
|
24 | - echo '<div class="container bg-white getpaid-print-no-border border mt-4 mb-4 p-4 position-relative flex-grow-1">'; |
|
23 | + // Print the opening wrapper. |
|
24 | + echo '<div class="container bg-white getpaid-print-no-border border mt-4 mb-4 p-4 position-relative flex-grow-1">'; |
|
25 | 25 | |
26 | - // Print notifications. |
|
27 | - wpinv_print_errors(); |
|
26 | + // Print notifications. |
|
27 | + wpinv_print_errors(); |
|
28 | 28 | |
29 | - // Fires when printing the invoice details. |
|
30 | - do_action( 'getpaid_invoice_details', $invoice ); |
|
29 | + // Fires when printing the invoice details. |
|
30 | + do_action( 'getpaid_invoice_details', $invoice ); |
|
31 | 31 | |
32 | - // Fires when printing the invoice line items. |
|
33 | - do_action( 'getpaid_invoice_line_items', $invoice ); |
|
32 | + // Fires when printing the invoice line items. |
|
33 | + do_action( 'getpaid_invoice_line_items', $invoice ); |
|
34 | 34 | |
35 | - // Print the closing wrapper. |
|
36 | - echo '</div>'; |
|
35 | + // Print the closing wrapper. |
|
36 | + echo '</div>'; |
|
37 | 37 | |
38 | - // Fires when printing the invoice footer. |
|
39 | - do_action( 'getpaid_invoice_footer', $invoice ); |
|
38 | + // Fires when printing the invoice footer. |
|
39 | + do_action( 'getpaid_invoice_footer', $invoice ); |
|
40 | 40 | |
41 | - ?> |
|
41 | + ?> |
|
42 | 42 | |
43 | 43 | </div> |
44 | 44 | </div> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Template that generates the subscription active email. |
4 | 4 | * |
@@ -8,15 +8,15 @@ discard block |
||
8 | 8 | * @var WPInv_Subscription $object |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | + defined( 'ABSPATH' ) || exit; |
|
12 | 12 | |
13 | -$invoice = $object->get_parent_payment(); |
|
13 | + $invoice = $object->get_parent_payment(); |
|
14 | 14 | |
15 | -// Print the email header. |
|
16 | -do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin ); |
|
15 | + // Print the email header. |
|
16 | + do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin ); |
|
17 | 17 | |
18 | -// Generate the custom message body. |
|
19 | -echo wp_kses_post( $message_body ); |
|
18 | + // Generate the custom message body. |
|
19 | + echo wp_kses_post( $message_body ); |
|
20 | 20 | |
21 | -// Print the email footer. |
|
22 | -do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin ); |
|
21 | + // Print the email footer. |
|
22 | + do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin ); |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Template that prints additional code in the footer when viewing a blog on the frontend.. |
4 | 4 | * |
@@ -7,10 +7,10 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | + defined( 'ABSPATH' ) || exit; |
|
11 | 11 | |
12 | -global $aui_bs5; |
|
13 | -?> |
|
12 | + global $aui_bs5; |
|
13 | + ?> |
|
14 | 14 | |
15 | 15 | <div class="bsui"> |
16 | 16 | <div id="getpaid-payment-modal" class="modal" tabindex="-1" role="dialog"> |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | <div class="modal-body"> |
20 | 20 | <button type="button" class=" btn-close p-2 getpaid-payment-modal-close d-sm-none" data-<?php echo $aui_bs5 ? 'bs-' : ''; ?>dismiss="modal" aria-label="<?php esc_attr__( 'Close', 'invoicing' ); ?>"> |
21 | 21 | <?php if ( empty( $aui_bs5 ) ) : ?> |
22 | - <span aria-hidden="true">×</span> |
|
22 | + <span aria-hidden="true">×</span> |
|
23 | 23 | <?php endif; ?> |
24 | 24 | </button> |
25 | 25 | <div class="modal-body-wrapper"></div> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays a checkbox item-select box in a payment form |
4 | 4 | * |
@@ -7,39 +7,39 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | + defined( 'ABSPATH' ) || exit; |
|
11 | 11 | |
12 | -// Prepare the selectable items. |
|
13 | -$selectable = array(); |
|
14 | -foreach ( $form->get_items() as $item ) { |
|
15 | - if ( ! $item->is_required ) { |
|
16 | - $selectable[ $item->get_id() ] = $item->get_name() . ' — ' . wpinv_price( $item->get_initial_price() ); |
|
17 | - } |
|
12 | + // Prepare the selectable items. |
|
13 | + $selectable = array(); |
|
14 | + foreach ( $form->get_items() as $item ) { |
|
15 | + if ( ! $item->is_required ) { |
|
16 | + $selectable[ $item->get_id() ] = $item->get_name() . ' — ' . wpinv_price( $item->get_initial_price() ); |
|
17 | + } |
|
18 | 18 | } |
19 | 19 | |
20 | -if ( empty( $selectable ) ) { |
|
21 | - return; |
|
20 | + if ( empty( $selectable ) ) { |
|
21 | + return; |
|
22 | 22 | } |
23 | 23 | |
24 | -echo '<div class="getpaid-payment-form-items-checkbox form-group mb-3">'; |
|
24 | + echo '<div class="getpaid-payment-form-items-checkbox form-group mb-3">'; |
|
25 | 25 | |
26 | -foreach ( $selectable as $item_id => $item_name ) { |
|
26 | + foreach ( $selectable as $item_id => $item_name ) { |
|
27 | 27 | |
28 | - $is_checked = get_post_meta( $item_id, 'selected_by_default', true ); |
|
28 | + $is_checked = get_post_meta( $item_id, 'selected_by_default', true ); |
|
29 | 29 | |
30 | - aui()->input( |
|
31 | - array( |
|
32 | - 'type' => 'checkbox', |
|
33 | - 'name' => 'getpaid-payment-form-selected-item', |
|
34 | - 'id' => 'getpaid-payment-form-selected-item' . uniqid( '_' ) . $item_id, |
|
35 | - 'label' => $item_name, |
|
36 | - 'value' => $item_id, |
|
37 | - 'no_wrap' => true, |
|
38 | - 'checked' => '1' == $is_checked, |
|
39 | - ), |
|
40 | - true |
|
41 | - ); |
|
30 | + aui()->input( |
|
31 | + array( |
|
32 | + 'type' => 'checkbox', |
|
33 | + 'name' => 'getpaid-payment-form-selected-item', |
|
34 | + 'id' => 'getpaid-payment-form-selected-item' . uniqid( '_' ) . $item_id, |
|
35 | + 'label' => $item_name, |
|
36 | + 'value' => $item_id, |
|
37 | + 'no_wrap' => true, |
|
38 | + 'checked' => '1' == $is_checked, |
|
39 | + ), |
|
40 | + true |
|
41 | + ); |
|
42 | 42 | |
43 | 43 | } |
44 | 44 | |
45 | -echo '</div>'; |
|
45 | + echo '</div>'; |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays the billing address. |
4 | 4 | * |
@@ -7,15 +7,15 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | + defined( 'ABSPATH' ) || exit; |
|
11 | 11 | |
12 | -$invoice = new WPInv_Invoice( $invoice ); |
|
13 | -$address_row = wpinv_get_invoice_address_markup( $invoice->get_user_info() ); |
|
14 | -$phone = $invoice->get_phone(); |
|
15 | -$email = $invoice->get_email(); |
|
16 | -$vat_number = $invoice->get_vat_number(); |
|
17 | -$company_id = $invoice->get_company_id(); |
|
18 | -?> |
|
12 | + $invoice = new WPInv_Invoice( $invoice ); |
|
13 | + $address_row = wpinv_get_invoice_address_markup( $invoice->get_user_info() ); |
|
14 | + $phone = $invoice->get_phone(); |
|
15 | + $email = $invoice->get_email(); |
|
16 | + $vat_number = $invoice->get_vat_number(); |
|
17 | + $company_id = $invoice->get_company_id(); |
|
18 | + ?> |
|
19 | 19 | <div class="getpaid-billing-address form-group mb-3 text-break"> |
20 | 20 | |
21 | 21 | <div class="row"> |
@@ -29,39 +29,39 @@ discard block |
||
29 | 29 | <div class="invoice-billing-address-value col-10"> |
30 | 30 | |
31 | 31 | <?php do_action( 'getpaid_billing_address_top' ); ?> |
32 | - |
|
32 | + |
|
33 | 33 | <?php if ( ! empty( $address_row ) ) : ?> |
34 | - <div class="billing-address"> |
|
34 | + <div class="billing-address"> |
|
35 | 35 | <?php echo wp_kses_post( $address_row ); ?> |
36 | - </div> |
|
36 | + </div> |
|
37 | 37 | <?php endif; ?> |
38 | - |
|
38 | + |
|
39 | 39 | |
40 | 40 | <?php if ( ! empty( $phone ) ) : ?> |
41 | - <div class="billing-phone"> |
|
41 | + <div class="billing-phone"> |
|
42 | 42 | <?php echo wp_sprintf( esc_html__( 'Phone: %s', 'invoicing' ), esc_html( $phone ) ); ?> |
43 | - </div> |
|
43 | + </div> |
|
44 | 44 | <?php endif; ?> |
45 | - |
|
45 | + |
|
46 | 46 | |
47 | 47 | <?php if ( ! empty( $email ) ) : ?> |
48 | - <div class="billing-email"> |
|
48 | + <div class="billing-email"> |
|
49 | 49 | <?php echo wp_sprintf( esc_html__( 'Email: %s', 'invoicing' ), esc_html( $email ) ); ?> |
50 | - </div> |
|
50 | + </div> |
|
51 | 51 | <?php endif; ?> |
52 | - |
|
52 | + |
|
53 | 53 | <?php if ( ! empty( $vat_number ) && wpinv_use_taxes() ) : ?> |
54 | - <div class="vat-number"> |
|
54 | + <div class="vat-number"> |
|
55 | 55 | <?php echo wp_sprintf( esc_html__( 'Vat Number: %s', 'invoicing' ), esc_html( $vat_number ) ); ?> |
56 | - </div> |
|
56 | + </div> |
|
57 | 57 | <?php endif; ?> |
58 | - |
|
58 | + |
|
59 | 59 | <?php if ( ! empty( $company_id ) ) : ?> |
60 | - <div class="company-id"> |
|
60 | + <div class="company-id"> |
|
61 | 61 | <?php echo wp_sprintf( esc_html__( 'Company ID: %s', 'invoicing' ), esc_html( $company_id ) ); ?> |
62 | - </div> |
|
62 | + </div> |
|
63 | 63 | <?php endif; ?> |
64 | - |
|
64 | + |
|
65 | 65 | <?php do_action( 'getpaid_billing_address_bottom' ); ?> |
66 | 66 | |
67 | 67 | </div> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays a file_upload input in a payment form |
4 | 4 | * |
@@ -7,36 +7,36 @@ discard block |
||
7 | 7 | * @version 2.8.9 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | + defined( 'ABSPATH' ) || exit; |
|
11 | 11 | |
12 | -$label = empty( $label ) ? '' : wp_kses_post( $label ); |
|
13 | -$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) ); |
|
14 | -$id = esc_attr( $id ); |
|
15 | -$_id = $id . uniqid( '_' ); |
|
16 | -$max_file_num = empty( $max_file_num ) ? 1 : absint( $max_file_num ); |
|
17 | -$file_types = empty( $file_types ) ? array( 'jpg|jpeg|jpe', 'gif', 'png' ) : $file_types; |
|
18 | -$all_types = getpaid_get_allowed_mime_types(); |
|
19 | -$types = array(); |
|
20 | -$_types = array(); |
|
12 | + $label = empty( $label ) ? '' : wp_kses_post( $label ); |
|
13 | + $label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) ); |
|
14 | + $id = esc_attr( $id ); |
|
15 | + $_id = $id . uniqid( '_' ); |
|
16 | + $max_file_num = empty( $max_file_num ) ? 1 : absint( $max_file_num ); |
|
17 | + $file_types = empty( $file_types ) ? array( 'jpg|jpeg|jpe', 'gif', 'png' ) : $file_types; |
|
18 | + $all_types = getpaid_get_allowed_mime_types(); |
|
19 | + $types = array(); |
|
20 | + $_types = array(); |
|
21 | 21 | |
22 | -foreach ( $file_types as $file_type ) { |
|
22 | + foreach ( $file_types as $file_type ) { |
|
23 | 23 | |
24 | - if ( isset( $all_types[ $file_type ] ) ) { |
|
25 | - $types[] = $all_types[ $file_type ]; |
|
26 | - $file_type = explode( '|', $file_type ); |
|
24 | + if ( isset( $all_types[ $file_type ] ) ) { |
|
25 | + $types[] = $all_types[ $file_type ]; |
|
26 | + $file_type = explode( '|', $file_type ); |
|
27 | 27 | |
28 | - foreach ( $file_type as $type ) { |
|
29 | - $type = trim( $type ); |
|
30 | - $types[] = ".$type"; |
|
31 | - $_types[] = $type; |
|
32 | - } |
|
28 | + foreach ( $file_type as $type ) { |
|
29 | + $type = trim( $type ); |
|
30 | + $types[] = ".$type"; |
|
31 | + $_types[] = $type; |
|
32 | + } |
|
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
36 | -if ( ! empty( $required ) ) { |
|
37 | - $label .= "<span class='text-danger'> *</span>"; |
|
36 | + if ( ! empty( $required ) ) { |
|
37 | + $label .= "<span class='text-danger'> *</span>"; |
|
38 | 38 | } |
39 | -?> |
|
39 | + ?> |
|
40 | 40 | <label><span v-html="form_element.label"></span></label> |
41 | 41 | <div class="form-group mb-3 <?php echo esc_attr( $label_class ); ?>" data-name="<?php echo esc_attr( $id ); ?>" data-max="<?php echo esc_attr( $max_file_num ); ?>"> |
42 | 42 | <label for="<?php echo esc_attr( $id ); ?>"><?php echo wp_kses_post( $label ); ?></label> |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | <label for="<?php echo esc_attr( $id ); ?>" class="getpaid-file-upload-element d-flex w-100 flex-column align-items-center justify-content-center p-2 mb-2"> |
45 | 45 | <div class="h5 text-dark"> |
46 | 46 | <?php echo esc_html( ( $max_file_num > 1 ? __( 'Drag files to this area or click to upload', 'invoicing' ) : __( 'Drag your file to this area or click to upload', 'invoicing' ) ) ); ?> |
47 | - </div> |
|
47 | + </div> |
|
48 | 48 | <?php if ( ! empty( $description ) ) : ?> |
49 | - <small class="form-text text-muted"><?php echo wp_kses_post( $description ); ?></small> |
|
49 | + <small class="form-text text-muted"><?php echo wp_kses_post( $description ); ?></small> |
|
50 | 50 | <?php endif; ?> |
51 | 51 | </label> |
52 | 52 | <div class="getpaid-uploaded-files"></div> |