Passed
Push — master ( 55fff1...2692d4 )
by Brian
16:18
created
templates/payment-forms-admin/edit/discount.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -7,44 +7,44 @@
 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 class='form-group mb-3'>
15 15
     <label class="form-label d-block">
16
-        <span><?php esc_html_e( 'Input Label', 'invoicing' ); ?></span>
16
+        <span><?php esc_html_e('Input Label', 'invoicing'); ?></span>
17 17
         <input v-model='active_form_element.input_label' class='form-control' type="text"/>
18 18
     </label>
19 19
 </div>
20 20
 
21 21
 <div class='form-group mb-3'>
22 22
     <label class="form-label d-block">
23
-        <span><?php esc_html_e( 'Button Label', 'invoicing' ); ?></span>
23
+        <span><?php esc_html_e('Button Label', 'invoicing'); ?></span>
24 24
         <input v-model='active_form_element.button_label' class='form-control' type="text"/>
25 25
     </label>
26 26
 </div>
27 27
 
28 28
 <div class='form-group mb-3'>
29
-    <label class="form-label" :for="active_form_element.id + '_edit_type'"><?php esc_html_e( 'Button Type', 'invoicing' ); ?></label>
29
+    <label class="form-label" :for="active_form_element.id + '_edit_type'"><?php esc_html_e('Button Type', 'invoicing'); ?></label>
30 30
     <select class='form-control custom-select' :id="active_form_element.id + '_edit_type'" v-model='active_form_element.class'>
31
-        <option disabled><?php esc_html_e( 'Select button type', 'invoicing' ); ?></option>
32
-        <option value='btn-primary'><?php esc_html_e( 'Primary', 'invoicing' ); ?></option>
33
-        <option value='btn-secondary'><?php esc_html_e( 'Secondary', 'invoicing' ); ?></option>
34
-        <option value='btn-success'><?php esc_html_e( 'Success', 'invoicing' ); ?></option>
35
-        <option value='btn-danger'><?php esc_html_e( 'Danger', 'invoicing' ); ?></option>
36
-        <option value='btn-warning'><?php esc_html_e( 'Warning', 'invoicing' ); ?></option>
37
-        <option value='btn-info'><?php esc_html_e( 'Info', 'invoicing' ); ?></option>
38
-        <option value='btn-light'><?php esc_html_e( 'Light', 'invoicing' ); ?></option>
39
-        <option value='btn-dark'><?php esc_html_e( 'Dark', 'invoicing' ); ?></option>
40
-        <option value='btn-link'><?php esc_html_e( 'Link', 'invoicing' ); ?></option>
31
+        <option disabled><?php esc_html_e('Select button type', 'invoicing'); ?></option>
32
+        <option value='btn-primary'><?php esc_html_e('Primary', 'invoicing'); ?></option>
33
+        <option value='btn-secondary'><?php esc_html_e('Secondary', 'invoicing'); ?></option>
34
+        <option value='btn-success'><?php esc_html_e('Success', 'invoicing'); ?></option>
35
+        <option value='btn-danger'><?php esc_html_e('Danger', 'invoicing'); ?></option>
36
+        <option value='btn-warning'><?php esc_html_e('Warning', 'invoicing'); ?></option>
37
+        <option value='btn-info'><?php esc_html_e('Info', 'invoicing'); ?></option>
38
+        <option value='btn-light'><?php esc_html_e('Light', 'invoicing'); ?></option>
39
+        <option value='btn-dark'><?php esc_html_e('Dark', 'invoicing'); ?></option>
40
+        <option value='btn-link'><?php esc_html_e('Link', 'invoicing'); ?></option>
41 41
     </select>
42 42
 </div>
43 43
 
44 44
 <div class='form-group mb-3'>
45 45
     <label class="form-label d-block">
46
-        <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span>
47
-        <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>
48
-        <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small>
46
+        <span><?php esc_html_e('Help Text', 'invoicing'); ?></span>
47
+        <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>
48
+        <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small>
49 49
     </label>
50 50
 </div>
Please login to merge, or discard this patch.
templates/payment-forms/elements/discount.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,35 +8,35 @@
 block discarded – undo
8 8
  * @var GetPaid_Payment_Form $form The current payment form
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13
-if ( ! getpaid_has_published_discount() ) {
13
+if (!getpaid_has_published_discount()) {
14 14
     return;
15 15
 }
16 16
 
17
-if ( ! empty( $description ) ) {
17
+if (!empty($description)) {
18 18
     $description = "<small class='form-text text-muted'>$description</small>";
19 19
 } else {
20 20
     $description = '';
21 21
 }
22 22
 
23 23
 $discount_code = '';
24
-if ( ! empty( $form->invoice ) ) {
24
+if (!empty($form->invoice)) {
25 25
     $discount_code = $form->invoice->get_discount_code();
26 26
 }
27 27
 
28
-$class = empty( $class ) ? 'btn-secondary' : sanitize_html_class( $class );
28
+$class = empty($class) ? 'btn-secondary' : sanitize_html_class($class);
29 29
 ?>
30 30
 
31 31
 <div class="form-group mb-3">
32 32
     <div class="getpaid-discount-field  border rounded p-3">
33 33
         <div class="getpaid-discount-field-inner d-flex flex-column flex-md-row">
34
-            <input name="discount" placeholder="<?php echo esc_attr( $input_label ); ?>" value="<?php echo esc_attr( $discount_code ); ?>" class="form-control mr-2 mb-2 getpaid-discount-field-input" style="flex: 1;" type="text">
35
-            <a href="#" class="btn <?php echo esc_attr( $class ); ?> submit-button mb-2 getpaid-discount-button"><?php echo esc_html( $button_label ); ?></a>
34
+            <input name="discount" placeholder="<?php echo esc_attr($input_label); ?>" value="<?php echo esc_attr($discount_code); ?>" class="form-control mr-2 mb-2 getpaid-discount-field-input" style="flex: 1;" type="text">
35
+            <a href="#" class="btn <?php echo esc_attr($class); ?> submit-button mb-2 getpaid-discount-button"><?php echo esc_html($button_label); ?></a>
36 36
         </div>
37
-        <?php echo wp_kses_post( $description ); ?>
37
+        <?php echo wp_kses_post($description); ?>
38 38
         <div class="getpaid-custom-payment-form-errors alert alert-danger d-none"></div>
39
-        <div class="getpaid-custom-payment-form-success alert alert-success d-none"><?php esc_html_e( 'Discount code applied!', 'invoicing' ); ?></div>
39
+        <div class="getpaid-custom-payment-form-success alert alert-success d-none"><?php esc_html_e('Discount code applied!', 'invoicing'); ?></div>
40 40
     </div>
41 41
 </div>
42 42
 
Please login to merge, or discard this patch.