@@ -8,23 +8,23 @@ |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | +defined('ABSPATH') || exit; |
|
12 | 12 | |
13 | 13 | ?> |
14 | 14 | |
15 | 15 | <div class='form-group'> |
16 | - <label :for="active_form_element.id + '_edit_heading'"><?php esc_html_e( 'Heading', 'invoicing' ); ?></label> |
|
16 | + <label :for="active_form_element.id + '_edit_heading'"><?php esc_html_e('Heading', 'invoicing'); ?></label> |
|
17 | 17 | <input :id="active_form_element.id + '_edit_heading'" v-model='active_form_element.text' class='form-control' type='text' /> |
18 | 18 | </div> |
19 | 19 | |
20 | 20 | <div class='form-group'> |
21 | - <label :for="active_form_element.id + '_edit_level'"><?php esc_html_e( 'Select Heading Level', 'invoicing' ); ?></label> |
|
21 | + <label :for="active_form_element.id + '_edit_level'"><?php esc_html_e('Select Heading Level', 'invoicing'); ?></label> |
|
22 | 22 | <select class='form-control custom-select' :id="active_form_element.id + '_edit_level'" v-model='active_form_element.level'> |
23 | - <option value='h1'><?php esc_html_e( 'H1', 'invoicing' ); ?></option> |
|
24 | - <option value='h2'><?php esc_html_e( 'H2', 'invoicing' ); ?></option> |
|
25 | - <option value='h3'><?php esc_html_e( 'H3', 'invoicing' ); ?></option> |
|
26 | - <option value='h4'><?php esc_html_e( 'H4', 'invoicing' ); ?></option> |
|
27 | - <option value='h5'><?php esc_html_e( 'H5', 'invoicing' ); ?></option> |
|
28 | - <option value='h6'><?php esc_html_e( 'H6', 'invoicing' ); ?></option> |
|
23 | + <option value='h1'><?php esc_html_e('H1', 'invoicing'); ?></option> |
|
24 | + <option value='h2'><?php esc_html_e('H2', 'invoicing'); ?></option> |
|
25 | + <option value='h3'><?php esc_html_e('H3', 'invoicing'); ?></option> |
|
26 | + <option value='h4'><?php esc_html_e('H4', 'invoicing'); ?></option> |
|
27 | + <option value='h5'><?php esc_html_e('H5', 'invoicing'); ?></option> |
|
28 | + <option value='h6'><?php esc_html_e('H6', 'invoicing'); ?></option> |
|
29 | 29 | </select> |
30 | 30 | </div> |
@@ -7,10 +7,10 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | <div class='form-group'> |
14 | - <label :for="active_form_element.id + '_edit'"><?php esc_html_e( 'The IP Address text', 'invoicing' ); ?></label> |
|
14 | + <label :for="active_form_element.id + '_edit'"><?php esc_html_e('The IP Address text', 'invoicing'); ?></label> |
|
15 | 15 | <textarea :id="active_form_element.id + '_edit'" v-model='active_form_element.text' class='form-control' rows='3'></textarea> |
16 | 16 | </div> |
@@ -7,33 +7,33 @@ |
||
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='form-group'> |
15 | 15 | <label class="d-block"> |
16 | - <span><?php esc_html_e( 'Alert Text', 'invoicing' ); ?></span> |
|
16 | + <span><?php esc_html_e('Alert Text', 'invoicing'); ?></span> |
|
17 | 17 | <textarea v-model='active_form_element.text' class='form-control' rows='3'></textarea> |
18 | 18 | </label> |
19 | 19 | </div> |
20 | 20 | |
21 | 21 | <div class='form-group form-check'> |
22 | 22 | <input :id="active_form_element.id + '_edit_dismissible'" v-model='active_form_element.dismissible' type='checkbox' class='form-check-input' /> |
23 | - <label class='form-check-label' :for="active_form_element.id + '_edit_dismissible'"><?php esc_html_e( 'Is Dismissible?', 'invoicing' ); ?></label> |
|
23 | + <label class='form-check-label' :for="active_form_element.id + '_edit_dismissible'"><?php esc_html_e('Is Dismissible?', 'invoicing'); ?></label> |
|
24 | 24 | </div> |
25 | 25 | |
26 | 26 | <div class='form-group'> |
27 | - <label :for="active_form_element.id + '_edit_type'"><?php esc_html_e( 'Alert Type', 'invoicing' ); ?></label> |
|
27 | + <label :for="active_form_element.id + '_edit_type'"><?php esc_html_e('Alert Type', 'invoicing'); ?></label> |
|
28 | 28 | <select class='form-control custom-select' :id="active_form_element.id + '_edit_type'" v-model='active_form_element.class'> |
29 | - <option value='alert-primary'><?php esc_html_e( 'Primary', 'invoicing' ); ?></option> |
|
30 | - <option value='alert-secondary'><?php esc_html_e( 'Secondary', 'invoicing' ); ?></option> |
|
31 | - <option value='alert-success'><?php esc_html_e( 'Success', 'invoicing' ); ?></option> |
|
32 | - <option value='alert-danger'><?php esc_html_e( 'Danger', 'invoicing' ); ?></option> |
|
33 | - <option value='alert-warning'><?php esc_html_e( 'Warning', 'invoicing' ); ?></option> |
|
34 | - <option value='alert-info'><?php esc_html_e( 'Info', 'invoicing' ); ?></option> |
|
35 | - <option value='alert-light'><?php esc_html_e( 'Light', 'invoicing' ); ?></option> |
|
36 | - <option value='alert-dark'><?php esc_html_e( 'Dark', 'invoicing' ); ?></option> |
|
37 | - <option value='alert-link'><?php esc_html_e( 'Link', 'invoicing' ); ?></option> |
|
29 | + <option value='alert-primary'><?php esc_html_e('Primary', 'invoicing'); ?></option> |
|
30 | + <option value='alert-secondary'><?php esc_html_e('Secondary', 'invoicing'); ?></option> |
|
31 | + <option value='alert-success'><?php esc_html_e('Success', 'invoicing'); ?></option> |
|
32 | + <option value='alert-danger'><?php esc_html_e('Danger', 'invoicing'); ?></option> |
|
33 | + <option value='alert-warning'><?php esc_html_e('Warning', 'invoicing'); ?></option> |
|
34 | + <option value='alert-info'><?php esc_html_e('Info', 'invoicing'); ?></option> |
|
35 | + <option value='alert-light'><?php esc_html_e('Light', 'invoicing'); ?></option> |
|
36 | + <option value='alert-dark'><?php esc_html_e('Dark', 'invoicing'); ?></option> |
|
37 | + <option value='alert-link'><?php esc_html_e('Link', 'invoicing'); ?></option> |
|
38 | 38 | </select> |
39 | 39 | </div> |
@@ -7,7 +7,7 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | ?> |
12 | 12 | |
13 | 13 | <hr class="featurette-divider" /> |
@@ -8,7 +8,7 @@ |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | +defined('ABSPATH') || exit; |
|
12 | 12 | |
13 | 13 | ?> |
14 | 14 | <component :is='form_element.level' v-html='form_element.text'></component> |
@@ -21,20 +21,20 @@ |
||
21 | 21 | |
22 | 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 ); |
|
27 | - |
|
28 | - foreach ( $file_type as $type ) { |
|
29 | - $type = trim( $type ); |
|
30 | - $types[] = ".$type"; |
|
31 | - $_types[] = $type; |
|
32 | - } |
|
24 | + if ( isset( $all_types[ $file_type ] ) ) { |
|
25 | + $types[] = $all_types[ $file_type ]; |
|
26 | + $file_type = explode( '|', $file_type ); |
|
27 | + |
|
28 | + foreach ( $file_type as $type ) { |
|
29 | + $type = trim( $type ); |
|
30 | + $types[] = ".$type"; |
|
31 | + $_types[] = $type; |
|
32 | + } |
|
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
36 | 36 | if ( ! empty( $required ) ) { |
37 | - $label .= "<span class='text-danger'> *</span>"; |
|
37 | + $label .= "<span class='text-danger'> *</span>"; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | ?> |
@@ -7,33 +7,33 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
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; |
|
10 | +defined('ABSPATH') || exit; |
|
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 | 18 | $all_types = getpaid_get_allowed_mime_types(); |
19 | 19 | $types = array(); |
20 | 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 ); |
|
28 | + foreach ($file_type as $type) { |
|
29 | + $type = trim($type); |
|
30 | 30 | $types[] = ".$type"; |
31 | 31 | $_types[] = $type; |
32 | 32 | } |
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
36 | -if ( ! empty( $required ) ) { |
|
36 | +if (!empty($required)) { |
|
37 | 37 | $label .= "<span class='text-danger'> *</span>"; |
38 | 38 | } |
39 | 39 | |
@@ -41,16 +41,16 @@ discard block |
||
41 | 41 | |
42 | 42 | <label><span v-html="form_element.label"></span></label> |
43 | 43 | |
44 | -<div class="form-group <?php echo esc_attr( $label_class ); ?>" data-name="<?php echo esc_attr( $id ); ?>" data-max="<?php echo esc_attr( $max_file_num ); ?>"> |
|
45 | - <label for="<?php echo esc_attr( $id ); ?>"><?php echo wp_kses_post( $label ); ?></label> |
|
46 | - <input type="file" class="sr-only getpaid-files-input" id="<?php echo esc_attr( $id ); ?>" accept="<?php echo esc_attr( implode( ', ', $types ) ); ?>" data-extensions="<?php echo esc_attr( wp_json_encode( $_types ) ); ?>" <?php echo $max_file_num == 1 ? '' : 'multiple="multiple"'; ?>> |
|
44 | +<div class="form-group <?php echo esc_attr($label_class); ?>" data-name="<?php echo esc_attr($id); ?>" data-max="<?php echo esc_attr($max_file_num); ?>"> |
|
45 | + <label for="<?php echo esc_attr($id); ?>"><?php echo wp_kses_post($label); ?></label> |
|
46 | + <input type="file" class="sr-only getpaid-files-input" id="<?php echo esc_attr($id); ?>" accept="<?php echo esc_attr(implode(', ', $types)); ?>" data-extensions="<?php echo esc_attr(wp_json_encode($_types)); ?>" <?php echo $max_file_num == 1 ? '' : 'multiple="multiple"'; ?>> |
|
47 | 47 | |
48 | - <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"> |
|
48 | + <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"> |
|
49 | 49 | <div class="h5 text-dark"> |
50 | - <?php echo esc_html( _n( 'Drag your file to this area or click to upload', 'Drag files to this area or click to upload', $max_file_num, 'invoicing' ) ); ?> |
|
50 | + <?php echo esc_html(_n('Drag your file to this area or click to upload', 'Drag files to this area or click to upload', $max_file_num, 'invoicing')); ?> |
|
51 | 51 | </div> |
52 | - <?php if ( ! empty( $description ) ) : ?> |
|
53 | - <small class="form-text text-muted"><?php echo wp_kses_post( $description ); ?></small> |
|
52 | + <?php if (!empty($description)) : ?> |
|
53 | + <small class="form-text text-muted"><?php echo wp_kses_post($description); ?></small> |
|
54 | 54 | <?php endif; ?> |
55 | 55 | </label> |
56 | 56 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | <div class="form-row mb-3 d-none getpaid-progress-template"> |
60 | 60 | |
61 | 61 | <div class="overflow-hidden text-nowrap col-7 col-sm-4"> |
62 | - <a href="" class="close float-none" title="<?php esc_attr_e( 'Remove File', 'invoicing' ); ?>">×<span class="sr-only"><?php esc_html_e( 'Close', 'invoicing' ); ?></span></a> |
|
62 | + <a href="" class="close float-none" title="<?php esc_attr_e('Remove File', 'invoicing'); ?>">×<span class="sr-only"><?php esc_html_e('Close', 'invoicing'); ?></span></a> |
|
63 | 63 | <i class="fa fa-file" aria-hidden="true"></i> <span class="getpaid-progress-file-name"></span> |
64 | 64 | </div> |
65 | 65 |
@@ -7,44 +7,44 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | -if ( empty( $form->get_items() ) ) { |
|
12 | +if (empty($form->get_items())) { |
|
13 | 13 | return; |
14 | 14 | } |
15 | 15 | |
16 | -if ( ! empty( $GLOBALS['getpaid_force_checkbox'] ) ) { |
|
16 | +if (!empty($GLOBALS['getpaid_force_checkbox'])) { |
|
17 | 17 | $items_type = 'checkbox'; |
18 | 18 | } |
19 | 19 | |
20 | -if ( empty( $items_type ) ) { |
|
20 | +if (empty($items_type)) { |
|
21 | 21 | $items_type = 'total'; |
22 | 22 | } |
23 | 23 | |
24 | -do_action( 'getpaid_before_payment_form_items', $form ); |
|
24 | +do_action('getpaid_before_payment_form_items', $form); |
|
25 | 25 | |
26 | -switch ( $items_type ) { |
|
26 | +switch ($items_type) { |
|
27 | 27 | case 'radio': |
28 | - wpinv_get_template( 'payment-forms/variations/radio.php', compact( 'form', 'items_type' ) ); |
|
28 | + wpinv_get_template('payment-forms/variations/radio.php', compact('form', 'items_type')); |
|
29 | 29 | break; |
30 | 30 | case 'checkbox': |
31 | - wpinv_get_template( 'payment-forms/variations/checkbox.php', compact( 'form', 'items_type' ) ); |
|
31 | + wpinv_get_template('payment-forms/variations/checkbox.php', compact('form', 'items_type')); |
|
32 | 32 | break; |
33 | 33 | case 'select': |
34 | - wpinv_get_template( 'payment-forms/variations/select.php', compact( 'form', 'items_type' ) ); |
|
34 | + wpinv_get_template('payment-forms/variations/select.php', compact('form', 'items_type')); |
|
35 | 35 | break; |
36 | 36 | } |
37 | 37 | |
38 | -do_action( 'getpaid_before_payment_form_cart', $form ); |
|
38 | +do_action('getpaid_before_payment_form_cart', $form); |
|
39 | 39 | |
40 | 40 | // Display the cart totals. |
41 | -if ( ! empty( $hide_cart ) ) { |
|
41 | +if (!empty($hide_cart)) { |
|
42 | 42 | echo '<div class="d-none">'; |
43 | 43 | } |
44 | 44 | |
45 | 45 | // Display the cart totals. |
46 | -wpinv_get_template( 'payment-forms/cart.php', compact( 'form', 'items_type' ) ); |
|
46 | +wpinv_get_template('payment-forms/cart.php', compact('form', 'items_type')); |
|
47 | 47 | |
48 | -if ( ! empty( $hide_cart ) ) { |
|
48 | +if (!empty($hide_cart)) { |
|
49 | 49 | echo '</div>'; |
50 | 50 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | // Display the item totals. |
46 | 46 | foreach ( $form->get_items() as $item ) { |
47 | - wpinv_get_template( 'payment-forms/cart-item.php', compact( 'form', 'item', 'columns' ) ); |
|
47 | + wpinv_get_template( 'payment-forms/cart-item.php', compact( 'form', 'item', 'columns' ) ); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | // Display the cart totals. |
@@ -7,34 +7,34 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Cart table columns. |
13 | 13 | $columns = array( |
14 | - 'name' => __( 'Item', 'invoicing' ), |
|
15 | - 'price' => __( 'Price', 'invoicing' ), |
|
16 | - 'quantity' => __( 'Qty', 'invoicing' ), |
|
17 | - 'subtotal' => __( 'Subtotal', 'invoicing' ), |
|
14 | + 'name' => __('Item', 'invoicing'), |
|
15 | + 'price' => __('Price', 'invoicing'), |
|
16 | + 'quantity' => __('Qty', 'invoicing'), |
|
17 | + 'subtotal' => __('Subtotal', 'invoicing'), |
|
18 | 18 | ); |
19 | 19 | |
20 | -if ( ! empty( $form->invoice ) ) { |
|
21 | - $columns = getpaid_invoice_item_columns( $form->invoice ); |
|
20 | +if (!empty($form->invoice)) { |
|
21 | + $columns = getpaid_invoice_item_columns($form->invoice); |
|
22 | 22 | } |
23 | 23 | |
24 | -if ( isset( $columns['tax_rate'] ) ) { |
|
25 | - unset( $columns['tax_rate'] ); |
|
24 | +if (isset($columns['tax_rate'])) { |
|
25 | + unset($columns['tax_rate']); |
|
26 | 26 | } |
27 | 27 | |
28 | -$columns = apply_filters( 'getpaid_payment_form_cart_table_columns', $columns, $form ); |
|
28 | +$columns = apply_filters('getpaid_payment_form_cart_table_columns', $columns, $form); |
|
29 | 29 | |
30 | 30 | ?> |
31 | 31 | <div class="getpaid-payment-form-items-cart border form-group"> |
32 | 32 | |
33 | 33 | <div class="getpaid-payment-form-items-cart-header font-weight-bold bg-light border-bottom py-2 px-3"> |
34 | 34 | <div class="form-row"> |
35 | - <?php foreach ( $columns as $key => $label ) : ?> |
|
36 | - <div class="<?php echo 'name' == $key ? 'col-6' : 'col'; ?> <?php echo ( in_array( $key, array( 'subtotal', 'quantity', 'tax_rate' ) ) ) ? 'd-none d-sm-block' : ''; ?> getpaid-form-cart-item-<?php echo esc_attr( $key ); ?>"> |
|
37 | - <span><?php echo esc_html( $label ); ?></span> |
|
35 | + <?php foreach ($columns as $key => $label) : ?> |
|
36 | + <div class="<?php echo 'name' == $key ? 'col-6' : 'col'; ?> <?php echo (in_array($key, array('subtotal', 'quantity', 'tax_rate'))) ? 'd-none d-sm-block' : ''; ?> getpaid-form-cart-item-<?php echo esc_attr($key); ?>"> |
|
37 | + <span><?php echo esc_html($label); ?></span> |
|
38 | 38 | </div> |
39 | 39 | <?php endforeach; ?> |
40 | 40 | </div> |
@@ -43,16 +43,16 @@ discard block |
||
43 | 43 | <?php |
44 | 44 | |
45 | 45 | // Display the item totals. |
46 | - foreach ( $form->get_items() as $item ) { |
|
47 | - wpinv_get_template( 'payment-forms/cart-item.php', compact( 'form', 'item', 'columns' ) ); |
|
46 | + foreach ($form->get_items() as $item) { |
|
47 | + wpinv_get_template('payment-forms/cart-item.php', compact('form', 'item', 'columns')); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | // Display the cart totals. |
51 | - wpinv_get_template( 'payment-forms/cart-totals.php', compact( 'form' ) ); |
|
51 | + wpinv_get_template('payment-forms/cart-totals.php', compact('form')); |
|
52 | 52 | |
53 | 53 | ?> |
54 | 54 | </div> |
55 | 55 | |
56 | 56 | <?php |
57 | 57 | |
58 | -do_action( 'getpaid_after_payment_form_cart', $form ); |
|
58 | +do_action('getpaid_after_payment_form_cart', $form); |
@@ -44,12 +44,12 @@ |
||
44 | 44 | |
45 | 45 | // Display the item totals. |
46 | 46 | foreach ( $invoice->get_items() as $item ) { |
47 | - wpinv_get_template( 'emails/invoice-item.php', compact( 'invoice', 'item', 'columns' ) ); |
|
47 | + wpinv_get_template( 'emails/invoice-item.php', compact( 'invoice', 'item', 'columns' ) ); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | // Display the fee totals. |
51 | 51 | foreach ( $invoice->get_fees() as $fee ) { |
52 | - wpinv_get_template( 'emails/fee-item.php', compact( 'invoice', 'fee', 'columns' ) ); |
|
52 | + wpinv_get_template( 'emails/fee-item.php', compact( 'invoice', 'fee', 'columns' ) ); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | ?> |
@@ -8,18 +8,18 @@ discard block |
||
8 | 8 | * @var WPInv_Invoice $invoice |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | +defined('ABSPATH') || exit; |
|
12 | 12 | |
13 | -$column_count = count( $columns ); |
|
13 | +$column_count = count($columns); |
|
14 | 14 | ?> |
15 | 15 | |
16 | -<?php do_action( 'wpinv_before_email_items', $invoice ); ?> |
|
16 | +<?php do_action('wpinv_before_email_items', $invoice); ?> |
|
17 | 17 | |
18 | 18 | |
19 | 19 | <div id="wpinv-email-items"> |
20 | 20 | |
21 | 21 | <h3 class="invoice-items-title"> |
22 | - <?php echo sprintf( esc_html__( '%s Items', 'invoicing' ), esc_html( ucfirst( $invoice->get_invoice_quote_type() ) ) ); ?> |
|
22 | + <?php echo sprintf(esc_html__('%s Items', 'invoicing'), esc_html(ucfirst($invoice->get_invoice_quote_type()))); ?> |
|
23 | 23 | </h3> |
24 | 24 | |
25 | 25 | <table class="table table-bordered table-hover"> |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | |
29 | 29 | <tr class="wpinv_cart_header_row"> |
30 | 30 | |
31 | - <?php foreach ( $columns as $key => $label ) : ?> |
|
32 | - <th class="<?php echo 'name' == $key ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo esc_attr( $key ); ?>"> |
|
33 | - <?php echo esc_html( $label ); ?> |
|
31 | + <?php foreach ($columns as $key => $label) : ?> |
|
32 | + <th class="<?php echo 'name' == $key ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo esc_attr($key); ?>"> |
|
33 | + <?php echo esc_html($label); ?> |
|
34 | 34 | </th> |
35 | 35 | <?php endforeach; ?> |
36 | 36 | |
@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | <?php |
44 | 44 | |
45 | 45 | // Display the item totals. |
46 | - foreach ( $invoice->get_items() as $item ) { |
|
47 | - wpinv_get_template( 'emails/invoice-item.php', compact( 'invoice', 'item', 'columns' ) ); |
|
46 | + foreach ($invoice->get_items() as $item) { |
|
47 | + wpinv_get_template('emails/invoice-item.php', compact('invoice', 'item', 'columns')); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | // Display the fee totals. |
51 | - foreach ( $invoice->get_fees() as $fee ) { |
|
52 | - wpinv_get_template( 'emails/fee-item.php', compact( 'invoice', 'fee', 'columns' ) ); |
|
51 | + foreach ($invoice->get_fees() as $fee) { |
|
52 | + wpinv_get_template('emails/fee-item.php', compact('invoice', 'fee', 'columns')); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | ?> |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | </tbody> |
58 | 58 | |
59 | 59 | <tfoot> |
60 | - <?php wpinv_get_template( 'emails/invoice-totals.php', compact( 'invoice', 'column_count' ) ); ?> |
|
60 | + <?php wpinv_get_template('emails/invoice-totals.php', compact('invoice', 'column_count')); ?> |
|
61 | 61 | </tfoot> |
62 | 62 | |
63 | 63 | </table> |