@@ -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 | echo aui()->input( |
20 | 20 | array( |
21 | - 'name' => esc_attr( $id ), |
|
22 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
23 | - 'placeholder'=> empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
24 | - 'required' => ! empty( $required ), |
|
21 | + 'name' => esc_attr($id), |
|
22 | + 'id' => esc_attr($id) . uniqid('_'), |
|
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 | ) |
@@ -7,23 +7,23 @@ |
||
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 ) ); |
|
14 | -if ( ! empty( $required ) ) { |
|
12 | +$label = empty($label) ? '' : wp_kses_post($label); |
|
13 | +$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label)); |
|
14 | +if (!empty($required)) { |
|
15 | 15 | $label .= "<span class='text-danger'> *</span>"; |
16 | 16 | } |
17 | 17 | |
18 | 18 | echo aui()->input( |
19 | 19 | array( |
20 | - 'name' => esc_attr( $id ), |
|
21 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
22 | - 'placeholder'=> empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
23 | - 'required' => ! empty( $required ), |
|
20 | + 'name' => esc_attr($id), |
|
21 | + 'id' => esc_attr($id) . uniqid('_'), |
|
22 | + 'placeholder'=> empty($placeholder) ? '' : esc_attr($placeholder), |
|
23 | + 'required' => !empty($required), |
|
24 | 24 | 'label' => $label, |
25 | 25 | 'label_type' => 'vertical', |
26 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
26 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
27 | 27 | 'type' => 'datepicker', |
28 | 28 | 'class' => $label_class, |
29 | 29 | ) |
@@ -7,27 +7,27 @@ |
||
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 | -$current_url = ! empty( $_GET['current_url'] ) ? esc_url_raw( urldecode( $_GET['current_url'] ) ) : get_permalink(); |
|
19 | +$current_url = !empty($_GET['current_url']) ? esc_url_raw(urldecode($_GET['current_url'])) : get_permalink(); |
|
20 | 20 | echo aui()->input( |
21 | 21 | array( |
22 | - 'name' => esc_attr( $id ), |
|
23 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
24 | - 'placeholder'=> empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
25 | - 'required' => ! empty( $required ), |
|
22 | + 'name' => esc_attr($id), |
|
23 | + 'id' => esc_attr($id) . uniqid('_'), |
|
24 | + 'placeholder'=> empty($placeholder) ? '' : esc_attr($placeholder), |
|
25 | + 'required' => !empty($required), |
|
26 | 26 | 'label' => $label, |
27 | 27 | 'label_type' => 'vertical', |
28 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
28 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
29 | 29 | 'type' => 'url', |
30 | - 'value' => ! empty( $default_current_post ) ? $current_url : '', |
|
30 | + 'value' => !empty($default_current_post) ? $current_url : '', |
|
31 | 31 | 'class' => $label_class, |
32 | 32 | ) |
33 | 33 | ); |
@@ -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 ) ? '' : sanitize_text_field( $label ); |
|
23 | -$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) ); |
|
22 | +$label = empty($label) ? '' : sanitize_text_field($label); |
|
23 | +$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label)); |
|
24 | 24 | |
25 | 25 | echo aui()->input( |
26 | 26 | array( |
27 | - 'name' => esc_attr( $id ), |
|
28 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
29 | - 'placeholder' => empty( $placeholder ) ? wpinv_format_amount(0) : wpinv_format_amount( $placeholder ), |
|
30 | - 'value' => empty( $value ) ? wpinv_format_amount(0) : wpinv_format_amount( $value ), |
|
31 | - 'label' => empty( $label ) ? '' : wp_kses_post( $label ), |
|
27 | + 'name' => esc_attr($id), |
|
28 | + 'id' => esc_attr($id) . uniqid('_'), |
|
29 | + 'placeholder' => empty($placeholder) ? wpinv_format_amount(0) : wpinv_format_amount($placeholder), |
|
30 | + 'value' => empty($value) ? wpinv_format_amount(0) : 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 | ); |
@@ -7,26 +7,26 @@ |
||
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 | echo aui()->radio( |
20 | 20 | array( |
21 | - 'name' => esc_attr( $id ), |
|
22 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
23 | - 'required' => ! empty( $required ), |
|
21 | + 'name' => esc_attr($id), |
|
22 | + 'id' => esc_attr($id) . uniqid('_'), |
|
23 | + 'required' => !empty($required), |
|
24 | 24 | 'label' => $label, |
25 | 25 | 'label_type' => 'vertical', |
26 | 26 | 'class' => 'w-auto', |
27 | 27 | 'inline' => false, |
28 | - 'options' => empty( $options ) ? array() : array_combine( $options, $options ), |
|
29 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
28 | + 'options' => empty($options) ? array() : array_combine($options, $options), |
|
29 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
30 | 30 | 'class' => $label_class, |
31 | 31 | ) |
32 | 32 | ); |
@@ -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 | echo aui()->input( |
20 | 20 | array( |
21 | - 'name' => esc_attr( $id ), |
|
22 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
23 | - 'placeholder'=> empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
24 | - 'required' => ! empty( $required ), |
|
21 | + 'name' => esc_attr($id), |
|
22 | + 'id' => esc_attr($id) . uniqid('_'), |
|
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 | ) |
@@ -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 | echo aui()->input( |
20 | 20 | array( |
21 | - 'name' => esc_attr( $id ), |
|
22 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
23 | - 'placeholder'=> empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
24 | - 'required' => ! empty( $required ), |
|
21 | + 'name' => esc_attr($id), |
|
22 | + 'id' => esc_attr($id) . uniqid('_'), |
|
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' => 'number', |
29 | 29 | 'class' => $label_class, |
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 | echo aui()->select( |
20 | 20 | array( |
21 | - 'name' => esc_attr( $id ), |
|
22 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
23 | - 'placeholder'=> empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
24 | - 'required' => ! empty( $required ), |
|
21 | + 'name' => esc_attr($id), |
|
22 | + 'id' => esc_attr($id) . uniqid('_'), |
|
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 | ) |
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 | echo aui()->input( |
20 | 20 | array( |
21 | 21 | 'type' => 'checkbox', |
22 | - 'name' => esc_attr( $id ), |
|
23 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
24 | - 'required' => ! empty( $required ), |
|
22 | + 'name' => esc_attr($id), |
|
23 | + 'id' => esc_attr($id) . uniqid('_'), |
|
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 | ); |