Passed
Push — master ( d31ad4...09cfe7 )
by Brian
05:03
created
templates/payment-forms/elements/number.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'       => 'number',
28 28
     )
29 29
 );
Please login to merge, or discard this patch.
templates/payment-forms/elements/select.php 1 patch
Spacing   +9 added lines, -9 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()->select(
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 ),
27
-        'options'    => empty( $options ) ? array() : array_combine( $options, $options ),
26
+        'help_text'  => empty($description) ? '' : wp_kses_post($description),
27
+        'options'    => empty($options) ? array() : array_combine($options, $options),
28 28
     )
29 29
 );
Please login to merge, or discard this patch.
templates/payment-forms/elements/website.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'       => 'url',
28 28
     )
29 29
 );
Please login to merge, or discard this patch.
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/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/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.