Passed
Push — master ( 5faead...57234e )
by Brian
04:33
created
templates/payment-forms/elements/email.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,23 +7,23 @@
 block discarded – undo
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 );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13 13
 
14
-if ( ! empty( $required ) ) {
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'       => 'email',
28 28
     )
29 29
 );
Please login to merge, or discard this patch.
templates/payment-forms/elements/time.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,23 +7,23 @@
 block discarded – undo
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 );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13 13
 
14
-if ( ! empty( $required ) ) {
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'       => 'time',
28 28
     )
29 29
 );
Please login to merge, or discard this patch.
templates/payment-forms/elements/text.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
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 );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13 13
 
14
-if ( ! empty( $required ) ) {
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
     )
28 28
 );
Please login to merge, or discard this patch.
templates/payment-forms/elements/textarea.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
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 );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13 13
 
14
-if ( ! empty( $required ) ) {
14
+if (!empty($required)) {
15 15
     $label .= "<span class='text-danger'> *</span>";
16 16
 }
17 17
 
18 18
 echo aui()->textarea(
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
     )
28 28
 );
Please login to merge, or discard this patch.
templates/wpinv-payment-processing.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,12 +2,12 @@  discard block
 block discarded – undo
2 2
 global $wpi_invoice;
3 3
 
4 4
 // Backwards compatibility.
5
-if ( empty( $invoice ) ) {
5
+if (empty($invoice)) {
6 6
     $invoice = $wpi_invoice;
7 7
 }
8 8
 
9 9
 $success_page_uri = wpinv_get_success_page_uri();
10
-if ( ! empty( $invoice ) ) {
10
+if (!empty($invoice)) {
11 11
     $success_page_uri = $invoice->get_receipt_url();
12 12
 }
13 13
 ?>
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
         <?php 
18 18
             echo
19 19
             wp_sprintf(
20
-                __( 'Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing' ),
21
-                esc_url( $success_page_uri )
20
+                __('Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing'),
21
+                esc_url($success_page_uri)
22 22
             );
23 23
         ?>
24 24
         <i class="fa fa-spin fa-refresh"></i>
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     <script type="text/javascript">
28 28
         setTimeout(
29 29
             function(){
30
-                window.location = '<?php echo esc_url( $success_page_uri ); ?>';
30
+                window.location = '<?php echo esc_url($success_page_uri); ?>';
31 31
             },
32 32
             10000
33 33
         );
Please login to merge, or discard this patch.
templates/payment-forms-admin/previews/items.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@
 block discarded – undo
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 v-if='!is_default'>
15
-    <div class='alert alert-info' role='alert'><?php _e( 'Item totals will appear here. Click to set items.', 'invoicing' ) ?></div>
15
+    <div class='alert alert-info' role='alert'><?php _e('Item totals will appear here. Click to set items.', 'invoicing') ?></div>
16 16
 </div>
17 17
 
18 18
 <div v-if='is_default'>
19
-    <div class='alert alert-info' role='alert'><?php _e( 'Item totals will appear here.', 'invoicing' ) ?></div>
19
+    <div class='alert alert-info' role='alert'><?php _e('Item totals will appear here.', 'invoicing') ?></div>
20 20
 </div>
Please login to merge, or discard this patch.
templates/invoice/fee-item.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
  * @var array $fee
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+defined('ABSPATH') || exit;
13 13
 
14
-do_action( 'getpaid_before_invoice_fee_item', $invoice, $fee );
14
+do_action('getpaid_before_invoice_fee_item', $invoice, $fee);
15 15
 
16 16
 ?>
17 17
 
@@ -19,61 +19,61 @@  discard block
 block discarded – undo
19 19
 
20 20
     <div class="form-row">
21 21
 
22
-        <?php foreach ( array_keys( $columns ) as $column ): ?>
22
+        <?php foreach (array_keys($columns) as $column): ?>
23 23
 
24
-            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class( $column ); ?>">
24
+            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class($column); ?>">
25 25
 
26 26
                 <?php
27 27
 
28 28
                     // Fires before printing a fee item column.
29
-                    do_action( "getpaid_invoice_fee_item_before_$column", $fee, $invoice );
29
+                    do_action("getpaid_invoice_fee_item_before_$column", $fee, $invoice);
30 30
 
31 31
                     // Item name.
32
-                    if ( 'name' == $column ) {
32
+                    if ('name' == $column) {
33 33
 
34 34
                         // Display the name.
35
-                        echo '<div class="mb-1">' . sanitize_text_field( $fee['name'] ) . '</div>';
35
+                        echo '<div class="mb-1">' . sanitize_text_field($fee['name']) . '</div>';
36 36
 
37 37
                         // And an optional description.
38
-                        $description = esc_html__( 'Fee', 'invoicing' );
38
+                        $description = esc_html__('Fee', 'invoicing');
39 39
                         echo "<small class='form-text text-muted pr-2 m-0'>$description</small>";
40 40
 
41 41
                     }
42 42
 
43 43
                     // Item price.
44
-                    if ( 'price' == $column ) {
44
+                    if ('price' == $column) {
45 45
 
46 46
                         // Display the item price (or recurring price if this is a renewal invoice)
47
-                        if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
48
-                            echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
47
+                        if ($invoice->is_recurring() && $invoice->is_renewal()) {
48
+                            echo wpinv_price($fee['recurring_fee'], $invoice->get_currency());
49 49
                         } else {
50
-                            echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
50
+                            echo wpinv_price($fee['initial_fee'], $invoice->get_currency());
51 51
                         }
52 52
 
53 53
                     }
54 54
 
55 55
                     // Item quantity.
56
-                    if ( 'quantity' == $column ) {
56
+                    if ('quantity' == $column) {
57 57
                         echo "&mdash;";
58 58
                     }
59 59
 
60 60
                     // Item sub total.
61
-                    if ( 'subtotal' == $column ) {
61
+                    if ('subtotal' == $column) {
62 62
 
63 63
                         // Display the item price (or recurring price if this is a renewal invoice)
64
-                        if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
65
-                            echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
64
+                        if ($invoice->is_recurring() && $invoice->is_renewal()) {
65
+                            echo wpinv_price($fee['recurring_fee'], $invoice->get_currency());
66 66
                         } else {
67
-                            echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
67
+                            echo wpinv_price($fee['initial_fee'], $invoice->get_currency());
68 68
                         }
69 69
 
70 70
                     }
71 71
 
72 72
                     // Fires when printing a fee item column.
73
-                    do_action( "getpaid_invoice_fee_item_$column", $fee, $invoice );
73
+                    do_action("getpaid_invoice_fee_item_$column", $fee, $invoice);
74 74
 
75 75
                     // Fires after printing a fee item column.
76
-                    do_action( "getpaid_invoice_fee_item_after_$column", $fee, $invoice );
76
+                    do_action("getpaid_invoice_fee_item_after_$column", $fee, $invoice);
77 77
 
78 78
                 ?>
79 79
 
Please login to merge, or discard this patch.
templates/invoice/invoice-logo.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 ?>
13
-<a target="_blank" class="logo-link text-dark" href="<?php echo esc_url( wpinv_get_business_website() ); ?>">
13
+<a target="_blank" class="logo-link text-dark" href="<?php echo esc_url(wpinv_get_business_website()); ?>">
14 14
 
15
-    <?php if ( $logo = wpinv_get_business_logo() ) { ?>
16
-        <img class="logo" style="max-width:100%;" src="<?php echo esc_url( $logo ); ?>">
15
+    <?php if ($logo = wpinv_get_business_logo()) { ?>
16
+        <img class="logo" style="max-width:100%;" src="<?php echo esc_url($logo); ?>">
17 17
     <?php } else { ?>
18
-        <h1 class="h3"><?php echo esc_html( wpinv_get_business_name() ); ?></h1>
18
+        <h1 class="h3"><?php echo esc_html(wpinv_get_business_name()); ?></h1>
19 19
     <?php } ?>
20 20
 
21 21
 </a>
Please login to merge, or discard this patch.
templates/payment-forms-admin/edit/items.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -7,23 +7,23 @@  discard block
 block discarded – undo
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 v-if="!is_default">
15 15
 
16 16
     <small class='form-text text-muted mb-2'>
17
-        <?php esc_html_e( 'This section allows you to add an existing item to the form that users can then buy. If you do not add an item, ensure that you add a price select or input field to the form.', 'invoicing' ); ?>
17
+        <?php esc_html_e('This section allows you to add an existing item to the form that users can then buy. If you do not add an item, ensure that you add a price select or input field to the form.', 'invoicing'); ?>
18 18
     </small>
19 19
 
20 20
     <label class='form-group'>
21 21
         <input v-model='active_form_element.hide_cart' type='checkbox' />
22
-        <span class='form-check-label'><?php esc_html_e( 'Hide cart details', 'invoicing' ); ?></span>
22
+        <span class='form-check-label'><?php esc_html_e('Hide cart details', 'invoicing'); ?></span>
23 23
     </label>
24 24
 
25 25
     <div class="mb-1">
26
-        <?php esc_html_e( 'Form Items', 'invoicing' ); ?>
26
+        <?php esc_html_e('Form Items', 'invoicing'); ?>
27 27
     </div>
28 28
 
29 29
     <draggable v-model='form_items' group='selectable_form_items'>
@@ -42,22 +42,22 @@  discard block
 block discarded – undo
42 42
                 <div class='p-3'>
43 43
 
44 44
                     <span class='form-text'>
45
-                        <a target="_blank" :href="'<?php echo esc_url( admin_url( '/post.php?action=edit&post' ) ) ?>=' + item.id">
46
-                            <?php _e( 'Edit the item name, price and other details', 'invoicing' ); ?>
45
+                        <a target="_blank" :href="'<?php echo esc_url(admin_url('/post.php?action=edit&post')) ?>=' + item.id">
46
+                            <?php _e('Edit the item name, price and other details', 'invoicing'); ?>
47 47
                         </a>
48 48
                     </span>
49 49
 
50 50
                     <label class='form-group d-block'>
51 51
                         <input v-model='item.allow_quantities' type='checkbox' />
52
-                        <span><?php _e( 'Allow users to buy several quantities', 'invoicing' ); ?></span>
52
+                        <span><?php _e('Allow users to buy several quantities', 'invoicing'); ?></span>
53 53
                     </label>
54 54
 
55 55
                     <label class='form-group d-block'>
56 56
                         <input v-model='item.required' type='checkbox' />
57
-                        <span><?php _e( 'This item is required', 'invoicing' ); ?></span>
57
+                        <span><?php _e('This item is required', 'invoicing'); ?></span>
58 58
                     </label>
59 59
 
60
-                    <button type='button' class='button button-link button-link-delete' @click.prevent='removeItem(item)'><?php _e( 'Delete Item', 'invoicing' ); ?></button>
60
+                    <button type='button' class='button button-link button-link-delete' @click.prevent='removeItem(item)'><?php _e('Delete Item', 'invoicing'); ?></button>
61 61
 
62 62
                 </div>
63 63
             </div>
@@ -65,19 +65,19 @@  discard block
 block discarded – undo
65 65
         </div>
66 66
     </draggable>
67 67
 
68
-    <small v-if='! form_items.length' class='form-text text-danger'><?php _e( 'You have not set up any items. Please select an item below or create a new item.', 'invoicing' ); ?></small>
68
+    <small v-if='! form_items.length' class='form-text text-danger'><?php _e('You have not set up any items. Please select an item below or create a new item.', 'invoicing'); ?></small>
69 69
 
70 70
     <div class="mt-4 mb-4">
71 71
 
72 72
         <div class="mb-2">
73 73
             <select class='w-100' v-init-item-search>
74
-                <option value="" selected="selected"><?php _e( 'Select an item to add...', 'invoicing' ) ?></option>
74
+                <option value="" selected="selected"><?php _e('Select an item to add...', 'invoicing') ?></option>
75 75
             </select>
76 76
 
77 77
         </div>
78 78
 
79
-        <button type="button" @click.prevent='addSelectedItem' class="button button-primary"><?php _e( 'Add Selected Item', 'invoicing' ) ?></button>
80
-        <a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=wpi_item' ) ); ?>" target="_blank" class="button button-secondary"><?php _e( 'Create New Item.', 'invoicing' ) ?></a>
79
+        <button type="button" @click.prevent='addSelectedItem' class="button button-primary"><?php _e('Add Selected Item', 'invoicing') ?></button>
80
+        <a href="<?php echo esc_url(admin_url('post-new.php?post_type=wpi_item')); ?>" target="_blank" class="button button-secondary"><?php _e('Create New Item.', 'invoicing') ?></a>
81 81
 
82 82
     </div>
83 83
 </div>
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
 
87 87
     <label class="w-100 d-block">
88 88
 
89
-        <span><?php esc_html_e( 'Let customers...', 'invoicing' ) ?></span>
89
+        <span><?php esc_html_e('Let customers...', 'invoicing') ?></span>
90 90
 
91 91
         <select class='w-100' style="padding: 6px 24px 6px 8px; border-color: #e0e0e0;" v-model='active_form_element.items_type'>
92
-            <option value='total'><?php _e( 'Buy all items on the list', 'invoicing' ); ?></option>
93
-            <option value='radio'><?php _e( 'Select a single item from the list', 'invoicing' ); ?></option>
94
-            <option value='checkbox'><?php _e( 'Select one or more items on the list', 'invoicing' ) ;?></option>
95
-            <option value='select'><?php _e( 'Select a single item from a dropdown', 'invoicing' ); ?></option>
92
+            <option value='total'><?php _e('Buy all items on the list', 'invoicing'); ?></option>
93
+            <option value='radio'><?php _e('Select a single item from the list', 'invoicing'); ?></option>
94
+            <option value='checkbox'><?php _e('Select one or more items on the list', 'invoicing'); ?></option>
95
+            <option value='select'><?php _e('Select a single item from a dropdown', 'invoicing'); ?></option>
96 96
         </select>
97 97
 
98 98
     </label>
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
 <div class='form-group'>
103 103
     <label class="d-block">
104
-        <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span>
105
-        <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
104
+        <span><?php esc_html_e('Help Text', 'invoicing'); ?></span>
105
+        <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
106 106
     </label>
107 107
 </div>
Please login to merge, or discard this patch.