@@ -7,20 +7,20 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | -$class = empty( $class ) ? 'btn-primary' : sanitize_html_class( $class ); |
|
13 | -$label = empty( $label ) ? esc_attr__( 'Pay %price% »', 'invoicing' ) : esc_attr( $label ); |
|
14 | -$free = empty( $free ) ? esc_attr__( 'Continue »', 'invoicing' ) : esc_attr( $free ); |
|
12 | +$class = empty($class) ? 'btn-primary' : sanitize_html_class($class); |
|
13 | +$label = empty($label) ? esc_attr__('Pay %price% »', 'invoicing') : esc_attr($label); |
|
14 | +$free = empty($free) ? esc_attr__('Continue »', 'invoicing') : esc_attr($free); |
|
15 | 15 | |
16 | -do_action( 'getpaid_before_payment_form_pay_button', $form ); |
|
16 | +do_action('getpaid_before_payment_form_pay_button', $form); |
|
17 | 17 | |
18 | 18 | aui()->input( |
19 | 19 | array( |
20 | - 'name' => esc_attr( $id ), |
|
21 | - 'id' => esc_attr( $element_id ), |
|
20 | + 'name' => esc_attr($id), |
|
21 | + 'id' => esc_attr($element_id), |
|
22 | 22 | 'value' => $label, |
23 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
23 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
24 | 24 | 'type' => 'submit', |
25 | 25 | 'class' => 'getpaid-payment-form-submit btn btn-block submit-button ' . $class, |
26 | 26 | 'extra_attributes' => array( |
@@ -31,4 +31,4 @@ discard block |
||
31 | 31 | true |
32 | 32 | ); |
33 | 33 | |
34 | -do_action( 'getpaid_after_payment_form_pay_button', $form ); |
|
34 | +do_action('getpaid_after_payment_form_pay_button', $form); |
@@ -7,24 +7,24 @@ |
||
7 | 7 | * @version 1.0.19 |
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 ) ); |
|
12 | +$label = empty($label) ? '' : wp_kses_post($label); |
|
13 | +$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label)); |
|
14 | 14 | |
15 | -if ( ! empty( $required ) ) { |
|
15 | +if (!empty($required)) { |
|
16 | 16 | $label .= "<span class='text-danger'> *</span>"; |
17 | 17 | } |
18 | 18 | |
19 | 19 | aui()->input( |
20 | 20 | array( |
21 | 21 | 'type' => 'checkbox', |
22 | - 'name' => esc_attr( $id ), |
|
23 | - 'id' => esc_attr( $element_id ), |
|
24 | - 'required' => ! empty( $required ), |
|
22 | + 'name' => esc_attr($id), |
|
23 | + 'id' => esc_attr($element_id), |
|
24 | + 'required' => !empty($required), |
|
25 | 25 | 'label' => $label, |
26 | - 'value' => esc_attr__( 'Yes', 'invoicing' ), |
|
27 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
26 | + 'value' => esc_attr__('Yes', 'invoicing'), |
|
27 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
28 | 28 | 'class' => 'w-auto ' . $label_class, |
29 | 29 | ), |
30 | 30 | true |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | // And the optional invoice id. |
59 | 59 | if ( ! empty( $form->invoice ) ) { |
60 | - getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() ); |
|
60 | + getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() ); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | // We also want to include the form id. |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | foreach ( $form->get_elements() as $element ) { |
79 | 79 | |
80 | - if ( isset( $element['type'] ) ) { |
|
80 | + if ( isset( $element['type'] ) ) { |
|
81 | 81 | $grid_class = getpaid_get_form_element_grid_class( $element ); |
82 | 82 | echo "<div class='" . esc_attr( $grid_class ) . "'>"; |
83 | 83 | do_action( 'getpaid_payment_form_element', $element, $form ); |
@@ -7,17 +7,17 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Standardize IDs. |
13 | 13 | global $rendered_getpaid_forms; |
14 | 14 | |
15 | 15 | // Make sure that the form is active. |
16 | -if ( ! $form->is_active() ) { |
|
16 | +if (!$form->is_active()) { |
|
17 | 17 | aui()->alert( |
18 | 18 | array( |
19 | 19 | 'type' => 'warning', |
20 | - 'content' => __( 'This payment form is no longer active', 'invoicing' ), |
|
20 | + 'content' => __('This payment form is no longer active', 'invoicing'), |
|
21 | 21 | ), |
22 | 22 | true |
23 | 23 | ); |
@@ -25,12 +25,12 @@ discard block |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | // Require login to checkout. |
28 | -if ( wpinv_require_login_to_checkout() && ! get_current_user_id() ) { |
|
28 | +if (wpinv_require_login_to_checkout() && !get_current_user_id()) { |
|
29 | 29 | |
30 | 30 | aui()->alert( |
31 | 31 | array( |
32 | 32 | 'type' => 'danger', |
33 | - 'content' => __( 'You must be logged in to checkout.', 'invoicing' ), |
|
33 | + 'content' => __('You must be logged in to checkout.', 'invoicing'), |
|
34 | 34 | ), |
35 | 35 | true |
36 | 36 | ); |
@@ -38,36 +38,36 @@ discard block |
||
38 | 38 | |
39 | 39 | } |
40 | 40 | |
41 | -if ( ! is_array( $rendered_getpaid_forms ) ) { |
|
41 | +if (!is_array($rendered_getpaid_forms)) { |
|
42 | 42 | $rendered_getpaid_forms = array(); |
43 | 43 | } |
44 | 44 | |
45 | -$rendered_getpaid_forms[ $form->get_id() ] = isset( $rendered_getpaid_forms[ $form->get_id() ] ) ? $rendered_getpaid_forms[ $form->get_id() ] + 1 : 0; |
|
45 | +$rendered_getpaid_forms[$form->get_id()] = isset($rendered_getpaid_forms[$form->get_id()]) ? $rendered_getpaid_forms[$form->get_id()] + 1 : 0; |
|
46 | 46 | |
47 | 47 | // Fires before displaying a payment form. |
48 | -do_action( 'getpaid_before_payment_form', $form ); |
|
48 | +do_action('getpaid_before_payment_form', $form); |
|
49 | 49 | ?> |
50 | 50 | |
51 | -<form class='getpaid-payment-form getpaid-payment-form-<?php echo absint( $form->get_id() ); ?> bsui position-relative' method='POST' data-key='<?php echo esc_attr( uniqid( 'gpf' ) ); ?>' data-currency='<?php echo esc_attr( empty( $form->invoice ) ? wpinv_get_currency() : $form->invoice->get_currency() ); ?>' novalidate> |
|
51 | +<form class='getpaid-payment-form getpaid-payment-form-<?php echo absint($form->get_id()); ?> bsui position-relative' method='POST' data-key='<?php echo esc_attr(uniqid('gpf')); ?>' data-currency='<?php echo esc_attr(empty($form->invoice) ? wpinv_get_currency() : $form->invoice->get_currency()); ?>' novalidate> |
|
52 | 52 | |
53 | 53 | <?php |
54 | 54 | |
55 | 55 | // Fires when printing the top of a payment form. |
56 | - do_action( 'getpaid_payment_form_top', $form ); |
|
56 | + do_action('getpaid_payment_form_top', $form); |
|
57 | 57 | |
58 | 58 | // And the optional invoice id. |
59 | - if ( ! empty( $form->invoice ) ) { |
|
60 | - getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() ); |
|
59 | + if (!empty($form->invoice)) { |
|
60 | + getpaid_hidden_field('invoice_id', $form->invoice->get_id()); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | // We also want to include the form id. |
64 | - getpaid_hidden_field( 'form_id', $form->get_id() ); |
|
64 | + getpaid_hidden_field('form_id', $form->get_id()); |
|
65 | 65 | |
66 | 66 | // And an indication that this is a payment form submission. |
67 | - getpaid_hidden_field( 'getpaid_payment_form_submission', '1' ); |
|
67 | + getpaid_hidden_field('getpaid_payment_form_submission', '1'); |
|
68 | 68 | |
69 | 69 | // Fires before displaying payment form elements. |
70 | - do_action( 'getpaid_payment_form_before_elements', $form ); |
|
70 | + do_action('getpaid_payment_form_before_elements', $form); |
|
71 | 71 | |
72 | 72 | // Display the elements. |
73 | 73 | ?> |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | <div class="row"> |
76 | 76 | <?php |
77 | 77 | |
78 | - foreach ( $form->get_elements() as $element ) { |
|
78 | + foreach ($form->get_elements() as $element) { |
|
79 | 79 | |
80 | - if ( isset( $element['type'] ) ) { |
|
81 | - $grid_class = getpaid_get_form_element_grid_class( $element ); |
|
82 | - echo "<div class='" . esc_attr( $grid_class ) . "'>"; |
|
83 | - do_action( 'getpaid_payment_form_element', $element, $form ); |
|
84 | - do_action( "getpaid_payment_form_element_{$element['type']}_template", $element, $form ); |
|
80 | + if (isset($element['type'])) { |
|
81 | + $grid_class = getpaid_get_form_element_grid_class($element); |
|
82 | + echo "<div class='" . esc_attr($grid_class) . "'>"; |
|
83 | + do_action('getpaid_payment_form_element', $element, $form); |
|
84 | + do_action("getpaid_payment_form_element_{$element['type']}_template", $element, $form); |
|
85 | 85 | echo '</div>'; |
86 | 86 | } |
87 | 87 | } |
@@ -92,28 +92,28 @@ discard block |
||
92 | 92 | |
93 | 93 | <?php |
94 | 94 | // Fires after displaying payment form elements. |
95 | - do_action( 'getpaid_payment_form_after_elements', $form ); |
|
95 | + do_action('getpaid_payment_form_after_elements', $form); |
|
96 | 96 | |
97 | 97 | echo "<div class='getpaid-payment-form-errors alert alert-danger d-none'></div>"; |
98 | 98 | |
99 | - if ( wpinv_current_user_can_manage_invoicing() ) { |
|
99 | + if (wpinv_current_user_can_manage_invoicing()) { |
|
100 | 100 | |
101 | 101 | edit_post_link( |
102 | - __( 'Edit this form.', 'invoicing' ), |
|
102 | + __('Edit this form.', 'invoicing'), |
|
103 | 103 | '<small class="form-text text-muted">', |
104 | - ' ' . __( 'This is only visible to website administators.', 'invoicing' ) . '</small>', |
|
104 | + ' ' . __('This is only visible to website administators.', 'invoicing') . '</small>', |
|
105 | 105 | $form->get_id(), |
106 | 106 | 'text-danger' |
107 | 107 | ); |
108 | 108 | |
109 | 109 | } |
110 | 110 | |
111 | - echo wp_kses( $extra_markup, getpaid_allowed_html() ); |
|
111 | + echo wp_kses($extra_markup, getpaid_allowed_html()); |
|
112 | 112 | ?> |
113 | 113 | |
114 | 114 | <div class="loading_div overlay overlay-black position-absolute row m-0 rounded overflow-hidden" style="height: 100%;width: 100%;top: 0px;z-index: 2;display:none;"> |
115 | 115 | <div class="spinner-border mx-auto align-self-center text-white" role="status"> |
116 | - <span class="sr-only"><?php esc_html_e( 'Loading...', 'invoicing' ); ?></span> |
|
116 | + <span class="sr-only"><?php esc_html_e('Loading...', 'invoicing'); ?></span> |
|
117 | 117 | </div> |
118 | 118 | </div> |
119 | 119 | |
@@ -122,4 +122,4 @@ discard block |
||
122 | 122 | <?php |
123 | 123 | |
124 | 124 | // Fires after displaying a payment form. |
125 | -do_action( 'getpaid_after_payment_form', $form ); |
|
125 | +do_action('getpaid_after_payment_form', $form); |
@@ -13,25 +13,25 @@ |
||
13 | 13 | */ |
14 | 14 | class GetPaid_Meta_Box_Description { |
15 | 15 | |
16 | - /** |
|
17 | - * Output the metabox. |
|
18 | - * |
|
19 | - * @param WP_Post $post Post object. |
|
20 | - */ |
|
21 | - public static function output( $post ) { |
|
16 | + /** |
|
17 | + * Output the metabox. |
|
18 | + * |
|
19 | + * @param WP_Post $post Post object. |
|
20 | + */ |
|
21 | + public static function output( $post ) { |
|
22 | 22 | |
23 | - $settings = array( |
|
24 | - 'textarea_name' => 'excerpt', |
|
25 | - 'quicktags' => array( 'buttons' => 'em,strong,link' ), |
|
26 | - 'teeny' => true, |
|
27 | - 'media_buttons' => false, |
|
28 | - 'tinymce' => array( |
|
29 | - 'theme_advanced_buttons1' => 'bold,italic,strikethrough,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,separator,undo,redo,separator', |
|
30 | - 'theme_advanced_buttons2' => '', |
|
31 | - ), |
|
32 | - 'editor_css' => '<style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style>', |
|
33 | - ); |
|
23 | + $settings = array( |
|
24 | + 'textarea_name' => 'excerpt', |
|
25 | + 'quicktags' => array( 'buttons' => 'em,strong,link' ), |
|
26 | + 'teeny' => true, |
|
27 | + 'media_buttons' => false, |
|
28 | + 'tinymce' => array( |
|
29 | + 'theme_advanced_buttons1' => 'bold,italic,strikethrough,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,separator,undo,redo,separator', |
|
30 | + 'theme_advanced_buttons2' => '', |
|
31 | + ), |
|
32 | + 'editor_css' => '<style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style>', |
|
33 | + ); |
|
34 | 34 | |
35 | - wp_editor( htmlspecialchars_decode( $post->post_excerpt, ENT_QUOTES ), 'excerpt', apply_filters( 'getpaid_description_editor_settings', $settings ) ); |
|
36 | - } |
|
35 | + wp_editor( htmlspecialchars_decode( $post->post_excerpt, ENT_QUOTES ), 'excerpt', apply_filters( 'getpaid_description_editor_settings', $settings ) ); |
|
36 | + } |
|
37 | 37 | } |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * |
7 | 7 | */ |
8 | 8 | |
9 | -defined( 'ABSPATH' ) || exit; |
|
9 | +defined('ABSPATH') || exit; |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * GetPaid_Meta_Box_Description Class. |
@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | * |
19 | 19 | * @param WP_Post $post Post object. |
20 | 20 | */ |
21 | - public static function output( $post ) { |
|
21 | + public static function output($post) { |
|
22 | 22 | |
23 | 23 | $settings = array( |
24 | 24 | 'textarea_name' => 'excerpt', |
25 | - 'quicktags' => array( 'buttons' => 'em,strong,link' ), |
|
25 | + 'quicktags' => array('buttons' => 'em,strong,link'), |
|
26 | 26 | 'teeny' => true, |
27 | 27 | 'media_buttons' => false, |
28 | 28 | 'tinymce' => array( |
@@ -32,6 +32,6 @@ discard block |
||
32 | 32 | 'editor_css' => '<style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style>', |
33 | 33 | ); |
34 | 34 | |
35 | - wp_editor( htmlspecialchars_decode( $post->post_excerpt, ENT_QUOTES ), 'excerpt', apply_filters( 'getpaid_description_editor_settings', $settings ) ); |
|
35 | + wp_editor(htmlspecialchars_decode($post->post_excerpt, ENT_QUOTES), 'excerpt', apply_filters('getpaid_description_editor_settings', $settings)); |
|
36 | 36 | } |
37 | 37 | } |
@@ -7,24 +7,24 @@ |
||
7 | 7 | * @version 1.0.19 |
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 ) ); |
|
12 | +$label = empty($label) ? '' : wp_kses_post($label); |
|
13 | +$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label)); |
|
14 | 14 | |
15 | -if ( ! empty( $required ) ) { |
|
15 | +if (!empty($required)) { |
|
16 | 16 | $label .= "<span class='text-danger'> *</span>"; |
17 | 17 | } |
18 | 18 | |
19 | 19 | aui()->input( |
20 | 20 | array( |
21 | - 'name' => esc_attr( $id ), |
|
22 | - 'id' => esc_attr( $element_id ), |
|
23 | - 'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
24 | - 'required' => ! empty( $required ), |
|
21 | + 'name' => esc_attr($id), |
|
22 | + 'id' => esc_attr($element_id), |
|
23 | + 'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder), |
|
24 | + 'required' => !empty($required), |
|
25 | 25 | 'label' => $label, |
26 | 26 | 'label_type' => 'vertical', |
27 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
27 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
28 | 28 | 'type' => 'time', |
29 | 29 | 'class' => $label_class, |
30 | 30 | 'value' => $query_value, |
@@ -7,24 +7,24 @@ |
||
7 | 7 | * @version 1.0.19 |
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 ) ); |
|
12 | +$label = empty($label) ? '' : wp_kses_post($label); |
|
13 | +$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label)); |
|
14 | 14 | |
15 | -if ( ! empty( $required ) ) { |
|
15 | +if (!empty($required)) { |
|
16 | 16 | $label .= "<span class='text-danger'> *</span>"; |
17 | 17 | } |
18 | 18 | |
19 | 19 | aui()->textarea( |
20 | 20 | array( |
21 | - 'name' => esc_attr( $id ), |
|
22 | - 'id' => esc_attr( $element_id ), |
|
23 | - 'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
24 | - 'required' => ! empty( $required ), |
|
21 | + 'name' => esc_attr($id), |
|
22 | + 'id' => esc_attr($element_id), |
|
23 | + 'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder), |
|
24 | + 'required' => !empty($required), |
|
25 | 25 | 'label' => $label, |
26 | 26 | 'label_type' => 'vertical', |
27 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
27 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
28 | 28 | 'class' => $label_class, |
29 | 29 | 'value' => $query_value, |
30 | 30 | ), |
@@ -7,25 +7,25 @@ |
||
7 | 7 | * @version 1.0.19 |
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 ) ); |
|
12 | +$label = empty($label) ? '' : wp_kses_post($label); |
|
13 | +$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label)); |
|
14 | 14 | |
15 | -if ( ! empty( $required ) ) { |
|
15 | +if (!empty($required)) { |
|
16 | 16 | $label .= "<span class='text-danger'> *</span>"; |
17 | 17 | } |
18 | 18 | |
19 | 19 | aui()->select( |
20 | 20 | array( |
21 | - 'name' => esc_attr( $id ), |
|
22 | - 'id' => esc_attr( $element_id ), |
|
23 | - 'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
24 | - 'required' => ! empty( $required ), |
|
21 | + 'name' => esc_attr($id), |
|
22 | + 'id' => esc_attr($element_id), |
|
23 | + 'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder), |
|
24 | + 'required' => !empty($required), |
|
25 | 25 | 'label' => $label, |
26 | 26 | 'label_type' => 'vertical', |
27 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
28 | - 'options' => empty( $options ) ? array() : array_combine( $options, $options ), |
|
27 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
28 | + 'options' => empty($options) ? array() : array_combine($options, $options), |
|
29 | 29 | 'class' => $label_class, |
30 | 30 | 'value' => $query_value, |
31 | 31 | ), |
@@ -7,24 +7,24 @@ |
||
7 | 7 | * @version 1.0.19 |
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 ) ); |
|
12 | +$label = empty($label) ? '' : wp_kses_post($label); |
|
13 | +$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label)); |
|
14 | 14 | |
15 | -if ( ! empty( $required ) ) { |
|
15 | +if (!empty($required)) { |
|
16 | 16 | $label .= "<span class='text-danger'> *</span>"; |
17 | 17 | } |
18 | 18 | |
19 | 19 | aui()->input( |
20 | 20 | array( |
21 | - 'name' => esc_attr( $id ), |
|
22 | - 'id' => esc_attr( $element_id ), |
|
23 | - 'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
24 | - 'required' => ! empty( $required ), |
|
21 | + 'name' => esc_attr($id), |
|
22 | + 'id' => esc_attr($element_id), |
|
23 | + 'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder), |
|
24 | + 'required' => !empty($required), |
|
25 | 25 | 'label' => $label, |
26 | 26 | 'label_type' => 'vertical', |
27 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
27 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
28 | 28 | 'type' => 'email', |
29 | 29 | 'class' => $label_class, |
30 | 30 | 'value' => $query_value, |
@@ -7,32 +7,32 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Set the currency position. |
13 | 13 | $position = wpinv_currency_position(); |
14 | 14 | |
15 | -if ( $position == 'left_space' ) { |
|
15 | +if ($position == 'left_space') { |
|
16 | 16 | $position = 'left'; |
17 | 17 | } |
18 | 18 | |
19 | -if ( $position == 'right_space' ) { |
|
19 | +if ($position == 'right_space') { |
|
20 | 20 | $position = 'right'; |
21 | 21 | } |
22 | -$label = empty( $label ) ? '' : esc_html( $label ); |
|
23 | -$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) ); |
|
22 | +$label = empty($label) ? '' : esc_html($label); |
|
23 | +$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label)); |
|
24 | 24 | |
25 | 25 | aui()->input( |
26 | 26 | array( |
27 | - 'name' => esc_attr( $id ), |
|
28 | - 'id' => esc_attr( $element_id ), |
|
29 | - 'placeholder' => empty( $placeholder ) ? wpinv_format_amount( 0 ) : wpinv_format_amount( $placeholder ), |
|
30 | - 'value' => empty( $value ) ? wpinv_format_amount( $query_value ) : wpinv_format_amount( $value ), |
|
31 | - 'label' => empty( $label ) ? '' : wp_kses_post( $label ), |
|
27 | + 'name' => esc_attr($id), |
|
28 | + 'id' => esc_attr($element_id), |
|
29 | + 'placeholder' => empty($placeholder) ? wpinv_format_amount(0) : wpinv_format_amount($placeholder), |
|
30 | + 'value' => empty($value) ? wpinv_format_amount($query_value) : wpinv_format_amount($value), |
|
31 | + 'label' => empty($label) ? '' : wp_kses_post($label), |
|
32 | 32 | 'label_type' => 'vertical', |
33 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
34 | - 'input_group_right' => $position == 'right' ? wpinv_currency_symbol( $form->get_currency() ) : '', |
|
35 | - 'input_group_left' => $position == 'left' ? wpinv_currency_symbol( $form->get_currency() ) : '', |
|
33 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
34 | + 'input_group_right' => $position == 'right' ? wpinv_currency_symbol($form->get_currency()) : '', |
|
35 | + 'input_group_left' => $position == 'left' ? wpinv_currency_symbol($form->get_currency()) : '', |
|
36 | 36 | 'class' => 'getpaid-refresh-on-change ' . $label_class, |
37 | 37 | ), |
38 | 38 | true |