Passed
Push — master ( 07aba6...afad5e )
by Stiofan
05:16
created
includes/admin/meta-boxes/class-getpaid-meta-box-invoice-details.php 1 patch
Spacing   +55 added lines, -55 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,13 +21,13 @@  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
         // Nonce field.
30
-        wp_nonce_field( 'wpinv_details', 'wpinv_details_nonce' ) ;
30
+        wp_nonce_field('wpinv_details', 'wpinv_details_nonce');
31 31
 
32 32
 
33 33
         ?>
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 
47 47
                 <div class="bsui" style="margin-top: 1.5rem">
48 48
 
49
-                    <?php do_action( 'getpaid_invoice_edit_before_viewed_by_customer', $invoice ); ?>
50
-                    <?php if ( ! $invoice->is_draft() ) : ?>
49
+                    <?php do_action('getpaid_invoice_edit_before_viewed_by_customer', $invoice); ?>
50
+                    <?php if (!$invoice->is_draft()) : ?>
51 51
                         <div class="form-group">
52
-                            <strong><?php _e( 'Viewed by Customer:', 'invoicing' );?></strong>
53
-                            <?php ( $invoice->get_is_viewed() ) ? _e( 'Yes', 'invoicing' ) : _e( 'No', 'invoicing' ); ?>
52
+                            <strong><?php _e('Viewed by Customer:', 'invoicing'); ?></strong>
53
+                            <?php ($invoice->get_is_viewed()) ? _e('Yes', 'invoicing') : _e('No', 'invoicing'); ?>
54 54
                         </div>
55 55
                     <?php endif; ?>
56 56
 
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
 
59 59
                         // Date created.
60 60
                         $label = sprintf(
61
-                            __( '%s Date:', 'invoicing' ),
62
-                            ucfirst( $invoice->get_invoice_quote_type() )
61
+                            __('%s Date:', 'invoicing'),
62
+                            ucfirst($invoice->get_invoice_quote_type())
63 63
                         );
64 64
 
65
-                        $info  = sprintf(
66
-                            __( 'The date this %s was created.', 'invoicing' ),
67
-                            strtolower( $invoice->get_invoice_quote_type() )
65
+                        $info = sprintf(
66
+                            __('The date this %s was created.', 'invoicing'),
67
+                            strtolower($invoice->get_invoice_quote_type())
68 68
                         );
69 69
 
70 70
                         echo aui()->input(
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
                                 'type'        => 'datepicker',
73 73
                                 'id'          => 'wpinv_date_created',
74 74
                                 'name'        => 'date_created',
75
-                                'label'       => $label . getpaid_get_help_tip( $info ),
75
+                                'label'       => $label . getpaid_get_help_tip($info),
76 76
                                 'label_type'  => 'vertical',
77 77
                                 'placeholder' => 'YYYY-MM-DD 00:00',
78 78
                                 'class'       => 'form-control-sm',
79
-                                'value'       => $invoice->get_date_created( 'edit' ),
79
+                                'value'       => $invoice->get_date_created('edit'),
80 80
                                 'extra_attributes' => array(
81 81
                                     'data-enable-time' => 'true',
82 82
                                     'data-time_24hr'   => 'true',
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
                         );
88 88
 
89 89
                         // Date paid.
90
-                        $date_paid = $invoice->get_date_completed( 'edit' );
91
-                        if ( ! empty( $date_paid ) && $invoice->is_paid() ) {
90
+                        $date_paid = $invoice->get_date_completed('edit');
91
+                        if (!empty($date_paid) && $invoice->is_paid()) {
92 92
 
93 93
                             echo aui()->input(
94 94
                                 array(
95 95
                                     'type'        => 'text',
96 96
                                     'id'          => 'wpinv_date_completed',
97 97
                                     'name'        => 'wpinv_date_completed',
98
-                                    'label'       => __( 'Date Completed:', 'invoicing' ),
98
+                                    'label'       => __('Date Completed:', 'invoicing'),
99 99
                                     'label_type'  => 'vertical',
100 100
                                     'class'       => 'form-control-sm',
101 101
                                     'value'       => $date_paid,
@@ -105,18 +105,18 @@  discard block
 block discarded – undo
105 105
                         }
106 106
 
107 107
                         // Due date.
108
-                        if ( $invoice->is_type( 'invoice' ) && wpinv_get_option( 'overdue_active' ) && ( ! $invoice->is_paid() || $invoice->is_draft() ) ) {
108
+                        if ($invoice->is_type('invoice') && wpinv_get_option('overdue_active') && (!$invoice->is_paid() || $invoice->is_draft())) {
109 109
 
110 110
                             echo aui()->input(
111 111
                                 array(
112 112
                                     'type'        => 'datepicker',
113 113
                                     'id'          => 'wpinv_due_date',
114 114
                                     'name'        => 'wpinv_due_date',
115
-                                    'label'       => __( 'Due Date:', 'invoicing' ) . getpaid_get_help_tip( __( 'Leave blank to disable automated reminder emails for this invoice.', 'invoicing' ) ),
115
+                                    'label'       => __('Due Date:', 'invoicing') . getpaid_get_help_tip(__('Leave blank to disable automated reminder emails for this invoice.', 'invoicing')),
116 116
                                     'label_type'  => 'vertical',
117
-                                    'placeholder' => __( 'No due date', 'invoicing' ),
117
+                                    'placeholder' => __('No due date', 'invoicing'),
118 118
                                     'class'       => 'form-control-sm',
119
-                                    'value'       => $invoice->get_due_date( 'edit' ),
119
+                                    'value'       => $invoice->get_due_date('edit'),
120 120
                                     'extra_attributes' => array(
121 121
                                         'data-enable-time' => 'true',
122 122
                                         'data-time_24hr'   => 'true',
@@ -128,39 +128,39 @@  discard block
 block discarded – undo
128 128
 
129 129
                         }
130 130
 
131
-                        do_action( 'wpinv_meta_box_details_after_due_date', $invoice->get_id() );
132
-                        do_action( 'getpaid_metabox_after_due_date', $invoice );
131
+                        do_action('wpinv_meta_box_details_after_due_date', $invoice->get_id());
132
+                        do_action('getpaid_metabox_after_due_date', $invoice);
133 133
 
134 134
                         // Status.
135 135
                         $label = sprintf(
136
-                            __( '%s Status:', 'invoicing' ),
137
-                            ucfirst( $invoice->get_invoice_quote_type() )
136
+                            __('%s Status:', 'invoicing'),
137
+                            ucfirst($invoice->get_invoice_quote_type())
138 138
                         );
139 139
 
140
-                        $status = $invoice->get_status( 'edit' );
140
+                        $status = $invoice->get_status('edit');
141 141
                         echo aui()->select(
142 142
                             array(
143 143
                                 'id'               => 'wpinv_status',
144 144
                                 'name'             => 'wpinv_status',
145 145
                                 'label'            => $label,
146 146
                                 'label_type'       => 'vertical',
147
-                                'placeholder'      => __( 'Select Status', 'invoicing' ),
148
-                                'value'            => array_key_exists( $status, $invoice->get_all_statuses() ) ? $status : $invoice->get_default_status(),
147
+                                'placeholder'      => __('Select Status', 'invoicing'),
148
+                                'value'            => array_key_exists($status, $invoice->get_all_statuses()) ? $status : $invoice->get_default_status(),
149 149
                                 'select2'          => true,
150 150
                                 'data-allow-clear' => 'false',
151
-                                'options'          => wpinv_get_invoice_statuses( true, false, $invoice )
151
+                                'options'          => wpinv_get_invoice_statuses(true, false, $invoice)
152 152
                             )
153 153
                         );
154 154
 
155 155
                         // Invoice number.
156 156
                         $label = sprintf(
157
-                            __( '%s Number:', 'invoicing' ),
158
-                            ucfirst( $invoice->get_invoice_quote_type() )
157
+                            __('%s Number:', 'invoicing'),
158
+                            ucfirst($invoice->get_invoice_quote_type())
159 159
                         );
160 160
 
161
-                        $info  = sprintf(
162
-                            __( 'Each %s number must be unique.', 'invoicing' ),
163
-                            strtolower( $invoice->get_invoice_quote_type() )
161
+                        $info = sprintf(
162
+                            __('Each %s number must be unique.', 'invoicing'),
163
+                            strtolower($invoice->get_invoice_quote_type())
164 164
                         );
165 165
 
166 166
                         echo aui()->input(
@@ -168,11 +168,11 @@  discard block
 block discarded – undo
168 168
                                 'type'        => 'text',
169 169
                                 'id'          => 'wpinv_number',
170 170
                                 'name'        => 'wpinv_number',
171
-                                'label'       => $label . getpaid_get_help_tip( $info ),
171
+                                'label'       => $label . getpaid_get_help_tip($info),
172 172
                                 'label_type'  => 'vertical',
173
-                                'placeholder' => __( 'Autogenerate', 'invoicing' ),
173
+                                'placeholder' => __('Autogenerate', 'invoicing'),
174 174
                                 'class'       => 'form-control-sm',
175
-                                'value'       => $invoice->get_number( 'edit' ),
175
+                                'value'       => $invoice->get_number('edit'),
176 176
                             )
177 177
                         );
178 178
 
@@ -182,15 +182,15 @@  discard block
 block discarded – undo
182 182
                                 'type'        => 'text',
183 183
                                 'id'          => 'wpinv_cc',
184 184
                                 'name'        => 'wpinv_cc',
185
-                                'label'       => __( 'Email CC:', 'invoicing' ) . getpaid_get_help_tip( __( 'Enter a comma separated list of other emails that should be notified about the invoice.', 'invoicing' ) ),
185
+                                'label'       => __('Email CC:', 'invoicing') . getpaid_get_help_tip(__('Enter a comma separated list of other emails that should be notified about the invoice.', 'invoicing')),
186 186
                                 'label_type'  => 'vertical',
187
-                                'placeholder' => __( '[email protected], [email protected]', 'invoicing' ),
187
+                                'placeholder' => __('[email protected], [email protected]', 'invoicing'),
188 188
                                 'class'       => 'form-control-sm',
189
-                                'value'       => $invoice->get_email_cc( 'edit' ),
189
+                                'value'       => $invoice->get_email_cc('edit'),
190 190
                             )
191 191
                         );
192 192
 
193
-                        if ( ! $invoice->is_paid() && ! $invoice->is_refunded() ) {
193
+                        if (!$invoice->is_paid() && !$invoice->is_refunded()) {
194 194
 
195 195
                             // Apply a discount.
196 196
                             echo aui()->input(
@@ -198,25 +198,25 @@  discard block
 block discarded – undo
198 198
                                     'type'        => 'text',
199 199
                                     'id'          => 'wpinv_discount_code',
200 200
                                     'name'        => 'wpinv_discount_code',
201
-                                    'label'       => __( 'Discount Code:', 'invoicing' ),
202
-                                    'placeholder' => __( 'Apply Discount', 'invoicing' ),
201
+                                    'label'       => __('Discount Code:', 'invoicing'),
202
+                                    'placeholder' => __('Apply Discount', 'invoicing'),
203 203
                                     'label_type'  => 'vertical',
204 204
                                     'class'       => 'form-control-sm getpaid-recalculate-prices-on-change',
205
-                                    'value'       => $invoice->get_discount_code( 'edit' ),
205
+                                    'value'       => $invoice->get_discount_code('edit'),
206 206
                                 )
207 207
                             );
208 208
 
209
-                        } else if ( $invoice->get_discount_code( 'edit' ) ) {
209
+                        } else if ($invoice->get_discount_code('edit')) {
210 210
 
211 211
                             echo aui()->input(
212 212
                                 array(
213 213
                                     'type'        => 'text',
214 214
                                     'id'          => 'wpinv_discount_code',
215 215
                                     'name'        => 'wpinv_discount_code',
216
-                                    'label'       => __( 'Discount Code:', 'invoicing' ),
216
+                                    'label'       => __('Discount Code:', 'invoicing'),
217 217
                                     'label_type'  => 'vertical',
218 218
                                     'class'       => 'form-control-sm',
219
-                                    'value'       => $invoice->get_discount_code( 'edit' ),
219
+                                    'value'       => $invoice->get_discount_code('edit'),
220 220
                                     'extra_attributes' => array(
221 221
                                         'onclick'  => 'this.select();',
222 222
                                         'readonly' => 'true',
@@ -226,17 +226,17 @@  discard block
 block discarded – undo
226 226
 
227 227
                         }
228 228
 
229
-                        do_action( 'wpinv_meta_box_details_inner', $invoice->get_id() );
229
+                        do_action('wpinv_meta_box_details_inner', $invoice->get_id());
230 230
 
231 231
                         // Disable taxes.
232
-                        if ( wpinv_use_taxes() && ! ( $invoice->is_paid() || $invoice->is_refunded() ) ) {
232
+                        if (wpinv_use_taxes() && !($invoice->is_paid() || $invoice->is_refunded())) {
233 233
 
234 234
                             echo aui()->input(
235 235
                                 array(
236 236
                                     'id'          => 'wpinv_taxable',
237 237
                                     'name'        => 'disable_taxes',
238 238
                                     'type'        => 'checkbox',
239
-                                    'label'       => __( 'Disable taxes', 'invoicing' ),
239
+                                    'label'       => __('Disable taxes', 'invoicing'),
240 240
                                     'value'       => '1',
241 241
                                     'checked'     => (bool) $invoice->get_disable_taxes(),
242 242
                                     'class'       => 'getpaid-recalculate-prices-on-change',
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 
246 246
                         }
247 247
 
248
-                        if ( $invoice->is_type( 'invoice' ) ) {
248
+                        if ($invoice->is_type('invoice')) {
249 249
 
250 250
                             // Send to customer.
251 251
                             echo aui()->input(
@@ -253,15 +253,15 @@  discard block
 block discarded – undo
253 253
                                     'id'          => 'wpinv_send_to_customer',
254 254
                                     'name'        => 'send_to_customer',
255 255
                                     'type'        => 'checkbox',
256
-                                    'label'       => __( 'Send invoice to customer after saving', 'invoicing' ),
256
+                                    'label'       => __('Send invoice to customer after saving', 'invoicing'),
257 257
                                     'value'       => '1',
258
-                                    'checked'     => $invoice->is_draft() && (bool) wpinv_get_option( 'email_user_invoice_active', true ),
258
+                                    'checked'     => $invoice->is_draft() && (bool) wpinv_get_option('email_user_invoice_active', true),
259 259
                                 )
260 260
                             );
261 261
 
262 262
                         }
263 263
 
264
-                        do_action( 'getpaid_metabox_after_invoice_details', $invoice );
264
+                        do_action('getpaid_metabox_after_invoice_details', $invoice);
265 265
 
266 266
                     ?>
267 267
 
Please login to merge, or discard this patch.
includes/admin/views/wizard-thank-you.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -4,68 +4,68 @@
 block discarded – undo
4 4
  *
5 5
  */
6 6
 
7
-defined( 'ABSPATH' ) || exit;
7
+defined('ABSPATH') || exit;
8 8
 
9 9
 ?>
10 10
 
11 11
 <div class="card shadow-sm my-5">
12 12
 	<div class="text-center card-body">
13
-		<h1 class="h3"><?php esc_html_e( 'Awesome, you are ready to Get Paid', 'invoicing' ); ?></h1>
13
+		<h1 class="h3"><?php esc_html_e('Awesome, you are ready to Get Paid', 'invoicing'); ?></h1>
14 14
 
15 15
 		<div class="geodirectory-message geodirectory-tracker">
16
-			<p><?php _e( 'Thank you for choosing GetPaid!', 'invoicing' ); ?> <i class="far fa-smile-beam"></i></p>
16
+			<p><?php _e('Thank you for choosing GetPaid!', 'invoicing'); ?> <i class="far fa-smile-beam"></i></p>
17 17
 		</div>
18 18
 
19 19
 		<div class="gp-setup-next-steps">
20 20
 			<div class="gp-setup-next-steps-first mb-4">
21 21
 				<div>
22
-					<h2 class="h3"><i class="fas fa-arrow-down"></i> <?php esc_html_e( 'Watch This', 'invoicing' ); ?> <i class="fas fa-arrow-down"></i></h2>
22
+					<h2 class="h3"><i class="fas fa-arrow-down"></i> <?php esc_html_e('Watch This', 'invoicing'); ?> <i class="fas fa-arrow-down"></i></h2>
23 23
 					<div class="embed-responsive embed-responsive-16by9 mb-4">
24 24
 						<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/TXZuPXHjt9E?rel=0" allowfullscreen></iframe>
25 25
 					</div>
26 26
 				</div>
27
-				<h2 class="h3"><?php esc_html_e( 'Next steps', 'invoicing' ); ?></h2>
27
+				<h2 class="h3"><?php esc_html_e('Next steps', 'invoicing'); ?></h2>
28 28
 
29 29
 				<div class="d-flex justify-content-between">
30 30
 					<a
31 31
 						class="btn btn-outline-primary btn-sm"
32
-						href="<?php echo esc_url( admin_url( 'post-new.php?post_type=wpi_item' ) ); ?>">
32
+						href="<?php echo esc_url(admin_url('post-new.php?post_type=wpi_item')); ?>">
33 33
 						<span class="h1 d-block"><i class="fas fa-box-open"></i></span>
34
-						<?php esc_html_e( 'Create Item', 'invoicing' ); ?>
34
+						<?php esc_html_e('Create Item', 'invoicing'); ?>
35 35
 					</a>
36 36
 					<a
37 37
 						class="btn btn-outline-primary btn-sm"
38
-						href="<?php echo esc_url( admin_url( 'post-new.php?post_type=wpi_payment_form' ) ); ?>">
38
+						href="<?php echo esc_url(admin_url('post-new.php?post_type=wpi_payment_form')); ?>">
39 39
 						<span class="h1 d-block"><i class="fas fa-align-justify"></i></span>
40
-						<?php esc_html_e( 'Create Payment Form', 'invoicing' ); ?>
40
+						<?php esc_html_e('Create Payment Form', 'invoicing'); ?>
41 41
 					</a>
42 42
 					<a
43 43
 						class="btn btn-outline-primary btn-sm"
44
-						href="<?php echo esc_url( admin_url( 'post-new.php?post_type=wpi_invoice' ) ); ?>">
44
+						href="<?php echo esc_url(admin_url('post-new.php?post_type=wpi_invoice')); ?>">
45 45
 						<span class="h1 d-block"><i class="fas fa-file-alt"></i></span>
46
-						<?php esc_html_e( 'Create Invoice', 'invoicing' ); ?>
46
+						<?php esc_html_e('Create Invoice', 'invoicing'); ?>
47 47
 					</a>
48 48
 				</div>
49 49
 
50 50
 
51 51
 
52
-						<h2 class="h3 mt-4"><?php _e( 'Learn more', 'invoicing' ); ?></h2>
52
+						<h2 class="h3 mt-4"><?php _e('Learn more', 'invoicing'); ?></h2>
53 53
 				<div class="gp-setup-next-steps-last mt-2 d-flex justify-content-between">
54 54
 						<a
55 55
 							class="btn btn-outline-primary btn-sm" href="https://docs.wpgetpaid.com/collection/114-getting-started?utm_source=setupwizard&utm_medium=product&utm_content=getting-started&utm_campaign=invoicingplugin"
56
-							target="_blank"><?php esc_html_e( 'Getting Started', 'invoicing' ); ?></a>
56
+							target="_blank"><?php esc_html_e('Getting Started', 'invoicing'); ?></a>
57 57
 						<a
58 58
 							class="btn btn-outline-primary btn-sm"
59 59
 							href="https://docs.wpgetpaid.com/?utm_source=setupwizard&utm_medium=product&utm_content=docs&utm_campaign=invoicingplugin"
60
-							target="_blank"><?php esc_html_e( 'Documentation', 'invoicing' ); ?></a>
60
+							target="_blank"><?php esc_html_e('Documentation', 'invoicing'); ?></a>
61 61
 						<a
62 62
 							class="btn btn-outline-primary btn-sm"
63 63
 							href="https://wpgetpaid.com/support/?utm_source=setupwizard&utm_medium=product&utm_content=docs&utm_campaign=invoicingyplugin"
64
-							target="_blank"><?php esc_html_e( 'Support', 'invoicing' ); ?></a>
64
+							target="_blank"><?php esc_html_e('Support', 'invoicing'); ?></a>
65 65
 						<a
66 66
 							class="btn btn-outline-primary btn-sm"
67 67
 							href="https://demos.ayecode.io/getpaid/?utm_source=setupwizard&utm_medium=product&utm_content=demos&utm_campaign=invoicingyplugin"
68
-							target="_blank"><?php esc_html_e( 'Demos', 'invoicing' ); ?></a>
68
+							target="_blank"><?php esc_html_e('Demos', 'invoicing'); ?></a>
69 69
 					</div>
70 70
 			</div>
71 71
 		</div>
Please login to merge, or discard this patch.
vendor/ayecode/wp-deactivation-survey/plugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
  * Tested up to: 5.8
15 15
  */
16 16
 
17
-if ( ! defined( 'ABSPATH' ) ) {
17
+if (!defined('ABSPATH')) {
18 18
 	exit;
19 19
 }
20 20
 
21
-if ( ! class_exists( 'AyeCode_Deactivation_Survey' ) ) {
21
+if (!class_exists('AyeCode_Deactivation_Survey')) {
22 22
 	// include the class if needed
23
-	include_once( dirname( __FILE__ ) . "/wp-deactivation-survey.php" );
23
+	include_once(dirname(__FILE__) . "/wp-deactivation-survey.php");
24 24
 }
25 25
 
26 26
 
Please login to merge, or discard this patch.
includes/admin/class-getpaid-installer.php 1 patch
Spacing   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @since   2.0.2
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 /**
14 14
  * The main installer/updater class.
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 	 *
26 26
 	 * @param string $upgrade_from The current invoicing version.
27 27
 	 */
28
-	public function upgrade_db( $upgrade_from ) {
28
+	public function upgrade_db($upgrade_from) {
29 29
 
30 30
 		// Save the current invoicing version.
31
-		update_option( 'wpinv_version', WPINV_VERSION );
31
+		update_option('wpinv_version', WPINV_VERSION);
32 32
 
33 33
 		// Setup the invoice Custom Post Type.
34 34
 		GetPaid_Post_Types::register_post_types();
@@ -48,13 +48,13 @@  discard block
 block discarded – undo
48 48
 		// Create any missing database tables.
49 49
 		$method = "upgrade_from_$upgrade_from";
50 50
 
51
-		$installed = get_option( 'gepaid_installed_on' );
51
+		$installed = get_option('gepaid_installed_on');
52 52
 
53
-		if ( empty( $installed ) ) {
54
-			update_option( 'gepaid_installed_on', time() );
53
+		if (empty($installed)) {
54
+			update_option('gepaid_installed_on', time());
55 55
 		}
56 56
 
57
-		if ( method_exists( $this, $method ) ) {
57
+		if (method_exists($this, $method)) {
58 58
 			$this->$method();
59 59
 		}
60 60
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 		$this->create_invoice_items_table();
71 71
 
72 72
 		// Save default tax rates.
73
-		update_option( 'wpinv_tax_rates', wpinv_get_data( 'tax-rates' ) );
73
+		update_option('wpinv_tax_rates', wpinv_get_data('tax-rates'));
74 74
 	}
75 75
 
76 76
 	/**
@@ -81,28 +81,28 @@  discard block
 block discarded – undo
81 81
 		global $wpdb;
82 82
 
83 83
 		// Invoices.
84
-		$results = $wpdb->get_results( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )" );
85
-		if ( ! empty( $results ) ) {
86
-			$wpdb->query( "UPDATE {$wpdb->posts} SET post_status = CONCAT( 'wpi-', post_status ) WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )" );
84
+		$results = $wpdb->get_results("SELECT ID FROM {$wpdb->posts} WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )");
85
+		if (!empty($results)) {
86
+			$wpdb->query("UPDATE {$wpdb->posts} SET post_status = CONCAT( 'wpi-', post_status ) WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )");
87 87
 
88 88
 			// Clean post cache
89
-			foreach ( $results as $row ) {
90
-				clean_post_cache( $row->ID );
89
+			foreach ($results as $row) {
90
+				clean_post_cache($row->ID);
91 91
 			}
92 92
 
93 93
 		}
94 94
 
95 95
 		// Item meta key changes
96 96
 		$query = "SELECT DISTINCT post_id FROM " . $wpdb->postmeta . " WHERE meta_key IN( '_wpinv_item_id', '_wpinv_package_id', '_wpinv_post_id', '_wpinv_cpt_name', '_wpinv_cpt_singular_name' )";
97
-		$results = $wpdb->get_results( $query );
97
+		$results = $wpdb->get_results($query);
98 98
 
99
-		if ( ! empty( $results ) ) {
100
-			$wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_id' WHERE meta_key IN( '_wpinv_item_id', '_wpinv_package_id', '_wpinv_post_id' )" );
101
-			$wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_name' WHERE meta_key = '_wpinv_cpt_name'" );
102
-			$wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_singular_name' WHERE meta_key = '_wpinv_cpt_singular_name'" );
99
+		if (!empty($results)) {
100
+			$wpdb->query("UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_id' WHERE meta_key IN( '_wpinv_item_id', '_wpinv_package_id', '_wpinv_post_id' )");
101
+			$wpdb->query("UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_name' WHERE meta_key = '_wpinv_cpt_name'");
102
+			$wpdb->query("UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_singular_name' WHERE meta_key = '_wpinv_cpt_singular_name'");
103 103
 
104
-			foreach ( $results as $row ) {
105
-				clean_post_cache( $row->post_id );
104
+			foreach ($results as $row) {
105
+				clean_post_cache($row->post_id);
106 106
 			}
107 107
 
108 108
 		}
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function upgrade_from_207() {
137 137
 		global $wpdb;
138
-		$wpdb->query( "ALTER TABLE {$wpdb->prefix}getpaid_invoice_items MODIFY COLUMN quantity FLOAT(20);" );
138
+		$wpdb->query("ALTER TABLE {$wpdb->prefix}getpaid_invoice_items MODIFY COLUMN quantity FLOAT(20);");
139 139
 	}
140 140
 
141 141
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 *
144 144
 	 */
145 145
 	public function add_capabilities() {
146
-		$GLOBALS['wp_roles']->add_cap( 'administrator', 'manage_invoicing' );
146
+		$GLOBALS['wp_roles']->add_cap('administrator', 'manage_invoicing');
147 147
 	}
148 148
 
149 149
 	/**
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 
159 159
 				// Checkout page.
160 160
 				'checkout_page' => array(
161
-					'name'      => _x( 'gp-checkout', 'Page slug', 'invoicing' ),
162
-					'title'     => _x( 'Checkout', 'Page title', 'invoicing' ),
161
+					'name'      => _x('gp-checkout', 'Page slug', 'invoicing'),
162
+					'title'     => _x('Checkout', 'Page title', 'invoicing'),
163 163
 					'content'   => '
164 164
 						<!-- wp:shortcode -->
165 165
 						[wpinv_checkout]
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
 
171 171
 				// Invoice history page.
172 172
 				'invoice_history_page' => array(
173
-					'name'    => _x( 'gp-invoices', 'Page slug', 'invoicing' ),
174
-					'title'   => _x( 'My Invoices', 'Page title', 'invoicing' ),
173
+					'name'    => _x('gp-invoices', 'Page slug', 'invoicing'),
174
+					'title'   => _x('My Invoices', 'Page title', 'invoicing'),
175 175
 					'content' => '
176 176
 					<!-- wp:shortcode -->
177 177
 					[wpinv_history]
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
 
183 183
 				// Success page content.
184 184
 				'success_page' => array(
185
-					'name'     => _x( 'gp-receipt', 'Page slug', 'invoicing' ),
186
-					'title'    => _x( 'Payment Confirmation', 'Page title', 'invoicing' ),
185
+					'name'     => _x('gp-receipt', 'Page slug', 'invoicing'),
186
+					'title'    => _x('Payment Confirmation', 'Page title', 'invoicing'),
187 187
 					'content'  => '
188 188
 					<!-- wp:shortcode -->
189 189
 					[wpinv_receipt]
@@ -194,16 +194,16 @@  discard block
 block discarded – undo
194 194
 
195 195
 				// Failure page content.
196 196
 				'failure_page' => array(
197
-					'name'    => _x( 'gp-transaction-failed', 'Page slug', 'invoicing' ),
198
-					'title'   => _x( 'Transaction Failed', 'Page title', 'invoicing' ),
199
-					'content' => __( 'Your transaction failed, please try again or contact site support.', 'invoicing' ),
197
+					'name'    => _x('gp-transaction-failed', 'Page slug', 'invoicing'),
198
+					'title'   => _x('Transaction Failed', 'Page title', 'invoicing'),
199
+					'content' => __('Your transaction failed, please try again or contact site support.', 'invoicing'),
200 200
 					'parent'  => 'gp-checkout',
201 201
 				),
202 202
 
203 203
 				// Subscriptions history page.
204 204
 				'invoice_subscription_page' => array(
205
-					'name'    => _x( 'gp-subscriptions', 'Page slug', 'invoicing' ),
206
-					'title'   => _x( 'My Subscriptions', 'Page title', 'invoicing' ),
205
+					'name'    => _x('gp-subscriptions', 'Page slug', 'invoicing'),
206
+					'title'   => _x('My Subscriptions', 'Page title', 'invoicing'),
207 207
 					'content' => '
208 208
 					<!-- wp:shortcode -->
209 209
 					[wpinv_subscriptions]
@@ -223,8 +223,8 @@  discard block
 block discarded – undo
223 223
 	 */
224 224
 	public function create_pages() {
225 225
 
226
-		foreach ( self::get_pages() as $key => $page ) {
227
-			wpinv_create_page( esc_sql( $page['name'] ), $key, $page['title'], $page['content'], $page['parent'] );
226
+		foreach (self::get_pages() as $key => $page) {
227
+			wpinv_create_page(esc_sql($page['name']), $key, $page['title'], $page['content'], $page['parent']);
228 228
 		}
229 229
 
230 230
 	}
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
 		global $wpdb;
239 239
 
240
-		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
240
+		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
241 241
 
242 242
 		// Create tables.
243 243
 		$charset_collate = $wpdb->get_charset_collate();
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 			KEY customer_and_status (customer_id, status)
265 265
 		  ) $charset_collate;";
266 266
 
267
-		dbDelta( $sql );
267
+		dbDelta($sql);
268 268
 
269 269
 	}
270 270
 
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 	public function create_invoices_table() {
276 276
 		global $wpdb;
277 277
 
278
-		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
278
+		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
279 279
 
280 280
 		// Create tables.
281 281
 		$charset_collate = $wpdb->get_charset_collate();
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 			KEY `key` (`key`)
316 316
 		  ) $charset_collate;";
317 317
 
318
-		dbDelta( $sql );
318
+		dbDelta($sql);
319 319
 
320 320
 	}
321 321
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 	public function create_invoice_items_table() {
327 327
 		global $wpdb;
328 328
 
329
-		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
329
+		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
330 330
 
331 331
 		// Create tables.
332 332
 		$charset_collate = $wpdb->get_charset_collate();
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 			KEY post_id (post_id)
353 353
 		  ) $charset_collate;";
354 354
 
355
-		dbDelta( $sql );
355
+		dbDelta($sql);
356 356
 
357 357
 	}
358 358
 
@@ -365,40 +365,40 @@  discard block
 block discarded – undo
365 365
 
366 366
 		$invoices_table      = $wpdb->prefix . 'getpaid_invoices';
367 367
 		$invoice_items_table = $wpdb->prefix . 'getpaid_invoice_items';
368
-		$migrated            = $wpdb->get_col( "SELECT post_id FROM $invoices_table" );
368
+		$migrated            = $wpdb->get_col("SELECT post_id FROM $invoices_table");
369 369
 		$invoices            = array_unique(
370 370
 			get_posts(
371 371
 				array(
372
-					'post_type'      => array( 'wpi_invoice', 'wpi_quote' ),
372
+					'post_type'      => array('wpi_invoice', 'wpi_quote'),
373 373
 					'posts_per_page' => -1,
374 374
 					'fields'         => 'ids',
375
-					'post_status'    => array_keys( get_post_stati() ),
375
+					'post_status'    => array_keys(get_post_stati()),
376 376
 					'exclude'        => (array) $migrated,
377 377
 				)
378 378
 			)
379 379
 		);
380 380
 
381 381
 		// Abort if we do not have any invoices.
382
-		if ( empty( $invoices ) ) {
382
+		if (empty($invoices)) {
383 383
 			return;
384 384
 		}
385 385
 
386
-		require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-legacy-invoice.php' );
386
+		require_once(WPINV_PLUGIN_DIR . 'includes/class-wpinv-legacy-invoice.php');
387 387
 
388 388
 		$invoice_rows = array();
389
-		foreach ( $invoices as $invoice ) {
389
+		foreach ($invoices as $invoice) {
390 390
 
391
-			$invoice = new WPInv_Legacy_Invoice( $invoice );
391
+			$invoice = new WPInv_Legacy_Invoice($invoice);
392 392
 
393
-			if ( empty( $invoice->ID ) ) {
393
+			if (empty($invoice->ID)) {
394 394
 				return;
395 395
 			}
396 396
 
397
-			$fields = array (
397
+			$fields = array(
398 398
 				'post_id'        => $invoice->ID,
399 399
 				'number'         => $invoice->get_number(),
400 400
 				'key'            => $invoice->get_key(),
401
-				'type'           => str_replace( 'wpi_', '', $invoice->post_type ),
401
+				'type'           => str_replace('wpi_', '', $invoice->post_type),
402 402
 				'mode'           => $invoice->mode,
403 403
 				'user_ip'        => $invoice->get_ip(),
404 404
 				'first_name'     => $invoice->get_first_name(),
@@ -427,27 +427,27 @@  discard block
 block discarded – undo
427 427
 				'custom_meta'    => $invoice->payment_meta
428 428
 			);
429 429
 
430
-			foreach ( $fields as $key => $val ) {
431
-				if ( is_null( $val ) ) {
430
+			foreach ($fields as $key => $val) {
431
+				if (is_null($val)) {
432 432
 					$val = '';
433 433
 				}
434
-				$val = maybe_serialize( $val );
435
-				$fields[ $key ] = $wpdb->prepare( '%s', $val );
434
+				$val = maybe_serialize($val);
435
+				$fields[$key] = $wpdb->prepare('%s', $val);
436 436
 			}
437 437
 
438
-			$fields = implode( ', ', $fields );
438
+			$fields = implode(', ', $fields);
439 439
 			$invoice_rows[] = "($fields)";
440 440
 
441 441
 			$item_rows    = array();
442 442
 			$item_columns = array();
443
-			foreach ( $invoice->get_cart_details() as $details ) {
443
+			foreach ($invoice->get_cart_details() as $details) {
444 444
 				$fields = array(
445 445
 					'post_id'          => $invoice->ID,
446 446
 					'item_id'          => $details['id'],
447 447
 					'item_name'        => $details['name'],
448
-					'item_description' => empty( $details['meta']['description'] ) ? '' : $details['meta']['description'],
448
+					'item_description' => empty($details['meta']['description']) ? '' : $details['meta']['description'],
449 449
 					'vat_rate'         => $details['vat_rate'],
450
-					'vat_class'        => empty( $details['vat_class'] ) ? '_standard' : $details['vat_class'],
450
+					'vat_class'        => empty($details['vat_class']) ? '_standard' : $details['vat_class'],
451 451
 					'tax'              => $details['tax'],
452 452
 					'item_price'       => $details['item_price'],
453 453
 					'custom_price'     => $details['custom_price'],
@@ -459,31 +459,31 @@  discard block
 block discarded – undo
459 459
 					'fees'             => $details['fees'],
460 460
 				);
461 461
 
462
-				$item_columns = array_keys ( $fields );
462
+				$item_columns = array_keys($fields);
463 463
 
464
-				foreach ( $fields as $key => $val ) {
465
-					if ( is_null( $val ) ) {
464
+				foreach ($fields as $key => $val) {
465
+					if (is_null($val)) {
466 466
 						$val = '';
467 467
 					}
468
-					$val = maybe_serialize( $val );
469
-					$fields[ $key ] = $wpdb->prepare( '%s', $val );
468
+					$val = maybe_serialize($val);
469
+					$fields[$key] = $wpdb->prepare('%s', $val);
470 470
 				}
471 471
 
472
-				$fields = implode( ', ', $fields );
472
+				$fields = implode(', ', $fields);
473 473
 				$item_rows[] = "($fields)";
474 474
 			}
475 475
 
476
-			$item_rows    = implode( ', ', $item_rows );
477
-			$item_columns = implode( ', ', $item_columns );
478
-			$wpdb->query( "INSERT INTO $invoice_items_table ($item_columns) VALUES $item_rows" );
476
+			$item_rows    = implode(', ', $item_rows);
477
+			$item_columns = implode(', ', $item_columns);
478
+			$wpdb->query("INSERT INTO $invoice_items_table ($item_columns) VALUES $item_rows");
479 479
 		}
480 480
 
481
-		if ( empty( $invoice_rows ) ) {
481
+		if (empty($invoice_rows)) {
482 482
 			return;
483 483
 		}
484 484
 
485
-		$invoice_rows = implode( ', ', $invoice_rows );
486
-		$wpdb->query( "INSERT INTO $invoices_table VALUES $invoice_rows" );
485
+		$invoice_rows = implode(', ', $invoice_rows);
486
+		$wpdb->query("INSERT INTO $invoices_table VALUES $invoice_rows");
487 487
 
488 488
 	}
489 489
 
@@ -494,12 +494,12 @@  discard block
 block discarded – undo
494 494
 	public static function rename_gateways_label() {
495 495
 		global $wpdb;
496 496
 
497
-		foreach ( array_keys( wpinv_get_payment_gateways() ) as $gateway ) {
497
+		foreach (array_keys(wpinv_get_payment_gateways()) as $gateway) {
498 498
 
499 499
 			$wpdb->update(
500 500
 				$wpdb->prefix . 'getpaid_invoices',
501
-				array( 'gateway' => $gateway ),
502
-				array( 'gateway' => wpinv_get_gateway_admin_label( $gateway ) ),
501
+				array('gateway' => $gateway),
502
+				array('gateway' => wpinv_get_gateway_admin_label($gateway)),
503 503
 				'%s',
504 504
 				'%s'
505 505
 			);
Please login to merge, or discard this patch.
templates/payment-forms/elements/email.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 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 );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14 14
 
15
-if ( ! empty( $required ) ) {
15
+if (!empty($required)) {
16 16
     $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19 19
 echo aui()->input(
20 20
     array(
21
-        'name'       => esc_attr( $id ),
22
-        'id'         => esc_attr( $id ) . uniqid( '_' ),
23
-        'placeholder'=> empty( $placeholder ) ? '' : esc_attr( $placeholder ),
24
-        'required'   => ! empty( $required ),
21
+        'name'       => esc_attr($id),
22
+        'id'         => esc_attr($id) . uniqid('_'),
23
+        'placeholder'=> empty($placeholder) ? '' : esc_attr($placeholder),
24
+        'required'   => !empty($required),
25 25
         'label'      => $label,
26 26
         'label_type' => 'vertical',
27
-        'help_text'  => empty( $description ) ? '' : wp_kses_post( $description ),
27
+        'help_text'  => empty($description) ? '' : wp_kses_post($description),
28 28
         'type'       => 'email',
29 29
         'class' => $label_class,
30 30
     )
Please login to merge, or discard this patch.
templates/payment-forms/elements/website.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,27 +7,27 @@
 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 );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14 14
 
15
-if ( ! empty( $required ) ) {
15
+if (!empty($required)) {
16 16
     $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19
-$current_url = ! empty( $_GET['current_url'] ) ? esc_url_raw( urldecode( $_GET['current_url'] ) ) : get_permalink();
19
+$current_url = !empty($_GET['current_url']) ? esc_url_raw(urldecode($_GET['current_url'])) : get_permalink();
20 20
 echo aui()->input(
21 21
     array(
22
-        'name'       => esc_attr( $id ),
23
-        'id'         => esc_attr( $id ) . uniqid( '_' ),
24
-        'placeholder'=> empty( $placeholder ) ? '' : esc_attr( $placeholder ),
25
-        'required'   => ! empty( $required ),
22
+        'name'       => esc_attr($id),
23
+        'id'         => esc_attr($id) . uniqid('_'),
24
+        'placeholder'=> empty($placeholder) ? '' : esc_attr($placeholder),
25
+        'required'   => !empty($required),
26 26
         'label'      => $label,
27 27
         'label_type' => 'vertical',
28
-        'help_text'  => empty( $description ) ? '' : wp_kses_post( $description ),
28
+        'help_text'  => empty($description) ? '' : wp_kses_post($description),
29 29
         'type'       => 'url',
30
-        'value'      => ! empty( $default_current_post ) ? $current_url : '',
30
+        'value'      => !empty($default_current_post) ? $current_url : '',
31 31
         'class'      => $label_class,
32 32
     )
33 33
 );
Please login to merge, or discard this patch.
templates/payment-forms/elements/radio.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,26 +7,26 @@
 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 );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14 14
 
15
-if ( ! empty( $required ) ) {
15
+if (!empty($required)) {
16 16
     $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19 19
 echo aui()->radio(
20 20
     array(
21
-        'name'       => esc_attr( $id ),
22
-        'id'         => esc_attr( $id ) . uniqid( '_' ),
23
-        'required'   => ! empty( $required ),
21
+        'name'       => esc_attr($id),
22
+        'id'         => esc_attr($id) . uniqid('_'),
23
+        'required'   => !empty($required),
24 24
         'label'      => $label,
25 25
         'label_type' => 'vertical',
26 26
         'class'      => 'w-auto',
27 27
         'inline'     => false,
28
-        'options'    => empty( $options ) ? array() : array_combine( $options, $options ),
29
-        'help_text'  => empty( $description ) ? '' : wp_kses_post( $description ),
28
+        'options'    => empty($options) ? array() : array_combine($options, $options),
29
+        'help_text'  => empty($description) ? '' : wp_kses_post($description),
30 30
         'class' => $label_class,
31 31
     )
32 32
 );
Please login to merge, or discard this patch.
templates/payment-forms/elements/time.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 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 );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14 14
 
15
-if ( ! empty( $required ) ) {
15
+if (!empty($required)) {
16 16
     $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19 19
 echo aui()->input(
20 20
     array(
21
-        'name'       => esc_attr( $id ),
22
-        'id'         => esc_attr( $id ) . uniqid( '_' ),
23
-        'placeholder'=> empty( $placeholder ) ? '' : esc_attr( $placeholder ),
24
-        'required'   => ! empty( $required ),
21
+        'name'       => esc_attr($id),
22
+        'id'         => esc_attr($id) . uniqid('_'),
23
+        'placeholder'=> empty($placeholder) ? '' : esc_attr($placeholder),
24
+        'required'   => !empty($required),
25 25
         'label'      => $label,
26 26
         'label_type' => 'vertical',
27
-        'help_text'  => empty( $description ) ? '' : wp_kses_post( $description ),
27
+        'help_text'  => empty($description) ? '' : wp_kses_post($description),
28 28
         'type'       => 'time',
29 29
         'class'      => $label_class,
30 30
     )
Please login to merge, or discard this patch.
templates/payment-forms/elements/number.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 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 );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14 14
 
15
-if ( ! empty( $required ) ) {
15
+if (!empty($required)) {
16 16
     $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19 19
 echo aui()->input(
20 20
     array(
21
-        'name'       => esc_attr( $id ),
22
-        'id'         => esc_attr( $id ) . uniqid( '_' ),
23
-        'placeholder'=> empty( $placeholder ) ? '' : esc_attr( $placeholder ),
24
-        'required'   => ! empty( $required ),
21
+        'name'       => esc_attr($id),
22
+        'id'         => esc_attr($id) . uniqid('_'),
23
+        'placeholder'=> empty($placeholder) ? '' : esc_attr($placeholder),
24
+        'required'   => !empty($required),
25 25
         'label'      => $label,
26 26
         'label_type' => 'vertical',
27
-        'help_text'  => empty( $description ) ? '' : wp_kses_post( $description ),
27
+        'help_text'  => empty($description) ? '' : wp_kses_post($description),
28 28
         'type'       => 'number',
29 29
         'class'      => $label_class,
30 30
     )
Please login to merge, or discard this patch.