WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress - Version 3.5.9

Version Description

Download this release

Release Info

Developer tareq1988
Plugin Icon 128x128 WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress
Version 3.5.9
Comparing to
See all releases

Code changes from version 3.5.8 to 3.5.9

admin/form-builder/assets/js/components/form-column_field/index.js CHANGED
@@ -52,13 +52,15 @@ Vue.component('form-column_field', {
52
  handle: '.wpuf-column-field-control-buttons .move',
53
  scroll: true,
54
  stop: function( event, ui ) {
55
- var data_source = ui.item.context.attributes['data-source'].value;
 
 
56
 
57
  if ('panel' === data_source) {
58
  var payload = {
59
  toIndex: parseInt($(ui.item).index()),
60
- field_template: ui.item.context.attributes['data-form-field'].value,
61
- to_column: $(this).context.parentElement.classList[0]
62
  };
63
 
64
  self.add_column_inner_field(payload);
@@ -78,9 +80,9 @@ Vue.component('form-column_field', {
78
 
79
  if ( 'column-field-stage' === source) {
80
  payload.field_id = self.field.id;
81
- payload.fromIndex = parseInt(ui.item.context.attributes['column-field-index'].value);
82
- payload.fromColumn = ui.item.context.attributes['in-column'].value;
83
- payload.toColumn = ui.item.context.parentElement.parentElement.classList[0];
84
 
85
  // when drag field one column to another column, sortable event trigger twice and try to swap field twice.
86
  // So the following conditions are needed to check and run swap_column_field_elements commit only once
@@ -296,7 +298,7 @@ Vue.component('form-column_field', {
296
  (function () {
297
  var columnElement;
298
  var startOffset;
299
- var columnField = $(self.$el).context.parentElement;
300
  var total_width = parseInt($(columnField).width());
301
 
302
  Array.prototype.forEach.call(
@@ -334,17 +336,17 @@ Vue.component('form-column_field', {
334
  colTwoWidth = 0,
335
  colThreeWidth = 0;
336
 
337
- if (columnsNumber === 3) {
338
  colOneWidth = 100 / columnsNumber;
339
  colTwoWidth = 100 / columnsNumber;
340
  colThreeWidth = 100 / columnsNumber;
341
- } else if (columnsNumber === 2) {
342
  colOneWidth = 100 / columnsNumber;
343
  colTwoWidth = 100 / columnsNumber;
344
  colThreeWidth = 0;
345
  } else {
346
- colOneWidth = $(columnField).find(".column-1").width();
347
- colTwoWidth = $(columnField).find(".column-2").width();
348
  colThreeWidth = 0;
349
  }
350
 
52
  handle: '.wpuf-column-field-control-buttons .move',
53
  scroll: true,
54
  stop: function( event, ui ) {
55
+ var item = ui.item[0];
56
+ var data = item.dataset;
57
+ var data_source = data.source;
58
 
59
  if ('panel' === data_source) {
60
  var payload = {
61
  toIndex: parseInt($(ui.item).index()),
62
+ field_template: data.formField,
63
+ to_column: $(this).parent().attr('class').split(' ')[0]
64
  };
65
 
66
  self.add_column_inner_field(payload);
80
 
81
  if ( 'column-field-stage' === source) {
82
  payload.field_id = self.field.id;
83
+ payload.fromIndex = parseInt(item.attributes['column-field-index'].value);
84
+ payload.fromColumn = item.attributes['in-column'].value;
85
+ payload.toColumn = item.parent().parent().attr('class').split(' ')[0];
86
 
87
  // when drag field one column to another column, sortable event trigger twice and try to swap field twice.
88
  // So the following conditions are needed to check and run swap_column_field_elements commit only once
298
  (function () {
299
  var columnElement;
300
  var startOffset;
301
+ var columnField = $(self.$el).parent();
302
  var total_width = parseInt($(columnField).width());
303
 
304
  Array.prototype.forEach.call(
336
  colTwoWidth = 0,
337
  colThreeWidth = 0;
338
 
339
+ if (parseInt(columnsNumber) === 3) {
340
  colOneWidth = 100 / columnsNumber;
341
  colTwoWidth = 100 / columnsNumber;
342
  colThreeWidth = 100 / columnsNumber;
343
+ } else if (parseInt(columnsNumber) === 2) {
344
  colOneWidth = 100 / columnsNumber;
345
  colTwoWidth = 100 / columnsNumber;
346
  colThreeWidth = 0;
347
  } else {
348
+ colOneWidth = 100;
349
+ colTwoWidth = 0;
350
  colThreeWidth = 0;
351
  }
352
 
admin/html/whats-new.php CHANGED
@@ -1,5 +1,32 @@
1
  <?php
2
  $changelog = [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  [
4
  'version' => 'Version 3.5.8',
5
  'released' => '2020-11-21',
1
  <?php
2
  $changelog = [
3
+ [
4
+ 'version' => 'Version 3.5.9',
5
+ 'released' => '2020-12-11',
6
+ 'changes' => [
7
+
8
+ [
9
+ 'title' => __( 'Once trial subscription is used, it couldn\'t reset', 'wp-user-frontend' ),
10
+ 'type' => 'Fix',
11
+ ],
12
+ [
13
+ 'title' => __( 'Subscription cancel doesn\'t work', 'wp-user-frontend' ),
14
+ 'type' => 'Fix',
15
+ ],
16
+ [
17
+ 'title' => __( 'The tax rate was not calculated with the total amount', 'wp-user-frontend' ),
18
+ 'type' => 'Fix',
19
+ ],
20
+ [
21
+ 'title' => __( 'The width of the column field was breaking', 'wp-user-frontend' ),
22
+ 'type' => 'Fix',
23
+ ],
24
+ [
25
+ 'title' => __( 'Paypal recurring payment', 'wp-user-frontend' ),
26
+ 'type' => 'Enhancement',
27
+ ],
28
+ ],
29
+ ],
30
  [
31
  'version' => 'Version 3.5.8',
32
  'released' => '2020-11-21',
admin/settings-options.php CHANGED
@@ -60,7 +60,7 @@ function wpuf_settings_fields() {
60
  $post_types = get_post_types();
61
  unset( $post_types['attachment'], $post_types['revision'], $post_types['nav_menu_item'], $post_types['wpuf_forms'], $post_types['wpuf_profile'], $post_types['wpuf_input'], $post_types['wpuf_subscription'], $post_types['custom_css'], $post_types['customize_changeset'], $post_types['wpuf_coupon'], $post_types['oembed_cache'] );
62
 
63
- $login_redirect_pages = [
64
  'previous_page' => __( 'Previous Page', 'wp-user-frontend' ),
65
  ] + $pages;
66
 
@@ -77,411 +77,436 @@ function wpuf_settings_fields() {
77
  $user_roles = [];
78
  $all_roles = get_editable_roles();
79
 
80
- foreach ( $all_roles as $key=>$value ) {
81
- $user_roles[$key] = $value['name'];
82
  }
83
 
84
  $settings_fields = [
85
- 'wpuf_general' => apply_filters( 'wpuf_options_others', [
86
- [
87
- 'name' => 'show_admin_bar',
88
- 'label' => __( 'Show Admin Bar', 'wp-user-frontend' ),
89
- 'desc' => __( 'Select user by roles, who can view admin bar in frontend.', 'wp-user-frontend' ),
90
- 'callback'=> 'wpuf_settings_multiselect',
91
- 'options' => $user_roles,
92
- 'default' => [ 'administrator', 'editor', 'author', 'contributor' ],
93
- ],
94
- [
95
- 'name' => 'admin_access',
96
- 'label' => __( 'Admin area access', 'wp-user-frontend' ),
97
- 'desc' => __( 'Allow you to block specific user role to Ajax request and Media upload.', 'wp-user-frontend' ),
98
- 'type' => 'select',
99
- 'default' => 'read',
100
- 'options' => [
101
- 'manage_options' => __( 'Admin Only', 'wp-user-frontend' ),
102
- 'edit_others_posts' => __( 'Admins, Editors', 'wp-user-frontend' ),
103
- 'publish_posts' => __( 'Admins, Editors, Authors', 'wp-user-frontend' ),
104
- 'edit_posts' => __( 'Admins, Editors, Authors, Contributors', 'wp-user-frontend' ),
105
- 'read' => __( 'Default', 'wp-user-frontend' ),
106
- ],
107
- ],
108
- [
109
- 'name' => 'override_editlink',
110
- 'label' => __( 'Override the post edit link', 'wp-user-frontend' ),
111
- 'desc' => __( 'Users see the edit link in post if s/he is capable to edit the post/page. Selecting <strong>Yes</strong> will override the default WordPress edit post link in frontend', 'wp-user-frontend' ),
112
- 'type' => 'select',
113
- 'default' => 'no',
114
- 'options' => [
115
- 'yes' => __( 'Yes', 'wp-user-frontend' ),
116
- 'no' => __( 'No', 'wp-user-frontend' ),
117
- ],
118
- ],
119
- [
120
- 'name' => 'wpuf_compatibility_acf',
121
- 'label' => __( 'ACF Compatibility', 'wp-user-frontend' ),
122
- 'desc' => __( 'Select <strong>Yes</strong> if you want to make compatible WPUF custom fields data with advanced custom fields.', 'wp-user-frontend' ),
123
- 'type' => 'select',
124
- 'default' => 'no',
125
- 'options' => [
126
- 'yes' => __( 'Yes', 'wp-user-frontend' ),
127
- 'no' => __( 'No', 'wp-user-frontend' ),
128
- ],
129
- ],
130
- [
131
- 'name' => 'load_script',
132
- 'label' => __( 'Load Scripts', 'wp-user-frontend' ),
133
- 'desc' => __( 'Load scripts/styles in all pages', 'wp-user-frontend' ),
134
- 'type' => 'checkbox',
135
- 'default' => 'on',
136
- ],
137
- [
138
- 'name' => 'recaptcha_public',
139
- 'label' => __( 'reCAPTCHA Site Key', 'wp-user-frontend' ),
140
- ],
141
- [
142
- 'name' => 'recaptcha_private',
143
- 'label' => __( 'reCAPTCHA Secret Key', 'wp-user-frontend' ),
144
- 'desc' => __( '<a target="_blank" href="https://www.google.com/recaptcha/">Register here</a> to get reCaptcha Site and Secret keys.', 'wp-user-frontend' ),
145
- ],
146
- [
147
- 'name' => 'custom_css',
148
- 'label' => __( 'Custom CSS codes', 'wp-user-frontend' ),
149
- 'desc' => __( 'If you want to add your custom CSS code, it will be added on page header wrapped with style tag', 'wp-user-frontend' ),
150
- 'type' => 'textarea',
151
- ],
152
- ] ),
153
- 'wpuf_frontend_posting' => apply_filters( 'wpuf_options_frontend_posting', [
154
- [
155
- 'name' => 'edit_page_id',
156
- 'label' => __( 'Edit Page', 'wp-user-frontend' ),
157
- 'desc' => __( 'Select the page where <code>[wpuf_edit]</code> is located', 'wp-user-frontend' ),
158
- 'type' => 'select',
159
- 'options' => $pages,
160
- ],
161
- [
162
- 'name' => 'default_post_owner',
163
- 'label' => __( 'Default Post Owner', 'wp-user-frontend' ),
164
- 'desc' => __( 'If guest post is enabled and user details are OFF, the posts are assigned to this user', 'wp-user-frontend' ),
165
- 'type' => 'select',
166
- 'options' => $users,
167
- 'default' => '1',
168
- ],
169
- [
170
- 'name' => 'cf_show_front',
171
- 'label' => __( 'Custom Fields in post', 'wp-user-frontend' ),
172
- 'desc' => __( 'Show custom fields on post content area', 'wp-user-frontend' ),
173
- 'type' => 'checkbox',
174
- 'default' => 'off',
175
- ],
176
- [
177
- 'name' => 'insert_photo_size',
178
- 'label' => __( 'Insert Photo image size', 'wp-user-frontend' ),
179
- 'desc' => __( 'Default image size of "<strong>Insert Photo</strong>" button in post content area', 'wp-user-frontend' ),
180
- 'type' => 'select',
181
- 'options' => wpuf_get_image_sizes(),
182
- 'default' => 'thumbnail',
183
- ],
184
- [
185
- 'name' => 'insert_photo_type',
186
- 'label' => __( 'Insert Photo image type', 'wp-user-frontend' ),
187
- 'desc' => __( 'Default image type of "<strong>Insert Photo</strong>" button in post content area', 'wp-user-frontend' ),
188
- 'type' => 'select',
189
- 'options' => [
190
- 'image' => __( 'Image only', 'wp-user-frontend' ),
191
- 'link' => __( 'Image with link', 'wp-user-frontend' ),
192
- ],
193
- 'default' => 'link',
194
- ],
195
- [
196
- 'name' => 'image_caption',
197
- 'label' => __( 'Enable Image Caption', 'wp-user-frontend' ),
198
- 'desc' => __( 'Allow users to update image/video title, caption and description', 'wp-user-frontend' ),
199
- 'type' => 'checkbox',
200
- 'default' => 'off',
201
- ],
202
- [
203
- 'name' => 'default_post_form',
204
- 'label' => __( 'Default Post Form', 'wp-user-frontend' ),
205
- 'desc' => __( 'Fallback form for post editing if no associated form found', 'wp-user-frontend' ),
206
- 'type' => 'select',
207
- 'options' => wpuf_get_pages( 'wpuf_forms' ),
208
- ],
209
- ] ),
210
- 'wpuf_dashboard' => apply_filters( 'wpuf_options_dashboard', [
211
- [
212
- 'name' => 'enable_post_edit',
213
- 'label' => __( 'Users can edit post?', 'wp-user-frontend' ),
214
- 'desc' => __( 'Users will be able to edit their own posts', 'wp-user-frontend' ),
215
- 'type' => 'select',
216
- 'default' => 'yes',
217
- 'options' => [
218
- 'yes' => __( 'Yes', 'wp-user-frontend' ),
219
- 'no' => __( 'No', 'wp-user-frontend' ),
220
- ],
221
- ],
222
- [
223
- 'name' => 'enable_post_del',
224
- 'label' => __( 'User can delete post?', 'wp-user-frontend' ),
225
- 'desc' => __( 'Users will be able to delete their own posts', 'wp-user-frontend' ),
226
- 'type' => 'select',
227
- 'default' => 'yes',
228
- 'options' => [
229
- 'yes' => __( 'Yes', 'wp-user-frontend' ),
230
- 'no' => __( 'No', 'wp-user-frontend' ),
231
- ],
232
- ],
233
- [
234
- 'name' => 'disable_pending_edit',
235
- 'label' => __( 'Pending Post Edit', 'wp-user-frontend' ),
236
- 'desc' => __( 'Disable post editing while post in "pending" status', 'wp-user-frontend' ),
237
- 'type' => 'checkbox',
238
- 'default' => 'on',
239
- ],
240
- [
241
- 'name' => 'per_page',
242
- 'label' => __( 'Posts per page', 'wp-user-frontend' ),
243
- 'desc' => __( 'How many posts will be listed in a page', 'wp-user-frontend' ),
244
- 'type' => 'text',
245
- 'default' => '10',
246
- ],
247
- [
248
- 'name' => 'show_user_bio',
249
- 'label' => __( 'Show user bio', 'wp-user-frontend' ),
250
- 'desc' => __( 'Users biographical info will be shown', 'wp-user-frontend' ),
251
- 'type' => 'checkbox',
252
- 'default' => 'on',
253
- ],
254
- [
255
- 'name' => 'show_post_count',
256
- 'label' => __( 'Show post count', 'wp-user-frontend' ),
257
- 'desc' => __( 'Show how many posts are created by the user', 'wp-user-frontend' ),
258
- 'type' => 'checkbox',
259
- 'default' => 'on',
260
- ],
261
- [
262
- 'name' => 'show_ft_image',
263
- 'label' => __( 'Show Featured Image', 'wp-user-frontend' ),
264
- 'desc' => __( 'Show featured image of the post (Overridden by Shortcode)', 'wp-user-frontend' ),
265
- 'type' => 'checkbox',
266
- ],
267
- [
268
- 'name' => 'show_payment_column',
269
- 'label' => __( 'Show Payment Column', 'wp-user-frontend' ),
270
- 'desc' => __( 'Enable if you want show payment column on posts table', 'wp-user-frontend' ),
271
- 'type' => 'checkbox',
272
- 'default' => 'on',
273
- ],
274
- [
275
- 'name' => 'ft_img_size',
276
- 'label' => __( 'Featured Image size', 'wp-user-frontend' ),
277
- 'type' => 'select',
278
- 'options' => wpuf_get_image_sizes(),
279
- ],
280
- [
281
- 'name' => 'un_auth_msg',
282
- 'label' => __( 'Unauthorized Message', 'wp-user-frontend' ),
283
- 'desc' => __( 'Not logged in users will see this message', 'wp-user-frontend' ),
284
- 'type' => 'textarea',
285
- ],
286
- ] ),
287
- 'wpuf_my_account' => apply_filters( 'wpuf_options_wpuf_my_account', [
288
- [
289
- 'name' => 'account_page',
290
- 'label' => __( 'Account Page', 'wp-user-frontend' ),
291
- 'desc' => __( 'Select the page which contains <code>[wpuf_account]</code> shortcode', 'wp-user-frontend' ),
292
- 'type' => 'select',
293
- 'options' => $pages,
294
- ],
295
- [
296
- 'name' => 'account_page_active_tab',
297
- 'label' => __( 'Active Tab', 'wp-user-frontend' ),
298
- 'desc' => __( 'Which tab should be set as active by default when opening the account page', 'wp-user-frontend' ),
299
- 'type' => 'select',
300
- 'options' => wpuf_get_account_sections_list(),
301
- ],
302
- [
303
- 'name' => 'show_subscriptions',
304
- 'label' => __( 'Show Subscriptions', 'wp-user-frontend' ),
305
- 'desc' => __( 'Show Subscriptions tab in "my account" page where <code>[wpuf_account]</code> is located', 'wp-user-frontend' ),
306
- 'type' => 'checkbox',
307
- 'default' => 'on',
308
- ],
309
- [
310
- 'name' => 'show_billing_address',
311
- 'label' => __( 'Show Billing Address', 'wp-user-frontend' ),
312
- 'desc' => __( 'Show billing address in account page.', 'wp-user-frontend' ),
313
- 'type' => 'checkbox',
314
- 'default' => 'on',
315
- ],
316
- ] ),
317
- 'wpuf_profile' => apply_filters( 'wpuf_options_profile', [
318
- [
319
- 'name' => 'autologin_after_registration',
320
- 'label' => __( 'Auto Login After Registration', 'wp-user-frontend' ),
321
- 'desc' => __( 'If enabled, users after registration will be logged in to the system', 'wp-user-frontend' ),
322
- 'type' => 'checkbox',
323
- 'default' => 'on',
324
- ],
325
- [
326
- 'name' => 'register_link_override',
327
- 'label' => __( 'Login/Registration override', 'wp-user-frontend' ),
328
- 'desc' => __( 'If enabled, default login and registration forms will be overridden by WPUF with pages below', 'wp-user-frontend' ),
329
- 'type' => 'checkbox',
330
- 'default' => 'on',
331
- ],
332
- [
333
- 'name' => 'reg_override_page',
334
- 'label' => __( 'Registration Page', 'wp-user-frontend' ),
335
- 'desc' => __( 'Select the page you want to use as registration page override <em>(should have shortcode)</em>', 'wp-user-frontend' ),
336
- 'type' => 'select',
337
- 'options' => $pages,
338
- ],
339
- [
340
- 'name' => 'login_page',
341
- 'label' => __( 'Login Page', 'wp-user-frontend' ),
342
- 'desc' => __( 'Select the page which contains <code>[wpuf-login]</code> shortcode', 'wp-user-frontend' ),
343
- 'type' => 'select',
344
- 'options' => $pages,
345
- ],
346
- [
347
- 'name' => 'redirect_after_login_page',
348
- 'label' => __( 'Redirect After Login', 'wp-user-frontend' ),
349
- 'desc' => __( 'After successfull login, where the page will redirect to', 'wp-user-frontend' ),
350
- 'type' => 'select',
351
- 'options' => $login_redirect_pages,
352
- ],
353
- [
354
- 'name' => 'wp_default_login_redirect',
355
- 'label' => __( 'Default Login Redirect', 'wp-user-frontend' ),
356
- 'desc' => __( 'If enabled, users who login using WordPress default login form will be redirected to the selected page.', 'wp-user-frontend' ),
357
- 'type' => 'checkbox',
358
- 'default' => 'off',
359
- ],
360
- [
361
- 'name' => 'login_form_recaptcha',
362
- 'label' => __( 'reCAPTCHA in Login Form', 'wp-user-frontend' ),
363
- 'desc' => __( 'If enabled, users have to verify reCAPTCHA in login page. Also, make sure that reCAPTCHA is configured properly from <b>General Options</b>', 'wp-user-frontend' ),
364
- 'type' => 'checkbox',
365
- 'default' => 'off',
366
- ],
367
- ] ),
368
- 'wpuf_payment' => apply_filters( 'wpuf_options_payment', [
369
- [
370
- 'name' => 'enable_payment',
371
- 'label' => __( 'Enable Payments', 'wp-user-frontend' ),
372
- 'desc' => __( 'Enable payments on your site.', 'wp-user-frontend' ),
373
- 'type' => 'checkbox',
374
- 'default' => 'on',
375
- ],
376
- [
377
- 'name' => 'subscription_page',
378
- 'label' => __( 'Subscription Pack Page', 'wp-user-frontend' ),
379
- 'desc' => __( 'Select the page where <code>[wpuf_sub_pack]</code> located.', 'wp-user-frontend' ),
380
- 'type' => 'select',
381
- 'options' => $pages,
382
- ],
383
- [
384
- 'name' => 'register_subscription',
385
- 'label' => __( 'Subscription at registration', 'wp-user-frontend' ),
386
- 'desc' => __( 'Registration time redirect to subscription page', 'wp-user-frontend' ),
387
- 'type' => 'checkbox',
388
- ],
389
- [
390
- 'name' => 'currency',
391
- 'label' => __( 'Currency', 'wp-user-frontend' ),
392
- 'type' => 'select',
393
- 'default' => 'USD',
394
- 'options' => $currencies,
395
- ],
396
- [
397
- 'name' => 'currency_position',
398
- 'label' => __( 'Currency Position', 'wp-user-frontend' ),
399
- 'type' => 'select',
400
- 'default' => 'left',
401
- 'options' => [
402
- 'left' => sprintf( '%1$s (%2$s99.99)', __( 'Left', 'wp-user-frontend' ), $default_currency_symbol ),
403
- 'right' => sprintf( '%1$s (99.99%2$s)', __( 'Right', 'wp-user-frontend' ), $default_currency_symbol ),
404
- 'left_space' => sprintf( '%1$s (%2$s 99.99)', __( 'Left with space', 'wp-user-frontend' ), $default_currency_symbol ),
405
- 'right_space' => sprintf( '%1$s (99.99 %2$s)', __( 'Right with space', 'wp-user-frontend' ), $default_currency_symbol ),
406
- ],
407
- ],
408
- [
409
- 'name' => 'wpuf_price_thousand_sep',
410
- 'label' => __( 'Thousand Separator', 'wp-user-frontend' ),
411
- 'desc' => __( 'This sets the thousand separator of displayed prices.', 'wp-user-frontend' ),
412
- 'css' => 'width:50px;',
413
- 'default' => ',',
414
- 'type' => 'text',
415
- 'desc_tip' => true,
416
- ],
417
- [
418
- 'name' => 'wpuf_price_decimal_sep',
419
- 'label' => __( 'Decimal Separator', 'wp-user-frontend' ),
420
- 'desc' => __( 'This sets the decimal separator of displayed prices.', 'wp-user-frontend' ),
421
- 'default' => '.',
422
- 'type' => 'text',
423
- ],
 
 
 
 
 
 
 
 
 
 
 
424
 
425
- [
426
- 'name' => 'wpuf_price_num_decimals',
427
- 'label' => __( 'Number of Decimals', 'wp-user-frontend' ),
428
- 'desc' => __( 'This sets the number of decimal points shown in displayed prices.', 'wp-user-frontend' ),
429
- 'default' => '2',
430
- 'type' => 'number',
431
- 'custom_attributes' => [
432
- 'min' => 0,
433
- 'step' => 1,
434
- ],
435
- ],
436
- [
437
- 'name' => 'sandbox_mode',
438
- 'label' => __( 'Enable demo/sandbox mode', 'wp-user-frontend' ),
439
- 'desc' => __( 'When sandbox mode is active, all payment gateway will be used in demo mode', 'wp-user-frontend' ),
440
- 'type' => 'checkbox',
441
- 'default' => 'on',
442
- ],
443
- [
444
- 'name' => 'payment_page',
445
- 'label' => __( 'Payment Page', 'wp-user-frontend' ),
446
- 'desc' => __( 'This page will be used to process payment options', 'wp-user-frontend' ),
447
- 'type' => 'select',
448
- 'options' => $pages,
449
- ],
450
- [
451
- 'name' => 'payment_success',
452
- 'label' => __( 'Payment Success Page', 'wp-user-frontend' ),
453
- 'desc' => __( 'After payment users will be redirected here', 'wp-user-frontend' ),
454
- 'type' => 'select',
455
- 'options' => $pages,
456
- ],
457
- [
458
- 'name' => 'active_gateways',
459
- 'label' => __( 'Payment Gateways', 'wp-user-frontend' ),
460
- 'desc' => __( 'Active payment gateways', 'wp-user-frontend' ),
461
- 'type' => 'multicheck',
462
- 'options' => wpuf_get_gateways(),
463
- ],
464
- ] ),
465
- 'wpuf_mails' => apply_filters( 'wpuf_mail_options', [
466
- [
467
- 'name' => 'guest_email_setting',
468
- 'label' => __( '<span class="dashicons dashicons-universal-access-alt"></span> Guest Email', 'wp-user-frontend' ),
469
- 'type' => 'html',
470
- 'class' => 'guest-email-setting',
471
- ],
472
- [
473
- 'name' => 'guest_email_subject',
474
- 'label' => __( 'Guest mail subject', 'wp-user-frontend' ),
475
- 'desc' => __( 'This sets the subject of the emails sent to guest users', 'wp-user-frontend' ),
476
- 'default' => 'Please Confirm Your Email to Get the Post Published!',
477
- 'type' => 'text',
478
- 'class' => 'guest-email-setting-option',
479
- ],
480
- [
481
- 'name' => 'guest_email_body',
482
- 'label' => __( 'Guest mail body', 'wp-user-frontend' ),
483
- 'desc' => __( "This sets the body of the emails sent to guest users. Please DON'T edit the <code>{activation_link}</code> part, you can use {sitename} too.", 'wp-user-frontend' ),
484
- 'default' => 'Hey There,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
485
 
486
  We just received your guest post and now we want you to confirm your email so that we can verify the content and move on to the publishing process.
487
 
@@ -490,19 +515,22 @@ function wpuf_settings_fields() {
490
 
491
  Regards,
492
  {sitename}',
493
- 'type' => 'wysiwyg',
494
- 'class' => 'guest-email-setting-option',
495
- ],
496
- ] ),
497
- 'wpuf_privacy' => apply_filters( 'wpuf_privacy_options', [
498
- [
499
- 'name' => 'export_post_types',
500
- 'label' => __( 'Post Types', 'wp-user-frontend' ),
501
- 'desc' => __( 'Select the post types you will allow users to export.', 'wp-user-frontend' ),
502
- 'callback'=> 'wpuf_settings_multiselect',
503
- 'options' => $post_types,
504
- ],
505
- ] ),
 
 
 
506
  ];
507
 
508
  return apply_filters( 'wpuf_settings_fields', $settings_fields );
@@ -510,14 +538,16 @@ function wpuf_settings_fields() {
510
 
511
  function wpuf_settings_field_profile( $form ) {
512
  $user_roles = wpuf_get_user_roles();
513
- $forms = get_posts( [
514
- 'numberposts' => -1,
515
- 'post_type' => 'wpuf_profile',
516
- ] );
 
 
517
 
518
  $val = get_option( 'wpuf_profile', [] );
519
 
520
- if ( class_exists( 'WP_User_Frontend_Pro' ) ) {
521
  ?>
522
 
523
  <p style="padding-left: 10px; font-style: italic; font-size: 13px;">
@@ -526,7 +556,8 @@ function wpuf_settings_field_profile( $form ) {
526
  <table class="form-table">
527
  <?php
528
  foreach ( $user_roles as $role => $name ) {
529
- $current = isset( $val['roles'][$role] ) ? $val['roles'][$role] : ''; ?>
 
530
  <tr valign="top">
531
  <th scrope="row"><?php echo esc_attr( $name ); ?></th>
532
  <td>
@@ -538,10 +569,11 @@ function wpuf_settings_field_profile( $form ) {
538
  </select>
539
  </td>
540
  </tr>
541
- <?php
542
- } ?>
 
543
  </table>
544
- <?php
545
  }
546
  }
547
 
60
  $post_types = get_post_types();
61
  unset( $post_types['attachment'], $post_types['revision'], $post_types['nav_menu_item'], $post_types['wpuf_forms'], $post_types['wpuf_profile'], $post_types['wpuf_input'], $post_types['wpuf_subscription'], $post_types['custom_css'], $post_types['customize_changeset'], $post_types['wpuf_coupon'], $post_types['oembed_cache'] );
62
 
63
+ $login_redirect_pages = [
64
  'previous_page' => __( 'Previous Page', 'wp-user-frontend' ),
65
  ] + $pages;
66
 
77
  $user_roles = [];
78
  $all_roles = get_editable_roles();
79
 
80
+ foreach ( $all_roles as $key => $value ) {
81
+ $user_roles[ $key ] = $value['name'];
82
  }
83
 
84
  $settings_fields = [
85
+ 'wpuf_general' => apply_filters(
86
+ 'wpuf_options_others', [
87
+ [
88
+ 'name' => 'show_admin_bar',
89
+ 'label' => __( 'Show Admin Bar', 'wp-user-frontend' ),
90
+ 'desc' => __( 'Select user by roles, who can view admin bar in frontend.', 'wp-user-frontend' ),
91
+ 'callback' => 'wpuf_settings_multiselect',
92
+ 'options' => $user_roles,
93
+ 'default' => [ 'administrator', 'editor', 'author', 'contributor' ],
94
+ ],
95
+ [
96
+ 'name' => 'admin_access',
97
+ 'label' => __( 'Admin area access', 'wp-user-frontend' ),
98
+ 'desc' => __( 'Allow you to block specific user role to Ajax request and Media upload.', 'wp-user-frontend' ),
99
+ 'type' => 'select',
100
+ 'default' => 'read',
101
+ 'options' => [
102
+ 'manage_options' => __( 'Admin Only', 'wp-user-frontend' ),
103
+ 'edit_others_posts' => __( 'Admins, Editors', 'wp-user-frontend' ),
104
+ 'publish_posts' => __( 'Admins, Editors, Authors', 'wp-user-frontend' ),
105
+ 'edit_posts' => __( 'Admins, Editors, Authors, Contributors', 'wp-user-frontend' ),
106
+ 'read' => __( 'Default', 'wp-user-frontend' ),
107
+ ],
108
+ ],
109
+ [
110
+ 'name' => 'override_editlink',
111
+ 'label' => __( 'Override the post edit link', 'wp-user-frontend' ),
112
+ 'desc' => __( 'Users see the edit link in post if s/he is capable to edit the post/page. Selecting <strong>Yes</strong> will override the default WordPress edit post link in frontend', 'wp-user-frontend' ),
113
+ 'type' => 'select',
114
+ 'default' => 'no',
115
+ 'options' => [
116
+ 'yes' => __( 'Yes', 'wp-user-frontend' ),
117
+ 'no' => __( 'No', 'wp-user-frontend' ),
118
+ ],
119
+ ],
120
+ [
121
+ 'name' => 'wpuf_compatibility_acf',
122
+ 'label' => __( 'ACF Compatibility', 'wp-user-frontend' ),
123
+ 'desc' => __( 'Select <strong>Yes</strong> if you want to make compatible WPUF custom fields data with advanced custom fields.', 'wp-user-frontend' ),
124
+ 'type' => 'select',
125
+ 'default' => 'no',
126
+ 'options' => [
127
+ 'yes' => __( 'Yes', 'wp-user-frontend' ),
128
+ 'no' => __( 'No', 'wp-user-frontend' ),
129
+ ],
130
+ ],
131
+ [
132
+ 'name' => 'load_script',
133
+ 'label' => __( 'Load Scripts', 'wp-user-frontend' ),
134
+ 'desc' => __( 'Load scripts/styles in all pages', 'wp-user-frontend' ),
135
+ 'type' => 'checkbox',
136
+ 'default' => 'on',
137
+ ],
138
+ [
139
+ 'name' => 'recaptcha_public',
140
+ 'label' => __( 'reCAPTCHA Site Key', 'wp-user-frontend' ),
141
+ ],
142
+ [
143
+ 'name' => 'recaptcha_private',
144
+ 'label' => __( 'reCAPTCHA Secret Key', 'wp-user-frontend' ),
145
+ 'desc' => __( '<a target="_blank" href="https://www.google.com/recaptcha/">Register here</a> to get reCaptcha Site and Secret keys.', 'wp-user-frontend' ),
146
+ ],
147
+ [
148
+ 'name' => 'custom_css',
149
+ 'label' => __( 'Custom CSS codes', 'wp-user-frontend' ),
150
+ 'desc' => __( 'If you want to add your custom CSS code, it will be added on page header wrapped with style tag', 'wp-user-frontend' ),
151
+ 'type' => 'textarea',
152
+ ],
153
+ ]
154
+ ),
155
+ 'wpuf_frontend_posting' => apply_filters(
156
+ 'wpuf_options_frontend_posting', [
157
+ [
158
+ 'name' => 'edit_page_id',
159
+ 'label' => __( 'Edit Page', 'wp-user-frontend' ),
160
+ 'desc' => __( 'Select the page where <code>[wpuf_edit]</code> is located', 'wp-user-frontend' ),
161
+ 'type' => 'select',
162
+ 'options' => $pages,
163
+ ],
164
+ [
165
+ 'name' => 'default_post_owner',
166
+ 'label' => __( 'Default Post Owner', 'wp-user-frontend' ),
167
+ 'desc' => __( 'If guest post is enabled and user details are OFF, the posts are assigned to this user', 'wp-user-frontend' ),
168
+ 'type' => 'select',
169
+ 'options' => $users,
170
+ 'default' => '1',
171
+ ],
172
+ [
173
+ 'name' => 'cf_show_front',
174
+ 'label' => __( 'Custom Fields in post', 'wp-user-frontend' ),
175
+ 'desc' => __( 'Show custom fields on post content area', 'wp-user-frontend' ),
176
+ 'type' => 'checkbox',
177
+ 'default' => 'off',
178
+ ],
179
+ [
180
+ 'name' => 'insert_photo_size',
181
+ 'label' => __( 'Insert Photo image size', 'wp-user-frontend' ),
182
+ 'desc' => __( 'Default image size of "<strong>Insert Photo</strong>" button in post content area', 'wp-user-frontend' ),
183
+ 'type' => 'select',
184
+ 'options' => wpuf_get_image_sizes(),
185
+ 'default' => 'thumbnail',
186
+ ],
187
+ [
188
+ 'name' => 'insert_photo_type',
189
+ 'label' => __( 'Insert Photo image type', 'wp-user-frontend' ),
190
+ 'desc' => __( 'Default image type of "<strong>Insert Photo</strong>" button in post content area', 'wp-user-frontend' ),
191
+ 'type' => 'select',
192
+ 'options' => [
193
+ 'image' => __( 'Image only', 'wp-user-frontend' ),
194
+ 'link' => __( 'Image with link', 'wp-user-frontend' ),
195
+ ],
196
+ 'default' => 'link',
197
+ ],
198
+ [
199
+ 'name' => 'image_caption',
200
+ 'label' => __( 'Enable Image Caption', 'wp-user-frontend' ),
201
+ 'desc' => __( 'Allow users to update image/video title, caption and description', 'wp-user-frontend' ),
202
+ 'type' => 'checkbox',
203
+ 'default' => 'off',
204
+ ],
205
+ [
206
+ 'name' => 'default_post_form',
207
+ 'label' => __( 'Default Post Form', 'wp-user-frontend' ),
208
+ 'desc' => __( 'Fallback form for post editing if no associated form found', 'wp-user-frontend' ),
209
+ 'type' => 'select',
210
+ 'options' => wpuf_get_pages( 'wpuf_forms' ),
211
+ ],
212
+ ]
213
+ ),
214
+ 'wpuf_dashboard' => apply_filters(
215
+ 'wpuf_options_dashboard', [
216
+ [
217
+ 'name' => 'enable_post_edit',
218
+ 'label' => __( 'Users can edit post?', 'wp-user-frontend' ),
219
+ 'desc' => __( 'Users will be able to edit their own posts', 'wp-user-frontend' ),
220
+ 'type' => 'select',
221
+ 'default' => 'yes',
222
+ 'options' => [
223
+ 'yes' => __( 'Yes', 'wp-user-frontend' ),
224
+ 'no' => __( 'No', 'wp-user-frontend' ),
225
+ ],
226
+ ],
227
+ [
228
+ 'name' => 'enable_post_del',
229
+ 'label' => __( 'User can delete post?', 'wp-user-frontend' ),
230
+ 'desc' => __( 'Users will be able to delete their own posts', 'wp-user-frontend' ),
231
+ 'type' => 'select',
232
+ 'default' => 'yes',
233
+ 'options' => [
234
+ 'yes' => __( 'Yes', 'wp-user-frontend' ),
235
+ 'no' => __( 'No', 'wp-user-frontend' ),
236
+ ],
237
+ ],
238
+ [
239
+ 'name' => 'disable_pending_edit',
240
+ 'label' => __( 'Pending Post Edit', 'wp-user-frontend' ),
241
+ 'desc' => __( 'Disable post editing while post in "pending" status', 'wp-user-frontend' ),
242
+ 'type' => 'checkbox',
243
+ 'default' => 'on',
244
+ ],
245
+ [
246
+ 'name' => 'per_page',
247
+ 'label' => __( 'Posts per page', 'wp-user-frontend' ),
248
+ 'desc' => __( 'How many posts will be listed in a page', 'wp-user-frontend' ),
249
+ 'type' => 'text',
250
+ 'default' => '10',
251
+ ],
252
+ [
253
+ 'name' => 'show_user_bio',
254
+ 'label' => __( 'Show user bio', 'wp-user-frontend' ),
255
+ 'desc' => __( 'Users biographical info will be shown', 'wp-user-frontend' ),
256
+ 'type' => 'checkbox',
257
+ 'default' => 'on',
258
+ ],
259
+ [
260
+ 'name' => 'show_post_count',
261
+ 'label' => __( 'Show post count', 'wp-user-frontend' ),
262
+ 'desc' => __( 'Show how many posts are created by the user', 'wp-user-frontend' ),
263
+ 'type' => 'checkbox',
264
+ 'default' => 'on',
265
+ ],
266
+ [
267
+ 'name' => 'show_ft_image',
268
+ 'label' => __( 'Show Featured Image', 'wp-user-frontend' ),
269
+ 'desc' => __( 'Show featured image of the post (Overridden by Shortcode)', 'wp-user-frontend' ),
270
+ 'type' => 'checkbox',
271
+ ],
272
+ [
273
+ 'name' => 'show_payment_column',
274
+ 'label' => __( 'Show Payment Column', 'wp-user-frontend' ),
275
+ 'desc' => __( 'Enable if you want show payment column on posts table', 'wp-user-frontend' ),
276
+ 'type' => 'checkbox',
277
+ 'default' => 'on',
278
+ ],
279
+ [
280
+ 'name' => 'ft_img_size',
281
+ 'label' => __( 'Featured Image size', 'wp-user-frontend' ),
282
+ 'type' => 'select',
283
+ 'options' => wpuf_get_image_sizes(),
284
+ ],
285
+ [
286
+ 'name' => 'un_auth_msg',
287
+ 'label' => __( 'Unauthorized Message', 'wp-user-frontend' ),
288
+ 'desc' => __( 'Not logged in users will see this message', 'wp-user-frontend' ),
289
+ 'type' => 'textarea',
290
+ ],
291
+ ]
292
+ ),
293
+ 'wpuf_my_account' => apply_filters(
294
+ 'wpuf_options_wpuf_my_account', [
295
+ [
296
+ 'name' => 'account_page',
297
+ 'label' => __( 'Account Page', 'wp-user-frontend' ),
298
+ 'desc' => __( 'Select the page which contains <code>[wpuf_account]</code> shortcode', 'wp-user-frontend' ),
299
+ 'type' => 'select',
300
+ 'options' => $pages,
301
+ ],
302
+ [
303
+ 'name' => 'account_page_active_tab',
304
+ 'label' => __( 'Active Tab', 'wp-user-frontend' ),
305
+ 'desc' => __( 'Which tab should be set as active by default when opening the account page', 'wp-user-frontend' ),
306
+ 'type' => 'select',
307
+ 'options' => wpuf_get_account_sections_list(),
308
+ ],
309
+ [
310
+ 'name' => 'show_subscriptions',
311
+ 'label' => __( 'Show Subscriptions', 'wp-user-frontend' ),
312
+ 'desc' => __( 'Show Subscriptions tab in "my account" page where <code>[wpuf_account]</code> is located', 'wp-user-frontend' ),
313
+ 'type' => 'checkbox',
314
+ 'default' => 'on',
315
+ ],
316
+ [
317
+ 'name' => 'show_billing_address',
318
+ 'label' => __( 'Show Billing Address', 'wp-user-frontend' ),
319
+ 'desc' => __( 'Show billing address in account page.', 'wp-user-frontend' ),
320
+ 'type' => 'checkbox',
321
+ 'default' => 'on',
322
+ ],
323
+ ]
324
+ ),
325
+ 'wpuf_profile' => apply_filters(
326
+ 'wpuf_options_profile', [
327
+ [
328
+ 'name' => 'autologin_after_registration',
329
+ 'label' => __( 'Auto Login After Registration', 'wp-user-frontend' ),
330
+ 'desc' => __( 'If enabled, users after registration will be logged in to the system', 'wp-user-frontend' ),
331
+ 'type' => 'checkbox',
332
+ 'default' => 'on',
333
+ ],
334
+ [
335
+ 'name' => 'register_link_override',
336
+ 'label' => __( 'Login/Registration override', 'wp-user-frontend' ),
337
+ 'desc' => __( 'If enabled, default login and registration forms will be overridden by WPUF with pages below', 'wp-user-frontend' ),
338
+ 'type' => 'checkbox',
339
+ 'default' => 'on',
340
+ ],
341
+ [
342
+ 'name' => 'reg_override_page',
343
+ 'label' => __( 'Registration Page', 'wp-user-frontend' ),
344
+ 'desc' => __( 'Select the page you want to use as registration page override <em>(should have shortcode)</em>', 'wp-user-frontend' ),
345
+ 'type' => 'select',
346
+ 'options' => $pages,
347
+ ],
348
+ [
349
+ 'name' => 'login_page',
350
+ 'label' => __( 'Login Page', 'wp-user-frontend' ),
351
+ 'desc' => __( 'Select the page which contains <code>[wpuf-login]</code> shortcode', 'wp-user-frontend' ),
352
+ 'type' => 'select',
353
+ 'options' => $pages,
354
+ ],
355
+ [
356
+ 'name' => 'redirect_after_login_page',
357
+ 'label' => __( 'Redirect After Login', 'wp-user-frontend' ),
358
+ 'desc' => __( 'After successfull login, where the page will redirect to', 'wp-user-frontend' ),
359
+ 'type' => 'select',
360
+ 'options' => $login_redirect_pages,
361
+ ],
362
+ [
363
+ 'name' => 'wp_default_login_redirect',
364
+ 'label' => __( 'Default Login Redirect', 'wp-user-frontend' ),
365
+ 'desc' => __( 'If enabled, users who login using WordPress default login form will be redirected to the selected page.', 'wp-user-frontend' ),
366
+ 'type' => 'checkbox',
367
+ 'default' => 'off',
368
+ ],
369
+ [
370
+ 'name' => 'login_form_recaptcha',
371
+ 'label' => __( 'reCAPTCHA in Login Form', 'wp-user-frontend' ),
372
+ 'desc' => __( 'If enabled, users have to verify reCAPTCHA in login page. Also, make sure that reCAPTCHA is configured properly from <b>General Options</b>', 'wp-user-frontend' ),
373
+ 'type' => 'checkbox',
374
+ 'default' => 'off',
375
+ ],
376
+ ]
377
+ ),
378
+ 'wpuf_payment' => apply_filters(
379
+ 'wpuf_options_payment', [
380
+ [
381
+ 'name' => 'enable_payment',
382
+ 'label' => __( 'Enable Payments', 'wp-user-frontend' ),
383
+ 'desc' => __( 'Enable payments on your site.', 'wp-user-frontend' ),
384
+ 'type' => 'checkbox',
385
+ 'default' => 'on',
386
+ ],
387
+ [
388
+ 'name' => 'subscription_page',
389
+ 'label' => __( 'Subscription Pack Page', 'wp-user-frontend' ),
390
+ 'desc' => __( 'Select the page where <code>[wpuf_sub_pack]</code> located.', 'wp-user-frontend' ),
391
+ 'type' => 'select',
392
+ 'options' => $pages,
393
+ ],
394
+ [
395
+ 'name' => 'register_subscription',
396
+ 'label' => __( 'Subscription at registration', 'wp-user-frontend' ),
397
+ 'desc' => __( 'Registration time redirect to subscription page', 'wp-user-frontend' ),
398
+ 'type' => 'checkbox',
399
+ ],
400
+ [
401
+ 'name' => 'currency',
402
+ 'label' => __( 'Currency', 'wp-user-frontend' ),
403
+ 'type' => 'select',
404
+ 'default' => 'USD',
405
+ 'options' => $currencies,
406
+ ],
407
+ [
408
+ 'name' => 'currency_position',
409
+ 'label' => __( 'Currency Position', 'wp-user-frontend' ),
410
+ 'type' => 'select',
411
+ 'default' => 'left',
412
+ 'options' => [
413
+ 'left' => sprintf( '%1$s (%2$s99.99)', __( 'Left', 'wp-user-frontend' ), $default_currency_symbol ),
414
+ 'right' => sprintf( '%1$s (99.99%2$s)', __( 'Right', 'wp-user-frontend' ), $default_currency_symbol ),
415
+ 'left_space' => sprintf( '%1$s (%2$s 99.99)', __( 'Left with space', 'wp-user-frontend' ), $default_currency_symbol ),
416
+ 'right_space' => sprintf( '%1$s (99.99 %2$s)', __( 'Right with space', 'wp-user-frontend' ), $default_currency_symbol ),
417
+ ],
418
+ ],
419
+ [
420
+ 'name' => 'wpuf_price_thousand_sep',
421
+ 'label' => __( 'Thousand Separator', 'wp-user-frontend' ),
422
+ 'desc' => __( 'This sets the thousand separator of displayed prices.', 'wp-user-frontend' ),
423
+ 'css' => 'width:50px;',
424
+ 'default' => ',',
425
+ 'type' => 'text',
426
+ 'desc_tip' => true,
427
+ ],
428
+ [
429
+ 'name' => 'wpuf_price_decimal_sep',
430
+ 'label' => __( 'Decimal Separator', 'wp-user-frontend' ),
431
+ 'desc' => __( 'This sets the decimal separator of displayed prices.', 'wp-user-frontend' ),
432
+ 'default' => '.',
433
+ 'type' => 'text',
434
+ ],
435
 
436
+ [
437
+ 'name' => 'wpuf_price_num_decimals',
438
+ 'label' => __( 'Number of Decimals', 'wp-user-frontend' ),
439
+ 'desc' => __( 'This sets the number of decimal points shown in displayed prices.', 'wp-user-frontend' ),
440
+ 'default' => '2',
441
+ 'type' => 'number',
442
+ 'custom_attributes' => [
443
+ 'min' => 0,
444
+ 'step' => 1,
445
+ ],
446
+ ],
447
+ [
448
+ 'name' => 'sandbox_mode',
449
+ 'label' => __( 'Enable demo/sandbox mode', 'wp-user-frontend' ),
450
+ 'desc' => __( 'When sandbox mode is active, all payment gateway will be used in demo mode', 'wp-user-frontend' ),
451
+ 'type' => 'checkbox',
452
+ 'default' => 'on',
453
+ ],
454
+ [
455
+ 'name' => 'payment_page',
456
+ 'label' => __( 'Payment Page', 'wp-user-frontend' ),
457
+ 'desc' => __( 'This page will be used to process payment options', 'wp-user-frontend' ),
458
+ 'type' => 'select',
459
+ 'options' => $pages,
460
+ ],
461
+ [
462
+ 'name' => 'payment_success',
463
+ 'label' => __( 'Payment Success Page', 'wp-user-frontend' ),
464
+ 'desc' => __( 'After payment users will be redirected here', 'wp-user-frontend' ),
465
+ 'type' => 'select',
466
+ 'options' => $pages,
467
+ ],
468
+ [
469
+ 'name' => 'active_gateways',
470
+ 'label' => __( 'Payment Gateways', 'wp-user-frontend' ),
471
+ 'desc' => __( 'Active payment gateways', 'wp-user-frontend' ),
472
+ 'type' => 'multicheck',
473
+ 'options' => wpuf_get_gateways(),
474
+ ],
475
+ [
476
+ 'name' => 'failed_retry',
477
+ 'label' => __( 'Retry Failed Payment', 'wp-user-frontend' ),
478
+ 'desc' => __( 'How many times should retry for failed payment max is 4', 'wp-user-frontend' ),
479
+ 'default' => '2',
480
+ 'type' => 'number',
481
+ 'custom_attributes' => [
482
+ 'min' => 1,
483
+ 'max' => 4,
484
+ 'step' => 1,
485
+ ],
486
+ ],
487
+ ]
488
+ ),
489
+ 'wpuf_mails' => apply_filters(
490
+ 'wpuf_mail_options', [
491
+ [
492
+ 'name' => 'guest_email_setting',
493
+ 'label' => __( '<span class="dashicons dashicons-universal-access-alt"></span> Guest Email', 'wp-user-frontend' ),
494
+ 'type' => 'html',
495
+ 'class' => 'guest-email-setting',
496
+ ],
497
+ [
498
+ 'name' => 'guest_email_subject',
499
+ 'label' => __( 'Guest mail subject', 'wp-user-frontend' ),
500
+ 'desc' => __( 'This sets the subject of the emails sent to guest users', 'wp-user-frontend' ),
501
+ 'default' => 'Please Confirm Your Email to Get the Post Published!',
502
+ 'type' => 'text',
503
+ 'class' => 'guest-email-setting-option',
504
+ ],
505
+ [
506
+ 'name' => 'guest_email_body',
507
+ 'label' => __( 'Guest mail body', 'wp-user-frontend' ),
508
+ 'desc' => __( "This sets the body of the emails sent to guest users. Please DON'T edit the <code>{activation_link}</code> part, you can use {sitename} too.", 'wp-user-frontend' ),
509
+ 'default' => 'Hey There,
510
 
511
  We just received your guest post and now we want you to confirm your email so that we can verify the content and move on to the publishing process.
512
 
515
 
516
  Regards,
517
  {sitename}',
518
+ 'type' => 'wysiwyg',
519
+ 'class' => 'guest-email-setting-option',
520
+ ],
521
+ ]
522
+ ),
523
+ 'wpuf_privacy' => apply_filters(
524
+ 'wpuf_privacy_options', [
525
+ [
526
+ 'name' => 'export_post_types',
527
+ 'label' => __( 'Post Types', 'wp-user-frontend' ),
528
+ 'desc' => __( 'Select the post types you will allow users to export.', 'wp-user-frontend' ),
529
+ 'callback' => 'wpuf_settings_multiselect',
530
+ 'options' => $post_types,
531
+ ],
532
+ ]
533
+ ),
534
  ];
535
 
536
  return apply_filters( 'wpuf_settings_fields', $settings_fields );
538
 
539
  function wpuf_settings_field_profile( $form ) {
540
  $user_roles = wpuf_get_user_roles();
541
+ $forms = get_posts(
542
+ [
543
+ 'numberposts' => -1,
544
+ 'post_type' => 'wpuf_profile',
545
+ ]
546
+ );
547
 
548
  $val = get_option( 'wpuf_profile', [] );
549
 
550
+ if ( class_exists( 'WP_User_Frontend_Pro' ) ) {
551
  ?>
552
 
553
  <p style="padding-left: 10px; font-style: italic; font-size: 13px;">
556
  <table class="form-table">
557
  <?php
558
  foreach ( $user_roles as $role => $name ) {
559
+ $current = isset( $val['roles'][ $role ] ) ? $val['roles'][ $role ] : '';
560
+ ?>
561
  <tr valign="top">
562
  <th scrope="row"><?php echo esc_attr( $name ); ?></th>
563
  <td>
569
  </select>
570
  </td>
571
  </tr>
572
+ <?php
573
+ }
574
+ ?>
575
  </table>
576
+ <?php
577
  }
578
  }
579
 
assets/js/wpuf-form-builder-components.js CHANGED
@@ -814,13 +814,15 @@ Vue.component('form-column_field', {
814
  handle: '.wpuf-column-field-control-buttons .move',
815
  scroll: true,
816
  stop: function( event, ui ) {
817
- var data_source = ui.item.context.attributes['data-source'].value;
 
 
818
 
819
  if ('panel' === data_source) {
820
  var payload = {
821
  toIndex: parseInt($(ui.item).index()),
822
- field_template: ui.item.context.attributes['data-form-field'].value,
823
- to_column: $(this).context.parentElement.classList[0]
824
  };
825
 
826
  self.add_column_inner_field(payload);
@@ -840,9 +842,9 @@ Vue.component('form-column_field', {
840
 
841
  if ( 'column-field-stage' === source) {
842
  payload.field_id = self.field.id;
843
- payload.fromIndex = parseInt(ui.item.context.attributes['column-field-index'].value);
844
- payload.fromColumn = ui.item.context.attributes['in-column'].value;
845
- payload.toColumn = ui.item.context.parentElement.parentElement.classList[0];
846
 
847
  // when drag field one column to another column, sortable event trigger twice and try to swap field twice.
848
  // So the following conditions are needed to check and run swap_column_field_elements commit only once
@@ -1058,7 +1060,7 @@ Vue.component('form-column_field', {
1058
  (function () {
1059
  var columnElement;
1060
  var startOffset;
1061
- var columnField = $(self.$el).context.parentElement;
1062
  var total_width = parseInt($(columnField).width());
1063
 
1064
  Array.prototype.forEach.call(
@@ -1096,17 +1098,17 @@ Vue.component('form-column_field', {
1096
  colTwoWidth = 0,
1097
  colThreeWidth = 0;
1098
 
1099
- if (columnsNumber === 3) {
1100
  colOneWidth = 100 / columnsNumber;
1101
  colTwoWidth = 100 / columnsNumber;
1102
  colThreeWidth = 100 / columnsNumber;
1103
- } else if (columnsNumber === 2) {
1104
  colOneWidth = 100 / columnsNumber;
1105
  colTwoWidth = 100 / columnsNumber;
1106
  colThreeWidth = 0;
1107
  } else {
1108
- colOneWidth = $(columnField).find(".column-1").width();
1109
- colTwoWidth = $(columnField).find(".column-2").width();
1110
  colThreeWidth = 0;
1111
  }
1112
 
814
  handle: '.wpuf-column-field-control-buttons .move',
815
  scroll: true,
816
  stop: function( event, ui ) {
817
+ var item = ui.item[0];
818
+ var data = item.dataset;
819
+ var data_source = data.source;
820
 
821
  if ('panel' === data_source) {
822
  var payload = {
823
  toIndex: parseInt($(ui.item).index()),
824
+ field_template: data.formField,
825
+ to_column: $(this).parent().attr('class').split(' ')[0]
826
  };
827
 
828
  self.add_column_inner_field(payload);
842
 
843
  if ( 'column-field-stage' === source) {
844
  payload.field_id = self.field.id;
845
+ payload.fromIndex = parseInt(item.attributes['column-field-index'].value);
846
+ payload.fromColumn = item.attributes['in-column'].value;
847
+ payload.toColumn = item.parent().parent().attr('class').split(' ')[0];
848
 
849
  // when drag field one column to another column, sortable event trigger twice and try to swap field twice.
850
  // So the following conditions are needed to check and run swap_column_field_elements commit only once
1060
  (function () {
1061
  var columnElement;
1062
  var startOffset;
1063
+ var columnField = $(self.$el).parent();
1064
  var total_width = parseInt($(columnField).width());
1065
 
1066
  Array.prototype.forEach.call(
1098
  colTwoWidth = 0,
1099
  colThreeWidth = 0;
1100
 
1101
+ if (parseInt(columnsNumber) === 3) {
1102
  colOneWidth = 100 / columnsNumber;
1103
  colTwoWidth = 100 / columnsNumber;
1104
  colThreeWidth = 100 / columnsNumber;
1105
+ } else if (parseInt(columnsNumber) === 2) {
1106
  colOneWidth = 100 / columnsNumber;
1107
  colTwoWidth = 100 / columnsNumber;
1108
  colThreeWidth = 0;
1109
  } else {
1110
+ colOneWidth = 100;
1111
+ colTwoWidth = 0;
1112
  colThreeWidth = 0;
1113
  }
1114
 
changelog.txt CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  = v3.5.8 (21 November, 2020) =
2
  * Fix - Updated codebase to fix timezone mismatch
3
 
1
+ = v3.5.9 (11 December, 2020) =
2
+ * Fix - Once trial subscription is used, it couldn't reset
3
+ * Fix - Subscription cancel doesn't work
4
+ * Fix - The tax rate was not calculated with the total amount
5
+ * Fix - The width of the column field was breaking
6
+ * Enhancement - Paypal recurring payment
7
+
8
  = v3.5.8 (21 November, 2020) =
9
  * Fix - Updated codebase to fix timezone mismatch
10
 
class/subscription.php CHANGED
@@ -12,20 +12,20 @@ class WPUF_Subscription {
12
  private static $_instance;
13
 
14
  public function __construct() {
15
- add_action( 'init', [$this, 'register_post_type'] );
16
- add_filter( 'wpuf_add_post_args', [$this, 'set_pending'], 10, 4 );
17
- add_filter( 'wpuf_add_post_redirect', [$this, 'post_redirect'], 10, 4 );
18
 
19
- add_filter( 'wpuf_addpost_notice', [$this, 'force_pack_notice'], 20, 3 );
20
- add_filter( 'wpuf_can_post', [$this, 'force_pack_permission'], 20, 3 );
21
- add_action( 'wpuf_add_post_form_top', [$this, 'add_post_info'], 10, 2 );
22
 
23
- add_action( 'wpuf_add_post_after_insert', [$this, 'monitor_new_post'], 10, 3 );
24
- add_action( 'wpuf_draft_post_after_insert', [$this, 'monitor_new_draft_post'], 10, 3 );
25
- add_action( 'wpuf_payment_received', [$this, 'payment_received'], 10, 2 );
26
 
27
- add_shortcode( 'wpuf_sub_info', [$this, 'subscription_info'] );
28
- add_shortcode( 'wpuf_sub_pack', [$this, 'subscription_packs'] );
29
 
30
  add_action( 'save_post', [ $this, 'save_form_meta' ], 10, 2 );
31
  add_filter( 'enter_title_here', [ $this, 'change_default_title' ] );
@@ -33,13 +33,15 @@ class WPUF_Subscription {
33
 
34
  add_action( 'user_register', [ $this, 'after_registration' ], 10, 1 );
35
 
36
- add_action( 'register_form', [ $this, 'register_form'] );
37
- add_action( 'wpuf_add_post_form_top', [ $this, 'register_form'] );
38
  add_filter( 'wpuf_user_register_redirect', [ $this, 'subs_redirect_pram' ], 10, 5 );
39
 
40
  add_filter( 'template_redirect', [ $this, 'user_subscription_cancel' ] );
41
 
42
  add_action( 'wpuf_draft_post_after_insert', [ $this, 'reset_user_subscription_data' ], 10, 4 );
 
 
43
  }
44
 
45
  /**
@@ -50,13 +52,21 @@ class WPUF_Subscription {
50
  public static function subscriber_cancel( $user_id, $pack_id ) {
51
  global $wpdb;
52
 
53
- $sql = $wpdb->prepare( 'SELECT transaction_id FROM ' . $wpdb->prefix . 'wpuf_transaction
54
- WHERE user_id = %d AND pack_id = %d LIMIT 1', $user_id, $pack_id );
 
 
55
  $result = $wpdb->get_row( $sql );
56
 
57
  $transaction_id = $result ? $result->transaction_id : 0;
58
 
59
- $wpdb->update( $wpdb->prefix . 'wpuf_subscribers', [ 'subscribtion_status' => 'cancel' ], [ 'user_id' => $user_id, 'subscribtion_id' => $pack_id, 'transaction_id' => $transaction_id ] );
 
 
 
 
 
 
60
  }
61
 
62
  /**
@@ -68,19 +78,18 @@ class WPUF_Subscription {
68
  if ( isset( $_POST['wpuf_cancel_subscription'] ) ) {
69
  $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
70
  $user_id = isset( $_POST['user_id'] ) ? intval( wp_unslash( $_POST['user_id'] ) ) : 0;
71
- $gateway = isset( $_POST['gateway'] ) ? intval( wp_unslash( $_POST['gateway'] ) ) : 0;
72
  $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
73
 
74
-
75
- if ( isset( $nonce ) && !wp_verify_nonce( $nonce, 'wpuf-sub-cancel' ) ) {
76
- return ;
77
  }
78
 
79
  $current_pack = self::get_user_pack( $user_id );
80
 
81
- $gateway = ( $gateway == 'bank/manual' ) ? 'bank' : $gateway;
82
 
83
- if ( 'bank' == $gateway || 'no' == $current_pack['recurring'] ) {
84
  $this->update_user_subscription_meta( $user_id, 'Cancel' );
85
  } else {
86
  do_action( "wpuf_cancel_subscription_{$gateway}", $_POST );
@@ -94,7 +103,7 @@ class WPUF_Subscription {
94
  }
95
 
96
  public static function init() {
97
- if ( !self::$_instance ) {
98
  self::$_instance = new self();
99
  }
100
 
@@ -114,36 +123,42 @@ class WPUF_Subscription {
114
  *
115
  * @return array
116
  */
117
- public function subs_redirect_pram( $response, $user_id, $userdata, $form_id, $form_settings ) {
118
- if ( ! isset( $_POST['_wpnonce'] ) || ! isset( $_POST['action'] ) || ! wp_verify_nonce( sanitize_key( $_POST['_wpnonce'] ), 'wpuf_form_add' ) ) {
119
-
120
- }
121
-
122
- $wpuf_sub = isset( $_POST['wpuf_sub'] ) ? sanitize_text_field( wp_unslash( $_POST['wpuf_sub'] ) ) : '';
123
- $pack_id = isset( $_POST['pack_id'] ) ? sanitize_text_field( wp_unslash( $_POST['pack_id'] ) ) : '';
124
-
125
 
126
- if ( $wpuf_sub != 'yes' ) {
127
- return $response;
128
- }
129
 
130
- if ( empty( $pack_id ) ) {
131
- return $response;
132
- }
133
 
134
- $pack = $this->get_subscription( $pack_id );
135
- $billing_amount = ( $pack->meta_value['billing_amount'] >= 0 && !empty( $pack->meta_value['billing_amount'] ) ) ? $pack->meta_value['billing_amount'] : false;
 
136
 
137
- if ( $billing_amount !== false ) {
138
- $pay_page = intval( wpuf_get_option( 'payment_page', 'wpuf_payment' ) );
139
- $redirect = add_query_arg( ['action' => 'wpuf_pay', 'user_id' => $user_id, 'type' => 'pack', 'pack_id' => (int) $pack_id ], get_permalink( $pay_page ) );
140
 
141
- $response['redirect_to'] = $redirect;
142
- $response['show_message'] = false;
143
- }
 
 
 
 
 
 
 
 
 
 
 
144
 
145
- return $response;
146
- }
147
 
148
  /**
149
  * Insert hidden field on the register form based on selected package
@@ -153,10 +168,10 @@ class WPUF_Subscription {
153
  * @return void
154
  */
155
  public function register_form() {
156
- $type = isset( $_GET['type'] ) ? sanitize_text_field( wp_unslash( $_GET['type'] ) ) : '';
157
  $pack_id = isset( $_GET['pack_id'] ) ? intval( wp_unslash( $_GET['pack_id'] ) ) : 0;
158
 
159
- if ( $type != 'wpuf_sub' ) {
160
  return;
161
  }
162
 
@@ -165,7 +180,7 @@ class WPUF_Subscription {
165
  }
166
  ?>
167
  <input type="hidden" name="wpuf_sub" value="yes" />
168
- <input type="hidden" name="pack_id" value="<?php echo esc_attr( $pack_id ); ?>" />
169
 
170
  <?php
171
  }
@@ -181,14 +196,13 @@ class WPUF_Subscription {
181
  */
182
  public function after_registration( $user_id ) {
183
  if ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( '_wpnonce' ) ) {
184
-
185
  }
186
 
187
  $wpuf_sub = isset( $_POST['wpuf_sub'] ) ? sanitize_text_field( wp_unslash( $_POST['wpuf_sub'] ) ) : '';
188
- $pack_id = isset( $_POST['pack_id'] ) ? intval( wp_unslash( $_POST['pack_id'] ) ) : 0;
189
 
190
-
191
- if ( $wpuf_sub != 'yes' ) {
192
  return $user_id;
193
  }
194
 
@@ -197,14 +211,20 @@ class WPUF_Subscription {
197
  }
198
 
199
  $pack = $this->get_subscription( $pack_id );
200
- $billing_amount = ( $pack->meta_value['billing_amount'] >= 0 && !empty( $pack->meta_value['billing_amount'] ) ) ? $pack->meta_value['billing_amount'] : false;
201
 
202
  if ( $billing_amount === false ) {
203
  wpuf_get_user( $user_id )->subscription()->add_pack( $pack_id, null, false, 'free' );
204
  wpuf_get_user( $user_id )->subscription()->add_free_pack( $user_id, $pack_id );
205
  } else {
206
  $pay_page = intval( wpuf_get_option( 'payment_page', 'wpuf_payment' ) );
207
- $redirect = add_query_arg( [ 'action' => 'wpuf_pay', 'type' => 'pack', 'pack_id' => (int) $pack_id ], get_permalink( $pay_page ) );
 
 
 
 
 
 
208
  }
209
  }
210
 
@@ -214,10 +234,12 @@ class WPUF_Subscription {
214
  * @since 2.2
215
  */
216
  public function subscription_script() {
217
- wp_enqueue_script( 'wpuf-subscriptions', WPUF_ASSET_URI . '/js/subscriptions.js', ['jquery'], false, true );
218
- wp_localize_script( 'wpuf-subscriptions', 'wpuf_subs_vars', array(
219
- 'wpuf_subscription_delete_nonce' => wp_create_nonce('wpuf-subscription-delete-nonce' )
220
- ) );
 
 
221
  }
222
 
223
  /**
@@ -274,7 +296,7 @@ class WPUF_Subscription {
274
  $meta['_enable_mail_after_expired'] = get_post_meta( $subscription_id, '_enable_mail_after_expired', true );
275
  $meta['_post_expiration_message'] = get_post_meta( $subscription_id, '_post_expiration_message', true );
276
 
277
- $meta = apply_filters( 'wpuf_get_subscription_meta', $meta, $subscription_id );
278
 
279
  return $meta;
280
  }
@@ -301,7 +323,7 @@ class WPUF_Subscription {
301
  $post_types['custom_css'],
302
  $post_types['customize_changeset'],
303
  $post_types['oembed_cache']
304
- );
305
 
306
  return apply_filters( 'wpuf_posts_type', $post_types );
307
  }
@@ -316,7 +338,7 @@ class WPUF_Subscription {
316
  public function change_default_title( $title ) {
317
  $screen = get_current_screen();
318
 
319
- if ( 'wpuf_subscription' == $screen->post_type ) {
320
  $title = __( 'Pack Name', 'wp-user-frontend' );
321
  }
322
 
@@ -332,21 +354,20 @@ class WPUF_Subscription {
332
  * @return void
333
  */
334
  public function save_form_meta( $subscription_id, $post ) {
335
-
336
  $nonce = isset( $_POST['meta_box_nonce'] ) ? sanitize_key( wp_unslash( $_POST['meta_box_nonce'] ) ) : '';
337
 
338
- if ( isset( $nonce ) && !wp_verify_nonce( $nonce, 'subs_meta_box_nonce' ) ) {
339
  return;
340
  }
341
 
342
  // Is the user allowed to edit the post or page?
343
- if ( !current_user_can( 'edit_post', $post->ID ) ) {
344
  return;
345
  }
346
 
347
  $post_data = wp_unslash( $_POST );
348
 
349
- if ( !isset( $post_data['billing_amount'] ) ) {
350
  return;
351
  }
352
 
@@ -377,43 +398,45 @@ class WPUF_Subscription {
377
  public function register_post_type() {
378
  $capability = wpuf_admin_role();
379
 
380
- register_post_type( 'wpuf_subscription', [
381
- 'label' => __( 'Subscription', 'wp-user-frontend' ),
382
- 'public' => false,
383
- 'show_ui' => true,
384
- 'show_in_menu' => false,
385
- 'hierarchical' => false,
386
- 'query_var' => false,
387
- 'supports' => [ 'title' ],
388
- 'capability_type' => 'post',
389
- 'capabilities' => [
390
- 'publish_posts' => $capability,
391
- 'edit_posts' => $capability,
392
- 'edit_others_posts' => $capability,
393
- 'delete_posts' => $capability,
394
- 'delete_others_posts' => $capability,
395
- 'read_private_posts' => $capability,
396
- 'edit_post' => $capability,
397
- 'delete_post' => $capability,
398
- 'read_post' => $capability,
399
- ],
400
- 'labels' => [
401
- 'name' => __( 'Subscription', 'wp-user-frontend' ),
402
- 'singular_name' => __( 'Subscription', 'wp-user-frontend' ),
403
- 'menu_name' => __( 'Subscription', 'wp-user-frontend' ),
404
- 'add_new' => __( 'Add Subscription', 'wp-user-frontend' ),
405
- 'add_new_item' => __( 'Add New Subscription', 'wp-user-frontend' ),
406
- 'edit' => __( 'Edit', 'wp-user-frontend' ),
407
- 'edit_item' => __( 'Edit Subscription', 'wp-user-frontend' ),
408
- 'new_item' => __( 'New Subscription', 'wp-user-frontend' ),
409
- 'view' => __( 'View Subscription', 'wp-user-frontend' ),
410
- 'view_item' => __( 'View Subscription', 'wp-user-frontend' ),
411
- 'search_items' => __( 'Search Subscription', 'wp-user-frontend' ),
412
- 'not_found' => __( 'No Subscription Found', 'wp-user-frontend' ),
413
- 'not_found_in_trash' => __( 'No Subscription Found in Trash', 'wp-user-frontend' ),
414
- 'parent' => __( 'Parent Subscription', 'wp-user-frontend' ),
415
- ],
416
- ] );
 
 
417
  }
418
 
419
 
@@ -429,7 +452,7 @@ class WPUF_Subscription {
429
  public static function get_subscription( $sub_id ) {
430
  $pack = get_post( $sub_id );
431
 
432
- if ( !$pack ) {
433
  return false;
434
  }
435
 
@@ -455,11 +478,11 @@ class WPUF_Subscription {
455
  $current_pack = $current_user->subscription()->current_pack();
456
  $has_post = $current_user->subscription()->has_post_count( $form_settings['post_type'] );
457
 
458
- if ( $payment_options && $force_pack && !is_wp_error( $current_pack ) && $fallback_cost && !$has_post ) {
459
  $postdata['post_status'] = 'pending';
460
  }
461
 
462
- if ( $payment_options && !$force_pack && ( $pay_per_post || ( $fallback_cost && !$has_post ) ) ) {
463
  $postdata['post_status'] = 'pending';
464
  }
465
 
@@ -481,7 +504,7 @@ class WPUF_Subscription {
481
  // bail out if charging is not enabled
482
  $form = new WPUF_Form( $form_id );
483
 
484
- if ( !$form->is_charging_enabled() ) {
485
  return;
486
  }
487
 
@@ -492,10 +515,10 @@ class WPUF_Subscription {
492
  $current_pack = $current_user->subscription()->current_pack();
493
  $has_post = $current_user->subscription()->has_post_count( $form_settings['post_type'] );
494
 
495
- if ( $force_pack && !is_wp_error( $current_pack ) && $has_post ) {
496
  $sub_info = self::get_user_pack( $userdata->ID );
497
  $post_type = isset( $form_settings['post_type'] ) ? $form_settings['post_type'] : 'post';
498
- $count = isset( $sub_info['posts'][$post_type] ) ? intval( $sub_info['posts'][$post_type] ) : 0;
499
  $post_status = isset( $form_settings['post_status'] ) ? $form_settings['post_status'] : 'publish';
500
 
501
  $old_status = $post->post_status;
@@ -504,16 +527,16 @@ class WPUF_Subscription {
504
  // decrease the post count, if not unlimited
505
  $wpuf_post_status = get_post_meta( $post_id, 'wpuf_post_status', true );
506
 
507
- if ( $wpuf_post_status != 'new_draft' ) {
508
  if ( $count > 0 ) {
509
- $sub_info['posts'][$post_type] = $count - 1;
510
  $this->update_user_subscription_meta( $userdata->ID, $sub_info );
511
  }
512
  }
513
 
514
  //meta added to make post have flag if post is published
515
  update_post_meta( $post_id, 'wpuf_post_status', 'published' );
516
- } elseif ( $pay_per_post || ( $force_pack && $fallback_cost && !$has_post ) ) {
517
  //there is some error and it needs payment
518
  //add a uniqid to track the post easily
519
  $order_id = uniqid( rand( 10, 1000 ), false );
@@ -538,12 +561,12 @@ class WPUF_Subscription {
538
  $form = new WPUF_Form( $form_id );
539
  $payment_options = $form->is_charging_enabled();
540
 
541
- if ( !$payment_options || !is_user_logged_in() ) {
542
  $charging_enabled = 'no';
543
  } else {
544
  $charging_enabled = 'yes';
545
  }
546
-
547
  $userdata = get_userdata( get_current_user_id() );
548
 
549
  if ( self::has_user_error( $form_settings ) ) {
@@ -573,26 +596,30 @@ class WPUF_Subscription {
573
  $ppp_cost_enabled = $form->is_enabled_pay_per_post();
574
  $sub_expired = $current_user->subscription()->expired();
575
 
576
- if ( ( $payment_options && !$has_pack ) || ( $payment_options && $sub_expired ) ) {
577
  $order_id = get_post_meta( $post_id, '_wpuf_order_id', true );
578
 
579
  // check if there is a order ID
580
  if ( $order_id || ( $payment_options && $fallback_cost ) ) {
581
  $response['show_message'] = false;
582
- $response['redirect_to'] = add_query_arg( [
583
- 'action' => 'wpuf_pay',
584
- 'type' => 'post',
585
- 'post_id' => $post_id,
586
- ], get_permalink( wpuf_get_option( 'payment_page', 'wpuf_payment' ) ) );
 
 
587
  }
588
 
589
- if ( !$force_pack && $ppp_cost_enabled ) {
590
  $response['show_message'] = false;
591
- $response['redirect_to'] = add_query_arg( [
592
- 'action' => 'wpuf_pay',
593
- 'type' => 'post',
594
- 'post_id' => $post_id,
595
- ], get_permalink( wpuf_get_option( 'payment_page', 'wpuf_payment' ) ) );
 
 
596
  }
597
  }
598
 
@@ -623,7 +650,7 @@ class WPUF_Subscription {
623
  /**
624
  * Store new subscription info on user profile
625
  *
626
- * if data = 0, means 'unlimited'
627
  *
628
  * @param int $user_id
629
  * @param int $pack_id subscription pack id
@@ -635,9 +662,9 @@ class WPUF_Subscription {
635
  }
636
 
637
  /**
638
- * update user meta
639
  *
640
- * if data = 0, means 'unlimited'
641
  *
642
  * @param int $user_id
643
  * @param array $data
@@ -652,9 +679,11 @@ class WPUF_Subscription {
652
  global $wpdb;
653
 
654
  //$post = get_post( $post_id );
655
- $sql = $wpdb->prepare( "SELECT p.ID, p.post_status
 
656
  FROM $wpdb->posts p, $wpdb->postmeta m
657
- WHERE p.ID = m.post_id AND p.post_status <> 'publish' AND m.meta_key = '_wpuf_order_id' AND m.meta_value = %s", $order_id );
 
658
 
659
  return $wpdb->get_row( $sql );
660
  }
@@ -671,7 +700,7 @@ class WPUF_Subscription {
671
  // set the payment status
672
  update_post_meta( $post->ID, '_wpuf_payment_status', 'completed' );
673
 
674
- if ( $post->post_status != 'publish' ) {
675
  $this->set_post_status( $post->ID );
676
  }
677
  }
@@ -709,7 +738,7 @@ class WPUF_Subscription {
709
  public function subscription_info() {
710
  // _deprecated_function( __FUNCTION__, '2.6.0', 'wpuf_get_user()->subscription()->pack_info( $form_id );' );
711
  // wpuf_get_user()->subscription()->pack_info( $form_id );
712
- $sections = wpuf_get_account_sections();
713
  do_action( 'wpuf_account_content_subscription', $sections, 'subscription' );
714
  }
715
 
@@ -724,7 +753,6 @@ class WPUF_Subscription {
724
  $pack_msg = isset( $_GET['pack_msg'] ) ? sanitize_text_field( wp_unslash( $_GET['pack_msg'] ) ) : '';
725
  $ppp_msg = isset( $_GET['ppp_msg'] ) ? sanitize_text_field( wp_unslash( $_GET['ppp_msg'] ) ) : '';
726
 
727
-
728
  $defaults = [
729
  'include' => '',
730
  'exclude' => '',
@@ -735,7 +763,7 @@ class WPUF_Subscription {
735
  $arranged = [];
736
  $args = wp_parse_args( $atts, $defaults );
737
 
738
- if ( $args['include'] != '' ) {
739
  $pack_order = explode( ',', $args['include'] );
740
  } else {
741
  $args['order'] = isset( $args['order'] ) ? $args['order'] : 'ASC';
@@ -747,15 +775,15 @@ class WPUF_Subscription {
747
 
748
  ob_start();
749
 
750
- if ( $action == 'wpuf_paypal_success' ) {
751
  printf( '<h1>%1$s</h1><p>%2$s</p>', esc_html( __( 'Payment is complete', 'wp-user-frontend' ) ), esc_html( __( 'Congratulations, your payment has been completed!', 'wp-user-frontend' ) ) );
752
  }
753
 
754
- if ( $pack_msg == 'buy_pack' ) {
755
  esc_html_e( 'Please buy a subscription pack to post', 'wp-user-frontend' );
756
  }
757
 
758
- if ( $ppp_msg == 'pay_per_post' ) {
759
  esc_html_e( 'Please buy a subscription pack to post', 'wp-user-frontend' );
760
  }
761
 
@@ -763,21 +791,23 @@ class WPUF_Subscription {
763
 
764
  if (
765
  isset( $current_pack['pack_id'] ) &&
766
- !empty( $current_pack['pack_id'] ) &&
767
  isset( $current_pack['status'] ) &&
768
- $current_pack['status'] == 'completed'
769
  ) {
770
  global $wpdb;
771
 
772
  $user_id = get_current_user_id();
773
- $payment_gateway = $wpdb->get_var( "SELECT payment_type FROM {$wpdb->prefix}wpuf_transaction WHERE user_id = {$user_id} AND status = 'completed' ORDER BY created DESC" );
774
 
775
- $payment_gateway = strtolower( $payment_gateway ); ?>
 
776
 
777
- <?php echo wp_kses_post( __('<p><i>You have a subscription pack activated. </i></p>', 'wp-user-frontend' ) ); ?>
 
778
  <?php echo sprintf( wp_kses_post( __( '<p><i>Pack name: %s </i></p>', 'wp-user-frontend' ) ), esc_html( get_the_title( $current_pack['pack_id'] ) ) ); ?>
779
 
780
- <?php echo '<p><i>' . esc_html__( 'To cancel the pack, press the following cancel button', 'wp-user-frontend' ) . '</i></p>' ?>
781
 
782
  <form action="" id="wpuf_cancel_subscription" method="post">
783
  <?php wp_nonce_field( 'wpuf-sub-cancel' ); ?>
@@ -789,14 +819,18 @@ class WPUF_Subscription {
789
  <?php
790
  }
791
 
792
- wpuf_load_template( 'subscriptions/listing.php', apply_filters( 'wpuf_subscription_listing_args', [
793
- 'subscription' => $this,
794
- 'args' => $args,
795
- 'packs' => $packs,
796
- 'pack_order' => isset( $pack_order ) ? $pack_order : '',
797
- 'details_meta' => $details_meta,
798
- 'current_pack' => $current_pack,
799
- ] ) );
 
 
 
 
800
 
801
  $contents = ob_get_clean();
802
 
@@ -826,7 +860,7 @@ class WPUF_Subscription {
826
  'year' => _n( 'Year', 'Years', $cycle_number, 'wp-user-frontend' ),
827
  ];
828
 
829
- return apply_filters( 'wpuf_subscription_cycle_label', $labels[$cycle_period] );
830
  }
831
 
832
  /**
@@ -844,16 +878,16 @@ class WPUF_Subscription {
844
 
845
  $user_id = get_current_user_id();
846
 
847
- if ( $user_id != 0 ) {
848
  $user_pack_meta = '_wpuf_subscription_pack';
849
  $pack_details = get_user_meta( $user_id, $user_pack_meta, true );
850
 
851
- if ( !empty( $pack_details ) ) {
852
  $current_pack_status = isset( $pack_details['status'] ) ? $pack_details['status'] : '';
853
  }
854
  }
855
 
856
- $billing_amount = ( $pack->meta_value['billing_amount'] >= 0 && !empty( $pack->meta_value['billing_amount'] ) ) ? $pack->meta_value['billing_amount'] : '0.00';
857
  $trial_des = '';
858
  $recurring_des = '<div class="wpuf-pack-cycle wpuf-nullamount-hide">' . __( 'One time payment', 'wp-user-frontend' ) . '</div>';
859
 
@@ -861,24 +895,26 @@ class WPUF_Subscription {
861
  $billing_amount = apply_filters( 'wpuf_payment_amount', $billing_amount );
862
  }
863
 
864
- if ( $billing_amount && $pack->meta_value['recurring_pay'] == 'yes' ) {
865
  $recurring_des = sprintf( __( 'Every', 'wp-user-frontend' ) . ' %s %s', $pack->meta_value['billing_cycle_number'], self::get_cycle_label( $pack->meta_value['cycle_period'], $pack->meta_value['billing_cycle_number'] ), $pack->meta_value['trial_duration_type'] );
866
- $recurring_des .= !empty( $pack->meta_value['billing_limit'] ) ? sprintf( ', ' . __( 'for', 'wp-user-frontend' ) . ' %s ' . __( 'installments', 'wp-user-frontend' ), $pack->meta_value['billing_limit'] ) : '';
867
  $recurring_des = '<div class="wpuf-pack-cycle wpuf-nullamount-hide">' . $recurring_des . '</div>';
868
  }
869
 
870
- if ( $billing_amount && $pack->meta_value['recurring_pay'] == 'yes' && $pack->meta_value['trial_status'] == 'yes' ) {
871
- $duration = _n( $pack->meta_value['trial_duration_type'], $pack->meta_value['trial_duration_type'] . 's', $pack->meta_value['trial_duration'], 'wp-user-frontend' );
872
- $trial_des = sprintf( __( 'Trial available for first %s %s', 'wp-user-frontend' ), $pack->meta_value['trial_duration'], $duration );
 
 
873
  }
874
 
875
  $label = wpuf_get_option( 'logged_in_label', 'wpuf_subscription_settings', false );
876
  $button_name = $label ? $label : __( 'Buy Now', 'wp-user-frontend' );
877
 
878
- if ( !is_user_logged_in() ) {
879
  $label = wpuf_get_option( 'logged_out_label', 'wpuf_subscription_settings', false );
880
  $button_name = $label ? $label : __( 'Sign Up', 'wp-user-frontend' );
881
- } elseif ( $billing_amount == '0.00' ) {
882
  $label = wpuf_get_option( 'free_label', 'wpuf_subscription_settings', false );
883
  $button_name = $label ? $label : __( 'Free', 'wp-user-frontend' );
884
  }
@@ -899,19 +935,23 @@ class WPUF_Subscription {
899
  $query_url = $details_meta['payment_page'];
900
  }
901
 
902
- wpuf_load_template( 'subscriptions/pack-details.php', apply_filters( 'wpuf_subscription_pack_details_args', [
903
- 'pack' => $pack,
904
- 'billing_amount' => $billing_amount,
905
- 'details_meta' => $details_meta,
906
- 'recurring_des' => $recurring_des,
907
- 'trial_des' => $trial_des,
908
- 'coupon_status' => $coupon_status,
909
- 'current_pack_id' => $current_pack_id,
910
- 'current_pack_status' => isset( $current_pack_status ) ? $current_pack_status : '',
911
- 'button_name' => $button_name,
912
- 'query_args' => $query_args,
913
- 'query_url' => $query_url,
914
- ] ) );
 
 
 
 
915
  }
916
 
917
  /**
@@ -930,7 +970,7 @@ class WPUF_Subscription {
930
  $price_with_tax = wpuf_prices_include_tax();
931
  }
932
 
933
- if ( self::has_user_error( $form_settings ) || ( $payment_enabled && $pay_per_post && !$force_pack ) ) {
934
  ?>
935
  <div class="wpuf-info">
936
  <?php
@@ -940,13 +980,14 @@ class WPUF_Subscription {
940
  if ( isset( $price_with_tax ) && $price_with_tax ) {
941
  $pay_per_post_cost = apply_filters( 'wpuf_payment_amount', $pay_per_post_cost );
942
  }
943
-
944
  $text = sprintf( __( 'There is a <strong>%s</strong> charge to add a new post.', 'wp-user-frontend' ), wpuf_format_price( $pay_per_post_cost ) );
945
 
946
- echo wp_kses_post( apply_filters( 'wpuf_ppp_notice', $text, $form_id, $form_settings ) ); ?>
 
947
  </div>
948
  <?php
949
- } elseif ( self::has_user_error( $form_settings ) || ( $payment_enabled && $force_pack && !is_wp_error( $current_pack ) && !$current_user->subscription()->has_post_count( $form_settings['post_type'] ) ) ) {
950
  ?>
951
  <div class="wpuf-info">
952
  <?php
@@ -956,10 +997,11 @@ class WPUF_Subscription {
956
  if ( isset( $price_with_tax ) && $price_with_tax ) {
957
  $fallback_cost = apply_filters( 'wpuf_payment_amount', $fallback_cost );
958
  }
959
-
960
  $text = sprintf( __( 'Your Subscription pack is exhausted. There is a <strong>%s</strong> charge to add a new post.', 'wp-user-frontend' ), wpuf_format_price( $fallback_cost ) );
961
 
962
- echo wp_kses_post( apply_filters( 'wpuf_ppp_notice', wp_kses_post( $text ), esc_html( $form_id ), $form_settings ) ); ?>
 
963
  </div>
964
  <?php
965
  }
@@ -971,8 +1013,8 @@ class WPUF_Subscription {
971
 
972
  public function subscription_pack_users( $pack_id = '', $status = '' ) {
973
  global $wpdb;
974
- $sql = 'SELECT user_id FROM ' . $wpdb->prefix . 'wpuf_subscribers';
975
- $sql .= $pack_id ? ' WHERE subscribtion_id = ' . $pack_id : '';
976
  $sql .= $status ? ' AND subscribtion_status = ' . $status : '';
977
 
978
  $rows = $wpdb->get_results( $sql );
@@ -984,7 +1026,7 @@ class WPUF_Subscription {
984
  $results = [];
985
 
986
  foreach ( $rows as $row ) {
987
- if ( !in_array( $row->user_id, $results ) ) {
988
  $results[] = $row->user_id;
989
  }
990
  }
@@ -1001,7 +1043,7 @@ class WPUF_Subscription {
1001
 
1002
  if ( $force_pack && self::has_user_error( $form_settings ) ) {
1003
  $pack_page = get_permalink( wpuf_get_option( 'subscription_page', 'wpuf_payment' ) );
1004
-
1005
  $text = sprintf( __( 'You must <a href="%s">purchase a pack</a> before posting', 'wp-user-frontend' ), $pack_page );
1006
  }
1007
 
@@ -1025,27 +1067,27 @@ class WPUF_Subscription {
1025
  } else {
1026
 
1027
  // if post locking not enabled
1028
- if ( !$form->is_charging_enabled() ) {
1029
  return 'yes';
1030
  } else {
1031
  //if charging is enabled
1032
  if ( $force_pack ) {
1033
- if ( !is_wp_error( $current_pack ) ) {
1034
  // current pack has no error
1035
- if ( !$fallback_enabled ) {
1036
  //fallback cost enabled
1037
- if ( !$current_user->subscription()->current_pack_id() ) {
1038
  return 'no';
1039
  } elseif ( $current_user->subscription()->has_post_count( $form_settings['post_type'] ) ) {
1040
  return 'yes';
1041
  }
1042
  } else {
1043
  //fallback cost disabled
1044
- if ( !$current_user->subscription()->current_pack_id() ) {
1045
  return 'no';
1046
  } elseif ( $has_post_count ) {
1047
  return 'yes';
1048
- } elseif ( $current_user->subscription()->current_pack_id() && !$has_post_count ) {
1049
  return 'yes';
1050
  }
1051
  }
@@ -1054,22 +1096,22 @@ class WPUF_Subscription {
1054
  }
1055
  }
1056
 
1057
- if ( !$force_pack && $pay_per_post ) {
1058
  return 'yes';
1059
  }
1060
  }
1061
  }
1062
  }
1063
 
1064
- if ( !is_user_logged_in() && isset( $form_settings['guest_post'] ) && $form_settings['guest_post'] == 'true' ) {
1065
  if ( $form->is_charging_enabled() ) {
1066
  if ( $force_pack ) {
1067
  return 'no';
1068
  }
1069
 
1070
- if ( !$force_pack && $pay_per_post ) {
1071
  return 'yes';
1072
- } elseif ( !$force_pack && !$pay_per_post ) {
1073
  return 'no';
1074
  }
1075
  } else {
@@ -1091,7 +1133,7 @@ class WPUF_Subscription {
1091
 
1092
  // _deprecated_function( __FUNCTION__, '2.6.0', 'wpuf_get_user()->subscription()->has_error( $form_settings = null );' );
1093
 
1094
- wpuf_get_user()->subscription()->has_error( $form_settings = null );
1095
  }
1096
 
1097
  /**
@@ -1178,7 +1220,7 @@ class WPUF_Subscription {
1178
  $subscription = wpuf()->subscription->get_subscription( $pack_id );
1179
 
1180
  if ( $userdata->id && $subscription ) {
1181
- $user_sub = WPUF_Subscription::get_user_pack( $userdata->id );
1182
  $post_expiration_time = wpuf_date2mysql( $user_sub['expire'] );
1183
 
1184
  $table_data = [
@@ -1188,11 +1230,30 @@ class WPUF_Subscription {
1188
  'subscribtion_status' => 'free',
1189
  'gateway' => 'free',
1190
  'transaction_id' => 'free',
1191
- 'starts_from' => date( 'd-m-Y' ),
1192
  'expire' => empty( $post_expiration_time ) ? 'recurring' : $post_expiration_time,
1193
  ];
1194
 
1195
  $wpdb->insert( $wpdb->prefix . 'wpuf_subscribers', $table_data );
1196
  }
1197
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1198
  }
12
  private static $_instance;
13
 
14
  public function __construct() {
15
+ add_action( 'init', [ $this, 'register_post_type' ] );
16
+ add_filter( 'wpuf_add_post_args', [ $this, 'set_pending' ], 10, 4 );
17
+ add_filter( 'wpuf_add_post_redirect', [ $this, 'post_redirect' ], 10, 4 );
18
 
19
+ add_filter( 'wpuf_addpost_notice', [ $this, 'force_pack_notice' ], 20, 3 );
20
+ add_filter( 'wpuf_can_post', [ $this, 'force_pack_permission' ], 20, 3 );
21
+ add_action( 'wpuf_add_post_form_top', [ $this, 'add_post_info' ], 10, 2 );
22
 
23
+ add_action( 'wpuf_add_post_after_insert', [ $this, 'monitor_new_post' ], 10, 3 );
24
+ add_action( 'wpuf_draft_post_after_insert', [ $this, 'monitor_new_draft_post' ], 10, 3 );
25
+ add_action( 'wpuf_payment_received', [ $this, 'payment_received' ], 10, 2 );
26
 
27
+ add_shortcode( 'wpuf_sub_info', [ $this, 'subscription_info' ] );
28
+ add_shortcode( 'wpuf_sub_pack', [ $this, 'subscription_packs' ] );
29
 
30
  add_action( 'save_post', [ $this, 'save_form_meta' ], 10, 2 );
31
  add_filter( 'enter_title_here', [ $this, 'change_default_title' ] );
33
 
34
  add_action( 'user_register', [ $this, 'after_registration' ], 10, 1 );
35
 
36
+ add_action( 'register_form', [ $this, 'register_form' ] );
37
+ add_action( 'wpuf_add_post_form_top', [ $this, 'register_form' ] );
38
  add_filter( 'wpuf_user_register_redirect', [ $this, 'subs_redirect_pram' ], 10, 5 );
39
 
40
  add_filter( 'template_redirect', [ $this, 'user_subscription_cancel' ] );
41
 
42
  add_action( 'wpuf_draft_post_after_insert', [ $this, 'reset_user_subscription_data' ], 10, 4 );
43
+
44
+ add_filter( 'wpuf_get_subscription_meta', [ $this, 'reset_trial' ] );
45
  }
46
 
47
  /**
52
  public static function subscriber_cancel( $user_id, $pack_id ) {
53
  global $wpdb;
54
 
55
+ $sql = $wpdb->prepare(
56
+ 'SELECT transaction_id FROM ' . $wpdb->prefix . 'wpuf_transaction
57
+ WHERE user_id = %d AND pack_id = %d LIMIT 1', $user_id, $pack_id
58
+ );
59
  $result = $wpdb->get_row( $sql );
60
 
61
  $transaction_id = $result ? $result->transaction_id : 0;
62
 
63
+ $wpdb->update(
64
+ $wpdb->prefix . 'wpuf_subscribers', [ 'subscribtion_status' => 'cancel' ], [
65
+ 'user_id' => $user_id,
66
+ 'subscribtion_id' => $pack_id,
67
+ 'transaction_id' => $transaction_id,
68
+ ]
69
+ );
70
  }
71
 
72
  /**
78
  if ( isset( $_POST['wpuf_cancel_subscription'] ) ) {
79
  $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
80
  $user_id = isset( $_POST['user_id'] ) ? intval( wp_unslash( $_POST['user_id'] ) ) : 0;
81
+ $gateway = isset( $_POST['gateway'] ) ? sanitize_text_field( wp_unslash( $_POST['gateway'] ) ) : 0;
82
  $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
83
 
84
+ if ( isset( $nonce ) && ! wp_verify_nonce( $nonce, 'wpuf-sub-cancel' ) ) {
85
+ return;
 
86
  }
87
 
88
  $current_pack = self::get_user_pack( $user_id );
89
 
90
+ $gateway = ( $gateway === 'bank/manual' ) ? 'bank' : $gateway;
91
 
92
+ if ( 'bank' === $gateway ) {
93
  $this->update_user_subscription_meta( $user_id, 'Cancel' );
94
  } else {
95
  do_action( "wpuf_cancel_subscription_{$gateway}", $_POST );
103
  }
104
 
105
  public static function init() {
106
+ if ( ! self::$_instance ) {
107
  self::$_instance = new self();
108
  }
109
 
123
  *
124
  * @return array
125
  */
126
+ public function subs_redirect_pram( $response, $user_id, $userdata, $form_id, $form_settings ) {
127
+ if ( ! isset( $_POST['_wpnonce'] ) || ! isset( $_POST['action'] ) || ! wp_verify_nonce( sanitize_key( $_POST['_wpnonce'] ), 'wpuf_form_add' ) ) {
128
+ return;
129
+ }
 
 
 
 
130
 
131
+ $wpuf_sub = isset( $_POST['wpuf_sub'] ) ? sanitize_text_field( wp_unslash( $_POST['wpuf_sub'] ) ) : '';
132
+ $pack_id = isset( $_POST['pack_id'] ) ? sanitize_text_field( wp_unslash( $_POST['pack_id'] ) ) : '';
 
133
 
134
+ if ( $wpuf_sub !== 'yes' ) {
135
+ return $response;
136
+ }
137
 
138
+ if ( empty( $pack_id ) ) {
139
+ return $response;
140
+ }
141
 
142
+ $pack = $this->get_subscription( $pack_id );
143
+ $billing_amount = ( $pack->meta_value['billing_amount'] >= 0 && ! empty( $pack->meta_value['billing_amount'] ) ) ? $pack->meta_value['billing_amount'] : false;
 
144
 
145
+ if ( $billing_amount !== false ) {
146
+ $pay_page = intval( wpuf_get_option( 'payment_page', 'wpuf_payment' ) );
147
+ $redirect = add_query_arg(
148
+ [
149
+ 'action' => 'wpuf_pay',
150
+ 'user_id' => $user_id,
151
+ 'type' => 'pack',
152
+ 'pack_id' => (int) $pack_id,
153
+ ], get_permalink( $pay_page )
154
+ );
155
+
156
+ $response['redirect_to'] = $redirect;
157
+ $response['show_message'] = false;
158
+ }
159
 
160
+ return $response;
161
+ }
162
 
163
  /**
164
  * Insert hidden field on the register form based on selected package
168
  * @return void
169
  */
170
  public function register_form() {
171
+ $type = isset( $_GET['type'] ) ? sanitize_text_field( wp_unslash( $_GET['type'] ) ) : '';
172
  $pack_id = isset( $_GET['pack_id'] ) ? intval( wp_unslash( $_GET['pack_id'] ) ) : 0;
173
 
174
+ if ( $type !== 'wpuf_sub' ) {
175
  return;
176
  }
177
 
180
  }
181
  ?>
182
  <input type="hidden" name="wpuf_sub" value="yes" />
183
+ <input type="hidden" name="pack_id" value="<?php echo esc_attr( $pack_id ); ?>" />
184
 
185
  <?php
186
  }
196
  */
197
  public function after_registration( $user_id ) {
198
  if ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( '_wpnonce' ) ) {
199
+ return;
200
  }
201
 
202
  $wpuf_sub = isset( $_POST['wpuf_sub'] ) ? sanitize_text_field( wp_unslash( $_POST['wpuf_sub'] ) ) : '';
203
+ $pack_id = isset( $_POST['pack_id'] ) ? intval( wp_unslash( $_POST['pack_id'] ) ) : 0;
204
 
205
+ if ( $wpuf_sub !== 'yes' ) {
 
206
  return $user_id;
207
  }
208
 
211
  }
212
 
213
  $pack = $this->get_subscription( $pack_id );
214
+ $billing_amount = ( $pack->meta_value['billing_amount'] >= 0 && ! empty( $pack->meta_value['billing_amount'] ) ) ? $pack->meta_value['billing_amount'] : false;
215
 
216
  if ( $billing_amount === false ) {
217
  wpuf_get_user( $user_id )->subscription()->add_pack( $pack_id, null, false, 'free' );
218
  wpuf_get_user( $user_id )->subscription()->add_free_pack( $user_id, $pack_id );
219
  } else {
220
  $pay_page = intval( wpuf_get_option( 'payment_page', 'wpuf_payment' ) );
221
+ $redirect = add_query_arg(
222
+ [
223
+ 'action' => 'wpuf_pay',
224
+ 'type' => 'pack',
225
+ 'pack_id' => (int) $pack_id,
226
+ ], get_permalink( $pay_page )
227
+ );
228
  }
229
  }
230
 
234
  * @since 2.2
235
  */
236
  public function subscription_script() {
237
+ wp_enqueue_script( 'wpuf-subscriptions', WPUF_ASSET_URI . '/js/subscriptions.js', [ 'jquery' ], WPUF_VERSION, true );
238
+ wp_localize_script(
239
+ 'wpuf-subscriptions', 'wpuf_subs_vars', array(
240
+ 'wpuf_subscription_delete_nonce' => wp_create_nonce( 'wpuf-subscription-delete-nonce' ),
241
+ )
242
+ );
243
  }
244
 
245
  /**
296
  $meta['_enable_mail_after_expired'] = get_post_meta( $subscription_id, '_enable_mail_after_expired', true );
297
  $meta['_post_expiration_message'] = get_post_meta( $subscription_id, '_post_expiration_message', true );
298
 
299
+ $meta = apply_filters( 'wpuf_get_subscription_meta', $meta, $subscription_id );
300
 
301
  return $meta;
302
  }
323
  $post_types['custom_css'],
324
  $post_types['customize_changeset'],
325
  $post_types['oembed_cache']
326
+ );
327
 
328
  return apply_filters( 'wpuf_posts_type', $post_types );
329
  }
338
  public function change_default_title( $title ) {
339
  $screen = get_current_screen();
340
 
341
+ if ( 'wpuf_subscription' === $screen->post_type ) {
342
  $title = __( 'Pack Name', 'wp-user-frontend' );
343
  }
344
 
354
  * @return void
355
  */
356
  public function save_form_meta( $subscription_id, $post ) {
 
357
  $nonce = isset( $_POST['meta_box_nonce'] ) ? sanitize_key( wp_unslash( $_POST['meta_box_nonce'] ) ) : '';
358
 
359
+ if ( isset( $nonce ) && ! wp_verify_nonce( $nonce, 'subs_meta_box_nonce' ) ) {
360
  return;
361
  }
362
 
363
  // Is the user allowed to edit the post or page?
364
+ if ( ! current_user_can( 'edit_post', $post->ID ) ) {
365
  return;
366
  }
367
 
368
  $post_data = wp_unslash( $_POST );
369
 
370
+ if ( ! isset( $post_data['billing_amount'] ) ) {
371
  return;
372
  }
373
 
398
  public function register_post_type() {
399
  $capability = wpuf_admin_role();
400
 
401
+ register_post_type(
402
+ 'wpuf_subscription', [
403
+ 'label' => __( 'Subscription', 'wp-user-frontend' ),
404
+ 'public' => false,
405
+ 'show_ui' => true,
406
+ 'show_in_menu' => false,
407
+ 'hierarchical' => false,
408
+ 'query_var' => false,
409
+ 'supports' => [ 'title' ],
410
+ 'capability_type' => 'post',
411
+ 'capabilities' => [
412
+ 'publish_posts' => $capability,
413
+ 'edit_posts' => $capability,
414
+ 'edit_others_posts' => $capability,
415
+ 'delete_posts' => $capability,
416
+ 'delete_others_posts' => $capability,
417
+ 'read_private_posts' => $capability,
418
+ 'edit_post' => $capability,
419
+ 'delete_post' => $capability,
420
+ 'read_post' => $capability,
421
+ ],
422
+ 'labels' => [
423
+ 'name' => __( 'Subscription', 'wp-user-frontend' ),
424
+ 'singular_name' => __( 'Subscription', 'wp-user-frontend' ),
425
+ 'menu_name' => __( 'Subscription', 'wp-user-frontend' ),
426
+ 'add_new' => __( 'Add Subscription', 'wp-user-frontend' ),
427
+ 'add_new_item' => __( 'Add New Subscription', 'wp-user-frontend' ),
428
+ 'edit' => __( 'Edit', 'wp-user-frontend' ),
429
+ 'edit_item' => __( 'Edit Subscription', 'wp-user-frontend' ),
430
+ 'new_item' => __( 'New Subscription', 'wp-user-frontend' ),
431
+ 'view' => __( 'View Subscription', 'wp-user-frontend' ),
432
+ 'view_item' => __( 'View Subscription', 'wp-user-frontend' ),
433
+ 'search_items' => __( 'Search Subscription', 'wp-user-frontend' ),
434
+ 'not_found' => __( 'No Subscription Found', 'wp-user-frontend' ),
435
+ 'not_found_in_trash' => __( 'No Subscription Found in Trash', 'wp-user-frontend' ),
436
+ 'parent' => __( 'Parent Subscription', 'wp-user-frontend' ),
437
+ ],
438
+ ]
439
+ );
440
  }
441
 
442
 
452
  public static function get_subscription( $sub_id ) {
453
  $pack = get_post( $sub_id );
454
 
455
+ if ( ! $pack ) {
456
  return false;
457
  }
458
 
478
  $current_pack = $current_user->subscription()->current_pack();
479
  $has_post = $current_user->subscription()->has_post_count( $form_settings['post_type'] );
480
 
481
+ if ( $payment_options && $force_pack && ! is_wp_error( $current_pack ) && $fallback_cost && ! $has_post ) {
482
  $postdata['post_status'] = 'pending';
483
  }
484
 
485
+ if ( $payment_options && ! $force_pack && ( $pay_per_post || ( $fallback_cost && ! $has_post ) ) ) {
486
  $postdata['post_status'] = 'pending';
487
  }
488
 
504
  // bail out if charging is not enabled
505
  $form = new WPUF_Form( $form_id );
506
 
507
+ if ( ! $form->is_charging_enabled() ) {
508
  return;
509
  }
510
 
515
  $current_pack = $current_user->subscription()->current_pack();
516
  $has_post = $current_user->subscription()->has_post_count( $form_settings['post_type'] );
517
 
518
+ if ( $force_pack && ! is_wp_error( $current_pack ) && $has_post ) {
519
  $sub_info = self::get_user_pack( $userdata->ID );
520
  $post_type = isset( $form_settings['post_type'] ) ? $form_settings['post_type'] : 'post';
521
+ $count = isset( $sub_info['posts'][ $post_type ] ) ? intval( $sub_info['posts'][ $post_type ] ) : 0;
522
  $post_status = isset( $form_settings['post_status'] ) ? $form_settings['post_status'] : 'publish';
523
 
524
  $old_status = $post->post_status;
527
  // decrease the post count, if not unlimited
528
  $wpuf_post_status = get_post_meta( $post_id, 'wpuf_post_status', true );
529
 
530
+ if ( $wpuf_post_status !== 'new_draft' ) {
531
  if ( $count > 0 ) {
532
+ $sub_info['posts'][ $post_type ] = $count - 1;
533
  $this->update_user_subscription_meta( $userdata->ID, $sub_info );
534
  }
535
  }
536
 
537
  //meta added to make post have flag if post is published
538
  update_post_meta( $post_id, 'wpuf_post_status', 'published' );
539
+ } elseif ( $pay_per_post || ( $force_pack && $fallback_cost && ! $has_post ) ) {
540
  //there is some error and it needs payment
541
  //add a uniqid to track the post easily
542
  $order_id = uniqid( rand( 10, 1000 ), false );
561
  $form = new WPUF_Form( $form_id );
562
  $payment_options = $form->is_charging_enabled();
563
 
564
+ if ( ! $payment_options || ! is_user_logged_in() ) {
565
  $charging_enabled = 'no';
566
  } else {
567
  $charging_enabled = 'yes';
568
  }
569
+ //phpcs:ignore
570
  $userdata = get_userdata( get_current_user_id() );
571
 
572
  if ( self::has_user_error( $form_settings ) ) {
596
  $ppp_cost_enabled = $form->is_enabled_pay_per_post();
597
  $sub_expired = $current_user->subscription()->expired();
598
 
599
+ if ( ( $payment_options && ! $has_pack ) || ( $payment_options && $sub_expired ) ) {
600
  $order_id = get_post_meta( $post_id, '_wpuf_order_id', true );
601
 
602
  // check if there is a order ID
603
  if ( $order_id || ( $payment_options && $fallback_cost ) ) {
604
  $response['show_message'] = false;
605
+ $response['redirect_to'] = add_query_arg(
606
+ [
607
+ 'action' => 'wpuf_pay',
608
+ 'type' => 'post',
609
+ 'post_id' => $post_id,
610
+ ], get_permalink( wpuf_get_option( 'payment_page', 'wpuf_payment' ) )
611
+ );
612
  }
613
 
614
+ if ( ! $force_pack && $ppp_cost_enabled ) {
615
  $response['show_message'] = false;
616
+ $response['redirect_to'] = add_query_arg(
617
+ [
618
+ 'action' => 'wpuf_pay',
619
+ 'type' => 'post',
620
+ 'post_id' => $post_id,
621
+ ], get_permalink( wpuf_get_option( 'payment_page', 'wpuf_payment' ) )
622
+ );
623
  }
624
  }
625
 
650
  /**
651
  * Store new subscription info on user profile
652
  *
653
+ * If data = 0, means 'unlimited'
654
  *
655
  * @param int $user_id
656
  * @param int $pack_id subscription pack id
662
  }
663
 
664
  /**
665
+ * Update user meta
666
  *
667
+ * If data = 0, means 'unlimited'
668
  *
669
  * @param int $user_id
670
  * @param array $data
679
  global $wpdb;
680
 
681
  //$post = get_post( $post_id );
682
+ $sql = $wpdb->prepare(
683
+ "SELECT p.ID, p.post_status
684
  FROM $wpdb->posts p, $wpdb->postmeta m
685
+ WHERE p.ID = m.post_id AND p.post_status <> 'publish' AND m.meta_key = '_wpuf_order_id' AND m.meta_value = %s", $order_id
686
+ );
687
 
688
  return $wpdb->get_row( $sql );
689
  }
700
  // set the payment status
701
  update_post_meta( $post->ID, '_wpuf_payment_status', 'completed' );
702
 
703
+ if ( $post->post_status !== 'publish' ) {
704
  $this->set_post_status( $post->ID );
705
  }
706
  }
738
  public function subscription_info() {
739
  // _deprecated_function( __FUNCTION__, '2.6.0', 'wpuf_get_user()->subscription()->pack_info( $form_id );' );
740
  // wpuf_get_user()->subscription()->pack_info( $form_id );
741
+ $sections = wpuf_get_account_sections();
742
  do_action( 'wpuf_account_content_subscription', $sections, 'subscription' );
743
  }
744
 
753
  $pack_msg = isset( $_GET['pack_msg'] ) ? sanitize_text_field( wp_unslash( $_GET['pack_msg'] ) ) : '';
754
  $ppp_msg = isset( $_GET['ppp_msg'] ) ? sanitize_text_field( wp_unslash( $_GET['ppp_msg'] ) ) : '';
755
 
 
756
  $defaults = [
757
  'include' => '',
758
  'exclude' => '',
763
  $arranged = [];
764
  $args = wp_parse_args( $atts, $defaults );
765
 
766
+ if ( $args['include'] !== '' ) {
767
  $pack_order = explode( ',', $args['include'] );
768
  } else {
769
  $args['order'] = isset( $args['order'] ) ? $args['order'] : 'ASC';
775
 
776
  ob_start();
777
 
778
+ if ( $action === 'wpuf_paypal_success' ) {
779
  printf( '<h1>%1$s</h1><p>%2$s</p>', esc_html( __( 'Payment is complete', 'wp-user-frontend' ) ), esc_html( __( 'Congratulations, your payment has been completed!', 'wp-user-frontend' ) ) );
780
  }
781
 
782
+ if ( $pack_msg === 'buy_pack' ) {
783
  esc_html_e( 'Please buy a subscription pack to post', 'wp-user-frontend' );
784
  }
785
 
786
+ if ( $ppp_msg === 'pay_per_post' ) {
787
  esc_html_e( 'Please buy a subscription pack to post', 'wp-user-frontend' );
788
  }
789
 
791
 
792
  if (
793
  isset( $current_pack['pack_id'] ) &&
794
+ ! empty( $current_pack['pack_id'] ) &&
795
  isset( $current_pack['status'] ) &&
796
+ $current_pack['status'] === 'completed'
797
  ) {
798
  global $wpdb;
799
 
800
  $user_id = get_current_user_id();
801
+ $payment_gateway = $wpdb->get_var( $wpdb->prepare( "SELECT payment_type FROM {$wpdb->prefix}wpuf_transaction WHERE user_id = %s AND status = 'completed' ORDER BY created DESC", $user_id ) );
802
 
803
+ $payment_gateway = strtolower( $payment_gateway );
804
+ ?>
805
 
806
+ <?php echo wp_kses_post( __( '<p><i>You have a subscription pack activated. </i></p>', 'wp-user-frontend' ) ); ?>
807
+ <?php /* translators: %s: pack title */ ?>
808
  <?php echo sprintf( wp_kses_post( __( '<p><i>Pack name: %s </i></p>', 'wp-user-frontend' ) ), esc_html( get_the_title( $current_pack['pack_id'] ) ) ); ?>
809
 
810
+ <?php echo '<p><i>' . esc_html__( 'To cancel the pack, press the following cancel button', 'wp-user-frontend' ) . '</i></p>'; ?>
811
 
812
  <form action="" id="wpuf_cancel_subscription" method="post">
813
  <?php wp_nonce_field( 'wpuf-sub-cancel' ); ?>
819
  <?php
820
  }
821
 
822
+ wpuf_load_template(
823
+ 'subscriptions/listing.php', apply_filters(
824
+ 'wpuf_subscription_listing_args', [
825
+ 'subscription' => $this,
826
+ 'args' => $args,
827
+ 'packs' => $packs,
828
+ 'pack_order' => isset( $pack_order ) ? $pack_order : '',
829
+ 'details_meta' => $details_meta,
830
+ 'current_pack' => $current_pack,
831
+ ]
832
+ )
833
+ );
834
 
835
  $contents = ob_get_clean();
836
 
860
  'year' => _n( 'Year', 'Years', $cycle_number, 'wp-user-frontend' ),
861
  ];
862
 
863
+ return apply_filters( 'wpuf_subscription_cycle_label', $labels[ $cycle_period ] );
864
  }
865
 
866
  /**
878
 
879
  $user_id = get_current_user_id();
880
 
881
+ if ( $user_id !== 0 ) {
882
  $user_pack_meta = '_wpuf_subscription_pack';
883
  $pack_details = get_user_meta( $user_id, $user_pack_meta, true );
884
 
885
+ if ( ! empty( $pack_details ) ) {
886
  $current_pack_status = isset( $pack_details['status'] ) ? $pack_details['status'] : '';
887
  }
888
  }
889
 
890
+ $billing_amount = ( $pack->meta_value['billing_amount'] >= 0 && ! empty( $pack->meta_value['billing_amount'] ) ) ? $pack->meta_value['billing_amount'] : '0.00';
891
  $trial_des = '';
892
  $recurring_des = '<div class="wpuf-pack-cycle wpuf-nullamount-hide">' . __( 'One time payment', 'wp-user-frontend' ) . '</div>';
893
 
895
  $billing_amount = apply_filters( 'wpuf_payment_amount', $billing_amount );
896
  }
897
 
898
+ if ( $billing_amount && $pack->meta_value['recurring_pay'] === 'yes' ) {
899
  $recurring_des = sprintf( __( 'Every', 'wp-user-frontend' ) . ' %s %s', $pack->meta_value['billing_cycle_number'], self::get_cycle_label( $pack->meta_value['cycle_period'], $pack->meta_value['billing_cycle_number'] ), $pack->meta_value['trial_duration_type'] );
900
+ $recurring_des .= ! empty( $pack->meta_value['billing_limit'] ) ? sprintf( ', ' . __( 'for', 'wp-user-frontend' ) . ' %s ' . __( 'installments', 'wp-user-frontend' ), $pack->meta_value['billing_limit'] ) : '';
901
  $recurring_des = '<div class="wpuf-pack-cycle wpuf-nullamount-hide">' . $recurring_des . '</div>';
902
  }
903
 
904
+ if ( $billing_amount && $pack->meta_value['recurring_pay'] === 'yes' && $pack->meta_value['trial_status'] === 'yes' ) {
905
+ //phpcs:ignore
906
+ $duration = _n( $pack->meta_value['trial_duration_type'], $pack->meta_value['trial_duration_type'] . 's', $pack->meta_value['trial_duration'], 'wp-user-frontend' );
907
+ /* translators: %s: trial days */
908
+ $trial_des = sprintf( __( 'Trial available for first %1$s %2$s', 'wp-user-frontend' ), $pack->meta_value['trial_duration'], $duration );
909
  }
910
 
911
  $label = wpuf_get_option( 'logged_in_label', 'wpuf_subscription_settings', false );
912
  $button_name = $label ? $label : __( 'Buy Now', 'wp-user-frontend' );
913
 
914
+ if ( ! is_user_logged_in() ) {
915
  $label = wpuf_get_option( 'logged_out_label', 'wpuf_subscription_settings', false );
916
  $button_name = $label ? $label : __( 'Sign Up', 'wp-user-frontend' );
917
+ } elseif ( $billing_amount === '0.00' ) {
918
  $label = wpuf_get_option( 'free_label', 'wpuf_subscription_settings', false );
919
  $button_name = $label ? $label : __( 'Free', 'wp-user-frontend' );
920
  }
935
  $query_url = $details_meta['payment_page'];
936
  }
937
 
938
+ wpuf_load_template(
939
+ 'subscriptions/pack-details.php', apply_filters(
940
+ 'wpuf_subscription_pack_details_args', [
941
+ 'pack' => $pack,
942
+ 'billing_amount' => $billing_amount,
943
+ 'details_meta' => $details_meta,
944
+ 'recurring_des' => $recurring_des,
945
+ 'trial_des' => $trial_des,
946
+ 'coupon_status' => $coupon_status,
947
+ 'current_pack_id' => $current_pack_id,
948
+ 'current_pack_status' => isset( $current_pack_status ) ? $current_pack_status : '',
949
+ 'button_name' => $button_name,
950
+ 'query_args' => $query_args,
951
+ 'query_url' => $query_url,
952
+ ]
953
+ )
954
+ );
955
  }
956
 
957
  /**
970
  $price_with_tax = wpuf_prices_include_tax();
971
  }
972
 
973
+ if ( self::has_user_error( $form_settings ) || ( $payment_enabled && $pay_per_post && ! $force_pack ) ) {
974
  ?>
975
  <div class="wpuf-info">
976
  <?php
980
  if ( isset( $price_with_tax ) && $price_with_tax ) {
981
  $pay_per_post_cost = apply_filters( 'wpuf_payment_amount', $pay_per_post_cost );
982
  }
983
+ /* translators: %s: amount */
984
  $text = sprintf( __( 'There is a <strong>%s</strong> charge to add a new post.', 'wp-user-frontend' ), wpuf_format_price( $pay_per_post_cost ) );
985
 
986
+ echo wp_kses_post( apply_filters( 'wpuf_ppp_notice', $text, $form_id, $form_settings ) );
987
+ ?>
988
  </div>
989
  <?php
990
+ } elseif ( self::has_user_error( $form_settings ) || ( $payment_enabled && $force_pack && ! is_wp_error( $current_pack ) && ! $current_user->subscription()->has_post_count( $form_settings['post_type'] ) ) ) {
991
  ?>
992
  <div class="wpuf-info">
993
  <?php
997
  if ( isset( $price_with_tax ) && $price_with_tax ) {
998
  $fallback_cost = apply_filters( 'wpuf_payment_amount', $fallback_cost );
999
  }
1000
+ /* translators: %s: amount */
1001
  $text = sprintf( __( 'Your Subscription pack is exhausted. There is a <strong>%s</strong> charge to add a new post.', 'wp-user-frontend' ), wpuf_format_price( $fallback_cost ) );
1002
 
1003
+ echo wp_kses_post( apply_filters( 'wpuf_ppp_notice', wp_kses_post( $text ), esc_html( $form_id ), $form_settings ) );
1004
+ ?>
1005
  </div>
1006
  <?php
1007
  }
1013
 
1014
  public function subscription_pack_users( $pack_id = '', $status = '' ) {
1015
  global $wpdb;
1016
+ $sql = 'SELECT user_id FROM ' . $wpdb->prefix . 'wpuf_subscribers';
1017
+ $sql .= $pack_id ? ' WHERE subscribtion_id = ' . $pack_id : '';
1018
  $sql .= $status ? ' AND subscribtion_status = ' . $status : '';
1019
 
1020
  $rows = $wpdb->get_results( $sql );
1026
  $results = [];
1027
 
1028
  foreach ( $rows as $row ) {
1029
+ if ( ! in_array( (int) $row->user_id, $results, true ) ) {
1030
  $results[] = $row->user_id;
1031
  }
1032
  }
1043
 
1044
  if ( $force_pack && self::has_user_error( $form_settings ) ) {
1045
  $pack_page = get_permalink( wpuf_get_option( 'subscription_page', 'wpuf_payment' ) );
1046
+ /* translators: %s: subscription link */
1047
  $text = sprintf( __( 'You must <a href="%s">purchase a pack</a> before posting', 'wp-user-frontend' ), $pack_page );
1048
  }
1049
 
1067
  } else {
1068
 
1069
  // if post locking not enabled
1070
+ if ( ! $form->is_charging_enabled() ) {
1071
  return 'yes';
1072
  } else {
1073
  //if charging is enabled
1074
  if ( $force_pack ) {
1075
+ if ( ! is_wp_error( $current_pack ) ) {
1076
  // current pack has no error
1077
+ if ( ! $fallback_enabled ) {
1078
  //fallback cost enabled
1079
+ if ( ! $current_user->subscription()->current_pack_id() ) {
1080
  return 'no';
1081
  } elseif ( $current_user->subscription()->has_post_count( $form_settings['post_type'] ) ) {
1082
  return 'yes';
1083
  }
1084
  } else {
1085
  //fallback cost disabled
1086
+ if ( ! $current_user->subscription()->current_pack_id() ) {
1087
  return 'no';
1088
  } elseif ( $has_post_count ) {
1089
  return 'yes';
1090
+ } elseif ( $current_user->subscription()->current_pack_id() && ! $has_post_count ) {
1091
  return 'yes';
1092
  }
1093
  }
1096
  }
1097
  }
1098
 
1099
+ if ( ! $force_pack && $pay_per_post ) {
1100
  return 'yes';
1101
  }
1102
  }
1103
  }
1104
  }
1105
 
1106
+ if ( ! is_user_logged_in() && isset( $form_settings['guest_post'] ) && $form_settings['guest_post'] === 'true' ) {
1107
  if ( $form->is_charging_enabled() ) {
1108
  if ( $force_pack ) {
1109
  return 'no';
1110
  }
1111
 
1112
+ if ( ! $force_pack && $pay_per_post ) {
1113
  return 'yes';
1114
+ } elseif ( ! $force_pack && ! $pay_per_post ) {
1115
  return 'no';
1116
  }
1117
  } else {
1133
 
1134
  // _deprecated_function( __FUNCTION__, '2.6.0', 'wpuf_get_user()->subscription()->has_error( $form_settings = null );' );
1135
 
1136
+ wpuf_get_user()->subscription()->has_error( $form_settings );
1137
  }
1138
 
1139
  /**
1220
  $subscription = wpuf()->subscription->get_subscription( $pack_id );
1221
 
1222
  if ( $userdata->id && $subscription ) {
1223
+ $user_sub = self::get_user_pack( $userdata->id );
1224
  $post_expiration_time = wpuf_date2mysql( $user_sub['expire'] );
1225
 
1226
  $table_data = [
1230
  'subscribtion_status' => 'free',
1231
  'gateway' => 'free',
1232
  'transaction_id' => 'free',
1233
+ 'starts_from' => gmdate( 'd-m-Y' ),
1234
  'expire' => empty( $post_expiration_time ) ? 'recurring' : $post_expiration_time,
1235
  ];
1236
 
1237
  $wpdb->insert( $wpdb->prefix . 'wpuf_subscribers', $table_data );
1238
  }
1239
  }
1240
+
1241
+ /**
1242
+ * Reset trials data if used once
1243
+ *
1244
+ * @since WPUF_PRO
1245
+ *
1246
+ * @param $sub_meta
1247
+ *
1248
+ * @return mixed
1249
+ */
1250
+ public function reset_trial( $sub_meta ) {
1251
+ $used_trial = get_user_meta( get_current_user_id(), '_wpuf_used_trial', true );
1252
+ if ( 'yes' === $used_trial ) {
1253
+ unset( $sub_meta['trial_status'] );
1254
+ unset( $sub_meta['trial_duration'] );
1255
+ unset( $sub_meta['trial_duration_type'] );
1256
+ }
1257
+ return $sub_meta;
1258
+ }
1259
  }
class/transactions-list-table.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- if ( !class_exists( 'WP_List_Table' ) ) {
4
  require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
5
  }
6
 
@@ -10,11 +10,13 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
10
  * Constructor.
11
  */
12
  public function __construct() {
13
- parent::__construct( [
14
- 'singular' => __( 'transaction', 'wp-user-frontend' ),
15
- 'plural' => __( 'transactions', 'wp-user-frontend' ),
16
- 'ajax' => false,
17
- ] );
 
 
18
  }
19
 
20
  /**
@@ -27,7 +29,7 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
27
  public function column_cb( $item ) {
28
  return sprintf(
29
  '<input type="checkbox" name="bulk-items[]" value="%s" />', $item->id
30
- );
31
  }
32
 
33
  /**
@@ -41,6 +43,7 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
41
  'id' => __( 'ID', 'wp-user-frontend' ),
42
  'status' => __( 'Status', 'wp-user-frontend' ),
43
  'user' => __( 'User', 'wp-user-frontend' ),
 
44
  'cost' => __( 'Cost', 'wp-user-frontend' ),
45
  'tax' => __( 'Tax', 'wp-user-frontend' ),
46
  'post_id' => __( 'Post ID', 'wp-user-frontend' ),
@@ -84,8 +87,8 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
84
 
85
  $status = isset( $_REQUEST['status'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ) : 'all';
86
 
87
- $status_links['all'] = sprintf( '<a href="%s" class="%s">%s <span class="count">(%s)</span></a>', add_query_arg( [ 'status' => 'all' ], $base_link ), ( $status == 'all' ) ? 'current' : '', __( 'All', 'wp-user-frontend' ), $transactions_count );
88
- $status_links['pending'] = sprintf( '<a href="%s" class="%s">%s <span class="count">(%s)</span></a>', add_query_arg( [ 'status' => 'pending' ], $base_link ), ( $status == 'pending' ) ? 'current' : '', __( 'Pending', 'wp-user-frontend' ), $transactions_pending_count );
89
 
90
  return $status_links;
91
  }
@@ -106,7 +109,7 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
106
  $status = isset( $_REQUEST['status'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ) : '';
107
  $page = isset( $_REQUEST['page'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ) : '';
108
 
109
- if ( $status == 'pending' ) {
110
  $accept_nonce = wp_create_nonce( 'wpuf-accept-transaction' );
111
  $reject_nonce = wp_create_nonce( 'wpuf-reject-transaction' );
112
 
@@ -134,14 +137,17 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
134
  public function column_default( $item, $column_name ) {
135
  switch ( $column_name ) {
136
  case 'status':
137
- return ( $item->status == 'completed' ) ? '<span class="wpuf-status-completed" title="Completed"></span>' : '<span class="wpuf-status-processing" title="Processing"></span>';
138
 
139
  case 'user':
140
  $user = get_user_by( 'id', $item->user_id );
141
- $post_author_id = get_post_field( 'post_author', $item->post_id );
142
- $post_author = get_the_author_meta( 'nickname', $post_author_id );
143
 
144
- return !empty( $user ) ? sprintf( '<a href="%s">%s</a>', admin_url( 'user-edit.php?user_id=' . $item->user_id ), $user->user_nicename ) : $post_author;
 
 
 
145
 
146
  case 'cost':
147
  return wpuf_format_price( $item->cost );
@@ -150,18 +156,18 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
150
  return wpuf_format_price( $item->tax );
151
 
152
  case 'post_id':
153
- return !empty( $item->post_id ) ? sprintf( '<a href="%s">%s</a>', admin_url( 'post.php?post=' . $item->post_id . '&action=edit' ), $item->post_id ) : '-';
154
 
155
  case 'pack_id':
156
- return !empty( $item->pack_id ) ? sprintf( '<a href="%s">%s</a>', admin_url( 'post.php?post=' . $item->pack_id . '&action=edit' ), $item->pack_id ) : '-';
157
 
158
  case 'payer':
159
- return !empty( $item->payer_first_name ) ? $item->payer_first_name . ' ' . $item->payer_last_name : '-';
160
 
161
  case 'created':
162
- return !empty( $item->created ) ? date( 'd-m-Y', strtotime( $item->created ) ) : '-';
163
  default:
164
- return !empty( $item->{$column_name} ) ? $item->{$column_name} : '-';
165
  break;
166
  }
167
  }
@@ -183,7 +189,7 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
183
  public function get_bulk_actions() {
184
  $status = isset( $_REQUEST['status'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ) : '';
185
 
186
- if ( $status == 'pending' ) {
187
  $actions = [
188
  'bulk-accept' => __( 'Accept', 'wp-user-frontend' ),
189
  'bulk-reject' => __( 'Reject', 'wp-user-frontend' ),
@@ -208,16 +214,18 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
208
 
209
  $status = isset( $_REQUEST['status'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ) : 'all';
210
 
211
- if ( $status == 'pending' ) {
212
  $total_items = wpuf_get_pending_transactions( [ 'count' => true ] );
213
  } else {
214
  $total_items = wpuf_get_transactions( [ 'count' => true ] );
215
  }
216
 
217
- $this->set_pagination_args( [
218
- 'total_items' => $total_items,
219
- 'per_page' => $per_page,
220
- ] );
 
 
221
 
222
  $this->_column_headers = $this->get_column_info();
223
 
@@ -235,7 +243,7 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
235
  $args['order'] = sanitize_text_field( wp_unslash( $_REQUEST['order'] ) );
236
  }
237
 
238
- if ( $status == 'pending' ) {
239
  $this->items = wpuf_get_pending_transactions( $args );
240
  } else {
241
  $this->items = wpuf_get_transactions( $args );
@@ -258,8 +266,8 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
258
  $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
259
  $id = isset( $_REQUEST['id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['id'] ) ) : '';
260
 
261
- if ( $action == 'delete' || $action2 == 'delete' ) {
262
- if ( isset( $nonce ) && !wp_verify_nonce( $nonce, 'wpuf-delete-transaction' ) ) {
263
  return false;
264
  }
265
 
@@ -273,8 +281,8 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
273
  }
274
 
275
  // Delete Transactions
276
- if ( $action == 'bulk-delete' || $action2 == 'bulk-delete' ) {
277
- if ( isset( $nonce ) && !wp_verify_nonce( $nonce, 'bulk-transactions' ) ) {
278
  return false;
279
  }
280
 
@@ -294,8 +302,8 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
294
  }
295
 
296
  // Reject Transaction
297
- if ( $action == 'reject' || $action2 == 'reject' ) {
298
- if ( isset( $nonce ) && !wp_verify_nonce( $nonce, 'wpuf-reject-transaction' ) ) {
299
  return false;
300
  }
301
 
@@ -312,8 +320,8 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
312
  }
313
 
314
  // Reject Transactions
315
- if ( $action == 'bulk-reject' || $action2 == 'bulk-reject' ) {
316
- if ( isset( $nonce ) && !wp_verify_nonce( $nonce, 'bulk-transactions' ) ) {
317
  return false;
318
  }
319
  $bulk_items = isset( $_REQUEST['bulk-items'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['bulk-items'] ) ) : [];
@@ -335,16 +343,16 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
335
  }
336
 
337
  // Accept Transaction
338
- if ( $action == 'accept' || $action2 == 'accept' ) {
339
- if ( isset( $nonce ) && !wp_verify_nonce( $nonce, 'wpuf-accept-transaction' ) ) {
340
  return false;
341
  }
342
 
343
- if ( !current_user_can( 'manage_options' ) ) {
344
  return;
345
  }
346
 
347
- $id = isset( $_REQUEST['id'] ) ? intval( wp_unslash( $_REQUEST['id'] ) ) : 0 ;
348
  $info = get_post_meta( $id, '_data', true );
349
 
350
  if ( $info ) {
@@ -405,12 +413,12 @@ class WPUF_Transactions_List_Table extends WP_List_Table {
405
  }
406
 
407
  // Bulk Accept Transaction
408
- if ( $action == 'bulk-accept' || $action2 == 'bulk-accept' ) {
409
- if ( isset( $nonce ) && !wp_verify_nonce( $nonce, 'bulk-transactions' ) ) {
410
  return false;
411
  }
412
 
413
- if ( !current_user_can( 'manage_options' ) ) {
414
  return;
415
  }
416
 
1
  <?php
2
 
3
+ if ( ! class_exists( 'WP_List_Table' ) ) {
4
  require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
5
  }
6
 
10
  * Constructor.
11
  */
12
  public function __construct() {
13
+ parent::__construct(
14
+ [
15
+ 'singular' => __( 'transaction', 'wp-user-frontend' ),
16
+ 'plural' => __( 'transactions', 'wp-user-frontend' ),
17
+ 'ajax' => false,
18
+ ]
19
+ );
20
  }
21
 
22
  /**
29
  public function column_cb( $item ) {
30
  return sprintf(
31
  '<input type="checkbox" name="bulk-items[]" value="%s" />', $item->id
32
+ );
33
  }
34
 
35
  /**
43
  'id' => __( 'ID', 'wp-user-frontend' ),
44
  'status' => __( 'Status', 'wp-user-frontend' ),
45
  'user' => __( 'User', 'wp-user-frontend' ),
46
+ 'subtotal' => __( 'Subtotal', 'wp-user-frontend' ),
47
  'cost' => __( 'Cost', 'wp-user-frontend' ),
48
  'tax' => __( 'Tax', 'wp-user-frontend' ),
49
  'post_id' => __( 'Post ID', 'wp-user-frontend' ),
87
 
88
  $status = isset( $_REQUEST['status'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ) : 'all';
89
 
90
+ $status_links['all'] = sprintf( '<a href="%s" class="%s">%s <span class="count">(%s)</span></a>', add_query_arg( [ 'status' => 'all' ], $base_link ), ( $status === 'all' ) ? 'current' : '', __( 'All', 'wp-user-frontend' ), $transactions_count );
91
+ $status_links['pending'] = sprintf( '<a href="%s" class="%s">%s <span class="count">(%s)</span></a>', add_query_arg( [ 'status' => 'pending' ], $base_link ), ( $status === 'pending' ) ? 'current' : '', __( 'Pending', 'wp-user-frontend' ), $transactions_pending_count );
92
 
93
  return $status_links;
94
  }
109
  $status = isset( $_REQUEST['status'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ) : '';
110
  $page = isset( $_REQUEST['page'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ) : '';
111
 
112
+ if ( $status === 'pending' ) {
113
  $accept_nonce = wp_create_nonce( 'wpuf-accept-transaction' );
114
  $reject_nonce = wp_create_nonce( 'wpuf-reject-transaction' );
115
 
137
  public function column_default( $item, $column_name ) {
138
  switch ( $column_name ) {
139
  case 'status':
140
+ return ( $item->status === 'completed' ) ? '<span class="wpuf-status-completed" title="Completed"></span>' : '<span class="wpuf-status-processing" title="Processing"></span>';
141
 
142
  case 'user':
143
  $user = get_user_by( 'id', $item->user_id );
144
+ $post_author_id = get_post_field( 'post_author', $item->post_id );
145
+ $post_author = get_the_author_meta( 'nickname', $post_author_id );
146
 
147
+ return ! empty( $user ) ? sprintf( '<a href="%s">%s</a>', admin_url( 'user-edit.php?user_id=' . $item->user_id ), $user->user_nicename ) : $post_author;
148
+
149
+ case 'subtotal':
150
+ return wpuf_format_price( $item->subtotal );
151
 
152
  case 'cost':
153
  return wpuf_format_price( $item->cost );
156
  return wpuf_format_price( $item->tax );
157
 
158
  case 'post_id':
159
+ return ! empty( $item->post_id ) ? sprintf( '<a href="%s">%s</a>', admin_url( 'post.php?post=' . $item->post_id . '&action=edit' ), $item->post_id ) : '-';
160
 
161
  case 'pack_id':
162
+ return ! empty( $item->pack_id ) ? sprintf( '<a href="%s">%s</a>', admin_url( 'post.php?post=' . $item->pack_id . '&action=edit' ), $item->pack_id ) : '-';
163
 
164
  case 'payer':
165
+ return ! empty( $item->payer_first_name ) ? $item->payer_first_name . ' ' . $item->payer_last_name : '-';
166
 
167
  case 'created':
168
+ return ! empty( $item->created ) ? gmdate( 'd-m-Y', strtotime( $item->created ) ) : '-';
169
  default:
170
+ return ! empty( $item->{$column_name} ) ? $item->{$column_name} : '-';
171
  break;
172
  }
173
  }
189
  public function get_bulk_actions() {
190
  $status = isset( $_REQUEST['status'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ) : '';
191
 
192
+ if ( $status === 'pending' ) {
193
  $actions = [
194
  'bulk-accept' => __( 'Accept', 'wp-user-frontend' ),
195
  'bulk-reject' => __( 'Reject', 'wp-user-frontend' ),
214
 
215
  $status = isset( $_REQUEST['status'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ) : 'all';
216
 
217
+ if ( $status === 'pending' ) {
218
  $total_items = wpuf_get_pending_transactions( [ 'count' => true ] );
219
  } else {
220
  $total_items = wpuf_get_transactions( [ 'count' => true ] );
221
  }
222
 
223
+ $this->set_pagination_args(
224
+ [
225
+ 'total_items' => $total_items,
226
+ 'per_page' => $per_page,
227
+ ]
228
+ );
229
 
230
  $this->_column_headers = $this->get_column_info();
231
 
243
  $args['order'] = sanitize_text_field( wp_unslash( $_REQUEST['order'] ) );
244
  }
245
 
246
+ if ( $status === 'pending' ) {
247
  $this->items = wpuf_get_pending_transactions( $args );
248
  } else {
249
  $this->items = wpuf_get_transactions( $args );
266
  $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
267
  $id = isset( $_REQUEST['id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['id'] ) ) : '';
268
 
269
+ if ( $action === 'delete' || $action2 === 'delete' ) {
270
+ if ( isset( $nonce ) && ! wp_verify_nonce( $nonce, 'wpuf-delete-transaction' ) ) {
271
  return false;
272
  }
273
 
281
  }
282
 
283
  // Delete Transactions
284
+ if ( $action === 'bulk-delete' || $action2 === 'bulk-delete' ) {
285
+ if ( isset( $nonce ) && ! wp_verify_nonce( $nonce, 'bulk-transactions' ) ) {
286
  return false;
287
  }
288
 
302
  }
303
 
304
  // Reject Transaction
305
+ if ( $action === 'reject' || $action2 === 'reject' ) {
306
+ if ( isset( $nonce ) && ! wp_verify_nonce( $nonce, 'wpuf-reject-transaction' ) ) {
307
  return false;
308
  }
309
 
320
  }
321
 
322
  // Reject Transactions
323
+ if ( $action === 'bulk-reject' || $action2 === 'bulk-reject' ) {
324
+ if ( isset( $nonce ) && ! wp_verify_nonce( $nonce, 'bulk-transactions' ) ) {
325
  return false;
326
  }
327
  $bulk_items = isset( $_REQUEST['bulk-items'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['bulk-items'] ) ) : [];
343
  }
344
 
345
  // Accept Transaction
346
+ if ( $action === 'accept' || $action2 === 'accept' ) {
347
+ if ( isset( $nonce ) && ! wp_verify_nonce( $nonce, 'wpuf-accept-transaction' ) ) {
348
  return false;
349
  }
350
 
351
+ if ( ! current_user_can( 'manage_options' ) ) {
352
  return;
353
  }
354
 
355
+ $id = isset( $_REQUEST['id'] ) ? intval( wp_unslash( $_REQUEST['id'] ) ) : 0;
356
  $info = get_post_meta( $id, '_data', true );
357
 
358
  if ( $info ) {
413
  }
414
 
415
  // Bulk Accept Transaction
416
+ if ( $action === 'bulk-accept' || $action2 === 'bulk-accept' ) {
417
+ if ( isset( $nonce ) && ! wp_verify_nonce( $nonce, 'bulk-transactions' ) ) {
418
  return false;
419
  }
420
 
421
+ if ( ! current_user_can( 'manage_options' ) ) {
422
  return;
423
  }
424
 
languages/wp-user-frontend.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL2 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP User Frontend 3.5.8\n"
6
  "Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
7
- "POT-Creation-Date: 2020-11-21 17:16:18+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -143,7 +143,7 @@ msgstr ""
143
  msgid "Subscription pack draft updated."
144
  msgstr ""
145
 
146
- #: admin/class-admin-subscription.php:202 class/subscription.php:320
147
  msgid "Pack Name"
148
  msgstr ""
149
 
@@ -162,15 +162,15 @@ msgstr ""
162
 
163
  #: admin/class-admin-subscription.php:226
164
  #: admin/class-admin-subscription.php:596 class/frontend-account.php:243
165
- #: class/subscription.php:883 includes/class-user-subscription.php:305
166
  #: templates/subscriptions/pack-details.php:24
167
  msgid "Free"
168
  msgstr ""
169
 
170
  #: admin/class-admin-subscription.php:245
171
  #: admin/html/form-settings-display.php:41 admin/post-forms-list-table.php:360
172
- #: admin/settings-options.php:115 admin/settings-options.php:126
173
- #: admin/settings-options.php:218 admin/settings-options.php:229
174
  #: admin/template.php:63 class/asset-loader.php:50
175
  #: includes/fields/class-abstract-fields.php:252
176
  #: includes/fields/class-abstract-fields.php:332
@@ -184,8 +184,8 @@ msgstr ""
184
 
185
  #: admin/class-admin-subscription.php:247
186
  #: admin/html/form-settings-display.php:40 admin/post-forms-list-table.php:361
187
- #: admin/settings-options.php:116 admin/settings-options.php:127
188
- #: admin/settings-options.php:219 admin/settings-options.php:230
189
  #: admin/template.php:64 class/asset-loader.php:51
190
  #: includes/fields/class-abstract-fields.php:253
191
  #: includes/fields/class-abstract-fields.php:333
@@ -328,7 +328,7 @@ msgstr ""
328
 
329
  #: admin/class-admin-subscription.php:774
330
  #: admin/form-builder/class-wpuf-admin-form-builder.php:284
331
- #: class/payment.php:217 class/subscription.php:787
332
  #: includes/class-list-table-subscribers.php:138 lib/appsero/Insights.php:764
333
  #: templates/dashboard/subscription.php:64
334
  msgid "Cancel"
@@ -363,8 +363,8 @@ msgid "Form Export"
363
  msgstr ""
364
 
365
  #: admin/class-tools.php:43 admin/class-tools.php:106
366
- #: admin/post-forms-list-table.php:43 class/transactions-list-table.php:87
367
- #: includes/class-list-table-subscribers.php:136 wpuf-functions.php:3016
368
  msgid "All"
369
  msgstr ""
370
 
@@ -754,7 +754,7 @@ msgid "Add New Form"
754
  msgstr ""
755
 
756
  #: admin/form.php:71 admin/form.php:109 admin/installer.php:86
757
- #: admin/post-forms-list-table.php:406 class/subscription.php:406
758
  #: includes/free/admin/shortcode-button.php:87 includes/free/edit-user.php:104
759
  #: templates/dashboard/posts.php:177 templates/dashboard.php:268
760
  msgid "Edit"
@@ -879,7 +879,7 @@ msgstr ""
879
  msgid "Payment Options"
880
  msgstr ""
881
 
882
- #: admin/html/form-settings-payment.php:25 admin/settings-options.php:371
883
  #: includes/setup-wizard.php:301
884
  msgid "Enable Payments"
885
  msgstr ""
@@ -1103,7 +1103,7 @@ msgid "Name"
1103
  msgstr ""
1104
 
1105
  #: admin/html/form-submission-restriction.php:12 admin/html/support.php:223
1106
- #: class/transactions-list-table.php:50 includes/class-privacy.php:358
1107
  #: includes/free/edit-user.php:168 templates/registration-form.php:47
1108
  msgid "Email"
1109
  msgstr ""
@@ -1188,12 +1188,12 @@ msgid "Choose which roles can submit posts."
1188
  msgstr ""
1189
 
1190
  #: admin/html/form-submission-restriction.php:114
1191
- #: admin/settings-options.php:282
1192
  msgid "Unauthorized Message"
1193
  msgstr ""
1194
 
1195
  #: admin/html/form-submission-restriction.php:117
1196
- #: admin/settings-options.php:283
1197
  msgid "Not logged in users will see this message"
1198
  msgstr ""
1199
 
@@ -1412,497 +1412,517 @@ msgid "Contact Support"
1412
  msgstr ""
1413
 
1414
  #: admin/html/whats-new.php:9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1415
  msgid "Updated codebase to fix timezone mismatch"
1416
  msgstr ""
1417
 
1418
- #: admin/html/whats-new.php:20
1419
  msgid "Custom html content field's width"
1420
  msgstr ""
1421
 
1422
- #: admin/html/whats-new.php:24
1423
  msgid "All states of New Zealand are added"
1424
  msgstr ""
1425
 
1426
- #: admin/html/whats-new.php:35
1427
  msgid "Get appropriate user id when role based conditions are present"
1428
  msgstr ""
1429
 
1430
- #: admin/html/whats-new.php:39
1431
  msgid "Show Invalid subscription message if wrong pack id passed"
1432
  msgstr ""
1433
 
1434
- #: admin/html/whats-new.php:43
1435
  msgid "URL field new window not working"
1436
  msgstr ""
1437
 
1438
- #: admin/html/whats-new.php:47
1439
  msgid "Option label not working when & use"
1440
  msgstr ""
1441
 
1442
- #: admin/html/whats-new.php:51
1443
  msgid "Ajax type category not showing on edit"
1444
  msgstr ""
1445
 
1446
- #: admin/html/whats-new.php:55
1447
  msgid "Multiple file image can't select"
1448
  msgstr ""
1449
 
1450
- #: admin/html/whats-new.php:59
1451
  msgid "Subscription pack PayPal Checkout gets \"Error: Access Denied\""
1452
  msgstr ""
1453
 
1454
- #: admin/html/whats-new.php:63
1455
  msgid "Conflict image field with acf image field"
1456
  msgstr ""
1457
 
1458
- #: admin/html/whats-new.php:67
1459
  msgid "Missing Auckland State for New Zealand country"
1460
  msgstr ""
1461
 
1462
- #: admin/html/whats-new.php:71
1463
  msgid "Added support for WooCommerce product category value replacemen"
1464
  msgstr ""
1465
 
1466
- #: admin/html/whats-new.php:81
1467
  msgid "Add character restriction feature"
1468
  msgstr ""
1469
 
1470
- #: admin/html/whats-new.php:85
1471
  msgid "Make sure post author edit link works only in frontend"
1472
  msgstr ""
1473
 
1474
- #: admin/html/whats-new.php:89
1475
  msgid "Inconsistency in lost password reset email message"
1476
  msgstr ""
1477
 
1478
- #: admin/html/whats-new.php:93
1479
  msgid "Saving custom taxonomy terms when input type is text"
1480
  msgstr ""
1481
 
1482
- #: admin/html/whats-new.php:97
1483
  msgid "Taxonomy field JS error in builder"
1484
  msgstr ""
1485
 
1486
- #: admin/html/whats-new.php:101
1487
  msgid "Showing WPUF edit link for WP default roles"
1488
  msgstr ""
1489
 
1490
- #: admin/html/whats-new.php:105
1491
  msgid "Upload button unresponsive issue in iOS"
1492
  msgstr ""
1493
 
1494
- #: admin/html/whats-new.php:115
1495
  msgid "Add post edit link for post authors in single or archive pages"
1496
  msgstr ""
1497
 
1498
- #: admin/html/whats-new.php:119
1499
  msgid "Enhance post delete message"
1500
  msgstr ""
1501
 
1502
- #: admin/html/whats-new.php:123
1503
  msgid "Refactor control buttons visibility in form builder"
1504
  msgstr ""
1505
 
1506
- #: admin/html/whats-new.php:127
1507
  msgid "Add missing colons after field label"
1508
  msgstr ""
1509
 
1510
- #: admin/html/whats-new.php:131
1511
  msgid "Post edit map capability condition"
1512
  msgstr ""
1513
 
1514
- #: admin/html/whats-new.php:135
1515
  msgid "Role based permission for accessing a post form"
1516
  msgstr ""
1517
 
1518
- #: admin/html/whats-new.php:139
1519
  msgid "Section-break field alignment"
1520
  msgstr ""
1521
 
1522
- #: admin/html/whats-new.php:143
1523
  msgid "Pay per post doesn't work if subscription pack is activated"
1524
  msgstr ""
1525
 
1526
- #: admin/html/whats-new.php:147
1527
  msgid "Mime type for uploading JSON files"
1528
  msgstr ""
1529
 
1530
- #: admin/html/whats-new.php:151
1531
  msgid "File upload with same file name"
1532
  msgstr ""
1533
 
1534
- #: admin/html/whats-new.php:155
1535
  msgid "Post preview missing fields"
1536
  msgstr ""
1537
 
1538
- #: admin/html/whats-new.php:159
1539
  msgid "Illigal variable declartion"
1540
  msgstr ""
1541
 
1542
- #: admin/html/whats-new.php:163
1543
  msgid "Featured image updating issue"
1544
  msgstr ""
1545
 
1546
- #: admin/html/whats-new.php:167
1547
  msgid "Conflict with Phlox theme"
1548
  msgstr ""
1549
 
1550
- #: admin/html/whats-new.php:171
1551
  msgid "Textarea custom field data sanitization"
1552
  msgstr ""
1553
 
1554
- #: admin/html/whats-new.php:175
1555
  msgid "exclude_type warning in wpuf_category_checklist"
1556
  msgstr ""
1557
 
1558
- #: admin/html/whats-new.php:179
1559
  msgid "Category field not showing all child categories for selection type child of"
1560
  msgstr ""
1561
 
1562
- #: admin/html/whats-new.php:183
1563
  msgid "Conflict between image and file upload custom fields"
1564
  msgstr ""
1565
 
1566
- #: admin/html/whats-new.php:187
1567
  msgid "Login url when login page is not set"
1568
  msgstr ""
1569
 
1570
- #: admin/html/whats-new.php:197
1571
  msgid ""
1572
  "Use common names for Ivory Coast, North Korea and Sourth Korea instead of "
1573
  "their official names"
1574
  msgstr ""
1575
 
1576
- #: admin/html/whats-new.php:201
1577
  msgid "Fix condition to use default avatar"
1578
  msgstr ""
1579
 
1580
- #: admin/html/whats-new.php:205
1581
  msgid "Make Email and URL fields clickable"
1582
  msgstr ""
1583
 
1584
- #: admin/html/whats-new.php:209
1585
  msgid "Fix redirect after user login"
1586
  msgstr ""
1587
 
1588
- #: admin/html/whats-new.php:213
1589
  msgid "Sanitize textarea field data"
1590
  msgstr ""
1591
 
1592
- #: admin/html/whats-new.php:217
1593
  msgid ""
1594
  "Fix missing colon to email, URL, text and textarea labels when renders "
1595
  "their data"
1596
  msgstr ""
1597
 
1598
- #: admin/html/whats-new.php:221
1599
  msgid "Prevent showing empty labels for fields that have render_field_data method"
1600
  msgstr ""
1601
 
1602
- #: admin/html/whats-new.php:231
1603
  msgid "Add Namibian Dollar in currency list"
1604
  msgstr ""
1605
 
1606
- #: admin/html/whats-new.php:235
1607
  msgid "Add sync values option for option data fields"
1608
  msgstr ""
1609
 
1610
- #: admin/html/whats-new.php:239
1611
  msgid "Allow uploading image that having filesize meets php ini settings"
1612
  msgstr ""
1613
 
1614
- #: admin/html/whats-new.php:243
1615
  msgid "Limit the selection of one image at a time"
1616
  msgstr ""
1617
 
1618
- #: admin/html/whats-new.php:247
1619
  msgid "Use file name and size to generate hash to prevent duplicant image upload"
1620
  msgstr ""
1621
 
1622
- #: admin/html/whats-new.php:251
1623
  msgid "Sanitize text and textarea field data"
1624
  msgstr ""
1625
 
1626
- #: admin/html/whats-new.php:255
1627
  msgid ""
1628
  "Show label instead of values for radio, checkbox, dropdown and multiselect "
1629
  "data"
1630
  msgstr ""
1631
 
1632
- #: admin/html/whats-new.php:259
1633
  msgid "Saving custom taxonomies for type text input"
1634
  msgstr ""
1635
 
1636
- #: admin/html/whats-new.php:263
1637
  msgid "Admin settings link for recaptcha helper text"
1638
  msgstr ""
1639
 
1640
- #: admin/html/whats-new.php:267
1641
  msgid "Undefined name property for Custom HTML fields"
1642
  msgstr ""
1643
 
1644
- #: admin/html/whats-new.php:271
1645
  msgid "Delete attachment process"
1646
  msgstr ""
1647
 
1648
- #: admin/html/whats-new.php:275
1649
  msgid "Missing billing address in invoice PDF"
1650
  msgstr ""
1651
 
1652
- #: admin/html/whats-new.php:279
1653
  msgid "Showing country field value in frontend post content"
1654
  msgstr ""
1655
 
1656
- #: admin/html/whats-new.php:283
1657
  msgid "Avatar size display not complying with admin settings size"
1658
  msgstr ""
1659
 
1660
- #: admin/html/whats-new.php:287
1661
  msgid "Display default avatars on admin settings discussion page"
1662
  msgstr ""
1663
 
1664
- #: admin/html/whats-new.php:291
1665
  msgid "Redirect to subscription page at registration"
1666
  msgstr ""
1667
 
1668
- #: admin/html/whats-new.php:295
1669
  msgid "Error notice regarding registration page redirect"
1670
  msgstr ""
1671
 
1672
- #: admin/html/whats-new.php:299
1673
  msgid "Escaping html in registration errors"
1674
  msgstr ""
1675
 
1676
- #: admin/html/whats-new.php:303
1677
  msgid "Default login redirect link"
1678
  msgstr ""
1679
 
1680
- #: admin/html/whats-new.php:307
1681
  msgid "Implementing default WP login page override option"
1682
  msgstr ""
1683
 
1684
- #: admin/html/whats-new.php:311
1685
  msgid "Transparent background of autosuggestion dropdown"
1686
  msgstr ""
1687
 
1688
- #: admin/html/whats-new.php:321
1689
  msgid "Import forms system"
1690
  msgstr ""
1691
 
1692
- #: admin/html/whats-new.php:325
1693
  msgid "Password reset system"
1694
  msgstr ""
1695
 
1696
- #: admin/html/whats-new.php:329
1697
  msgid "Updated url validation regex to support modern tlds"
1698
  msgstr ""
1699
 
1700
- #: admin/html/whats-new.php:333
1701
  msgid "Export WPUF forms individually from admin tools page"
1702
  msgstr ""
1703
 
1704
- #: admin/html/whats-new.php:337
1705
  msgid "Subscription cycle label translation issue"
1706
  msgstr ""
1707
 
1708
- #: admin/html/whats-new.php:341
1709
  msgid "ACF integration for checkbox fields"
1710
  msgstr ""
1711
 
1712
- #: admin/html/whats-new.php:345
1713
  msgid "Illegal string offset warning while updating settings"
1714
  msgstr ""
1715
 
1716
- #: admin/html/whats-new.php:349
1717
  msgid "Conditional logic for Section Break field"
1718
  msgstr ""
1719
 
1720
- #: admin/html/whats-new.php:353
1721
  msgid "Subscriptions cannot be deleted from backend"
1722
  msgstr ""
1723
 
1724
- #: admin/html/whats-new.php:357
1725
  msgid "A regression regarding saving checkbox data"
1726
  msgstr ""
1727
 
1728
- #: admin/html/whats-new.php:361
1729
  msgid "Default value of multi-select fields is not showing"
1730
  msgstr ""
1731
 
1732
- #: admin/html/whats-new.php:371
1733
  msgid "Hide post edit option when subscription is expired"
1734
  msgstr ""
1735
 
1736
- #: admin/html/whats-new.php:373
1737
  msgid "Hide post edit option from users whose subscription pack is expired."
1738
  msgstr ""
1739
 
1740
- #: admin/html/whats-new.php:376
1741
  msgid "Check files to prevent duplicity in media upload"
1742
  msgstr ""
1743
 
1744
- #: admin/html/whats-new.php:378
1745
  msgid ""
1746
  "A simple measure has been taken to prevent maliciously flooding the site by "
1747
  "uploading same file multiple times. Though this won't work with already "
1748
  "uploaded medias."
1749
  msgstr ""
1750
 
1751
- #: admin/html/whats-new.php:381
1752
  msgid "Refactor address fields in Account section"
1753
  msgstr ""
1754
 
1755
- #: admin/html/whats-new.php:383
1756
  msgid "Address edit section from Account section has been rewritten to improve UX."
1757
  msgstr ""
1758
 
1759
- #: admin/html/whats-new.php:386
1760
  msgid "Update Paypal payment gateway"
1761
  msgstr ""
1762
 
1763
- #: admin/html/whats-new.php:388
1764
  msgid "Paypal payment gateway has seen some improvements."
1765
  msgstr ""
1766
 
1767
- #: admin/html/whats-new.php:391
1768
  msgid "Default Category selection improvements"
1769
  msgstr ""
1770
 
1771
- #: admin/html/whats-new.php:393
1772
  msgid ""
1773
  "An intuitive way of selecting default category of a selected post type has "
1774
  "been introduced."
1775
  msgstr ""
1776
 
1777
- #: admin/html/whats-new.php:396
1778
  msgid "Compatibility issue with ACF date time field"
1779
  msgstr ""
1780
 
1781
- #: admin/html/whats-new.php:398
1782
  msgid "A Compatibility issue with ACF date time field has been addressed."
1783
  msgstr ""
1784
 
1785
- #: admin/html/whats-new.php:401
1786
  msgid "Media title, caption & description not saving"
1787
  msgstr ""
1788
 
1789
- #: admin/html/whats-new.php:403
1790
  msgid ""
1791
  "Media title, caption & description were not saving from frontend. They will "
1792
  "now."
1793
  msgstr ""
1794
 
1795
- #: admin/html/whats-new.php:406
1796
  msgid ""
1797
  "The Events Calendar venue and organizer fields issue in WPUF Custom Fields "
1798
  "metabox"
1799
  msgstr ""
1800
 
1801
- #: admin/html/whats-new.php:408
1802
  msgid ""
1803
  "A workaround has been introduced to save The Events Calendar Venue and "
1804
  "Organizer fields properly from WPUF Custom Fields metabox."
1805
  msgstr ""
1806
 
1807
- #: admin/html/whats-new.php:411
1808
  msgid "Checkbox data not saving from WPUF Custom Fields metabox"
1809
  msgstr ""
1810
 
1811
- #: admin/html/whats-new.php:413
1812
  msgid ""
1813
  "Checkboxe data from WPUF Custom Fields metabox were not saving. It has been "
1814
  "fixed."
1815
  msgstr ""
1816
 
1817
- #: admin/html/whats-new.php:416
1818
  msgid "Multi-column Repeater field data saving issue"
1819
  msgstr ""
1820
 
1821
- #: admin/html/whats-new.php:418
1822
  msgid ""
1823
  "Multi-column Repeater field data from a form was not saving. It has been "
1824
  "fixed."
1825
  msgstr ""
1826
 
1827
- #: admin/html/whats-new.php:421
1828
  msgid "Multistep form conflict with Elementor"
1829
  msgstr ""
1830
 
1831
- #: admin/html/whats-new.php:423
1832
  msgid "Multistep form had a conflict with Elementor. It has been fixed."
1833
  msgstr ""
1834
 
1835
- #: admin/html/whats-new.php:426
1836
  msgid "Multiple images showing issue in frontend"
1837
  msgstr ""
1838
 
1839
- #: admin/html/whats-new.php:428
1840
  msgid "Multiple images in a post were not showing in frontend. Now they will."
1841
  msgstr ""
1842
 
1843
- #: admin/html/whats-new.php:437
1844
  msgid "Nonce not verify on login"
1845
  msgstr ""
1846
 
1847
- #: admin/html/whats-new.php:439
1848
  msgid "Return of function wp_verify_nonce() was ignored."
1849
  msgstr ""
1850
 
1851
- #: admin/html/whats-new.php:448
1852
  msgid "Option to set which tab shows as active on the account page"
1853
  msgstr ""
1854
 
1855
- #: admin/html/whats-new.php:450
1856
  msgid ""
1857
  "Option to set which tab shows as active on the account page. To configure "
1858
  "this setting navigate to wp-admin->User Frontend->Settings->My "
1859
  "Account->Active Tab "
1860
  msgstr ""
1861
 
1862
- #: admin/html/whats-new.php:453
1863
  msgid "Unlock option was unavailable after the post being locked"
1864
  msgstr ""
1865
 
1866
- #: admin/html/whats-new.php:455
1867
  msgid "Unlock option was unavailable after the post being locked."
1868
  msgstr ""
1869
 
1870
- #: admin/html/whats-new.php:458
1871
  msgid "Gutenberg block of WPUF didn't work on bedrock installation"
1872
  msgstr ""
1873
 
1874
- #: admin/html/whats-new.php:460
1875
  msgid "Gutenberg block of WPUF didn't work on bedrock installation."
1876
  msgstr ""
1877
 
1878
- #: admin/html/whats-new.php:463
1879
  msgid "Sending admin payment received email twice"
1880
  msgstr ""
1881
 
1882
- #: admin/html/whats-new.php:465
1883
  msgid ""
1884
  "After processing payment admin & user was receiving payment received email "
1885
  "twice."
1886
  msgstr ""
1887
 
1888
- #: admin/html/whats-new.php:468
1889
  msgid ""
1890
  "Add shortcode support to display post information in the Post Expiration "
1891
  "Message"
1892
  msgstr ""
1893
 
1894
- #: admin/html/whats-new.php:470
1895
  msgid ""
1896
  "Add shortcode support to display post information in the Post Expiration "
1897
  "Message. You can use: <strong>{post_author} {post_url} {blogname} "
1898
  "{post_title} {post_status}</strong>"
1899
  msgstr ""
1900
 
1901
- #: admin/html/whats-new.php:473
1902
  msgid "Add optin on the setup wizard"
1903
  msgstr ""
1904
 
1905
- #: admin/html/whats-new.php:475
1906
  msgid ""
1907
  "Added optin on the setup wizard, admin can choose whether he/she wants to "
1908
  "share server environment details (php, mysql, server, WordPress versions), "
@@ -1910,126 +1930,126 @@ msgid ""
1910
  "name and url, admin name and email address. No sensitive data is tracked"
1911
  msgstr ""
1912
 
1913
- #: admin/html/whats-new.php:484
1914
  msgid "Post Owner problem"
1915
  msgstr ""
1916
 
1917
- #: admin/html/whats-new.php:486
1918
  msgid ""
1919
  "Posts were not assigned to the selected default post owner, this issue has "
1920
  "been fixed."
1921
  msgstr ""
1922
 
1923
- #: admin/html/whats-new.php:489
1924
  msgid "Google reCaptcha was not working"
1925
  msgstr ""
1926
 
1927
- #: admin/html/whats-new.php:491
1928
  msgid ""
1929
  "Google reCaptcha was not working, users could submit the form without "
1930
  "reCaptcha validation."
1931
  msgstr ""
1932
 
1933
- #: admin/html/whats-new.php:500
1934
  msgid "Added column field"
1935
  msgstr ""
1936
 
1937
- #: admin/html/whats-new.php:505
1938
  msgid "Unable to render the events on the front-end dashboard"
1939
  msgstr ""
1940
 
1941
- #: admin/html/whats-new.php:507
1942
  msgid ""
1943
  "On the frontend dashboard, the submitted events were not showing, you will "
1944
  "get it fixed in this version."
1945
  msgstr ""
1946
 
1947
- #: admin/html/whats-new.php:510
1948
  msgid "Page order getting 0(zero) after editing from the frontend"
1949
  msgstr ""
1950
 
1951
- #: admin/html/whats-new.php:512
1952
  msgid ""
1953
  "Page order was not saving while editing a post using WPUF form, it has been "
1954
  "fixed."
1955
  msgstr ""
1956
 
1957
- #: admin/html/whats-new.php:515
1958
  msgid "Text input field for taxonomies not working"
1959
  msgstr ""
1960
 
1961
- #: admin/html/whats-new.php:517
1962
  msgid ""
1963
  "When taxonomy field type is set to `Text Input` then a fatal error was "
1964
  "showing on the frontend, no error with taxonomy field in the latest version."
1965
  msgstr ""
1966
 
1967
- #: admin/html/whats-new.php:520
1968
  msgid ""
1969
  "In radio and checkbox field use conditional logic that value does not save "
1970
  "in database"
1971
  msgstr ""
1972
 
1973
- #: admin/html/whats-new.php:522
1974
  msgid ""
1975
  "The selected value of radio and checkbox field were not showing while "
1976
  "editing posts from the backend or frontend, you can see the selected value "
1977
  "in this version."
1978
  msgstr ""
1979
 
1980
- #: admin/html/whats-new.php:525
1981
  msgid "The args param not working with get_avatar filter"
1982
  msgstr ""
1983
 
1984
- #: admin/html/whats-new.php:527
1985
  msgid "The args parameter did not exist with get_avatar filter, which now exists."
1986
  msgstr ""
1987
 
1988
- #: admin/html/whats-new.php:530
1989
  msgid "The item in ajax taxonomy field was not selected"
1990
  msgstr ""
1991
 
1992
- #: admin/html/whats-new.php:532
1993
  msgid ""
1994
  "When the taxonomy field type is set to Ajax, the submitted terms were not "
1995
  "showing in the backend and frontend which have been fixed."
1996
  msgstr ""
1997
 
1998
- #: admin/html/whats-new.php:541
1999
  msgid "Unable to send new user registration email"
2000
  msgstr ""
2001
 
2002
- #: admin/html/whats-new.php:543
2003
  msgid ""
2004
  "WP User Frontend default registration form `[wpuf-registration]` was unable "
2005
  "to send the new user registration email."
2006
  msgstr ""
2007
 
2008
- #: admin/html/whats-new.php:546
2009
  msgid "WPUF forms block compatibility issue with the latest WP version"
2010
  msgstr ""
2011
 
2012
- #: admin/html/whats-new.php:548
2013
  msgid ""
2014
  "With the latest version of WordPress the gutenberg block of WP User "
2015
  "Frontend were not working. In this version, you will get it fixed."
2016
  msgstr ""
2017
 
2018
- #: admin/html/whats-new.php:551
2019
  msgid "Page not update where `[wpuf_dashboard]` shortcode exist"
2020
  msgstr ""
2021
 
2022
- #: admin/html/whats-new.php:553
2023
  msgid ""
2024
  "While using Gutenberg, the page were not being updated with WPUF shortcode "
2025
  "[wpuf dashboard]"
2026
  msgstr ""
2027
 
2028
- #: admin/html/whats-new.php:556
2029
  msgid "Retain default when determining whether to display the admin bar"
2030
  msgstr ""
2031
 
2032
- #: admin/html/whats-new.php:558
2033
  msgid ""
2034
  "From the User Frontend Settings, set that Administrator, Editor, Vendor can "
2035
  "see the admin bar. Now, the super admin want, one specific user ( who has "
@@ -2039,11 +2059,11 @@ msgid ""
2039
  "frontend."
2040
  msgstr ""
2041
 
2042
- #: admin/html/whats-new.php:561
2043
  msgid "Fatal error when use PHP lower version (5.4 or lower)"
2044
  msgstr ""
2045
 
2046
- #: admin/html/whats-new.php:563
2047
  msgid ""
2048
  "It was unable to install WP User Frontend with PHP 5.4 or lower version. "
2049
  "Here is the error details: <br><br><strong>Fatal error: Can't use method "
@@ -2051,42 +2071,42 @@ msgid ""
2051
  "/wp-user-frontend/class/frontend-form-post.php on line 194</strong>"
2052
  msgstr ""
2053
 
2054
- #: admin/html/whats-new.php:566
2055
  msgid "Product form was unable to show the single gallery image"
2056
  msgstr ""
2057
 
2058
- #: admin/html/whats-new.php:568
2059
  msgid ""
2060
  "When user upload single image for product gallery using WPUF WooCommerce "
2061
  "product form, that image were not showing on the frontend."
2062
  msgstr ""
2063
 
2064
- #: admin/html/whats-new.php:577
2065
  msgid "WooCommerce gallery images not getting saved"
2066
  msgstr ""
2067
 
2068
- #: admin/html/whats-new.php:579
2069
  msgid ""
2070
  "After releasing version 2.9.3, WooCommerce gallery image field stopped "
2071
  "working. You will get it fixed in this version."
2072
  msgstr ""
2073
 
2074
- #: admin/html/whats-new.php:588
2075
  msgid "The Events Calendar Integration Form"
2076
  msgstr ""
2077
 
2078
- #: admin/html/whats-new.php:590
2079
  msgid ""
2080
  "Now admin can allow users to create event from the frontend. Currently WPUF "
2081
  "has a one click pre-build event form that has been integrated with The "
2082
  "Events Calendar plugin"
2083
  msgstr ""
2084
 
2085
- #: admin/html/whats-new.php:593
2086
  msgid "Post Submission Facility From Account Page"
2087
  msgstr ""
2088
 
2089
- #: admin/html/whats-new.php:595
2090
  msgid ""
2091
  "On the frontend account page, added a new menu item named <b>Submit "
2092
  "Post</b>. Now admin can allow users to submit post from their default "
@@ -2095,504 +2115,504 @@ msgid ""
2095
  "you can assign any post form that will use to submit posts."
2096
  msgstr ""
2097
 
2098
- #: admin/html/whats-new.php:598
2099
  msgid "Login/Lost Password Link Under Registration Form"
2100
  msgstr ""
2101
 
2102
- #: admin/html/whats-new.php:600
2103
  msgid "Added Login/Lost Password link under registration form"
2104
  msgstr ""
2105
 
2106
- #: admin/html/whats-new.php:609
2107
  msgid "Added drag and drop image ordering on image upload"
2108
  msgstr ""
2109
 
2110
- #: admin/html/whats-new.php:611
2111
  msgid ""
2112
  "Now frontend users can drag & drop the images/files to change the order "
2113
  "while uploading."
2114
  msgstr ""
2115
 
2116
- #: admin/html/whats-new.php:614
2117
  msgid "Added reCAPTCHA field in login form"
2118
  msgstr ""
2119
 
2120
- #: admin/html/whats-new.php:616
2121
  msgid ""
2122
  "Admin has the option to show reCAPTCHA field in login form. Check the "
2123
  "related settings from <strong>User Frontend > Settings > "
2124
  "Login/Registration</strong>"
2125
  msgstr ""
2126
 
2127
- #: admin/html/whats-new.php:619
2128
  msgid "Added preview option in forms"
2129
  msgstr ""
2130
 
2131
- #: admin/html/whats-new.php:621
2132
  msgid ""
2133
  "You can see a nice <strong>Preview</strong> button with <strong>Save "
2134
  "Form</strong> button, admin can take a quick look of the form without using "
2135
  "shortcode"
2136
  msgstr ""
2137
 
2138
- #: admin/html/whats-new.php:624
2139
  msgid "Fixed hiding “Select Image” button while uploading multiple images."
2140
  msgstr ""
2141
 
2142
- #: admin/html/whats-new.php:626
2143
  msgid ""
2144
  "The upload button will not be hidden until the user selects max number of "
2145
  "files "
2146
  msgstr ""
2147
 
2148
- #: admin/html/whats-new.php:629
2149
  msgid "Added form limit notice before form submission"
2150
  msgstr ""
2151
 
2152
- #: admin/html/whats-new.php:631
2153
  msgid ""
2154
  "Limit notice message was showing after submission, now it is showing when "
2155
  "rendering the form"
2156
  msgstr ""
2157
 
2158
- #: admin/html/whats-new.php:634
2159
  msgid "Fixed: default post category not saving"
2160
  msgstr ""
2161
 
2162
- #: admin/html/whats-new.php:636
2163
  msgid ""
2164
  "From the form <strong>Settings > Post Settings</strong>, default post "
2165
  "category options were not saving. Now, it's fixed."
2166
  msgstr ""
2167
 
2168
- #: admin/html/whats-new.php:639
2169
  msgid ""
2170
  "WPUF dashboard shortcode with form_id attribute was not showing posts "
2171
  "properly"
2172
  msgstr ""
2173
 
2174
- #: admin/html/whats-new.php:641
2175
  msgid ""
2176
  "Now you can list posts on the frontend by using <strong>form_id<strong/> "
2177
  "attribute with <strong>[wpuf_dashboard]</strong> shortcode"
2178
  msgstr ""
2179
 
2180
- #: admin/html/whats-new.php:650
2181
  msgid "Changed text domain to `wp-user-frontend` from `wpuf` "
2182
  msgstr ""
2183
 
2184
- #: admin/html/whats-new.php:652
2185
  msgid ""
2186
  "If you are using other language than English. Please <b>rename</b> your "
2187
  "<i>.po and .mo </i> files to `wp-user-frontend_` from `wpuf_` <br> This "
2188
  "change was made to support translations from translate.wordpress.org"
2189
  msgstr ""
2190
 
2191
- #: admin/html/whats-new.php:655
2192
  msgid "Added WP User Frontend Data export and erase functionality."
2193
  msgstr ""
2194
 
2195
- #: admin/html/whats-new.php:657
2196
  msgid "Added functionality to export WP User Frontend Data to comply with GDPR."
2197
  msgstr ""
2198
 
2199
- #: admin/html/whats-new.php:660
2200
  msgid "Added billing address customizer."
2201
  msgstr ""
2202
 
2203
- #: admin/html/whats-new.php:662
2204
  msgid "Added customizer options for billing address in payment page."
2205
  msgstr ""
2206
 
2207
- #: admin/html/whats-new.php:665
2208
  msgid "Make the payment page responsive."
2209
  msgstr ""
2210
 
2211
- #: admin/html/whats-new.php:667
2212
  msgid "Some css adjustments are made in payment page to make it responsive."
2213
  msgstr ""
2214
 
2215
- #: admin/html/whats-new.php:670
2216
  msgid "Fixed image upload issue in Safari."
2217
  msgstr ""
2218
 
2219
- #: admin/html/whats-new.php:672
2220
  msgid "Images were not showing after upload in safari, it is fixed now."
2221
  msgstr ""
2222
 
2223
- #: admin/html/whats-new.php:675
2224
  msgid "Post update issue after updating or removing post images."
2225
  msgstr ""
2226
 
2227
- #: admin/html/whats-new.php:677
2228
  msgid ""
2229
  "Posts cannot be updated after updating or removing post images, it is fixed "
2230
  "now."
2231
  msgstr ""
2232
 
2233
- #: admin/html/whats-new.php:686
2234
  msgid "Allow overriding form input styles using theme styling."
2235
  msgstr ""
2236
 
2237
- #: admin/html/whats-new.php:688
2238
  msgid "Overriding form input styles using theme style is now possible."
2239
  msgstr ""
2240
 
2241
- #: admin/html/whats-new.php:691
2242
  msgid "Fixed Auto Login after registration."
2243
  msgstr ""
2244
 
2245
- #: admin/html/whats-new.php:693
2246
  msgid "Auto Login after registration was not working is fixed now."
2247
  msgstr ""
2248
 
2249
- #: admin/html/whats-new.php:696
2250
  msgid "Fixed fallback cost calculation"
2251
  msgstr ""
2252
 
2253
- #: admin/html/whats-new.php:698
2254
  msgid "Fallback cost calculation was inaccurate for some cases, it is fixed now."
2255
  msgstr ""
2256
 
2257
- #: admin/html/whats-new.php:701
2258
  msgid "Removal of subscription from User Profile gets reverted if updated"
2259
  msgstr ""
2260
 
2261
- #: admin/html/whats-new.php:703
2262
  msgid "User subscription deletion gets reverted if updated is fixed."
2263
  msgstr ""
2264
 
2265
- #: admin/html/whats-new.php:706
2266
  msgid "Show Free pack users in subscribers list."
2267
  msgstr ""
2268
 
2269
- #: admin/html/whats-new.php:708
2270
  msgid "Free pack users were not showing in subscribers list, now they will."
2271
  msgstr ""
2272
 
2273
- #: admin/html/whats-new.php:717
2274
  msgid "WP User Frontend Guten Block is added"
2275
  msgstr ""
2276
 
2277
- #: admin/html/whats-new.php:719
2278
  msgid ""
2279
  "WPUF Form Block is now available to be used within gutenberg editor with "
2280
  "preview of the form. "
2281
  msgstr ""
2282
 
2283
- #: admin/html/whats-new.php:722
2284
  msgid "Advanced Custom Fields plugin compatibility"
2285
  msgstr ""
2286
 
2287
- #: admin/html/whats-new.php:724
2288
  msgid "Now all your ACF fields can be used within WPUF Post forms. "
2289
  msgstr ""
2290
 
2291
- #: admin/html/whats-new.php:727
2292
  msgid "Taxonomy Terms not showing for custom post types"
2293
  msgstr ""
2294
 
2295
- #: admin/html/whats-new.php:729
2296
  msgid ""
2297
  "Fixed an issue with taxonomy terms not appearing for Custom Post types "
2298
  "within Form Settings and Dashboard Post Listing"
2299
  msgstr ""
2300
 
2301
- #: admin/html/whats-new.php:732
2302
  msgid "Various other code optimizations"
2303
  msgstr ""
2304
 
2305
- #: admin/html/whats-new.php:734 admin/html/whats-new.php:791
2306
  msgid "Code structure organization and optimization for better performance"
2307
  msgstr ""
2308
 
2309
- #: admin/html/whats-new.php:743
2310
  msgid "WoooCommerce billing address Sync"
2311
  msgstr ""
2312
 
2313
- #: admin/html/whats-new.php:745
2314
  msgid ""
2315
  "If an existing customer has previously set his billing address, that will "
2316
  "be imported into WPUF Billing address "
2317
  msgstr ""
2318
 
2319
- #: admin/html/whats-new.php:748
2320
  msgid "Trial subscription message not showing properly"
2321
  msgstr ""
2322
 
2323
- #: admin/html/whats-new.php:750
2324
  msgid "Subscriptions with Trial now shows trial notices"
2325
  msgstr ""
2326
 
2327
- #: admin/html/whats-new.php:753
2328
  msgid "Reset email Key not working"
2329
  msgstr ""
2330
 
2331
- #: admin/html/whats-new.php:755
2332
  msgid "Reset Email key was not working in some cases"
2333
  msgstr ""
2334
 
2335
- #: admin/html/whats-new.php:758
2336
  msgid "Post count not showing on the frontend dashboard"
2337
  msgstr ""
2338
 
2339
- #: admin/html/whats-new.php:760
2340
  msgid ""
2341
  "Dashboard with multiple post type was not showing post counts properly, is "
2342
  "now fixed and shows count for each post type"
2343
  msgstr ""
2344
 
2345
- #: admin/html/whats-new.php:763
2346
  msgid "Login Redirect showing blank page is fixed"
2347
  msgstr ""
2348
 
2349
- #: admin/html/whats-new.php:765
2350
  msgid ""
2351
  "If \"Previous Page\" was set for redirection, login redirect was "
2352
  "redirecting to blank page for users who hit login page directly"
2353
  msgstr ""
2354
 
2355
- #: admin/html/whats-new.php:774
2356
  msgid "Enhanced Login Redirect to redirect users to previous page"
2357
  msgstr ""
2358
 
2359
- #: admin/html/whats-new.php:776
2360
  msgid ""
2361
  "You can choose Previous Page as Login Redirect page settings now to "
2362
  "redirect users to the page from which they went for Login. "
2363
  msgstr ""
2364
 
2365
- #: admin/html/whats-new.php:779
2366
  msgid "Email HTML links not Rendreing properly issue is fixed"
2367
  msgstr ""
2368
 
2369
- #: admin/html/whats-new.php:781
2370
  msgid ""
2371
  "For some clients emails were not rendering the HTML links properly, this is "
2372
  "now fixed"
2373
  msgstr ""
2374
 
2375
- #: admin/html/whats-new.php:784
2376
  msgid "Form Builder : Form Field's Help text styles not showing properly"
2377
  msgstr ""
2378
 
2379
- #: admin/html/whats-new.php:786
2380
  msgid "Help texts styling is now fixed and much easier to read and understand"
2381
  msgstr ""
2382
 
2383
- #: admin/html/whats-new.php:789
2384
  msgid "Various other code improvements"
2385
  msgstr ""
2386
 
2387
- #: admin/html/whats-new.php:800
2388
  msgid "Dashboard Post Listing now supports multiple post types"
2389
  msgstr ""
2390
 
2391
- #: admin/html/whats-new.php:802
2392
  msgid ""
2393
  "Now you can show multiple post type in user dashboard using shortcode like "
2394
  "this : <br><b>[wpuf_dashboard post_type=\"post,page,custom_type\"]</b> "
2395
  msgstr ""
2396
 
2397
- #: admin/html/whats-new.php:805
2398
  msgid "Added Login Redirect Settings"
2399
  msgstr ""
2400
 
2401
- #: admin/html/whats-new.php:807
2402
  msgid ""
2403
  "You can now set a page from <i>WPUF Settings > Login/Registration > "
2404
  "Redirect after Login</i>. When login redirection is active the user will be "
2405
  "redirected to this page after login."
2406
  msgstr ""
2407
 
2408
- #: admin/html/whats-new.php:810
2409
  msgid "Image Upload field button text can be changed"
2410
  msgstr ""
2411
 
2412
- #: admin/html/whats-new.php:812
2413
  msgid ""
2414
  "The upload button text can now be changed for image upload fields which "
2415
  "defaults to \"Select Image\" if not set. "
2416
  msgstr ""
2417
 
2418
- #: admin/html/whats-new.php:815
2419
  msgid "Multi Step Form styles made compatible with more themes"
2420
  msgstr ""
2421
 
2422
- #: admin/html/whats-new.php:817
2423
  msgid "Multi Step form can now be styled more easily with other themes "
2424
  msgstr ""
2425
 
2426
- #: admin/html/whats-new.php:820
2427
  msgid "Required field condition for google map not working is fixed"
2428
  msgstr ""
2429
 
2430
- #: admin/html/whats-new.php:822
2431
  msgid ""
2432
  "If Google Map field was set as required users were able to submit form "
2433
  "without changing the default value."
2434
  msgstr ""
2435
 
2436
- #: admin/html/whats-new.php:831
2437
  msgid "Admin form builder is now fully responsive."
2438
  msgstr ""
2439
 
2440
- #: admin/html/whats-new.php:833
2441
  msgid ""
2442
  "Now you can edit forms from your mobile devices directly. Our improved "
2443
  "responsive layouts of form builder makes it easy for you to build forms on "
2444
  "the go."
2445
  msgstr ""
2446
 
2447
- #: admin/html/whats-new.php:836
2448
  msgid "Added color schemes for creating attractive form layouts."
2449
  msgstr ""
2450
 
2451
- #: admin/html/whats-new.php:838
2452
  msgid ""
2453
  "We have added 3 new color schemes for the form layouts which you can choose "
2454
  "from each form's new display settings."
2455
  msgstr ""
2456
 
2457
- #: admin/html/whats-new.php:841
2458
  msgid "Restrict Free subscription pack to be enabled multiple times "
2459
  msgstr ""
2460
 
2461
- #: admin/html/whats-new.php:843
2462
  msgid ""
2463
  "Free subscription packs now can only be purchased once and the limit "
2464
  "applies properly"
2465
  msgstr ""
2466
 
2467
- #: admin/html/whats-new.php:846
2468
  msgid "Various other bug fixes and improvements were made "
2469
  msgstr ""
2470
 
2471
- #: admin/html/whats-new.php:848
2472
  msgid "Please see the change log to see full details."
2473
  msgstr ""
2474
 
2475
- #: admin/html/whats-new.php:857
2476
  msgid "Added upgrade function for default category"
2477
  msgstr ""
2478
 
2479
- #: admin/html/whats-new.php:859
2480
  msgid "Upgrader added to upgrade previously set default post category."
2481
  msgstr ""
2482
 
2483
- #: admin/html/whats-new.php:862
2484
  msgid "Subscription pack cannot be canceled"
2485
  msgstr ""
2486
 
2487
- #: admin/html/whats-new.php:864
2488
  msgid ""
2489
  "Fixed recurring subscription pack cannot be canceled from my account page "
2490
  "in subscription details section."
2491
  msgstr ""
2492
 
2493
- #: admin/html/whats-new.php:867
2494
  msgid "page installer admin notice logic issue"
2495
  msgstr ""
2496
 
2497
- #: admin/html/whats-new.php:869
2498
  msgid ""
2499
  "Fixed page installer admin notice logic problem due to new payment settings "
2500
  "default value not set."
2501
  msgstr ""
2502
 
2503
- #: admin/html/whats-new.php:879
2504
  msgid "Setup Wizard"
2505
  msgstr ""
2506
 
2507
- #: admin/html/whats-new.php:881
2508
  msgid "Setup Wizard added to turn off payment options and install pages."
2509
  msgstr ""
2510
 
2511
- #: admin/html/whats-new.php:885
2512
  msgid "Multi-select Category"
2513
  msgstr ""
2514
 
2515
- #: admin/html/whats-new.php:887
2516
  msgid "Add multi-select to default category in post form settings."
2517
  msgstr ""
2518
 
2519
- #: admin/html/whats-new.php:891
2520
  msgid "Select Text option for Taxonomy"
2521
  msgstr ""
2522
 
2523
- #: admin/html/whats-new.php:893
2524
  msgid ""
2525
  "Add Select Text option for taxonomy fields. Now you can add default text "
2526
  "with empty value as first option for Taxonomy dropdown."
2527
  msgstr ""
2528
 
2529
- #: admin/html/whats-new.php:896
2530
  msgid "Taxonomy Checkbox Inline"
2531
  msgstr ""
2532
 
2533
- #: admin/html/whats-new.php:898
2534
  msgid ""
2535
  "Added checkbox inline option to taxonomy checkbox. You can now display "
2536
  "Taxonomy checkbox fields inline."
2537
  msgstr ""
2538
 
2539
- #: admin/html/whats-new.php:908
2540
  msgid "Manage schedule for form submission"
2541
  msgstr ""
2542
 
2543
- #: admin/html/whats-new.php:910
2544
  msgid ""
2545
  "Do not accept form submission if the current date is not between the date "
2546
  "range of the schedule."
2547
  msgstr ""
2548
 
2549
- #: admin/html/whats-new.php:914
2550
  msgid "Restrict form submission based on the user roles"
2551
  msgstr ""
2552
 
2553
- #: admin/html/whats-new.php:916
2554
  msgid ""
2555
  "Restrict form submission based on the user roles. Now you can manage user "
2556
  "role base permission on form submission."
2557
  msgstr ""
2558
 
2559
- #: admin/html/whats-new.php:920
2560
  msgid "Limit how many entries a form will accept"
2561
  msgstr ""
2562
 
2563
- #: admin/html/whats-new.php:922
2564
  msgid ""
2565
  "Limit how many entries a form will accept and display a custom message when "
2566
  "that limit is reached."
2567
  msgstr ""
2568
 
2569
- #: admin/html/whats-new.php:926
2570
  msgid "Show/hide Admin Bar"
2571
  msgstr ""
2572
 
2573
- #: admin/html/whats-new.php:928
2574
  msgid "Control the admin bar visibility based on user roles."
2575
  msgstr ""
2576
 
2577
- #: admin/html/whats-new.php:932
2578
  msgid "Ajax Login widget"
2579
  msgstr ""
2580
 
2581
- #: admin/html/whats-new.php:934
2582
  msgid ""
2583
  "Login user is more simple now with Ajax Login Widget. The simple ajax login "
2584
  "form do not required page loading for login."
2585
  msgstr ""
2586
 
2587
- #: admin/html/whats-new.php:938
2588
  msgid "Form submission with Captcha field"
2589
  msgstr ""
2590
 
2591
- #: admin/html/whats-new.php:940
2592
  msgid "Form field validation process updated if form submits with captcha field."
2593
  msgstr ""
2594
 
2595
- #: admin/html/whats-new.php:954
2596
  msgid "What's New in WPUF?"
2597
  msgstr ""
2598
 
@@ -2615,7 +2635,7 @@ msgid "Congratulations!"
2615
  msgstr ""
2616
 
2617
  #: admin/installer.php:84 admin/settings-options.php:24
2618
- #: includes/free/admin/shortcode-button.php:79 wpuf-functions.php:1961
2619
  msgid "Dashboard"
2620
  msgstr ""
2621
 
@@ -2628,10 +2648,10 @@ msgstr ""
2628
  msgid "Login"
2629
  msgstr ""
2630
 
2631
- #: admin/installer.php:95 class/subscription.php:381 class/subscription.php:401
2632
- #: class/subscription.php:402 class/subscription.php:403
2633
  #: includes/free/admin/shortcode-button.php:99
2634
- #: templates/dashboard/dashboard.php:19 wpuf-functions.php:1964
2635
  msgid "Subscription"
2636
  msgstr ""
2637
 
@@ -3090,469 +3110,477 @@ msgstr ""
3090
  msgid "Previous Page"
3091
  msgstr ""
3092
 
3093
- #: admin/settings-options.php:88
3094
  msgid "Show Admin Bar"
3095
  msgstr ""
3096
 
3097
- #: admin/settings-options.php:89
3098
  msgid "Select user by roles, who can view admin bar in frontend."
3099
  msgstr ""
3100
 
3101
- #: admin/settings-options.php:96
3102
  msgid "Admin area access"
3103
  msgstr ""
3104
 
3105
- #: admin/settings-options.php:97
3106
  msgid "Allow you to block specific user role to Ajax request and Media upload."
3107
  msgstr ""
3108
 
3109
- #: admin/settings-options.php:101
3110
  msgid "Admin Only"
3111
  msgstr ""
3112
 
3113
- #: admin/settings-options.php:102
3114
  msgid "Admins, Editors"
3115
  msgstr ""
3116
 
3117
- #: admin/settings-options.php:103
3118
  msgid "Admins, Editors, Authors"
3119
  msgstr ""
3120
 
3121
- #: admin/settings-options.php:104
3122
  msgid "Admins, Editors, Authors, Contributors"
3123
  msgstr ""
3124
 
3125
- #: admin/settings-options.php:105
3126
  msgid "Default"
3127
  msgstr ""
3128
 
3129
- #: admin/settings-options.php:110
3130
  msgid "Override the post edit link"
3131
  msgstr ""
3132
 
3133
- #: admin/settings-options.php:111
3134
  msgid ""
3135
  "Users see the edit link in post if s/he is capable to edit the post/page. "
3136
  "Selecting <strong>Yes</strong> will override the default WordPress edit "
3137
  "post link in frontend"
3138
  msgstr ""
3139
 
3140
- #: admin/settings-options.php:121
3141
  msgid "ACF Compatibility"
3142
  msgstr ""
3143
 
3144
- #: admin/settings-options.php:122
3145
  msgid ""
3146
  "Select <strong>Yes</strong> if you want to make compatible WPUF custom "
3147
  "fields data with advanced custom fields."
3148
  msgstr ""
3149
 
3150
- #: admin/settings-options.php:132
3151
  msgid "Load Scripts"
3152
  msgstr ""
3153
 
3154
- #: admin/settings-options.php:133
3155
  msgid "Load scripts/styles in all pages"
3156
  msgstr ""
3157
 
3158
- #: admin/settings-options.php:139
3159
  msgid "reCAPTCHA Site Key"
3160
  msgstr ""
3161
 
3162
- #: admin/settings-options.php:143
3163
  msgid "reCAPTCHA Secret Key"
3164
  msgstr ""
3165
 
3166
- #: admin/settings-options.php:144
3167
  msgid ""
3168
  "<a target=\"_blank\" href=\"https://www.google.com/recaptcha/\">Register "
3169
  "here</a> to get reCaptcha Site and Secret keys."
3170
  msgstr ""
3171
 
3172
- #: admin/settings-options.php:148
3173
  msgid "Custom CSS codes"
3174
  msgstr ""
3175
 
3176
- #: admin/settings-options.php:149
3177
  msgid ""
3178
  "If you want to add your custom CSS code, it will be added on page header "
3179
  "wrapped with style tag"
3180
  msgstr ""
3181
 
3182
- #: admin/settings-options.php:156
3183
  msgid "Edit Page"
3184
  msgstr ""
3185
 
3186
- #: admin/settings-options.php:157
3187
  msgid "Select the page where <code>[wpuf_edit]</code> is located"
3188
  msgstr ""
3189
 
3190
- #: admin/settings-options.php:163
3191
  msgid "Default Post Owner"
3192
  msgstr ""
3193
 
3194
- #: admin/settings-options.php:164
3195
  msgid ""
3196
  "If guest post is enabled and user details are OFF, the posts are assigned "
3197
  "to this user"
3198
  msgstr ""
3199
 
3200
- #: admin/settings-options.php:171
3201
  msgid "Custom Fields in post"
3202
  msgstr ""
3203
 
3204
- #: admin/settings-options.php:172
3205
  msgid "Show custom fields on post content area"
3206
  msgstr ""
3207
 
3208
- #: admin/settings-options.php:178
3209
  msgid "Insert Photo image size"
3210
  msgstr ""
3211
 
3212
- #: admin/settings-options.php:179
3213
  msgid ""
3214
  "Default image size of \"<strong>Insert Photo</strong>\" button in post "
3215
  "content area"
3216
  msgstr ""
3217
 
3218
- #: admin/settings-options.php:186
3219
  msgid "Insert Photo image type"
3220
  msgstr ""
3221
 
3222
- #: admin/settings-options.php:187
3223
  msgid ""
3224
  "Default image type of \"<strong>Insert Photo</strong>\" button in post "
3225
  "content area"
3226
  msgstr ""
3227
 
3228
- #: admin/settings-options.php:190
3229
  msgid "Image only"
3230
  msgstr ""
3231
 
3232
- #: admin/settings-options.php:191
3233
  msgid "Image with link"
3234
  msgstr ""
3235
 
3236
- #: admin/settings-options.php:197
3237
  msgid "Enable Image Caption"
3238
  msgstr ""
3239
 
3240
- #: admin/settings-options.php:198
3241
  msgid "Allow users to update image/video title, caption and description"
3242
  msgstr ""
3243
 
3244
- #: admin/settings-options.php:204
3245
  msgid "Default Post Form"
3246
  msgstr ""
3247
 
3248
- #: admin/settings-options.php:205
3249
  msgid "Fallback form for post editing if no associated form found"
3250
  msgstr ""
3251
 
3252
- #: admin/settings-options.php:213
3253
  msgid "Users can edit post?"
3254
  msgstr ""
3255
 
3256
- #: admin/settings-options.php:214
3257
  msgid "Users will be able to edit their own posts"
3258
  msgstr ""
3259
 
3260
- #: admin/settings-options.php:224
3261
  msgid "User can delete post?"
3262
  msgstr ""
3263
 
3264
- #: admin/settings-options.php:225
3265
  msgid "Users will be able to delete their own posts"
3266
  msgstr ""
3267
 
3268
- #: admin/settings-options.php:235
3269
  msgid "Pending Post Edit"
3270
  msgstr ""
3271
 
3272
- #: admin/settings-options.php:236
3273
  msgid "Disable post editing while post in \"pending\" status"
3274
  msgstr ""
3275
 
3276
- #: admin/settings-options.php:242
3277
  msgid "Posts per page"
3278
  msgstr ""
3279
 
3280
- #: admin/settings-options.php:243
3281
  msgid "How many posts will be listed in a page"
3282
  msgstr ""
3283
 
3284
- #: admin/settings-options.php:249
3285
  msgid "Show user bio"
3286
  msgstr ""
3287
 
3288
- #: admin/settings-options.php:250
3289
  msgid "Users biographical info will be shown"
3290
  msgstr ""
3291
 
3292
- #: admin/settings-options.php:256
3293
  msgid "Show post count"
3294
  msgstr ""
3295
 
3296
- #: admin/settings-options.php:257
3297
  msgid "Show how many posts are created by the user"
3298
  msgstr ""
3299
 
3300
- #: admin/settings-options.php:263
3301
  msgid "Show Featured Image"
3302
  msgstr ""
3303
 
3304
- #: admin/settings-options.php:264
3305
  msgid "Show featured image of the post (Overridden by Shortcode)"
3306
  msgstr ""
3307
 
3308
- #: admin/settings-options.php:269
3309
  msgid "Show Payment Column"
3310
  msgstr ""
3311
 
3312
- #: admin/settings-options.php:270
3313
  msgid "Enable if you want show payment column on posts table"
3314
  msgstr ""
3315
 
3316
- #: admin/settings-options.php:276
3317
  msgid "Featured Image size"
3318
  msgstr ""
3319
 
3320
- #: admin/settings-options.php:290
3321
  msgid "Account Page"
3322
  msgstr ""
3323
 
3324
- #: admin/settings-options.php:291
3325
  msgid "Select the page which contains <code>[wpuf_account]</code> shortcode"
3326
  msgstr ""
3327
 
3328
- #: admin/settings-options.php:297
3329
  msgid "Active Tab"
3330
  msgstr ""
3331
 
3332
- #: admin/settings-options.php:298
3333
  msgid "Which tab should be set as active by default when opening the account page"
3334
  msgstr ""
3335
 
3336
- #: admin/settings-options.php:304
3337
  msgid "Show Subscriptions"
3338
  msgstr ""
3339
 
3340
- #: admin/settings-options.php:305
3341
  msgid ""
3342
  "Show Subscriptions tab in \"my account\" page where "
3343
  "<code>[wpuf_account]</code> is located"
3344
  msgstr ""
3345
 
3346
- #: admin/settings-options.php:311 includes/class-customizer.php:21
3347
  #: includes/class-customizer.php:65
3348
  msgid "Show Billing Address"
3349
  msgstr ""
3350
 
3351
- #: admin/settings-options.php:312
3352
  msgid "Show billing address in account page."
3353
  msgstr ""
3354
 
3355
- #: admin/settings-options.php:320
3356
  msgid "Auto Login After Registration"
3357
  msgstr ""
3358
 
3359
- #: admin/settings-options.php:321
3360
  msgid "If enabled, users after registration will be logged in to the system"
3361
  msgstr ""
3362
 
3363
- #: admin/settings-options.php:327
3364
  msgid "Login/Registration override"
3365
  msgstr ""
3366
 
3367
- #: admin/settings-options.php:328
3368
  msgid ""
3369
  "If enabled, default login and registration forms will be overridden by WPUF "
3370
  "with pages below"
3371
  msgstr ""
3372
 
3373
- #: admin/settings-options.php:334
3374
  msgid "Registration Page"
3375
  msgstr ""
3376
 
3377
- #: admin/settings-options.php:335
3378
  msgid ""
3379
  "Select the page you want to use as registration page override <em>(should "
3380
  "have shortcode)</em>"
3381
  msgstr ""
3382
 
3383
- #: admin/settings-options.php:341
3384
  msgid "Login Page"
3385
  msgstr ""
3386
 
3387
- #: admin/settings-options.php:342
3388
  msgid "Select the page which contains <code>[wpuf-login]</code> shortcode"
3389
  msgstr ""
3390
 
3391
- #: admin/settings-options.php:348
3392
  msgid "Redirect After Login"
3393
  msgstr ""
3394
 
3395
- #: admin/settings-options.php:349
3396
  msgid "After successfull login, where the page will redirect to"
3397
  msgstr ""
3398
 
3399
- #: admin/settings-options.php:355
3400
  msgid "Default Login Redirect"
3401
  msgstr ""
3402
 
3403
- #: admin/settings-options.php:356
3404
  msgid ""
3405
  "If enabled, users who login using WordPress default login form will be "
3406
  "redirected to the selected page."
3407
  msgstr ""
3408
 
3409
- #: admin/settings-options.php:362
3410
  msgid "reCAPTCHA in Login Form"
3411
  msgstr ""
3412
 
3413
- #: admin/settings-options.php:363
3414
  msgid ""
3415
  "If enabled, users have to verify reCAPTCHA in login page. Also, make sure "
3416
  "that reCAPTCHA is configured properly from <b>General Options</b>"
3417
  msgstr ""
3418
 
3419
- #: admin/settings-options.php:372
3420
  msgid "Enable payments on your site."
3421
  msgstr ""
3422
 
3423
- #: admin/settings-options.php:378
3424
  msgid "Subscription Pack Page"
3425
  msgstr ""
3426
 
3427
- #: admin/settings-options.php:379
3428
  msgid "Select the page where <code>[wpuf_sub_pack]</code> located."
3429
  msgstr ""
3430
 
3431
- #: admin/settings-options.php:385
3432
  msgid "Subscription at registration"
3433
  msgstr ""
3434
 
3435
- #: admin/settings-options.php:386
3436
  msgid "Registration time redirect to subscription page"
3437
  msgstr ""
3438
 
3439
- #: admin/settings-options.php:391
3440
  msgid "Currency"
3441
  msgstr ""
3442
 
3443
- #: admin/settings-options.php:398
3444
  msgid "Currency Position"
3445
  msgstr ""
3446
 
3447
- #: admin/settings-options.php:402
3448
  msgid "Left"
3449
  msgstr ""
3450
 
3451
- #: admin/settings-options.php:403
3452
  msgid "Right"
3453
  msgstr ""
3454
 
3455
- #: admin/settings-options.php:404
3456
  msgid "Left with space"
3457
  msgstr ""
3458
 
3459
- #: admin/settings-options.php:405
3460
  msgid "Right with space"
3461
  msgstr ""
3462
 
3463
- #: admin/settings-options.php:410
3464
  msgid "Thousand Separator"
3465
  msgstr ""
3466
 
3467
- #: admin/settings-options.php:411
3468
  msgid "This sets the thousand separator of displayed prices."
3469
  msgstr ""
3470
 
3471
- #: admin/settings-options.php:419
3472
  msgid "Decimal Separator"
3473
  msgstr ""
3474
 
3475
- #: admin/settings-options.php:420
3476
  msgid "This sets the decimal separator of displayed prices."
3477
  msgstr ""
3478
 
3479
- #: admin/settings-options.php:427
3480
  msgid "Number of Decimals"
3481
  msgstr ""
3482
 
3483
- #: admin/settings-options.php:428
3484
  msgid "This sets the number of decimal points shown in displayed prices."
3485
  msgstr ""
3486
 
3487
- #: admin/settings-options.php:438
3488
  msgid "Enable demo/sandbox mode"
3489
  msgstr ""
3490
 
3491
- #: admin/settings-options.php:439
3492
  msgid "When sandbox mode is active, all payment gateway will be used in demo mode"
3493
  msgstr ""
3494
 
3495
- #: admin/settings-options.php:445
3496
  msgid "Payment Page"
3497
  msgstr ""
3498
 
3499
- #: admin/settings-options.php:446
3500
  msgid "This page will be used to process payment options"
3501
  msgstr ""
3502
 
3503
- #: admin/settings-options.php:452
3504
  msgid "Payment Success Page"
3505
  msgstr ""
3506
 
3507
- #: admin/settings-options.php:453 lib/gateway/bank.php:36
3508
  msgid "After payment users will be redirected here"
3509
  msgstr ""
3510
 
3511
- #: admin/settings-options.php:459
3512
  msgid "Payment Gateways"
3513
  msgstr ""
3514
 
3515
- #: admin/settings-options.php:460
3516
  msgid "Active payment gateways"
3517
  msgstr ""
3518
 
3519
- #: admin/settings-options.php:468
 
 
 
 
 
 
 
 
3520
  msgid "<span class=\"dashicons dashicons-universal-access-alt\"></span> Guest Email"
3521
  msgstr ""
3522
 
3523
- #: admin/settings-options.php:474
3524
  msgid "Guest mail subject"
3525
  msgstr ""
3526
 
3527
- #: admin/settings-options.php:475
3528
  msgid "This sets the subject of the emails sent to guest users"
3529
  msgstr ""
3530
 
3531
- #: admin/settings-options.php:482
3532
  msgid "Guest mail body"
3533
  msgstr ""
3534
 
3535
- #: admin/settings-options.php:483
3536
  msgid ""
3537
  "This sets the body of the emails sent to guest users. Please DON'T edit the "
3538
  "<code>{activation_link}</code> part, you can use {sitename} too."
3539
  msgstr ""
3540
 
3541
- #: admin/settings-options.php:500
3542
  msgid "Post Types"
3543
  msgstr ""
3544
 
3545
- #: admin/settings-options.php:501
3546
  msgid "Select the post types you will allow users to export."
3547
  msgstr ""
3548
 
3549
- #: admin/settings-options.php:524
3550
  msgid ""
3551
  "Select profile/registration forms for user roles. These forms will be used "
3552
  "to populate extra edit profile fields in backend."
3553
  msgstr ""
3554
 
3555
- #: admin/settings-options.php:534
3556
  msgid " - select - "
3557
  msgstr ""
3558
 
@@ -3859,7 +3887,7 @@ msgstr ""
3859
  #: class/upload.php:264 includes/fields/class-field-recaptcha.php:147
3860
  #: includes/fields/class-field-sectionbreak.php:55
3861
  #: templates/dashboard/posts.php:89 templates/dashboard.php:104
3862
- #: wpuf-functions.php:986
3863
  msgid "Title"
3864
  msgstr ""
3865
 
@@ -3876,7 +3904,7 @@ msgid "Enter the meta value"
3876
  msgstr ""
3877
 
3878
  #: admin/template.php:583 class/upload.php:266
3879
- #: includes/fields/class-field-sectionbreak.php:63 wpuf-functions.php:994
3880
  msgid "Description"
3881
  msgstr ""
3882
 
@@ -4063,7 +4091,7 @@ msgid "You already have activated a free package previously."
4063
  msgstr ""
4064
 
4065
  #: class/payment.php:146 includes/class-customizer.php:56
4066
- #: wpuf-functions.php:1965
4067
  msgid "Billing Address"
4068
  msgstr ""
4069
 
@@ -4245,7 +4273,7 @@ msgid "Strength indicator"
4245
  msgstr ""
4246
 
4247
  #: class/render-form.php:1401 includes/fields/class-field-post-taxonomy.php:127
4248
- #: wpuf-functions.php:1749
4249
  msgid "-- Select --"
4250
  msgstr ""
4251
 
@@ -4253,213 +4281,222 @@ msgstr ""
4253
  msgid "This field is no longer available."
4254
  msgstr ""
4255
 
4256
- #: class/render-form.php:1673 class/transactions-list-table.php:119
4257
- #: class/transactions-list-table.php:193 includes/free/edit-user.php:105
4258
  #: templates/dashboard/posts.php:186 templates/dashboard.php:277
4259
  msgid "Delete"
4260
  msgstr ""
4261
 
4262
- #: class/subscription.php:404
4263
  msgid "Add Subscription"
4264
  msgstr ""
4265
 
4266
- #: class/subscription.php:405
4267
  msgid "Add New Subscription"
4268
  msgstr ""
4269
 
4270
- #: class/subscription.php:407
4271
  msgid "Edit Subscription"
4272
  msgstr ""
4273
 
4274
- #: class/subscription.php:408
4275
  msgid "New Subscription"
4276
  msgstr ""
4277
 
4278
- #: class/subscription.php:409 class/subscription.php:410
4279
  msgid "View Subscription"
4280
  msgstr ""
4281
 
4282
- #: class/subscription.php:411
4283
  msgid "Search Subscription"
4284
  msgstr ""
4285
 
4286
- #: class/subscription.php:412
4287
  msgid "No Subscription Found"
4288
  msgstr ""
4289
 
4290
- #: class/subscription.php:413
4291
  msgid "No Subscription Found in Trash"
4292
  msgstr ""
4293
 
4294
- #: class/subscription.php:414
4295
  msgid "Parent Subscription"
4296
  msgstr ""
4297
 
4298
- #: class/subscription.php:751
4299
  msgid "Payment is complete"
4300
  msgstr ""
4301
 
4302
- #: class/subscription.php:751
4303
  msgid "Congratulations, your payment has been completed!"
4304
  msgstr ""
4305
 
4306
- #: class/subscription.php:755 class/subscription.php:759
4307
  msgid "Please buy a subscription pack to post"
4308
  msgstr ""
4309
 
4310
- #: class/subscription.php:777
4311
  msgid "<p><i>You have a subscription pack activated. </i></p>"
4312
  msgstr ""
4313
 
4314
- #: class/subscription.php:778
 
4315
  msgid "<p><i>Pack name: %s </i></p>"
4316
  msgstr ""
4317
 
4318
- #: class/subscription.php:780
4319
  msgid "To cancel the pack, press the following cancel button"
4320
  msgstr ""
4321
 
4322
- #: class/subscription.php:823
4323
  msgid "Day"
4324
  msgid_plural "Days"
4325
  msgstr[0] ""
4326
  msgstr[1] ""
4327
 
4328
- #: class/subscription.php:824
4329
  msgid "Week"
4330
  msgid_plural "Weeks"
4331
  msgstr[0] ""
4332
  msgstr[1] ""
4333
 
4334
- #: class/subscription.php:825
4335
  msgid "Month"
4336
  msgid_plural "Months"
4337
  msgstr[0] ""
4338
  msgstr[1] ""
4339
 
4340
- #: class/subscription.php:826
4341
  msgid "Year"
4342
  msgid_plural "Years"
4343
  msgstr[0] ""
4344
  msgstr[1] ""
4345
 
4346
- #: class/subscription.php:858
4347
  msgid "One time payment"
4348
  msgstr ""
4349
 
4350
- #: class/subscription.php:865
4351
  msgid "Every"
4352
  msgstr ""
4353
 
4354
- #: class/subscription.php:866
4355
  msgid "for"
4356
  msgstr ""
4357
 
4358
- #: class/subscription.php:866
4359
  msgid "installments"
4360
  msgstr ""
4361
 
4362
- #: class/subscription.php:872
4363
- msgid "Trial available for first %s %s"
 
4364
  msgstr ""
4365
 
4366
- #: class/subscription.php:876
4367
  msgid "Buy Now"
4368
  msgstr ""
4369
 
4370
- #: class/subscription.php:880
4371
  msgid "Sign Up"
4372
  msgstr ""
4373
 
4374
- #: class/subscription.php:944
 
4375
  msgid "There is a <strong>%s</strong> charge to add a new post."
4376
  msgstr ""
4377
 
4378
- #: class/subscription.php:960
 
4379
  msgid ""
4380
  "Your Subscription pack is exhausted. There is a <strong>%s</strong> charge "
4381
  "to add a new post."
4382
  msgstr ""
4383
 
4384
- #: class/subscription.php:1005
 
4385
  msgid "You must <a href=\"%s\">purchase a pack</a> before posting"
4386
  msgstr ""
4387
 
4388
- #: class/transactions-list-table.php:14
4389
  msgid "transaction"
4390
  msgstr ""
4391
 
4392
- #: class/transactions-list-table.php:15
4393
  msgid "transactions"
4394
  msgstr ""
4395
 
4396
- #: class/transactions-list-table.php:41
4397
  msgid "ID"
4398
  msgstr ""
4399
 
4400
- #: class/transactions-list-table.php:42
4401
  #: includes/class-list-table-subscribers.php:44
4402
  #: templates/dashboard/posts.php:90 templates/dashboard.php:131
4403
  msgid "Status"
4404
  msgstr ""
4405
 
4406
- #: class/transactions-list-table.php:43
4407
  msgid "User"
4408
  msgstr ""
4409
 
4410
- #: class/transactions-list-table.php:44
 
 
 
 
4411
  #: includes/free/post-form-templates/the_events_calendar.php:115
4412
  msgid "Cost"
4413
  msgstr ""
4414
 
4415
- #: class/transactions-list-table.php:45 includes/class-privacy.php:334
4416
  msgid "Tax"
4417
  msgstr ""
4418
 
4419
- #: class/transactions-list-table.php:46 includes/class-privacy.php:342
4420
  #: includes/class-privacy.php:413
4421
  msgid "Post ID"
4422
  msgstr ""
4423
 
4424
- #: class/transactions-list-table.php:47 includes/class-privacy.php:346
4425
  #: includes/class-privacy.php:466
4426
  msgid "Pack ID"
4427
  msgstr ""
4428
 
4429
- #: class/transactions-list-table.php:48
4430
  #: includes/class-list-table-subscribers.php:45
4431
  msgid "Gateway"
4432
  msgstr ""
4433
 
4434
- #: class/transactions-list-table.php:49
4435
  msgid "Payer"
4436
  msgstr ""
4437
 
4438
- #: class/transactions-list-table.php:51
4439
  msgid "Trans ID"
4440
  msgstr ""
4441
 
4442
- #: class/transactions-list-table.php:52 includes/free/form-element.php:13
4443
  msgid "Date"
4444
  msgstr ""
4445
 
4446
- #: class/transactions-list-table.php:88 wpuf-functions.php:64
4447
  msgid "Pending"
4448
  msgstr ""
4449
 
4450
- #: class/transactions-list-table.php:114 class/transactions-list-table.php:188
4451
  msgid "Accept"
4452
  msgstr ""
4453
 
4454
- #: class/transactions-list-table.php:115 class/transactions-list-table.php:189
4455
  msgid "Reject"
4456
  msgstr ""
4457
 
4458
- #: class/transactions-list-table.php:175
4459
  msgid "No transactions found."
4460
  msgstr ""
4461
 
4462
- #: class/upload.php:265 wpuf-functions.php:990
4463
  msgid "Caption"
4464
  msgstr ""
4465
 
@@ -4596,7 +4633,7 @@ msgstr ""
4596
 
4597
  #: includes/class-dokan-integration.php:34
4598
  #: includes/class-wc-vendors-integration.php:108
4599
- #: templates/dashboard/dashboard.php:15 wpuf-functions.php:1962
4600
  msgid "Posts"
4601
  msgstr ""
4602
 
@@ -5182,10 +5219,6 @@ msgstr ""
5182
  msgid "Payment Status"
5183
  msgstr ""
5184
 
5185
- #: includes/class-privacy.php:330
5186
- msgid "Subtotal"
5187
- msgstr ""
5188
-
5189
  #: includes/class-privacy.php:354 includes/free/edit-profile.php:111
5190
  msgid "Last Name"
5191
  msgstr ""
@@ -6580,263 +6613,263 @@ msgstr ""
6580
  msgid "Private"
6581
  msgstr ""
6582
 
6583
- #: wpuf-functions.php:210 wpuf-functions.php:1980
6584
  msgid "-- select --"
6585
  msgstr ""
6586
 
6587
- #: wpuf-functions.php:495
6588
  msgid "Images"
6589
  msgstr ""
6590
 
6591
- #: wpuf-functions.php:496
6592
  msgid "Audio"
6593
  msgstr ""
6594
 
6595
- #: wpuf-functions.php:497
6596
  msgid "Videos"
6597
  msgstr ""
6598
 
6599
- #: wpuf-functions.php:498
6600
  msgid "PDF"
6601
  msgstr ""
6602
 
6603
- #: wpuf-functions.php:499
6604
  msgid "Office Documents"
6605
  msgstr ""
6606
 
6607
- #: wpuf-functions.php:500
6608
  msgid "Zip Archives"
6609
  msgstr ""
6610
 
6611
- #: wpuf-functions.php:501
6612
  msgid "Executable Files"
6613
  msgstr ""
6614
 
6615
- #: wpuf-functions.php:502
6616
  msgid "CSV"
6617
  msgstr ""
6618
 
6619
- #: wpuf-functions.php:1013
6620
  msgid "Directions »"
6621
  msgstr ""
6622
 
6623
- #: wpuf-functions.php:1963
6624
  msgid "Edit Profile"
6625
  msgstr ""
6626
 
6627
- #: wpuf-functions.php:2092
6628
  msgid "United Arab Emirates Dirham"
6629
  msgstr ""
6630
 
6631
- #: wpuf-functions.php:2093
6632
  msgid "Australian Dollars"
6633
  msgstr ""
6634
 
6635
- #: wpuf-functions.php:2094
6636
  msgid "Argentine Peso"
6637
  msgstr ""
6638
 
6639
- #: wpuf-functions.php:2095
6640
  msgid "Bangladeshi Taka"
6641
  msgstr ""
6642
 
6643
- #: wpuf-functions.php:2096
6644
  msgid "Brazilian Real"
6645
  msgstr ""
6646
 
6647
- #: wpuf-functions.php:2097
6648
  msgid "Bulgarian Lev"
6649
  msgstr ""
6650
 
6651
- #: wpuf-functions.php:2098
6652
  msgid "Canadian Dollars"
6653
  msgstr ""
6654
 
6655
- #: wpuf-functions.php:2099
6656
  msgid "Chilean Peso"
6657
  msgstr ""
6658
 
6659
- #: wpuf-functions.php:2100
6660
  msgid "Chinese Yuan"
6661
  msgstr ""
6662
 
6663
- #: wpuf-functions.php:2101
6664
  msgid "Colombian Peso"
6665
  msgstr ""
6666
 
6667
- #: wpuf-functions.php:2102
6668
  msgid "Czech Koruna"
6669
  msgstr ""
6670
 
6671
- #: wpuf-functions.php:2103
6672
  msgid "Danish Krone"
6673
  msgstr ""
6674
 
6675
- #: wpuf-functions.php:2104
6676
  msgid "Dominican Peso"
6677
  msgstr ""
6678
 
6679
- #: wpuf-functions.php:2105
6680
  msgid "Algerian Dinar"
6681
  msgstr ""
6682
 
6683
- #: wpuf-functions.php:2106
6684
  msgid "Euros"
6685
  msgstr ""
6686
 
6687
- #: wpuf-functions.php:2107
6688
  msgid "Hong Kong Dollar"
6689
  msgstr ""
6690
 
6691
- #: wpuf-functions.php:2108
6692
  msgid "Croatia kuna"
6693
  msgstr ""
6694
 
6695
- #: wpuf-functions.php:2109
6696
  msgid "Hungarian Forint"
6697
  msgstr ""
6698
 
6699
- #: wpuf-functions.php:2110
6700
  msgid "Icelandic krona"
6701
  msgstr ""
6702
 
6703
- #: wpuf-functions.php:2111
6704
  msgid "Indonesia Rupiah"
6705
  msgstr ""
6706
 
6707
- #: wpuf-functions.php:2112
6708
  msgid "Indian Rupee"
6709
  msgstr ""
6710
 
6711
- #: wpuf-functions.php:2113
6712
  msgid "Nepali Rupee"
6713
  msgstr ""
6714
 
6715
- #: wpuf-functions.php:2114
6716
  msgid "Israeli Shekel"
6717
  msgstr ""
6718
 
6719
- #: wpuf-functions.php:2115
6720
  msgid "Japanese Yen"
6721
  msgstr ""
6722
 
6723
- #: wpuf-functions.php:2116
6724
  msgid "Lao Kip"
6725
  msgstr ""
6726
 
6727
- #: wpuf-functions.php:2117
6728
  msgid "South Korean Won"
6729
  msgstr ""
6730
 
6731
- #: wpuf-functions.php:2118
6732
  msgid "Malaysian Ringgits"
6733
  msgstr ""
6734
 
6735
- #: wpuf-functions.php:2119
6736
  msgid "Mexican Peso"
6737
  msgstr ""
6738
 
6739
- #: wpuf-functions.php:2120
6740
  msgid "Nigerian Naira"
6741
  msgstr ""
6742
 
6743
- #: wpuf-functions.php:2121
6744
  msgid "Norwegian Krone"
6745
  msgstr ""
6746
 
6747
- #: wpuf-functions.php:2122
6748
  msgid "New Zealand Dollar"
6749
  msgstr ""
6750
 
6751
- #: wpuf-functions.php:2123
6752
  msgid "Namibian dollar"
6753
  msgstr ""
6754
 
6755
- #: wpuf-functions.php:2124
6756
  msgid "Omani Rial"
6757
  msgstr ""
6758
 
6759
- #: wpuf-functions.php:2125
6760
  msgid "Iranian Rial"
6761
  msgstr ""
6762
 
6763
- #: wpuf-functions.php:2126
6764
  msgid "Pakistani Rupee"
6765
  msgstr ""
6766
 
6767
- #: wpuf-functions.php:2127
6768
  msgid "Paraguayan Guaraní"
6769
  msgstr ""
6770
 
6771
- #: wpuf-functions.php:2128
6772
  msgid "Philippine Pesos"
6773
  msgstr ""
6774
 
6775
- #: wpuf-functions.php:2129
6776
  msgid "Polish Zloty"
6777
  msgstr ""
6778
 
6779
- #: wpuf-functions.php:2130
6780
  msgid "Pounds Sterling"
6781
  msgstr ""
6782
 
6783
- #: wpuf-functions.php:2131
6784
  msgid "Romanian Leu"
6785
  msgstr ""
6786
 
6787
- #: wpuf-functions.php:2132
6788
  msgid "Russian Ruble"
6789
  msgstr ""
6790
 
6791
- #: wpuf-functions.php:2133
6792
  msgid "Saudi Riyal"
6793
  msgstr ""
6794
 
6795
- #: wpuf-functions.php:2134
6796
  msgid "Singapore Dollar"
6797
  msgstr ""
6798
 
6799
- #: wpuf-functions.php:2135
6800
  msgid "South African rand"
6801
  msgstr ""
6802
 
6803
- #: wpuf-functions.php:2136
6804
  msgid "Swedish Krona"
6805
  msgstr ""
6806
 
6807
- #: wpuf-functions.php:2137
6808
  msgid "Swiss Franc"
6809
  msgstr ""
6810
 
6811
- #: wpuf-functions.php:2138
6812
  msgid "Taiwan New Dollars"
6813
  msgstr ""
6814
 
6815
- #: wpuf-functions.php:2139
6816
  msgid "Thai Baht"
6817
  msgstr ""
6818
 
6819
- #: wpuf-functions.php:2140
6820
  msgid "Turkish Lira"
6821
  msgstr ""
6822
 
6823
- #: wpuf-functions.php:2141
6824
  msgid "US Dollar"
6825
  msgstr ""
6826
 
6827
- #: wpuf-functions.php:2142
6828
  msgid "Vietnamese Dong"
6829
  msgstr ""
6830
 
6831
- #: wpuf-functions.php:2143
6832
  msgid "Egyptian Pound"
6833
  msgstr ""
6834
 
6835
- #: wpuf-functions.php:2144
6836
  msgid "Jordanian dinar"
6837
  msgstr ""
6838
 
6839
- #: wpuf-functions.php:3017
6840
  msgid "None"
6841
  msgstr ""
6842
 
@@ -6963,7 +6996,7 @@ msgctxt "enhanced select"
6963
  msgid "Searching&hellip;"
6964
  msgstr ""
6965
 
6966
- #: wpuf-functions.php:1460
6967
  msgctxt "tag delimiter"
6968
  msgid ","
6969
  msgstr ""
2
  # This file is distributed under the GPL2 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP User Frontend 3.5.9\n"
6
  "Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
7
+ "POT-Creation-Date: 2020-12-11 06:17:23+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
143
  msgid "Subscription pack draft updated."
144
  msgstr ""
145
 
146
+ #: admin/class-admin-subscription.php:202 class/subscription.php:342
147
  msgid "Pack Name"
148
  msgstr ""
149
 
162
 
163
  #: admin/class-admin-subscription.php:226
164
  #: admin/class-admin-subscription.php:596 class/frontend-account.php:243
165
+ #: class/subscription.php:919 includes/class-user-subscription.php:305
166
  #: templates/subscriptions/pack-details.php:24
167
  msgid "Free"
168
  msgstr ""
169
 
170
  #: admin/class-admin-subscription.php:245
171
  #: admin/html/form-settings-display.php:41 admin/post-forms-list-table.php:360
172
+ #: admin/settings-options.php:116 admin/settings-options.php:127
173
+ #: admin/settings-options.php:223 admin/settings-options.php:234
174
  #: admin/template.php:63 class/asset-loader.php:50
175
  #: includes/fields/class-abstract-fields.php:252
176
  #: includes/fields/class-abstract-fields.php:332
184
 
185
  #: admin/class-admin-subscription.php:247
186
  #: admin/html/form-settings-display.php:40 admin/post-forms-list-table.php:361
187
+ #: admin/settings-options.php:117 admin/settings-options.php:128
188
+ #: admin/settings-options.php:224 admin/settings-options.php:235
189
  #: admin/template.php:64 class/asset-loader.php:51
190
  #: includes/fields/class-abstract-fields.php:253
191
  #: includes/fields/class-abstract-fields.php:333
328
 
329
  #: admin/class-admin-subscription.php:774
330
  #: admin/form-builder/class-wpuf-admin-form-builder.php:284
331
+ #: class/payment.php:217 class/subscription.php:817
332
  #: includes/class-list-table-subscribers.php:138 lib/appsero/Insights.php:764
333
  #: templates/dashboard/subscription.php:64
334
  msgid "Cancel"
363
  msgstr ""
364
 
365
  #: admin/class-tools.php:43 admin/class-tools.php:106
366
+ #: admin/post-forms-list-table.php:43 class/transactions-list-table.php:90
367
+ #: includes/class-list-table-subscribers.php:136 wpuf-functions.php:3323
368
  msgid "All"
369
  msgstr ""
370
 
754
  msgstr ""
755
 
756
  #: admin/form.php:71 admin/form.php:109 admin/installer.php:86
757
+ #: admin/post-forms-list-table.php:406 class/subscription.php:428
758
  #: includes/free/admin/shortcode-button.php:87 includes/free/edit-user.php:104
759
  #: templates/dashboard/posts.php:177 templates/dashboard.php:268
760
  msgid "Edit"
879
  msgid "Payment Options"
880
  msgstr ""
881
 
882
+ #: admin/html/form-settings-payment.php:25 admin/settings-options.php:382
883
  #: includes/setup-wizard.php:301
884
  msgid "Enable Payments"
885
  msgstr ""
1103
  msgstr ""
1104
 
1105
  #: admin/html/form-submission-restriction.php:12 admin/html/support.php:223
1106
+ #: class/transactions-list-table.php:53 includes/class-privacy.php:358
1107
  #: includes/free/edit-user.php:168 templates/registration-form.php:47
1108
  msgid "Email"
1109
  msgstr ""
1188
  msgstr ""
1189
 
1190
  #: admin/html/form-submission-restriction.php:114
1191
+ #: admin/settings-options.php:287
1192
  msgid "Unauthorized Message"
1193
  msgstr ""
1194
 
1195
  #: admin/html/form-submission-restriction.php:117
1196
+ #: admin/settings-options.php:288
1197
  msgid "Not logged in users will see this message"
1198
  msgstr ""
1199
 
1412
  msgstr ""
1413
 
1414
  #: admin/html/whats-new.php:9
1415
+ msgid "Once trial subscription is used, it couldn't reset"
1416
+ msgstr ""
1417
+
1418
+ #: admin/html/whats-new.php:13
1419
+ msgid "Subscription cancel doesn't work"
1420
+ msgstr ""
1421
+
1422
+ #: admin/html/whats-new.php:17
1423
+ msgid "The tax rate was not calculated with the total amount"
1424
+ msgstr ""
1425
+
1426
+ #: admin/html/whats-new.php:21
1427
+ msgid "The width of the column field was breaking"
1428
+ msgstr ""
1429
+
1430
+ #: admin/html/whats-new.php:25
1431
+ msgid "Paypal recurring payment"
1432
+ msgstr ""
1433
+
1434
+ #: admin/html/whats-new.php:36
1435
  msgid "Updated codebase to fix timezone mismatch"
1436
  msgstr ""
1437
 
1438
+ #: admin/html/whats-new.php:47
1439
  msgid "Custom html content field's width"
1440
  msgstr ""
1441
 
1442
+ #: admin/html/whats-new.php:51
1443
  msgid "All states of New Zealand are added"
1444
  msgstr ""
1445
 
1446
+ #: admin/html/whats-new.php:62
1447
  msgid "Get appropriate user id when role based conditions are present"
1448
  msgstr ""
1449
 
1450
+ #: admin/html/whats-new.php:66
1451
  msgid "Show Invalid subscription message if wrong pack id passed"
1452
  msgstr ""
1453
 
1454
+ #: admin/html/whats-new.php:70
1455
  msgid "URL field new window not working"
1456
  msgstr ""
1457
 
1458
+ #: admin/html/whats-new.php:74
1459
  msgid "Option label not working when & use"
1460
  msgstr ""
1461
 
1462
+ #: admin/html/whats-new.php:78
1463
  msgid "Ajax type category not showing on edit"
1464
  msgstr ""
1465
 
1466
+ #: admin/html/whats-new.php:82
1467
  msgid "Multiple file image can't select"
1468
  msgstr ""
1469
 
1470
+ #: admin/html/whats-new.php:86
1471
  msgid "Subscription pack PayPal Checkout gets \"Error: Access Denied\""
1472
  msgstr ""
1473
 
1474
+ #: admin/html/whats-new.php:90
1475
  msgid "Conflict image field with acf image field"
1476
  msgstr ""
1477
 
1478
+ #: admin/html/whats-new.php:94
1479
  msgid "Missing Auckland State for New Zealand country"
1480
  msgstr ""
1481
 
1482
+ #: admin/html/whats-new.php:98
1483
  msgid "Added support for WooCommerce product category value replacemen"
1484
  msgstr ""
1485
 
1486
+ #: admin/html/whats-new.php:108
1487
  msgid "Add character restriction feature"
1488
  msgstr ""
1489
 
1490
+ #: admin/html/whats-new.php:112
1491
  msgid "Make sure post author edit link works only in frontend"
1492
  msgstr ""
1493
 
1494
+ #: admin/html/whats-new.php:116
1495
  msgid "Inconsistency in lost password reset email message"
1496
  msgstr ""
1497
 
1498
+ #: admin/html/whats-new.php:120
1499
  msgid "Saving custom taxonomy terms when input type is text"
1500
  msgstr ""
1501
 
1502
+ #: admin/html/whats-new.php:124
1503
  msgid "Taxonomy field JS error in builder"
1504
  msgstr ""
1505
 
1506
+ #: admin/html/whats-new.php:128
1507
  msgid "Showing WPUF edit link for WP default roles"
1508
  msgstr ""
1509
 
1510
+ #: admin/html/whats-new.php:132
1511
  msgid "Upload button unresponsive issue in iOS"
1512
  msgstr ""
1513
 
1514
+ #: admin/html/whats-new.php:142
1515
  msgid "Add post edit link for post authors in single or archive pages"
1516
  msgstr ""
1517
 
1518
+ #: admin/html/whats-new.php:146
1519
  msgid "Enhance post delete message"
1520
  msgstr ""
1521
 
1522
+ #: admin/html/whats-new.php:150
1523
  msgid "Refactor control buttons visibility in form builder"
1524
  msgstr ""
1525
 
1526
+ #: admin/html/whats-new.php:154
1527
  msgid "Add missing colons after field label"
1528
  msgstr ""
1529
 
1530
+ #: admin/html/whats-new.php:158
1531
  msgid "Post edit map capability condition"
1532
  msgstr ""
1533
 
1534
+ #: admin/html/whats-new.php:162
1535
  msgid "Role based permission for accessing a post form"
1536
  msgstr ""
1537
 
1538
+ #: admin/html/whats-new.php:166
1539
  msgid "Section-break field alignment"
1540
  msgstr ""
1541
 
1542
+ #: admin/html/whats-new.php:170
1543
  msgid "Pay per post doesn't work if subscription pack is activated"
1544
  msgstr ""
1545
 
1546
+ #: admin/html/whats-new.php:174
1547
  msgid "Mime type for uploading JSON files"
1548
  msgstr ""
1549
 
1550
+ #: admin/html/whats-new.php:178
1551
  msgid "File upload with same file name"
1552
  msgstr ""
1553
 
1554
+ #: admin/html/whats-new.php:182
1555
  msgid "Post preview missing fields"
1556
  msgstr ""
1557
 
1558
+ #: admin/html/whats-new.php:186
1559
  msgid "Illigal variable declartion"
1560
  msgstr ""
1561
 
1562
+ #: admin/html/whats-new.php:190
1563
  msgid "Featured image updating issue"
1564
  msgstr ""
1565
 
1566
+ #: admin/html/whats-new.php:194
1567
  msgid "Conflict with Phlox theme"
1568
  msgstr ""
1569
 
1570
+ #: admin/html/whats-new.php:198
1571
  msgid "Textarea custom field data sanitization"
1572
  msgstr ""
1573
 
1574
+ #: admin/html/whats-new.php:202
1575
  msgid "exclude_type warning in wpuf_category_checklist"
1576
  msgstr ""
1577
 
1578
+ #: admin/html/whats-new.php:206
1579
  msgid "Category field not showing all child categories for selection type child of"
1580
  msgstr ""
1581
 
1582
+ #: admin/html/whats-new.php:210
1583
  msgid "Conflict between image and file upload custom fields"
1584
  msgstr ""
1585
 
1586
+ #: admin/html/whats-new.php:214
1587
  msgid "Login url when login page is not set"
1588
  msgstr ""
1589
 
1590
+ #: admin/html/whats-new.php:224
1591
  msgid ""
1592
  "Use common names for Ivory Coast, North Korea and Sourth Korea instead of "
1593
  "their official names"
1594
  msgstr ""
1595
 
1596
+ #: admin/html/whats-new.php:228
1597
  msgid "Fix condition to use default avatar"
1598
  msgstr ""
1599
 
1600
+ #: admin/html/whats-new.php:232
1601
  msgid "Make Email and URL fields clickable"
1602
  msgstr ""
1603
 
1604
+ #: admin/html/whats-new.php:236
1605
  msgid "Fix redirect after user login"
1606
  msgstr ""
1607
 
1608
+ #: admin/html/whats-new.php:240
1609
  msgid "Sanitize textarea field data"
1610
  msgstr ""
1611
 
1612
+ #: admin/html/whats-new.php:244
1613
  msgid ""
1614
  "Fix missing colon to email, URL, text and textarea labels when renders "
1615
  "their data"
1616
  msgstr ""
1617
 
1618
+ #: admin/html/whats-new.php:248
1619
  msgid "Prevent showing empty labels for fields that have render_field_data method"
1620
  msgstr ""
1621
 
1622
+ #: admin/html/whats-new.php:258
1623
  msgid "Add Namibian Dollar in currency list"
1624
  msgstr ""
1625
 
1626
+ #: admin/html/whats-new.php:262
1627
  msgid "Add sync values option for option data fields"
1628
  msgstr ""
1629
 
1630
+ #: admin/html/whats-new.php:266
1631
  msgid "Allow uploading image that having filesize meets php ini settings"
1632
  msgstr ""
1633
 
1634
+ #: admin/html/whats-new.php:270
1635
  msgid "Limit the selection of one image at a time"
1636
  msgstr ""
1637
 
1638
+ #: admin/html/whats-new.php:274
1639
  msgid "Use file name and size to generate hash to prevent duplicant image upload"
1640
  msgstr ""
1641
 
1642
+ #: admin/html/whats-new.php:278
1643
  msgid "Sanitize text and textarea field data"
1644
  msgstr ""
1645
 
1646
+ #: admin/html/whats-new.php:282
1647
  msgid ""
1648
  "Show label instead of values for radio, checkbox, dropdown and multiselect "
1649
  "data"
1650
  msgstr ""
1651
 
1652
+ #: admin/html/whats-new.php:286
1653
  msgid "Saving custom taxonomies for type text input"
1654
  msgstr ""
1655
 
1656
+ #: admin/html/whats-new.php:290
1657
  msgid "Admin settings link for recaptcha helper text"
1658
  msgstr ""
1659
 
1660
+ #: admin/html/whats-new.php:294
1661
  msgid "Undefined name property for Custom HTML fields"
1662
  msgstr ""
1663
 
1664
+ #: admin/html/whats-new.php:298
1665
  msgid "Delete attachment process"
1666
  msgstr ""
1667
 
1668
+ #: admin/html/whats-new.php:302
1669
  msgid "Missing billing address in invoice PDF"
1670
  msgstr ""
1671
 
1672
+ #: admin/html/whats-new.php:306
1673
  msgid "Showing country field value in frontend post content"
1674
  msgstr ""
1675
 
1676
+ #: admin/html/whats-new.php:310
1677
  msgid "Avatar size display not complying with admin settings size"
1678
  msgstr ""
1679
 
1680
+ #: admin/html/whats-new.php:314
1681
  msgid "Display default avatars on admin settings discussion page"
1682
  msgstr ""
1683
 
1684
+ #: admin/html/whats-new.php:318
1685
  msgid "Redirect to subscription page at registration"
1686
  msgstr ""
1687
 
1688
+ #: admin/html/whats-new.php:322
1689
  msgid "Error notice regarding registration page redirect"
1690
  msgstr ""
1691
 
1692
+ #: admin/html/whats-new.php:326
1693
  msgid "Escaping html in registration errors"
1694
  msgstr ""
1695
 
1696
+ #: admin/html/whats-new.php:330
1697
  msgid "Default login redirect link"
1698
  msgstr ""
1699
 
1700
+ #: admin/html/whats-new.php:334
1701
  msgid "Implementing default WP login page override option"
1702
  msgstr ""
1703
 
1704
+ #: admin/html/whats-new.php:338
1705
  msgid "Transparent background of autosuggestion dropdown"
1706
  msgstr ""
1707
 
1708
+ #: admin/html/whats-new.php:348
1709
  msgid "Import forms system"
1710
  msgstr ""
1711
 
1712
+ #: admin/html/whats-new.php:352
1713
  msgid "Password reset system"
1714
  msgstr ""
1715
 
1716
+ #: admin/html/whats-new.php:356
1717
  msgid "Updated url validation regex to support modern tlds"
1718
  msgstr ""
1719
 
1720
+ #: admin/html/whats-new.php:360
1721
  msgid "Export WPUF forms individually from admin tools page"
1722
  msgstr ""
1723
 
1724
+ #: admin/html/whats-new.php:364
1725
  msgid "Subscription cycle label translation issue"
1726
  msgstr ""
1727
 
1728
+ #: admin/html/whats-new.php:368
1729
  msgid "ACF integration for checkbox fields"
1730
  msgstr ""
1731
 
1732
+ #: admin/html/whats-new.php:372
1733
  msgid "Illegal string offset warning while updating settings"
1734
  msgstr ""
1735
 
1736
+ #: admin/html/whats-new.php:376
1737
  msgid "Conditional logic for Section Break field"
1738
  msgstr ""
1739
 
1740
+ #: admin/html/whats-new.php:380
1741
  msgid "Subscriptions cannot be deleted from backend"
1742
  msgstr ""
1743
 
1744
+ #: admin/html/whats-new.php:384
1745
  msgid "A regression regarding saving checkbox data"
1746
  msgstr ""
1747
 
1748
+ #: admin/html/whats-new.php:388
1749
  msgid "Default value of multi-select fields is not showing"
1750
  msgstr ""
1751
 
1752
+ #: admin/html/whats-new.php:398
1753
  msgid "Hide post edit option when subscription is expired"
1754
  msgstr ""
1755
 
1756
+ #: admin/html/whats-new.php:400
1757
  msgid "Hide post edit option from users whose subscription pack is expired."
1758
  msgstr ""
1759
 
1760
+ #: admin/html/whats-new.php:403
1761
  msgid "Check files to prevent duplicity in media upload"
1762
  msgstr ""
1763
 
1764
+ #: admin/html/whats-new.php:405
1765
  msgid ""
1766
  "A simple measure has been taken to prevent maliciously flooding the site by "
1767
  "uploading same file multiple times. Though this won't work with already "
1768
  "uploaded medias."
1769
  msgstr ""
1770
 
1771
+ #: admin/html/whats-new.php:408
1772
  msgid "Refactor address fields in Account section"
1773
  msgstr ""
1774
 
1775
+ #: admin/html/whats-new.php:410
1776
  msgid "Address edit section from Account section has been rewritten to improve UX."
1777
  msgstr ""
1778
 
1779
+ #: admin/html/whats-new.php:413
1780
  msgid "Update Paypal payment gateway"
1781
  msgstr ""
1782
 
1783
+ #: admin/html/whats-new.php:415
1784
  msgid "Paypal payment gateway has seen some improvements."
1785
  msgstr ""
1786
 
1787
+ #: admin/html/whats-new.php:418
1788
  msgid "Default Category selection improvements"
1789
  msgstr ""
1790
 
1791
+ #: admin/html/whats-new.php:420
1792
  msgid ""
1793
  "An intuitive way of selecting default category of a selected post type has "
1794
  "been introduced."
1795
  msgstr ""
1796
 
1797
+ #: admin/html/whats-new.php:423
1798
  msgid "Compatibility issue with ACF date time field"
1799
  msgstr ""
1800
 
1801
+ #: admin/html/whats-new.php:425
1802
  msgid "A Compatibility issue with ACF date time field has been addressed."
1803
  msgstr ""
1804
 
1805
+ #: admin/html/whats-new.php:428
1806
  msgid "Media title, caption & description not saving"
1807
  msgstr ""
1808
 
1809
+ #: admin/html/whats-new.php:430
1810
  msgid ""
1811
  "Media title, caption & description were not saving from frontend. They will "
1812
  "now."
1813
  msgstr ""
1814
 
1815
+ #: admin/html/whats-new.php:433
1816
  msgid ""
1817
  "The Events Calendar venue and organizer fields issue in WPUF Custom Fields "
1818
  "metabox"
1819
  msgstr ""
1820
 
1821
+ #: admin/html/whats-new.php:435
1822
  msgid ""
1823
  "A workaround has been introduced to save The Events Calendar Venue and "
1824
  "Organizer fields properly from WPUF Custom Fields metabox."
1825
  msgstr ""
1826
 
1827
+ #: admin/html/whats-new.php:438
1828
  msgid "Checkbox data not saving from WPUF Custom Fields metabox"
1829
  msgstr ""
1830
 
1831
+ #: admin/html/whats-new.php:440
1832
  msgid ""
1833
  "Checkboxe data from WPUF Custom Fields metabox were not saving. It has been "
1834
  "fixed."
1835
  msgstr ""
1836
 
1837
+ #: admin/html/whats-new.php:443
1838
  msgid "Multi-column Repeater field data saving issue"
1839
  msgstr ""
1840
 
1841
+ #: admin/html/whats-new.php:445
1842
  msgid ""
1843
  "Multi-column Repeater field data from a form was not saving. It has been "
1844
  "fixed."
1845
  msgstr ""
1846
 
1847
+ #: admin/html/whats-new.php:448
1848
  msgid "Multistep form conflict with Elementor"
1849
  msgstr ""
1850
 
1851
+ #: admin/html/whats-new.php:450
1852
  msgid "Multistep form had a conflict with Elementor. It has been fixed."
1853
  msgstr ""
1854
 
1855
+ #: admin/html/whats-new.php:453
1856
  msgid "Multiple images showing issue in frontend"
1857
  msgstr ""
1858
 
1859
+ #: admin/html/whats-new.php:455
1860
  msgid "Multiple images in a post were not showing in frontend. Now they will."
1861
  msgstr ""
1862
 
1863
+ #: admin/html/whats-new.php:464
1864
  msgid "Nonce not verify on login"
1865
  msgstr ""
1866
 
1867
+ #: admin/html/whats-new.php:466
1868
  msgid "Return of function wp_verify_nonce() was ignored."
1869
  msgstr ""
1870
 
1871
+ #: admin/html/whats-new.php:475
1872
  msgid "Option to set which tab shows as active on the account page"
1873
  msgstr ""
1874
 
1875
+ #: admin/html/whats-new.php:477
1876
  msgid ""
1877
  "Option to set which tab shows as active on the account page. To configure "
1878
  "this setting navigate to wp-admin->User Frontend->Settings->My "
1879
  "Account->Active Tab "
1880
  msgstr ""
1881
 
1882
+ #: admin/html/whats-new.php:480
1883
  msgid "Unlock option was unavailable after the post being locked"
1884
  msgstr ""
1885
 
1886
+ #: admin/html/whats-new.php:482
1887
  msgid "Unlock option was unavailable after the post being locked."
1888
  msgstr ""
1889
 
1890
+ #: admin/html/whats-new.php:485
1891
  msgid "Gutenberg block of WPUF didn't work on bedrock installation"
1892
  msgstr ""
1893
 
1894
+ #: admin/html/whats-new.php:487
1895
  msgid "Gutenberg block of WPUF didn't work on bedrock installation."
1896
  msgstr ""
1897
 
1898
+ #: admin/html/whats-new.php:490
1899
  msgid "Sending admin payment received email twice"
1900
  msgstr ""
1901
 
1902
+ #: admin/html/whats-new.php:492
1903
  msgid ""
1904
  "After processing payment admin & user was receiving payment received email "
1905
  "twice."
1906
  msgstr ""
1907
 
1908
+ #: admin/html/whats-new.php:495
1909
  msgid ""
1910
  "Add shortcode support to display post information in the Post Expiration "
1911
  "Message"
1912
  msgstr ""
1913
 
1914
+ #: admin/html/whats-new.php:497
1915
  msgid ""
1916
  "Add shortcode support to display post information in the Post Expiration "
1917
  "Message. You can use: <strong>{post_author} {post_url} {blogname} "
1918
  "{post_title} {post_status}</strong>"
1919
  msgstr ""
1920
 
1921
+ #: admin/html/whats-new.php:500
1922
  msgid "Add optin on the setup wizard"
1923
  msgstr ""
1924
 
1925
+ #: admin/html/whats-new.php:502
1926
  msgid ""
1927
  "Added optin on the setup wizard, admin can choose whether he/she wants to "
1928
  "share server environment details (php, mysql, server, WordPress versions), "
1930
  "name and url, admin name and email address. No sensitive data is tracked"
1931
  msgstr ""
1932
 
1933
+ #: admin/html/whats-new.php:511
1934
  msgid "Post Owner problem"
1935
  msgstr ""
1936
 
1937
+ #: admin/html/whats-new.php:513
1938
  msgid ""
1939
  "Posts were not assigned to the selected default post owner, this issue has "
1940
  "been fixed."
1941
  msgstr ""
1942
 
1943
+ #: admin/html/whats-new.php:516
1944
  msgid "Google reCaptcha was not working"
1945
  msgstr ""
1946
 
1947
+ #: admin/html/whats-new.php:518
1948
  msgid ""
1949
  "Google reCaptcha was not working, users could submit the form without "
1950
  "reCaptcha validation."
1951
  msgstr ""
1952
 
1953
+ #: admin/html/whats-new.php:527
1954
  msgid "Added column field"
1955
  msgstr ""
1956
 
1957
+ #: admin/html/whats-new.php:532
1958
  msgid "Unable to render the events on the front-end dashboard"
1959
  msgstr ""
1960
 
1961
+ #: admin/html/whats-new.php:534
1962
  msgid ""
1963
  "On the frontend dashboard, the submitted events were not showing, you will "
1964
  "get it fixed in this version."
1965
  msgstr ""
1966
 
1967
+ #: admin/html/whats-new.php:537
1968
  msgid "Page order getting 0(zero) after editing from the frontend"
1969
  msgstr ""
1970
 
1971
+ #: admin/html/whats-new.php:539
1972
  msgid ""
1973
  "Page order was not saving while editing a post using WPUF form, it has been "
1974
  "fixed."
1975
  msgstr ""
1976
 
1977
+ #: admin/html/whats-new.php:542
1978
  msgid "Text input field for taxonomies not working"
1979
  msgstr ""
1980
 
1981
+ #: admin/html/whats-new.php:544
1982
  msgid ""
1983
  "When taxonomy field type is set to `Text Input` then a fatal error was "
1984
  "showing on the frontend, no error with taxonomy field in the latest version."
1985
  msgstr ""
1986
 
1987
+ #: admin/html/whats-new.php:547
1988
  msgid ""
1989
  "In radio and checkbox field use conditional logic that value does not save "
1990
  "in database"
1991
  msgstr ""
1992
 
1993
+ #: admin/html/whats-new.php:549
1994
  msgid ""
1995
  "The selected value of radio and checkbox field were not showing while "
1996
  "editing posts from the backend or frontend, you can see the selected value "
1997
  "in this version."
1998
  msgstr ""
1999
 
2000
+ #: admin/html/whats-new.php:552
2001
  msgid "The args param not working with get_avatar filter"
2002
  msgstr ""
2003
 
2004
+ #: admin/html/whats-new.php:554
2005
  msgid "The args parameter did not exist with get_avatar filter, which now exists."
2006
  msgstr ""
2007
 
2008
+ #: admin/html/whats-new.php:557
2009
  msgid "The item in ajax taxonomy field was not selected"
2010
  msgstr ""
2011
 
2012
+ #: admin/html/whats-new.php:559
2013
  msgid ""
2014
  "When the taxonomy field type is set to Ajax, the submitted terms were not "
2015
  "showing in the backend and frontend which have been fixed."
2016
  msgstr ""
2017
 
2018
+ #: admin/html/whats-new.php:568
2019
  msgid "Unable to send new user registration email"
2020
  msgstr ""
2021
 
2022
+ #: admin/html/whats-new.php:570
2023
  msgid ""
2024
  "WP User Frontend default registration form `[wpuf-registration]` was unable "
2025
  "to send the new user registration email."
2026
  msgstr ""
2027
 
2028
+ #: admin/html/whats-new.php:573
2029
  msgid "WPUF forms block compatibility issue with the latest WP version"
2030
  msgstr ""
2031
 
2032
+ #: admin/html/whats-new.php:575
2033
  msgid ""
2034
  "With the latest version of WordPress the gutenberg block of WP User "
2035
  "Frontend were not working. In this version, you will get it fixed."
2036
  msgstr ""
2037
 
2038
+ #: admin/html/whats-new.php:578
2039
  msgid "Page not update where `[wpuf_dashboard]` shortcode exist"
2040
  msgstr ""
2041
 
2042
+ #: admin/html/whats-new.php:580
2043
  msgid ""
2044
  "While using Gutenberg, the page were not being updated with WPUF shortcode "
2045
  "[wpuf dashboard]"
2046
  msgstr ""
2047
 
2048
+ #: admin/html/whats-new.php:583
2049
  msgid "Retain default when determining whether to display the admin bar"
2050
  msgstr ""
2051
 
2052
+ #: admin/html/whats-new.php:585
2053
  msgid ""
2054
  "From the User Frontend Settings, set that Administrator, Editor, Vendor can "
2055
  "see the admin bar. Now, the super admin want, one specific user ( who has "
2059
  "frontend."
2060
  msgstr ""
2061
 
2062
+ #: admin/html/whats-new.php:588
2063
  msgid "Fatal error when use PHP lower version (5.4 or lower)"
2064
  msgstr ""
2065
 
2066
+ #: admin/html/whats-new.php:590
2067
  msgid ""
2068
  "It was unable to install WP User Frontend with PHP 5.4 or lower version. "
2069
  "Here is the error details: <br><br><strong>Fatal error: Can't use method "
2071
  "/wp-user-frontend/class/frontend-form-post.php on line 194</strong>"
2072
  msgstr ""
2073
 
2074
+ #: admin/html/whats-new.php:593
2075
  msgid "Product form was unable to show the single gallery image"
2076
  msgstr ""
2077
 
2078
+ #: admin/html/whats-new.php:595
2079
  msgid ""
2080
  "When user upload single image for product gallery using WPUF WooCommerce "
2081
  "product form, that image were not showing on the frontend."
2082
  msgstr ""
2083
 
2084
+ #: admin/html/whats-new.php:604
2085
  msgid "WooCommerce gallery images not getting saved"
2086
  msgstr ""
2087
 
2088
+ #: admin/html/whats-new.php:606
2089
  msgid ""
2090
  "After releasing version 2.9.3, WooCommerce gallery image field stopped "
2091
  "working. You will get it fixed in this version."
2092
  msgstr ""
2093
 
2094
+ #: admin/html/whats-new.php:615
2095
  msgid "The Events Calendar Integration Form"
2096
  msgstr ""
2097
 
2098
+ #: admin/html/whats-new.php:617
2099
  msgid ""
2100
  "Now admin can allow users to create event from the frontend. Currently WPUF "
2101
  "has a one click pre-build event form that has been integrated with The "
2102
  "Events Calendar plugin"
2103
  msgstr ""
2104
 
2105
+ #: admin/html/whats-new.php:620
2106
  msgid "Post Submission Facility From Account Page"
2107
  msgstr ""
2108
 
2109
+ #: admin/html/whats-new.php:622
2110
  msgid ""
2111
  "On the frontend account page, added a new menu item named <b>Submit "
2112
  "Post</b>. Now admin can allow users to submit post from their default "
2115
  "you can assign any post form that will use to submit posts."
2116
  msgstr ""
2117
 
2118
+ #: admin/html/whats-new.php:625
2119
  msgid "Login/Lost Password Link Under Registration Form"
2120
  msgstr ""
2121
 
2122
+ #: admin/html/whats-new.php:627
2123
  msgid "Added Login/Lost Password link under registration form"
2124
  msgstr ""
2125
 
2126
+ #: admin/html/whats-new.php:636
2127
  msgid "Added drag and drop image ordering on image upload"
2128
  msgstr ""
2129
 
2130
+ #: admin/html/whats-new.php:638
2131
  msgid ""
2132
  "Now frontend users can drag & drop the images/files to change the order "
2133
  "while uploading."
2134
  msgstr ""
2135
 
2136
+ #: admin/html/whats-new.php:641
2137
  msgid "Added reCAPTCHA field in login form"
2138
  msgstr ""
2139
 
2140
+ #: admin/html/whats-new.php:643
2141
  msgid ""
2142
  "Admin has the option to show reCAPTCHA field in login form. Check the "
2143
  "related settings from <strong>User Frontend > Settings > "
2144
  "Login/Registration</strong>"
2145
  msgstr ""
2146
 
2147
+ #: admin/html/whats-new.php:646
2148
  msgid "Added preview option in forms"
2149
  msgstr ""
2150
 
2151
+ #: admin/html/whats-new.php:648
2152
  msgid ""
2153
  "You can see a nice <strong>Preview</strong> button with <strong>Save "
2154
  "Form</strong> button, admin can take a quick look of the form without using "
2155
  "shortcode"
2156
  msgstr ""
2157
 
2158
+ #: admin/html/whats-new.php:651
2159
  msgid "Fixed hiding “Select Image” button while uploading multiple images."
2160
  msgstr ""
2161
 
2162
+ #: admin/html/whats-new.php:653
2163
  msgid ""
2164
  "The upload button will not be hidden until the user selects max number of "
2165
  "files "
2166
  msgstr ""
2167
 
2168
+ #: admin/html/whats-new.php:656
2169
  msgid "Added form limit notice before form submission"
2170
  msgstr ""
2171
 
2172
+ #: admin/html/whats-new.php:658
2173
  msgid ""
2174
  "Limit notice message was showing after submission, now it is showing when "
2175
  "rendering the form"
2176
  msgstr ""
2177
 
2178
+ #: admin/html/whats-new.php:661
2179
  msgid "Fixed: default post category not saving"
2180
  msgstr ""
2181
 
2182
+ #: admin/html/whats-new.php:663
2183
  msgid ""
2184
  "From the form <strong>Settings > Post Settings</strong>, default post "
2185
  "category options were not saving. Now, it's fixed."
2186
  msgstr ""
2187
 
2188
+ #: admin/html/whats-new.php:666
2189
  msgid ""
2190
  "WPUF dashboard shortcode with form_id attribute was not showing posts "
2191
  "properly"
2192
  msgstr ""
2193
 
2194
+ #: admin/html/whats-new.php:668
2195
  msgid ""
2196
  "Now you can list posts on the frontend by using <strong>form_id<strong/> "
2197
  "attribute with <strong>[wpuf_dashboard]</strong> shortcode"
2198
  msgstr ""
2199
 
2200
+ #: admin/html/whats-new.php:677
2201
  msgid "Changed text domain to `wp-user-frontend` from `wpuf` "
2202
  msgstr ""
2203
 
2204
+ #: admin/html/whats-new.php:679
2205
  msgid ""
2206
  "If you are using other language than English. Please <b>rename</b> your "
2207
  "<i>.po and .mo </i> files to `wp-user-frontend_` from `wpuf_` <br> This "
2208
  "change was made to support translations from translate.wordpress.org"
2209
  msgstr ""
2210
 
2211
+ #: admin/html/whats-new.php:682
2212
  msgid "Added WP User Frontend Data export and erase functionality."
2213
  msgstr ""
2214
 
2215
+ #: admin/html/whats-new.php:684
2216
  msgid "Added functionality to export WP User Frontend Data to comply with GDPR."
2217
  msgstr ""
2218
 
2219
+ #: admin/html/whats-new.php:687
2220
  msgid "Added billing address customizer."
2221
  msgstr ""
2222
 
2223
+ #: admin/html/whats-new.php:689
2224
  msgid "Added customizer options for billing address in payment page."
2225
  msgstr ""
2226
 
2227
+ #: admin/html/whats-new.php:692
2228
  msgid "Make the payment page responsive."
2229
  msgstr ""
2230
 
2231
+ #: admin/html/whats-new.php:694
2232
  msgid "Some css adjustments are made in payment page to make it responsive."
2233
  msgstr ""
2234
 
2235
+ #: admin/html/whats-new.php:697
2236
  msgid "Fixed image upload issue in Safari."
2237
  msgstr ""
2238
 
2239
+ #: admin/html/whats-new.php:699
2240
  msgid "Images were not showing after upload in safari, it is fixed now."
2241
  msgstr ""
2242
 
2243
+ #: admin/html/whats-new.php:702
2244
  msgid "Post update issue after updating or removing post images."
2245
  msgstr ""
2246
 
2247
+ #: admin/html/whats-new.php:704
2248
  msgid ""
2249
  "Posts cannot be updated after updating or removing post images, it is fixed "
2250
  "now."
2251
  msgstr ""
2252
 
2253
+ #: admin/html/whats-new.php:713
2254
  msgid "Allow overriding form input styles using theme styling."
2255
  msgstr ""
2256
 
2257
+ #: admin/html/whats-new.php:715
2258
  msgid "Overriding form input styles using theme style is now possible."
2259
  msgstr ""
2260
 
2261
+ #: admin/html/whats-new.php:718
2262
  msgid "Fixed Auto Login after registration."
2263
  msgstr ""
2264
 
2265
+ #: admin/html/whats-new.php:720
2266
  msgid "Auto Login after registration was not working is fixed now."
2267
  msgstr ""
2268
 
2269
+ #: admin/html/whats-new.php:723
2270
  msgid "Fixed fallback cost calculation"
2271
  msgstr ""
2272
 
2273
+ #: admin/html/whats-new.php:725
2274
  msgid "Fallback cost calculation was inaccurate for some cases, it is fixed now."
2275
  msgstr ""
2276
 
2277
+ #: admin/html/whats-new.php:728
2278
  msgid "Removal of subscription from User Profile gets reverted if updated"
2279
  msgstr ""
2280
 
2281
+ #: admin/html/whats-new.php:730
2282
  msgid "User subscription deletion gets reverted if updated is fixed."
2283
  msgstr ""
2284
 
2285
+ #: admin/html/whats-new.php:733
2286
  msgid "Show Free pack users in subscribers list."
2287
  msgstr ""
2288
 
2289
+ #: admin/html/whats-new.php:735
2290
  msgid "Free pack users were not showing in subscribers list, now they will."
2291
  msgstr ""
2292
 
2293
+ #: admin/html/whats-new.php:744
2294
  msgid "WP User Frontend Guten Block is added"
2295
  msgstr ""
2296
 
2297
+ #: admin/html/whats-new.php:746
2298
  msgid ""
2299
  "WPUF Form Block is now available to be used within gutenberg editor with "
2300
  "preview of the form. "
2301
  msgstr ""
2302
 
2303
+ #: admin/html/whats-new.php:749
2304
  msgid "Advanced Custom Fields plugin compatibility"
2305
  msgstr ""
2306
 
2307
+ #: admin/html/whats-new.php:751
2308
  msgid "Now all your ACF fields can be used within WPUF Post forms. "
2309
  msgstr ""
2310
 
2311
+ #: admin/html/whats-new.php:754
2312
  msgid "Taxonomy Terms not showing for custom post types"
2313
  msgstr ""
2314
 
2315
+ #: admin/html/whats-new.php:756
2316
  msgid ""
2317
  "Fixed an issue with taxonomy terms not appearing for Custom Post types "
2318
  "within Form Settings and Dashboard Post Listing"
2319
  msgstr ""
2320
 
2321
+ #: admin/html/whats-new.php:759
2322
  msgid "Various other code optimizations"
2323
  msgstr ""
2324
 
2325
+ #: admin/html/whats-new.php:761 admin/html/whats-new.php:818
2326
  msgid "Code structure organization and optimization for better performance"
2327
  msgstr ""
2328
 
2329
+ #: admin/html/whats-new.php:770
2330
  msgid "WoooCommerce billing address Sync"
2331
  msgstr ""
2332
 
2333
+ #: admin/html/whats-new.php:772
2334
  msgid ""
2335
  "If an existing customer has previously set his billing address, that will "
2336
  "be imported into WPUF Billing address "
2337
  msgstr ""
2338
 
2339
+ #: admin/html/whats-new.php:775
2340
  msgid "Trial subscription message not showing properly"
2341
  msgstr ""
2342
 
2343
+ #: admin/html/whats-new.php:777
2344
  msgid "Subscriptions with Trial now shows trial notices"
2345
  msgstr ""
2346
 
2347
+ #: admin/html/whats-new.php:780
2348
  msgid "Reset email Key not working"
2349
  msgstr ""
2350
 
2351
+ #: admin/html/whats-new.php:782
2352
  msgid "Reset Email key was not working in some cases"
2353
  msgstr ""
2354
 
2355
+ #: admin/html/whats-new.php:785
2356
  msgid "Post count not showing on the frontend dashboard"
2357
  msgstr ""
2358
 
2359
+ #: admin/html/whats-new.php:787
2360
  msgid ""
2361
  "Dashboard with multiple post type was not showing post counts properly, is "
2362
  "now fixed and shows count for each post type"
2363
  msgstr ""
2364
 
2365
+ #: admin/html/whats-new.php:790
2366
  msgid "Login Redirect showing blank page is fixed"
2367
  msgstr ""
2368
 
2369
+ #: admin/html/whats-new.php:792
2370
  msgid ""
2371
  "If \"Previous Page\" was set for redirection, login redirect was "
2372
  "redirecting to blank page for users who hit login page directly"
2373
  msgstr ""
2374
 
2375
+ #: admin/html/whats-new.php:801
2376
  msgid "Enhanced Login Redirect to redirect users to previous page"
2377
  msgstr ""
2378
 
2379
+ #: admin/html/whats-new.php:803
2380
  msgid ""
2381
  "You can choose Previous Page as Login Redirect page settings now to "
2382
  "redirect users to the page from which they went for Login. "
2383
  msgstr ""
2384
 
2385
+ #: admin/html/whats-new.php:806
2386
  msgid "Email HTML links not Rendreing properly issue is fixed"
2387
  msgstr ""
2388
 
2389
+ #: admin/html/whats-new.php:808
2390
  msgid ""
2391
  "For some clients emails were not rendering the HTML links properly, this is "
2392
  "now fixed"
2393
  msgstr ""
2394
 
2395
+ #: admin/html/whats-new.php:811
2396
  msgid "Form Builder : Form Field's Help text styles not showing properly"
2397
  msgstr ""
2398
 
2399
+ #: admin/html/whats-new.php:813
2400
  msgid "Help texts styling is now fixed and much easier to read and understand"
2401
  msgstr ""
2402
 
2403
+ #: admin/html/whats-new.php:816
2404
  msgid "Various other code improvements"
2405
  msgstr ""
2406
 
2407
+ #: admin/html/whats-new.php:827
2408
  msgid "Dashboard Post Listing now supports multiple post types"
2409
  msgstr ""
2410
 
2411
+ #: admin/html/whats-new.php:829
2412
  msgid ""
2413
  "Now you can show multiple post type in user dashboard using shortcode like "
2414
  "this : <br><b>[wpuf_dashboard post_type=\"post,page,custom_type\"]</b> "
2415
  msgstr ""
2416
 
2417
+ #: admin/html/whats-new.php:832
2418
  msgid "Added Login Redirect Settings"
2419
  msgstr ""
2420
 
2421
+ #: admin/html/whats-new.php:834
2422
  msgid ""
2423
  "You can now set a page from <i>WPUF Settings > Login/Registration > "
2424
  "Redirect after Login</i>. When login redirection is active the user will be "
2425
  "redirected to this page after login."
2426
  msgstr ""
2427
 
2428
+ #: admin/html/whats-new.php:837
2429
  msgid "Image Upload field button text can be changed"
2430
  msgstr ""
2431
 
2432
+ #: admin/html/whats-new.php:839
2433
  msgid ""
2434
  "The upload button text can now be changed for image upload fields which "
2435
  "defaults to \"Select Image\" if not set. "
2436
  msgstr ""
2437
 
2438
+ #: admin/html/whats-new.php:842
2439
  msgid "Multi Step Form styles made compatible with more themes"
2440
  msgstr ""
2441
 
2442
+ #: admin/html/whats-new.php:844
2443
  msgid "Multi Step form can now be styled more easily with other themes "
2444
  msgstr ""
2445
 
2446
+ #: admin/html/whats-new.php:847
2447
  msgid "Required field condition for google map not working is fixed"
2448
  msgstr ""
2449
 
2450
+ #: admin/html/whats-new.php:849
2451
  msgid ""
2452
  "If Google Map field was set as required users were able to submit form "
2453
  "without changing the default value."
2454
  msgstr ""
2455
 
2456
+ #: admin/html/whats-new.php:858
2457
  msgid "Admin form builder is now fully responsive."
2458
  msgstr ""
2459
 
2460
+ #: admin/html/whats-new.php:860
2461
  msgid ""
2462
  "Now you can edit forms from your mobile devices directly. Our improved "
2463
  "responsive layouts of form builder makes it easy for you to build forms on "
2464
  "the go."
2465
  msgstr ""
2466
 
2467
+ #: admin/html/whats-new.php:863
2468
  msgid "Added color schemes for creating attractive form layouts."
2469
  msgstr ""
2470
 
2471
+ #: admin/html/whats-new.php:865
2472
  msgid ""
2473
  "We have added 3 new color schemes for the form layouts which you can choose "
2474
  "from each form's new display settings."
2475
  msgstr ""
2476
 
2477
+ #: admin/html/whats-new.php:868
2478
  msgid "Restrict Free subscription pack to be enabled multiple times "
2479
  msgstr ""
2480
 
2481
+ #: admin/html/whats-new.php:870
2482
  msgid ""
2483
  "Free subscription packs now can only be purchased once and the limit "
2484
  "applies properly"
2485
  msgstr ""
2486
 
2487
+ #: admin/html/whats-new.php:873
2488
  msgid "Various other bug fixes and improvements were made "
2489
  msgstr ""
2490
 
2491
+ #: admin/html/whats-new.php:875
2492
  msgid "Please see the change log to see full details."
2493
  msgstr ""
2494
 
2495
+ #: admin/html/whats-new.php:884
2496
  msgid "Added upgrade function for default category"
2497
  msgstr ""
2498
 
2499
+ #: admin/html/whats-new.php:886
2500
  msgid "Upgrader added to upgrade previously set default post category."
2501
  msgstr ""
2502
 
2503
+ #: admin/html/whats-new.php:889
2504
  msgid "Subscription pack cannot be canceled"
2505
  msgstr ""
2506
 
2507
+ #: admin/html/whats-new.php:891
2508
  msgid ""
2509
  "Fixed recurring subscription pack cannot be canceled from my account page "
2510
  "in subscription details section."
2511
  msgstr ""
2512
 
2513
+ #: admin/html/whats-new.php:894
2514
  msgid "page installer admin notice logic issue"
2515
  msgstr ""
2516
 
2517
+ #: admin/html/whats-new.php:896
2518
  msgid ""
2519
  "Fixed page installer admin notice logic problem due to new payment settings "
2520
  "default value not set."
2521
  msgstr ""
2522
 
2523
+ #: admin/html/whats-new.php:906
2524
  msgid "Setup Wizard"
2525
  msgstr ""
2526
 
2527
+ #: admin/html/whats-new.php:908
2528
  msgid "Setup Wizard added to turn off payment options and install pages."
2529
  msgstr ""
2530
 
2531
+ #: admin/html/whats-new.php:912
2532
  msgid "Multi-select Category"
2533
  msgstr ""
2534
 
2535
+ #: admin/html/whats-new.php:914
2536
  msgid "Add multi-select to default category in post form settings."
2537
  msgstr ""
2538
 
2539
+ #: admin/html/whats-new.php:918
2540
  msgid "Select Text option for Taxonomy"
2541
  msgstr ""
2542
 
2543
+ #: admin/html/whats-new.php:920
2544
  msgid ""
2545
  "Add Select Text option for taxonomy fields. Now you can add default text "
2546
  "with empty value as first option for Taxonomy dropdown."
2547
  msgstr ""
2548
 
2549
+ #: admin/html/whats-new.php:923
2550
  msgid "Taxonomy Checkbox Inline"
2551
  msgstr ""
2552
 
2553
+ #: admin/html/whats-new.php:925
2554
  msgid ""
2555
  "Added checkbox inline option to taxonomy checkbox. You can now display "
2556
  "Taxonomy checkbox fields inline."
2557
  msgstr ""
2558
 
2559
+ #: admin/html/whats-new.php:935
2560
  msgid "Manage schedule for form submission"
2561
  msgstr ""
2562
 
2563
+ #: admin/html/whats-new.php:937
2564
  msgid ""
2565
  "Do not accept form submission if the current date is not between the date "
2566
  "range of the schedule."
2567
  msgstr ""
2568
 
2569
+ #: admin/html/whats-new.php:941
2570
  msgid "Restrict form submission based on the user roles"
2571
  msgstr ""
2572
 
2573
+ #: admin/html/whats-new.php:943
2574
  msgid ""
2575
  "Restrict form submission based on the user roles. Now you can manage user "
2576
  "role base permission on form submission."
2577
  msgstr ""
2578
 
2579
+ #: admin/html/whats-new.php:947
2580
  msgid "Limit how many entries a form will accept"
2581
  msgstr ""
2582
 
2583
+ #: admin/html/whats-new.php:949
2584
  msgid ""
2585
  "Limit how many entries a form will accept and display a custom message when "
2586
  "that limit is reached."
2587
  msgstr ""
2588
 
2589
+ #: admin/html/whats-new.php:953
2590
  msgid "Show/hide Admin Bar"
2591
  msgstr ""
2592
 
2593
+ #: admin/html/whats-new.php:955
2594
  msgid "Control the admin bar visibility based on user roles."
2595
  msgstr ""
2596
 
2597
+ #: admin/html/whats-new.php:959
2598
  msgid "Ajax Login widget"
2599
  msgstr ""
2600
 
2601
+ #: admin/html/whats-new.php:961
2602
  msgid ""
2603
  "Login user is more simple now with Ajax Login Widget. The simple ajax login "
2604
  "form do not required page loading for login."
2605
  msgstr ""
2606
 
2607
+ #: admin/html/whats-new.php:965
2608
  msgid "Form submission with Captcha field"
2609
  msgstr ""
2610
 
2611
+ #: admin/html/whats-new.php:967
2612
  msgid "Form field validation process updated if form submits with captcha field."
2613
  msgstr ""
2614
 
2615
+ #: admin/html/whats-new.php:981
2616
  msgid "What's New in WPUF?"
2617
  msgstr ""
2618
 
2635
  msgstr ""
2636
 
2637
  #: admin/installer.php:84 admin/settings-options.php:24
2638
+ #: includes/free/admin/shortcode-button.php:79 wpuf-functions.php:2021
2639
  msgid "Dashboard"
2640
  msgstr ""
2641
 
2648
  msgid "Login"
2649
  msgstr ""
2650
 
2651
+ #: admin/installer.php:95 class/subscription.php:403 class/subscription.php:423
2652
+ #: class/subscription.php:424 class/subscription.php:425
2653
  #: includes/free/admin/shortcode-button.php:99
2654
+ #: templates/dashboard/dashboard.php:19 wpuf-functions.php:2033
2655
  msgid "Subscription"
2656
  msgstr ""
2657
 
3110
  msgid "Previous Page"
3111
  msgstr ""
3112
 
3113
+ #: admin/settings-options.php:89
3114
  msgid "Show Admin Bar"
3115
  msgstr ""
3116
 
3117
+ #: admin/settings-options.php:90
3118
  msgid "Select user by roles, who can view admin bar in frontend."
3119
  msgstr ""
3120
 
3121
+ #: admin/settings-options.php:97
3122
  msgid "Admin area access"
3123
  msgstr ""
3124
 
3125
+ #: admin/settings-options.php:98
3126
  msgid "Allow you to block specific user role to Ajax request and Media upload."
3127
  msgstr ""
3128
 
3129
+ #: admin/settings-options.php:102
3130
  msgid "Admin Only"
3131
  msgstr ""
3132
 
3133
+ #: admin/settings-options.php:103
3134
  msgid "Admins, Editors"
3135
  msgstr ""
3136
 
3137
+ #: admin/settings-options.php:104
3138
  msgid "Admins, Editors, Authors"
3139
  msgstr ""
3140
 
3141
+ #: admin/settings-options.php:105
3142
  msgid "Admins, Editors, Authors, Contributors"
3143
  msgstr ""
3144
 
3145
+ #: admin/settings-options.php:106
3146
  msgid "Default"
3147
  msgstr ""
3148
 
3149
+ #: admin/settings-options.php:111
3150
  msgid "Override the post edit link"
3151
  msgstr ""
3152
 
3153
+ #: admin/settings-options.php:112
3154
  msgid ""
3155
  "Users see the edit link in post if s/he is capable to edit the post/page. "
3156
  "Selecting <strong>Yes</strong> will override the default WordPress edit "
3157
  "post link in frontend"
3158
  msgstr ""
3159
 
3160
+ #: admin/settings-options.php:122
3161
  msgid "ACF Compatibility"
3162
  msgstr ""
3163
 
3164
+ #: admin/settings-options.php:123
3165
  msgid ""
3166
  "Select <strong>Yes</strong> if you want to make compatible WPUF custom "
3167
  "fields data with advanced custom fields."
3168
  msgstr ""
3169
 
3170
+ #: admin/settings-options.php:133
3171
  msgid "Load Scripts"
3172
  msgstr ""
3173
 
3174
+ #: admin/settings-options.php:134
3175
  msgid "Load scripts/styles in all pages"
3176
  msgstr ""
3177
 
3178
+ #: admin/settings-options.php:140
3179
  msgid "reCAPTCHA Site Key"
3180
  msgstr ""
3181
 
3182
+ #: admin/settings-options.php:144
3183
  msgid "reCAPTCHA Secret Key"
3184
  msgstr ""
3185
 
3186
+ #: admin/settings-options.php:145
3187
  msgid ""
3188
  "<a target=\"_blank\" href=\"https://www.google.com/recaptcha/\">Register "
3189
  "here</a> to get reCaptcha Site and Secret keys."
3190
  msgstr ""
3191
 
3192
+ #: admin/settings-options.php:149
3193
  msgid "Custom CSS codes"
3194
  msgstr ""
3195
 
3196
+ #: admin/settings-options.php:150
3197
  msgid ""
3198
  "If you want to add your custom CSS code, it will be added on page header "
3199
  "wrapped with style tag"
3200
  msgstr ""
3201
 
3202
+ #: admin/settings-options.php:159
3203
  msgid "Edit Page"
3204
  msgstr ""
3205
 
3206
+ #: admin/settings-options.php:160
3207
  msgid "Select the page where <code>[wpuf_edit]</code> is located"
3208
  msgstr ""
3209
 
3210
+ #: admin/settings-options.php:166
3211
  msgid "Default Post Owner"
3212
  msgstr ""
3213
 
3214
+ #: admin/settings-options.php:167
3215
  msgid ""
3216
  "If guest post is enabled and user details are OFF, the posts are assigned "
3217
  "to this user"
3218
  msgstr ""
3219
 
3220
+ #: admin/settings-options.php:174
3221
  msgid "Custom Fields in post"
3222
  msgstr ""
3223
 
3224
+ #: admin/settings-options.php:175
3225
  msgid "Show custom fields on post content area"
3226
  msgstr ""
3227
 
3228
+ #: admin/settings-options.php:181
3229
  msgid "Insert Photo image size"
3230
  msgstr ""
3231
 
3232
+ #: admin/settings-options.php:182
3233
  msgid ""
3234
  "Default image size of \"<strong>Insert Photo</strong>\" button in post "
3235
  "content area"
3236
  msgstr ""
3237
 
3238
+ #: admin/settings-options.php:189
3239
  msgid "Insert Photo image type"
3240
  msgstr ""
3241
 
3242
+ #: admin/settings-options.php:190
3243
  msgid ""
3244
  "Default image type of \"<strong>Insert Photo</strong>\" button in post "
3245
  "content area"
3246
  msgstr ""
3247
 
3248
+ #: admin/settings-options.php:193
3249
  msgid "Image only"
3250
  msgstr ""
3251
 
3252
+ #: admin/settings-options.php:194
3253
  msgid "Image with link"
3254
  msgstr ""
3255
 
3256
+ #: admin/settings-options.php:200
3257
  msgid "Enable Image Caption"
3258
  msgstr ""
3259
 
3260
+ #: admin/settings-options.php:201
3261
  msgid "Allow users to update image/video title, caption and description"
3262
  msgstr ""
3263
 
3264
+ #: admin/settings-options.php:207
3265
  msgid "Default Post Form"
3266
  msgstr ""
3267
 
3268
+ #: admin/settings-options.php:208
3269
  msgid "Fallback form for post editing if no associated form found"
3270
  msgstr ""
3271
 
3272
+ #: admin/settings-options.php:218
3273
  msgid "Users can edit post?"
3274
  msgstr ""
3275
 
3276
+ #: admin/settings-options.php:219
3277
  msgid "Users will be able to edit their own posts"
3278
  msgstr ""
3279
 
3280
+ #: admin/settings-options.php:229
3281
  msgid "User can delete post?"
3282
  msgstr ""
3283
 
3284
+ #: admin/settings-options.php:230
3285
  msgid "Users will be able to delete their own posts"
3286
  msgstr ""
3287
 
3288
+ #: admin/settings-options.php:240
3289
  msgid "Pending Post Edit"
3290
  msgstr ""
3291
 
3292
+ #: admin/settings-options.php:241
3293
  msgid "Disable post editing while post in \"pending\" status"
3294
  msgstr ""
3295
 
3296
+ #: admin/settings-options.php:247
3297
  msgid "Posts per page"
3298
  msgstr ""
3299
 
3300
+ #: admin/settings-options.php:248
3301
  msgid "How many posts will be listed in a page"
3302
  msgstr ""
3303
 
3304
+ #: admin/settings-options.php:254
3305
  msgid "Show user bio"
3306
  msgstr ""
3307
 
3308
+ #: admin/settings-options.php:255
3309
  msgid "Users biographical info will be shown"
3310
  msgstr ""
3311
 
3312
+ #: admin/settings-options.php:261
3313
  msgid "Show post count"
3314
  msgstr ""
3315
 
3316
+ #: admin/settings-options.php:262
3317
  msgid "Show how many posts are created by the user"
3318
  msgstr ""
3319
 
3320
+ #: admin/settings-options.php:268
3321
  msgid "Show Featured Image"
3322
  msgstr ""
3323
 
3324
+ #: admin/settings-options.php:269
3325
  msgid "Show featured image of the post (Overridden by Shortcode)"
3326
  msgstr ""
3327
 
3328
+ #: admin/settings-options.php:274
3329
  msgid "Show Payment Column"
3330
  msgstr ""
3331
 
3332
+ #: admin/settings-options.php:275
3333
  msgid "Enable if you want show payment column on posts table"
3334
  msgstr ""
3335
 
3336
+ #: admin/settings-options.php:281
3337
  msgid "Featured Image size"
3338
  msgstr ""
3339
 
3340
+ #: admin/settings-options.php:297
3341
  msgid "Account Page"
3342
  msgstr ""
3343
 
3344
+ #: admin/settings-options.php:298
3345
  msgid "Select the page which contains <code>[wpuf_account]</code> shortcode"
3346
  msgstr ""
3347
 
3348
+ #: admin/settings-options.php:304
3349
  msgid "Active Tab"
3350
  msgstr ""
3351
 
3352
+ #: admin/settings-options.php:305
3353
  msgid "Which tab should be set as active by default when opening the account page"
3354
  msgstr ""
3355
 
3356
+ #: admin/settings-options.php:311
3357
  msgid "Show Subscriptions"
3358
  msgstr ""
3359
 
3360
+ #: admin/settings-options.php:312
3361
  msgid ""
3362
  "Show Subscriptions tab in \"my account\" page where "
3363
  "<code>[wpuf_account]</code> is located"
3364
  msgstr ""
3365
 
3366
+ #: admin/settings-options.php:318 includes/class-customizer.php:21
3367
  #: includes/class-customizer.php:65
3368
  msgid "Show Billing Address"
3369
  msgstr ""
3370
 
3371
+ #: admin/settings-options.php:319
3372
  msgid "Show billing address in account page."
3373
  msgstr ""
3374
 
3375
+ #: admin/settings-options.php:329
3376
  msgid "Auto Login After Registration"
3377
  msgstr ""
3378
 
3379
+ #: admin/settings-options.php:330
3380
  msgid "If enabled, users after registration will be logged in to the system"
3381
  msgstr ""
3382
 
3383
+ #: admin/settings-options.php:336
3384
  msgid "Login/Registration override"
3385
  msgstr ""
3386
 
3387
+ #: admin/settings-options.php:337
3388
  msgid ""
3389
  "If enabled, default login and registration forms will be overridden by WPUF "
3390
  "with pages below"
3391
  msgstr ""
3392
 
3393
+ #: admin/settings-options.php:343
3394
  msgid "Registration Page"
3395
  msgstr ""
3396
 
3397
+ #: admin/settings-options.php:344
3398
  msgid ""
3399
  "Select the page you want to use as registration page override <em>(should "
3400
  "have shortcode)</em>"
3401
  msgstr ""
3402
 
3403
+ #: admin/settings-options.php:350
3404
  msgid "Login Page"
3405
  msgstr ""
3406
 
3407
+ #: admin/settings-options.php:351
3408
  msgid "Select the page which contains <code>[wpuf-login]</code> shortcode"
3409
  msgstr ""
3410
 
3411
+ #: admin/settings-options.php:357
3412
  msgid "Redirect After Login"
3413
  msgstr ""
3414
 
3415
+ #: admin/settings-options.php:358
3416
  msgid "After successfull login, where the page will redirect to"
3417
  msgstr ""
3418
 
3419
+ #: admin/settings-options.php:364
3420
  msgid "Default Login Redirect"
3421
  msgstr ""
3422
 
3423
+ #: admin/settings-options.php:365
3424
  msgid ""
3425
  "If enabled, users who login using WordPress default login form will be "
3426
  "redirected to the selected page."
3427
  msgstr ""
3428
 
3429
+ #: admin/settings-options.php:371
3430
  msgid "reCAPTCHA in Login Form"
3431
  msgstr ""
3432
 
3433
+ #: admin/settings-options.php:372
3434
  msgid ""
3435
  "If enabled, users have to verify reCAPTCHA in login page. Also, make sure "
3436
  "that reCAPTCHA is configured properly from <b>General Options</b>"
3437
  msgstr ""
3438
 
3439
+ #: admin/settings-options.php:383
3440
  msgid "Enable payments on your site."
3441
  msgstr ""
3442
 
3443
+ #: admin/settings-options.php:389
3444
  msgid "Subscription Pack Page"
3445
  msgstr ""
3446
 
3447
+ #: admin/settings-options.php:390
3448
  msgid "Select the page where <code>[wpuf_sub_pack]</code> located."
3449
  msgstr ""
3450
 
3451
+ #: admin/settings-options.php:396
3452
  msgid "Subscription at registration"
3453
  msgstr ""
3454
 
3455
+ #: admin/settings-options.php:397
3456
  msgid "Registration time redirect to subscription page"
3457
  msgstr ""
3458
 
3459
+ #: admin/settings-options.php:402
3460
  msgid "Currency"
3461
  msgstr ""
3462
 
3463
+ #: admin/settings-options.php:409
3464
  msgid "Currency Position"
3465
  msgstr ""
3466
 
3467
+ #: admin/settings-options.php:413
3468
  msgid "Left"
3469
  msgstr ""
3470
 
3471
+ #: admin/settings-options.php:414
3472
  msgid "Right"
3473
  msgstr ""
3474
 
3475
+ #: admin/settings-options.php:415
3476
  msgid "Left with space"
3477
  msgstr ""
3478
 
3479
+ #: admin/settings-options.php:416
3480
  msgid "Right with space"
3481
  msgstr ""
3482
 
3483
+ #: admin/settings-options.php:421
3484
  msgid "Thousand Separator"
3485
  msgstr ""
3486
 
3487
+ #: admin/settings-options.php:422
3488
  msgid "This sets the thousand separator of displayed prices."
3489
  msgstr ""
3490
 
3491
+ #: admin/settings-options.php:430
3492
  msgid "Decimal Separator"
3493
  msgstr ""
3494
 
3495
+ #: admin/settings-options.php:431
3496
  msgid "This sets the decimal separator of displayed prices."
3497
  msgstr ""
3498
 
3499
+ #: admin/settings-options.php:438
3500
  msgid "Number of Decimals"
3501
  msgstr ""
3502
 
3503
+ #: admin/settings-options.php:439
3504
  msgid "This sets the number of decimal points shown in displayed prices."
3505
  msgstr ""
3506
 
3507
+ #: admin/settings-options.php:449
3508
  msgid "Enable demo/sandbox mode"
3509
  msgstr ""
3510
 
3511
+ #: admin/settings-options.php:450
3512
  msgid "When sandbox mode is active, all payment gateway will be used in demo mode"
3513
  msgstr ""
3514
 
3515
+ #: admin/settings-options.php:456
3516
  msgid "Payment Page"
3517
  msgstr ""
3518
 
3519
+ #: admin/settings-options.php:457
3520
  msgid "This page will be used to process payment options"
3521
  msgstr ""
3522
 
3523
+ #: admin/settings-options.php:463
3524
  msgid "Payment Success Page"
3525
  msgstr ""
3526
 
3527
+ #: admin/settings-options.php:464 lib/gateway/bank.php:36
3528
  msgid "After payment users will be redirected here"
3529
  msgstr ""
3530
 
3531
+ #: admin/settings-options.php:470
3532
  msgid "Payment Gateways"
3533
  msgstr ""
3534
 
3535
+ #: admin/settings-options.php:471
3536
  msgid "Active payment gateways"
3537
  msgstr ""
3538
 
3539
+ #: admin/settings-options.php:477
3540
+ msgid "Retry Failed Payment"
3541
+ msgstr ""
3542
+
3543
+ #: admin/settings-options.php:478
3544
+ msgid "How many times should retry for failed payment max is 4"
3545
+ msgstr ""
3546
+
3547
+ #: admin/settings-options.php:493
3548
  msgid "<span class=\"dashicons dashicons-universal-access-alt\"></span> Guest Email"
3549
  msgstr ""
3550
 
3551
+ #: admin/settings-options.php:499
3552
  msgid "Guest mail subject"
3553
  msgstr ""
3554
 
3555
+ #: admin/settings-options.php:500
3556
  msgid "This sets the subject of the emails sent to guest users"
3557
  msgstr ""
3558
 
3559
+ #: admin/settings-options.php:507
3560
  msgid "Guest mail body"
3561
  msgstr ""
3562
 
3563
+ #: admin/settings-options.php:508
3564
  msgid ""
3565
  "This sets the body of the emails sent to guest users. Please DON'T edit the "
3566
  "<code>{activation_link}</code> part, you can use {sitename} too."
3567
  msgstr ""
3568
 
3569
+ #: admin/settings-options.php:527
3570
  msgid "Post Types"
3571
  msgstr ""
3572
 
3573
+ #: admin/settings-options.php:528
3574
  msgid "Select the post types you will allow users to export."
3575
  msgstr ""
3576
 
3577
+ #: admin/settings-options.php:554
3578
  msgid ""
3579
  "Select profile/registration forms for user roles. These forms will be used "
3580
  "to populate extra edit profile fields in backend."
3581
  msgstr ""
3582
 
3583
+ #: admin/settings-options.php:565
3584
  msgid " - select - "
3585
  msgstr ""
3586
 
3887
  #: class/upload.php:264 includes/fields/class-field-recaptcha.php:147
3888
  #: includes/fields/class-field-sectionbreak.php:55
3889
  #: templates/dashboard/posts.php:89 templates/dashboard.php:104
3890
+ #: wpuf-functions.php:1024
3891
  msgid "Title"
3892
  msgstr ""
3893
 
3904
  msgstr ""
3905
 
3906
  #: admin/template.php:583 class/upload.php:266
3907
+ #: includes/fields/class-field-sectionbreak.php:63 wpuf-functions.php:1032
3908
  msgid "Description"
3909
  msgstr ""
3910
 
4091
  msgstr ""
4092
 
4093
  #: class/payment.php:146 includes/class-customizer.php:56
4094
+ #: wpuf-functions.php:2037
4095
  msgid "Billing Address"
4096
  msgstr ""
4097
 
4273
  msgstr ""
4274
 
4275
  #: class/render-form.php:1401 includes/fields/class-field-post-taxonomy.php:127
4276
+ #: wpuf-functions.php:1806
4277
  msgid "-- Select --"
4278
  msgstr ""
4279
 
4281
  msgid "This field is no longer available."
4282
  msgstr ""
4283
 
4284
+ #: class/render-form.php:1673 class/transactions-list-table.php:122
4285
+ #: class/transactions-list-table.php:199 includes/free/edit-user.php:105
4286
  #: templates/dashboard/posts.php:186 templates/dashboard.php:277
4287
  msgid "Delete"
4288
  msgstr ""
4289
 
4290
+ #: class/subscription.php:426
4291
  msgid "Add Subscription"
4292
  msgstr ""
4293
 
4294
+ #: class/subscription.php:427
4295
  msgid "Add New Subscription"
4296
  msgstr ""
4297
 
4298
+ #: class/subscription.php:429
4299
  msgid "Edit Subscription"
4300
  msgstr ""
4301
 
4302
+ #: class/subscription.php:430
4303
  msgid "New Subscription"
4304
  msgstr ""
4305
 
4306
+ #: class/subscription.php:431 class/subscription.php:432
4307
  msgid "View Subscription"
4308
  msgstr ""
4309
 
4310
+ #: class/subscription.php:433
4311
  msgid "Search Subscription"
4312
  msgstr ""
4313
 
4314
+ #: class/subscription.php:434
4315
  msgid "No Subscription Found"
4316
  msgstr ""
4317
 
4318
+ #: class/subscription.php:435
4319
  msgid "No Subscription Found in Trash"
4320
  msgstr ""
4321
 
4322
+ #: class/subscription.php:436
4323
  msgid "Parent Subscription"
4324
  msgstr ""
4325
 
4326
+ #: class/subscription.php:779
4327
  msgid "Payment is complete"
4328
  msgstr ""
4329
 
4330
+ #: class/subscription.php:779
4331
  msgid "Congratulations, your payment has been completed!"
4332
  msgstr ""
4333
 
4334
+ #: class/subscription.php:783 class/subscription.php:787
4335
  msgid "Please buy a subscription pack to post"
4336
  msgstr ""
4337
 
4338
+ #: class/subscription.php:806
4339
  msgid "<p><i>You have a subscription pack activated. </i></p>"
4340
  msgstr ""
4341
 
4342
+ #: class/subscription.php:808
4343
+ #. translators: %s: pack title
4344
  msgid "<p><i>Pack name: %s </i></p>"
4345
  msgstr ""
4346
 
4347
+ #: class/subscription.php:810
4348
  msgid "To cancel the pack, press the following cancel button"
4349
  msgstr ""
4350
 
4351
+ #: class/subscription.php:857
4352
  msgid "Day"
4353
  msgid_plural "Days"
4354
  msgstr[0] ""
4355
  msgstr[1] ""
4356
 
4357
+ #: class/subscription.php:858
4358
  msgid "Week"
4359
  msgid_plural "Weeks"
4360
  msgstr[0] ""
4361
  msgstr[1] ""
4362
 
4363
+ #: class/subscription.php:859
4364
  msgid "Month"
4365
  msgid_plural "Months"
4366
  msgstr[0] ""
4367
  msgstr[1] ""
4368
 
4369
+ #: class/subscription.php:860
4370
  msgid "Year"
4371
  msgid_plural "Years"
4372
  msgstr[0] ""
4373
  msgstr[1] ""
4374
 
4375
+ #: class/subscription.php:892
4376
  msgid "One time payment"
4377
  msgstr ""
4378
 
4379
+ #: class/subscription.php:899
4380
  msgid "Every"
4381
  msgstr ""
4382
 
4383
+ #: class/subscription.php:900
4384
  msgid "for"
4385
  msgstr ""
4386
 
4387
+ #: class/subscription.php:900
4388
  msgid "installments"
4389
  msgstr ""
4390
 
4391
+ #: class/subscription.php:908
4392
+ #. translators: %s: trial days
4393
+ msgid "Trial available for first %1$s %2$s"
4394
  msgstr ""
4395
 
4396
+ #: class/subscription.php:912
4397
  msgid "Buy Now"
4398
  msgstr ""
4399
 
4400
+ #: class/subscription.php:916
4401
  msgid "Sign Up"
4402
  msgstr ""
4403
 
4404
+ #: class/subscription.php:984
4405
+ #. translators: %s: amount
4406
  msgid "There is a <strong>%s</strong> charge to add a new post."
4407
  msgstr ""
4408
 
4409
+ #: class/subscription.php:1001
4410
+ #. translators: %s: amount
4411
  msgid ""
4412
  "Your Subscription pack is exhausted. There is a <strong>%s</strong> charge "
4413
  "to add a new post."
4414
  msgstr ""
4415
 
4416
+ #: class/subscription.php:1047
4417
+ #. translators: %s: subscription link
4418
  msgid "You must <a href=\"%s\">purchase a pack</a> before posting"
4419
  msgstr ""
4420
 
4421
+ #: class/transactions-list-table.php:15
4422
  msgid "transaction"
4423
  msgstr ""
4424
 
4425
+ #: class/transactions-list-table.php:16
4426
  msgid "transactions"
4427
  msgstr ""
4428
 
4429
+ #: class/transactions-list-table.php:43
4430
  msgid "ID"
4431
  msgstr ""
4432
 
4433
+ #: class/transactions-list-table.php:44
4434
  #: includes/class-list-table-subscribers.php:44
4435
  #: templates/dashboard/posts.php:90 templates/dashboard.php:131
4436
  msgid "Status"
4437
  msgstr ""
4438
 
4439
+ #: class/transactions-list-table.php:45
4440
  msgid "User"
4441
  msgstr ""
4442
 
4443
+ #: class/transactions-list-table.php:46 includes/class-privacy.php:330
4444
+ msgid "Subtotal"
4445
+ msgstr ""
4446
+
4447
+ #: class/transactions-list-table.php:47
4448
  #: includes/free/post-form-templates/the_events_calendar.php:115
4449
  msgid "Cost"
4450
  msgstr ""
4451
 
4452
+ #: class/transactions-list-table.php:48 includes/class-privacy.php:334
4453
  msgid "Tax"
4454
  msgstr ""
4455
 
4456
+ #: class/transactions-list-table.php:49 includes/class-privacy.php:342
4457
  #: includes/class-privacy.php:413
4458
  msgid "Post ID"
4459
  msgstr ""
4460
 
4461
+ #: class/transactions-list-table.php:50 includes/class-privacy.php:346
4462
  #: includes/class-privacy.php:466
4463
  msgid "Pack ID"
4464
  msgstr ""
4465
 
4466
+ #: class/transactions-list-table.php:51
4467
  #: includes/class-list-table-subscribers.php:45
4468
  msgid "Gateway"
4469
  msgstr ""
4470
 
4471
+ #: class/transactions-list-table.php:52
4472
  msgid "Payer"
4473
  msgstr ""
4474
 
4475
+ #: class/transactions-list-table.php:54
4476
  msgid "Trans ID"
4477
  msgstr ""
4478
 
4479
+ #: class/transactions-list-table.php:55 includes/free/form-element.php:13
4480
  msgid "Date"
4481
  msgstr ""
4482
 
4483
+ #: class/transactions-list-table.php:91 wpuf-functions.php:64
4484
  msgid "Pending"
4485
  msgstr ""
4486
 
4487
+ #: class/transactions-list-table.php:117 class/transactions-list-table.php:194
4488
  msgid "Accept"
4489
  msgstr ""
4490
 
4491
+ #: class/transactions-list-table.php:118 class/transactions-list-table.php:195
4492
  msgid "Reject"
4493
  msgstr ""
4494
 
4495
+ #: class/transactions-list-table.php:181
4496
  msgid "No transactions found."
4497
  msgstr ""
4498
 
4499
+ #: class/upload.php:265 wpuf-functions.php:1028
4500
  msgid "Caption"
4501
  msgstr ""
4502
 
4633
 
4634
  #: includes/class-dokan-integration.php:34
4635
  #: includes/class-wc-vendors-integration.php:108
4636
+ #: templates/dashboard/dashboard.php:15 wpuf-functions.php:2025
4637
  msgid "Posts"
4638
  msgstr ""
4639
 
5219
  msgid "Payment Status"
5220
  msgstr ""
5221
 
 
 
 
 
5222
  #: includes/class-privacy.php:354 includes/free/edit-profile.php:111
5223
  msgid "Last Name"
5224
  msgstr ""
6613
  msgid "Private"
6614
  msgstr ""
6615
 
6616
+ #: wpuf-functions.php:210 wpuf-functions.php:2053
6617
  msgid "-- select --"
6618
  msgstr ""
6619
 
6620
+ #: wpuf-functions.php:510
6621
  msgid "Images"
6622
  msgstr ""
6623
 
6624
+ #: wpuf-functions.php:514
6625
  msgid "Audio"
6626
  msgstr ""
6627
 
6628
+ #: wpuf-functions.php:518
6629
  msgid "Videos"
6630
  msgstr ""
6631
 
6632
+ #: wpuf-functions.php:522
6633
  msgid "PDF"
6634
  msgstr ""
6635
 
6636
+ #: wpuf-functions.php:526
6637
  msgid "Office Documents"
6638
  msgstr ""
6639
 
6640
+ #: wpuf-functions.php:530
6641
  msgid "Zip Archives"
6642
  msgstr ""
6643
 
6644
+ #: wpuf-functions.php:534
6645
  msgid "Executable Files"
6646
  msgstr ""
6647
 
6648
+ #: wpuf-functions.php:538
6649
  msgid "CSV"
6650
  msgstr ""
6651
 
6652
+ #: wpuf-functions.php:1051
6653
  msgid "Directions »"
6654
  msgstr ""
6655
 
6656
+ #: wpuf-functions.php:2029
6657
  msgid "Edit Profile"
6658
  msgstr ""
6659
 
6660
+ #: wpuf-functions.php:2167
6661
  msgid "United Arab Emirates Dirham"
6662
  msgstr ""
6663
 
6664
+ #: wpuf-functions.php:2172
6665
  msgid "Australian Dollars"
6666
  msgstr ""
6667
 
6668
+ #: wpuf-functions.php:2177
6669
  msgid "Argentine Peso"
6670
  msgstr ""
6671
 
6672
+ #: wpuf-functions.php:2182
6673
  msgid "Bangladeshi Taka"
6674
  msgstr ""
6675
 
6676
+ #: wpuf-functions.php:2187
6677
  msgid "Brazilian Real"
6678
  msgstr ""
6679
 
6680
+ #: wpuf-functions.php:2192
6681
  msgid "Bulgarian Lev"
6682
  msgstr ""
6683
 
6684
+ #: wpuf-functions.php:2197
6685
  msgid "Canadian Dollars"
6686
  msgstr ""
6687
 
6688
+ #: wpuf-functions.php:2202
6689
  msgid "Chilean Peso"
6690
  msgstr ""
6691
 
6692
+ #: wpuf-functions.php:2207
6693
  msgid "Chinese Yuan"
6694
  msgstr ""
6695
 
6696
+ #: wpuf-functions.php:2212
6697
  msgid "Colombian Peso"
6698
  msgstr ""
6699
 
6700
+ #: wpuf-functions.php:2217
6701
  msgid "Czech Koruna"
6702
  msgstr ""
6703
 
6704
+ #: wpuf-functions.php:2222
6705
  msgid "Danish Krone"
6706
  msgstr ""
6707
 
6708
+ #: wpuf-functions.php:2227
6709
  msgid "Dominican Peso"
6710
  msgstr ""
6711
 
6712
+ #: wpuf-functions.php:2232
6713
  msgid "Algerian Dinar"
6714
  msgstr ""
6715
 
6716
+ #: wpuf-functions.php:2237
6717
  msgid "Euros"
6718
  msgstr ""
6719
 
6720
+ #: wpuf-functions.php:2242
6721
  msgid "Hong Kong Dollar"
6722
  msgstr ""
6723
 
6724
+ #: wpuf-functions.php:2247
6725
  msgid "Croatia kuna"
6726
  msgstr ""
6727
 
6728
+ #: wpuf-functions.php:2252
6729
  msgid "Hungarian Forint"
6730
  msgstr ""
6731
 
6732
+ #: wpuf-functions.php:2257
6733
  msgid "Icelandic krona"
6734
  msgstr ""
6735
 
6736
+ #: wpuf-functions.php:2262
6737
  msgid "Indonesia Rupiah"
6738
  msgstr ""
6739
 
6740
+ #: wpuf-functions.php:2267
6741
  msgid "Indian Rupee"
6742
  msgstr ""
6743
 
6744
+ #: wpuf-functions.php:2272
6745
  msgid "Nepali Rupee"
6746
  msgstr ""
6747
 
6748
+ #: wpuf-functions.php:2277
6749
  msgid "Israeli Shekel"
6750
  msgstr ""
6751
 
6752
+ #: wpuf-functions.php:2282
6753
  msgid "Japanese Yen"
6754
  msgstr ""
6755
 
6756
+ #: wpuf-functions.php:2287
6757
  msgid "Lao Kip"
6758
  msgstr ""
6759
 
6760
+ #: wpuf-functions.php:2292
6761
  msgid "South Korean Won"
6762
  msgstr ""
6763
 
6764
+ #: wpuf-functions.php:2297
6765
  msgid "Malaysian Ringgits"
6766
  msgstr ""
6767
 
6768
+ #: wpuf-functions.php:2302
6769
  msgid "Mexican Peso"
6770
  msgstr ""
6771
 
6772
+ #: wpuf-functions.php:2307
6773
  msgid "Nigerian Naira"
6774
  msgstr ""
6775
 
6776
+ #: wpuf-functions.php:2312
6777
  msgid "Norwegian Krone"
6778
  msgstr ""
6779
 
6780
+ #: wpuf-functions.php:2317
6781
  msgid "New Zealand Dollar"
6782
  msgstr ""
6783
 
6784
+ #: wpuf-functions.php:2322
6785
  msgid "Namibian dollar"
6786
  msgstr ""
6787
 
6788
+ #: wpuf-functions.php:2327
6789
  msgid "Omani Rial"
6790
  msgstr ""
6791
 
6792
+ #: wpuf-functions.php:2332
6793
  msgid "Iranian Rial"
6794
  msgstr ""
6795
 
6796
+ #: wpuf-functions.php:2337
6797
  msgid "Pakistani Rupee"
6798
  msgstr ""
6799
 
6800
+ #: wpuf-functions.php:2342
6801
  msgid "Paraguayan Guaraní"
6802
  msgstr ""
6803
 
6804
+ #: wpuf-functions.php:2347
6805
  msgid "Philippine Pesos"
6806
  msgstr ""
6807
 
6808
+ #: wpuf-functions.php:2352
6809
  msgid "Polish Zloty"
6810
  msgstr ""
6811
 
6812
+ #: wpuf-functions.php:2357
6813
  msgid "Pounds Sterling"
6814
  msgstr ""
6815
 
6816
+ #: wpuf-functions.php:2362
6817
  msgid "Romanian Leu"
6818
  msgstr ""
6819
 
6820
+ #: wpuf-functions.php:2367
6821
  msgid "Russian Ruble"
6822
  msgstr ""
6823
 
6824
+ #: wpuf-functions.php:2372
6825
  msgid "Saudi Riyal"
6826
  msgstr ""
6827
 
6828
+ #: wpuf-functions.php:2377
6829
  msgid "Singapore Dollar"
6830
  msgstr ""
6831
 
6832
+ #: wpuf-functions.php:2382
6833
  msgid "South African rand"
6834
  msgstr ""
6835
 
6836
+ #: wpuf-functions.php:2387
6837
  msgid "Swedish Krona"
6838
  msgstr ""
6839
 
6840
+ #: wpuf-functions.php:2392
6841
  msgid "Swiss Franc"
6842
  msgstr ""
6843
 
6844
+ #: wpuf-functions.php:2397
6845
  msgid "Taiwan New Dollars"
6846
  msgstr ""
6847
 
6848
+ #: wpuf-functions.php:2402
6849
  msgid "Thai Baht"
6850
  msgstr ""
6851
 
6852
+ #: wpuf-functions.php:2407
6853
  msgid "Turkish Lira"
6854
  msgstr ""
6855
 
6856
+ #: wpuf-functions.php:2412
6857
  msgid "US Dollar"
6858
  msgstr ""
6859
 
6860
+ #: wpuf-functions.php:2417
6861
  msgid "Vietnamese Dong"
6862
  msgstr ""
6863
 
6864
+ #: wpuf-functions.php:2422
6865
  msgid "Egyptian Pound"
6866
  msgstr ""
6867
 
6868
+ #: wpuf-functions.php:2427
6869
  msgid "Jordanian dinar"
6870
  msgstr ""
6871
 
6872
+ #: wpuf-functions.php:3324
6873
  msgid "None"
6874
  msgstr ""
6875
 
6996
  msgid "Searching&hellip;"
6997
  msgstr ""
6998
 
6999
+ #: wpuf-functions.php:1518
7000
  msgctxt "tag delimiter"
7001
  msgid ","
7002
  msgstr ""
lib/gateway/paypal.php CHANGED
@@ -109,7 +109,13 @@ class WPUF_Paypal {
109
  'name' => 'paypal_api_signature',
110
  'label' => __( 'PayPal API signature', 'wp-user-frontend' ),
111
  ];
112
-
 
 
 
 
 
 
113
  return $options;
114
  }
115
 
@@ -123,7 +129,8 @@ class WPUF_Paypal {
123
  */
124
  public function prepare_to_send( $data ) {
125
  $user_id = $data['user_info']['id'];
126
- $listener_url = add_query_arg( 'action', 'wpuf_paypal_success', home_url( '/' ) );
 
127
  $redirect_page_id = wpuf_get_option( 'payment_success', 'wpuf_payment' );
128
 
129
  if ( $redirect_page_id ) {
@@ -310,6 +317,10 @@ class WPUF_Paypal {
310
  $custom = json_decode( stripcslashes( $postdata['custom'] ) );
311
  $coupon_id = isset( $custom->coupon_id ) ? $custom->coupon_id : false;
312
 
 
 
 
 
313
  if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_signup' ) ) {
314
  WP_User_Frontend::log( 'paypal-recurring', 'got subscriber with email ' . $postdata['payer_email'] );
315
 
@@ -384,9 +395,9 @@ class WPUF_Paypal {
384
  $data = [
385
  'user_id' => (int) $custom->user_id,
386
  'status' => strtolower( $postdata['payment_status'] ),
387
- 'subtotal' => (float) $custom->subtotal,
388
  'tax' => (float) $custom->tax,
389
- 'cost' => $postdata['mc_gross'],
390
  'post_id' => isset( $post_id ) ? $post_id : '',
391
  'pack_id' => isset( $pack_id ) ? $pack_id : '',
392
  'payer_first_name' => $postdata['first_name'],
@@ -401,7 +412,7 @@ class WPUF_Paypal {
401
  WP_User_Frontend::log( 'payment', 'inserting payment to database. ' . print_r( $data, true ) );
402
 
403
  $transaction_id = wp_strip_all_tags( $postdata['txn_id'] );
404
-
405
  WPUF_Payment::insert_payment( $data, $transaction_id, $is_recurring );
406
 
407
  if ( $coupon_id ) {
109
  'name' => 'paypal_api_signature',
110
  'label' => __( 'PayPal API signature', 'wp-user-frontend' ),
111
  ];
112
+ /* $options[] = [
113
+ 'name' => 'paypal_endpoint',
114
+ 'label' => __('PayPal IPN endpoint', 'wp-user-frontend'),
115
+ 'default' => home_url( '/action/wpuf_paypal_success', null ),
116
+ 'desc' => __('Set this to your notification IPN listener', 'wp-user-frontend'),
117
+ 'class' => 'disabled'
118
+ ];*/
119
  return $options;
120
  }
121
 
129
  */
130
  public function prepare_to_send( $data ) {
131
  $user_id = $data['user_info']['id'];
132
+ $listener_url = add_query_arg( 'action', 'wpuf_paypal_success', home_url( '' ) );
133
+ //$listener_url = 'http://a53d2f68b609.ngrok.io/?action=wpuf_paypal_success';
134
  $redirect_page_id = wpuf_get_option( 'payment_success', 'wpuf_payment' );
135
 
136
  if ( $redirect_page_id ) {
317
  $custom = json_decode( stripcslashes( $postdata['custom'] ) );
318
  $coupon_id = isset( $custom->coupon_id ) ? $custom->coupon_id : false;
319
 
320
+ if ($postdata['period3']) {
321
+ update_user_meta($custom->user_id, '_wpuf_used_trial', 'yes');
322
+ }
323
+
324
  if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_signup' ) ) {
325
  WP_User_Frontend::log( 'paypal-recurring', 'got subscriber with email ' . $postdata['payer_email'] );
326
 
395
  $data = [
396
  'user_id' => (int) $custom->user_id,
397
  'status' => strtolower( $postdata['payment_status'] ),
398
+ 'subtotal' => $postdata['mc_gross'],
399
  'tax' => (float) $custom->tax,
400
+ 'cost' => (float) $custom->subtotal,
401
  'post_id' => isset( $post_id ) ? $post_id : '',
402
  'pack_id' => isset( $pack_id ) ? $pack_id : '',
403
  'payer_first_name' => $postdata['first_name'],
412
  WP_User_Frontend::log( 'payment', 'inserting payment to database. ' . print_r( $data, true ) );
413
 
414
  $transaction_id = wp_strip_all_tags( $postdata['txn_id'] );
415
+
416
  WPUF_Payment::insert_payment( $data, $transaction_id, $is_recurring );
417
 
418
  if ( $coupon_id ) {
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: tareq1988, nizamuddinbabu, wedevs
3
  Donate link: https://tareq.co/donate/
4
  Tags: Forms, registration, profile-builder, login, membership, frontend-post
5
  Requires at least: 4.0
6
- Tested up to: 5.5.3
7
  Requires PHP: 5.6
8
- Stable tag: 3.5.8
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -263,6 +263,13 @@ redirected to the edit page with that post id. Then you'll see the edit post for
263
 
264
  == Changelog ==
265
 
 
 
 
 
 
 
 
266
  = v3.5.8 (21 November, 2020) =
267
  * Fix - Updated codebase to fix timezone mismatch
268
 
3
  Donate link: https://tareq.co/donate/
4
  Tags: Forms, registration, profile-builder, login, membership, frontend-post
5
  Requires at least: 4.0
6
+ Tested up to: 5.6
7
  Requires PHP: 5.6
8
+ Stable tag: 3.5.9
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
263
 
264
  == Changelog ==
265
 
266
+ = v3.5.9 (11 December, 2020) =
267
+ * Fix - Once trial subscription is used, it couldn't reset
268
+ * Fix - Subscription cancel doesn't work
269
+ * Fix - The tax rate was not calculated with the total amount
270
+ * Fix - The width of the column field was breaking
271
+ * Enhancement - Paypal recurring payment
272
+
273
  = v3.5.8 (21 November, 2020) =
274
  * Fix - Updated codebase to fix timezone mismatch
275
 
wpuf-functions.php CHANGED
@@ -23,19 +23,19 @@ add_action( 'init', 'wpuf_buffer_start' );
23
  * @author Tareq Hasan
24
  */
25
  function wpuf_show_post_status( $status ) {
26
- if ( $status == 'publish' ) {
27
  $title = __( 'Live', 'wp-user-frontend' );
28
  $fontcolor = '#33CC33';
29
- } elseif ( $status == 'draft' ) {
30
  $title = __( 'Offline', 'wp-user-frontend' );
31
  $fontcolor = '#bbbbbb';
32
- } elseif ( $status == 'pending' ) {
33
  $title = __( 'Awaiting Approval', 'wp-user-frontend' );
34
  $fontcolor = '#C00202';
35
- } elseif ( $status == 'future' ) {
36
  $title = __( 'Scheduled', 'wp-user-frontend' );
37
  $fontcolor = '#bbbbbb';
38
- } elseif ( $status == 'private' ) {
39
  $title = __( 'Private', 'wp-user-frontend' );
40
  $fontcolor = '#bbbbbb';
41
  }
@@ -54,16 +54,16 @@ function wpuf_show_post_status( $status ) {
54
  * @author Tareq Hasan
55
  */
56
  function wpuf_admin_post_status( $status ) {
57
- if ( $status == 'publish' ) {
58
  $title = __( 'Published', 'wp-user-frontend' );
59
  $fontcolor = '#009200';
60
- } elseif ( $status == 'draft' || $status == 'private' ) {
61
  $title = __( 'Draft', 'wp-user-frontend' );
62
  $fontcolor = '#bbbbbb';
63
- } elseif ( $status == 'pending' ) {
64
  $title = __( 'Pending', 'wp-user-frontend' );
65
  $fontcolor = '#C00202';
66
- } elseif ( $status == 'future' ) {
67
  $title = __( 'Scheduled', 'wp-user-frontend' );
68
  $fontcolor = '#bbbbbb';
69
  }
@@ -77,27 +77,25 @@ function wpuf_admin_post_status( $status ) {
77
  * @param <type> $post_id
78
  */
79
  function wpuf_upload_attachment( $post_id ) {
80
- if ( !isset( $_FILES['wpuf_post_attachments'] ) ) {
81
  return false;
82
  }
83
 
84
-
85
-
86
  $fields = (int) wpuf_get_option( 'attachment_num' );
87
 
88
  $wpuf_post_attachments = isset( $_FILES['wpuf_post_attachments'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_FILES['wpuf_post_attachments'] ) ) : [];
89
 
90
  for ( $i = 0; $i < $fields; $i++ ) {
91
- $file_name = basename( $wpuf_post_attachments['name'][$i] );
92
 
93
  if ( $file_name ) {
94
  if ( $file_name ) {
95
  $upload = [
96
- 'name' => $wpuf_post_attachments['name'][$i],
97
- 'type' => $wpuf_post_attachments['type'][$i],
98
- 'tmp_name' => $wpuf_post_attachments['tmp_name'][$i],
99
- 'error' => $wpuf_post_attachments['error'][$i],
100
- 'size' => $wpuf_post_attachments['size'][$i],
101
  ];
102
 
103
  wp_handle_upload( $upload );
@@ -145,7 +143,7 @@ function wpfu_get_attachments( $post_id ) {
145
  * @author Tareq Hasan
146
  */
147
  function wpuf_unset_media_tab( $list ) {
148
- if ( !current_user_can( 'edit_posts' ) ) {
149
  unset( $list['library'] );
150
  unset( $list['gallery'] );
151
  }
@@ -168,12 +166,14 @@ function wpuf_get_post_types( $args = [] ) {
168
  $post_types = get_post_types( $args );
169
 
170
  $ignore_post_types = [
171
- 'attachment', 'revision', 'nav_menu_item',
 
 
172
  ];
173
 
174
  foreach ( $post_types as $key => $val ) {
175
- if ( in_array( $val, $ignore_post_types ) ) {
176
- unset( $post_types[$key] );
177
  }
178
  }
179
 
@@ -194,7 +194,7 @@ function wpuf_list_users() {
194
 
195
  if ( $users ) {
196
  foreach ( $users as $user ) {
197
- $list[$user->ID] = $user->user_login;
198
  }
199
  }
200
 
@@ -208,12 +208,15 @@ function wpuf_list_users() {
208
  */
209
  function wpuf_get_pages( $post_type = 'page' ) {
210
  $array = [ '' => __( '-- select --', 'wp-user-frontend' ) ];
211
- $pages = get_posts( [ 'post_type' => $post_type,
212
- 'numberposts' => - 1,
213
- 'no_found_rows' => true,
214
- 'update_post_meta_cache' => false,
215
- 'update_post_term_cache' => false
216
- ] );
 
 
 
217
 
218
  if ( $pages ) {
219
  foreach ( $pages as $page ) {
@@ -241,10 +244,10 @@ function wpuf_override_admin_edit_link( $url, $post_id ) {
241
 
242
  $override = wpuf_get_option( 'override_editlink', 'wpuf_general', 'no' );
243
 
244
- if ( $override == 'yes' ) {
245
  $url = '';
246
 
247
- if ( wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard', 'yes' ) == 'yes' ) {
248
  $edit_page = (int) wpuf_get_option( 'edit_page_id', 'wpuf_frontend_posting' );
249
  $url = get_permalink( $edit_page );
250
 
@@ -278,7 +281,10 @@ class WPUF_Walker_Category_Multi extends Walker {
278
  *
279
  * @var array
280
  */
281
- public $db_fields = ['parent' => 'parent', 'id' => 'term_id'];
 
 
 
282
 
283
  /**
284
  * @see Walker::start_el()
@@ -294,7 +300,7 @@ class WPUF_Walker_Category_Multi extends Walker {
294
  $cat_name = apply_filters( 'list_cats', $category->name, $category );
295
  $output .= "\t<option class=\"level-$depth\" value=\"" . $category->term_id . '"';
296
 
297
- if ( in_array( $category->term_id, $args['selected'] ) ) {
298
  $output .= ' selected="selected"';
299
  }
300
 
@@ -317,7 +323,10 @@ class WPUF_Walker_Category_Multi extends Walker {
317
  class WPUF_Walker_Category_Checklist extends Walker {
318
  public $tree_type = 'category';
319
 
320
- public $db_fields = ['parent' => 'parent', 'id' => 'term_id']; //TODO: decouple this
 
 
 
321
 
322
  public function start_lvl( &$output, $depth = 0, $args = [] ) {
323
  $indent = str_repeat( "\t", $depth );
@@ -330,13 +339,13 @@ class WPUF_Walker_Category_Checklist extends Walker {
330
  }
331
 
332
  public function start_el( &$output, $category, $depth = 0, $args = [], $current_object_id = 0 ) {
333
- extract( $args );
334
 
335
  if ( empty( $taxonomy ) ) {
336
  $taxonomy = 'category';
337
  }
338
 
339
- if ( $taxonomy == 'category' ) {
340
  $name = 'category';
341
  } else {
342
  $name = $taxonomy;
@@ -349,7 +358,7 @@ class WPUF_Walker_Category_Checklist extends Walker {
349
  }
350
 
351
  $class = isset( $args['class'] ) ? $args['class'] : '';
352
- $output .= "\n<li class='" . $inline_class . "' id='{$taxonomy}-{$category->term_id}'>" . '<label class="selectit"><input class="' . $class . '" value="' . $category->term_id . '" type="checkbox" name="' . $name . '[]" id="in-' . $taxonomy . '-' . $category->term_id . '"' . checked( in_array( $category->term_id, $args['selected_cats'] ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters( 'the_category', $category->name ) ) . '</label>';
353
  }
354
 
355
  public function end_el( &$output, $category, $depth = 0, $args = [] ) {
@@ -364,7 +373,6 @@ class WPUF_Walker_Category_Checklist extends Walker {
364
  * @param array $selected_cats
365
  *
366
  * @since 0.8
367
- *
368
  */
369
  function wpuf_category_checklist( $post_id = 0, $selected_cats = false, $attr = [], $class = null ) {
370
  require_once ABSPATH . '/wp-admin/includes/template.php';
@@ -396,7 +404,7 @@ function wpuf_category_checklist( $post_id = 0, $selected_cats = false, $attr =
396
  $tax_args = [
397
  'taxonomy' => $tax,
398
  'hide_empty' => false,
399
- $exclude['type'] => ( $exclude_type == 'child_of' ) ? $exclude['childs'] : $attr['exclude'],
400
  'orderby' => isset( $attr['orderby'] ) ? $attr['orderby'] : 'name',
401
  'order' => isset( $attr['order'] ) ? $attr['order'] : 'ASC',
402
  ];
@@ -406,25 +414,27 @@ function wpuf_category_checklist( $post_id = 0, $selected_cats = false, $attr =
406
 
407
  echo wp_kses_post( '<ul class="wpuf-category-checklist">' );
408
  printf( '<input type="hidden" name="%s" value="0" />', esc_attr( $tax ) );
409
- echo wp_kses( call_user_func_array( [ &$walker, 'walk' ], [ $categories, 0, $args ] ), [
410
- 'li' => [
411
- 'class' => []
412
- ],
413
- 'label' => [
414
- 'class' => []
415
- ],
416
- 'input' => [
417
- 'class' => [],
418
- 'type' => [],
419
- 'value' => [],
420
- 'name' => [],
421
- 'id' => [],
422
- 'checked' => [],
423
- ],
424
- 'ul' => [
425
- 'class' => []
 
 
426
  ]
427
- ] );
428
  echo wp_kses_post( '</ul>' );
429
  }
430
 
@@ -442,12 +452,15 @@ function wpuf_get_field_settings_excludes( $field_settings, $exclude_type ) {
442
  $attributes = $field_settings['exclude'];
443
  $child_ids = [];
444
 
445
- if ( !empty( $attributes ) ) {
446
  foreach ( $attributes as $attr ) {
447
- $terms = get_terms( 'category', array(
448
- 'hide_empty' => false,
449
- 'parent' => $attr
450
- ) );
 
 
 
451
 
452
  foreach ( $terms as $term ) {
453
  array_push( $child_ids, $term->term_id );
@@ -460,8 +473,8 @@ function wpuf_get_field_settings_excludes( $field_settings, $exclude_type ) {
460
  }
461
 
462
  $excludes = [
463
- 'type' => $exclude_type,
464
- 'childs' => $child_ids
465
  ];
466
 
467
  return $excludes;
@@ -484,7 +497,7 @@ function wpuf_get_image_sizes() {
484
  $image_sizes = [];
485
 
486
  foreach ( $image_sizes_orig as $size ) {
487
- $image_sizes[$size] = $size;
488
  }
489
 
490
  return $image_sizes;
@@ -492,14 +505,38 @@ function wpuf_get_image_sizes() {
492
 
493
  function wpuf_allowed_extensions() {
494
  $extesions = [
495
- 'images' => ['ext' => 'jpg,jpeg,gif,png,bmp', 'label' => __( 'Images', 'wp-user-frontend' )],
496
- 'audio' => ['ext' => 'mp3,wav,ogg,wma,mka,m4a,ra,mid,midi', 'label' => __( 'Audio', 'wp-user-frontend' )],
497
- 'video' => ['ext' => 'avi,divx,flv,mov,ogv,mkv,mp4,m4v,divx,mpg,mpeg,mpe', 'label' => __( 'Videos', 'wp-user-frontend' )],
498
- 'pdf' => ['ext' => 'pdf', 'label' => __( 'PDF', 'wp-user-frontend' )],
499
- 'office' => ['ext' => 'doc,ppt,pps,xls,mdb,docx,xlsx,pptx,odt,odp,ods,odg,odc,odb,odf,rtf,txt', 'label' => __( 'Office Documents', 'wp-user-frontend' )],
500
- 'zip' => ['ext' => 'zip,gz,gzip,rar,7z', 'label' => __( 'Zip Archives', 'wp-user-frontend' )],
501
- 'exe' => ['ext' => 'exe', 'label' => __( 'Executable Files', 'wp-user-frontend' )],
502
- 'csv' => ['ext' => 'csv', 'label' => __( 'CSV', 'wp-user-frontend' )],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
503
  ];
504
 
505
  return apply_filters( 'wpuf_allowed_extensions', $extesions );
@@ -516,9 +553,9 @@ function wpuf_addpost_notice( $text ) {
516
  $user = wp_get_current_user();
517
 
518
  if ( is_user_logged_in() ) {
519
- $lock = ( $user->wpuf_postlock == 'yes' ) ? 'yes' : 'no';
520
 
521
- if ( $lock == 'yes' ) {
522
  return $user->wpuf_lock_cause;
523
  }
524
  }
@@ -553,7 +590,7 @@ function wpuf_associate_attachment( $attachment_id, $post_id ) {
553
  * @param array args
554
  */
555
  function wpuf_update_post( $args ) {
556
- if ( !wp_is_post_revision( $args['ID'] ) ) {
557
  // unhook this function so it doesn't loop infinitely
558
  remove_action( 'save_post', [ WPUF_Admin_Posting::init(), 'save_meta' ], 1 );
559
 
@@ -575,10 +612,11 @@ function wpuf_update_post( $args ) {
575
  * @return array
576
  */
577
  function wpuf_get_user_roles() {
578
- global $wp_roles;
579
-
580
- if ( !isset( $wp_roles ) ) {
581
- $wp_roles = new WP_Roles();
 
582
  }
583
 
584
  return $wp_roles->get_names();
@@ -661,7 +699,7 @@ function wpuf_get_avatar( $avatar, $id_or_email, $size, $default, $alt, $args )
661
  if ( is_numeric( $id_or_email ) ) {
662
  $user = get_user_by( 'id', $id_or_email );
663
  } elseif ( is_object( $id_or_email ) ) {
664
- if ( $id_or_email->user_id != '0' ) {
665
  $user = get_user_by( 'id', $id_or_email->user_id );
666
  } else {
667
  return $avatar;
@@ -737,7 +775,7 @@ function wpuf_update_avatar( $user_id, $attachment_id ) {
737
 
738
  $editor = wp_get_image_editor( $file_path );
739
 
740
- if ( !is_wp_error( $editor ) ) {
741
  $avatar_size = wpuf_get_option( 'avatar_size', 'wpuf_profile', '100x100' );
742
  $avatar_size = explode( 'x', $avatar_size );
743
  $avatar_width = $avatar_size[0];
@@ -756,7 +794,7 @@ function wpuf_update_avatar( $user_id, $attachment_id ) {
756
  // delete any previous avatar
757
  $prev_avatar = get_user_meta( $user_id, 'user_avatar', true );
758
 
759
- if ( !empty( $prev_avatar ) ) {
760
  $prev_avatar_path = str_replace( $upload_dir['baseurl'], $upload_dir['basedir'], $prev_avatar );
761
 
762
  if ( file_exists( $prev_avatar_path ) ) {
@@ -782,10 +820,10 @@ function wpuf_get_gateways( $context = 'admin' ) {
782
  $return = [];
783
 
784
  foreach ( $gateways as $id => $gate ) {
785
- if ( $context == 'admin' ) {
786
- $return[$id] = $gate['admin_label'];
787
  } else {
788
- $return[$id] = [
789
  'label' => $gate['checkout_label'],
790
  'icon' => isset( $gate['icon'] ) ? $gate['icon'] : '',
791
  ];
@@ -812,9 +850,9 @@ function wpuf_get_gateways( $context = 'admin' ) {
812
  function wpuf_show_custom_fields( $content ) {
813
  global $post;
814
 
815
- $show_custom = wpuf_get_option( 'cf_show_front', 'wpuf_frontend_posting' );
816
 
817
- if ( $show_custom != 'on' ) {
818
  return $content;
819
  }
820
 
@@ -822,7 +860,7 @@ function wpuf_show_custom_fields( $content ) {
822
  $form_id = get_post_meta( $post->ID, '_wpuf_form_id', true );
823
  $form_settings = wpuf_get_form_settings( $form_id );
824
 
825
- if ( !$form_id ) {
826
  return $content;
827
  }
828
 
@@ -834,14 +872,14 @@ function wpuf_show_custom_fields( $content ) {
834
  if ( $form_vars ) {
835
  foreach ( $form_vars as $attr ) {
836
  // get column field input fields
837
- if ( $attr['input_type'] == 'column_field' ) {
838
  $inner_fields = $attr['inner_fields'];
839
 
840
  foreach ( $inner_fields as $column_key => $column_fields ) {
841
- if ( !empty( $column_fields ) ) {
842
  // ignore section break and HTML input type
843
  foreach ( $column_fields as $column_field_key => $column_field ) {
844
- if ( isset( $column_field['show_in_post'] ) && $column_field['show_in_post'] == 'yes' ) {
845
  $meta[] = $column_field;
846
  }
847
  }
@@ -850,19 +888,19 @@ function wpuf_show_custom_fields( $content ) {
850
  continue;
851
  }
852
 
853
- if ( isset( $attr['show_in_post'] ) && $attr['show_in_post'] == 'yes' ) {
854
  $meta[] = $attr;
855
  }
856
  }
857
 
858
- if ( !$meta ) {
859
  return $content;
860
  }
861
 
862
  foreach ( $meta as $attr ) {
863
  $wpuf_field = wpuf()->fields->get_field( $attr['template'] );
864
 
865
- if ( !isset( $attr['name'] ) ) {
866
  $attr['name'] = $attr['input_type'];
867
  }
868
 
@@ -871,7 +909,7 @@ function wpuf_show_custom_fields( $content ) {
871
 
872
  $return_for_no_cond = 0;
873
 
874
- if ( isset( $attr['wpuf_cond']['condition_status'] ) && $attr['wpuf_cond']['condition_status'] == 'yes' ) {
875
  foreach ( $attr['wpuf_cond']['cond_field'] as $field_key => $cond_field_name ) {
876
 
877
  //check if the conditional field is a taxonomy
@@ -884,16 +922,16 @@ function wpuf_show_custom_fields( $content ) {
884
  $cond_field_value[] = $term_array->term_id;
885
  }
886
  }
887
- $cond_field_value = isset($post_terms[0]) ? $post_terms[0]->term_id : '';
888
  } else {
889
  $cond_field_value = get_post_meta( $post->ID, $cond_field_name, 'true' );
890
  }
891
 
892
- if ( isset( $attr['wpuf_cond']['cond_option'][$field_key] ) ) {
893
  if ( is_array( $cond_field_value ) ) {
894
  continue;
895
  } else {
896
- if ( $attr['wpuf_cond']['cond_option'][$field_key] != $cond_field_value ) {
897
  $return_for_no_cond = 1;
898
  } else {
899
  $return_for_no_cond = 0;
@@ -904,15 +942,15 @@ function wpuf_show_custom_fields( $content ) {
904
  }
905
  }
906
 
907
- if ( $return_for_no_cond == 1 ) {
908
  continue;
909
  }
910
 
911
- if ( !count( $field_value ) ) {
912
  continue;
913
  }
914
 
915
- if ( $attr['input_type'] == 'hidden' ) {
916
  continue;
917
  }
918
 
@@ -924,9 +962,9 @@ function wpuf_show_custom_fields( $content ) {
924
  switch ( $attr['input_type'] ) {
925
  case 'image_upload':
926
  case 'file_upload':
927
- $image_html = '<li style="list-style-type:none;">';
928
 
929
- if ( $hide_label == 'no' ) {
930
  $image_html .= '<label>' . $attr['label'] . ':</label> ';
931
  }
932
 
@@ -940,7 +978,7 @@ function wpuf_show_custom_fields( $content ) {
940
  }
941
 
942
  foreach ( $field_value as $attachment_id ) {
943
- if ( $attr['input_type'] == 'image_upload' ) {
944
  $image_size = wpuf_get_option( 'insert_photo_size', 'wpuf_frontend_posting', 'thumbnail' );
945
  $thumb = wp_get_attachment_image( $attachment_id, $image_size );
946
  } else {
@@ -958,9 +996,9 @@ function wpuf_show_custom_fields( $content ) {
958
  $allowed_video_extensions = explode( ',', $wpuf_allowed_extensions['video']['ext'] );
959
  $allowed_extenstions = array_merge( $allowed_audio_extensions, $allowed_video_extensions );
960
 
961
- if ( $playable == 'yes' && in_array( $extension, $allowed_extenstions ) ) {
962
- $is_video = in_array( $extension, $allowed_video_extensions );
963
- $is_audio = in_array( $extension, $allowed_audio_extensions );
964
  $preview_width = isset( $attr['preview_width'] ) ? $attr['preview_width'] : '123';
965
  $preview_height = isset( $attr['preview_height'] ) ? $attr['preview_height'] : '456';
966
 
@@ -979,18 +1017,18 @@ function wpuf_show_custom_fields( $content ) {
979
  $image_html .= sprintf( '<a href="%s">%s</a> ', $full_size, $thumb );
980
  }
981
 
982
- if ( $show_caption == 'on' ) {
983
  $post_detail = get_post( $attachment_id );
984
 
985
- if ( !empty( $post_detail->post_title ) ) {
986
  $image_html .= '<br /><label>' . __( 'Title', 'wp-user-frontend' ) . ':</label> <span class="image_title">' . esc_html( $post_detail->post_title ) . '</span>';
987
  }
988
 
989
- if ( !empty( $post_detail->post_excerpt ) ) {
990
  $image_html .= '<br /><label>' . __( 'Caption', 'wp-user-frontend' ) . ':</label> <span class="image_caption">' . esc_html( $post_detail->post_excerpt ) . '</span>';
991
  }
992
 
993
- if ( !empty( $post_detail->post_content ) ) {
994
  $image_html .= '<br /><label>' . __( 'Description', 'wp-user-frontend' ) . ':</label> <span class="image_description">' . esc_html( $post_detail->post_content ) . '</span>';
995
  }
996
  }
@@ -1012,7 +1050,7 @@ function wpuf_show_custom_fields( $content ) {
1012
  <div>
1013
  <a class="btn btn-brand btn-sm" href="https://www.google.com/maps/dir/?api=1&amp;destination=<?php echo esc_attr( $def_lat ); ?>,<?php echo esc_attr( $def_long ); ?>" target="_blank" rel="nofollow external"><?php esc_html_e( 'Directions »', 'wp-user-frontend' ); ?></a>
1014
  </div>
1015
- <?php
1016
  }
1017
 
1018
  $html .= ob_get_clean();
@@ -1025,16 +1063,16 @@ function wpuf_show_custom_fields( $content ) {
1025
 
1026
  if ( isset( $field_value[0] ) && is_array( $field_value[0] ) ) {
1027
  foreach ( $field_value[0] as $field_key => $value ) {
1028
- if ( $field_key == 'country_select' ) {
1029
- if ( isset( $countries[$value] ) ) {
1030
- $value = $countries[$value];
1031
  }
1032
  }
1033
 
1034
  $address_html .= '<li>';
1035
 
1036
- if ( $hide_label == 'no' ) {
1037
- $address_html .= '<label>' . $attr['address'][$field_key]['label'] . ': </label> ';
1038
  }
1039
 
1040
  $address_html .= ' ' . $value . '</li>';
@@ -1059,7 +1097,7 @@ function wpuf_show_custom_fields( $content ) {
1059
  if ( $new ) {
1060
  $html .= '<li>';
1061
 
1062
- if ( $hide_label == 'no' ) {
1063
  $html .= '<label>' . $attr['label'] . ': </label>';
1064
  }
1065
 
@@ -1074,16 +1112,16 @@ function wpuf_show_custom_fields( $content ) {
1074
  break;
1075
  }
1076
 
1077
- if ( $attr['template'] == 'embed' ) {
1078
  global $wp_embed;
1079
 
1080
  $preview_width = isset( $attr['preview_width'] ) ? $attr['preview_width'] : '123';
1081
  $preview_height = isset( $attr['preview_height'] ) ? $attr['preview_height'] : '456';
1082
  $shortcode = '[embed width="' . $preview_width . '" height="' . $preview_height . '"]' . $value . '[/embed]';
1083
 
1084
- $preview = '<li>';
1085
 
1086
- if ( $hide_label == 'no' ) {
1087
  $preview .= sprintf( '<label>%s: </label>', $attr['label'] );
1088
  }
1089
 
@@ -1096,11 +1134,11 @@ function wpuf_show_custom_fields( $content ) {
1096
  break;
1097
  }
1098
 
1099
- $open_in = $attr['open_window'] == 'same' ? '' : '_blank';
1100
 
1101
- $link = '<li>';
1102
 
1103
- if ( $hide_label == 'no' ) {
1104
  $link .= '<label>' . $attr['label'] . ':</label>';
1105
  }
1106
 
@@ -1114,7 +1152,7 @@ function wpuf_show_custom_fields( $content ) {
1114
 
1115
  $html .= '<li>';
1116
 
1117
- if ( $hide_label == 'no' ) {
1118
  $html .= '<label>' . $attr['label'] . ':</label>';
1119
  }
1120
 
@@ -1132,7 +1170,7 @@ function wpuf_show_custom_fields( $content ) {
1132
 
1133
  $html .= '<li>';
1134
 
1135
- if ( $hide_label == 'no' ) {
1136
  $html .= '<label>' . $attr['label'] . ':</label>';
1137
  }
1138
 
@@ -1144,7 +1182,7 @@ function wpuf_show_custom_fields( $content ) {
1144
  $filter_html = apply_filters( 'wpuf_custom_field_render', '', $value, $attr, $form_settings );
1145
  $separator = ' | ';
1146
 
1147
- if ( !empty( $filter_html ) ) {
1148
  $html .= $filter_html;
1149
  } elseif ( is_serialized( $value[0] ) ) {
1150
  $new = maybe_unserialize( $value[0] );
@@ -1153,20 +1191,20 @@ function wpuf_show_custom_fields( $content ) {
1153
  if ( $modified_value ) {
1154
  $html .= '<li>';
1155
 
1156
- if ( $hide_label == 'no' ) {
1157
  $html .= '<label>' . $attr['label'] . ':</label>';
1158
  }
1159
 
1160
  $html .= sprintf( ' %s</li>', make_clickable( $modified_value ) );
1161
  }
1162
- } elseif ( ( $attr['input_type'] == 'checkbox' || $attr['input_type'] == 'multiselect' ) && is_array( $value[0] ) ) {
1163
- if ( !empty( $value[0] ) ) {
1164
  $modified_value = implode( $separator, $value[0] );
1165
 
1166
  if ( $modified_value ) {
1167
  $html .= '<li>';
1168
 
1169
- if ( $hide_label == 'no' ) {
1170
  $html .= '<label>' . $attr['label'] . ':</label>';
1171
  }
1172
 
@@ -1179,7 +1217,7 @@ function wpuf_show_custom_fields( $content ) {
1179
  if ( $new ) {
1180
  $html .= '<li>';
1181
 
1182
- if ( $hide_label == 'no' ) {
1183
  $html .= '<label>' . $attr['label'] . ':</label>';
1184
  }
1185
 
@@ -1207,7 +1245,7 @@ add_filter( 'the_content', 'wpuf_show_custom_fields', 10 );
1207
  * @param array $args
1208
  */
1209
  function wpuf_shortcode_map( $location, $post_id = null, $args = [], $meta_key = '' ) {
1210
- if ( !wpuf()->is_pro() || !$location ) {
1211
  return;
1212
  }
1213
 
@@ -1220,7 +1258,11 @@ function wpuf_shortcode_map( $location, $post_id = null, $args = [], $meta_key =
1220
  return;
1221
  }
1222
 
1223
- $default = ['width' => 450, 'height' => 250, 'zoom' => 12];
 
 
 
 
1224
  $args = wp_parse_args( $args, $default );
1225
 
1226
  if ( is_array( $location ) ) {
@@ -1232,7 +1274,8 @@ function wpuf_shortcode_map( $location, $post_id = null, $args = [], $meta_key =
1232
  list( $def_lat, $def_long ) = explode( ',', $location );
1233
  $def_lat = $def_lat ? $def_lat : 0;
1234
  $def_long = $def_long ? $def_long : 0;
1235
- } ?>
 
1236
 
1237
  <div class="google-map" style="margin: 10px 0; height: <?php echo esc_attr( $args['height'] ); ?>px; width: <?php echo esc_attr( $args['width'] ); ?>px;" id="wpuf-map-<?php echo esc_attr( $meta_key . $post->ID ); ?>"></div>
1238
 
@@ -1281,7 +1324,7 @@ function wpuf_shortcode_map_user( $meta_key, $user_id = null, $args = [] ) {
1281
  function wpuf_shortcode_map_post( $meta_key, $post_id = null, $args = [] ) {
1282
  global $post;
1283
 
1284
- if ( !$post_id ) {
1285
  $post_id = $post->ID;
1286
  }
1287
 
@@ -1292,20 +1335,29 @@ function wpuf_shortcode_map_post( $meta_key, $post_id = null, $args = [] ) {
1292
  function wpuf_meta_shortcode( $atts ) {
1293
  global $post;
1294
 
1295
- extract( shortcode_atts( [
1296
- 'name' => '',
1297
- 'type' => 'normal',
1298
- 'size' => 'thumbnail',
1299
- 'height' => 250,
1300
- 'width' => 450,
1301
- 'zoom' => 12,
1302
- ], $atts ) );
 
 
 
 
 
 
 
 
 
1303
 
1304
  if ( empty( $name ) ) {
1305
  return;
1306
  }
1307
 
1308
- if ( $type == 'image' || $type == 'file' ) {
1309
  $images = get_post_meta( $post->ID, $name, true );
1310
 
1311
  if ( ! is_array( $images ) ) {
@@ -1316,7 +1368,7 @@ function wpuf_meta_shortcode( $atts ) {
1316
  $html = '';
1317
 
1318
  foreach ( $images as $attachment_id ) {
1319
- if ( $type == 'image' ) {
1320
  $thumb = wp_get_attachment_image( $attachment_id, $size );
1321
  } else {
1322
  $thumb = get_post_field( 'post_title', $attachment_id );
@@ -1328,14 +1380,20 @@ function wpuf_meta_shortcode( $atts ) {
1328
 
1329
  return $html;
1330
  }
1331
- } elseif ( $type == 'map' ) {
1332
  ob_start();
1333
- wpuf_shortcode_map( $name, $post->ID, ['width' => $width, 'height' => $height, 'zoom' => $zoom ] );
 
 
 
 
 
 
1334
 
1335
  return ob_get_clean();
1336
- } elseif ( $type == 'repeat' ) {
1337
  return implode( '; ', get_post_meta( $post->ID, $name ) );
1338
- } elseif ( $type == 'normal' ) {
1339
  return implode( ', ', get_post_meta( $post->ID, $name ) );
1340
  } else {
1341
  return make_clickable( implode( ', ', get_post_meta( $post->ID, $name ) ) );
@@ -1356,15 +1414,15 @@ add_shortcode( 'wpuf-meta', 'wpuf_meta_shortcode' );
1356
  function wpuf_get_option( $option, $section, $default = '' ) {
1357
  $options = get_option( $section );
1358
 
1359
- if ( isset( $options[$option] ) ) {
1360
- return $options[$option];
1361
  }
1362
 
1363
  return $default;
1364
  }
1365
 
1366
  /**
1367
- * check the current post for the existence of a short code
1368
  *
1369
  * @see http://wp.tutsplus.com/articles/quick-tip-improving-shortcodes-with-the-has_shortcode-function/
1370
  *
@@ -1373,9 +1431,9 @@ function wpuf_get_option( $option, $section, $default = '' ) {
1373
  * @return bool
1374
  */
1375
  function wpuf_has_shortcode( $shortcode = '', $post_id = false ) {
1376
- $post_to_check = ( $post_id == false ) ? get_post( get_the_ID() ) : get_post( $post_id );
1377
 
1378
- if ( !$post_to_check ) {
1379
  return false;
1380
  }
1381
 
@@ -1383,7 +1441,7 @@ function wpuf_has_shortcode( $shortcode = '', $post_id = false ) {
1383
  $found = false;
1384
 
1385
  // if no short code was provided, return false
1386
- if ( !$shortcode ) {
1387
  return $found;
1388
  }
1389
 
@@ -1414,7 +1472,7 @@ function wpuf_get_attachment_id_from_url( $attachment_url = '' ) {
1414
  $attachment_id = false;
1415
 
1416
  // If there is no url, return.
1417
- if ( '' == $attachment_url ) {
1418
  return;
1419
  }
1420
 
@@ -1431,7 +1489,7 @@ function wpuf_get_attachment_id_from_url( $attachment_url = '' ) {
1431
  $attachment_url = str_replace( $upload_dir_paths['baseurl'] . '/', '', $attachment_url );
1432
 
1433
  // Finally, run a custom database query to get the attachment ID from the modified attachment URL
1434
- $attachment_id = $wpdb->get_var( $wpdb->prepare( "SELECT wposts.ID FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = '_wp_attached_file' AND wpostmeta.meta_value = '%s' AND wposts.post_type = 'attachment'", $attachment_url ) );
1435
  }
1436
 
1437
  return $attachment_id;
@@ -1448,10 +1506,10 @@ function wpufe_ajax_tag_search() {
1448
  global $wpdb;
1449
 
1450
  $taxonomy = isset( $_GET['tax'] ) ? sanitize_text_field( wp_unslash( $_GET['tax'] ) ) : '';
1451
- $term_ids = isset( $_GET['term_ids'] ) ? sanitize_text_field( $_GET['term_ids'] ) : '';
1452
  $tax = get_taxonomy( $taxonomy );
1453
 
1454
- if ( !$tax ) {
1455
  wp_die( 0 );
1456
  }
1457
 
@@ -1465,7 +1523,7 @@ function wpufe_ajax_tag_search() {
1465
 
1466
  if ( false !== strpos( $s, ',' ) ) {
1467
  $s = explode( ',', $s );
1468
- $s = $s[count( $s ) - 1];
1469
  }
1470
 
1471
  $s = trim( $s );
@@ -1474,15 +1532,12 @@ function wpufe_ajax_tag_search() {
1474
  wp_die();
1475
  } // require 2 chars for matching
1476
 
1477
-
1478
-
1479
  if ( ! empty( $term_ids ) ) {
 
1480
  $results = $wpdb->get_col( $wpdb->prepare( "SELECT t.name FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id IN ($term_ids) AND t.name LIKE (%s)", $taxonomy, '%' . $wpdb->esc_like( $s ) . '%' ) );
1481
  } else {
1482
  $results = $wpdb->get_col( $wpdb->prepare( "SELECT t.name FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.name LIKE (%s)", $taxonomy, '%' . $wpdb->esc_like( $s ) . '%' ) );
1483
  }
1484
-
1485
-
1486
  echo esc_html( join( $results, "\n" ) );
1487
  wp_die();
1488
  }
@@ -1519,6 +1574,7 @@ function wpuf_dropdown_helper( $options, $selected = '' ) {
1519
  * @param string $file file name or path to file
1520
  */
1521
  function wpuf_load_template( $file, $args = [] ) {
 
1522
  if ( $args && is_array( $args ) ) {
1523
  extract( $args );
1524
  }
@@ -1547,6 +1603,7 @@ function wpuf_load_template( $file, $args = [] ) {
1547
  * @param string $file file name or path to file
1548
  */
1549
  function wpuf_load_pro_template( $file, $args = [] ) {
 
1550
  if ( $args && is_array( $args ) ) {
1551
  extract( $args );
1552
  }
@@ -1627,14 +1684,16 @@ function wpuf_date2mysql( $date, $gmt = 0 ) {
1627
  * @return array
1628
  */
1629
  function wpuf_get_form_fields( $form_id ) {
1630
- $fields = get_children( [
1631
- 'post_parent' => $form_id,
1632
- 'post_status' => 'publish',
1633
- 'post_type' => 'wpuf_input',
1634
- 'numberposts' => '-1',
1635
- 'orderby' => 'menu_order',
1636
- 'order' => 'ASC',
1637
- ] );
 
 
1638
 
1639
  $form_fields = [];
1640
 
@@ -1646,8 +1705,8 @@ function wpuf_get_form_fields( $form_id ) {
1646
  // Add inline property for radio and checkbox fields
1647
  $inline_supported_fields = [ 'radio', 'checkbox' ];
1648
 
1649
- if ( in_array( $field['input_type'], $inline_supported_fields ) ) {
1650
- if ( !isset( $field['inline'] ) ) {
1651
  $field['inline'] = 'no';
1652
  }
1653
  }
@@ -1655,8 +1714,8 @@ function wpuf_get_form_fields( $form_id ) {
1655
  // Add 'selected' property
1656
  $option_based_fields = [ 'select', 'multiselect', 'radio', 'checkbox' ];
1657
 
1658
- if ( in_array( $field['input_type'], $option_based_fields ) ) {
1659
- if ( !isset( $field['selected'] ) ) {
1660
  if ( 'select' === $field['input_type'] || 'radio' === $field['input_type'] ) {
1661
  $field['selected'] = '';
1662
  } else {
@@ -1666,7 +1725,7 @@ function wpuf_get_form_fields( $form_id ) {
1666
  }
1667
 
1668
  // Add 'multiple' key for input_type:repeat
1669
- if ( 'repeat' === $field['input_type'] && !isset( $field['multiple'] ) ) {
1670
  $field['multiple'] = '';
1671
  }
1672
 
@@ -1688,40 +1747,38 @@ add_action( 'wp_ajax_nopriv_wpuf_get_child_cat', 'wpuf_get_child_cats' );
1688
  * Returns child category dropdown on ajax request
1689
  */
1690
  function wpuf_get_child_cats() {
 
1691
 
1692
- $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
1693
-
1694
- $parentCat = isset( $_POST['catID'] ) ? sanitize_text_field( wp_unslash( $_POST['catID'] ) ) : '';
1695
- $field_attr = isset( $_POST['field_attr'] ) ? array_map('sanitize_text_field', wp_unslash( $_POST['field_attr'] ) ) : [];
1696
 
1697
- if ( isset( $nonce ) && ! wp_verify_nonce( $nonce, 'wpuf_nonce' ) ) {
1698
 
1699
- }
1700
  $allowed_tags = wp_kses_allowed_html( 'post' );
1701
 
1702
-
1703
- $taxonomy = $field_attr['name'];
1704
 
1705
  $terms = null;
1706
  $result = '';
1707
 
1708
- if ( $parentCat < 1 ) {
1709
  die( wp_kses( $result, $allowed_tags ) );
1710
  }
1711
 
1712
- if ( $terms = get_categories( 'taxonomy=' . $taxonomy . '&child_of=' . $parentCat . '&hide_empty=0' ) ) {
1713
- $field_attr['parent_cat'] = $parentCat;
 
 
1714
 
1715
  if ( is_array( $terms ) ) {
1716
  foreach ( $terms as $key => $term ) {
1717
- $terms[$key] = (array) $term;
1718
  }
1719
  }
1720
 
1721
- $field_attr[ 'form_id' ] = isset( $_POST['form_id'] ) ? absint( $_POST['form_id'] ) : 0;
1722
 
1723
  $result .= taxnomy_select( '', $field_attr );
1724
-
1725
  } else {
1726
  die( '' );
1727
  }
@@ -1735,17 +1792,17 @@ function taxnomy_select( $terms, $attr ) {
1735
  $exclude_type = isset( $attr['exclude_type'] ) ? $attr['exclude_type'] : 'exclude';
1736
  $exclude = isset( $attr['exclude'] ) ? $attr['exclude'] : '';
1737
 
1738
- $dataset = sprintf(
1739
  'data-required="%s" data-type="select" data-form-id="%d"',
1740
  $attr['required'],
1741
  $attr['form_id']
1742
- );
1743
 
1744
- if ( $exclude_type == 'child_of' && !empty( $exclude ) ) {
1745
  $exclude = $exclude[0];
1746
  }
1747
 
1748
- $tax_args = [
1749
  'show_option_none' => __( '-- Select --', 'wp-user-frontend' ),
1750
  'hierarchical' => 1,
1751
  'hide_empty' => 0,
@@ -1777,7 +1834,8 @@ function taxnomy_select( $terms, $attr ) {
1777
  //'last_term_id' => isset( $attr['parent_cat'] ) ? $attr['parent_cat'] : '',
1778
  //'term_id' => $selected
1779
  ];
1780
- $attr = apply_filters( 'wpuf_taxonomy_checklist_args', $attr ); ?>
 
1781
  <span data-taxonomy=<?php echo json_encode( $attr ); ?>></span>
1782
  <?php
1783
  }
@@ -1804,9 +1862,9 @@ function wpuf_get_form_settings( $form_id, $status = true ) {
1804
  * @return array
1805
  */
1806
  function wpuf_get_form_notifications( $form_id ) {
1807
- $notifications = get_post_meta( $form_id, 'notifications', true );
1808
 
1809
- if ( !$notifications ) {
1810
  return [];
1811
  }
1812
 
@@ -1823,9 +1881,9 @@ function wpuf_get_form_notifications( $form_id ) {
1823
  * @return array
1824
  */
1825
  function wpuf_get_form_integrations( $form_id ) {
1826
- $integrations = get_post_meta( $form_id, 'integrations', true );
1827
 
1828
- if ( !$integrations ) {
1829
  return [];
1830
  }
1831
 
@@ -1845,12 +1903,12 @@ function wpuf_get_form_integrations( $form_id ) {
1845
  function wpuf_is_integration_active( $form_id, $integration_id ) {
1846
  $integrations = wpuf_get_form_integrations( $form_id );
1847
 
1848
- if ( !$integrations ) {
1849
  return false;
1850
  }
1851
 
1852
  foreach ( $integrations as $id => $integration ) {
1853
- if ( $integration_id == $id && $integration->enabled == true ) {
1854
  return $integration;
1855
  }
1856
  }
@@ -1872,7 +1930,7 @@ function wpuf_get_subscription_page_url() {
1872
  /**
1873
  * Clear the buffer
1874
  *
1875
- * prevents ajax breakage and endless loading icon. A LIFE SAVER!!!
1876
  *
1877
  * @return void
1878
  */
@@ -1890,14 +1948,14 @@ function wpuf_clear_buffer() {
1890
  function wpuf_is_license_expired() {
1891
  $remote_addr = isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
1892
 
1893
- if ( in_array( $remote_addr, [ '127.0.0.1', '::1' ] ) ) {
1894
  return false;
1895
  }
1896
 
1897
  $license_status = get_option( 'wpuf_license_status' );
1898
 
1899
  // seems like this wasn't activated at all
1900
- if ( !isset( $license_status->update ) ) {
1901
  return false;
1902
  }
1903
 
@@ -1942,7 +2000,7 @@ function wpuf_get_post_form_templates() {
1942
  function wpuf_get_countries( $type = 'array' ) {
1943
  $countries = include __DIR__ . '/includes/countries-formated.php';
1944
 
1945
- if ( $type == 'json' ) {
1946
  $countries = json_encode( $countries );
1947
  }
1948
 
@@ -1958,11 +2016,26 @@ function wpuf_get_countries( $type = 'array' ) {
1958
  */
1959
  function wpuf_get_account_sections() {
1960
  $account_sections = [
1961
- [ 'slug' => 'dashboard', 'label' => __( 'Dashboard', 'wp-user-frontend' ) ],
1962
- [ 'slug' => 'posts', 'label' => __( 'Posts', 'wp-user-frontend' ) ],
1963
- [ 'slug' => 'edit-profile', 'label' => __( 'Edit Profile', 'wp-user-frontend' ) ],
1964
- [ 'slug' => 'subscription', 'label' => __( 'Subscription', 'wp-user-frontend' ) ],
1965
- [ 'slug' => 'billing-address', 'label' => __( 'Billing Address', 'wp-user-frontend' ) ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1966
  ];
1967
 
1968
  return apply_filters( 'wpuf_account_sections', $account_sections );
@@ -1981,7 +2054,7 @@ function wpuf_get_account_sections_list( $post_type = 'page' ) {
1981
 
1982
  if ( $sections ) {
1983
  foreach ( $sections as $section ) {
1984
- $array[$section['slug']] = esc_attr( $section['label'] );
1985
  }
1986
  }
1987
 
@@ -2010,7 +2083,7 @@ function wpuf_get_transactions( $args = [] ) {
2010
  if ( $args['count'] ) {
2011
  return $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}wpuf_transaction" );
2012
  }
2013
-
2014
  $result = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wpuf_transaction ORDER BY `{$args['orderby']}` {$args['order']} LIMIT {$args['offset']}, {$args['number']}", OBJECT );
2015
 
2016
  return $result;
@@ -2064,12 +2137,12 @@ function wpuf_get_pending_transactions( $args = [] ) {
2064
  'status' => 'pending',
2065
  'cost' => $info['price'],
2066
  'tax' => isset( $info['tax'] ) ? $info['tax'] : 0,
2067
- 'post_id' => ( $info['type'] == 'post' ) ? $info['item_number'] : 0,
2068
- 'pack_id' => ( $info['type'] == 'pack' ) ? $info['item_number'] : 0,
2069
  'payer_first_name' => $info['user_info']['first_name'],
2070
  'payer_last_name' => $info['user_info']['last_name'],
2071
  'payer_email' => $info['user_info']['email'],
2072
- 'payment_type' => ( $info['post_data']['wpuf_payment_method'] == 'bank' ) ? 'Bank/Manual' : ucwords( $info['post_data']['wpuf_payment_method'] ),
2073
  'transaction_id' => 0,
2074
  'created' => $info['date'],
2075
  ];
@@ -2089,59 +2162,271 @@ function wpuf_get_pending_transactions( $args = [] ) {
2089
  */
2090
  function wpuf_get_currencies() {
2091
  $currencies = [
2092
- [ 'currency' => 'AED', 'label' => __( 'United Arab Emirates Dirham', 'wp-user-frontend' ), 'symbol' => 'د.إ' ],
2093
- [ 'currency' => 'AUD', 'label' => __( 'Australian Dollars', 'wp-user-frontend' ), 'symbol' => '&#36;' ],
2094
- [ 'currency' => 'AZD', 'label' => __( 'Argentine Peso', 'wp-user-frontend' ), 'symbol' => '&#36;' ],
2095
- [ 'currency' => 'BDT', 'label' => __( 'Bangladeshi Taka', 'wp-user-frontend' ), 'symbol' => '&#2547;' ],
2096
- [ 'currency' => 'BRL', 'label' => __( 'Brazilian Real', 'wp-user-frontend' ), 'symbol' => '&#82;&#36;' ],
2097
- [ 'currency' => 'BGN', 'label' => __( 'Bulgarian Lev', 'wp-user-frontend' ), 'symbol' => '&#1083;&#1074;.' ],
2098
- [ 'currency' => 'CAD', 'label' => __( 'Canadian Dollars', 'wp-user-frontend' ), 'symbol' => '&#36;' ],
2099
- [ 'currency' => 'CLP', 'label' => __( 'Chilean Peso', 'wp-user-frontend' ), 'symbol' => '&#36;' ],
2100
- [ 'currency' => 'CNY', 'label' => __( 'Chinese Yuan', 'wp-user-frontend' ), 'symbol' => '&yen;' ],
2101
- [ 'currency' => 'COP', 'label' => __( 'Colombian Peso', 'wp-user-frontend' ), 'symbol' => '&#36;' ],
2102
- [ 'currency' => 'CZK', 'label' => __( 'Czech Koruna', 'wp-user-frontend' ), 'symbol' => '&#75;&#269;' ],
2103
- [ 'currency' => 'DKK', 'label' => __( 'Danish Krone', 'wp-user-frontend' ), 'symbol' => 'kr.' ],
2104
- [ 'currency' => 'DOP', 'label' => __( 'Dominican Peso', 'wp-user-frontend' ), 'symbol' => 'RD&#36;' ],
2105
- [ 'currency' => 'DZD', 'label' => __( 'Algerian Dinar', 'wp-user-frontend' ), 'symbol' => 'DA;' ],
2106
- [ 'currency' => 'EUR', 'label' => __( 'Euros', 'wp-user-frontend' ), 'symbol' => '&euro;' ],
2107
- [ 'currency' => 'HKD', 'label' => __( 'Hong Kong Dollar', 'wp-user-frontend' ), 'symbol' => '&#36;' ],
2108
- [ 'currency' => 'HRK', 'label' => __( 'Croatia kuna', 'wp-user-frontend' ), 'symbol' => 'Kn' ],
2109
- [ 'currency' => 'HUF', 'label' => __( 'Hungarian Forint', 'wp-user-frontend' ), 'symbol' => '&#70;&#116;' ],
2110
- [ 'currency' => 'ISK', 'label' => __( 'Icelandic krona', 'wp-user-frontend' ), 'symbol' => 'Kr.' ],
2111
- [ 'currency' => 'IDR', 'label' => __( 'Indonesia Rupiah', 'wp-user-frontend' ), 'symbol' => 'Rp' ],
2112
- [ 'currency' => 'INR', 'label' => __( 'Indian Rupee', 'wp-user-frontend' ), 'symbol' => '&#8377;' ],
2113
- [ 'currency' => 'NPR', 'label' => __( 'Nepali Rupee', 'wp-user-frontend' ), 'symbol' => 'Rs.' ],
2114
- [ 'currency' => 'ILS', 'label' => __( 'Israeli Shekel', 'wp-user-frontend' ), 'symbol' => '&#8362;' ],
2115
- [ 'currency' => 'JPY', 'label' => __( 'Japanese Yen', 'wp-user-frontend' ), 'symbol' => '&yen;' ],
2116
- [ 'currency' => 'KIP', 'label' => __( 'Lao Kip', 'wp-user-frontend' ), 'symbol' => '&#8365;' ],
2117
- [ 'currency' => 'KRW', 'label' => __( 'South Korean Won', 'wp-user-frontend' ), 'symbol' => '&#8361;' ],
2118
- [ 'currency' => 'MYR', 'label' => __( 'Malaysian Ringgits', 'wp-user-frontend' ), 'symbol' => '&#82;&#77;' ],
2119
- [ 'currency' => 'MXN', 'label' => __( 'Mexican Peso', 'wp-user-frontend' ), 'symbol' => '&#36;' ],
2120
- [ 'currency' => 'NGN', 'label' => __( 'Nigerian Naira', 'wp-user-frontend' ), 'symbol' => '&#8358;' ],
2121
- [ 'currency' => 'NOK', 'label' => __( 'Norwegian Krone', 'wp-user-frontend' ), 'symbol' => '&#107;&#114;' ],
2122
- [ 'currency' => 'NZD', 'label' => __( 'New Zealand Dollar', 'wp-user-frontend' ), 'symbol' => '&#36;' ],
2123
- [ 'currency' => 'NAD', 'label' => __( 'Namibian dollar', 'wp-user-frontend' ), 'symbol' => 'N&#36;' ],
2124
- [ 'currency' => 'OMR', 'label' => __( 'Omani Rial', 'wp-user-frontend' ), 'symbol' => 'ر.ع.' ],
2125
- [ 'currency' => 'IRR', 'label' => __( 'Iranian Rial', 'wp-user-frontend' ), 'symbol' => '' ],
2126
- [ 'currency' => 'PKR', 'label' => __( 'Pakistani Rupee', 'wp-user-frontend' ), 'symbol' => 'Rs' ],
2127
- [ 'currency' => 'PYG', 'label' => __( 'Paraguayan Guaraní', 'wp-user-frontend' ), 'symbol' => '&#8370;' ],
2128
- [ 'currency' => 'PHP', 'label' => __( 'Philippine Pesos', 'wp-user-frontend' ), 'symbol' => '&#8369;' ],
2129
- [ 'currency' => 'PLN', 'label' => __( 'Polish Zloty', 'wp-user-frontend' ), 'symbol' => '&#122;&#322;' ],
2130
- [ 'currency' => 'GBP', 'label' => __( 'Pounds Sterling', 'wp-user-frontend' ), 'symbol' => '&pound;' ],
2131
- [ 'currency' => 'RON', 'label' => __( 'Romanian Leu', 'wp-user-frontend' ), 'symbol' => 'lei' ],
2132
- [ 'currency' => 'RUB', 'label' => __( 'Russian Ruble', 'wp-user-frontend' ), 'symbol' => '&#1088;&#1091;&#1073;.' ],
2133
- [ 'currency' => 'SR', 'label' => __( 'Saudi Riyal', 'wp-user-frontend' ), 'symbol' => 'SR' ],
2134
- [ 'currency' => 'SGD', 'label' => __( 'Singapore Dollar', 'wp-user-frontend' ), 'symbol' => '&#36;' ],
2135
- [ 'currency' => 'ZAR', 'label' => __( 'South African rand', 'wp-user-frontend' ), 'symbol' => '&#82;' ],
2136
- [ 'currency' => 'SEK', 'label' => __( 'Swedish Krona', 'wp-user-frontend' ), 'symbol' => '&#107;&#114;' ],
2137
- [ 'currency' => 'CHF', 'label' => __( 'Swiss Franc', 'wp-user-frontend' ), 'symbol' => '&#67;&#72;&#70;' ],
2138
- [ 'currency' => 'TWD', 'label' => __( 'Taiwan New Dollars', 'wp-user-frontend' ), 'symbol' => '&#78;&#84;&#36;' ],
2139
- [ 'currency' => 'THB', 'label' => __( 'Thai Baht', 'wp-user-frontend' ), 'symbol' => '&#3647;' ],
2140
- [ 'currency' => 'TRY', 'label' => __( 'Turkish Lira', 'wp-user-frontend' ), 'symbol' => '&#8378;' ],
2141
- [ 'currency' => 'USD', 'label' => __( 'US Dollar', 'wp-user-frontend' ), 'symbol' => '&#36;' ],
2142
- [ 'currency' => 'VND', 'label' => __( 'Vietnamese Dong', 'wp-user-frontend' ), 'symbol' => '&#8363;' ],
2143
- [ 'currency' => 'EGP', 'label' => __( 'Egyptian Pound', 'wp-user-frontend' ), 'symbol' => 'EGP' ],
2144
- [ 'currency' => 'JOD', 'label' => __( 'Jordanian dinar', 'wp-user-frontend' ), 'symbol' => 'د.أ' ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2145
  ];
2146
 
2147
  return apply_filters( 'wpuf_currencies', $currencies );
@@ -2159,15 +2444,15 @@ function wpuf_get_currencies() {
2159
  function wpuf_get_currency( $type = '' ) {
2160
  $currency_code = wpuf_get_option( 'currency', 'wpuf_payment', 'USD' );
2161
 
2162
- if ( $type == 'code' ) {
2163
  return $currency_code;
2164
  }
2165
 
2166
  $currencies = wpuf_get_currencies();
2167
- $index = array_search( $currency_code, array_column( $currencies, 'currency' ) );
2168
  $currency = $currencies[ $index ];
2169
 
2170
- if ( $type == 'symbol' ) {
2171
  return $currency['symbol'];
2172
  }
2173
 
@@ -2186,19 +2471,19 @@ function get_wpuf_price_format() {
2186
  switch ( $currency_pos ) {
2187
  case 'left':
2188
  $format = '%1$s%2$s';
2189
- break;
2190
 
2191
  case 'right':
2192
  $format = '%2$s%1$s';
2193
- break;
2194
 
2195
  case 'left_space':
2196
  $format = '%1$s&nbsp;%2$s';
2197
- break;
2198
 
2199
  case 'right_space':
2200
  $format = '%2$s&nbsp;%1$s';
2201
- break;
2202
  }
2203
 
2204
  return apply_filters( 'wpuf_price_format', $format, $currency_pos );
@@ -2263,14 +2548,24 @@ function wpuf_trim_zeros( $price ) {
2263
  * @return mixed
2264
  */
2265
  function wpuf_format_price( $price, $formated = true, $args = [] ) {
2266
- extract( apply_filters( 'wpuf_price_args', wp_parse_args( $args, [
2267
- 'currency' => $formated ? wpuf_get_currency( 'symbol' ) : '',
2268
- 'decimal_separator' => wpuf_get_price_decimal_separator(),
2269
- 'thousand_separator' => $formated ? wpuf_get_price_thousand_separator() : '',
2270
- 'decimals' => wpuf_get_price_decimals(),
2271
- 'price_format' => get_wpuf_price_format(),
2272
- ] ) ) );
2273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2274
  $negative = $price < 0;
2275
  $price = apply_filters( 'wpuf_raw_price', floatval( $negative ? $price * -1 : $price ) );
2276
  $price = apply_filters( 'wpuf_formatted_price', number_format( $price, $decimals, $decimal_separator, $thousand_separator ), $price, $decimals, $decimal_separator, $thousand_separator );
@@ -2289,7 +2584,7 @@ function wpuf_format_price( $price, $formated = true, $args = [] ) {
2289
  *
2290
  * @since 2.4.3
2291
  */
2292
- if ( !function_exists( 'array_column' ) ) {
2293
  function array_column( $input, $column_key, $index_key = null ) {
2294
  $result = [];
2295
 
@@ -2313,7 +2608,7 @@ if ( !function_exists( 'array_column' ) ) {
2313
  function wpuf_duplicate_form( $post_id ) {
2314
  $post = get_post( $post_id );
2315
 
2316
- if ( !$post ) {
2317
  return;
2318
  }
2319
 
@@ -2332,10 +2627,12 @@ function wpuf_duplicate_form( $post_id ) {
2332
  }
2333
 
2334
  // update the post title to remove confusion
2335
- wp_update_post( [
2336
- 'ID' => $form_id,
2337
- 'post_title' => $post->post_title . ' (#' . $form_id . ')',
2338
- ] );
 
 
2339
 
2340
  if ( $form_id ) {
2341
  $form_settings = wpuf_get_form_settings( $post_id );
@@ -2394,15 +2691,17 @@ function wpuf_insert_form_field( $form_id, $field = [], $field_id = null, $order
2394
  * @return int
2395
  */
2396
  function wpuf_create_sample_form( $post_title = 'Sample Form', $post_type = 'wpuf_forms', $blank = false ) {
2397
- $form_id = wp_insert_post( [
2398
- 'post_title' => $post_title,
2399
- 'post_type' => $post_type,
2400
- 'post_status' => 'publish',
2401
- 'comment_status' => 'closed',
2402
- 'post_content' => '',
2403
- ] );
2404
-
2405
- if ( !$form_id ) {
 
 
2406
  return false;
2407
  }
2408
 
@@ -2424,7 +2723,7 @@ function wpuf_create_sample_form( $post_title = 'Sample Form', $post_type = 'wpu
2424
  'placeholder' => '',
2425
  'default' => '',
2426
  'size' => '40',
2427
- 'wpuf_cond' => [ ],
2428
  ],
2429
  [
2430
  'input_type' => 'textarea',
@@ -2441,7 +2740,7 @@ function wpuf_create_sample_form( $post_title = 'Sample Form', $post_type = 'wpu
2441
  'default' => '',
2442
  'rich' => 'teeny',
2443
  'insert_image' => 'yes',
2444
- 'wpuf_cond' => [ ],
2445
  ],
2446
  ];
2447
 
@@ -2543,13 +2842,13 @@ function wpuf_create_sample_form( $post_title = 'Sample Form', $post_type = 'wpu
2543
  ];
2544
  }
2545
 
2546
- if ( !empty( $form_fields ) && !$blank ) {
2547
  foreach ( $form_fields as $order => $field ) {
2548
  wpuf_insert_form_field( $form_id, $field, false, $order );
2549
  }
2550
  }
2551
 
2552
- if ( !empty( $settings ) ) {
2553
  update_post_meta( $form_id, 'wpuf_form_settings', $settings );
2554
  }
2555
 
@@ -2604,12 +2903,13 @@ function wpuf_delete_form( $form_id, $force = true ) {
2604
  wp_delete_post( $form_id, $force );
2605
 
2606
  // delete form inputs as WP doesn't know the relationship
2607
- $wpdb->delete( $wpdb->posts,
 
2608
  [
2609
  'post_parent' => $form_id,
2610
  'post_type' => 'wpuf_input',
2611
  ]
2612
- );
2613
  }
2614
 
2615
  /**
@@ -2622,11 +2922,10 @@ function wpuf_delete_form( $form_id, $force = true ) {
2622
  * @return string $post_status
2623
  */
2624
  function wpuf_get_draft_post_status( $form_settings ) {
2625
-
2626
  $noce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
2627
 
2628
  if ( isset( $nonce ) && ! wp_verify_nonce( $noce, 'wpuf_form_add' ) ) {
2629
- return ;
2630
  }
2631
 
2632
  $post_status = 'draft';
@@ -2634,8 +2933,8 @@ function wpuf_get_draft_post_status( $form_settings ) {
2634
  $charging_enabled = $current_user->subscription()->current_pack_id();
2635
  $user_wpuf_subscription_pack = get_user_meta( get_current_user_id(), '_wpuf_subscription_pack', true );
2636
 
2637
- if ( $charging_enabled && !isset( $_POST['post_id'] ) ) {
2638
- if ( !empty( $user_wpuf_subscription_pack ) ) {
2639
  if ( $current_user->subscription()->expired() ) {
2640
  $post_status = 'pending';
2641
  }
@@ -2656,7 +2955,7 @@ function wpuf_get_draft_post_status( $form_settings ) {
2656
  * @return array
2657
  */
2658
  function wpuf_admin_page_states( $state, $post ) {
2659
- if ( 'page' != $post->post_type ) {
2660
  return $state;
2661
  }
2662
 
@@ -2665,19 +2964,19 @@ function wpuf_admin_page_states( $state, $post ) {
2665
  preg_match_all( $pattern, $post->post_content, $matches );
2666
  $matches = array_unique( $matches[0] );
2667
 
2668
- if ( !empty( $matches ) ) {
2669
  $page = '';
2670
  $shortcode = $matches[0];
2671
 
2672
- if ( '[wpuf_account]' == $shortcode ) {
2673
  $page = 'WPUF Account Page';
2674
- } elseif ( '[wpuf_edit]' == $shortcode ) {
2675
  $page = 'WPUF Post Edit Page';
2676
- } elseif ( '[wpuf-login]' == $shortcode ) {
2677
  $page = 'WPUF Login Page';
2678
- } elseif ( '[wpuf_sub_pack]' == $shortcode ) {
2679
  $page = 'WPUF Subscription Page';
2680
- } elseif ( '[wpuf_editprofile]' == $shortcode ) {
2681
  $page = 'WPUF Profile Edit Page';
2682
  } elseif ( stristr( $shortcode, '[wpuf_dashboard' ) ) {
2683
  $page = 'WPUF Dashboard Page';
@@ -2689,7 +2988,7 @@ function wpuf_admin_page_states( $state, $post ) {
2689
  $page = 'WPUF Form Page';
2690
  }
2691
 
2692
- if ( !empty( $page ) ) {
2693
  $state['wpuf'] = $page;
2694
  }
2695
  }
@@ -2765,7 +3064,7 @@ function wpuf_send_mail_to_guest( $post_id_encoded, $form_id_encoded, $charging_
2765
  'post_msg' => 'verified',
2766
  'f' => 2,
2767
  ], get_home_url()
2768
- );
2769
  } else {
2770
  $encoded_guest_url = add_query_arg(
2771
  [
@@ -2774,16 +3073,16 @@ function wpuf_send_mail_to_guest( $post_id_encoded, $form_id_encoded, $charging_
2774
  'post_msg' => 'verified',
2775
  'f' => 1,
2776
  ], get_home_url()
2777
- );
2778
  }
2779
 
2780
- $default_body = 'Hey There,' . '<br>' . '<br>' . 'We just received your guest post and now we want you to confirm your email so that we can verify the content and move on to the publishing process.' . '<br>' . '<br>' . 'Please click the link below to verify:' . '<br>' . '<br>' . '<a href="' . $encoded_guest_url . '">Publish Post</a>' . '<br>' . '<br>' . 'Regards,' . '<br>' . '<br>' . bloginfo( 'name' );
2781
  $to = isset( $_POST['guest_email'] ) ? sanitize_email( wp_unslash( $_POST['guest_email'] ) ) : '';
2782
  $guest_email_sub = wpuf_get_option( 'guest_email_subject', 'wpuf_mails', 'Please Confirm Your Email to Get the Post Published!' );
2783
  $subject = $guest_email_sub;
2784
  $guest_email_body = wpuf_get_option( 'guest_email_body', 'wpuf_mails', $default_body );
2785
 
2786
- if ( !empty( $guest_email_body ) ) {
2787
  $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
2788
  $field_search = [ '{activation_link}', '{sitename}' ];
2789
 
@@ -2797,7 +3096,7 @@ function wpuf_send_mail_to_guest( $post_id_encoded, $form_id_encoded, $charging_
2797
  $body = $default_body;
2798
  }
2799
 
2800
- $body = get_formatted_mail_body( $body, $subject );
2801
 
2802
  wp_mail( $to, $subject, $body );
2803
  }
@@ -2812,7 +3111,7 @@ function wpuf_send_mail_to_guest( $post_id_encoded, $form_id_encoded, $charging_
2812
  function is_wpuf_post_form_builder() {
2813
  $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
2814
 
2815
- return $page == 'wpuf-post-forms' ? true : false;
2816
  }
2817
 
2818
  /**
@@ -2825,7 +3124,7 @@ function is_wpuf_post_form_builder() {
2825
  function is_wpuf_profile_form_builder() {
2826
  $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
2827
 
2828
- return $page == 'wpuf-profile-forms' ? true : false;
2829
  }
2830
 
2831
  /**
@@ -2838,7 +3137,7 @@ function is_wpuf_profile_form_builder() {
2838
  * @return \WPUF_User
2839
  */
2840
  function wpuf_get_user( $user = null ) {
2841
- if ( !$user ) {
2842
  $user = wp_get_current_user();
2843
  }
2844
 
@@ -2858,14 +3157,18 @@ function wpuf_set_all_terms_as_allowed() {
2858
  $allowed_term = [];
2859
 
2860
  foreach ( $subscriptions as $pack ) {
2861
- if ( !metadata_exists( 'post', $pack->ID, '_sub_allowed_term_ids' ) ) {
2862
- $cts = get_taxonomies( ['_builtin'=>true], 'objects' ); ?>
2863
- <?php foreach ( $cts as $ct ) {
 
 
2864
  if ( is_taxonomy_hierarchical( $ct->name ) ) {
2865
- $tax_terms = get_terms( [
2866
- 'taxonomy' => $ct->name,
2867
- 'hide_empty' => false,
2868
- ] );
 
 
2869
 
2870
  foreach ( $tax_terms as $tax_term ) {
2871
  $allowed_term[] = $tax_term->term_id;
@@ -2873,13 +3176,17 @@ function wpuf_set_all_terms_as_allowed() {
2873
  }
2874
  }
2875
 
2876
- $cts = get_taxonomies( ['_builtin'=>false], 'objects' ); ?>
2877
- <?php foreach ( $cts as $ct ) {
 
 
2878
  if ( is_taxonomy_hierarchical( $ct->name ) ) {
2879
- $tax_terms = get_terms( [
2880
- 'taxonomy' => $ct->name,
2881
- 'hide_empty' => false,
2882
- ] );
 
 
2883
 
2884
  foreach ( $tax_terms as $tax_term ) {
2885
  $allowed_term[] = $tax_term->term_id;
@@ -2894,7 +3201,7 @@ function wpuf_set_all_terms_as_allowed() {
2894
  }
2895
 
2896
  /**
2897
- * post submitted by form
2898
  *
2899
  * @since 2.8
2900
  *
@@ -2903,7 +3210,7 @@ function wpuf_set_all_terms_as_allowed() {
2903
  * @return List of WP_Post objects
2904
  */
2905
  function wpuf_posts_submitted_by( $form_id ) {
2906
- $settings = wpuf_get_form_settings( $form_id );
2907
  $settings['post_type'];
2908
  $args = [
2909
  'meta_key' => '_wpuf_form_id',
@@ -2917,7 +3224,7 @@ function wpuf_posts_submitted_by( $form_id ) {
2917
  }
2918
 
2919
  /**
2920
- * count post submitted by form
2921
  *
2922
  * @since 2.8
2923
  *
@@ -2950,7 +3257,7 @@ function get_formatted_mail_body( $message, $subject ) {
2950
  wpuf_load_pro_template(
2951
  'email/header.php',
2952
  [ 'subject' => $subject ]
2953
- );
2954
 
2955
  $header = ob_get_clean();
2956
  }
@@ -2961,7 +3268,7 @@ function get_formatted_mail_body( $message, $subject ) {
2961
  wpuf_load_pro_template(
2962
  'email/footer.php',
2963
  []
2964
- );
2965
 
2966
  $footer = ob_get_clean();
2967
  }
@@ -2971,13 +3278,13 @@ function get_formatted_mail_body( $message, $subject ) {
2971
  wpuf_load_pro_template(
2972
  'email/style.php',
2973
  []
2974
- );
2975
 
2976
  $css = apply_filters( 'wpuf_email_style', ob_get_clean() );
2977
 
2978
  $content = $header . '<pre>' . $message . '</pre>' . $footer;
2979
 
2980
- if ( !class_exists( 'Emogrifier' ) ) {
2981
  require_once WPUF_PRO_INCLUDES . '/libs/Emogrifier.php';
2982
  }
2983
 
@@ -3013,8 +3320,8 @@ function wpuf_select( $args = [] ) {
3013
  'chosen' => false,
3014
  'placeholder' => null,
3015
  'multiple' => false,
3016
- 'show_option_all' => __( 'All', 'wp-user-frontend', 'wp-user-frontend' ),
3017
- 'show_option_none' => __( 'None', 'wp-user-frontend', 'wp-user-frontend' ),
3018
  'data' => [],
3019
  'readonly' => false,
3020
  'disabled' => false,
@@ -3064,24 +3371,24 @@ function wpuf_select( $args = [] ) {
3064
  $class = implode( ' ', array_map( 'sanitize_html_class', explode( ' ', $args['class'] ) ) );
3065
  $output = '<select' . $disabled . $readonly . ' name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( str_replace( '-', '_', $args['id'] ) ) . '" class="wpuf-select ' . $class . '"' . $multiple . ' data-placeholder="' . $placeholder . '"' . $data_elements . '>';
3066
 
3067
- if ( !isset( $args['selected'] ) || ( is_array( $args['selected'] ) && empty( $args['selected'] ) ) || !$args['selected'] ) {
3068
  $selected = '';
3069
  }
3070
 
3071
  if ( $args['show_option_all'] ) {
3072
- if ( $args['multiple'] && !empty( $args['selected'] ) ) {
3073
- $selected = selected( true, in_array( 0, $args['selected'] ), false );
3074
  } else {
3075
  $selected = selected( $args['selected'], 0, false );
3076
  }
3077
  $output .= '<option value="all"' . $selected . '>' . esc_html( $args['show_option_all'] ) . '</option>';
3078
  }
3079
 
3080
- if ( !empty( $args['options'] ) ) {
3081
  if ( $args['show_option_none'] ) {
3082
  if ( $args['multiple'] ) {
3083
- $selected = selected( true, in_array( -1, $args['selected'] ), false );
3084
- } elseif ( isset( $args['selected'] ) && !is_array( $args['selected'] ) && !empty( $args['selected'] ) ) {
3085
  $selected = selected( $args['selected'], -1, false );
3086
  }
3087
  $output .= '<option value="-1"' . $selected . '>' . esc_html( $args['show_option_none'] ) . '</option>';
@@ -3089,8 +3396,8 @@ function wpuf_select( $args = [] ) {
3089
 
3090
  foreach ( $args['options'] as $key => $option ) {
3091
  if ( $args['multiple'] && is_array( $args['selected'] ) ) {
3092
- $selected = selected( true, in_array( (string) $key, $args['selected'] ), false );
3093
- } elseif ( isset( $args['selected'] ) && !is_array( $args['selected'] ) ) {
3094
  $selected = selected( $args['selected'], $key, false );
3095
  }
3096
 
@@ -3135,7 +3442,7 @@ function wpuf_text( $args = [] ) {
3135
 
3136
  $data = '';
3137
 
3138
- if ( !empty( $args['data'] ) ) {
3139
  foreach ( $args['data'] as $key => $value ) {
3140
  $data .= 'data-' . $key . '="' . esc_attr( $value ) . '" ';
3141
  }
@@ -3143,11 +3450,11 @@ function wpuf_text( $args = [] ) {
3143
 
3144
  $output = '<span id="wpuf-' . $args['name'] . '-wrap">';
3145
 
3146
- if ( !empty( $args['label'] ) ) {
3147
  $output .= '<label class="wpuf-label" for="' . $args['id'] . '">' . esc_html( $args['label'] ) . '</label>';
3148
  }
3149
 
3150
- if ( !empty( $args['desc'] ) ) {
3151
  $output .= '<span class="wpuf-description">' . wp_kses_post( $args['desc'] ) . '</span>';
3152
  }
3153
 
@@ -3185,7 +3492,7 @@ function wpuf_update_option( $option, $section, $value ) {
3185
  $options = array();
3186
  }
3187
 
3188
- $options[$option] = $value;
3189
 
3190
  update_option( $section, $options );
3191
  }
@@ -3202,14 +3509,15 @@ function wpuf_update_option( $option, $section, $value ) {
3202
  function wpuf_get_terms( $taxonomy = 'category' ) {
3203
  $items = [];
3204
 
3205
- $terms = get_terms( [
 
3206
  'taxonomy' => $taxonomy,
3207
  'hide_empty' => false,
3208
  ]
3209
- );
3210
 
3211
  foreach ( $terms as $key => $term ) {
3212
- $items[$term->term_id] = $term->name;
3213
  }
3214
 
3215
  return $items;
@@ -3226,9 +3534,9 @@ function wpuf_ajax_get_states_field() {
3226
  $country = isset( $_POST['country'] ) ? sanitize_text_field( wp_unslash( $_POST['country'] ) ) : '';
3227
  $cs = new CountryState();
3228
  $countries = $cs->countries();
3229
- $states = $cs->getStates( $countries[$country] );
3230
 
3231
- if ( !empty( $states ) ) {
3232
  $args = [
3233
  'name' => isset( $_POST['field_name'] ) ? sanitize_text_field( wp_unslash( $_POST['field_name'] ) ) : '',
3234
  'id' => isset( $_POST['field_name'] ) ? sanitize_text_field( wp_unslash( $_POST['field_name'] ) ) : '',
@@ -3243,8 +3551,7 @@ function wpuf_ajax_get_states_field() {
3243
  $response = 'nostates';
3244
  }
3245
 
3246
- wp_send_json( $response ) ; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
3247
-
3248
  }
3249
  add_action( 'wp_ajax_wpuf-ajax-address', 'wpuf_ajax_get_states_field' );
3250
  add_action( 'wp_ajax_nopriv_wpuf-ajax-address', 'wpuf_ajax_get_states_field' );
@@ -3255,23 +3562,19 @@ add_action( 'wp_ajax_nopriv_wpuf-ajax-address', 'wpuf_ajax_get_states_field' );
3255
  * @return void
3256
  */
3257
  function wpuf_update_billing_address() {
3258
- $nonce = isset( $_POST['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_wpnonce'] ) ) : '';
3259
-
3260
- if ( ! wp_verify_nonce( $nonce, 'wpuf-ajax-address' ) ) {
3261
- return ;
3262
- }
3263
 
3264
  ob_start();
3265
 
3266
  $user_id = get_current_user_id();
3267
- $add_line_1 = isset( $_POST['billing_add_line1'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_add_line1'] ) ) : '';
3268
- $add_line_2 = isset( $_POST['billing_add_line2'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_add_line2'] ) ) : '';
3269
- $city = isset( $_POST['billing_city'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_city'] ) ) : '';
3270
- $state = isset( $_POST['billing_state'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_state'] ) ) : '';
3271
- $zip = isset( $_POST['billing_zip'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_zip'] ) ) : '';
3272
- $country = isset( $_POST['billing_country'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_country'] ) ) : '';
3273
- $type = isset( $_POST['type'] ) ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : '';
3274
- $id = isset( $_POST['id'] ) ? sanitize_text_field( wp_unslash( $_POST['id'] ) ) : '';
3275
 
3276
  $address_fields = [
3277
  'add_line_1' => $add_line_1,
@@ -3325,10 +3628,10 @@ function wpuf_get_user_address( $user_id = 0 ) {
3325
  $countries_obj = new WC_Countries();
3326
  $countries_array = $countries_obj->get_countries();
3327
  $country_states_array = $countries_obj->get_states();
3328
- $woo_address['state'] = isset( $country_states_array[$woo_address['country']][$woo_address['state']] ) ? $country_states_array[$woo_address['country']][$woo_address['state']] : '';
3329
  $woo_address['state'] = strtolower( str_replace( ' ', '', $woo_address['state'] ) );
3330
 
3331
- if ( !empty( $woo_address ) ) {
3332
  $address_fields = [
3333
  'add_line_1' => $woo_address['address_1'],
3334
  'add_line_2' => $woo_address['address_2'],
@@ -3353,30 +3656,32 @@ function wpuf_settings_multiselect( $args ) {
3353
  $settings = new WeDevs_Settings_API();
3354
  $value = $settings->get_option( $args['id'], $args['section'], $args['std'] );
3355
  $value = is_array( $value ) ? (array) $value : [];
3356
- $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
3357
  $html = sprintf( '<select multiple="multiple" class="%1$s" name="%2$s[%3$s][]" id="%2$s[%3$s]">', $size, $args['section'], $args['id'] );
3358
 
3359
  foreach ( $args['options'] as $key => $label ) {
3360
- $checked = in_array( $key, $value ) ? $key : '0';
3361
  $html .= sprintf( '<option value="%s"%s>%s</option>', $key, selected( $checked, $key, false ), $label );
3362
  }
3363
 
3364
  $html .= sprintf( '</select>' );
3365
  $html .= $settings->get_field_description( $args );
3366
 
3367
- echo wp_kses( $html, [
3368
- 'p' => [],
3369
- 'select' => [
3370
- 'multiple' => [],
3371
- 'class' => [],
3372
- 'name' => [],
3373
- 'id' => [],
3374
- ],
3375
- 'option' => [
3376
- 'value' => [],
3377
- 'selected' => []
 
 
3378
  ]
3379
- ] );
3380
  }
3381
 
3382
  /**
@@ -3388,11 +3693,11 @@ function wpuf_settings_multiselect( $args ) {
3388
  */
3389
  function wpuf_show_form_schedule_message( $form_id ) {
3390
  $form_settings = wpuf_get_form_settings( $form_id );
3391
- $is_scheduled = ( isset( $form_settings['schedule_form'] ) && $form_settings['schedule_form'] == 'true' ) ? true : false;
3392
 
3393
  if ( $is_scheduled ) {
3394
- $start_time = !empty( $form_settings['schedule_start'] ) ? strtotime( $form_settings['schedule_start'] ) : 0;
3395
- $end_time = !empty( $form_settings['schedule_end'] ) ? strtotime( $form_settings['schedule_end'] ) : 0;
3396
  $current_time = current_time( 'timestamp' );
3397
 
3398
  if ( $current_time >= $start_time && $current_time <= $end_time ) {
@@ -3404,7 +3709,8 @@ function wpuf_show_form_schedule_message( $form_id ) {
3404
  echo wp_kses_post( '<div class="wpuf-message">' . $form_settings['form_pending_message'] . '</div>' );
3405
  } elseif ( $current_time > $end_time ) {
3406
  echo wp_kses_post( '<div class="wpuf-message">' . $form_settings['form_expired_message'] . '</div>' );
3407
- } ?>
 
3408
  <script>
3409
  jQuery( function($) {
3410
  $(".wpuf-submit-button").attr("disabled", "disabled");
@@ -3425,21 +3731,21 @@ add_action( 'wpuf_before_form_render', 'wpuf_show_form_schedule_message' );
3425
  */
3426
  function wpuf_show_form_limit_message( $form_id ) {
3427
  $form_settings = wpuf_get_form_settings( $form_id );
3428
- $has_limit = ( isset( $form_settings['limit_entries'] ) && $form_settings['limit_entries'] == 'true' ) ? true : false;
3429
- $post_to_check = get_post( get_the_ID() );
3430
  $is_edit_page = false;
3431
 
3432
- if ( stripos( $post_to_check->post_content, '[' . 'wpuf_edit' ) !== false ) {
3433
  $is_edit_page = true;
3434
  }
3435
 
3436
- if ( $has_limit && !$is_edit_page ) {
3437
- $limit = (int) !empty( $form_settings['limit_number'] ) ? $form_settings['limit_number'] : 0;
3438
  $form_entries = wpuf_form_posts_count( $form_id );
3439
 
3440
  if ( $limit && $limit <= $form_entries ) {
3441
  $info = $form_settings['limit_message'];
3442
- echo wp_kses_post( '<div class="wpuf-info">' . $info . '</div>');
3443
  ?>
3444
  <script>
3445
  jQuery( function($) {
@@ -3455,7 +3761,7 @@ function wpuf_show_form_limit_message( $form_id ) {
3455
  add_action( 'wpuf_before_form_render', 'wpuf_show_form_limit_message' );
3456
 
3457
  /**
3458
- * save frontend post revision
3459
  *
3460
  * @param int $post_id
3461
  * @param array $form_settings
@@ -3466,7 +3772,12 @@ function wpuf_frontend_post_revision( $post_id, $form_settings ) {
3466
  $post = get_post( $post_id );
3467
 
3468
  if ( post_type_supports( $form_settings['post_type'], 'revisions' ) ) {
3469
- $revisions = wp_get_post_revisions( $post_id, [ 'order' => 'ASC', 'posts_per_page' => 1 ] );
 
 
 
 
 
3470
  $revision = current( $revisions );
3471
 
3472
  _wp_upgrade_revisions_of_post( $post, wp_get_post_revisions( $post_id ) );
@@ -3494,7 +3805,7 @@ function wpuf_ini_get_byte( $val ) {
3494
  $byte = absint( $val );
3495
  $char = strtolower( str_replace( $byte, '', $val ) );
3496
 
3497
- switch( $char ) {
3498
  case 'g':
3499
  $byte *= GB_IN_BYTES;
3500
  break;
23
  * @author Tareq Hasan
24
  */
25
  function wpuf_show_post_status( $status ) {
26
+ if ( 'publish' === $status ) {
27
  $title = __( 'Live', 'wp-user-frontend' );
28
  $fontcolor = '#33CC33';
29
+ } elseif ( 'draft' === $status ) {
30
  $title = __( 'Offline', 'wp-user-frontend' );
31
  $fontcolor = '#bbbbbb';
32
+ } elseif ( 'pending' === $status ) {
33
  $title = __( 'Awaiting Approval', 'wp-user-frontend' );
34
  $fontcolor = '#C00202';
35
+ } elseif ( 'future' === $status ) {
36
  $title = __( 'Scheduled', 'wp-user-frontend' );
37
  $fontcolor = '#bbbbbb';
38
+ } elseif ( 'private' === $status ) {
39
  $title = __( 'Private', 'wp-user-frontend' );
40
  $fontcolor = '#bbbbbb';
41
  }
54
  * @author Tareq Hasan
55
  */
56
  function wpuf_admin_post_status( $status ) {
57
+ if ( 'publish' === $status ) {
58
  $title = __( 'Published', 'wp-user-frontend' );
59
  $fontcolor = '#009200';
60
+ } elseif ( 'draft' === $status || 'private' === $status ) {
61
  $title = __( 'Draft', 'wp-user-frontend' );
62
  $fontcolor = '#bbbbbb';
63
+ } elseif ( 'pending' === $status ) {
64
  $title = __( 'Pending', 'wp-user-frontend' );
65
  $fontcolor = '#C00202';
66
+ } elseif ( 'future' === $status ) {
67
  $title = __( 'Scheduled', 'wp-user-frontend' );
68
  $fontcolor = '#bbbbbb';
69
  }
77
  * @param <type> $post_id
78
  */
79
  function wpuf_upload_attachment( $post_id ) {
80
+ if ( ! isset( $_FILES['wpuf_post_attachments'] ) ) {
81
  return false;
82
  }
83
 
 
 
84
  $fields = (int) wpuf_get_option( 'attachment_num' );
85
 
86
  $wpuf_post_attachments = isset( $_FILES['wpuf_post_attachments'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_FILES['wpuf_post_attachments'] ) ) : [];
87
 
88
  for ( $i = 0; $i < $fields; $i++ ) {
89
+ $file_name = basename( $wpuf_post_attachments['name'][ $i ] );
90
 
91
  if ( $file_name ) {
92
  if ( $file_name ) {
93
  $upload = [
94
+ 'name' => $wpuf_post_attachments['name'][ $i ],
95
+ 'type' => $wpuf_post_attachments['type'][ $i ],
96
+ 'tmp_name' => $wpuf_post_attachments['tmp_name'][ $i ],
97
+ 'error' => $wpuf_post_attachments['error'][ $i ],
98
+ 'size' => $wpuf_post_attachments['size'][ $i ],
99
  ];
100
 
101
  wp_handle_upload( $upload );
143
  * @author Tareq Hasan
144
  */
145
  function wpuf_unset_media_tab( $list ) {
146
+ if ( ! current_user_can( 'edit_posts' ) ) {
147
  unset( $list['library'] );
148
  unset( $list['gallery'] );
149
  }
166
  $post_types = get_post_types( $args );
167
 
168
  $ignore_post_types = [
169
+ 'attachment',
170
+ 'revision',
171
+ 'nav_menu_item',
172
  ];
173
 
174
  foreach ( $post_types as $key => $val ) {
175
+ if ( in_array( $val, $ignore_post_types, true ) ) {
176
+ unset( $post_types[ $key ] );
177
  }
178
  }
179
 
194
 
195
  if ( $users ) {
196
  foreach ( $users as $user ) {
197
+ $list[ $user->ID ] = $user->user_login;
198
  }
199
  }
200
 
208
  */
209
  function wpuf_get_pages( $post_type = 'page' ) {
210
  $array = [ '' => __( '-- select --', 'wp-user-frontend' ) ];
211
+ $pages = get_posts(
212
+ [
213
+ 'post_type' => $post_type,
214
+ 'numberposts' => - 1,
215
+ 'no_found_rows' => true,
216
+ 'update_post_meta_cache' => false,
217
+ 'update_post_term_cache' => false,
218
+ ]
219
+ );
220
 
221
  if ( $pages ) {
222
  foreach ( $pages as $page ) {
244
 
245
  $override = wpuf_get_option( 'override_editlink', 'wpuf_general', 'no' );
246
 
247
+ if ( $override === 'yes' ) {
248
  $url = '';
249
 
250
+ if ( 'yes' === wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard', 'yes' ) ) {
251
  $edit_page = (int) wpuf_get_option( 'edit_page_id', 'wpuf_frontend_posting' );
252
  $url = get_permalink( $edit_page );
253
 
281
  *
282
  * @var array
283
  */
284
+ public $db_fields = [
285
+ 'parent' => 'parent',
286
+ 'id' => 'term_id',
287
+ ];
288
 
289
  /**
290
  * @see Walker::start_el()
300
  $cat_name = apply_filters( 'list_cats', $category->name, $category );
301
  $output .= "\t<option class=\"level-$depth\" value=\"" . $category->term_id . '"';
302
 
303
+ if ( in_array( $category->term_id, $args['selected'], true ) ) {
304
  $output .= ' selected="selected"';
305
  }
306
 
323
  class WPUF_Walker_Category_Checklist extends Walker {
324
  public $tree_type = 'category';
325
 
326
+ public $db_fields = [
327
+ 'parent' => 'parent',
328
+ 'id' => 'term_id',
329
+ ]; //TODO: decouple this
330
 
331
  public function start_lvl( &$output, $depth = 0, $args = [] ) {
332
  $indent = str_repeat( "\t", $depth );
339
  }
340
 
341
  public function start_el( &$output, $category, $depth = 0, $args = [], $current_object_id = 0 ) {
342
+ $taxonomy = $args['taxonomy'];
343
 
344
  if ( empty( $taxonomy ) ) {
345
  $taxonomy = 'category';
346
  }
347
 
348
+ if ( 'category' === $taxonomy ) {
349
  $name = 'category';
350
  } else {
351
  $name = $taxonomy;
358
  }
359
 
360
  $class = isset( $args['class'] ) ? $args['class'] : '';
361
+ $output .= "\n<li class='" . $inline_class . "' id='{$taxonomy}-{$category->term_id}'>" . '<label class="selectit"><input class="' . $class . '" value="' . $category->term_id . '" type="checkbox" name="' . $name . '[]" id="in-' . $taxonomy . '-' . $category->term_id . '"' . checked( in_array( $category->term_id, $args['selected_cats'], true ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters( 'the_category', $category->name ) ) . '</label>';
362
  }
363
 
364
  public function end_el( &$output, $category, $depth = 0, $args = [] ) {
373
  * @param array $selected_cats
374
  *
375
  * @since 0.8
 
376
  */
377
  function wpuf_category_checklist( $post_id = 0, $selected_cats = false, $attr = [], $class = null ) {
378
  require_once ABSPATH . '/wp-admin/includes/template.php';
404
  $tax_args = [
405
  'taxonomy' => $tax,
406
  'hide_empty' => false,
407
+ $exclude['type'] => ( 'child_of' === $exclude_type ) ? $exclude['childs'] : $attr['exclude'],
408
  'orderby' => isset( $attr['orderby'] ) ? $attr['orderby'] : 'name',
409
  'order' => isset( $attr['order'] ) ? $attr['order'] : 'ASC',
410
  ];
414
 
415
  echo wp_kses_post( '<ul class="wpuf-category-checklist">' );
416
  printf( '<input type="hidden" name="%s" value="0" />', esc_attr( $tax ) );
417
+ echo wp_kses(
418
+ call_user_func_array( [ &$walker, 'walk' ], [ $categories, 0, $args ] ), [
419
+ 'li' => [
420
+ 'class' => [],
421
+ ],
422
+ 'label' => [
423
+ 'class' => [],
424
+ ],
425
+ 'input' => [
426
+ 'class' => [],
427
+ 'type' => [],
428
+ 'value' => [],
429
+ 'name' => [],
430
+ 'id' => [],
431
+ 'checked' => [],
432
+ ],
433
+ 'ul' => [
434
+ 'class' => [],
435
+ ],
436
  ]
437
+ );
438
  echo wp_kses_post( '</ul>' );
439
  }
440
 
452
  $attributes = $field_settings['exclude'];
453
  $child_ids = [];
454
 
455
+ if ( ! empty( $attributes ) ) {
456
  foreach ( $attributes as $attr ) {
457
+ $terms = get_terms(
458
+ $field_settings['name'],
459
+ array(
460
+ 'hide_empty' => false,
461
+ 'parent' => $attr,
462
+ )
463
+ );
464
 
465
  foreach ( $terms as $term ) {
466
  array_push( $child_ids, $term->term_id );
473
  }
474
 
475
  $excludes = [
476
+ 'type' => $exclude_type,
477
+ 'childs' => $child_ids,
478
  ];
479
 
480
  return $excludes;
497
  $image_sizes = [];
498
 
499
  foreach ( $image_sizes_orig as $size ) {
500
+ $image_sizes[ $size ] = $size;
501
  }
502
 
503
  return $image_sizes;
505
 
506
  function wpuf_allowed_extensions() {
507
  $extesions = [
508
+ 'images' => [
509
+ 'ext' => 'jpg,jpeg,gif,png,bmp',
510
+ 'label' => __( 'Images', 'wp-user-frontend' ),
511
+ ],
512
+ 'audio' => [
513
+ 'ext' => 'mp3,wav,ogg,wma,mka,m4a,ra,mid,midi',
514
+ 'label' => __( 'Audio', 'wp-user-frontend' ),
515
+ ],
516
+ 'video' => [
517
+ 'ext' => 'avi,divx,flv,mov,ogv,mkv,mp4,m4v,divx,mpg,mpeg,mpe',
518
+ 'label' => __( 'Videos', 'wp-user-frontend' ),
519
+ ],
520
+ 'pdf' => [
521
+ 'ext' => 'pdf',
522
+ 'label' => __( 'PDF', 'wp-user-frontend' ),
523
+ ],
524
+ 'office' => [
525
+ 'ext' => 'doc,ppt,pps,xls,mdb,docx,xlsx,pptx,odt,odp,ods,odg,odc,odb,odf,rtf,txt',
526
+ 'label' => __( 'Office Documents', 'wp-user-frontend' ),
527
+ ],
528
+ 'zip' => [
529
+ 'ext' => 'zip,gz,gzip,rar,7z',
530
+ 'label' => __( 'Zip Archives', 'wp-user-frontend' ),
531
+ ],
532
+ 'exe' => [
533
+ 'ext' => 'exe',
534
+ 'label' => __( 'Executable Files', 'wp-user-frontend' ),
535
+ ],
536
+ 'csv' => [
537
+ 'ext' => 'csv',
538
+ 'label' => __( 'CSV', 'wp-user-frontend' ),
539
+ ],
540
  ];
541
 
542
  return apply_filters( 'wpuf_allowed_extensions', $extesions );
553
  $user = wp_get_current_user();
554
 
555
  if ( is_user_logged_in() ) {
556
+ $lock = ( 'yes' === $user->wpuf_postlock ) ? 'yes' : 'no';
557
 
558
+ if ( 'yes' === $lock ) {
559
  return $user->wpuf_lock_cause;
560
  }
561
  }
590
  * @param array args
591
  */
592
  function wpuf_update_post( $args ) {
593
+ if ( ! wp_is_post_revision( $args['ID'] ) ) {
594
  // unhook this function so it doesn't loop infinitely
595
  remove_action( 'save_post', [ WPUF_Admin_Posting::init(), 'save_meta' ], 1 );
596
 
612
  * @return array
613
  */
614
  function wpuf_get_user_roles() {
615
+ if ( ! function_exists( 'wp_roles' ) ) {
616
+ require_once ABSPATH . WPINC . '/capabilities.php';
617
+ $wp_roles = wp_roles();
618
+ } else {
619
+ $wp_roles = wp_roles();
620
  }
621
 
622
  return $wp_roles->get_names();
699
  if ( is_numeric( $id_or_email ) ) {
700
  $user = get_user_by( 'id', $id_or_email );
701
  } elseif ( is_object( $id_or_email ) ) {
702
+ if ( $id_or_email->user_id !== '0' ) {
703
  $user = get_user_by( 'id', $id_or_email->user_id );
704
  } else {
705
  return $avatar;
775
 
776
  $editor = wp_get_image_editor( $file_path );
777
 
778
+ if ( ! is_wp_error( $editor ) ) {
779
  $avatar_size = wpuf_get_option( 'avatar_size', 'wpuf_profile', '100x100' );
780
  $avatar_size = explode( 'x', $avatar_size );
781
  $avatar_width = $avatar_size[0];
794
  // delete any previous avatar
795
  $prev_avatar = get_user_meta( $user_id, 'user_avatar', true );
796
 
797
+ if ( ! empty( $prev_avatar ) ) {
798
  $prev_avatar_path = str_replace( $upload_dir['baseurl'], $upload_dir['basedir'], $prev_avatar );
799
 
800
  if ( file_exists( $prev_avatar_path ) ) {
820
  $return = [];
821
 
822
  foreach ( $gateways as $id => $gate ) {
823
+ if ( 'admin' === $context ) {
824
+ $return[ $id ] = $gate['admin_label'];
825
  } else {
826
+ $return[ $id ] = [
827
  'label' => $gate['checkout_label'],
828
  'icon' => isset( $gate['icon'] ) ? $gate['icon'] : '',
829
  ];
850
  function wpuf_show_custom_fields( $content ) {
851
  global $post;
852
 
853
+ $show_custom = wpuf_get_option( 'cf_show_front', 'wpuf_frontend_posting' );
854
 
855
+ if ( 'on' !== $show_custom ) {
856
  return $content;
857
  }
858
 
860
  $form_id = get_post_meta( $post->ID, '_wpuf_form_id', true );
861
  $form_settings = wpuf_get_form_settings( $form_id );
862
 
863
+ if ( ! $form_id ) {
864
  return $content;
865
  }
866
 
872
  if ( $form_vars ) {
873
  foreach ( $form_vars as $attr ) {
874
  // get column field input fields
875
+ if ( 'column_field' === $attr['input_type'] ) {
876
  $inner_fields = $attr['inner_fields'];
877
 
878
  foreach ( $inner_fields as $column_key => $column_fields ) {
879
+ if ( ! empty( $column_fields ) ) {
880
  // ignore section break and HTML input type
881
  foreach ( $column_fields as $column_field_key => $column_field ) {
882
+ if ( isset( $column_field['show_in_post'] ) && 'yes' === $column_field['show_in_post'] ) {
883
  $meta[] = $column_field;
884
  }
885
  }
888
  continue;
889
  }
890
 
891
+ if ( isset( $attr['show_in_post'] ) && 'yes' === $attr['show_in_post'] ) {
892
  $meta[] = $attr;
893
  }
894
  }
895
 
896
+ if ( ! $meta ) {
897
  return $content;
898
  }
899
 
900
  foreach ( $meta as $attr ) {
901
  $wpuf_field = wpuf()->fields->get_field( $attr['template'] );
902
 
903
+ if ( ! isset( $attr['name'] ) ) {
904
  $attr['name'] = $attr['input_type'];
905
  }
906
 
909
 
910
  $return_for_no_cond = 0;
911
 
912
+ if ( isset( $attr['wpuf_cond']['condition_status'] ) && 'yes' === $attr['wpuf_cond']['condition_status'] ) {
913
  foreach ( $attr['wpuf_cond']['cond_field'] as $field_key => $cond_field_name ) {
914
 
915
  //check if the conditional field is a taxonomy
922
  $cond_field_value[] = $term_array->term_id;
923
  }
924
  }
925
+ $cond_field_value = isset( $post_terms[0] ) ? $post_terms[0]->term_id : '';
926
  } else {
927
  $cond_field_value = get_post_meta( $post->ID, $cond_field_name, 'true' );
928
  }
929
 
930
+ if ( isset( $attr['wpuf_cond']['cond_option'][ $field_key ] ) ) {
931
  if ( is_array( $cond_field_value ) ) {
932
  continue;
933
  } else {
934
+ if ( (string) $attr['wpuf_cond']['cond_option'][ $field_key ] !== (string) $cond_field_value ) {
935
  $return_for_no_cond = 1;
936
  } else {
937
  $return_for_no_cond = 0;
942
  }
943
  }
944
 
945
+ if ( $return_for_no_cond === 1 ) {
946
  continue;
947
  }
948
 
949
+ if ( ! count( $field_value ) ) {
950
  continue;
951
  }
952
 
953
+ if ( 'hidden' === $attr['input_type'] ) {
954
  continue;
955
  }
956
 
962
  switch ( $attr['input_type'] ) {
963
  case 'image_upload':
964
  case 'file_upload':
965
+ $image_html = '<li style="list-style-type:none;">';
966
 
967
+ if ( 'no' === $hide_label ) {
968
  $image_html .= '<label>' . $attr['label'] . ':</label> ';
969
  }
970
 
978
  }
979
 
980
  foreach ( $field_value as $attachment_id ) {
981
+ if ( 'image_upload' === $attr['input_type'] ) {
982
  $image_size = wpuf_get_option( 'insert_photo_size', 'wpuf_frontend_posting', 'thumbnail' );
983
  $thumb = wp_get_attachment_image( $attachment_id, $image_size );
984
  } else {
996
  $allowed_video_extensions = explode( ',', $wpuf_allowed_extensions['video']['ext'] );
997
  $allowed_extenstions = array_merge( $allowed_audio_extensions, $allowed_video_extensions );
998
 
999
+ if ( 'yes' === $playable && in_array( $extension, $allowed_extenstions, true ) ) {
1000
+ $is_video = in_array( $extension, $allowed_video_extensions, true );
1001
+ $is_audio = in_array( $extension, $allowed_audio_extensions, true );
1002
  $preview_width = isset( $attr['preview_width'] ) ? $attr['preview_width'] : '123';
1003
  $preview_height = isset( $attr['preview_height'] ) ? $attr['preview_height'] : '456';
1004
 
1017
  $image_html .= sprintf( '<a href="%s">%s</a> ', $full_size, $thumb );
1018
  }
1019
 
1020
+ if ( 'on' === $show_caption ) {
1021
  $post_detail = get_post( $attachment_id );
1022
 
1023
+ if ( ! empty( $post_detail->post_title ) ) {
1024
  $image_html .= '<br /><label>' . __( 'Title', 'wp-user-frontend' ) . ':</label> <span class="image_title">' . esc_html( $post_detail->post_title ) . '</span>';
1025
  }
1026
 
1027
+ if ( ! empty( $post_detail->post_excerpt ) ) {
1028
  $image_html .= '<br /><label>' . __( 'Caption', 'wp-user-frontend' ) . ':</label> <span class="image_caption">' . esc_html( $post_detail->post_excerpt ) . '</span>';
1029
  }
1030
 
1031
+ if ( ! empty( $post_detail->post_content ) ) {
1032
  $image_html .= '<br /><label>' . __( 'Description', 'wp-user-frontend' ) . ':</label> <span class="image_description">' . esc_html( $post_detail->post_content ) . '</span>';
1033
  }
1034
  }
1050
  <div>
1051
  <a class="btn btn-brand btn-sm" href="https://www.google.com/maps/dir/?api=1&amp;destination=<?php echo esc_attr( $def_lat ); ?>,<?php echo esc_attr( $def_long ); ?>" target="_blank" rel="nofollow external"><?php esc_html_e( 'Directions »', 'wp-user-frontend' ); ?></a>
1052
  </div>
1053
+ <?php
1054
  }
1055
 
1056
  $html .= ob_get_clean();
1063
 
1064
  if ( isset( $field_value[0] ) && is_array( $field_value[0] ) ) {
1065
  foreach ( $field_value[0] as $field_key => $value ) {
1066
+ if ( 'country_select' === $field_key ) {
1067
+ if ( isset( $countries[ $value ] ) ) {
1068
+ $value = $countries[ $value ];
1069
  }
1070
  }
1071
 
1072
  $address_html .= '<li>';
1073
 
1074
+ if ( 'no' === $hide_label ) {
1075
+ $address_html .= '<label>' . $attr['address'][ $field_key ]['label'] . ': </label> ';
1076
  }
1077
 
1078
  $address_html .= ' ' . $value . '</li>';
1097
  if ( $new ) {
1098
  $html .= '<li>';
1099
 
1100
+ if ( 'no' === $hide_label ) {
1101
  $html .= '<label>' . $attr['label'] . ': </label>';
1102
  }
1103
 
1112
  break;
1113
  }
1114
 
1115
+ if ( 'embed' === $attr['template'] ) {
1116
  global $wp_embed;
1117
 
1118
  $preview_width = isset( $attr['preview_width'] ) ? $attr['preview_width'] : '123';
1119
  $preview_height = isset( $attr['preview_height'] ) ? $attr['preview_height'] : '456';
1120
  $shortcode = '[embed width="' . $preview_width . '" height="' . $preview_height . '"]' . $value . '[/embed]';
1121
 
1122
+ $preview = '<li>';
1123
 
1124
+ if ( 'no' === $hide_label ) {
1125
  $preview .= sprintf( '<label>%s: </label>', $attr['label'] );
1126
  }
1127
 
1134
  break;
1135
  }
1136
 
1137
+ $open_in = 'same' === $attr['open_window'] ? '' : '_blank';
1138
 
1139
+ $link = '<li>';
1140
 
1141
+ if ( 'no' === $hide_label ) {
1142
  $link .= '<label>' . $attr['label'] . ':</label>';
1143
  }
1144
 
1152
 
1153
  $html .= '<li>';
1154
 
1155
+ if ( 'no' === $hide_label ) {
1156
  $html .= '<label>' . $attr['label'] . ':</label>';
1157
  }
1158
 
1170
 
1171
  $html .= '<li>';
1172
 
1173
+ if ( 'no' === $hide_label ) {
1174
  $html .= '<label>' . $attr['label'] . ':</label>';
1175
  }
1176
 
1182
  $filter_html = apply_filters( 'wpuf_custom_field_render', '', $value, $attr, $form_settings );
1183
  $separator = ' | ';
1184
 
1185
+ if ( ! empty( $filter_html ) ) {
1186
  $html .= $filter_html;
1187
  } elseif ( is_serialized( $value[0] ) ) {
1188
  $new = maybe_unserialize( $value[0] );
1191
  if ( $modified_value ) {
1192
  $html .= '<li>';
1193
 
1194
+ if ( 'no' === $hide_label ) {
1195
  $html .= '<label>' . $attr['label'] . ':</label>';
1196
  }
1197
 
1198
  $html .= sprintf( ' %s</li>', make_clickable( $modified_value ) );
1199
  }
1200
+ } elseif ( ( 'checkbox' === $attr['input_type'] || 'multiselect' === $attr['input_type'] ) && is_array( $value[0] ) ) {
1201
+ if ( ! empty( $value[0] ) ) {
1202
  $modified_value = implode( $separator, $value[0] );
1203
 
1204
  if ( $modified_value ) {
1205
  $html .= '<li>';
1206
 
1207
+ if ( 'no' === $hide_label ) {
1208
  $html .= '<label>' . $attr['label'] . ':</label>';
1209
  }
1210
 
1217
  if ( $new ) {
1218
  $html .= '<li>';
1219
 
1220
+ if ( 'no' === $hide_label ) {
1221
  $html .= '<label>' . $attr['label'] . ':</label>';
1222
  }
1223
 
1245
  * @param array $args
1246
  */
1247
  function wpuf_shortcode_map( $location, $post_id = null, $args = [], $meta_key = '' ) {
1248
+ if ( ! wpuf()->is_pro() || ! $location ) {
1249
  return;
1250
  }
1251
 
1258
  return;
1259
  }
1260
 
1261
+ $default = [
1262
+ 'width' => 450,
1263
+ 'height' => 250,
1264
+ 'zoom' => 12,
1265
+ ];
1266
  $args = wp_parse_args( $args, $default );
1267
 
1268
  if ( is_array( $location ) ) {
1274
  list( $def_lat, $def_long ) = explode( ',', $location );
1275
  $def_lat = $def_lat ? $def_lat : 0;
1276
  $def_long = $def_long ? $def_long : 0;
1277
+ }
1278
+ ?>
1279
 
1280
  <div class="google-map" style="margin: 10px 0; height: <?php echo esc_attr( $args['height'] ); ?>px; width: <?php echo esc_attr( $args['width'] ); ?>px;" id="wpuf-map-<?php echo esc_attr( $meta_key . $post->ID ); ?>"></div>
1281
 
1324
  function wpuf_shortcode_map_post( $meta_key, $post_id = null, $args = [] ) {
1325
  global $post;
1326
 
1327
+ if ( ! $post_id ) {
1328
  $post_id = $post->ID;
1329
  }
1330
 
1335
  function wpuf_meta_shortcode( $atts ) {
1336
  global $post;
1337
 
1338
+ $attrs = shortcode_atts(
1339
+ [
1340
+ 'name' => '',
1341
+ 'type' => 'normal',
1342
+ 'size' => 'thumbnail',
1343
+ 'height' => 250,
1344
+ 'width' => 450,
1345
+ 'zoom' => 12,
1346
+ ], $atts
1347
+ );
1348
+
1349
+ $name = $attrs['name'];
1350
+ $type = $attrs['type'];
1351
+ $size = $attrs['size'];
1352
+ $width = $attrs['width'];
1353
+ $height = $attrs['height'];
1354
+ $zoom = $attrs['zoom'];
1355
 
1356
  if ( empty( $name ) ) {
1357
  return;
1358
  }
1359
 
1360
+ if ( 'image' === $type || 'file' === $type ) {
1361
  $images = get_post_meta( $post->ID, $name, true );
1362
 
1363
  if ( ! is_array( $images ) ) {
1368
  $html = '';
1369
 
1370
  foreach ( $images as $attachment_id ) {
1371
+ if ( 'image' === $type ) {
1372
  $thumb = wp_get_attachment_image( $attachment_id, $size );
1373
  } else {
1374
  $thumb = get_post_field( 'post_title', $attachment_id );
1380
 
1381
  return $html;
1382
  }
1383
+ } elseif ( 'map' === $type ) {
1384
  ob_start();
1385
+ wpuf_shortcode_map(
1386
+ $name, $post->ID, [
1387
+ 'width' => $width,
1388
+ 'height' => $height,
1389
+ 'zoom' => $zoom,
1390
+ ]
1391
+ );
1392
 
1393
  return ob_get_clean();
1394
+ } elseif ( 'repeat' === $type ) {
1395
  return implode( '; ', get_post_meta( $post->ID, $name ) );
1396
+ } elseif ( 'normal' === $type ) {
1397
  return implode( ', ', get_post_meta( $post->ID, $name ) );
1398
  } else {
1399
  return make_clickable( implode( ', ', get_post_meta( $post->ID, $name ) ) );
1414
  function wpuf_get_option( $option, $section, $default = '' ) {
1415
  $options = get_option( $section );
1416
 
1417
+ if ( isset( $options[ $option ] ) ) {
1418
+ return $options[ $option ];
1419
  }
1420
 
1421
  return $default;
1422
  }
1423
 
1424
  /**
1425
+ * Check the current post for the existence of a short code
1426
  *
1427
  * @see http://wp.tutsplus.com/articles/quick-tip-improving-shortcodes-with-the-has_shortcode-function/
1428
  *
1431
  * @return bool
1432
  */
1433
  function wpuf_has_shortcode( $shortcode = '', $post_id = false ) {
1434
+ $post_to_check = ( false === $post_id ) ? get_post( get_the_ID() ) : get_post( $post_id );
1435
 
1436
+ if ( ! $post_to_check ) {
1437
  return false;
1438
  }
1439
 
1441
  $found = false;
1442
 
1443
  // if no short code was provided, return false
1444
+ if ( ! $shortcode ) {
1445
  return $found;
1446
  }
1447
 
1472
  $attachment_id = false;
1473
 
1474
  // If there is no url, return.
1475
+ if ( '' === $attachment_url ) {
1476
  return;
1477
  }
1478
 
1489
  $attachment_url = str_replace( $upload_dir_paths['baseurl'] . '/', '', $attachment_url );
1490
 
1491
  // Finally, run a custom database query to get the attachment ID from the modified attachment URL
1492
+ $attachment_id = $wpdb->get_var( $wpdb->prepare( "SELECT wposts.ID FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = '_wp_attached_file' AND wpostmeta.meta_value = %s AND wposts.post_type = 'attachment'", $attachment_url ) );
1493
  }
1494
 
1495
  return $attachment_id;
1506
  global $wpdb;
1507
 
1508
  $taxonomy = isset( $_GET['tax'] ) ? sanitize_text_field( wp_unslash( $_GET['tax'] ) ) : '';
1509
+ $term_ids = isset( $_GET['term_ids'] ) ? sanitize_text_field( wp_unslash( $_GET['term_ids'] ) ) : '';
1510
  $tax = get_taxonomy( $taxonomy );
1511
 
1512
+ if ( ! $tax ) {
1513
  wp_die( 0 );
1514
  }
1515
 
1523
 
1524
  if ( false !== strpos( $s, ',' ) ) {
1525
  $s = explode( ',', $s );
1526
+ $s = $s[ count( $s ) - 1 ];
1527
  }
1528
 
1529
  $s = trim( $s );
1532
  wp_die();
1533
  } // require 2 chars for matching
1534
 
 
 
1535
  if ( ! empty( $term_ids ) ) {
1536
+ //phpcs:disable
1537
  $results = $wpdb->get_col( $wpdb->prepare( "SELECT t.name FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id IN ($term_ids) AND t.name LIKE (%s)", $taxonomy, '%' . $wpdb->esc_like( $s ) . '%' ) );
1538
  } else {
1539
  $results = $wpdb->get_col( $wpdb->prepare( "SELECT t.name FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.name LIKE (%s)", $taxonomy, '%' . $wpdb->esc_like( $s ) . '%' ) );
1540
  }
 
 
1541
  echo esc_html( join( $results, "\n" ) );
1542
  wp_die();
1543
  }
1574
  * @param string $file file name or path to file
1575
  */
1576
  function wpuf_load_template( $file, $args = [] ) {
1577
+ //phpcs:ignore
1578
  if ( $args && is_array( $args ) ) {
1579
  extract( $args );
1580
  }
1603
  * @param string $file file name or path to file
1604
  */
1605
  function wpuf_load_pro_template( $file, $args = [] ) {
1606
+ //phpcs:ignore
1607
  if ( $args && is_array( $args ) ) {
1608
  extract( $args );
1609
  }
1684
  * @return array
1685
  */
1686
  function wpuf_get_form_fields( $form_id ) {
1687
+ $fields = get_children(
1688
+ [
1689
+ 'post_parent' => $form_id,
1690
+ 'post_status' => 'publish',
1691
+ 'post_type' => 'wpuf_input',
1692
+ 'numberposts' => '-1',
1693
+ 'orderby' => 'menu_order',
1694
+ 'order' => 'ASC',
1695
+ ]
1696
+ );
1697
 
1698
  $form_fields = [];
1699
 
1705
  // Add inline property for radio and checkbox fields
1706
  $inline_supported_fields = [ 'radio', 'checkbox' ];
1707
 
1708
+ if ( in_array( $field['input_type'], $inline_supported_fields, true ) ) {
1709
+ if ( ! isset( $field['inline'] ) ) {
1710
  $field['inline'] = 'no';
1711
  }
1712
  }
1714
  // Add 'selected' property
1715
  $option_based_fields = [ 'select', 'multiselect', 'radio', 'checkbox' ];
1716
 
1717
+ if ( in_array( $field['input_type'], $option_based_fields, true ) ) {
1718
+ if ( ! isset( $field['selected'] ) ) {
1719
  if ( 'select' === $field['input_type'] || 'radio' === $field['input_type'] ) {
1720
  $field['selected'] = '';
1721
  } else {
1725
  }
1726
 
1727
  // Add 'multiple' key for input_type:repeat
1728
+ if ( 'repeat' === $field['input_type'] && ! isset( $field['multiple'] ) ) {
1729
  $field['multiple'] = '';
1730
  }
1731
 
1747
  * Returns child category dropdown on ajax request
1748
  */
1749
  function wpuf_get_child_cats() {
1750
+ $nonce = isset( $_REQUEST['nonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['nonce'] ) ) : '';
1751
 
1752
+ $parent_cat = isset( $_POST['catID'] ) ? sanitize_text_field( wp_unslash( $_POST['catID'] ) ) : '';
1753
+ $field_attr = isset( $_POST['field_attr'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['field_attr'] ) ) : [];
 
 
1754
 
1755
+ wp_verify_nonce( $nonce, 'wpuf_nonce' );
1756
 
 
1757
  $allowed_tags = wp_kses_allowed_html( 'post' );
1758
 
1759
+ $taxonomy = $field_attr['name'];
 
1760
 
1761
  $terms = null;
1762
  $result = '';
1763
 
1764
+ if ( $parent_cat < 1 ) {
1765
  die( wp_kses( $result, $allowed_tags ) );
1766
  }
1767
 
1768
+ $terms = get_categories( 'taxonomy=' . $taxonomy . '&child_of=' . $parent_cat . '&hide_empty=0' );
1769
+
1770
+ if ( $terms ) {
1771
+ $field_attr['parent_cat'] = $parent_cat;
1772
 
1773
  if ( is_array( $terms ) ) {
1774
  foreach ( $terms as $key => $term ) {
1775
+ $terms[ $key ] = (array) $term;
1776
  }
1777
  }
1778
 
1779
+ $field_attr['form_id'] = isset( $_POST['form_id'] ) ? absint( $_POST['form_id'] ) : 0;
1780
 
1781
  $result .= taxnomy_select( '', $field_attr );
 
1782
  } else {
1783
  die( '' );
1784
  }
1792
  $exclude_type = isset( $attr['exclude_type'] ) ? $attr['exclude_type'] : 'exclude';
1793
  $exclude = isset( $attr['exclude'] ) ? $attr['exclude'] : '';
1794
 
1795
+ $dataset = sprintf(
1796
  'data-required="%s" data-type="select" data-form-id="%d"',
1797
  $attr['required'],
1798
  $attr['form_id']
1799
+ );
1800
 
1801
+ if ( 'child_of' === $exclude_type && ! empty( $exclude ) ) {
1802
  $exclude = $exclude[0];
1803
  }
1804
 
1805
+ $tax_args = [
1806
  'show_option_none' => __( '-- Select --', 'wp-user-frontend' ),
1807
  'hierarchical' => 1,
1808
  'hide_empty' => 0,
1834
  //'last_term_id' => isset( $attr['parent_cat'] ) ? $attr['parent_cat'] : '',
1835
  //'term_id' => $selected
1836
  ];
1837
+ $attr = apply_filters( 'wpuf_taxonomy_checklist_args', $attr );
1838
+ ?>
1839
  <span data-taxonomy=<?php echo json_encode( $attr ); ?>></span>
1840
  <?php
1841
  }
1862
  * @return array
1863
  */
1864
  function wpuf_get_form_notifications( $form_id ) {
1865
+ $notifications = get_post_meta( $form_id, 'notifications', true );
1866
 
1867
+ if ( ! $notifications ) {
1868
  return [];
1869
  }
1870
 
1881
  * @return array
1882
  */
1883
  function wpuf_get_form_integrations( $form_id ) {
1884
+ $integrations = get_post_meta( $form_id, 'integrations', true );
1885
 
1886
+ if ( ! $integrations ) {
1887
  return [];
1888
  }
1889
 
1903
  function wpuf_is_integration_active( $form_id, $integration_id ) {
1904
  $integrations = wpuf_get_form_integrations( $form_id );
1905
 
1906
+ if ( ! $integrations ) {
1907
  return false;
1908
  }
1909
 
1910
  foreach ( $integrations as $id => $integration ) {
1911
+ if ( $integration_id === $id && $integration->enabled === true ) {
1912
  return $integration;
1913
  }
1914
  }
1930
  /**
1931
  * Clear the buffer
1932
  *
1933
+ * Prevents ajax breakage and endless loading icon. A LIFE SAVER!!!
1934
  *
1935
  * @return void
1936
  */
1948
  function wpuf_is_license_expired() {
1949
  $remote_addr = isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
1950
 
1951
+ if ( in_array( $remote_addr, [ '127.0.0.1', '::1' ], true ) ) {
1952
  return false;
1953
  }
1954
 
1955
  $license_status = get_option( 'wpuf_license_status' );
1956
 
1957
  // seems like this wasn't activated at all
1958
+ if ( ! isset( $license_status->update ) ) {
1959
  return false;
1960
  }
1961
 
2000
  function wpuf_get_countries( $type = 'array' ) {
2001
  $countries = include __DIR__ . '/includes/countries-formated.php';
2002
 
2003
+ if ( 'json' === $type ) {
2004
  $countries = json_encode( $countries );
2005
  }
2006
 
2016
  */
2017
  function wpuf_get_account_sections() {
2018
  $account_sections = [
2019
+ [
2020
+ 'slug' => 'dashboard',
2021
+ 'label' => __( 'Dashboard', 'wp-user-frontend' ),
2022
+ ],
2023
+ [
2024
+ 'slug' => 'posts',
2025
+ 'label' => __( 'Posts', 'wp-user-frontend' ),
2026
+ ],
2027
+ [
2028
+ 'slug' => 'edit-profile',
2029
+ 'label' => __( 'Edit Profile', 'wp-user-frontend' ),
2030
+ ],
2031
+ [
2032
+ 'slug' => 'subscription',
2033
+ 'label' => __( 'Subscription', 'wp-user-frontend' ),
2034
+ ],
2035
+ [
2036
+ 'slug' => 'billing-address',
2037
+ 'label' => __( 'Billing Address', 'wp-user-frontend' ),
2038
+ ],
2039
  ];
2040
 
2041
  return apply_filters( 'wpuf_account_sections', $account_sections );
2054
 
2055
  if ( $sections ) {
2056
  foreach ( $sections as $section ) {
2057
+ $array[ $section['slug'] ] = esc_attr( $section['label'] );
2058
  }
2059
  }
2060
 
2083
  if ( $args['count'] ) {
2084
  return $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}wpuf_transaction" );
2085
  }
2086
+ //phpcs:ignore
2087
  $result = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wpuf_transaction ORDER BY `{$args['orderby']}` {$args['order']} LIMIT {$args['offset']}, {$args['number']}", OBJECT );
2088
 
2089
  return $result;
2137
  'status' => 'pending',
2138
  'cost' => $info['price'],
2139
  'tax' => isset( $info['tax'] ) ? $info['tax'] : 0,
2140
+ 'post_id' => ( $info['type'] === 'post' ) ? $info['item_number'] : 0,
2141
+ 'pack_id' => ( $info['type'] === 'pack' ) ? $info['item_number'] : 0,
2142
  'payer_first_name' => $info['user_info']['first_name'],
2143
  'payer_last_name' => $info['user_info']['last_name'],
2144
  'payer_email' => $info['user_info']['email'],
2145
+ 'payment_type' => ( $info['post_data']['wpuf_payment_method'] === 'bank' ) ? 'Bank/Manual' : ucwords( $info['post_data']['wpuf_payment_method'] ),
2146
  'transaction_id' => 0,
2147
  'created' => $info['date'],
2148
  ];
2162
  */
2163
  function wpuf_get_currencies() {
2164
  $currencies = [
2165
+ [
2166
+ 'currency' => 'AED',
2167
+ 'label' => __( 'United Arab Emirates Dirham', 'wp-user-frontend' ),
2168
+ 'symbol' => 'د.إ',
2169
+ ],
2170
+ [
2171
+ 'currency' => 'AUD',
2172
+ 'label' => __( 'Australian Dollars', 'wp-user-frontend' ),
2173
+ 'symbol' => '&#36;',
2174
+ ],
2175
+ [
2176
+ 'currency' => 'AZD',
2177
+ 'label' => __( 'Argentine Peso', 'wp-user-frontend' ),
2178
+ 'symbol' => '&#36;',
2179
+ ],
2180
+ [
2181
+ 'currency' => 'BDT',
2182
+ 'label' => __( 'Bangladeshi Taka', 'wp-user-frontend' ),
2183
+ 'symbol' => '&#2547;',
2184
+ ],
2185
+ [
2186
+ 'currency' => 'BRL',
2187
+ 'label' => __( 'Brazilian Real', 'wp-user-frontend' ),
2188
+ 'symbol' => '&#82;&#36;',
2189
+ ],
2190
+ [
2191
+ 'currency' => 'BGN',
2192
+ 'label' => __( 'Bulgarian Lev', 'wp-user-frontend' ),
2193
+ 'symbol' => '&#1083;&#1074;.',
2194
+ ],
2195
+ [
2196
+ 'currency' => 'CAD',
2197
+ 'label' => __( 'Canadian Dollars', 'wp-user-frontend' ),
2198
+ 'symbol' => '&#36;',
2199
+ ],
2200
+ [
2201
+ 'currency' => 'CLP',
2202
+ 'label' => __( 'Chilean Peso', 'wp-user-frontend' ),
2203
+ 'symbol' => '&#36;',
2204
+ ],
2205
+ [
2206
+ 'currency' => 'CNY',
2207
+ 'label' => __( 'Chinese Yuan', 'wp-user-frontend' ),
2208
+ 'symbol' => '&yen;',
2209
+ ],
2210
+ [
2211
+ 'currency' => 'COP',
2212
+ 'label' => __( 'Colombian Peso', 'wp-user-frontend' ),
2213
+ 'symbol' => '&#36;',
2214
+ ],
2215
+ [
2216
+ 'currency' => 'CZK',
2217
+ 'label' => __( 'Czech Koruna', 'wp-user-frontend' ),
2218
+ 'symbol' => '&#75;&#269;',
2219
+ ],
2220
+ [
2221
+ 'currency' => 'DKK',
2222
+ 'label' => __( 'Danish Krone', 'wp-user-frontend' ),
2223
+ 'symbol' => 'kr.',
2224
+ ],
2225
+ [
2226
+ 'currency' => 'DOP',
2227
+ 'label' => __( 'Dominican Peso', 'wp-user-frontend' ),
2228
+ 'symbol' => 'RD&#36;',
2229
+ ],
2230
+ [
2231
+ 'currency' => 'DZD',
2232
+ 'label' => __( 'Algerian Dinar', 'wp-user-frontend' ),
2233
+ 'symbol' => 'DA;',
2234
+ ],
2235
+ [
2236
+ 'currency' => 'EUR',
2237
+ 'label' => __( 'Euros', 'wp-user-frontend' ),
2238
+ 'symbol' => '&euro;',
2239
+ ],
2240
+ [
2241
+ 'currency' => 'HKD',
2242
+ 'label' => __( 'Hong Kong Dollar', 'wp-user-frontend' ),
2243
+ 'symbol' => '&#36;',
2244
+ ],
2245
+ [
2246
+ 'currency' => 'HRK',
2247
+ 'label' => __( 'Croatia kuna', 'wp-user-frontend' ),
2248
+ 'symbol' => 'Kn',
2249
+ ],
2250
+ [
2251
+ 'currency' => 'HUF',
2252
+ 'label' => __( 'Hungarian Forint', 'wp-user-frontend' ),
2253
+ 'symbol' => '&#70;&#116;',
2254
+ ],
2255
+ [
2256
+ 'currency' => 'ISK',
2257
+ 'label' => __( 'Icelandic krona', 'wp-user-frontend' ),
2258
+ 'symbol' => 'Kr.',
2259
+ ],
2260
+ [
2261
+ 'currency' => 'IDR',
2262
+ 'label' => __( 'Indonesia Rupiah', 'wp-user-frontend' ),
2263
+ 'symbol' => 'Rp',
2264
+ ],
2265
+ [
2266
+ 'currency' => 'INR',
2267
+ 'label' => __( 'Indian Rupee', 'wp-user-frontend' ),
2268
+ 'symbol' => '&#8377;',
2269
+ ],
2270
+ [
2271
+ 'currency' => 'NPR',
2272
+ 'label' => __( 'Nepali Rupee', 'wp-user-frontend' ),
2273
+ 'symbol' => 'Rs.',
2274
+ ],
2275
+ [
2276
+ 'currency' => 'ILS',
2277
+ 'label' => __( 'Israeli Shekel', 'wp-user-frontend' ),
2278
+ 'symbol' => '&#8362;',
2279
+ ],
2280
+ [
2281
+ 'currency' => 'JPY',
2282
+ 'label' => __( 'Japanese Yen', 'wp-user-frontend' ),
2283
+ 'symbol' => '&yen;',
2284
+ ],
2285
+ [
2286
+ 'currency' => 'KIP',
2287
+ 'label' => __( 'Lao Kip', 'wp-user-frontend' ),
2288
+ 'symbol' => '&#8365;',
2289
+ ],
2290
+ [
2291
+ 'currency' => 'KRW',
2292
+ 'label' => __( 'South Korean Won', 'wp-user-frontend' ),
2293
+ 'symbol' => '&#8361;',
2294
+ ],
2295
+ [
2296
+ 'currency' => 'MYR',
2297
+ 'label' => __( 'Malaysian Ringgits', 'wp-user-frontend' ),
2298
+ 'symbol' => '&#82;&#77;',
2299
+ ],
2300
+ [
2301
+ 'currency' => 'MXN',
2302
+ 'label' => __( 'Mexican Peso', 'wp-user-frontend' ),
2303
+ 'symbol' => '&#36;',
2304
+ ],
2305
+ [
2306
+ 'currency' => 'NGN',
2307
+ 'label' => __( 'Nigerian Naira', 'wp-user-frontend' ),
2308
+ 'symbol' => '&#8358;',
2309
+ ],
2310
+ [
2311
+ 'currency' => 'NOK',
2312
+ 'label' => __( 'Norwegian Krone', 'wp-user-frontend' ),
2313
+ 'symbol' => '&#107;&#114;',
2314
+ ],
2315
+ [
2316
+ 'currency' => 'NZD',
2317
+ 'label' => __( 'New Zealand Dollar', 'wp-user-frontend' ),
2318
+ 'symbol' => '&#36;',
2319
+ ],
2320
+ [
2321
+ 'currency' => 'NAD',
2322
+ 'label' => __( 'Namibian dollar', 'wp-user-frontend' ),
2323
+ 'symbol' => 'N&#36;',
2324
+ ],
2325
+ [
2326
+ 'currency' => 'OMR',
2327
+ 'label' => __( 'Omani Rial', 'wp-user-frontend' ),
2328
+ 'symbol' => 'ر.ع.',
2329
+ ],
2330
+ [
2331
+ 'currency' => 'IRR',
2332
+ 'label' => __( 'Iranian Rial', 'wp-user-frontend' ),
2333
+ 'symbol' => '﷼',
2334
+ ],
2335
+ [
2336
+ 'currency' => 'PKR',
2337
+ 'label' => __( 'Pakistani Rupee', 'wp-user-frontend' ),
2338
+ 'symbol' => 'Rs',
2339
+ ],
2340
+ [
2341
+ 'currency' => 'PYG',
2342
+ 'label' => __( 'Paraguayan Guaraní', 'wp-user-frontend' ),
2343
+ 'symbol' => '&#8370;',
2344
+ ],
2345
+ [
2346
+ 'currency' => 'PHP',
2347
+ 'label' => __( 'Philippine Pesos', 'wp-user-frontend' ),
2348
+ 'symbol' => '&#8369;',
2349
+ ],
2350
+ [
2351
+ 'currency' => 'PLN',
2352
+ 'label' => __( 'Polish Zloty', 'wp-user-frontend' ),
2353
+ 'symbol' => '&#122;&#322;',
2354
+ ],
2355
+ [
2356
+ 'currency' => 'GBP',
2357
+ 'label' => __( 'Pounds Sterling', 'wp-user-frontend' ),
2358
+ 'symbol' => '&pound;',
2359
+ ],
2360
+ [
2361
+ 'currency' => 'RON',
2362
+ 'label' => __( 'Romanian Leu', 'wp-user-frontend' ),
2363
+ 'symbol' => 'lei',
2364
+ ],
2365
+ [
2366
+ 'currency' => 'RUB',
2367
+ 'label' => __( 'Russian Ruble', 'wp-user-frontend' ),
2368
+ 'symbol' => '&#1088;&#1091;&#1073;.',
2369
+ ],
2370
+ [
2371
+ 'currency' => 'SR',
2372
+ 'label' => __( 'Saudi Riyal', 'wp-user-frontend' ),
2373
+ 'symbol' => 'SR',
2374
+ ],
2375
+ [
2376
+ 'currency' => 'SGD',
2377
+ 'label' => __( 'Singapore Dollar', 'wp-user-frontend' ),
2378
+ 'symbol' => '&#36;',
2379
+ ],
2380
+ [
2381
+ 'currency' => 'ZAR',
2382
+ 'label' => __( 'South African rand', 'wp-user-frontend' ),
2383
+ 'symbol' => '&#82;',
2384
+ ],
2385
+ [
2386
+ 'currency' => 'SEK',
2387
+ 'label' => __( 'Swedish Krona', 'wp-user-frontend' ),
2388
+ 'symbol' => '&#107;&#114;',
2389
+ ],
2390
+ [
2391
+ 'currency' => 'CHF',
2392
+ 'label' => __( 'Swiss Franc', 'wp-user-frontend' ),
2393
+ 'symbol' => '&#67;&#72;&#70;',
2394
+ ],
2395
+ [
2396
+ 'currency' => 'TWD',
2397
+ 'label' => __( 'Taiwan New Dollars', 'wp-user-frontend' ),
2398
+ 'symbol' => '&#78;&#84;&#36;',
2399
+ ],
2400
+ [
2401
+ 'currency' => 'THB',
2402
+ 'label' => __( 'Thai Baht', 'wp-user-frontend' ),
2403
+ 'symbol' => '&#3647;',
2404
+ ],
2405
+ [
2406
+ 'currency' => 'TRY',
2407
+ 'label' => __( 'Turkish Lira', 'wp-user-frontend' ),
2408
+ 'symbol' => '&#8378;',
2409
+ ],
2410
+ [
2411
+ 'currency' => 'USD',
2412
+ 'label' => __( 'US Dollar', 'wp-user-frontend' ),
2413
+ 'symbol' => '&#36;',
2414
+ ],
2415
+ [
2416
+ 'currency' => 'VND',
2417
+ 'label' => __( 'Vietnamese Dong', 'wp-user-frontend' ),
2418
+ 'symbol' => '&#8363;',
2419
+ ],
2420
+ [
2421
+ 'currency' => 'EGP',
2422
+ 'label' => __( 'Egyptian Pound', 'wp-user-frontend' ),
2423
+ 'symbol' => 'EGP',
2424
+ ],
2425
+ [
2426
+ 'currency' => 'JOD',
2427
+ 'label' => __( 'Jordanian dinar', 'wp-user-frontend' ),
2428
+ 'symbol' => 'د.أ',
2429
+ ],
2430
  ];
2431
 
2432
  return apply_filters( 'wpuf_currencies', $currencies );
2444
  function wpuf_get_currency( $type = '' ) {
2445
  $currency_code = wpuf_get_option( 'currency', 'wpuf_payment', 'USD' );
2446
 
2447
+ if ( 'code' === $type ) {
2448
  return $currency_code;
2449
  }
2450
 
2451
  $currencies = wpuf_get_currencies();
2452
+ $index = array_search( $currency_code, array_column( $currencies, 'currency' ), true );
2453
  $currency = $currencies[ $index ];
2454
 
2455
+ if ( 'symbol' === $type ) {
2456
  return $currency['symbol'];
2457
  }
2458
 
2471
  switch ( $currency_pos ) {
2472
  case 'left':
2473
  $format = '%1$s%2$s';
2474
+ break;
2475
 
2476
  case 'right':
2477
  $format = '%2$s%1$s';
2478
+ break;
2479
 
2480
  case 'left_space':
2481
  $format = '%1$s&nbsp;%2$s';
2482
+ break;
2483
 
2484
  case 'right_space':
2485
  $format = '%2$s&nbsp;%1$s';
2486
+ break;
2487
  }
2488
 
2489
  return apply_filters( 'wpuf_price_format', $format, $currency_pos );
2548
  * @return mixed
2549
  */
2550
  function wpuf_format_price( $price, $formated = true, $args = [] ) {
 
 
 
 
 
 
 
2551
 
2552
+ $price_args = apply_filters(
2553
+ 'wpuf_price_args', wp_parse_args(
2554
+ $args, [
2555
+ 'currency' => $formated ? wpuf_get_currency( 'symbol' ) : '',
2556
+ 'decimal_separator' => wpuf_get_price_decimal_separator(),
2557
+ 'thousand_separator' => $formated ? wpuf_get_price_thousand_separator() : '',
2558
+ 'decimals' => wpuf_get_price_decimals(),
2559
+ 'price_format' => get_wpuf_price_format(),
2560
+ ]
2561
+ )
2562
+ );
2563
+
2564
+ $currency = $price_args['currency'];
2565
+ $decimal_separator = $price_args['decimal_separator'];
2566
+ $thousand_separator = $price_args['thousand_separator'];
2567
+ $decimals = $price_args['decimals'];
2568
+ $price_format = $price_args['price_format'];
2569
  $negative = $price < 0;
2570
  $price = apply_filters( 'wpuf_raw_price', floatval( $negative ? $price * -1 : $price ) );
2571
  $price = apply_filters( 'wpuf_formatted_price', number_format( $price, $decimals, $decimal_separator, $thousand_separator ), $price, $decimals, $decimal_separator, $thousand_separator );
2584
  *
2585
  * @since 2.4.3
2586
  */
2587
+ if ( ! function_exists( 'array_column' ) ) {
2588
  function array_column( $input, $column_key, $index_key = null ) {
2589
  $result = [];
2590
 
2608
  function wpuf_duplicate_form( $post_id ) {
2609
  $post = get_post( $post_id );
2610
 
2611
+ if ( ! $post ) {
2612
  return;
2613
  }
2614
 
2627
  }
2628
 
2629
  // update the post title to remove confusion
2630
+ wp_update_post(
2631
+ [
2632
+ 'ID' => $form_id,
2633
+ 'post_title' => $post->post_title . ' (#' . $form_id . ')',
2634
+ ]
2635
+ );
2636
 
2637
  if ( $form_id ) {
2638
  $form_settings = wpuf_get_form_settings( $post_id );
2691
  * @return int
2692
  */
2693
  function wpuf_create_sample_form( $post_title = 'Sample Form', $post_type = 'wpuf_forms', $blank = false ) {
2694
+ $form_id = wp_insert_post(
2695
+ [
2696
+ 'post_title' => $post_title,
2697
+ 'post_type' => $post_type,
2698
+ 'post_status' => 'publish',
2699
+ 'comment_status' => 'closed',
2700
+ 'post_content' => '',
2701
+ ]
2702
+ );
2703
+
2704
+ if ( ! $form_id ) {
2705
  return false;
2706
  }
2707
 
2723
  'placeholder' => '',
2724
  'default' => '',
2725
  'size' => '40',
2726
+ 'wpuf_cond' => [],
2727
  ],
2728
  [
2729
  'input_type' => 'textarea',
2740
  'default' => '',
2741
  'rich' => 'teeny',
2742
  'insert_image' => 'yes',
2743
+ 'wpuf_cond' => [],
2744
  ],
2745
  ];
2746
 
2842
  ];
2843
  }
2844
 
2845
+ if ( ! empty( $form_fields ) && ! $blank ) {
2846
  foreach ( $form_fields as $order => $field ) {
2847
  wpuf_insert_form_field( $form_id, $field, false, $order );
2848
  }
2849
  }
2850
 
2851
+ if ( ! empty( $settings ) ) {
2852
  update_post_meta( $form_id, 'wpuf_form_settings', $settings );
2853
  }
2854
 
2903
  wp_delete_post( $form_id, $force );
2904
 
2905
  // delete form inputs as WP doesn't know the relationship
2906
+ $wpdb->delete(
2907
+ $wpdb->posts,
2908
  [
2909
  'post_parent' => $form_id,
2910
  'post_type' => 'wpuf_input',
2911
  ]
2912
+ );
2913
  }
2914
 
2915
  /**
2922
  * @return string $post_status
2923
  */
2924
  function wpuf_get_draft_post_status( $form_settings ) {
 
2925
  $noce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
2926
 
2927
  if ( isset( $nonce ) && ! wp_verify_nonce( $noce, 'wpuf_form_add' ) ) {
2928
+ return;
2929
  }
2930
 
2931
  $post_status = 'draft';
2933
  $charging_enabled = $current_user->subscription()->current_pack_id();
2934
  $user_wpuf_subscription_pack = get_user_meta( get_current_user_id(), '_wpuf_subscription_pack', true );
2935
 
2936
+ if ( $charging_enabled && ! isset( $_POST['post_id'] ) ) {
2937
+ if ( ! empty( $user_wpuf_subscription_pack ) ) {
2938
  if ( $current_user->subscription()->expired() ) {
2939
  $post_status = 'pending';
2940
  }
2955
  * @return array
2956
  */
2957
  function wpuf_admin_page_states( $state, $post ) {
2958
+ if ( 'page' !== $post->post_type ) {
2959
  return $state;
2960
  }
2961
 
2964
  preg_match_all( $pattern, $post->post_content, $matches );
2965
  $matches = array_unique( $matches[0] );
2966
 
2967
+ if ( ! empty( $matches ) ) {
2968
  $page = '';
2969
  $shortcode = $matches[0];
2970
 
2971
+ if ( '[wpuf_account]' === $shortcode ) {
2972
  $page = 'WPUF Account Page';
2973
+ } elseif ( '[wpuf_edit]' === $shortcode ) {
2974
  $page = 'WPUF Post Edit Page';
2975
+ } elseif ( '[wpuf-login]' === $shortcode ) {
2976
  $page = 'WPUF Login Page';
2977
+ } elseif ( '[wpuf_sub_pack]' === $shortcode ) {
2978
  $page = 'WPUF Subscription Page';
2979
+ } elseif ( '[wpuf_editprofile]' === $shortcode ) {
2980
  $page = 'WPUF Profile Edit Page';
2981
  } elseif ( stristr( $shortcode, '[wpuf_dashboard' ) ) {
2982
  $page = 'WPUF Dashboard Page';
2988
  $page = 'WPUF Form Page';
2989
  }
2990
 
2991
+ if ( ! empty( $page ) ) {
2992
  $state['wpuf'] = $page;
2993
  }
2994
  }
3064
  'post_msg' => 'verified',
3065
  'f' => 2,
3066
  ], get_home_url()
3067
+ );
3068
  } else {
3069
  $encoded_guest_url = add_query_arg(
3070
  [
3073
  'post_msg' => 'verified',
3074
  'f' => 1,
3075
  ], get_home_url()
3076
+ );
3077
  }
3078
 
3079
+ $default_body = 'Hey There, <br> <br> We just received your guest post and now we want you to confirm your email so that we can verify the content and move on to the publishing process. <br> <br> Please click the link below to verify: <br> <br> <a href="' . $encoded_guest_url . '">Publish Post</a> <br> <br> Regards, <br> <br>' . bloginfo( 'name' );
3080
  $to = isset( $_POST['guest_email'] ) ? sanitize_email( wp_unslash( $_POST['guest_email'] ) ) : '';
3081
  $guest_email_sub = wpuf_get_option( 'guest_email_subject', 'wpuf_mails', 'Please Confirm Your Email to Get the Post Published!' );
3082
  $subject = $guest_email_sub;
3083
  $guest_email_body = wpuf_get_option( 'guest_email_body', 'wpuf_mails', $default_body );
3084
 
3085
+ if ( ! empty( $guest_email_body ) ) {
3086
  $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
3087
  $field_search = [ '{activation_link}', '{sitename}' ];
3088
 
3096
  $body = $default_body;
3097
  }
3098
 
3099
+ $body = get_formatted_mail_body( $body, $subject );
3100
 
3101
  wp_mail( $to, $subject, $body );
3102
  }
3111
  function is_wpuf_post_form_builder() {
3112
  $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
3113
 
3114
+ return 'wpuf-post-forms' === $page ? true : false;
3115
  }
3116
 
3117
  /**
3124
  function is_wpuf_profile_form_builder() {
3125
  $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
3126
 
3127
+ return 'wpuf-profile-forms' === $page ? true : false;
3128
  }
3129
 
3130
  /**
3137
  * @return \WPUF_User
3138
  */
3139
  function wpuf_get_user( $user = null ) {
3140
+ if ( ! $user ) {
3141
  $user = wp_get_current_user();
3142
  }
3143
 
3157
  $allowed_term = [];
3158
 
3159
  foreach ( $subscriptions as $pack ) {
3160
+ if ( ! metadata_exists( 'post', $pack->ID, '_sub_allowed_term_ids' ) ) {
3161
+ $cts = get_taxonomies( [ '_builtin' => true ], 'objects' );
3162
+ ?>
3163
+ <?php
3164
+ foreach ( $cts as $ct ) {
3165
  if ( is_taxonomy_hierarchical( $ct->name ) ) {
3166
+ $tax_terms = get_terms(
3167
+ [
3168
+ 'taxonomy' => $ct->name,
3169
+ 'hide_empty' => false,
3170
+ ]
3171
+ );
3172
 
3173
  foreach ( $tax_terms as $tax_term ) {
3174
  $allowed_term[] = $tax_term->term_id;
3176
  }
3177
  }
3178
 
3179
+ $cts = get_taxonomies( [ '_builtin' => false ], 'objects' );
3180
+ ?>
3181
+ <?php
3182
+ foreach ( $cts as $ct ) {
3183
  if ( is_taxonomy_hierarchical( $ct->name ) ) {
3184
+ $tax_terms = get_terms(
3185
+ [
3186
+ 'taxonomy' => $ct->name,
3187
+ 'hide_empty' => false,
3188
+ ]
3189
+ );
3190
 
3191
  foreach ( $tax_terms as $tax_term ) {
3192
  $allowed_term[] = $tax_term->term_id;
3201
  }
3202
 
3203
  /**
3204
+ * Post submitted by form
3205
  *
3206
  * @since 2.8
3207
  *
3210
  * @return List of WP_Post objects
3211
  */
3212
  function wpuf_posts_submitted_by( $form_id ) {
3213
+ $settings = wpuf_get_form_settings( $form_id );
3214
  $settings['post_type'];
3215
  $args = [
3216
  'meta_key' => '_wpuf_form_id',
3224
  }
3225
 
3226
  /**
3227
+ * Count post submitted by form
3228
  *
3229
  * @since 2.8
3230
  *
3257
  wpuf_load_pro_template(
3258
  'email/header.php',
3259
  [ 'subject' => $subject ]
3260
+ );
3261
 
3262
  $header = ob_get_clean();
3263
  }
3268
  wpuf_load_pro_template(
3269
  'email/footer.php',
3270
  []
3271
+ );
3272
 
3273
  $footer = ob_get_clean();
3274
  }
3278
  wpuf_load_pro_template(
3279
  'email/style.php',
3280
  []
3281
+ );
3282
 
3283
  $css = apply_filters( 'wpuf_email_style', ob_get_clean() );
3284
 
3285
  $content = $header . '<pre>' . $message . '</pre>' . $footer;
3286
 
3287
+ if ( ! class_exists( 'Emogrifier' ) ) {
3288
  require_once WPUF_PRO_INCLUDES . '/libs/Emogrifier.php';
3289
  }
3290
 
3320
  'chosen' => false,
3321
  'placeholder' => null,
3322
  'multiple' => false,
3323
+ 'show_option_all' => __( 'All', 'wp-user-frontend' ),
3324
+ 'show_option_none' => __( 'None', 'wp-user-frontend' ),
3325
  'data' => [],
3326
  'readonly' => false,
3327
  'disabled' => false,
3371
  $class = implode( ' ', array_map( 'sanitize_html_class', explode( ' ', $args['class'] ) ) );
3372
  $output = '<select' . $disabled . $readonly . ' name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( str_replace( '-', '_', $args['id'] ) ) . '" class="wpuf-select ' . $class . '"' . $multiple . ' data-placeholder="' . $placeholder . '"' . $data_elements . '>';
3373
 
3374
+ if ( ! isset( $args['selected'] ) || ( is_array( $args['selected'] ) && empty( $args['selected'] ) ) || ! $args['selected'] ) {
3375
  $selected = '';
3376
  }
3377
 
3378
  if ( $args['show_option_all'] ) {
3379
+ if ( $args['multiple'] && ! empty( $args['selected'] ) ) {
3380
+ $selected = selected( true, in_array( 0, $args['selected'], true ), false );
3381
  } else {
3382
  $selected = selected( $args['selected'], 0, false );
3383
  }
3384
  $output .= '<option value="all"' . $selected . '>' . esc_html( $args['show_option_all'] ) . '</option>';
3385
  }
3386
 
3387
+ if ( ! empty( $args['options'] ) ) {
3388
  if ( $args['show_option_none'] ) {
3389
  if ( $args['multiple'] ) {
3390
+ $selected = selected( true, in_array( -1, $args['selected'], true ), false );
3391
+ } elseif ( isset( $args['selected'] ) && ! is_array( $args['selected'] ) && ! empty( $args['selected'] ) ) {
3392
  $selected = selected( $args['selected'], -1, false );
3393
  }
3394
  $output .= '<option value="-1"' . $selected . '>' . esc_html( $args['show_option_none'] ) . '</option>';
3396
 
3397
  foreach ( $args['options'] as $key => $option ) {
3398
  if ( $args['multiple'] && is_array( $args['selected'] ) ) {
3399
+ $selected = selected( true, in_array( (string) $key, $args['selected'], true ), false );
3400
+ } elseif ( isset( $args['selected'] ) && ! is_array( $args['selected'] ) ) {
3401
  $selected = selected( $args['selected'], $key, false );
3402
  }
3403
 
3442
 
3443
  $data = '';
3444
 
3445
+ if ( ! empty( $args['data'] ) ) {
3446
  foreach ( $args['data'] as $key => $value ) {
3447
  $data .= 'data-' . $key . '="' . esc_attr( $value ) . '" ';
3448
  }
3450
 
3451
  $output = '<span id="wpuf-' . $args['name'] . '-wrap">';
3452
 
3453
+ if ( ! empty( $args['label'] ) ) {
3454
  $output .= '<label class="wpuf-label" for="' . $args['id'] . '">' . esc_html( $args['label'] ) . '</label>';
3455
  }
3456
 
3457
+ if ( ! empty( $args['desc'] ) ) {
3458
  $output .= '<span class="wpuf-description">' . wp_kses_post( $args['desc'] ) . '</span>';
3459
  }
3460
 
3492
  $options = array();
3493
  }
3494
 
3495
+ $options[ $option ] = $value;
3496
 
3497
  update_option( $section, $options );
3498
  }
3509
  function wpuf_get_terms( $taxonomy = 'category' ) {
3510
  $items = [];
3511
 
3512
+ $terms = get_terms(
3513
+ [
3514
  'taxonomy' => $taxonomy,
3515
  'hide_empty' => false,
3516
  ]
3517
+ );
3518
 
3519
  foreach ( $terms as $key => $term ) {
3520
+ $items[ $term->term_id ] = $term->name;
3521
  }
3522
 
3523
  return $items;
3534
  $country = isset( $_POST['country'] ) ? sanitize_text_field( wp_unslash( $_POST['country'] ) ) : '';
3535
  $cs = new CountryState();
3536
  $countries = $cs->countries();
3537
+ $states = $cs->getStates( $countries[ $country ] );
3538
 
3539
+ if ( ! empty( $states ) ) {
3540
  $args = [
3541
  'name' => isset( $_POST['field_name'] ) ? sanitize_text_field( wp_unslash( $_POST['field_name'] ) ) : '',
3542
  'id' => isset( $_POST['field_name'] ) ? sanitize_text_field( wp_unslash( $_POST['field_name'] ) ) : '',
3551
  $response = 'nostates';
3552
  }
3553
 
3554
+ wp_send_json( $response ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
 
3555
  }
3556
  add_action( 'wp_ajax_wpuf-ajax-address', 'wpuf_ajax_get_states_field' );
3557
  add_action( 'wp_ajax_nopriv_wpuf-ajax-address', 'wpuf_ajax_get_states_field' );
3562
  * @return void
3563
  */
3564
  function wpuf_update_billing_address() {
3565
+ check_ajax_referer( 'wpuf-ajax-address' );
 
 
 
 
3566
 
3567
  ob_start();
3568
 
3569
  $user_id = get_current_user_id();
3570
+ $add_line_1 = isset( $_POST['billing_add_line1'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_add_line1'] ) ) : '';
3571
+ $add_line_2 = isset( $_POST['billing_add_line2'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_add_line2'] ) ) : '';
3572
+ $city = isset( $_POST['billing_city'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_city'] ) ) : '';
3573
+ $state = isset( $_POST['billing_state'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_state'] ) ) : '';
3574
+ $zip = isset( $_POST['billing_zip'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_zip'] ) ) : '';
3575
+ $country = isset( $_POST['billing_country'] ) ? sanitize_text_field( wp_unslash( $_POST['billing_country'] ) ) : '';
3576
+ $type = isset( $_POST['type'] ) ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : '';
3577
+ $id = isset( $_POST['id'] ) ? sanitize_text_field( wp_unslash( $_POST['id'] ) ) : '';
3578
 
3579
  $address_fields = [
3580
  'add_line_1' => $add_line_1,
3628
  $countries_obj = new WC_Countries();
3629
  $countries_array = $countries_obj->get_countries();
3630
  $country_states_array = $countries_obj->get_states();
3631
+ $woo_address['state'] = isset( $country_states_array[ $woo_address['country'] ][ $woo_address['state'] ] ) ? $country_states_array[ $woo_address['country'] ][ $woo_address['state'] ] : '';
3632
  $woo_address['state'] = strtolower( str_replace( ' ', '', $woo_address['state'] ) );
3633
 
3634
+ if ( ! empty( $woo_address ) ) {
3635
  $address_fields = [
3636
  'add_line_1' => $woo_address['address_1'],
3637
  'add_line_2' => $woo_address['address_2'],
3656
  $settings = new WeDevs_Settings_API();
3657
  $value = $settings->get_option( $args['id'], $args['section'], $args['std'] );
3658
  $value = is_array( $value ) ? (array) $value : [];
3659
+ $size = isset( $args['size'] ) && ! is_null( $args['size'] ) ? $args['size'] : 'regular';
3660
  $html = sprintf( '<select multiple="multiple" class="%1$s" name="%2$s[%3$s][]" id="%2$s[%3$s]">', $size, $args['section'], $args['id'] );
3661
 
3662
  foreach ( $args['options'] as $key => $label ) {
3663
+ $checked = in_array( $key, $value, true ) ? $key : '0';
3664
  $html .= sprintf( '<option value="%s"%s>%s</option>', $key, selected( $checked, $key, false ), $label );
3665
  }
3666
 
3667
  $html .= sprintf( '</select>' );
3668
  $html .= $settings->get_field_description( $args );
3669
 
3670
+ echo wp_kses(
3671
+ $html, [
3672
+ 'p' => [],
3673
+ 'select' => [
3674
+ 'multiple' => [],
3675
+ 'class' => [],
3676
+ 'name' => [],
3677
+ 'id' => [],
3678
+ ],
3679
+ 'option' => [
3680
+ 'value' => [],
3681
+ 'selected' => [],
3682
+ ],
3683
  ]
3684
+ );
3685
  }
3686
 
3687
  /**
3693
  */
3694
  function wpuf_show_form_schedule_message( $form_id ) {
3695
  $form_settings = wpuf_get_form_settings( $form_id );
3696
+ $is_scheduled = ( isset( $form_settings['schedule_form'] ) && $form_settings['schedule_form'] === 'true' ) ? true : false;
3697
 
3698
  if ( $is_scheduled ) {
3699
+ $start_time = ! empty( $form_settings['schedule_start'] ) ? strtotime( $form_settings['schedule_start'] ) : 0;
3700
+ $end_time = ! empty( $form_settings['schedule_end'] ) ? strtotime( $form_settings['schedule_end'] ) : 0;
3701
  $current_time = current_time( 'timestamp' );
3702
 
3703
  if ( $current_time >= $start_time && $current_time <= $end_time ) {
3709
  echo wp_kses_post( '<div class="wpuf-message">' . $form_settings['form_pending_message'] . '</div>' );
3710
  } elseif ( $current_time > $end_time ) {
3711
  echo wp_kses_post( '<div class="wpuf-message">' . $form_settings['form_expired_message'] . '</div>' );
3712
+ }
3713
+ ?>
3714
  <script>
3715
  jQuery( function($) {
3716
  $(".wpuf-submit-button").attr("disabled", "disabled");
3731
  */
3732
  function wpuf_show_form_limit_message( $form_id ) {
3733
  $form_settings = wpuf_get_form_settings( $form_id );
3734
+ $has_limit = ( isset( $form_settings['limit_entries'] ) && $form_settings['limit_entries'] === 'true' ) ? true : false;
3735
+ $post_to_check = get_post( get_the_ID() );
3736
  $is_edit_page = false;
3737
 
3738
+ if ( stripos( $post_to_check->post_content, '[wpuf_edit' ) !== false ) {
3739
  $is_edit_page = true;
3740
  }
3741
 
3742
+ if ( $has_limit && ! $is_edit_page ) {
3743
+ $limit = (int) ! empty( $form_settings['limit_number'] ) ? $form_settings['limit_number'] : 0;
3744
  $form_entries = wpuf_form_posts_count( $form_id );
3745
 
3746
  if ( $limit && $limit <= $form_entries ) {
3747
  $info = $form_settings['limit_message'];
3748
+ echo wp_kses_post( '<div class="wpuf-info">' . $info . '</div>' );
3749
  ?>
3750
  <script>
3751
  jQuery( function($) {
3761
  add_action( 'wpuf_before_form_render', 'wpuf_show_form_limit_message' );
3762
 
3763
  /**
3764
+ * Save frontend post revision
3765
  *
3766
  * @param int $post_id
3767
  * @param array $form_settings
3772
  $post = get_post( $post_id );
3773
 
3774
  if ( post_type_supports( $form_settings['post_type'], 'revisions' ) ) {
3775
+ $revisions = wp_get_post_revisions(
3776
+ $post_id, [
3777
+ 'order' => 'ASC',
3778
+ 'posts_per_page' => 1,
3779
+ ]
3780
+ );
3781
  $revision = current( $revisions );
3782
 
3783
  _wp_upgrade_revisions_of_post( $post, wp_get_post_revisions( $post_id ) );
3805
  $byte = absint( $val );
3806
  $char = strtolower( str_replace( $byte, '', $val ) );
3807
 
3808
+ switch ( $char ) {
3809
  case 'g':
3810
  $byte *= GB_IN_BYTES;
3811
  break;
wpuf.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP User Frontend
4
  Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
5
  Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
6
  Author: weDevs
7
- Version: 3.5.8
8
  Author URI: https://wedevs.com/?utm_source=WPUF_Author_URI
9
  License: GPL2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -12,7 +12,7 @@ Text Domain: wp-user-frontend
12
  Domain Path: /languages
13
  */
14
 
15
- define( 'WPUF_VERSION', '3.5.8' );
16
  define( 'WPUF_FILE', __FILE__ );
17
  define( 'WPUF_ROOT', __DIR__ );
18
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
4
  Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
5
  Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
6
  Author: weDevs
7
+ Version: 3.5.9
8
  Author URI: https://wedevs.com/?utm_source=WPUF_Author_URI
9
  License: GPL2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
  Domain Path: /languages
13
  */
14
 
15
+ define( 'WPUF_VERSION', '3.5.9' );
16
  define( 'WPUF_FILE', __FILE__ );
17
  define( 'WPUF_ROOT', __DIR__ );
18
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );