Passed
Push — master ( c6d0db...756836 )
by Brian
04:55 queued 28s
created
templates/payment-forms/elements/total_payable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-if ( empty( $text ) ) {
13
-    $text = __( 'Total to pay:', 'invoicing' );
12
+if (empty($text)) {
13
+    $text = __('Total to pay:', 'invoicing');
14 14
 }
15 15
 ?>
16 16
 <div class="form-group mt-4">
17
-    <strong><?php echo sanitize_text_field( $text ); ?></strong>
17
+    <strong><?php echo sanitize_text_field($text); ?></strong>
18 18
     <span class="getpaid-checkout-total-payable"></span>
19 19
 </div>
Please login to merge, or discard this patch.
templates/invoice/company-address.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  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
 global $wpinv_euvat;
13 13
 
14 14
 // Prepare the company name.
15 15
 $company_name = $wpinv_euvat->get_company_name();
16 16
 
17
-if ( empty( $company_name ) ) {
17
+if (empty($company_name)) {
18 18
     $company_name = wpinv_get_business_name();
19 19
 }
20 20
 
@@ -24,30 +24,30 @@  discard block
 block discarded – undo
24 24
         <div class="row">
25 25
 
26 26
             <div class="invoice-company-address-label col-2">
27
-                <strong><?php _e( 'From:', 'invoicing' ) ?></strong>
27
+                <strong><?php _e('From:', 'invoicing') ?></strong>
28 28
             </div>
29 29
 
30 30
             <div class="invoice-company-address-value col-10">
31 31
 
32
-                <?php do_action( 'getpaid_company_address_top' ); ?>
32
+                <?php do_action('getpaid_company_address_top'); ?>
33 33
 
34 34
                 <div class="name">
35
-                    <a target="_blank" class="text-dark" href="<?php echo esc_url( wpinv_get_business_website() ); ?>">
36
-                        <?php echo esc_html( wpinv_get_business_name() ); ?>
35
+                    <a target="_blank" class="text-dark" href="<?php echo esc_url(wpinv_get_business_website()); ?>">
36
+                        <?php echo esc_html(wpinv_get_business_name()); ?>
37 37
                     </a>
38 38
                 </div>
39 39
 
40
-                <?php if ( $address = wpinv_get_business_address() ) { ?>
41
-                    <?php echo $address;?>
40
+                <?php if ($address = wpinv_get_business_address()) { ?>
41
+                    <?php echo $address; ?>
42 42
                 <?php } ?>
43 43
 
44
-                <?php if ( $email_from = wpinv_mail_get_from_address() ) { ?>
44
+                <?php if ($email_from = wpinv_mail_get_from_address()) { ?>
45 45
                     <div class="email_from">
46
-                        <?php echo wp_sprintf( __( 'Email: %s', 'invoicing' ), $email_from );?>
46
+                        <?php echo wp_sprintf(__('Email: %s', 'invoicing'), $email_from); ?>
47 47
                     </div>
48 48
                 <?php } ?>
49 49
 
50
-                <?php do_action( 'getpaid_company_address_bottom' ); ?>
50
+                <?php do_action('getpaid_company_address_bottom'); ?>
51 51
 
52 52
             </div>
53 53
 
Please login to merge, or discard this patch.
ayecode/wp-ayecode-ui/includes/components/class-aui-component-button.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ( ! defined( 'ABSPATH' ) ) {
3
+if (!defined('ABSPATH')) {
4 4
 	exit; // Exit if accessed directly
5 5
 }
6 6
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	 *
19 19
 	 * @return string The rendered component.
20 20
 	 */
21
-	public static function get($args = array()){
21
+	public static function get($args = array()) {
22 22
 		$defaults = array(
23 23
 			'type'       => 'a', // a, button, badge
24 24
 			'href'       => '#',
@@ -42,38 +42,38 @@  discard block
 block discarded – undo
42 42
 		/**
43 43
 		 * Parse incoming $args into an array and merge it with $defaults
44 44
 		 */
45
-		$args   = wp_parse_args( $args, $defaults );
45
+		$args   = wp_parse_args($args, $defaults);
46 46
 		$output = '';
47
-		if ( ! empty( $args['type'] ) ) {
47
+		if (!empty($args['type'])) {
48 48
 			$type = $args['type'] != 'a' ? esc_attr($args['type']) : 'a';
49 49
 
50 50
 			// open/type
51
-			if($type=='a'){
51
+			if ($type == 'a') {
52 52
 				$new_window = !empty($args['new_window']) ? ' target="_blank" ' : '';
53
-				$output .= '<a href="' . $args['href'] . '"'.$new_window;
54
-			}elseif($type=='badge'){
53
+				$output .= '<a href="' . $args['href'] . '"' . $new_window;
54
+			}elseif ($type == 'badge') {
55 55
 				$output .= '<span ';
56
-			}else{
56
+			} else {
57 57
 				$output .= '<button type="' . $type . '" ';
58 58
 			}
59 59
 
60 60
 			// name
61
-			if(!empty($args['name'])){
61
+			if (!empty($args['name'])) {
62 62
 				$output .= AUI_Component_Helper::name($args['name']);
63 63
 			}
64 64
 
65 65
 			// id
66
-			if(!empty($args['id'])){
66
+			if (!empty($args['id'])) {
67 67
 				$output .= AUI_Component_Helper::id($args['id']);
68 68
 			}
69 69
 
70 70
 			// title
71
-			if(!empty($args['title'])){
71
+			if (!empty($args['title'])) {
72 72
 				$output .= AUI_Component_Helper::title($args['title']);
73 73
 			}
74 74
 
75 75
 			// value
76
-			if(!empty($args['value'])){
76
+			if (!empty($args['value'])) {
77 77
 				$output .= AUI_Component_Helper::value($args['value']);
78 78
 			}
79 79
 
@@ -88,18 +88,18 @@  discard block
 block discarded – undo
88 88
 			$output .= AUI_Component_Helper::aria_attributes($args);
89 89
 
90 90
 			// extra attributes
91
-			if(!empty($args['extra_attributes'])){
91
+			if (!empty($args['extra_attributes'])) {
92 92
 				$output .= AUI_Component_Helper::extra_attributes($args['extra_attributes']);
93 93
 			}
94 94
 
95 95
 			// onclick, we don't escape this
96
-			if(!empty($args['onclick'])){
97
-				$output .= ' onclick="'.$args['onclick'].'" ';
96
+			if (!empty($args['onclick'])) {
97
+				$output .= ' onclick="' . $args['onclick'] . '" ';
98 98
 			}
99 99
 
100 100
 			// style, we don't escape this
101
-			if(!empty($args['style'])){
102
-				$output .= ' style="'.$args['style'].'" ';
101
+			if (!empty($args['style'])) {
102
+				$output .= ' style="' . $args['style'] . '" ';
103 103
 			}
104 104
 
105 105
 			// close opening tag
@@ -108,37 +108,37 @@  discard block
 block discarded – undo
108 108
 
109 109
 			// hover content
110 110
 			$hover_content = false;
111
-			if(!empty($args['hover_content']) || !empty($args['hover_icon'])){
112
-				$output .= "<span class='hover-content'>".AUI_Component_Helper::icon($args['hover_icon'],$args['hover_content']).$args['hover_content']."</span>";
111
+			if (!empty($args['hover_content']) || !empty($args['hover_icon'])) {
112
+				$output .= "<span class='hover-content'>" . AUI_Component_Helper::icon($args['hover_icon'], $args['hover_content']) . $args['hover_content'] . "</span>";
113 113
 				$hover_content = true;
114 114
 			}
115 115
 			
116 116
 			// content
117
-			if($hover_content){$output .= "<span class='hover-content-original'>";}
118
-			if(!empty($args['content']) || !empty($args['icon'])){
119
-				$output .= AUI_Component_Helper::icon($args['icon'],$args['content'],$args['icon_extra_attributes']).$args['content'];
117
+			if ($hover_content) {$output .= "<span class='hover-content-original'>"; }
118
+			if (!empty($args['content']) || !empty($args['icon'])) {
119
+				$output .= AUI_Component_Helper::icon($args['icon'], $args['content'], $args['icon_extra_attributes']) . $args['content'];
120 120
 			}
121
-			if($hover_content){$output .= "</span>";}
121
+			if ($hover_content) {$output .= "</span>"; }
122 122
 					
123 123
 
124 124
 
125 125
 			// close
126
-			if($type=='a'){
126
+			if ($type == 'a') {
127 127
 				$output .= '</a>';
128
-			}elseif($type=='badge'){
128
+			}elseif ($type == 'badge') {
129 129
 				$output .= '</span>';
130
-			}else{
130
+			} else {
131 131
 				$output .= '</button>';
132 132
 			}
133 133
 
134 134
 			// maybe new line after?  This adds better spacing between buttons.
135
-			if(!empty($args['new_line_after'])){
135
+			if (!empty($args['new_line_after'])) {
136 136
 				$output .= PHP_EOL;
137 137
 			}
138 138
 
139 139
 
140 140
 			// wrap
141
-			if(!$args['no_wrap']){
141
+			if (!$args['no_wrap']) {
142 142
 				$output = AUI_Component_Input::wrap(array(
143 143
 					'content' => $output,
144 144
 				));
Please login to merge, or discard this patch.
includes/data/zip-regexes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @package Invoicing/data
7 7
  */
8 8
 
9
-defined( 'ABSPATH' ) || exit;
9
+defined('ABSPATH') || exit;
10 10
 
11 11
 return array(
12 12
     "AD" => "AD\d{3}",
Please login to merge, or discard this patch.
widgets/invoice-history.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) {
2
+if (!defined('ABSPATH')) {
3 3
     exit;
4 4
 }
5 5
 
@@ -22,15 +22,15 @@  discard block
 block discarded – undo
22 22
             'block-keywords'=> "['invoicing','history']",
23 23
             'class_name'     => __CLASS__,
24 24
             'base_id'       => 'wpinv_history',
25
-            'name'          => __('GetPaid > Invoice History','invoicing'),
25
+            'name'          => __('GetPaid > Invoice History', 'invoicing'),
26 26
             'widget_ops'    => array(
27 27
                 'classname'   => 'wpinv-history-class bsui',
28
-                'description' => esc_html__('Displays invoice history.','invoicing'),
28
+                'description' => esc_html__('Displays invoice history.', 'invoicing'),
29 29
             ),
30 30
             'arguments'     => array(
31 31
                 'title'  => array(
32
-                    'title'       => __( 'Widget title', 'invoicing' ),
33
-                    'desc'        => __( 'Enter widget title.', 'invoicing' ),
32
+                    'title'       => __('Widget title', 'invoicing'),
33
+                    'desc'        => __('Enter widget title.', 'invoicing'),
34 34
                     'type'        => 'text',
35 35
                     'desc_tip'    => true,
36 36
                     'default'     => '',
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         );
42 42
 
43 43
 
44
-        parent::__construct( $options );
44
+        parent::__construct($options);
45 45
     }
46 46
 
47 47
 	/**
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 *
54 54
 	 * @return mixed|string|bool
55 55
 	 */
56
-    public function output( $args = array(), $widget_args = array(), $content = '' ) {
56
+    public function output($args = array(), $widget_args = array(), $content = '') {
57 57
         return getpaid_invoice_history();
58 58
     }
59 59
 
Please login to merge, or discard this patch.
widgets/invoice-receipt.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) {
2
+if (!defined('ABSPATH')) {
3 3
     exit;
4 4
 }
5 5
 
@@ -22,15 +22,15 @@  discard block
 block discarded – undo
22 22
             'block-keywords'=> "['invoicing','receipt']",
23 23
             'class_name'     => __CLASS__,
24 24
             'base_id'       => 'wpinv_receipt',
25
-            'name'          => __('GetPaid > Invoice Receipt','invoicing'),
25
+            'name'          => __('GetPaid > Invoice Receipt', 'invoicing'),
26 26
             'widget_ops'    => array(
27 27
                 'classname'   => 'wpinv-receipt-class bsui',
28
-                'description' => esc_html__('Displays invoice receipt after checkout.','invoicing'),
28
+                'description' => esc_html__('Displays invoice receipt after checkout.', 'invoicing'),
29 29
             ),
30 30
             'arguments'     => array(
31 31
                 'title'  => array(
32
-                    'title'       => __( 'Widget title', 'invoicing' ),
33
-                    'desc'        => __( 'Enter widget title.', 'invoicing' ),
32
+                    'title'       => __('Widget title', 'invoicing'),
33
+                    'desc'        => __('Enter widget title.', 'invoicing'),
34 34
                     'type'        => 'text',
35 35
                     'desc_tip'    => true,
36 36
                     'default'     => '',
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         );
42 42
 
43 43
 
44
-        parent::__construct( $options );
44
+        parent::__construct($options);
45 45
     }
46 46
 
47 47
 	/**
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 *
54 54
 	 * @return mixed|string|bool
55 55
 	 */
56
-    public function output( $args = array(), $widget_args = array(), $content = '' ) {
56
+    public function output($args = array(), $widget_args = array(), $content = '') {
57 57
         return wpinv_payment_receipt();
58 58
     }
59 59
 
Please login to merge, or discard this patch.
templates/payment-forms/elements/ip_address.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-if ( empty( $text ) ) {
13
-    $text = __( 'Your IP address is:', 'invoicing' );
12
+if (empty($text)) {
13
+    $text = __('Your IP address is:', 'invoicing');
14 14
 }
15 15
 
16
-$ip_address = sanitize_text_field( wpinv_get_ip() );
17
-$url        = esc_url( getpaid_ip_location_url( $ip_address ) );
16
+$ip_address = sanitize_text_field(wpinv_get_ip());
17
+$url        = esc_url(getpaid_ip_location_url($ip_address));
18 18
 
19 19
 ?>
20 20
 <div class="form-group getpaid-ip-info">
21
-    <span><?php echo wp_kses_post( $text ); ?></span>
21
+    <span><?php echo wp_kses_post($text); ?></span>
22 22
     <a target='_blank' href='<?php echo $url; ?>'><?php echo $ip_address; ?>&nbsp;&nbsp;<i class='fa fa-external-link-square' aria-hidden='true'></i></a>
23 23
 </div>
Please login to merge, or discard this patch.
templates/geolocation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  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
 ?><!DOCTYPE html>
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
 
17 17
     <head>
18 18
 
19
-		<meta charset="<?php bloginfo( 'charset' ); ?>">
19
+		<meta charset="<?php bloginfo('charset'); ?>">
20 20
         <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" >
21 21
 
22 22
         <meta name="robots" content="noindex,nofollow">
23 23
 
24 24
 		<link rel="profile" href="https://gmpg.org/xfn/11">
25 25
 
26
-        <title><?php _e( 'GetPaid GeoLocation', 'invoicing' ); ?></title>
26
+        <title><?php _e('GetPaid GeoLocation', 'invoicing'); ?></title>
27 27
 
28 28
         <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
29 29
         <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
70 70
                 osmAttrib = '&copy; <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
71 71
                 osm = L.tileLayer( osmUrl, { maxZoom: 18, attribution: osmAttrib } ),
72
-                latlng = new L.LatLng( <?php echo sanitize_text_field( $latitude );?>, <?php echo sanitize_text_field( $longitude );?> );
72
+                latlng = new L.LatLng( <?php echo sanitize_text_field($latitude); ?>, <?php echo sanitize_text_field($longitude); ?> );
73 73
 
74 74
             var map = new L.Map( 'map', {center: latlng, zoom: 18, layers: [osm]});
75 75
 
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
             map.addLayer(marker);
78 78
 
79 79
             marker
80
-                .bindPopup("<p><?php echo esc_attr( $address );?></p>")
80
+                .bindPopup("<p><?php echo esc_attr($address); ?></p>")
81 81
                 .openPopup();
82 82
         </script>
83 83
 
84
-        <div style="height:100px"><?php echo wp_kses_post( $content ); ?></div>
84
+        <div style="height:100px"><?php echo wp_kses_post($content); ?></div>
85 85
 
86 86
     </body>
87 87
 
Please login to merge, or discard this patch.
includes/admin/meta-boxes/class-getpaid-meta-box-invoice-items.php 1 patch
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if (!defined('ABSPATH')) {
11 11
 	exit; // Exit if accessed directly
12 12
 }
13 13
 
@@ -21,51 +21,51 @@  discard block
 block discarded – undo
21 21
 	 *
22 22
 	 * @param WP_Post $post
23 23
 	 */
24
-    public static function output( $post ) {
24
+    public static function output($post) {
25 25
 
26 26
         // Prepare the invoice.
27
-        $invoice = new WPInv_Invoice( $post );
27
+        $invoice = new WPInv_Invoice($post);
28 28
 
29 29
         // Invoice items.
30 30
         $items = $invoice->get_items();
31 31
 
32 32
         // New item url.
33
-        $new_item = admin_url( 'post-new.php?post_type=wpi_item' );
33
+        $new_item = admin_url('post-new.php?post_type=wpi_item');
34 34
 
35 35
         // Totals.
36
-        $total = wpinv_price( wpinv_format_amount( $invoice->get_total() ), $invoice->get_currency() );
36
+        $total = wpinv_price(wpinv_format_amount($invoice->get_total()), $invoice->get_currency());
37 37
 
38
-        if ( $invoice->is_recurring() && $invoice->is_parent() && $invoice->get_total() != $invoice->get_recurring_total() ) {
39
-            $recurring_total = wpinv_price( wpinv_format_amount( $invoice->get_recurring_total() ), $invoice->get_currency() );
40
-            $total          .= '<small class="form-text text-muted">' . sprintf( __( 'Recurring Price: %s', 'invoicing' ), $recurring_total ) . '</small>';
38
+        if ($invoice->is_recurring() && $invoice->is_parent() && $invoice->get_total() != $invoice->get_recurring_total()) {
39
+            $recurring_total = wpinv_price(wpinv_format_amount($invoice->get_recurring_total()), $invoice->get_currency());
40
+            $total          .= '<small class="form-text text-muted">' . sprintf(__('Recurring Price: %s', 'invoicing'), $recurring_total) . '</small>';
41 41
         }
42 42
 
43 43
         $totals = array(
44 44
 
45 45
             'subtotal'  => array(
46
-                'label' => __( 'Items Subtotal', 'invoicing' ),
47
-                'value' => wpinv_price( wpinv_format_amount( $invoice->get_subtotal() ), $invoice->get_currency() ),
46
+                'label' => __('Items Subtotal', 'invoicing'),
47
+                'value' => wpinv_price(wpinv_format_amount($invoice->get_subtotal()), $invoice->get_currency()),
48 48
             ),
49 49
 
50 50
             'discount'  => array(
51
-                'label' => __( 'Total Discount', 'invoicing' ),
52
-                'value' => wpinv_price( wpinv_format_amount( $invoice->get_total_discount() ), $invoice->get_currency() ),
51
+                'label' => __('Total Discount', 'invoicing'),
52
+                'value' => wpinv_price(wpinv_format_amount($invoice->get_total_discount()), $invoice->get_currency()),
53 53
             ),
54 54
 
55 55
             'tax'       => array(
56
-                'label' => __( 'Total Tax', 'invoicing' ),
57
-                'value' => wpinv_price( wpinv_format_amount( $invoice->get_total_tax() ), $invoice->get_currency() ),
56
+                'label' => __('Total Tax', 'invoicing'),
57
+                'value' => wpinv_price(wpinv_format_amount($invoice->get_total_tax()), $invoice->get_currency()),
58 58
             ),
59 59
 
60 60
             'total'     => array(
61
-                'label' => __( 'Invoice Total', 'invoicing' ),
61
+                'label' => __('Invoice Total', 'invoicing'),
62 62
                 'value' => $total,
63 63
             )
64 64
         );
65 65
 
66 66
 
67
-        if ( ! wpinv_use_taxes() ) {
68
-            unset( $totals['tax'] );
67
+        if (!wpinv_use_taxes()) {
68
+            unset($totals['tax']);
69 69
         }
70 70
         ?>
71 71
 
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
             }
82 82
         </style>
83 83
 
84
-                <div class="bsui getpaid-invoice-items-inner <?php echo sanitize_html_class( $invoice->get_template( 'edit' ) ); ?> <?php echo empty( $items ) ? 'no-items' : 'has-items'; ?> <?php echo $invoice->is_paid() || $invoice->is_refunded() ? 'not-editable' : 'editable'; ?>" style="margin-top: 1.5rem">
84
+                <div class="bsui getpaid-invoice-items-inner <?php echo sanitize_html_class($invoice->get_template('edit')); ?> <?php echo empty($items) ? 'no-items' : 'has-items'; ?> <?php echo $invoice->is_paid() || $invoice->is_refunded() ? 'not-editable' : 'editable'; ?>" style="margin-top: 1.5rem">
85 85
 
86
-                    <?php if ( ! $invoice->is_paid() && ! $invoice->is_refunded() ) : ?>
87
-                        <?php do_action( 'wpinv_meta_box_before_invoice_template_row', $invoice->get_id() ); ?>
86
+                    <?php if (!$invoice->is_paid() && !$invoice->is_refunded()) : ?>
87
+                        <?php do_action('wpinv_meta_box_before_invoice_template_row', $invoice->get_id()); ?>
88 88
 
89 89
                         <div class="row">
90 90
                             <div class="col-12 col-sm-6">
@@ -93,15 +93,15 @@  discard block
 block discarded – undo
93 93
                                         array(
94 94
                                             'id'          => 'wpinv_template',
95 95
                                             'name'        => 'wpinv_template',
96
-                                            'label'       => __( 'Template', 'invoicing' ),
96
+                                            'label'       => __('Template', 'invoicing'),
97 97
                                             'label_type'  => 'vertical',
98
-                                            'placeholder' => __( 'Choose a template', 'invoicing' ),
98
+                                            'placeholder' => __('Choose a template', 'invoicing'),
99 99
                                             'class'       => 'form-control-sm',
100
-                                            'value'       => $invoice->get_template( 'edit' ),
100
+                                            'value'       => $invoice->get_template('edit'),
101 101
                                             'options'     => array(
102
-                                                'quantity' => __( 'Quantity', 'invoicing' ),
103
-                                                'hours'    => __( 'Hours', 'invoicing' ),
104
-                                                'amount'   => __( 'Amount Only', 'invoicing' ),
102
+                                                'quantity' => __('Quantity', 'invoicing'),
103
+                                                'hours'    => __('Hours', 'invoicing'),
104
+                                                'amount'   => __('Amount Only', 'invoicing'),
105 105
                                             ),
106 106
                                             'data-allow-clear' => 'false',
107 107
                                             'select2'          => true,
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
                                         array(
118 118
                                             'id'          => 'wpinv_currency',
119 119
                                             'name'        => 'wpinv_currency',
120
-                                            'label'       => __( 'Currency', 'invoicing' ),
120
+                                            'label'       => __('Currency', 'invoicing'),
121 121
                                             'label_type'  => 'vertical',
122
-                                            'placeholder' => __( 'Select Invoice Currency', 'invoicing' ),
122
+                                            'placeholder' => __('Select Invoice Currency', 'invoicing'),
123 123
                                             'class'       => 'form-control-sm',
124
-                                            'value'       => $invoice->get_currency( 'edit' ),
124
+                                            'value'       => $invoice->get_currency('edit'),
125 125
                                             'required'    => false,
126 126
                                             'data-allow-clear' => 'false',
127 127
                                             'select2'          => true,
@@ -133,24 +133,24 @@  discard block
 block discarded – undo
133 133
                             </div>
134 134
                         </div>
135 135
 
136
-                        <?php do_action( 'wpinv_meta_box_invoice_template_row', $invoice->get_id() ); ?>
136
+                        <?php do_action('wpinv_meta_box_invoice_template_row', $invoice->get_id()); ?>
137 137
                     <?php endif; ?>
138 138
 
139 139
                     <table cellpadding="0" cellspacing="0" class="getpaid_invoice_items">
140 140
                         <thead>
141 141
                             <tr>
142
-                                <th class="getpaid-item" colspan="2"><?php _e( 'Item', 'invoicing' ) ?></th>
142
+                                <th class="getpaid-item" colspan="2"><?php _e('Item', 'invoicing') ?></th>
143 143
                                 <th class="getpaid-quantity hide-if-amount text-right">
144
-                                    <span class="getpaid-hide-if-hours"><?php _e( 'Quantity', 'invoicing' ) ?></span>
145
-                                    <span class="getpaid-hide-if-quantity"><?php _e( 'Hours', 'invoicing' ) ?></span>
144
+                                    <span class="getpaid-hide-if-hours"><?php _e('Quantity', 'invoicing') ?></span>
145
+                                    <span class="getpaid-hide-if-quantity"><?php _e('Hours', 'invoicing') ?></span>
146 146
                                 </th>
147 147
                                 <th class="getpaid-price hide-if-amount text-right">
148
-                                    <span class="getpaid-hide-if-hours"><?php _e( 'Price', 'invoicing' ) ?></span>
149
-                                    <span class="getpaid-hide-if-quantity"><?php _e( 'Rate', 'invoicing' ) ?></span>
148
+                                    <span class="getpaid-hide-if-hours"><?php _e('Price', 'invoicing') ?></span>
149
+                                    <span class="getpaid-hide-if-quantity"><?php _e('Rate', 'invoicing') ?></span>
150 150
                                 </th>
151 151
                                 <th class="getpaid-item-subtotal text-right">
152
-                                    <span class="getpaid-hide-if-hours getpaid-hide-if-quantity"><?php _e( 'Amount', 'invoicing' ) ?></span>
153
-                                    <span class="hide-if-amount"><?php _e( 'Total', 'invoicing' ) ?></span>
152
+                                    <span class="getpaid-hide-if-hours getpaid-hide-if-quantity"><?php _e('Amount', 'invoicing') ?></span>
153
+                                    <span class="hide-if-amount"><?php _e('Total', 'invoicing') ?></span>
154 154
                                 </th>
155 155
                                 <th class="getpaid-item-actions hide-if-not-editable" width="70px">&nbsp;</th>
156 156
                             </tr>
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 		                <tbody class="getpaid_invoice_line_items">
159 159
                             <tr class="hide-if-has-items hide-if-not-editable">
160 160
                                 <td colspan="2" class="pt-4 pb-4">
161
-                                    <button type="button" class="button button-primary add-invoice-item" data-toggle="modal" data-target="#getpaid-add-items-to-invoice"><?php _e( 'Add Existing Items', 'invoicing' ) ?></button>
162
-	                                <a href="<?php echo esc_url( $new_item ); ?>" target="_blank" class="button button-secondary"><?php _e( 'Create New Item', 'invoicing' ) ?></a>
161
+                                    <button type="button" class="button button-primary add-invoice-item" data-toggle="modal" data-target="#getpaid-add-items-to-invoice"><?php _e('Add Existing Items', 'invoicing') ?></button>
162
+	                                <a href="<?php echo esc_url($new_item); ?>" target="_blank" class="button button-secondary"><?php _e('Create New Item', 'invoicing') ?></a>
163 163
                                 </td>
164 164
                                 <td class="hide-if-amount">&nbsp;</th>
165 165
                                 <td class="hide-if-amount">&nbsp;</th>
@@ -191,11 +191,11 @@  discard block
 block discarded – undo
191 191
                             <div class="col-12 col-sm-6 offset-sm-6">
192 192
                                 <table class="getpaid-invoice-totals text-right w-100">
193 193
                                     <tbody>
194
-                                        <?php foreach ( apply_filters( 'getpaid_invoice_subtotal_rows', $totals, $invoice ) as $key => $data ) : ?>
195
-                                            <tr class="getpaid-totals-<?php echo sanitize_html_class( $key ); ?>">
196
-                                                <td class="label"><?php echo sanitize_text_field( $data['label'] ) ?>:</td>
194
+                                        <?php foreach (apply_filters('getpaid_invoice_subtotal_rows', $totals, $invoice) as $key => $data) : ?>
195
+                                            <tr class="getpaid-totals-<?php echo sanitize_html_class($key); ?>">
196
+                                                <td class="label"><?php echo sanitize_text_field($data['label']) ?>:</td>
197 197
                                                 <td width="1%"></td>
198
-                                                <td class="value"><?php echo wp_kses_post( $data['value'] ) ?></td>
198
+                                                <td class="value"><?php echo wp_kses_post($data['value']) ?></td>
199 199
                                             </tr>
200 200
                                         <?php endforeach; ?>
201 201
                                     </tbody>
@@ -208,18 +208,18 @@  discard block
 block discarded – undo
208 208
                     <div class="getpaid-invoice-item-actions hide-if-no-items hide-if-not-editable">
209 209
                         <div class="row">
210 210
                             <div class="text-left col-12 col-sm-8">
211
-                                <button type="button" class="button add-invoice-item" data-toggle="modal" data-target="#getpaid-add-items-to-invoice"><?php _e( 'Add Existing Item', 'invoicing' ) ?></button>
212
-                                <a href="<?php echo esc_url( $new_item ); ?>" target="_blank" class="button button-secondary"><?php _e( 'Create New Item', 'invoicing' ) ?></a>
213
-                                <?php do_action( 'getpaid-invoice-items-actions', $invoice ); ?>
211
+                                <button type="button" class="button add-invoice-item" data-toggle="modal" data-target="#getpaid-add-items-to-invoice"><?php _e('Add Existing Item', 'invoicing') ?></button>
212
+                                <a href="<?php echo esc_url($new_item); ?>" target="_blank" class="button button-secondary"><?php _e('Create New Item', 'invoicing') ?></a>
213
+                                <?php do_action('getpaid-invoice-items-actions', $invoice); ?>
214 214
                             </div>
215 215
                             <div class="text-right col-12 col-sm-4">
216
-                                <button type="button" class="button button-primary recalculate-totals-button"><?php _e( 'Recalculate Totals', 'invoicing' ) ?></button>
216
+                                <button type="button" class="button button-primary recalculate-totals-button"><?php _e('Recalculate Totals', 'invoicing') ?></button>
217 217
                             </div>
218 218
                         </div>
219 219
                     </div>
220 220
 
221 221
                     <div class="getpaid-invoice-item-actions hide-if-editable">
222
-                        <p class="description m-2 text-right text-muted"><?php _e( 'This invoice is no longer editable', 'invoicing' ); ?></p>
222
+                        <p class="description m-2 text-right text-muted"><?php _e('This invoice is no longer editable', 'invoicing'); ?></p>
223 223
                     </div>
224 224
 
225 225
                     <!-- Add items to an invoice -->
@@ -227,8 +227,8 @@  discard block
 block discarded – undo
227 227
                         <div class="modal-dialog modal-dialog-centered" role="document">
228 228
                             <div class="modal-content">
229 229
                                 <div class="modal-header">
230
-                                    <h5 class="modal-title" id="getpaid-add-item-to-invoice-label"><?php _e( "Add Item(s)", 'invoicing' ); ?></h5>
231
-                                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php _e( "Close", 'invoicing' ); ?>">
230
+                                    <h5 class="modal-title" id="getpaid-add-item-to-invoice-label"><?php _e("Add Item(s)", 'invoicing'); ?></h5>
231
+                                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php _e("Close", 'invoicing'); ?>">
232 232
                                         <span aria-hidden="true">&times;</span>
233 233
                                     </button>
234 234
                                 </div>
@@ -236,17 +236,17 @@  discard block
 block discarded – undo
236 236
                                     <table class="widefat">
237 237
                                         <thead>
238 238
                                             <tr>
239
-                                                <th class="pl-0 text-left"><?php _e( 'Item', 'invoicing' ) ?></th>
239
+                                                <th class="pl-0 text-left"><?php _e('Item', 'invoicing') ?></th>
240 240
                                                 <th class="pr-0 text-right hide-if-amount">
241
-                                                    <span class="getpaid-hide-if-hours"><?php _e( 'Quantity', 'invoicing' ) ?></span>
242
-                                                    <span class="getpaid-hide-if-quantity"><?php _e( 'Hours', 'invoicing' ) ?></span>
241
+                                                    <span class="getpaid-hide-if-hours"><?php _e('Quantity', 'invoicing') ?></span>
242
+                                                    <span class="getpaid-hide-if-quantity"><?php _e('Hours', 'invoicing') ?></span>
243 243
                                                 </th>
244 244
                                             </tr>
245 245
                                         </thead>
246 246
 										<tbody>
247 247
 								            <tr>
248 248
 									            <td class="pl-0 text-left">
249
-                                                    <select class="getpaid-item-search regular-text" data-placeholder="<?php esc_attr_e( 'Search for an item…', 'invoicing' ); ?>"></select>
249
+                                                    <select class="getpaid-item-search regular-text" data-placeholder="<?php esc_attr_e('Search for an item…', 'invoicing'); ?>"></select>
250 250
                                                 </td>
251 251
 									            <td class="pr-0 text-right hide-if-amount">
252 252
                                                     <input type="number" class="w100" step="1" min="1" autocomplete="off" value="1" placeholder="1">
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
 						            </table>
257 257
                                 </div>
258 258
                                 <div class="modal-footer">
259
-                                    <button type="button" class="btn btn-secondary getpaid-cancel" data-dismiss="modal"><?php _e( 'Cancel', 'invoicing' ); ?></button>
260
-                                    <button type="button" class="btn btn-primary getpaid-add" data-dismiss="modal"><?php _e( 'Add', 'invoicing' ); ?></button>
259
+                                    <button type="button" class="btn btn-secondary getpaid-cancel" data-dismiss="modal"><?php _e('Cancel', 'invoicing'); ?></button>
260
+                                    <button type="button" class="btn btn-primary getpaid-add" data-dismiss="modal"><?php _e('Add', 'invoicing'); ?></button>
261 261
                                 </div>
262 262
                             </div>
263 263
                         </div>
@@ -268,8 +268,8 @@  discard block
 block discarded – undo
268 268
                         <div class="modal-dialog modal-dialog-centered" role="document">
269 269
                             <div class="modal-content">
270 270
                                 <div class="modal-header">
271
-                                    <h5 class="modal-title" id="getpaid-edit-invoice-item-label"><?php _e( "Edit Item", 'invoicing' ); ?></h5>
272
-                                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php _e( "Close", 'invoicing' ); ?>">
271
+                                    <h5 class="modal-title" id="getpaid-edit-invoice-item-label"><?php _e("Edit Item", 'invoicing'); ?></h5>
272
+                                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php _e("Close", 'invoicing'); ?>">
273 273
                                         <span aria-hidden="true">&times;</span>
274 274
                                     </button>
275 275
                                 </div>
@@ -277,27 +277,27 @@  discard block
 block discarded – undo
277 277
                                     <div class="getpaid-edit-item-div">
278 278
                                         <input type="hidden" name="id" class="form-control form-control-sm item-id">
279 279
                                         <label class="form-group w-100">
280
-                                            <span><?php _e( 'Name', 'invoicing' ); ?></span>
281
-                                            <input type="text" name="name" placeholder="<?php esc_attr_e( 'Item Name', 'invoicing' ); ?>" class="form-control form-control-sm item-name">
280
+                                            <span><?php _e('Name', 'invoicing'); ?></span>
281
+                                            <input type="text" name="name" placeholder="<?php esc_attr_e('Item Name', 'invoicing'); ?>" class="form-control form-control-sm item-name">
282 282
                                         </label>
283 283
                                         <label class="form-group w-100">
284
-                                            <span class="getpaid-hide-if-hours getpaid-hide-if-quantity item-price"><?php _e( 'Amount', 'invoicing' ); ?></span>
285
-                                            <span class="hide-if-amount"><?php _e( 'Price', 'invoicing' ); ?></span>
286
-                                            <input type="text" name="price" placeholder="<?php wpinv_sanitize_amount( 0 ); ?>" class="form-control form-control-sm item-price">
284
+                                            <span class="getpaid-hide-if-hours getpaid-hide-if-quantity item-price"><?php _e('Amount', 'invoicing'); ?></span>
285
+                                            <span class="hide-if-amount"><?php _e('Price', 'invoicing'); ?></span>
286
+                                            <input type="text" name="price" placeholder="<?php wpinv_sanitize_amount(0); ?>" class="form-control form-control-sm item-price">
287 287
                                         </label>
288 288
                                         <label class="form-group w-100 hide-if-amount">
289
-                                            <span><?php _e( 'Quantity', 'invoicing' ); ?></span>
289
+                                            <span><?php _e('Quantity', 'invoicing'); ?></span>
290 290
                                             <input type="number" name="quantity" placeholder="1" class="form-control form-control-sm item-quantity">
291 291
                                         </label>
292 292
                                         <label class="form-group w-100">
293
-                                            <span><?php _e( 'Item Description', 'invoicing' ); ?></span>
294
-                                            <textarea name="description" placeholder="<?php esc_attr_e( 'Enter a description for this item', 'invoicing' ); ?>" class="form-control item-description"></textarea>
293
+                                            <span><?php _e('Item Description', 'invoicing'); ?></span>
294
+                                            <textarea name="description" placeholder="<?php esc_attr_e('Enter a description for this item', 'invoicing'); ?>" class="form-control item-description"></textarea>
295 295
                                         </label>
296 296
                                     </div>
297 297
                                 </div>
298 298
                                 <div class="modal-footer">
299
-                                    <button type="button" class="btn btn-secondary getpaid-cancel" data-dismiss="modal"><?php _e( 'Cancel', 'invoicing' ); ?></button>
300
-                                    <button type="button" class="btn btn-primary getpaid-save" data-dismiss="modal"><?php _e( 'Save', 'invoicing' ); ?></button>
299
+                                    <button type="button" class="btn btn-secondary getpaid-cancel" data-dismiss="modal"><?php _e('Cancel', 'invoicing'); ?></button>
300
+                                    <button type="button" class="btn btn-primary getpaid-save" data-dismiss="modal"><?php _e('Save', 'invoicing'); ?></button>
301 301
                                 </div>
302 302
                             </div>
303 303
                         </div>
Please login to merge, or discard this patch.