Completed
Push — master ( e1fcb8...b01a52 )
by Brian
26s queued 17s
created
includes/data/email-settings.php 1 patch
Spacing   +236 added lines, -236 removed lines patch added patch discarded remove patch
@@ -8,24 +8,24 @@  discard block
 block discarded – undo
8 8
  * @version 1.0.19
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 // Prepare the due date reminder options.
14 14
 $overdue_days_options       = array();
15
-$overdue_days_options['0']  = __( 'On the Due Date', 'invoicing' );
16
-$overdue_days_options['1']  = __( '1 day after Due Date', 'invoicing' );
15
+$overdue_days_options['0']  = __('On the Due Date', 'invoicing');
16
+$overdue_days_options['1']  = __('1 day after Due Date', 'invoicing');
17 17
 
18
-for ( $i = 2; $i <= 10; $i++ ) {
19
-    $overdue_days_options["$i"] = wp_sprintf( __( '%d days after Due Date', 'invoicing' ), $i );
18
+for ($i = 2; $i <= 10; $i++) {
19
+    $overdue_days_options["$i"] = wp_sprintf(__('%d days after Due Date', 'invoicing'), $i);
20 20
 }
21 21
 
22 22
 // Prepare up coming renewal reminder options.
23 23
 $renewal_days_options       = array();
24
-$renewal_days_options['0']  = __( 'On the renewal date', 'invoicing' );
25
-$renewal_days_options['1']  = __( '1 day before the renewal date', 'invoicing' );
24
+$renewal_days_options['0']  = __('On the renewal date', 'invoicing');
25
+$renewal_days_options['1']  = __('1 day before the renewal date', 'invoicing');
26 26
 
27
-for ( $i = 2; $i <= 10; $i++ ) {
28
-    $renewal_days_options["$i"]   = wp_sprintf( __( '%d days before the renewal date', 'invoicing' ), $i );
27
+for ($i = 2; $i <= 10; $i++) {
28
+    $renewal_days_options["$i"] = wp_sprintf(__('%d days before the renewal date', 'invoicing'), $i);
29 29
 }
30 30
 
31 31
 // Default, built-in gateways
@@ -34,45 +34,45 @@  discard block
 block discarded – undo
34 34
 
35 35
         'email_new_invoice_header' => array(
36 36
             'id'       => 'email_new_invoice_header',
37
-            'name'     => '<h3>' . __( 'New Invoice', 'invoicing' ) . '</h3>',
38
-            'desc'     => __( 'These emails are sent to the site admin whenever there is a new invoice.', 'invoicing' ),
37
+            'name'     => '<h3>' . __('New Invoice', 'invoicing') . '</h3>',
38
+            'desc'     => __('These emails are sent to the site admin whenever there is a new invoice.', 'invoicing'),
39 39
             'type'     => 'header',
40 40
         ),
41 41
 
42 42
         'email_new_invoice_active' => array(
43 43
             'id'       => 'email_new_invoice_active',
44
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
45
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
44
+            'name'     => __('Enable/Disable', 'invoicing'),
45
+            'desc'     => __('Enable this email notification', 'invoicing'),
46 46
             'type'     => 'checkbox',
47 47
             'std'      => 1
48 48
         ),
49 49
 
50 50
         'email_new_invoice_subject' => array(
51 51
             'id'       => 'email_new_invoice_subject',
52
-            'name'     => __( 'Subject', 'invoicing' ),
53
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
52
+            'name'     => __('Subject', 'invoicing'),
53
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
54 54
             'help-tip' => true,
55 55
             'type'     => 'text',
56
-            'std'      => __( '[{site_title}] New payment invoice ({invoice_number}) - {invoice_date}', 'invoicing' ),
56
+            'std'      => __('[{site_title}] New payment invoice ({invoice_number}) - {invoice_date}', 'invoicing'),
57 57
             'size'     => 'large'
58 58
         ),
59 59
 
60 60
         'email_new_invoice_heading' => array(
61 61
             'id'       => 'email_new_invoice_heading',
62
-            'name'     => __( 'Email Heading', 'invoicing' ),
63
-            'desc'     => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ),
62
+            'name'     => __('Email Heading', 'invoicing'),
63
+            'desc'     => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'),
64 64
             'help-tip' => true,
65 65
             'type'     => 'text',
66
-            'std'      => __( 'New Invoice', 'invoicing' ),
66
+            'std'      => __('New Invoice', 'invoicing'),
67 67
             'size'     => 'large'
68 68
         ),
69 69
 
70 70
         'email_new_invoice_body' => array(
71 71
             'id'       => 'email_new_invoice_body',
72
-            'name'     => __( 'Email Content', 'invoicing' ),
73
-            'desc'     => __( 'The content of the email (wildcards and HTML are allowed).', 'invoicing' ),
72
+            'name'     => __('Email Content', 'invoicing'),
73
+            'desc'     => __('The content of the email (wildcards and HTML are allowed).', 'invoicing'),
74 74
             'type'     => 'rich_editor',
75
-            'std'      => __( '<p>A new <a href="{invoice_link}">invoice</a> of {invoice_total} has been created for {name} on {site_title}.</p>', 'invoicing' ),
75
+            'std'      => __('<p>A new <a href="{invoice_link}">invoice</a> of {invoice_total} has been created for {name} on {site_title}.</p>', 'invoicing'),
76 76
             'class'    => 'large',
77 77
             'size'     => '10'
78 78
         ),
@@ -82,45 +82,45 @@  discard block
 block discarded – undo
82 82
 
83 83
         'email_cancelled_invoice_header' => array(
84 84
             'id'       => 'email_cancelled_invoice_header',
85
-            'name'     => '<h3>' . __( 'Cancelled Invoice', 'invoicing' ) . '</h3>',
86
-            'desc'     => __( 'These emails are sent to the site admin whenever invoices are cancelled.', 'invoicing' ),
85
+            'name'     => '<h3>' . __('Cancelled Invoice', 'invoicing') . '</h3>',
86
+            'desc'     => __('These emails are sent to the site admin whenever invoices are cancelled.', 'invoicing'),
87 87
             'type'     => 'header',
88 88
         ),
89 89
 
90 90
         'email_cancelled_invoice_active' => array(
91 91
             'id'       => 'email_cancelled_invoice_active',
92
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
93
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
92
+            'name'     => __('Enable/Disable', 'invoicing'),
93
+            'desc'     => __('Enable this email notification', 'invoicing'),
94 94
             'type'     => 'checkbox',
95 95
             'std'      => 1
96 96
         ),
97 97
 
98 98
         'email_cancelled_invoice_subject' => array(
99 99
             'id'       => 'email_cancelled_invoice_subject',
100
-            'name'     => __( 'Subject', 'invoicing' ),
101
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
100
+            'name'     => __('Subject', 'invoicing'),
101
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
102 102
             'help-tip' => true,
103 103
             'type'     => 'text',
104
-            'std'      => __( '[{site_title}] Cancelled invoice ({invoice_number})', 'invoicing' ),
104
+            'std'      => __('[{site_title}] Cancelled invoice ({invoice_number})', 'invoicing'),
105 105
             'size'     => 'large'
106 106
         ),
107 107
 
108 108
         'email_cancelled_invoice_heading' => array(
109 109
             'id'       => 'email_cancelled_invoice_heading',
110
-            'name'     => __( 'Email Heading', 'invoicing' ),
111
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
110
+            'name'     => __('Email Heading', 'invoicing'),
111
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
112 112
             'help-tip' => true,
113 113
             'type'     => 'text',
114
-            'std'      => __( 'Cancelled Invoice', 'invoicing' ),
114
+            'std'      => __('Cancelled Invoice', 'invoicing'),
115 115
             'size'     => 'large'
116 116
         ),
117 117
 
118 118
         'email_cancelled_invoice_body' => array(
119 119
             'id'       => 'email_cancelled_invoice_body',
120
-            'name'     => __( 'Email Content', 'invoicing' ),
121
-            'desc'     => __( 'The content of the email (wildcards and HTML are allowed).', 'invoicing' ),
120
+            'name'     => __('Email Content', 'invoicing'),
121
+            'desc'     => __('The content of the email (wildcards and HTML are allowed).', 'invoicing'),
122 122
             'type'     => 'rich_editor',
123
-            'std'      => __( '<p>The invoice <a href="{invoice_link}">#{invoice_number}</a> created for {name} on {site_title} has been cancelled.</p>', 'invoicing' ),
123
+            'std'      => __('<p>The invoice <a href="{invoice_link}">#{invoice_number}</a> created for {name} on {site_title} has been cancelled.</p>', 'invoicing'),
124 124
             'class'    => 'large',
125 125
             'size'     => '10'
126 126
         ),
@@ -130,45 +130,45 @@  discard block
 block discarded – undo
130 130
 
131 131
         'email_failed_invoice_header' => array(
132 132
             'id'       => 'email_failed_invoice_header',
133
-            'name'     => '<h3>' . __( 'Failed Invoice', 'invoicing' ) . '</h3>',
134
-            'desc'     => __( 'Failed invoice emails are sent to the site admin when invoice payments fail.', 'invoicing' ),
133
+            'name'     => '<h3>' . __('Failed Invoice', 'invoicing') . '</h3>',
134
+            'desc'     => __('Failed invoice emails are sent to the site admin when invoice payments fail.', 'invoicing'),
135 135
             'type'     => 'header',
136 136
         ),
137 137
 
138 138
         'email_failed_invoice_active' => array(
139 139
             'id'       => 'email_failed_invoice_active',
140
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
141
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
140
+            'name'     => __('Enable/Disable', 'invoicing'),
141
+            'desc'     => __('Enable this email notification', 'invoicing'),
142 142
             'type'     => 'checkbox',
143 143
             'std'      => 1
144 144
         ),
145 145
 
146 146
         'email_failed_invoice_subject' => array(
147 147
             'id'       => 'email_failed_invoice_subject',
148
-            'name'     => __( 'Subject', 'invoicing' ),
149
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
148
+            'name'     => __('Subject', 'invoicing'),
149
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
150 150
             'help-tip' => true,
151 151
             'type'     => 'text',
152
-            'std'      => __( '[{site_title}] Failed invoice ({invoice_number})', 'invoicing' ),
152
+            'std'      => __('[{site_title}] Failed invoice ({invoice_number})', 'invoicing'),
153 153
             'size'     => 'large'
154 154
         ),
155 155
 
156 156
         'email_failed_invoice_heading' => array(
157 157
             'id'       => 'email_failed_invoice_heading',
158
-            'name'     => __( 'Email Heading', 'invoicing' ),
159
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
158
+            'name'     => __('Email Heading', 'invoicing'),
159
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
160 160
             'help-tip' => true,
161 161
             'type'     => 'text',
162
-            'std'      => __( 'Failed invoice', 'invoicing' ),
162
+            'std'      => __('Failed invoice', 'invoicing'),
163 163
             'size'     => 'large'
164 164
         ),
165 165
 
166 166
         'email_failed_invoice_body' => array(
167 167
             'id'       => 'email_failed_invoice_body',
168
-            'name'     => __( 'Email Content', 'invoicing' ),
169
-            'desc'     => __( 'The content of the email (wildcards and HTML are allowed).', 'invoicing' ),
168
+            'name'     => __('Email Content', 'invoicing'),
169
+            'desc'     => __('The content of the email (wildcards and HTML are allowed).', 'invoicing'),
170 170
             'type'     => 'rich_editor',
171
-            'std'      => __( '<p>Payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title} has failed to go through.</p>', 'invoicing' ),
171
+            'std'      => __('<p>Payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title} has failed to go through.</p>', 'invoicing'),
172 172
             'class'    => 'large',
173 173
             'size'     => '10'
174 174
         ),
@@ -178,53 +178,53 @@  discard block
 block discarded – undo
178 178
 
179 179
         'email_onhold_invoice_header' => array(
180 180
             'id'       => 'email_onhold_invoice_header',
181
-            'name'     => '<h3>' . __( 'On Hold Invoice', 'invoicing' ) . '</h3>',
182
-            'desc'     => __( 'These emails are sent to customers whenever their invoices are held.', 'invoicing' ),
181
+            'name'     => '<h3>' . __('On Hold Invoice', 'invoicing') . '</h3>',
182
+            'desc'     => __('These emails are sent to customers whenever their invoices are held.', 'invoicing'),
183 183
             'type'     => 'header',
184 184
         ),
185 185
 
186 186
         'email_onhold_invoice_active' => array(
187 187
             'id'       => 'email_onhold_invoice_active',
188
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
189
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
188
+            'name'     => __('Enable/Disable', 'invoicing'),
189
+            'desc'     => __('Enable this email notification', 'invoicing'),
190 190
             'type'     => 'checkbox',
191 191
             'std'      => 1
192 192
         ),
193 193
 
194 194
         'email_onhold_invoice_admin_bcc' => array(
195 195
             'id'       => 'email_onhold_invoice_admin_bcc',
196
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
197
-            'desc'     => __( 'Check if you want to send this notification email to site Admin.', 'invoicing' ),
196
+            'name'     => __('Enable Admin BCC', 'invoicing'),
197
+            'desc'     => __('Check if you want to send this notification email to site Admin.', 'invoicing'),
198 198
             'type'     => 'checkbox',
199 199
             'std'      => 1
200 200
         ),
201 201
 
202 202
         'email_onhold_invoice_subject' => array(
203 203
             'id'       => 'email_onhold_invoice_subject',
204
-            'name'     => __( 'Subject', 'invoicing' ),
205
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
204
+            'name'     => __('Subject', 'invoicing'),
205
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
206 206
             'help-tip' => true,
207 207
             'type'     => 'text',
208
-            'std'      => __( '[{site_title}] Your invoice receipt from {invoice_date}', 'invoicing' ),
208
+            'std'      => __('[{site_title}] Your invoice receipt from {invoice_date}', 'invoicing'),
209 209
             'size'     => 'large'
210 210
         ),
211 211
 
212 212
         'email_onhold_invoice_heading' => array(
213 213
             'id'       => 'email_onhold_invoice_heading',
214
-            'name'     => __( 'Email Heading', 'invoicing' ),
215
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
214
+            'name'     => __('Email Heading', 'invoicing'),
215
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
216 216
             'help-tip' => true,
217 217
             'type'     => 'text',
218
-            'std'      => __( 'Thank you for your invoice', 'invoicing' ),
218
+            'std'      => __('Thank you for your invoice', 'invoicing'),
219 219
             'size'     => 'large'
220 220
         ),
221 221
 
222 222
         'email_onhold_invoice_body' => array(
223 223
             'id'       => 'email_onhold_invoice_body',
224
-            'name'     => __( 'Email Content', 'invoicing' ),
225
-            'desc'     => __( 'The content of the email (wildcards and HTML are allowed).', 'invoicing' ),
224
+            'name'     => __('Email Content', 'invoicing'),
225
+            'desc'     => __('The content of the email (wildcards and HTML are allowed).', 'invoicing'),
226 226
             'type'     => 'rich_editor',
227
-            'std'      => __( '<p>Hi {name},</p><p>Your invoice is on-hold and will be processed when we receive your payment.</p>', 'invoicing' ),
227
+            'std'      => __('<p>Hi {name},</p><p>Your invoice is on-hold and will be processed when we receive your payment.</p>', 'invoicing'),
228 228
             'class'    => 'large',
229 229
             'size'     => '10'
230 230
         ),
@@ -235,53 +235,53 @@  discard block
 block discarded – undo
235 235
 
236 236
         'email_processing_invoice_header' => array(
237 237
             'id'       => 'email_processing_invoice_header',
238
-            'name'     => '<h3>' . __( 'Processing Invoice', 'invoicing' ) . '</h3>',
239
-            'desc'     => __( 'These emails are sent to users whenever payments for their invoices are processing.', 'invoicing' ),
238
+            'name'     => '<h3>' . __('Processing Invoice', 'invoicing') . '</h3>',
239
+            'desc'     => __('These emails are sent to users whenever payments for their invoices are processing.', 'invoicing'),
240 240
             'type'     => 'header',
241 241
         ),
242 242
 
243 243
         'email_processing_invoice_active' => array(
244 244
             'id'       => 'email_processing_invoice_active',
245
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
246
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
245
+            'name'     => __('Enable/Disable', 'invoicing'),
246
+            'desc'     => __('Enable this email notification', 'invoicing'),
247 247
             'type'     => 'checkbox',
248 248
             'std'      => 1
249 249
         ),
250 250
 
251 251
         'email_processing_invoice_admin_bcc' => array(
252 252
             'id'       => 'email_processing_invoice_admin_bcc',
253
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
254
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
253
+            'name'     => __('Enable Admin BCC', 'invoicing'),
254
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
255 255
             'type'     => 'checkbox',
256 256
             'std'      => 1
257 257
         ),
258 258
 
259 259
         'email_processing_invoice_subject' => array(
260 260
             'id'       => 'email_processing_invoice_subject',
261
-            'name'     => __( 'Subject', 'invoicing' ),
262
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
261
+            'name'     => __('Subject', 'invoicing'),
262
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
263 263
             'help-tip' => true,
264 264
             'type'     => 'text',
265
-            'std'      => __( '[{site_title}] Your invoice receipt from {invoice_date}', 'invoicing' ),
265
+            'std'      => __('[{site_title}] Your invoice receipt from {invoice_date}', 'invoicing'),
266 266
             'size'     => 'large'
267 267
         ),
268 268
 
269 269
         'email_processing_invoice_heading' => array(
270 270
             'id'       => 'email_processing_invoice_heading',
271
-            'name'     => __( 'Email Heading', 'invoicing' ),
272
-            'desc'     => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ),
271
+            'name'     => __('Email Heading', 'invoicing'),
272
+            'desc'     => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'),
273 273
             'help-tip' => true,
274 274
             'type'     => 'text',
275
-            'std'      => __( 'Thank you for your invoice', 'invoicing' ),
275
+            'std'      => __('Thank you for your invoice', 'invoicing'),
276 276
             'size'     => 'large'
277 277
         ),
278 278
 
279 279
         'email_processing_invoice_body' => array(
280 280
             'id'       => 'email_processing_invoice_body',
281
-            'name'     => __( 'Email Content', 'invoicing' ),
282
-            'desc'     => __( 'The content of the email (wildcards and HTML are allowed).', 'invoicing' ),
281
+            'name'     => __('Email Content', 'invoicing'),
282
+            'desc'     => __('The content of the email (wildcards and HTML are allowed).', 'invoicing'),
283 283
             'type'     => 'rich_editor',
284
-            'std'      => __( '<p>Hi {name},</p><p>I would like to let you know that we have received and are currently processing your payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title}.</p>', 'invoicing' ),
284
+            'std'      => __('<p>Hi {name},</p><p>I would like to let you know that we have received and are currently processing your payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title}.</p>', 'invoicing'),
285 285
             'class'    => 'large',
286 286
             'size'     => '10'
287 287
         ),
@@ -292,61 +292,61 @@  discard block
 block discarded – undo
292 292
 
293 293
         'email_completed_invoice_header' => array(
294 294
             'id'       => 'email_completed_invoice_header',
295
-            'name'     => '<h3>' . __( 'Paid Invoice', 'invoicing' ) . '</h3>',
296
-            'desc'     => __( 'These emails are sent to customers when their invoices are marked as paid.', 'invoicing' ),
295
+            'name'     => '<h3>' . __('Paid Invoice', 'invoicing') . '</h3>',
296
+            'desc'     => __('These emails are sent to customers when their invoices are marked as paid.', 'invoicing'),
297 297
             'type'     => 'header',
298 298
         ),
299 299
 
300 300
         'email_completed_invoice_active' => array(
301 301
             'id'       => 'email_completed_invoice_active',
302
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
303
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
302
+            'name'     => __('Enable/Disable', 'invoicing'),
303
+            'desc'     => __('Enable this email notification', 'invoicing'),
304 304
             'type'     => 'checkbox',
305 305
             'std'      => 1
306 306
         ),
307 307
 
308 308
         'email_completed_invoice_renewal_active' => array(
309 309
             'id'       => 'email_completed_invoice_renewal_active',
310
-            'name'     => __( 'Enable renewal notification', 'invoicing' ),
311
-            'desc'     => __( 'Should this email be sent for renewals too?', 'invoicing' ),
310
+            'name'     => __('Enable renewal notification', 'invoicing'),
311
+            'desc'     => __('Should this email be sent for renewals too?', 'invoicing'),
312 312
             'type'     => 'checkbox',
313 313
             'std'      => 1
314 314
         ),
315 315
 
316 316
         'email_completed_invoice_admin_bcc' => array(
317 317
             'id'       => 'email_completed_invoice_admin_bcc',
318
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
319
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
318
+            'name'     => __('Enable Admin BCC', 'invoicing'),
319
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
320 320
             'type'     => 'checkbox',
321 321
             'std'      => 1,
322 322
         ),
323 323
 
324 324
         'email_completed_invoice_subject' => array(
325 325
             'id'       => 'email_completed_invoice_subject',
326
-            'name'     => __( 'Subject', 'invoicing' ),
327
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
326
+            'name'     => __('Subject', 'invoicing'),
327
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
328 328
             'help-tip' => true,
329 329
             'type'     => 'text',
330
-            'std'      => __( '[{site_title}] Your invoice from {invoice_date} has been paid', 'invoicing' ),
330
+            'std'      => __('[{site_title}] Your invoice from {invoice_date} has been paid', 'invoicing'),
331 331
             'size'     => 'large'
332 332
         ),
333 333
 
334 334
         'email_completed_invoice_heading' => array(
335 335
             'id'       => 'email_completed_invoice_heading',
336
-            'name'     => __( 'Email Heading', 'invoicing' ),
337
-            'desc'     => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ),
336
+            'name'     => __('Email Heading', 'invoicing'),
337
+            'desc'     => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'),
338 338
             'help-tip' => true,
339 339
             'type'     => 'text',
340
-            'std'      => __( 'Your invoice has been paid', 'invoicing' ),
340
+            'std'      => __('Your invoice has been paid', 'invoicing'),
341 341
             'size'     => 'large'
342 342
         ),
343 343
 
344 344
         'email_completed_invoice_body' => array(
345 345
             'id'       => 'email_completed_invoice_body',
346
-            'name'     => __( 'Email Content', 'invoicing' ),
347
-            'desc'     => __( 'The content of the email (wildcards and HTML are allowed).', 'invoicing' ),
346
+            'name'     => __('Email Content', 'invoicing'),
347
+            'desc'     => __('The content of the email (wildcards and HTML are allowed).', 'invoicing'),
348 348
             'type'     => 'rich_editor',
349
-            'std'      => __( '<p>Hi {name},</p><p>Your recent invoice on {site_title} has been paid.</p>', 'invoicing' ),
349
+            'std'      => __('<p>Hi {name},</p><p>Your recent invoice on {site_title} has been paid.</p>', 'invoicing'),
350 350
             'class'    => 'large',
351 351
             'size'     => '10'
352 352
         ),
@@ -357,53 +357,53 @@  discard block
 block discarded – undo
357 357
 
358 358
         'email_refunded_invoice_header' => array(
359 359
             'id'       => 'email_refunded_invoice_header',
360
-            'name'     => '<h3>' . __( 'Refunded Invoice', 'invoicing' ) . '</h3>',
361
-            'desc'     => __( 'These emails are sent to users when their invoices are marked as refunded.', 'invoicing' ),
360
+            'name'     => '<h3>' . __('Refunded Invoice', 'invoicing') . '</h3>',
361
+            'desc'     => __('These emails are sent to users when their invoices are marked as refunded.', 'invoicing'),
362 362
             'type'     => 'header',
363 363
         ),
364 364
 
365 365
         'email_refunded_invoice_active' => array(
366 366
             'id'       => 'email_refunded_invoice_active',
367
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
368
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
367
+            'name'     => __('Enable/Disable', 'invoicing'),
368
+            'desc'     => __('Enable this email notification', 'invoicing'),
369 369
             'type'     => 'checkbox',
370 370
             'std'      => 1
371 371
         ),
372 372
 
373 373
         'email_refunded_invoice_admin_bcc' => array(
374 374
             'id'       => 'email_refunded_invoice_admin_bcc',
375
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
376
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
375
+            'name'     => __('Enable Admin BCC', 'invoicing'),
376
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
377 377
             'type'     => 'checkbox',
378 378
             'std'      => 1
379 379
         ),
380 380
 
381 381
         'email_refunded_invoice_subject' => array(
382 382
             'id'       => 'email_refunded_invoice_subject',
383
-            'name'     => __( 'Subject', 'invoicing' ),
384
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
383
+            'name'     => __('Subject', 'invoicing'),
384
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
385 385
             'help-tip' => true,
386 386
             'type'     => 'text',
387
-            'std'      => __( '[{site_title}] Your invoice from {invoice_date} has been refunded', 'invoicing' ),
387
+            'std'      => __('[{site_title}] Your invoice from {invoice_date} has been refunded', 'invoicing'),
388 388
             'size'     => 'large'
389 389
         ),
390 390
 
391 391
         'email_refunded_invoice_heading' => array(
392 392
             'id'       => 'email_refunded_invoice_heading',
393
-            'name'     => __( 'Email Heading', 'invoicing' ),
394
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
393
+            'name'     => __('Email Heading', 'invoicing'),
394
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
395 395
             'help-tip' => true,
396 396
             'type'     => 'text',
397
-            'std'      => __( 'Your invoice has been refunded', 'invoicing' ),
397
+            'std'      => __('Your invoice has been refunded', 'invoicing'),
398 398
             'size'     => 'large'
399 399
         ),
400 400
 
401 401
         'email_refunded_invoice_body' => array(
402 402
             'id'       => 'email_refunded_invoice_body',
403
-            'name'     => __( 'Email Content', 'invoicing' ),
404
-            'desc'     => __( 'The content of the email (wildcards and HTML are allowed).', 'invoicing' ),
403
+            'name'     => __('Email Content', 'invoicing'),
404
+            'desc'     => __('The content of the email (wildcards and HTML are allowed).', 'invoicing'),
405 405
             'type'     => 'rich_editor',
406
-            'std'      => __( '<p>Hi {name},</p><p>Your invoice on {site_title} has been refunded.</p>', 'invoicing' ),
406
+            'std'      => __('<p>Hi {name},</p><p>Your invoice on {site_title} has been refunded.</p>', 'invoicing'),
407 407
             'class'    => 'large',
408 408
             'size'     => '10'
409 409
         ),
@@ -414,53 +414,53 @@  discard block
 block discarded – undo
414 414
 
415 415
         'email_user_invoice_header' => array(
416 416
             'id'       => 'email_user_invoice_header',
417
-            'name'     => '<h3>' . __( 'Customer Invoice', 'invoicing' ) . '</h3>',
418
-            'desc'     => __( 'These emails are sent to customers containing their invoice information and payment links.', 'invoicing' ),
417
+            'name'     => '<h3>' . __('Customer Invoice', 'invoicing') . '</h3>',
418
+            'desc'     => __('These emails are sent to customers containing their invoice information and payment links.', 'invoicing'),
419 419
             'type'     => 'header',
420 420
         ),
421 421
 
422 422
         'email_user_invoice_active' => array(
423 423
             'id'       => 'email_user_invoice_active',
424
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
425
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
424
+            'name'     => __('Enable/Disable', 'invoicing'),
425
+            'desc'     => __('Enable this email notification', 'invoicing'),
426 426
             'type'     => 'checkbox',
427 427
             'std'      => 1
428 428
         ),
429 429
 
430 430
         'email_user_invoice_admin_bcc' => array(
431 431
             'id'       => 'email_user_invoice_admin_bcc',
432
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
433
-            'desc'     => __( 'Check if you want to send a copy of this notification email to to the site admin.', 'invoicing' ),
432
+            'name'     => __('Enable Admin BCC', 'invoicing'),
433
+            'desc'     => __('Check if you want to send a copy of this notification email to to the site admin.', 'invoicing'),
434 434
             'type'     => 'checkbox',
435 435
             'std'      => 0
436 436
         ),
437 437
 
438 438
         'email_user_invoice_subject' => array(
439 439
             'id'       => 'email_user_invoice_subject',
440
-            'name'     => __( 'Subject', 'invoicing' ),
441
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
440
+            'name'     => __('Subject', 'invoicing'),
441
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
442 442
             'help-tip' => true,
443 443
             'type'     => 'text',
444
-            'std'      => __( '[{site_title}] Your invoice from {invoice_date}', 'invoicing' ),
444
+            'std'      => __('[{site_title}] Your invoice from {invoice_date}', 'invoicing'),
445 445
             'size'     => 'large'
446 446
         ),
447 447
 
448 448
         'email_user_invoice_heading' => array(
449 449
             'id'       => 'email_user_invoice_heading',
450
-            'name'     => __( 'Email Heading', 'invoicing' ),
451
-            'desc'     => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ),
450
+            'name'     => __('Email Heading', 'invoicing'),
451
+            'desc'     => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'),
452 452
             'help-tip' => true,
453 453
             'type'     => 'text',
454
-            'std'      => __( 'Your invoice {invoice_number} details', 'invoicing' ),
454
+            'std'      => __('Your invoice {invoice_number} details', 'invoicing'),
455 455
             'size'     => 'large'
456 456
         ),
457 457
 
458 458
         'email_user_invoice_body' => array(
459 459
             'id'       => 'email_user_invoice_body',
460
-            'name'     => __( 'Email Content', 'invoicing' ),
461
-            'desc'     => __( 'The content of the email (wildcards and HTML are allowed).', 'invoicing' ),
460
+            'name'     => __('Email Content', 'invoicing'),
461
+            'desc'     => __('The content of the email (wildcards and HTML are allowed).', 'invoicing'),
462 462
             'type'     => 'rich_editor',
463
-            'std'      => __( '<p>Hi {name},</p><p>An invoice of {invoice_total} has been created for you on {site_title}. You can <a href="{invoice_link}">view</a> or <a href="{invoice_pay_link}">pay</a> the invoice. Please reply to this email if you have any questions about the invoice.', 'invoicing' ),
463
+            'std'      => __('<p>Hi {name},</p><p>An invoice of {invoice_total} has been created for you on {site_title}. You can <a href="{invoice_link}">view</a> or <a href="{invoice_pay_link}">pay</a> the invoice. Please reply to this email if you have any questions about the invoice.', 'invoicing'),
464 464
             'class'    => 'large',
465 465
             'size'     => '10'
466 466
         ),
@@ -470,53 +470,53 @@  discard block
 block discarded – undo
470 470
 
471 471
         'email_user_note_header' => array(
472 472
             'id'       => 'email_user_note_header',
473
-            'name'     => '<h3>' . __( 'Customer Note', 'invoicing' ) . '</h3>',
474
-            'desc'     => __( 'These emails are sent when you add a customer note to an invoice/quote.', 'invoicing' ),
473
+            'name'     => '<h3>' . __('Customer Note', 'invoicing') . '</h3>',
474
+            'desc'     => __('These emails are sent when you add a customer note to an invoice/quote.', 'invoicing'),
475 475
             'type'     => 'header',
476 476
         ),
477 477
 
478 478
         'email_user_note_active' => array(
479 479
             'id'       => 'email_user_note_active',
480
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
481
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
480
+            'name'     => __('Enable/Disable', 'invoicing'),
481
+            'desc'     => __('Enable this email notification', 'invoicing'),
482 482
             'type'     => 'checkbox',
483 483
             'std'      => 1
484 484
         ),
485 485
 
486 486
         'email_user_note_admin_bcc' => array(
487 487
             'id'       => 'email_user_note_admin_bcc',
488
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
489
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
488
+            'name'     => __('Enable Admin BCC', 'invoicing'),
489
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
490 490
             'type'     => 'checkbox',
491 491
             'std'      => 0
492 492
         ),
493 493
 
494 494
         'email_user_note_subject' => array(
495 495
             'id'       => 'email_user_note_subject',
496
-            'name'     => __( 'Subject', 'invoicing' ),
497
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
496
+            'name'     => __('Subject', 'invoicing'),
497
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
498 498
             'help-tip' => true,
499 499
             'type'     => 'text',
500
-            'std'      => __( '[{site_title}] Note added to your {invoice_label} #{invoice_number} from {invoice_date}', 'invoicing' ),
500
+            'std'      => __('[{site_title}] Note added to your {invoice_label} #{invoice_number} from {invoice_date}', 'invoicing'),
501 501
             'size'     => 'large'
502 502
         ),
503 503
 
504 504
         'email_user_note_heading' => array(
505 505
             'id'       => 'email_user_note_heading',
506
-            'name'     => __( 'Email Heading', 'invoicing' ),
507
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
506
+            'name'     => __('Email Heading', 'invoicing'),
507
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
508 508
             'help-tip' => true,
509 509
             'type'     => 'text',
510
-            'std'      => __( 'A note has been added to your {invoice_label}', 'invoicing' ),
510
+            'std'      => __('A note has been added to your {invoice_label}', 'invoicing'),
511 511
             'size'     => 'large'
512 512
         ),
513 513
 
514 514
         'email_user_note_body' => array(
515 515
             'id'       => 'email_user_note_body',
516
-            'name'     => __( 'Email Content', 'invoicing' ),
517
-            'desc'     => __( 'The content of the email (wildcards and HTML are allowed).', 'invoicing' ),
516
+            'name'     => __('Email Content', 'invoicing'),
517
+            'desc'     => __('The content of the email (wildcards and HTML are allowed).', 'invoicing'),
518 518
             'type'     => 'rich_editor',
519
-            'std'      => __( '<p>Hi {name},</p><p>Following note has been added to your {invoice_label}:</p><blockquote class="wpinv-note">{customer_note}</blockquote>', 'invoicing' ),
519
+            'std'      => __('<p>Hi {name},</p><p>Following note has been added to your {invoice_label}:</p><blockquote class="wpinv-note">{customer_note}</blockquote>', 'invoicing'),
520 520
             'class'    => 'large',
521 521
             'size'     => '10'
522 522
         ),
@@ -527,63 +527,63 @@  discard block
 block discarded – undo
527 527
 
528 528
         'email_overdue_header' => array(
529 529
             'id'       => 'email_overdue_header',
530
-            'name'     => '<h3>' . __( 'Payment Reminder', 'invoicing' ) . '</h3>',
531
-            'desc'     => __( 'Payment reminder emails are sent to customers whenever their invoices are due.', 'invoicing' ),
530
+            'name'     => '<h3>' . __('Payment Reminder', 'invoicing') . '</h3>',
531
+            'desc'     => __('Payment reminder emails are sent to customers whenever their invoices are due.', 'invoicing'),
532 532
             'type'     => 'header',
533 533
         ),
534 534
 
535 535
         'email_overdue_active' => array(
536 536
             'id'       => 'email_overdue_active',
537
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
538
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
537
+            'name'     => __('Enable/Disable', 'invoicing'),
538
+            'desc'     => __('Enable this email notification', 'invoicing'),
539 539
             'type'     => 'checkbox',
540 540
             'std'      => 1
541 541
         ),
542 542
 
543 543
         'email_overdue_admin_bcc' => array(
544 544
             'id'       => 'email_overdue_admin_bcc',
545
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
546
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
545
+            'name'     => __('Enable Admin BCC', 'invoicing'),
546
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
547 547
             'type'     => 'checkbox',
548 548
             'std'      => 0
549 549
         ),
550 550
 
551 551
         'email_overdue_days' => array(
552 552
             'id'       => 'email_overdue_days',
553
-            'name'     => __( 'When to Send', 'invoicing' ),
554
-            'desc'     => __( 'Check when you would like payment reminders sent out.', 'invoicing' ),
553
+            'name'     => __('When to Send', 'invoicing'),
554
+            'desc'     => __('Check when you would like payment reminders sent out.', 'invoicing'),
555 555
             'help-tip' => true,
556
-            'std'      => array( '1' ),
556
+            'std'      => array('1'),
557 557
             'type'     => 'multicheck',
558 558
             'options'  => $overdue_days_options,
559 559
         ),
560 560
 
561 561
         'email_overdue_subject' => array(
562 562
             'id'       => 'email_overdue_subject',
563
-            'name'     => __( 'Subject', 'invoicing' ),
564
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
563
+            'name'     => __('Subject', 'invoicing'),
564
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
565 565
             'help-tip' => true,
566 566
             'type'     => 'text',
567
-            'std'      => __( '[{site_title}] Payment Reminder', 'invoicing' ),
567
+            'std'      => __('[{site_title}] Payment Reminder', 'invoicing'),
568 568
             'size'     => 'large'
569 569
         ),
570 570
 
571 571
         'email_overdue_heading' => array(
572 572
             'id'       => 'email_overdue_heading',
573
-            'name'     => __( 'Email Heading', 'invoicing' ),
574
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
573
+            'name'     => __('Email Heading', 'invoicing'),
574
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
575 575
             'help-tip' => true,
576 576
             'type'     => 'text',
577
-            'std'      => __( 'Payment reminder for your invoice', 'invoicing' ),
577
+            'std'      => __('Payment reminder for your invoice', 'invoicing'),
578 578
             'size'     => 'large'
579 579
         ),
580 580
 
581 581
         'email_overdue_body' => array(
582 582
             'id'       => 'email_overdue_body',
583
-            'name'     => __( 'Email Content', 'invoicing' ),
584
-            'desc'     => __( 'The content of the email.', 'invoicing' ),
583
+            'name'     => __('Email Content', 'invoicing'),
584
+            'desc'     => __('The content of the email.', 'invoicing'),
585 585
             'type'     => 'rich_editor',
586
-            'std'      => __( '<p>Hi {full_name},</p><p>This is just a friendly reminder that your invoice <a href="{invoice_link}">#{invoice_number}</a> {is_was} due on {invoice_due_date}.</p><p>The total of this invoice is {invoice_total}</p><p>To view / pay now for this invoice please use the following link: <a class="btn btn-success" href="{invoice_link}">View / Pay</a></p>', 'invoicing' ),
586
+            'std'      => __('<p>Hi {full_name},</p><p>This is just a friendly reminder that your invoice <a href="{invoice_link}">#{invoice_number}</a> {is_was} due on {invoice_due_date}.</p><p>The total of this invoice is {invoice_total}</p><p>To view / pay now for this invoice please use the following link: <a class="btn btn-success" href="{invoice_link}">View / Pay</a></p>', 'invoicing'),
587 587
             'class'    => 'large',
588 588
             'size'     => 10,
589 589
         ),
@@ -594,63 +594,63 @@  discard block
 block discarded – undo
594 594
 
595 595
         'email_renewal_reminder_header' => array(
596 596
             'id'       => 'email_renewal_reminder_header',
597
-            'name'     => '<h3>' . __( 'Renewal Reminder', 'invoicing' ) . '</h3>',
598
-            'desc'     => __( 'These emails are sent to customers whenever their subscription is about to expire.', 'invoicing' ),
597
+            'name'     => '<h3>' . __('Renewal Reminder', 'invoicing') . '</h3>',
598
+            'desc'     => __('These emails are sent to customers whenever their subscription is about to expire.', 'invoicing'),
599 599
             'type'     => 'header',
600 600
         ),
601 601
 
602 602
         'email_renewal_reminder_active' => array(
603 603
             'id'       => 'email_renewal_reminder_active',
604
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
605
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
604
+            'name'     => __('Enable/Disable', 'invoicing'),
605
+            'desc'     => __('Enable this email notification', 'invoicing'),
606 606
             'type'     => 'checkbox',
607 607
             'std'      => 0
608 608
         ),
609 609
 
610 610
         'email_renewal_reminder_admin_bcc' => array(
611 611
             'id'       => 'email_renewal_reminder_admin_bcc',
612
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
613
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
612
+            'name'     => __('Enable Admin BCC', 'invoicing'),
613
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
614 614
             'type'     => 'checkbox',
615 615
             'std'      => 0
616 616
         ),
617 617
 
618 618
         'email_renewal_reminder_days' => array(
619 619
             'id'       => 'email_renewal_reminder_days',
620
-            'name'     => __( 'When to Send', 'invoicing' ),
621
-            'desc'     => __( 'Check when you would like renewal reminders sent out.', 'invoicing' ),
620
+            'name'     => __('When to Send', 'invoicing'),
621
+            'desc'     => __('Check when you would like renewal reminders sent out.', 'invoicing'),
622 622
             'help-tip' => true,
623
-            'std'      => array( '1', '5', '10' ),
623
+            'std'      => array('1', '5', '10'),
624 624
             'type'     => 'multicheck',
625 625
             'options'  => $renewal_days_options,
626 626
         ),
627 627
 
628 628
         'email_renewal_reminder_subject' => array(
629 629
             'id'       => 'email_renewal_reminder_subject',
630
-            'name'     => __( 'Subject', 'invoicing' ),
631
-            'desc'     => __( 'Enter the subject line for the email.', 'invoicing' ),
630
+            'name'     => __('Subject', 'invoicing'),
631
+            'desc'     => __('Enter the subject line for the email.', 'invoicing'),
632 632
             'help-tip' => true,
633 633
             'type'     => 'text',
634
-            'std'      => __( '[{site_title}] Renewal Reminder', 'invoicing' ),
634
+            'std'      => __('[{site_title}] Renewal Reminder', 'invoicing'),
635 635
             'size'     => 'large'
636 636
         ),
637 637
 
638 638
         'email_renewal_reminder_heading' => array(
639 639
             'id'       => 'email_renewal_reminder_heading',
640
-            'name'     => __( 'Email Heading', 'invoicing' ),
641
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
640
+            'name'     => __('Email Heading', 'invoicing'),
641
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
642 642
             'help-tip' => true,
643 643
             'type'     => 'text',
644
-            'std'      => __( 'Upcoming renewal reminder', 'invoicing' ),
644
+            'std'      => __('Upcoming renewal reminder', 'invoicing'),
645 645
             'size'     => 'large'
646 646
         ),
647 647
 
648 648
         'email_renewal_reminder_body' => array(
649 649
             'id'       => 'email_renewal_reminder_body',
650
-            'name'     => __( 'Email Content', 'invoicing' ),
651
-            'desc'     => __( 'The content of the email.', 'invoicing' ),
650
+            'name'     => __('Email Content', 'invoicing'),
651
+            'desc'     => __('The content of the email.', 'invoicing'),
652 652
             'type'     => 'rich_editor',
653
-            'std'      => __( '<p>Hi {full_name},</p><p>This is just a friendly reminder that your subscription for invoice <a href="{invoice_link}">#{invoice_number}</a> will renew on {subscription_renewal_date}.</p>', 'invoicing' ),
653
+            'std'      => __('<p>Hi {full_name},</p><p>This is just a friendly reminder that your subscription for invoice <a href="{invoice_link}">#{invoice_number}</a> will renew on {subscription_renewal_date}.</p>', 'invoicing'),
654 654
             'class'    => 'large',
655 655
             'size'     => 10,
656 656
         ),
@@ -661,53 +661,53 @@  discard block
 block discarded – undo
661 661
 
662 662
         'email_subscription_trial_header' => array(
663 663
             'id'       => 'email_subscription_trial_header',
664
-            'name'     => '<h3>' . __( 'Trial Started', 'invoicing' ) . '</h3>',
665
-            'desc'     => __( 'These emails are sent when a customer starts a subscription trial.', 'invoicing' ),
664
+            'name'     => '<h3>' . __('Trial Started', 'invoicing') . '</h3>',
665
+            'desc'     => __('These emails are sent when a customer starts a subscription trial.', 'invoicing'),
666 666
             'type'     => 'header',
667 667
         ),
668 668
 
669 669
         'email_subscription_trial_active' => array(
670 670
             'id'       => 'email_subscription_trial_active',
671
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
672
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
671
+            'name'     => __('Enable/Disable', 'invoicing'),
672
+            'desc'     => __('Enable this email notification', 'invoicing'),
673 673
             'type'     => 'checkbox',
674 674
             'std'      => 0
675 675
         ),
676 676
 
677 677
         'email_subscription_trial_bcc' => array(
678 678
             'id'       => 'email_subscription_trial_admin_bcc',
679
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
680
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
679
+            'name'     => __('Enable Admin BCC', 'invoicing'),
680
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
681 681
             'type'     => 'checkbox',
682 682
             'std'      => 0
683 683
         ),
684 684
 
685 685
         'email_subscription_trial_subject' => array(
686 686
             'id'       => 'email_subscription_trial_subject',
687
-            'name'     => __( 'Subject', 'invoicing' ),
688
-            'desc'     => __( 'Enter the subject line for the subscription trial email.', 'invoicing' ),
687
+            'name'     => __('Subject', 'invoicing'),
688
+            'desc'     => __('Enter the subject line for the subscription trial email.', 'invoicing'),
689 689
             'help-tip' => true,
690 690
             'type'     => 'text',
691
-            'std'      => __( '[{site_title}] Trial Started', 'invoicing' ),
691
+            'std'      => __('[{site_title}] Trial Started', 'invoicing'),
692 692
             'size'     => 'large'
693 693
         ),
694 694
 
695 695
         'email_subscription_trial_heading' => array(
696 696
             'id'       => 'email_subscription_trial_heading',
697
-            'name'     => __( 'Email Heading', 'invoicing' ),
698
-            'desc'     => __( 'Enter the main heading of this email.', 'invoicing' ),
697
+            'name'     => __('Email Heading', 'invoicing'),
698
+            'desc'     => __('Enter the main heading of this email.', 'invoicing'),
699 699
             'help-tip' => true,
700 700
             'type'     => 'text',
701
-            'std'      => __( 'Trial Started', 'invoicing' ),
701
+            'std'      => __('Trial Started', 'invoicing'),
702 702
             'size'     => 'large'
703 703
         ),
704 704
 
705 705
         'email_subscription_trial_body' => array(
706 706
             'id'       => 'email_trial_body',
707
-            'name'     => __( 'Email Content', 'invoicing' ),
708
-            'desc'     => __( 'The content of the email.', 'invoicing' ),
707
+            'name'     => __('Email Content', 'invoicing'),
708
+            'desc'     => __('The content of the email.', 'invoicing'),
709 709
             'type'     => 'rich_editor',
710
-            'std'      => __( '<p>Hi {first_name},</p><p>Your trial for {subscription_name} is now active and will renew on {subscription_renewal_date}.</p>', 'invoicing' ),
710
+            'std'      => __('<p>Hi {first_name},</p><p>Your trial for {subscription_name} is now active and will renew on {subscription_renewal_date}.</p>', 'invoicing'),
711 711
             'class'    => 'large',
712 712
             'size'     => 10,
713 713
         ),
@@ -717,53 +717,53 @@  discard block
 block discarded – undo
717 717
 
718 718
         'email_subscription_cancelled_header' => array(
719 719
             'id'       => 'email_subscription_cancelled_header',
720
-            'name'     => '<h3>' . __( 'Subscription Cancelled', 'invoicing' ) . '</h3>',
721
-            'desc'     => __( 'These emails are sent when a customer cancels their subscription.', 'invoicing' ),
720
+            'name'     => '<h3>' . __('Subscription Cancelled', 'invoicing') . '</h3>',
721
+            'desc'     => __('These emails are sent when a customer cancels their subscription.', 'invoicing'),
722 722
             'type'     => 'header',
723 723
         ),
724 724
 
725 725
         'email_subscription_cancelled_active' => array(
726 726
             'id'       => 'email_subscription_cancelled_active',
727
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
728
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
727
+            'name'     => __('Enable/Disable', 'invoicing'),
728
+            'desc'     => __('Enable this email notification', 'invoicing'),
729 729
             'type'     => 'checkbox',
730 730
             'std'      => 1
731 731
         ),
732 732
 
733 733
         'email_subscription_cancelled_bcc' => array(
734 734
             'id'       => 'email_subscription_cancelled_admin_bcc',
735
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
736
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
735
+            'name'     => __('Enable Admin BCC', 'invoicing'),
736
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
737 737
             'type'     => 'checkbox',
738 738
             'std'      => 1
739 739
         ),
740 740
 
741 741
         'email_subscription_cancelled_subject' => array(
742 742
             'id'       => 'email_subscription_cancelled_subject',
743
-            'name'     => __( 'Subject', 'invoicing' ),
744
-            'desc'     => __( 'Enter the subject line for the subscription cancelled email.', 'invoicing' ),
743
+            'name'     => __('Subject', 'invoicing'),
744
+            'desc'     => __('Enter the subject line for the subscription cancelled email.', 'invoicing'),
745 745
             'help-tip' => true,
746 746
             'type'     => 'text',
747
-            'std'      => __( '[{site_title}] Subscription Cancelled', 'invoicing' ),
747
+            'std'      => __('[{site_title}] Subscription Cancelled', 'invoicing'),
748 748
             'size'     => 'large'
749 749
         ),
750 750
 
751 751
         'email_subscription_cancelled_heading' => array(
752 752
             'id'       => 'email_subscription_complete_heading',
753
-            'name'     => __( 'Email Heading', 'invoicing' ),
754
-            'desc'     => __( 'Enter the main heading of this email.', 'invoicing' ),
753
+            'name'     => __('Email Heading', 'invoicing'),
754
+            'desc'     => __('Enter the main heading of this email.', 'invoicing'),
755 755
             'help-tip' => true,
756 756
             'type'     => 'text',
757
-            'std'      => __( 'Subscription Cancelled', 'invoicing' ),
757
+            'std'      => __('Subscription Cancelled', 'invoicing'),
758 758
             'size'     => 'large'
759 759
         ),
760 760
 
761 761
         'email_subscription_cancelled_body' => array(
762 762
             'id'       => 'email_cancelled_body',
763
-            'name'     => __( 'Email Content', 'invoicing' ),
764
-            'desc'     => __( 'The content of the email.', 'invoicing' ),
763
+            'name'     => __('Email Content', 'invoicing'),
764
+            'desc'     => __('The content of the email.', 'invoicing'),
765 765
             'type'     => 'rich_editor',
766
-            'std'      => __( '<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has been cancelled and will no longer renew.</p>', 'invoicing' ),
766
+            'std'      => __('<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has been cancelled and will no longer renew.</p>', 'invoicing'),
767 767
             'class'    => 'large',
768 768
             'size'     => 10,
769 769
         ),
@@ -773,53 +773,53 @@  discard block
 block discarded – undo
773 773
 
774 774
         'email_subscription_expired_header' => array(
775 775
             'id'       => 'email_subscription_expired_header',
776
-            'name'     => '<h3>' . __( 'Subscription Expired', 'invoicing' ) . '</h3>',
777
-            'desc'     => __( "These emails are sent when a customer's subscription expires and automatic renewal fails.", 'invoicing' ),
776
+            'name'     => '<h3>' . __('Subscription Expired', 'invoicing') . '</h3>',
777
+            'desc'     => __("These emails are sent when a customer's subscription expires and automatic renewal fails.", 'invoicing'),
778 778
             'type'     => 'header',
779 779
         ),
780 780
 
781 781
         'email_subscription_expired_active' => array(
782 782
             'id'       => 'email_subscription_expired_active',
783
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
784
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
783
+            'name'     => __('Enable/Disable', 'invoicing'),
784
+            'desc'     => __('Enable this email notification', 'invoicing'),
785 785
             'type'     => 'checkbox',
786 786
             'std'      => 1
787 787
         ),
788 788
 
789 789
         'email_subscription_expired_bcc' => array(
790 790
             'id'       => 'email_subscription_expired_admin_bcc',
791
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
792
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
791
+            'name'     => __('Enable Admin BCC', 'invoicing'),
792
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
793 793
             'type'     => 'checkbox',
794 794
             'std'      => 1
795 795
         ),
796 796
 
797 797
         'email_subscription_expired_subject' => array(
798 798
             'id'       => 'email_subscription_expired_subject',
799
-            'name'     => __( 'Subject', 'invoicing' ),
800
-            'desc'     => __( 'Enter the subject line for the subscription expired email.', 'invoicing' ),
799
+            'name'     => __('Subject', 'invoicing'),
800
+            'desc'     => __('Enter the subject line for the subscription expired email.', 'invoicing'),
801 801
             'help-tip' => true,
802 802
             'type'     => 'text',
803
-            'std'      => __( '[{site_title}] Subscription Expired', 'invoicing' ),
803
+            'std'      => __('[{site_title}] Subscription Expired', 'invoicing'),
804 804
             'size'     => 'large'
805 805
         ),
806 806
 
807 807
         'email_subscription_expired_heading' => array(
808 808
             'id'       => 'email_subscription_expired_heading',
809
-            'name'     => __( 'Email Heading', 'invoicing' ),
810
-            'desc'     => __( 'Enter the main heading of this email.', 'invoicing' ),
809
+            'name'     => __('Email Heading', 'invoicing'),
810
+            'desc'     => __('Enter the main heading of this email.', 'invoicing'),
811 811
             'type'     => 'text',
812
-            'std'      => __( 'Subscription Expired', 'invoicing' ),
812
+            'std'      => __('Subscription Expired', 'invoicing'),
813 813
             'help-tip' => true,
814 814
             'size'     => 'large'
815 815
         ),
816 816
 
817 817
         'email_subscription_expired_body' => array(
818 818
             'id'       => 'email_expired_body',
819
-            'name'     => __( 'Email Content', 'invoicing' ),
820
-            'desc'     => __( 'The content of the email.', 'invoicing' ),
819
+            'name'     => __('Email Content', 'invoicing'),
820
+            'desc'     => __('The content of the email.', 'invoicing'),
821 821
             'type'     => 'rich_editor',
822
-            'std'      => __( '<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has expired.</p>', 'invoicing' ),
822
+            'std'      => __('<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has expired.</p>', 'invoicing'),
823 823
             'class'    => 'large',
824 824
             'size'     => 10,
825 825
         ),
@@ -829,53 +829,53 @@  discard block
 block discarded – undo
829 829
 
830 830
         'email_subscription_complete_header' => array(
831 831
             'id'     => 'email_subscription_complete_header',
832
-            'name'   => '<h3>' . __( 'Subscription Complete', 'invoicing' ) . '</h3>',
833
-            'desc'   => __( 'These emails are sent when a customer completes their subscription.', 'invoicing' ),
832
+            'name'   => '<h3>' . __('Subscription Complete', 'invoicing') . '</h3>',
833
+            'desc'   => __('These emails are sent when a customer completes their subscription.', 'invoicing'),
834 834
             'type'   => 'header',
835 835
         ),
836 836
 
837 837
         'email_subscription_complete_active' => array(
838 838
             'id'      => 'email_subscription_complete_active',
839
-            'name'    => __( 'Enable/Disable', 'invoicing' ),
840
-            'desc'    => __( 'Enable this email notification', 'invoicing' ),
839
+            'name'    => __('Enable/Disable', 'invoicing'),
840
+            'desc'    => __('Enable this email notification', 'invoicing'),
841 841
             'type'    => 'checkbox',
842 842
             'std'     => 1
843 843
         ),
844 844
 
845 845
         'email_subscription_complete_bcc' => array(
846 846
             'id'      => 'email_subscription_complete_admin_bcc',
847
-            'name'    => __( 'Enable Admin BCC', 'invoicing' ),
848
-            'desc'    => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
847
+            'name'    => __('Enable Admin BCC', 'invoicing'),
848
+            'desc'    => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
849 849
             'type'    => 'checkbox',
850 850
             'std'     => 1
851 851
         ),
852 852
 
853 853
         'email_subscription_complete_subject' => array(
854 854
             'id'       => 'email_subscription_complete_subject',
855
-            'name'     => __( 'Subject', 'invoicing' ),
856
-            'desc'     => __( 'Enter the subject line for the subscription complete email.', 'invoicing' ),
855
+            'name'     => __('Subject', 'invoicing'),
856
+            'desc'     => __('Enter the subject line for the subscription complete email.', 'invoicing'),
857 857
             'help-tip' => true,
858 858
             'type'     => 'text',
859
-            'std'      => __( '[{site_title}] Subscription Complete', 'invoicing' ),
859
+            'std'      => __('[{site_title}] Subscription Complete', 'invoicing'),
860 860
             'size'     => 'large'
861 861
         ),
862 862
 
863 863
         'email_subscription_complete_heading' => array(
864 864
             'id'       => 'email_subscription_complete_heading',
865
-            'name'     => __( 'Email Heading', 'invoicing' ),
866
-            'desc'     => __( 'Enter the main heading of this email.', 'invoicing' ),
865
+            'name'     => __('Email Heading', 'invoicing'),
866
+            'desc'     => __('Enter the main heading of this email.', 'invoicing'),
867 867
             'help-tip' => true,
868 868
             'type'     => 'text',
869
-            'std'      => __( 'Subscription Complete', 'invoicing' ),
869
+            'std'      => __('Subscription Complete', 'invoicing'),
870 870
             'size'     => 'large'
871 871
         ),
872 872
 
873 873
         'email_subscription_complete_body' => array(
874 874
             'id'       => 'email_complete_body',
875
-            'name'     => __( 'Email Content', 'invoicing' ),
876
-            'desc'     => __( 'The content of the email.', 'invoicing' ),
875
+            'name'     => __('Email Content', 'invoicing'),
876
+            'desc'     => __('The content of the email.', 'invoicing'),
877 877
             'type'     => 'rich_editor',
878
-            'std'      => __( '<p>Hi {first_name},</p><p>Your subscription for {subscription_name} is now complete.</p>', 'invoicing' ),
878
+            'std'      => __('<p>Hi {first_name},</p><p>Your subscription for {subscription_name} is now complete.</p>', 'invoicing'),
879 879
             'class'    => 'large',
880 880
             'size'     => 10,
881 881
         ),
Please login to merge, or discard this patch.
includes/wpinv-general-functions.php 1 patch
Spacing   +131 added lines, -131 removed lines patch added patch discarded remove patch
@@ -7,190 +7,190 @@  discard block
 block discarded – undo
7 7
  */
8 8
  
9 9
 // MUST have WordPress.
10
-if ( !defined( 'WPINC' ) ) {
11
-    exit( 'Do NOT access this file directly: ' . basename( __FILE__ ) );
10
+if (!defined('WPINC')) {
11
+    exit('Do NOT access this file directly: ' . basename(__FILE__));
12 12
 }
13 13
 
14 14
 function wpinv_is_checkout() {
15 15
     global $wp_query;
16 16
 
17
-    $is_object_set    = isset( $wp_query->queried_object );
18
-    $is_object_id_set = isset( $wp_query->queried_object_id );
19
-    $checkout_page    = wpinv_get_option( 'checkout_page' );
20
-    $is_checkout      = ! empty( $checkout_page ) && is_page( $checkout_page );
17
+    $is_object_set    = isset($wp_query->queried_object);
18
+    $is_object_id_set = isset($wp_query->queried_object_id);
19
+    $checkout_page    = wpinv_get_option('checkout_page');
20
+    $is_checkout      = !empty($checkout_page) && is_page($checkout_page);
21 21
 
22
-    if ( !$is_object_set ) {
23
-        unset( $wp_query->queried_object );
22
+    if (!$is_object_set) {
23
+        unset($wp_query->queried_object);
24 24
     }
25 25
 
26
-    if ( !$is_object_id_set ) {
27
-        unset( $wp_query->queried_object_id );
26
+    if (!$is_object_id_set) {
27
+        unset($wp_query->queried_object_id);
28 28
     }
29 29
 
30
-    return apply_filters( 'wpinv_is_checkout', $is_checkout );
30
+    return apply_filters('wpinv_is_checkout', $is_checkout);
31 31
 }
32 32
 
33 33
 function wpinv_can_checkout() {
34 34
 	$can_checkout = true; // Always true for now
35 35
 
36
-	return (bool) apply_filters( 'wpinv_can_checkout', $can_checkout );
36
+	return (bool) apply_filters('wpinv_can_checkout', $can_checkout);
37 37
 }
38 38
 
39 39
 function wpinv_get_success_page_uri() {
40
-	$page_id = wpinv_get_option( 'success_page', 0 );
41
-	$page_id = absint( $page_id );
40
+	$page_id = wpinv_get_option('success_page', 0);
41
+	$page_id = absint($page_id);
42 42
 
43
-	return apply_filters( 'wpinv_get_success_page_uri', get_permalink( $page_id ) );
43
+	return apply_filters('wpinv_get_success_page_uri', get_permalink($page_id));
44 44
 }
45 45
 
46 46
 function wpinv_get_history_page_uri() {
47
-	$page_id = wpinv_get_option( 'invoice_history_page', 0 );
48
-	$page_id = absint( $page_id );
47
+	$page_id = wpinv_get_option('invoice_history_page', 0);
48
+	$page_id = absint($page_id);
49 49
 
50
-	return apply_filters( 'wpinv_get_history_page_uri', get_permalink( $page_id ) );
50
+	return apply_filters('wpinv_get_history_page_uri', get_permalink($page_id));
51 51
 }
52 52
 
53 53
 function wpinv_is_success_page() {
54
-	$is_success_page = wpinv_get_option( 'success_page', false );
55
-	$is_success_page = ! empty( $is_success_page ) ? is_page( $is_success_page ) : false;
54
+	$is_success_page = wpinv_get_option('success_page', false);
55
+	$is_success_page = !empty($is_success_page) ? is_page($is_success_page) : false;
56 56
 
57
-	return apply_filters( 'wpinv_is_success_page', $is_success_page );
57
+	return apply_filters('wpinv_is_success_page', $is_success_page);
58 58
 }
59 59
 
60 60
 function wpinv_is_invoice_history_page() {
61
-	$ret = wpinv_get_option( 'invoice_history_page', false );
62
-	$ret = $ret ? is_page( $ret ) : false;
63
-	return apply_filters( 'wpinv_is_invoice_history_page', $ret );
61
+	$ret = wpinv_get_option('invoice_history_page', false);
62
+	$ret = $ret ? is_page($ret) : false;
63
+	return apply_filters('wpinv_is_invoice_history_page', $ret);
64 64
 }
65 65
 
66 66
 function wpinv_is_subscriptions_history_page() {
67
-    $ret = wpinv_get_option( 'invoice_subscription_page', false );
68
-    $ret = $ret ? is_page( $ret ) : false;
69
-    return apply_filters( 'wpinv_is_subscriptions_history_page', $ret );
67
+    $ret = wpinv_get_option('invoice_subscription_page', false);
68
+    $ret = $ret ? is_page($ret) : false;
69
+    return apply_filters('wpinv_is_subscriptions_history_page', $ret);
70 70
 }
71 71
 
72 72
 /**
73 73
  * Redirects a user the success page.
74 74
  */
75
-function wpinv_send_to_success_page( $args = array() ) {
75
+function wpinv_send_to_success_page($args = array()) {
76 76
     $redirect = add_query_arg(
77
-        wp_parse_args( $args ),
77
+        wp_parse_args($args),
78 78
         wpinv_get_success_page_uri()
79 79
     );
80 80
 
81
-    wp_redirect( $redirect );
81
+    wp_redirect($redirect);
82 82
     exit;
83 83
 }
84 84
 
85
-function wpinv_send_to_failed_page( $args = null ) {
85
+function wpinv_send_to_failed_page($args = null) {
86 86
 	$redirect = wpinv_get_failed_transaction_uri();
87 87
     
88
-    if ( !empty( $args ) ) {
88
+    if (!empty($args)) {
89 89
         // Check for backward compatibility
90
-        if ( is_string( $args ) )
91
-            $args = str_replace( '?', '', $args );
90
+        if (is_string($args))
91
+            $args = str_replace('?', '', $args);
92 92
 
93
-        $args = wp_parse_args( $args );
93
+        $args = wp_parse_args($args);
94 94
 
95
-        $redirect = add_query_arg( $args, $redirect );
95
+        $redirect = add_query_arg($args, $redirect);
96 96
     }
97 97
 
98
-    $gateway = isset( $_REQUEST['wpi-gateway'] ) ? $_REQUEST['wpi-gateway'] : '';
98
+    $gateway = isset($_REQUEST['wpi-gateway']) ? $_REQUEST['wpi-gateway'] : '';
99 99
     
100
-    $redirect = apply_filters( 'wpinv_failed_page_redirect', $redirect, $gateway, $args );
101
-    wp_redirect( $redirect );
100
+    $redirect = apply_filters('wpinv_failed_page_redirect', $redirect, $gateway, $args);
101
+    wp_redirect($redirect);
102 102
     exit;
103 103
 }
104 104
 
105
-function wpinv_get_checkout_uri( $args = array() ) {
106
-	$uri = wpinv_get_option( 'checkout_page', false );
107
-	$uri = isset( $uri ) ? get_permalink( $uri ) : NULL;
105
+function wpinv_get_checkout_uri($args = array()) {
106
+	$uri = wpinv_get_option('checkout_page', false);
107
+	$uri = isset($uri) ? get_permalink($uri) : NULL;
108 108
 
109
-	if ( !empty( $args ) ) {
109
+	if (!empty($args)) {
110 110
 		// Check for backward compatibility
111
-		if ( is_string( $args ) )
112
-			$args = str_replace( '?', '', $args );
111
+		if (is_string($args))
112
+			$args = str_replace('?', '', $args);
113 113
 
114
-		$args = wp_parse_args( $args );
114
+		$args = wp_parse_args($args);
115 115
 
116
-		$uri = add_query_arg( $args, $uri );
116
+		$uri = add_query_arg($args, $uri);
117 117
 	}
118 118
 
119
-	$scheme = defined( 'FORCE_SSL_ADMIN' ) && FORCE_SSL_ADMIN ? 'https' : 'admin';
119
+	$scheme = defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN ? 'https' : 'admin';
120 120
 
121
-	$ajax_url = admin_url( 'admin-ajax.php', $scheme );
121
+	$ajax_url = admin_url('admin-ajax.php', $scheme);
122 122
 
123
-	if ( ( ! preg_match( '/^https/', $uri ) && preg_match( '/^https/', $ajax_url ) ) || wpinv_is_ssl_enforced() ) {
124
-		$uri = preg_replace( '/^http:/', 'https:', $uri );
123
+	if ((!preg_match('/^https/', $uri) && preg_match('/^https/', $ajax_url)) || wpinv_is_ssl_enforced()) {
124
+		$uri = preg_replace('/^http:/', 'https:', $uri);
125 125
 	}
126 126
 
127
-	return apply_filters( 'wpinv_get_checkout_uri', $uri );
127
+	return apply_filters('wpinv_get_checkout_uri', $uri);
128 128
 }
129 129
 
130
-function wpinv_send_back_to_checkout( $args = array() ) {
130
+function wpinv_send_back_to_checkout($args = array()) {
131 131
 	$redirect = wpinv_get_checkout_uri();
132 132
 
133
-	if ( ! empty( $args ) ) {
133
+	if (!empty($args)) {
134 134
 		// Check for backward compatibility
135
-		if ( is_string( $args ) )
136
-			$args = str_replace( '?', '', $args );
135
+		if (is_string($args))
136
+			$args = str_replace('?', '', $args);
137 137
 
138
-		$args = wp_parse_args( $args );
138
+		$args = wp_parse_args($args);
139 139
 
140
-		$redirect = add_query_arg( $args, $redirect );
140
+		$redirect = add_query_arg($args, $redirect);
141 141
 	}
142 142
 
143
-    do_action( 'wpinv_pre_send_back_to_checkout', $args );
144
-	wp_redirect( apply_filters( 'wpinv_send_back_to_checkout', $redirect, $args ) );
143
+    do_action('wpinv_pre_send_back_to_checkout', $args);
144
+	wp_redirect(apply_filters('wpinv_send_back_to_checkout', $redirect, $args));
145 145
 	exit;
146 146
 }
147 147
 
148
-function wpinv_get_success_page_url( $query_string = null ) {
149
-	$success_page = wpinv_get_option( 'success_page', 0 );
150
-	$success_page = get_permalink( $success_page );
148
+function wpinv_get_success_page_url($query_string = null) {
149
+	$success_page = wpinv_get_option('success_page', 0);
150
+	$success_page = get_permalink($success_page);
151 151
 
152
-	if ( $query_string )
152
+	if ($query_string)
153 153
 		$success_page .= $query_string;
154 154
 
155
-	return apply_filters( 'wpinv_success_page_url', $success_page );
155
+	return apply_filters('wpinv_success_page_url', $success_page);
156 156
 }
157 157
 
158
-function wpinv_get_failed_transaction_uri( $extras = false ) {
159
-	$uri = wpinv_get_option( 'failure_page', '' );
160
-	$uri = ! empty( $uri ) ? trailingslashit( get_permalink( $uri ) ) : home_url();
158
+function wpinv_get_failed_transaction_uri($extras = false) {
159
+	$uri = wpinv_get_option('failure_page', '');
160
+	$uri = !empty($uri) ? trailingslashit(get_permalink($uri)) : home_url();
161 161
 
162
-	if ( $extras )
162
+	if ($extras)
163 163
 		$uri .= $extras;
164 164
 
165
-	return apply_filters( 'wpinv_get_failed_transaction_uri', $uri );
165
+	return apply_filters('wpinv_get_failed_transaction_uri', $uri);
166 166
 }
167 167
 
168 168
 function wpinv_is_failed_transaction_page() {
169
-	$ret = wpinv_get_option( 'failure_page', false );
170
-	$ret = isset( $ret ) ? is_page( $ret ) : false;
169
+	$ret = wpinv_get_option('failure_page', false);
170
+	$ret = isset($ret) ? is_page($ret) : false;
171 171
 
172
-	return apply_filters( 'wpinv_is_failure_page', $ret );
172
+	return apply_filters('wpinv_is_failure_page', $ret);
173 173
 }
174 174
 
175
-function wpinv_transaction_query( $type = 'start' ) {
175
+function wpinv_transaction_query($type = 'start') {
176 176
     global $wpdb;
177 177
 
178 178
     $wpdb->hide_errors();
179 179
 
180
-    if ( ! defined( 'WPINV_USE_TRANSACTIONS' ) ) {
181
-        define( 'WPINV_USE_TRANSACTIONS', true );
180
+    if (!defined('WPINV_USE_TRANSACTIONS')) {
181
+        define('WPINV_USE_TRANSACTIONS', true);
182 182
     }
183 183
 
184
-    if ( WPINV_USE_TRANSACTIONS ) {
185
-        switch ( $type ) {
184
+    if (WPINV_USE_TRANSACTIONS) {
185
+        switch ($type) {
186 186
             case 'commit' :
187
-                $wpdb->query( 'COMMIT' );
187
+                $wpdb->query('COMMIT');
188 188
                 break;
189 189
             case 'rollback' :
190
-                $wpdb->query( 'ROLLBACK' );
190
+                $wpdb->query('ROLLBACK');
191 191
                 break;
192 192
             default :
193
-                $wpdb->query( 'START TRANSACTION' );
193
+                $wpdb->query('START TRANSACTION');
194 194
             break;
195 195
         }
196 196
     }
@@ -199,141 +199,141 @@  discard block
 block discarded – undo
199 199
 function wpinv_get_prefix() {
200 200
     $invoice_prefix = 'INV-';
201 201
     
202
-    return apply_filters( 'wpinv_get_prefix', $invoice_prefix );
202
+    return apply_filters('wpinv_get_prefix', $invoice_prefix);
203 203
 }
204 204
 
205 205
 function wpinv_get_business_logo() {
206
-    $business_logo = wpinv_get_option( 'logo' );
207
-    return apply_filters( 'wpinv_get_business_logo', $business_logo );
206
+    $business_logo = wpinv_get_option('logo');
207
+    return apply_filters('wpinv_get_business_logo', $business_logo);
208 208
 }
209 209
 
210 210
 function wpinv_get_business_name() {
211 211
     $business_name = wpinv_get_option('store_name');
212
-    return apply_filters( 'wpinv_get_business_name', $business_name );
212
+    return apply_filters('wpinv_get_business_name', $business_name);
213 213
 }
214 214
 
215 215
 function wpinv_get_blogname() {
216
-    return wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
216
+    return wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
217 217
 }
218 218
 
219 219
 function wpinv_get_admin_email() {
220
-    $admin_email = wpinv_get_option( 'admin_email', get_option( 'admin_email' ) );
221
-    return apply_filters( 'wpinv_admin_email', $admin_email );
220
+    $admin_email = wpinv_get_option('admin_email', get_option('admin_email'));
221
+    return apply_filters('wpinv_admin_email', $admin_email);
222 222
 }
223 223
 
224 224
 function wpinv_get_business_website() {
225
-    $business_website = home_url( '/' );
226
-    return apply_filters( 'wpinv_get_business_website', $business_website );
225
+    $business_website = home_url('/');
226
+    return apply_filters('wpinv_get_business_website', $business_website);
227 227
 }
228 228
 
229
-function wpinv_get_terms_text( $invoice_id = 0 ) {
229
+function wpinv_get_terms_text($invoice_id = 0) {
230 230
     $terms_text = '';
231
-    return apply_filters( 'wpinv_get_terms_text', $terms_text, $invoice_id );
231
+    return apply_filters('wpinv_get_terms_text', $terms_text, $invoice_id);
232 232
 }
233 233
 
234 234
 function wpinv_get_business_footer() {
235
-    $site_link = '<a target="_blank" href="' . esc_url( wpinv_get_business_website() ) . '">' . esc_html( wpinv_get_business_name() ) . '</a>';
236
-    $business_footer = wp_sprintf( __( 'Thanks for using %s', 'invoicing' ), $site_link );
237
-    return apply_filters( 'wpinv_get_business_footer', $business_footer );
235
+    $site_link = '<a target="_blank" href="' . esc_url(wpinv_get_business_website()) . '">' . esc_html(wpinv_get_business_name()) . '</a>';
236
+    $business_footer = wp_sprintf(__('Thanks for using %s', 'invoicing'), $site_link);
237
+    return apply_filters('wpinv_get_business_footer', $business_footer);
238 238
 }
239 239
 
240 240
 function wpinv_checkout_required_fields() {
241 241
     $required_fields = array();
242 242
     
243 243
     // Let payment gateways and other extensions determine if address fields should be required
244
-    $require_billing_details = apply_filters( 'wpinv_checkout_required_billing_details', wpinv_use_taxes() );
244
+    $require_billing_details = apply_filters('wpinv_checkout_required_billing_details', wpinv_use_taxes());
245 245
     
246
-    if ( $require_billing_details ) {
247
-		if ( (bool)wpinv_get_option( 'fname_mandatory' ) ) {
246
+    if ($require_billing_details) {
247
+		if ((bool) wpinv_get_option('fname_mandatory')) {
248 248
 			$required_fields['first_name'] = array(
249 249
 				'error_id' => 'invalid_first_name',
250
-				'error_message' => __( 'Please enter your first name', 'invoicing' )
250
+				'error_message' => __('Please enter your first name', 'invoicing')
251 251
 			);
252 252
 		}
253
-		if ( (bool)wpinv_get_option( 'address_mandatory' ) ) {
253
+		if ((bool) wpinv_get_option('address_mandatory')) {
254 254
 			$required_fields['address'] = array(
255 255
 				'error_id' => 'invalid_address',
256
-				'error_message' => __( 'Please enter your address', 'invoicing' )
256
+				'error_message' => __('Please enter your address', 'invoicing')
257 257
 			);
258 258
 		}
259
-		if ( (bool)wpinv_get_option( 'city_mandatory' ) ) {
259
+		if ((bool) wpinv_get_option('city_mandatory')) {
260 260
 			$required_fields['city'] = array(
261 261
 				'error_id' => 'invalid_city',
262
-				'error_message' => __( 'Please enter your billing city', 'invoicing' )
262
+				'error_message' => __('Please enter your billing city', 'invoicing')
263 263
 			);
264 264
 		}
265
-		if ( (bool)wpinv_get_option( 'state_mandatory' ) ) {
265
+		if ((bool) wpinv_get_option('state_mandatory')) {
266 266
 			$required_fields['state'] = array(
267 267
 				'error_id' => 'invalid_state',
268
-				'error_message' => __( 'Please enter billing state / province', 'invoicing' )
268
+				'error_message' => __('Please enter billing state / province', 'invoicing')
269 269
 			);
270 270
 		}
271
-		if ( (bool)wpinv_get_option( 'country_mandatory' ) ) {
271
+		if ((bool) wpinv_get_option('country_mandatory')) {
272 272
 			$required_fields['country'] = array(
273 273
 				'error_id' => 'invalid_country',
274
-				'error_message' => __( 'Please select your billing country', 'invoicing' )
274
+				'error_message' => __('Please select your billing country', 'invoicing')
275 275
 			);
276 276
 		}
277 277
     }
278 278
 
279
-    return apply_filters( 'wpinv_checkout_required_fields', $required_fields );
279
+    return apply_filters('wpinv_checkout_required_fields', $required_fields);
280 280
 }
281 281
 
282 282
 function wpinv_is_ssl_enforced() {
283
-    $ssl_enforced = wpinv_get_option( 'enforce_ssl', false );
284
-    return (bool) apply_filters( 'wpinv_is_ssl_enforced', $ssl_enforced );
283
+    $ssl_enforced = wpinv_get_option('enforce_ssl', false);
284
+    return (bool) apply_filters('wpinv_is_ssl_enforced', $ssl_enforced);
285 285
 }
286 286
 
287 287
 function wpinv_schedule_event_twicedaily() {
288 288
     wpinv_email_payment_reminders();
289 289
 }
290
-add_action( 'wpinv_register_schedule_event_daily', 'wpinv_schedule_event_twicedaily' );
290
+add_action('wpinv_register_schedule_event_daily', 'wpinv_schedule_event_twicedaily');
291 291
 
292 292
 function wpinv_require_login_to_checkout() {
293
-    $return = wpinv_get_option( 'login_to_checkout', false );
294
-    return (bool) apply_filters( 'wpinv_require_login_to_checkout', $return );
293
+    $return = wpinv_get_option('login_to_checkout', false);
294
+    return (bool) apply_filters('wpinv_require_login_to_checkout', $return);
295 295
 }
296 296
 
297
-function wpinv_sequential_number_active( $type = '' ) {
298
-    $check = apply_filters( 'wpinv_pre_check_sequential_number_active', null, $type );
299
-    if ( null !== $check ) {
297
+function wpinv_sequential_number_active($type = '') {
298
+    $check = apply_filters('wpinv_pre_check_sequential_number_active', null, $type);
299
+    if (null !== $check) {
300 300
         return $check;
301 301
     }
302 302
     
303
-    return wpinv_get_option( 'sequential_invoice_number' );
303
+    return wpinv_get_option('sequential_invoice_number');
304 304
 }
305 305
 
306
-function wpinv_switch_to_locale( $locale = NULL ) {
306
+function wpinv_switch_to_locale($locale = NULL) {
307 307
     global $invoicing, $wpi_switch_locale;
308 308
 
309
-    if ( ! empty( $invoicing ) && function_exists( 'switch_to_locale' ) ) {
310
-        $locale = empty( $locale ) ? get_locale() : $locale;
309
+    if (!empty($invoicing) && function_exists('switch_to_locale')) {
310
+        $locale = empty($locale) ? get_locale() : $locale;
311 311
 
312
-        switch_to_locale( $locale );
312
+        switch_to_locale($locale);
313 313
 
314 314
         $wpi_switch_locale = $locale;
315 315
 
316
-        add_filter( 'plugin_locale', 'get_locale' );
316
+        add_filter('plugin_locale', 'get_locale');
317 317
 
318 318
         $invoicing->load_textdomain();
319 319
 
320
-        do_action( 'wpinv_switch_to_locale', $locale );
320
+        do_action('wpinv_switch_to_locale', $locale);
321 321
     }
322 322
 }
323 323
 
324 324
 function wpinv_restore_locale() {
325 325
     global $invoicing, $wpi_switch_locale;
326 326
     
327
-    if ( ! empty( $invoicing ) && function_exists( 'restore_previous_locale' ) && $wpi_switch_locale ) {
327
+    if (!empty($invoicing) && function_exists('restore_previous_locale') && $wpi_switch_locale) {
328 328
         restore_previous_locale();
329 329
 
330 330
         $wpi_switch_locale = NULL;
331 331
 
332
-        remove_filter( 'plugin_locale', 'get_locale' );
332
+        remove_filter('plugin_locale', 'get_locale');
333 333
 
334 334
         $invoicing->load_textdomain();
335 335
 
336
-        do_action( 'wpinv_restore_locale' );
336
+        do_action('wpinv_restore_locale');
337 337
     }
338 338
 }
339 339
 
@@ -341,22 +341,22 @@  discard block
 block discarded – undo
341 341
  * Returns the default form's id.
342 342
  */
343 343
 function wpinv_get_default_payment_form() {
344
-    $form = get_option( 'wpinv_default_payment_form' );
344
+    $form = get_option('wpinv_default_payment_form');
345 345
 
346
-    if ( empty( $form ) || 'publish' != get_post_status( $form ) ) {
346
+    if (empty($form) || 'publish' != get_post_status($form)) {
347 347
         $form = wp_insert_post(
348 348
             array(
349 349
                 'post_type'   => 'wpi_payment_form',
350
-                'post_title'  => __( 'Checkout (default)', 'invoicing' ),
350
+                'post_title'  => __('Checkout (default)', 'invoicing'),
351 351
                 'post_status' => 'publish',
352 352
                 'meta_input'  => array(
353
-                    'wpinv_form_elements' => wpinv_get_data( 'default-payment-form' ),
353
+                    'wpinv_form_elements' => wpinv_get_data('default-payment-form'),
354 354
                     'wpinv_form_items'    => array(),
355 355
                 )
356 356
             )
357 357
         );
358 358
 
359
-        update_option( 'wpinv_default_payment_form', $form );
359
+        update_option('wpinv_default_payment_form', $form);
360 360
     }
361 361
 
362 362
     return $form;
Please login to merge, or discard this patch.