@@ -7,50 +7,50 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | -$class = ! is_singular( 'page' ) ? 'px-1' : ''; |
|
12 | +$class = !is_singular('page') ? 'px-1' : ''; |
|
13 | 13 | ?> |
14 | 14 | |
15 | - <?php do_action( 'getpaid_before_invoice_meta', $invoice ); ?> |
|
15 | + <?php do_action('getpaid_before_invoice_meta', $invoice); ?> |
|
16 | 16 | <div class="getpaid-invoice-meta-data"> |
17 | 17 | |
18 | - <?php do_action( 'getpaid_before_invoice_meta_table', $invoice ); ?> |
|
18 | + <?php do_action('getpaid_before_invoice_meta_table', $invoice); ?> |
|
19 | 19 | <table class="table table-bordered"> |
20 | 20 | <tbody> |
21 | 21 | |
22 | - <?php do_action( 'getpaid_before_invoice_meta_rows', $invoice ); ?> |
|
23 | - <?php foreach ( $meta as $key => $data ) : ?> |
|
22 | + <?php do_action('getpaid_before_invoice_meta_rows', $invoice); ?> |
|
23 | + <?php foreach ($meta as $key => $data) : ?> |
|
24 | 24 | |
25 | - <?php if ( ! empty( $data['value'] ) ) : ?> |
|
25 | + <?php if (!empty($data['value'])) : ?> |
|
26 | 26 | |
27 | - <?php do_action( "getpaid_before_invoice_meta_$key", $invoice, $data ); ?> |
|
27 | + <?php do_action("getpaid_before_invoice_meta_$key", $invoice, $data); ?> |
|
28 | 28 | |
29 | - <tr class="getpaid-invoice-meta-<?php echo esc_attr( $key ); ?>"> |
|
29 | + <tr class="getpaid-invoice-meta-<?php echo esc_attr($key); ?>"> |
|
30 | 30 | |
31 | - <th class="<?php echo esc_attr( $class ); ?> font-weight-bold" style="width: 40%"> |
|
32 | - <?php echo esc_html( $data['label'] ); ?> |
|
31 | + <th class="<?php echo esc_attr($class); ?> font-weight-bold" style="width: 40%"> |
|
32 | + <?php echo esc_html($data['label']); ?> |
|
33 | 33 | </th> |
34 | 34 | |
35 | - <td class="<?php echo esc_attr( $class ); ?> <?php echo 'invoice_total' === $key ? 'font-weight-bold' : 'font-weight-normal'; ?> text-break" style="width: 60%"> |
|
36 | - <span class="getpaid-invoice-meta-<?php echo esc_attr( $key ); ?>-value"><?php echo wp_kses_post( $data['value'] ); ?></span> |
|
35 | + <td class="<?php echo esc_attr($class); ?> <?php echo 'invoice_total' === $key ? 'font-weight-bold' : 'font-weight-normal'; ?> text-break" style="width: 60%"> |
|
36 | + <span class="getpaid-invoice-meta-<?php echo esc_attr($key); ?>-value"><?php echo wp_kses_post($data['value']); ?></span> |
|
37 | 37 | </td> |
38 | 38 | |
39 | 39 | </tr> |
40 | 40 | |
41 | - <?php do_action( "getpaid_after_invoice_meta_$key", $invoice, $data ); ?> |
|
41 | + <?php do_action("getpaid_after_invoice_meta_$key", $invoice, $data); ?> |
|
42 | 42 | |
43 | 43 | <?php endif; ?> |
44 | 44 | |
45 | 45 | <?php endforeach; ?> |
46 | - <?php do_action( 'getpaid_after_invoice_meta_rows', $invoice ); ?> |
|
46 | + <?php do_action('getpaid_after_invoice_meta_rows', $invoice); ?> |
|
47 | 47 | |
48 | 48 | </tbody> |
49 | 49 | </table> |
50 | - <?php do_action( 'getpaid_after_invoice_meta_table', $invoice ); ?> |
|
50 | + <?php do_action('getpaid_after_invoice_meta_table', $invoice); ?> |
|
51 | 51 | |
52 | 52 | |
53 | 53 | </div> |
54 | - <?php do_action( 'getpaid_after_invoice_meta', $invoice ); ?> |
|
54 | + <?php do_action('getpaid_after_invoice_meta', $invoice); ?> |
|
55 | 55 | |
56 | 56 | <?php |
@@ -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 |
@@ -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 |