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

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.2.0
Comparing to
See all releases

Code changes from version 3.1.18 to 3.2.0

admin/class-admin-settings.php CHANGED
@@ -50,6 +50,9 @@ class WPUF_Admin_Settings {
50
 
51
  add_action( 'admin_init', [$this, 'handle_tools_action'] );
52
  add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_styles' ] );
 
 
 
53
  }
54
 
55
  public static function init() {
@@ -199,6 +202,7 @@ class WPUF_Admin_Settings {
199
  }
200
 
201
  public function tools_page() {
 
202
  include dirname( __DIR__ ) . '/admin/tools.php';
203
  }
204
 
@@ -388,7 +392,7 @@ class WPUF_Admin_Settings {
388
  }
389
 
390
  wp_enqueue_style( 'wpuf-admin', WPUF_ASSET_URI . '/css/admin.css', false, WPUF_VERSION );
391
- wp_enqueue_script( 'wpuf-admin-script', WPUF_ASSET_URI . '/js/wpuf-admin.js', [ 'jquery' ], false, WPUF_VERSION );
392
 
393
  wp_localize_script( 'wpuf-admin-script', 'wpuf_admin_script', [
394
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
@@ -396,4 +400,142 @@ class WPUF_Admin_Settings {
396
  'cleared_schedule_lock' => __( 'Post lock has been cleared', 'wp-user-frontend' ),
397
  ] );
398
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  }
50
 
51
  add_action( 'admin_init', [$this, 'handle_tools_action'] );
52
  add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_styles' ] );
53
+
54
+ add_filter( 'wp_handle_upload_prefilter', [ $this, 'enable_json_upload' ], 1 );
55
+ add_action( 'wp_ajax_wpuf_import_forms', [ $this, 'import_forms' ] );
56
  }
57
 
58
  public static function init() {
202
  }
203
 
204
  public function tools_page() {
205
+ $this->enqueue_tools_scripts();
206
  include dirname( __DIR__ ) . '/admin/tools.php';
207
  }
208
 
392
  }
393
 
394
  wp_enqueue_style( 'wpuf-admin', WPUF_ASSET_URI . '/css/admin.css', false, WPUF_VERSION );
395
+ wp_enqueue_script( 'wpuf-admin-script', WPUF_ASSET_URI . '/js/wpuf-admin.js', [ 'jquery' ], WPUF_VERSION, false );
396
 
397
  wp_localize_script( 'wpuf-admin-script', 'wpuf_admin_script', [
398
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
400
  'cleared_schedule_lock' => __( 'Post lock has been cleared', 'wp-user-frontend' ),
401
  ] );
402
  }
403
+
404
+ /**
405
+ * Enqueue Tools page scripts
406
+ *
407
+ * @since 3.2.0
408
+ *
409
+ * @todo Move this method to WPUF_Admin_Tools class
410
+ *
411
+ * @return void
412
+ */
413
+ private function enqueue_tools_scripts() {
414
+ $prefix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
415
+
416
+ wp_enqueue_script( 'wpuf-vue', WPUF_ASSET_URI . '/vendor/vue/vue' . $prefix . '.js', [], WPUF_VERSION, true );
417
+
418
+ add_filter( 'upload_mimes', [ $this, 'add_json_mime_type' ] );
419
+
420
+ wp_enqueue_media();
421
+
422
+ wp_enqueue_script( 'wpuf-admin-tools', WPUF_ASSET_URI . '/js/wpuf-admin-tools.js', [ 'jquery', 'wpuf-vue' ], WPUF_VERSION, true );
423
+
424
+ wp_localize_script( 'wpuf-admin-tools', 'wpuf_admin_tools', [
425
+ 'url' => [
426
+ 'ajax' => admin_url( 'admin-ajax.php' ),
427
+ ],
428
+ 'nonce' => wp_create_nonce( 'wpuf_admin_tools' ),
429
+ 'i18n' => [
430
+ 'wpuf_import_forms' => __( 'WPUF Import Forms', 'wp-user-frontend' ),
431
+ 'add_json_file' => __( 'Add JSON file', 'wp-user-frontend' ),
432
+ 'could_not_import_forms' => __( 'Could not import forms.', 'wp-user-frontend' ),
433
+ ]
434
+ ] );
435
+ }
436
+
437
+ /**
438
+ * Add json file mime type to upload in WP Media
439
+ *
440
+ * @since 3.2.0
441
+ *
442
+ * @todo Move this method to WPUF_Admin_Tools class
443
+ *
444
+ * @param array $mime_types
445
+ *
446
+ * @return array
447
+ */
448
+ public function add_json_mime_type( $mime_types ) {
449
+ $mime_types['json'] = 'application/json';
450
+
451
+ return $mime_types;
452
+ }
453
+
454
+ /**
455
+ * Allow json file to upload with async uploader
456
+ *
457
+ * @since 3.2.0
458
+ *
459
+ * @param array $info
460
+ *
461
+ * @return array
462
+ */
463
+ public function check_filetype_and_ext( $info ) {
464
+ $info['ext'] = 'json';
465
+ $info['type'] = 'application/json';
466
+
467
+ return $info;
468
+ }
469
+
470
+ /**
471
+ * Enable json file upload via ajax in tools page
472
+ *
473
+ * @since 3.2.0
474
+ *
475
+ * @todo Move this method to WPUF_Admin_Tools class
476
+ *
477
+ * @param array $file
478
+ *
479
+ * @return array
480
+ */
481
+ public function enable_json_upload( $file ) {
482
+ if (
483
+ defined( 'DOING_AJAX' )
484
+ && DOING_AJAX
485
+ && isset( $_POST['action'] )
486
+ && 'upload-attachment' === $_POST['action']
487
+ && isset( $_POST['type'] )
488
+ && 'wpuf-form-uploader' === $_POST['type']
489
+ ) {
490
+ // @see wp_ajax_upload_attachment
491
+ check_ajax_referer( 'media-form' );
492
+ add_filter( 'wp_check_filetype_and_ext', [ $this, 'check_filetype_and_ext' ] );
493
+ }
494
+
495
+ return $file;
496
+ }
497
+
498
+ /**
499
+ * Ajax handler to import WPUF form
500
+ *
501
+ * @since 3.2.0
502
+ *
503
+ * @todo Move this method to WPUF_Admin_Tools class
504
+ *
505
+ * @return void
506
+ */
507
+ public function import_forms() {
508
+ check_ajax_referer( 'wpuf_admin_tools' );
509
+
510
+ if ( ! isset( $_POST['file_id'] ) ) {
511
+ wp_send_json_error(
512
+ new WP_Error( 'wpuf_ajax_import_forms_error', __( 'Missing file_id param', 'wp-user-frontend' ) ),
513
+ WP_Http::BAD_REQUEST
514
+ );
515
+ }
516
+
517
+ $file_id = absint( wp_unslash( $_POST['file_id'] ) );
518
+ $file = get_attached_file( $file_id );
519
+
520
+ if ( empty( $file ) ) {
521
+ wp_send_json_error(
522
+ new WP_Error( 'wpuf_ajax_import_forms_error', __( 'JSON file not found', 'wp-user-frontend' ) ),
523
+ WP_Http::NOT_FOUND
524
+ );
525
+ }
526
+
527
+ if ( ! class_exists( 'WPUF_Admin_Tools' ) ) {
528
+ require_once WPUF_ROOT . '/admin/class-tools.php';
529
+ }
530
+
531
+ $imported = WPUF_Admin_Tools::import_json_file( $file );
532
+
533
+ if ( is_wp_error( $imported ) ) {
534
+ wp_send_json_error( $imported, WP_Http::UNPROCESSABLE_ENTITY );
535
+ }
536
+
537
+ wp_send_json_success( [
538
+ 'message' => __( 'Forms imported successfully.', 'wp-user-frontend' ),
539
+ ] );
540
+ }
541
  }
admin/class-tools.php CHANGED
@@ -6,23 +6,22 @@
6
  * @since 2.2
7
  */
8
  class WPUF_Admin_Tools {
 
9
  /**
10
  * List of All the post forms
11
  *
12
  * @return void
13
  */
14
  public function list_forms() {
15
- if ( isset( $_POST['export'] ) ) {
16
 
17
- $export_content = isset( $_POST['export_content'] ) ? sanitize_text_field( wp_unslash( $_POST['export_content'] ) ) : '';
18
- $formlist = isset( $_POST['formlist'] ) ? sanitize_text_field( wp_unslash( $_POST['formlist'] ) ) : '';
19
- $this->export_data( $export_content, $formlist );
20
 
21
- $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
 
22
 
23
- if ( isset( $nonce ) && ! wp_verify_nonce( $nonce, 'wpuf-export-form' ) ) {
24
- return ;
25
- }
26
  }
27
 
28
  $args = [
@@ -40,15 +39,15 @@ class WPUF_Admin_Tools {
40
  <div class="main">
41
  <form action="" method="post" style="margin-top: 20px;">
42
  <p>
43
- <input class="export_type" type="radio" name="export_content" value="all" id="wpuf-all_export" checked>
44
  <label for="wpuf-all_export"><?php esc_html_e( 'All', 'wp-user-frontend' ); ?></label>
45
  </p>
46
 
47
  <p>
48
- <input class="export_type" type="radio" name="export_content" value="selected" id="wpuf-selected_export">
49
  <label for="wpuf-selected_export"><?php esc_html_e( 'Select individual', 'wp-user-frontend' ); ?></label></p>
50
  <p>
51
- <select class="formlist" name="formlist[]" multiple="multiple">
52
  <?php foreach ( $forms as $form ) { ?>
53
  <option value="<?php echo esc_attr( $form->ID ); ?>"><?php echo esc_attr( $form->post_title ); ?></option>
54
  <?php } ?>
@@ -74,19 +73,15 @@ class WPUF_Admin_Tools {
74
  * @return void
75
  */
76
  public function list_regis_forms() {
77
- if ( isset( $_POST['export_regis_form'] ) ) {
78
-
79
- $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ): '';
80
-
81
- $export_regis_content = isset( $_POST['export_regis_content'] ) ? sanitize_text_field( wp_unslash( $_POST['export_regis_content'] ) ) : '';
82
- $formlist = isset( $_POST['formlist'] ) ? sanitize_text_field( wp_unslash( $_POST['formlist'] ) ) : '';
83
 
84
- $this->export_regis_data( $export_regis_content, $formlist );
 
85
 
 
 
86
 
87
- if ( isset( $nonce) && ! wp_verify_nonce( $nonce, 'wpuf-export-regs-form' ) ) {
88
- return ;
89
- }
90
  }
91
 
92
  $args = [
@@ -107,17 +102,17 @@ class WPUF_Admin_Tools {
107
  <form action="" method="post" style="margin-top: 20px;">
108
 
109
  <p>
110
- <input class="export_type" type="radio" name="export_regis_content" value="all" id="wpuf-all_regis_export" checked>
111
  <label for="wpuf-all_regis_export"><?php esc_html_e( 'All', 'wp-user-frontend' ); ?></label>
112
  </p>
113
 
114
  <p>
115
- <input class="export_type" type="radio" name="export_regis_content" value="selected" id="wpuf-selected_regis_export">
116
  <label for="wpuf-selected_regis_export"><?php esc_html_e( 'Select individual', 'wp-user-frontend' ); ?></label>
117
  </p>
118
 
119
  <p>
120
- <select class="formlist" name="formlist[]" multiple="multiple">
121
  <?php foreach ( $forms as $form ) { ?>
122
  <option value="<?php echo esc_attr( $form->ID ); ?>"><?php echo esc_attr( $form->post_title ); ?></option>";
123
  <?php } ?>
@@ -141,40 +136,25 @@ class WPUF_Admin_Tools {
141
  * Import functionality
142
  */
143
  public function import_data() {
144
- if ( isset( $_FILES['import'] ) && check_admin_referer( 'wpuf-import' ) ) {
145
- $import_files = array_map( 'sanitize_text_field', wp_unslash( $_FILES['import'] ) );
146
-
147
- if ( $import_files['error'] > 0 ) {
148
- printf( '<div class="error"><p>%s</p></div>', esc_html( __( 'Somthing went wrong. Please choose a file again', 'wp-user-frontend' ) ) );
149
- } else {
150
- $file_name = $import_files['name'];
151
- $file_ext = pathinfo( $file_name, PATHINFO_EXTENSION );
152
- $file_size = $import_files['size'];
153
-
154
- if ( ( $file_ext == 'json' ) && ( $file_size < 500000 ) ) {
155
- $data = static::import_json_file( $import_files['tmp_name'] );
156
-
157
- if ( $data ) {
158
- printf( '<div class="updated"><p>%s</p></div>', esc_html( __( 'Import successful. Have fun!', 'wp-user-frontend' ) ) );
159
- }
160
- } else {
161
- printf( '<div class="error"><p>%s</p></div>',esc_html( __( 'Invalid file or file size too big.', 'wp-user-frontend' ) ) );
162
- }
163
- }
164
- } ?>
165
-
166
  <h3><?php esc_html_e( 'Import forms', 'wp-user-frontend' ); ?></h3>
167
 
168
- <p><?php esc_html_e( 'Click Browse button and choose a json file that you backup before.', 'wp-user-frontend' ); ?></p>
169
- <p><?php echo wp_kses( __( 'Press <strong>Import</strong> button, we will do the rest for you.', 'wp-user-frontend' ), array(
170
- 'strong' => array()
171
- ) ); ?></p>
172
 
173
- <form action="" method="post" enctype='multipart/form-data' style="margin-top: 20px;">
174
- <?php wp_nonce_field( 'wpuf-import' ); ?>
175
- <input type='file' name='import' />
176
- <input type="submit" class="button button-primary" name="import_data" value="<?php esc_html_e( 'Import', 'wp-user-frontend' ); ?>">
177
- </form>
 
 
 
 
 
 
 
178
  <?php
179
  }
180
 
@@ -189,6 +169,8 @@ class WPUF_Admin_Tools {
189
  $encode_data = file_get_contents( $file );
190
  $options = json_decode( $encode_data, true );
191
 
 
 
192
  foreach ( $options as $key => $value ) {
193
  $generate_post = [
194
  'post_title' => $value['post_data']['post_title'],
@@ -200,7 +182,9 @@ class WPUF_Admin_Tools {
200
 
201
  $post_id = wp_insert_post( $generate_post, true );
202
 
203
- if ( $post_id && !is_wp_error( $post_id ) ) {
 
 
204
  foreach ( $value['meta_data']['fields'] as $order => $field ) {
205
  wpuf_insert_form_field( $post_id, $field, false, $order );
206
  }
@@ -210,45 +194,30 @@ class WPUF_Admin_Tools {
210
  }
211
  }
212
 
213
- return true;
214
- }
215
-
216
- /**
217
- * Export Registration form
218
- *
219
- * @param string $export_type
220
- * @param int $post_ids
221
- */
222
- public function export_regis_data( $export_type, $post_ids ) {
223
- if ( $export_type == 'all' && check_admin_referer( 'wpuf-export-regs-form' ) ) {
224
- static::export_to_json( 'wpuf_profile' );
225
- } elseif ( $export_type == 'selected' && check_admin_referer( 'wpuf-export-regs-form' ) ) {
226
- $formlist = isset( $_POST['formlist'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['formlist'] ) ) : [];
227
-
228
- if ( $formlist == null ) {
229
- printf( '<div class="error"><p>%s</p></div>', esc_html( __( 'Please select some form for exporting', 'wp-user-frontend' ) ) );
230
- } else {
231
- static::export_to_json( 'wpuf_profile', $post_ids );
232
- }
233
  }
 
 
234
  }
235
 
236
  /**
237
  * Export normal form data
238
  *
239
  * @param string $export_type
240
- * @param int $post_ids
241
  */
242
- public function export_data( $export_type, $post_ids ) {
243
- $formlist = isset( $_POST['formlist'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['formlist'] ) ) : [];
244
-
245
- if ( $export_type == 'all' && check_admin_referer( 'wpuf-export-form' ) ) {
246
- static::export_to_json( 'wpuf_forms' );
247
- } elseif ( $export_type == 'selected' && check_admin_referer( 'wpuf-export-form' ) ) {
248
- if ( $formlist == null ) {
249
- printf( '<div class="error"><p>%s</p></div>',esc_html( __( 'Please select some form for exporting', 'wp-user-frontend' ) ) );
 
250
  } else {
251
- static::export_to_json( 'wpuf_forms', $post_ids );
252
  }
253
  }
254
  }
@@ -259,7 +228,7 @@ class WPUF_Admin_Tools {
259
  * @param string $post_type
260
  * @param array $post_ids
261
  */
262
- public static function export_to_json( $post_type, $post_ids = [ ] ) {
263
  $formatted_data = [];
264
  $ids = [];
265
  $blogname = strtolower( str_replace( ' ', '-', get_option( 'blogname' ) ) );
6
  * @since 2.2
7
  */
8
  class WPUF_Admin_Tools {
9
+
10
  /**
11
  * List of All the post forms
12
  *
13
  * @return void
14
  */
15
  public function list_forms() {
16
+ $post_data = wp_unslash( $_POST );
17
 
18
+ if ( isset( $post_data['export'] ) ) {
19
+ check_admin_referer( 'wpuf-export-form' );
 
20
 
21
+ $export_type = isset( $post_data['export_type'] ) ? sanitize_text_field( $post_data['export_type'] ) : 'all';
22
+ $form_ids = isset( $post_data['form_ids'] ) ? array_map( 'absint', $post_data['form_ids'] ) : array();
23
 
24
+ $this->export_forms( 'wpuf_forms', $export_type, $form_ids );
 
 
25
  }
26
 
27
  $args = [
39
  <div class="main">
40
  <form action="" method="post" style="margin-top: 20px;">
41
  <p>
42
+ <input class="export_type" type="radio" name="export_type" value="all" id="wpuf-all_export" checked>
43
  <label for="wpuf-all_export"><?php esc_html_e( 'All', 'wp-user-frontend' ); ?></label>
44
  </p>
45
 
46
  <p>
47
+ <input class="export_type" type="radio" name="export_type" value="selected" id="wpuf-selected_export">
48
  <label for="wpuf-selected_export"><?php esc_html_e( 'Select individual', 'wp-user-frontend' ); ?></label></p>
49
  <p>
50
+ <select class="formlist" name="form_ids[]" multiple="multiple">
51
  <?php foreach ( $forms as $form ) { ?>
52
  <option value="<?php echo esc_attr( $form->ID ); ?>"><?php echo esc_attr( $form->post_title ); ?></option>
53
  <?php } ?>
73
  * @return void
74
  */
75
  public function list_regis_forms() {
76
+ $post_data = wp_unslash( $_POST );
 
 
 
 
 
77
 
78
+ if ( isset( $post_data['export_regis_form'] ) ) {
79
+ check_admin_referer( 'wpuf-export-regs-form' );
80
 
81
+ $export_type = isset( $post_data['export_type'] ) ? sanitize_text_field( $post_data['export_type'] ) : 'all';
82
+ $form_ids = isset( $post_data['form_ids'] ) ? array_map( 'absint', $post_data['form_ids'] ) : array();
83
 
84
+ $this->export_forms( 'wpuf_profile', $export_type, $form_ids );
 
 
85
  }
86
 
87
  $args = [
102
  <form action="" method="post" style="margin-top: 20px;">
103
 
104
  <p>
105
+ <input class="export_type" type="radio" name="export_type" value="all" id="wpuf-all_regis_export" checked>
106
  <label for="wpuf-all_regis_export"><?php esc_html_e( 'All', 'wp-user-frontend' ); ?></label>
107
  </p>
108
 
109
  <p>
110
+ <input class="export_type" type="radio" name="export_type" value="selected" id="wpuf-selected_regis_export">
111
  <label for="wpuf-selected_regis_export"><?php esc_html_e( 'Select individual', 'wp-user-frontend' ); ?></label>
112
  </p>
113
 
114
  <p>
115
+ <select class="formlist" name="form_ids[]" multiple="multiple">
116
  <?php foreach ( $forms as $form ) { ?>
117
  <option value="<?php echo esc_attr( $form->ID ); ?>"><?php echo esc_attr( $form->post_title ); ?></option>";
118
  <?php } ?>
136
  * Import functionality
137
  */
138
  public function import_data() {
139
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  <h3><?php esc_html_e( 'Import forms', 'wp-user-frontend' ); ?></h3>
141
 
142
+ <p>
143
+ <?php esc_html_e( 'Upload your JSON file and start imporing WPUF forms here', 'wp-user-frontend' ); ?>
144
+ </p>
 
145
 
146
+ <div id="wpuf-import-form">
147
+ <wpuf-form-uploader />
148
+ </div>
149
+
150
+ <script type="text/x-template" id="wpuf-import-form-template">
151
+ <button v-if="! isBusy" type="button" class="button button-primary" @click="openImageManager()">
152
+ <?php esc_html_e( 'Upload JSON File', 'wp-user-frontend' ); ?>
153
+ </button>
154
+ <button v-else type="button" class="button button-primary" disabled>
155
+ <?php esc_html_e( 'Importing JSON File', 'wp-user-frontend' ); ?>...
156
+ </button>
157
+ </script>
158
  <?php
159
  }
160
 
169
  $encode_data = file_get_contents( $file );
170
  $options = json_decode( $encode_data, true );
171
 
172
+ $errors = new WP_Error();
173
+
174
  foreach ( $options as $key => $value ) {
175
  $generate_post = [
176
  'post_title' => $value['post_data']['post_title'],
182
 
183
  $post_id = wp_insert_post( $generate_post, true );
184
 
185
+ if ( is_wp_error( $post_id ) ) {
186
+ $errors->add( $post_id->get_error_code(), $post_id->get_error_message() );
187
+ } else {
188
  foreach ( $value['meta_data']['fields'] as $order => $field ) {
189
  wpuf_insert_form_field( $post_id, $field, false, $order );
190
  }
194
  }
195
  }
196
 
197
+ if ( $errors->has_errors() ) {
198
+ return $errors;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  }
200
+
201
+ return true;
202
  }
203
 
204
  /**
205
  * Export normal form data
206
  *
207
  * @param string $export_type
208
+ * @param int $form_ids
209
  */
210
+ public function export_forms( $form_type, $export_type, $form_ids ) {
211
+ if ( $export_type === 'all' ) {
212
+ static::export_to_json( $form_type );
213
+ } else if ( $export_type === 'selected' ) {
214
+ if ( empty( $form_ids ) ) {
215
+ printf(
216
+ '<div class="error"><p>%s</p></div>',
217
+ esc_html__( 'Please select some form for exporting', 'wp-user-frontend' )
218
+ );
219
  } else {
220
+ static::export_to_json( $form_type, $form_ids );
221
  }
222
  }
223
  }
228
  * @param string $post_type
229
  * @param array $post_ids
230
  */
231
+ public static function export_to_json( $post_type, $post_ids = [] ) {
232
  $formatted_data = [];
233
  $ids = [];
234
  $blogname = strtolower( str_replace( ' ', '-', get_option( 'blogname' ) ) );
admin/form-builder/assets/js/components/builder-stage/index.js CHANGED
@@ -1,7 +1,7 @@
1
  Vue.component('builder-stage', {
2
  template: '#tmpl-wpuf-builder-stage',
3
 
4
- mixins: wpuf_form_builder_mixins(wpuf_mixins.builder_stage),
5
 
6
  computed: {
7
  form_fields: function () {
@@ -60,34 +60,10 @@ Vue.component('builder-stage', {
60
  };
61
 
62
  if ('panel' === source) {
63
- // prepare the payload to add new form element
64
- var field_template = ui.item[0].dataset.formField,
65
- field = $.extend(true, {}, self.field_settings[field_template].field_props);
66
-
67
- // check if these are already inserted
68
- if ( self.isSingleInstance( field_template ) && self.containsField( field_template ) ) {
69
- swal({
70
- title: "Oops...",
71
- text: "You already have this field in the form"
72
- });
73
-
74
- $(this).find('.button.ui-draggable.ui-draggable-handle').remove();
75
- return;
76
- }
77
-
78
- // add a random integer id
79
- field.id = self.get_random_id();
80
-
81
- // add meta key
82
- if ('yes' === field.is_meta && !field.name) {
83
- field.name = field.label.replace(/\W/g, '_').toLowerCase() + '_' + field.id;
84
- }
85
-
86
- payload.field = field;
87
-
88
  // add new form element
89
- if ( !in_column_field ) {
90
- self.$store.commit('add_form_field_element', payload);
 
91
  }
92
 
93
  // remove button from stage
1
  Vue.component('builder-stage', {
2
  template: '#tmpl-wpuf-builder-stage',
3
 
4
+ mixins: wpuf_form_builder_mixins(wpuf_mixins.builder_stage).concat(wpuf_mixins.add_form_field),
5
 
6
  computed: {
7
  form_fields: function () {
60
  };
61
 
62
  if ('panel' === source) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  // add new form element
64
+ if ( ! in_column_field ) {
65
+ var field_template = ui.item[0].dataset.formField;
66
+ self.add_form_field(field_template);
67
  }
68
 
69
  // remove button from stage
admin/form-builder/assets/js/components/form-fields/index.js CHANGED
@@ -4,7 +4,7 @@
4
  Vue.component('form-fields', {
5
  template: '#tmpl-wpuf-form-fields',
6
 
7
- mixins: wpuf_form_builder_mixins(wpuf_mixins.form_fields),
8
 
9
  computed: {
10
  panel_sections: function () {
@@ -35,42 +35,6 @@ Vue.component('form-fields', {
35
  this.$store.commit('panel_toggle', index);
36
  },
37
 
38
- add_form_field: function (field_template) {
39
- var payload = {
40
- toIndex: this.$store.state.form_fields.length,
41
- };
42
-
43
- // check if these are already inserted
44
- if ( this.isSingleInstance( field_template ) && this.containsField( field_template ) ) {
45
- swal({
46
- title: "Oops...",
47
- text: "You already have this field in the form"
48
- });
49
- return;
50
- }
51
-
52
- var field = $.extend(true, {}, this.$store.state.field_settings[field_template].field_props);
53
-
54
- field.id = this.get_random_id();
55
-
56
- if (!field.name && field.label) {
57
- field.name = field.label.replace(/\W/g, '_').toLowerCase();
58
-
59
- var same_template_fields = this.form_fields.filter(function (form_field) {
60
- return (form_field.template === field.template);
61
- });
62
-
63
- if (same_template_fields.length) {
64
- field.name += '_' + same_template_fields.length;
65
- }
66
- }
67
-
68
- payload.field = field;
69
-
70
- // add new form element
71
- this.$store.commit('add_form_field_element', payload);
72
- },
73
-
74
  is_pro_feature: function (field) {
75
  return this.field_settings[field].pro_feature;
76
  },
4
  Vue.component('form-fields', {
5
  template: '#tmpl-wpuf-form-fields',
6
 
7
+ mixins: wpuf_form_builder_mixins(wpuf_mixins.form_fields).concat(wpuf_mixins.add_form_field),
8
 
9
  computed: {
10
  panel_sections: function () {
35
  this.$store.commit('panel_toggle', index);
36
  },
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  is_pro_feature: function (field) {
39
  return this.field_settings[field].pro_feature;
40
  },
admin/form-builder/assets/js/mixins/add-form-field.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ wpuf_mixins.add_form_field = {
2
+ methods: {
3
+ add_form_field: function (field_template) {
4
+ var payload = {
5
+ toIndex: this.$store.state.form_fields.length,
6
+ };
7
+
8
+ // check if these are already inserted
9
+ if ( this.isSingleInstance( field_template ) && this.containsField( field_template ) ) {
10
+ swal({
11
+ title: "Oops...",
12
+ text: "You already have this field in the form"
13
+ });
14
+ return;
15
+ }
16
+
17
+ var field = $.extend(true, {}, this.$store.state.field_settings[field_template].field_props);
18
+
19
+ field.id = this.get_random_id();
20
+
21
+ if (!field.name && field.label) {
22
+ field.name = field.label.replace(/\W/g, '_').toLowerCase();
23
+
24
+ var same_template_fields = this.form_fields.filter(function (form_field) {
25
+ return (form_field.template === field.template);
26
+ });
27
+
28
+ if (same_template_fields.length) {
29
+ field.name += '_' + same_template_fields.length;
30
+ }
31
+ }
32
+
33
+ payload.field = field;
34
+
35
+ // add new form element
36
+ this.$store.commit('add_form_field_element', payload);
37
+ },
38
+ },
39
+ };
assets/js/frontend-form.js CHANGED
@@ -227,17 +227,18 @@
227
  wrap = '.category-wrap';
228
 
229
  $(wrap).on('change', el, function(){
 
230
  currentLevel = parseInt( $(this).parent().attr('level') );
231
- WP_User_Frontend.getChildCats( $(this), 'lvl', currentLevel+1, wrap, 'category');
232
  });
233
  },
234
 
235
- getChildCats: function (dropdown, result_div, level, wrap_div, taxonomy) {
236
 
237
- cat = $(dropdown).val();
238
- results_div = result_div + level;
239
- taxonomy = typeof taxonomy !== 'undefined' ? taxonomy : 'category';
240
- field_attr = $(dropdown).siblings('span').data('taxonomy');
241
 
242
  $.ajax({
243
  type: 'post',
@@ -246,7 +247,8 @@
246
  action: 'wpuf_get_child_cat',
247
  catID: cat,
248
  nonce: wpuf_frontend.nonce,
249
- field_attr: field_attr
 
250
  },
251
  beforeSend: function() {
252
  $(dropdown).parent().parent().next('.loading').addClass('wpuf-loading');
@@ -261,9 +263,11 @@
261
  });
262
 
263
  if(html != "") {
264
- $(dropdown).parent().addClass('hasChild').parent().append('<div id="'+result_div+level+'" level="'+level+'"></div>');
265
- dropdown.parent().parent().find('#'+results_div).html(html).slideDown('fast');
266
  }
 
 
267
  }
268
  });
269
  },
227
  wrap = '.category-wrap';
228
 
229
  $(wrap).on('change', el, function(){
230
+ var form_id = $( this ).data( 'form-id' );
231
  currentLevel = parseInt( $(this).parent().attr('level') );
232
+ WP_User_Frontend.getChildCats( $(this), currentLevel + 1, 'category', form_id );
233
  });
234
  },
235
 
236
+ getChildCats: function ( dropdown, level, taxonomy, form_id ) {
237
 
238
+ var cat = $(dropdown).val();
239
+ var container_id = 'wpuf-category-dropdown-lvl-' + level;
240
+ var taxonomy = typeof taxonomy !== 'undefined' ? taxonomy : 'category';
241
+ var field_attr = $(dropdown).siblings('span').data('taxonomy');
242
 
243
  $.ajax({
244
  type: 'post',
247
  action: 'wpuf_get_child_cat',
248
  catID: cat,
249
  nonce: wpuf_frontend.nonce,
250
+ field_attr: field_attr,
251
+ form_id: form_id,
252
  },
253
  beforeSend: function() {
254
  $(dropdown).parent().parent().next('.loading').addClass('wpuf-loading');
263
  });
264
 
265
  if(html != "") {
266
+ $(dropdown).parent().addClass('hasChild').parent().append('<div id="'+ container_id +'" level="'+level+'"></div>');
267
+ dropdown.parent().parent().find('#' + container_id ).html(html).slideDown('fast');
268
  }
269
+
270
+ $( document ).trigger( 'wpuf-ajax-fetched-child-categories', container_id, level, taxonomy );
271
  }
272
  });
273
  },
assets/js/frontend-form.min.js CHANGED
@@ -1 +1 @@
1
- !function(a,b){a.fn.listautowidth=function(){return this.each(function(){var b=a(this).width(),c=b/a(this).children("li").length;a(this).children("li").each(function(){var b=a(this).outerWidth(!0)-a(this).width();a(this).width(c-b)})})},b.WP_User_Frontend={init:function(){this.enableMultistep(this),a(".wpuf-form").on("click","img.wpuf-clone-field",this.cloneField),a(".wpuf-form").on("click","img.wpuf-remove-field",this.removeField),a(".wpuf-form").on("click","a.wpuf-delete-avatar",this.deleteAvatar),a(".wpuf-form").on("click","a#wpuf-post-draft",this.draftPost),a(".wpuf-form").on("click","button#wpuf-account-update-profile",this.account_update_profile),a(".wpuf-form-add").on("submit",this.formSubmit),a("form#post").on("submit",this.adminPostSubmit),a(".wpuf-form").on("step-change-fieldset",function(a,b,c){if(wpuf_plupload_items.length)for(var d=wpuf_plupload_items.length-1;d>=0;d--)wpuf_plupload_items[d].refresh();if(wpuf_map_items.length)for(var d=wpuf_map_items.length-1;d>=0;d--)google.maps.event.trigger(wpuf_map_items[d].map,"resize"),wpuf_map_items[d].map.setCenter(wpuf_map_items[d].center)}),this.ajaxCategory(),a(':submit[name="wpuf_user_subscription_cancel"]').click(function(b){b.preventDefault(),swal({text:wpuf_frontend.cancelSubMsg,type:"warning",showCancelButton:!0,confirmButtonColor:"#d54e21",confirmButtonText:wpuf_frontend.delete_it,cancelButtonText:wpuf_frontend.cancel_it,confirmButtonClass:"btn btn-success",cancelButtonClass:"btn btn-danger"}).then(function(b){if(!b)return!1;a("#wpuf_cancel_subscription").submit()})})},check_pass_strength:function(){var b=a("#pass1").val();if(a("#pass-strength-result").show(),a("#pass-strength-result").removeClass("short bad good strong"),!b)return a("#pass-strength-result").html("&nbsp;"),void a("#pass-strength-result").hide();if(void 0!==wp.passwordStrength)switch(wp.passwordStrength.meter(b,wp.passwordStrength.userInputBlacklist(),b)){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n.short)}},enableMultistep:function(c){var d=this,e=0,f=a(':hidden[name="wpuf_multistep_type"]').val();if(null!=f){if(a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-prev-btn").first().remove(),a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-next-btn").last().remove(),a(".wpuf-form fieldset").removeClass("field-active").first().addClass("field-active"),"progressive"==f&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){a("fieldset.wpuf-multistep-fieldset legend").first();a(".wpuf-multistep-progressbar").html('<div class="wpuf-progress-percentage"></div>');var g=a(".wpuf-multistep-progressbar"),h=a(".wpuf-progress-percentage");a(".wpuf-multistep-progressbar").progressbar({change:function(){h.text(g.progressbar("value")+"%")}}),a(".wpuf-multistep-fieldset legend").hide()}else a(".wpuf-form").each(function(){var b=a(this),c=a(".wpuf-multistep-progressbar",b),d="";c.addClass("wizard-steps"),d+='<ul class="wpuf-step-wizard">',a(".wpuf-multistep-fieldset",this).each(function(){d+="<li>"+a.trim(a("legend",this).text())+"</li>",a("legend",this).hide()}),d+="</ul>",c.append(d),a(".wpuf-step-wizard li",c).first().addClass("active-step"),a(".wpuf-step-wizard",c).listautowidth()});this.change_fieldset(e,f),a("fieldset .wpuf-multistep-prev-btn, fieldset .wpuf-multistep-next-btn").click(function(g){if(a(this).hasClass("wpuf-multistep-next-btn")){0!=d.formStepCheck("",a(this).closest("fieldset"))&&c.change_fieldset(++e,f)}else a(this).hasClass("wpuf-multistep-prev-btn")&&c.change_fieldset(--e,f);var h=a("form.wpuf-form-add"),i=h.offset().top;return b.scrollTo({top:i-32,behavior:"smooth"}),!1})}},change_fieldset:function(b,c){var d=a("fieldset.wpuf-multistep-fieldset").eq(b);a("fieldset.wpuf-multistep-fieldset").removeClass("field-active").eq(b).addClass("field-active"),a(".wpuf-step-wizard li").each(function(){a(this).index()<=b?"step_by_step"==c?a(this).addClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).addClass("passed-wpuf-ms-bar"):"step_by_step"==c?a(this).removeClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).removeClass("passed-wpuf-ms-bar")}),a(".wpuf-step-wizard li").removeClass("wpuf-ms-bar-active active-step completed-step"),a(".passed-wpuf-ms-bar").addClass("completed-step").last().addClass("wpuf-ms-bar-active"),a(".wpuf-ms-bar-active").addClass("active-step");var e=a("fieldset.wpuf-multistep-fieldset").eq(b).find("legend").text();if(e=a.trim(e),"progressive"==c&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){var f=100*(b+1)/a("fieldset.wpuf-multistep-fieldset").length,f=Number(f.toFixed(2));a(".wpuf-multistep-progressbar").progressbar({value:f}),a(".wpuf-progress-percentage").text(e+" ("+f+"%)")}a(".wpuf-form").trigger("step-change-fieldset",[b,d])},ajaxCategory:function(){var b=".category-wrap";a(b).on("change",".cat-ajax",function(){currentLevel=parseInt(a(this).parent().attr("level")),WP_User_Frontend.getChildCats(a(this),"lvl",currentLevel+1,b,"category")})},getChildCats:function(b,c,d,e,f){cat=a(b).val(),results_div=c+d,f=void 0!==f?f:"category",field_attr=a(b).siblings("span").data("taxonomy"),a.ajax({type:"post",url:wpuf_frontend.ajaxurl,data:{action:"wpuf_get_child_cat",catID:cat,nonce:wpuf_frontend.nonce,field_attr:field_attr},beforeSend:function(){a(b).parent().parent().next(".loading").addClass("wpuf-loading")},complete:function(){a(b).parent().parent().next(".loading").removeClass("wpuf-loading")},success:function(e){a(b).parent().nextAll().each(function(){a(this).remove()}),""!=e&&(a(b).parent().addClass("hasChild").parent().append('<div id="'+c+d+'" level="'+d+'"></div>'),b.parent().parent().find("#"+results_div).html(e).slideDown("fast"))}})},cloneField:function(b){b.preventDefault();var c=a(this).closest("tr"),d=c.clone();d.find("input").val(""),d.find(":checked").attr("checked",""),c.after(d)},removeField:function(){var b=a(this).closest("tr");b.siblings().andSelf().length>1&&b.remove()},adminPostSubmit:function(b){b.preventDefault();var c=a(this);if(WP_User_Frontend.validateForm(c))return!0},draftPost:function(b){b.preventDefault();var c=a(this),d=a(this).closest("form"),e=d.serialize()+"&action=wpuf_draft_post",f=d.find('input[type="hidden"][name="post_id"]').val(),g=[];a(".wpuf-rich-validation").each(function(b,c){var c=a(c),d=c.data("id"),e=c.data("name"),f=a.trim(tinyMCE.get(d).getContent());g.push(e+"="+encodeURIComponent(f))}),e=e+"&"+g.join("&"),c.after(' <span class="wpuf-loading"></span>'),a.post(wpuf_frontend.ajaxurl,e,function(b){if(void 0===f){var e='<input type="hidden" name="post_id" value="'+b.post_id+'">';e+='<input type="hidden" name="post_date" value="'+b.date+'">',e+='<input type="hidden" name="post_author" value="'+b.post_author+'">',e+='<input type="hidden" name="comment_status" value="'+b.comment_status+'">',d.append(e)}c.next("span.wpuf-loading").remove(),c.after('<span class="wpuf-draft-saved">&nbsp; Post Saved</span>'),a(".wpuf-draft-saved").delay(2500).fadeOut("fast",function(){a(this).remove()})})},account_update_profile:function(b){b.preventDefault();var c=a(this).closest("form");a.post(wpuf_frontend.ajaxurl,c.serialize(),function(a){a.success?(c.find(".wpuf-error").hide(),c.find(".wpuf-success").show()):(c.find(".wpuf-success").hide(),c.find(".wpuf-error").show(),c.find(".wpuf-error").text(a.data))})},formStepCheck:function(a,b){var c=b;c.find("input[type=submit]");return form_data=WP_User_Frontend.validateForm(c),0==form_data&&WP_User_Frontend.addErrorNotice(self,"bottom"),form_data},formSubmit:function(c){c.preventDefault();var d=a(this),e=d.find("input[type=submit]");form_data=WP_User_Frontend.validateForm(d),form_data&&(d.find("li.wpuf-submit").append('<span class="wpuf-loading"></span>'),e.attr("disabled","disabled").addClass("button-primary-disabled"),a.post(wpuf_frontend.ajaxurl,form_data,function(c){if(c.success)a("body").trigger("wpuf:postform:success",c),1==c.show_message?(d.before('<div class="wpuf-success">'+c.message+"</div>"),d.slideUp("fast",function(){d.remove()}),a("html, body").animate({scrollTop:a(".wpuf-success").offset().top-100},"fast")):b.location=c.redirect_to;else{if(void 0!==c.type&&"login"===c.type)return void(confirm(c.error)?b.location=c.redirect_to:(e.removeAttr("disabled"),e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()));d.find(".g-recaptcha").length>0&&grecaptcha.reset(),swal({html:c.error,type:"warning",showCancelButton:!1,confirmButtonColor:"#d54e21",confirmButtonText:"OK",cancelButtonClass:"btn btn-danger"}),e.removeAttr("disabled")}e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()}))},validateForm:function(b){var c=!1;error_type="",WP_User_Frontend.removeErrors(b),WP_User_Frontend.removeErrorNotice(b),b.find('[data-required="yes"]:visible').each(function(b,d){var e=a(d).data("type");switch(j="",e){case"rich":var f=a(d).data("id");""===(j=a.trim(tinyMCE.get(f).getContent()))&&(c=!0,WP_User_Frontend.markError(d));break;case"textarea":case"text":""===(j=a.trim(a(d).val()))&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"password":case"confirm_password":var g=a(d).data("repeat");if(j=a.trim(a(d).val()),""===j&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type)),g){var h=a('[data-type="confirm_password"]').eq(0);h.val()!=j&&(c=!0,error_type="mismatch",WP_User_Frontend.markError(h,error_type))}break;case"select":(j=a(d).val())&&"-1"!==j||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"multiselect":null!==(j=a(d).val())&&0!==j.length||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"tax-checkbox":var i=a(d).children().find("input:checked").length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"radio":var i=a(d).find("input:checked").length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"file":var i=a(d).find("ul").children().length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"email":var j=a(d).val();""!==j?WP_User_Frontend.isValidEmail(j)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)):""===j&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"url":var j=a(d).val();""!==j&&(WP_User_Frontend.isValidURL(j)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)))}});var d=b.find('[data-required="yes"][name="google_map"]');if(d){","==a(d).val()&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type))}if(c)return WP_User_Frontend.addErrorNotice(b,"end"),!1;var e=b.serialize(),f=[];return a(".wpuf-rich-validation",b).each(function(b,c){var c=a(c),d=c.data("id"),e=c.data("name"),g=a.trim(tinyMCE.get(d).getContent());f.push(e+"="+encodeURIComponent(g))}),e=e+"&"+f.join("&")},addErrorNotice:function(b,c){"bottom"==c?a(".wpuf-multistep-fieldset:visible").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>"):a(b).find("li.wpuf-submit").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>")},removeErrorNotice:function(b){a(b).find(".wpuf-errors").remove()},markError:function(b,c){var d="";if(a(b).closest("li").addClass("has-error"),c){switch(d=a(b).closest("li").data("label"),c){case"required":case"mismatch":case"validation":d=d+" "+error_str_obj[c]}a(b).siblings(".wpuf-error-msg").remove(),a(b).after('<div class="wpuf-error-msg">'+d+"</div>")}a(b).focus()},removeErrors:function(b){a(b).find(".has-error").removeClass("has-error"),a(".wpuf-error-msg").remove()},isValidEmail:function(a){return new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(a)},isValidURL:function(a){return new RegExp("^(http://www.|https://www.|ftp://www.|www.|http://|https://){1}([0-9A-Za-z]+.)").test(a)},insertImage:function(b,c){if(a("#"+b).length){var d=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:"wpuf-insert-image-container",multipart:!0,multipart_params:{action:"wpuf_insert_image",form_id:a("#"+b).data("form_id")},multiple_queues:!1,multi_selection:!1,urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:"2mb",url:wpuf_frontend_upload.plupload.url,flash_swf_url:wpuf_frontend_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:"jpg,jpeg,gif,png,bmp"}]});d.bind("Init",function(a,b){}),d.bind("FilesAdded",function(b,c){var d=a("#wpuf-insert-image-container");a.each(c,function(a,b){d.append('<div class="upload-item" id="'+b.id+'"><div class="progress progress-striped active"><div class="bar"></div></div></div>')}),b.refresh(),b.start()}),d.bind("QueueChanged",function(a){d.start()}),d.bind("UploadProgress",function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")}),d.bind("Error",function(a,b){alert("Error #"+b.code+": "+b.message)}),d.bind("FileUploaded",function(b,d,e){if(a("#"+d.id).remove(),"error"!==e.response){if("undefined"!=typeof tinyMCE)if("function"!=typeof tinyMCE.execInstanceCommand){var f=tinyMCE.get("post_content_"+c);null!==f&&f.insertContent(e.response)}else tinyMCE.execInstanceCommand("post_content_"+c,"mceInsertContent",!1,e.response);var g=a("#post_content_"+c);g.val(g.val()+e.response)}else alert("Something went wrong")}),d.init()}},deleteAvatar:function(b){b.preventDefault(),confirm(a(this).data("confirm"))&&a.post(wpuf_frontend.ajaxurl,{action:"wpuf_delete_avatar",_wpnonce:wpuf_frontend.nonce},function(){a(b.target).parent().remove(),a("[id^=wpuf-avatar]").css("display","")})},editorLimit:{bind:function(b,c,d){"no"===d?(a("textarea#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b)}),a("input#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b)}),a("textarea#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b)},100)}),a("input#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b)},100)})):setTimeout(function(){tinyMCE.get(c).onKeyDown.add(function(a,c){WP_User_Frontend.editorLimit.tinymce.onKeyDown(a,c,b)}),tinyMCE.get(c).onPaste.add(function(a,c){setTimeout(function(){WP_User_Frontend.editorLimit.tinymce.onPaste(a,c,b)},100)})},1e3)},tinymce:{getStats:function(a){var b=a.getBody(),c=tinymce.trim(b.innerText||b.textContent);return{chars:c.length,words:c.split(/[\w\u2019\'-]+/).length}},onKeyDown:function(b,c,d){var e=WP_User_Frontend.editorLimit.tinymce.getStats(b).words-1;d&&a(".mce-path-item.mce-last",b.container).html("Word Limit : "+e+"/"+d),d&&e>d&&(WP_User_Frontend.editorLimit.blockTyping(c),jQuery(".mce-path-item.mce-last",b.container).html(wpuf_frontend.word_limit))},onPaste:function(a,b,c){var d=a.getContent().split(" ").slice(0,c).join(" ");a.setContent(d),WP_User_Frontend.editorLimit.make_media_embed_code(d,a)}},textLimit:function(b,c){var d=a(this),e=d.val().split(" ");c&&e.length>c?(d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(wpuf_frontend.word_limit),WP_User_Frontend.editorLimit.blockTyping(b)):d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(""),"paste"===b.type&&d.val(e.slice(0,c).join(" "))},blockTyping:function(b){-1!==a.inArray(b.keyCode,[46,8,9,27,13,110,190,189])||65==b.keyCode&&!0===b.ctrlKey||b.keyCode>=35&&b.keyCode<=40||(b.preventDefault(),b.stopPropagation())},make_media_embed_code:function(b,c){a.post(ajaxurl,{action:"make_media_embed_code",content:b},function(a){c.setContent(c.getContent()+c.setContent(a))})}}},a(function(){if(WP_User_Frontend.init(),a("ul.wpuf-payment-gateways").on("click","input[type=radio]",function(b){a(".wpuf-payment-instruction").slideUp(250),a(this).parents("li").find(".wpuf-payment-instruction").slideDown(250)}),a("ul.wpuf-payment-gateways li").find("input[type=radio]").is(":checked")){a("ul.wpuf-payment-gateways li").find("input[type=radio]:checked").parents("li").find(".wpuf-payment-instruction").slideDown(250)}else a("ul.wpuf-payment-gateways li").first().find("input[type=radio]").click()}),a(function(){a('input[name="first_name"], input[name="last_name"]').on("change keyup",function(){var b,c=a.makeArray(a('input[name="first_name"], input[name="last_name"]').map(function(){if(b=a(this).val())return b})).join(" ");a('input[name="display_name"]').val(c)})}),a(function(a){a('.wpuf-form-add input[name="dokan_store_name"]').on("focusout",function(){var b=a(this).val().toLowerCase().replace(/-+/g,"").replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"");a('input[name="shopurl"]').val(b),a("#url-alart").text(b),a('input[name="shopurl"]').focus()}),a('.wpuf-form-add input[name="shopurl"]').keydown(function(b){a(this).val();-1!==a.inArray(b.keyCode,[46,8,9,27,13,91,109,110,173,189,190])||65==b.keyCode&&!0===b.ctrlKey||b.keyCode>=35&&b.keyCode<=39||(b.shiftKey||(b.keyCode<65||b.keyCode>90)&&(b.keyCode<48||b.keyCode>57))&&(b.keyCode<96||b.keyCode>105)&&b.preventDefault()}),a('.wpuf-form-add input[name="shopurl"]').keyup(function(b){a("#url-alart").text(a(this).val())}),a('.wpuf-form-add input[name="shopurl"]').on("focusout",function(){var b=a(this),c={action:"shop_url",url_slug:b.val(),_nonce:dokan.nonce};""!==b.val()&&a.post(dokan.ajaxurl,c,function(b){0==b?(a("#url-alart").removeClass("text-success").addClass("text-danger"),a("#url-alart-mgs").removeClass("text-success").addClass("text-danger").text(dokan.seller.notAvailable)):(a("#url-alart").removeClass("text-danger").addClass("text-success"),a("#url-alart-mgs").removeClass("text-danger").addClass("text-success").text(dokan.seller.available))})}),a(".wpuf-form-add #wpuf-map-add-location").attr("name","find_address")})}(jQuery,window);
1
+ !function(a,b){a.fn.listautowidth=function(){return this.each(function(){var b=a(this).width(),c=b/a(this).children("li").length;a(this).children("li").each(function(){var b=a(this).outerWidth(!0)-a(this).width();a(this).width(c-b)})})},b.WP_User_Frontend={init:function(){this.enableMultistep(this),a(".wpuf-form").on("click","img.wpuf-clone-field",this.cloneField),a(".wpuf-form").on("click","img.wpuf-remove-field",this.removeField),a(".wpuf-form").on("click","a.wpuf-delete-avatar",this.deleteAvatar),a(".wpuf-form").on("click","a#wpuf-post-draft",this.draftPost),a(".wpuf-form").on("click","button#wpuf-account-update-profile",this.account_update_profile),a(".wpuf-form-add").on("submit",this.formSubmit),a("form#post").on("submit",this.adminPostSubmit),a(".wpuf-form").on("step-change-fieldset",function(a,b,c){if(wpuf_plupload_items.length)for(var d=wpuf_plupload_items.length-1;d>=0;d--)wpuf_plupload_items[d].refresh();if(wpuf_map_items.length)for(var d=wpuf_map_items.length-1;d>=0;d--)google.maps.event.trigger(wpuf_map_items[d].map,"resize"),wpuf_map_items[d].map.setCenter(wpuf_map_items[d].center)}),this.ajaxCategory(),a(':submit[name="wpuf_user_subscription_cancel"]').click(function(b){b.preventDefault(),swal({text:wpuf_frontend.cancelSubMsg,type:"warning",showCancelButton:!0,confirmButtonColor:"#d54e21",confirmButtonText:wpuf_frontend.delete_it,cancelButtonText:wpuf_frontend.cancel_it,confirmButtonClass:"btn btn-success",cancelButtonClass:"btn btn-danger"}).then(function(b){if(!b)return!1;a("#wpuf_cancel_subscription").submit()})})},check_pass_strength:function(){var b=a("#pass1").val();if(a("#pass-strength-result").show(),a("#pass-strength-result").removeClass("short bad good strong"),!b)return a("#pass-strength-result").html("&nbsp;"),void a("#pass-strength-result").hide();if(void 0!==wp.passwordStrength)switch(wp.passwordStrength.meter(b,wp.passwordStrength.userInputBlacklist(),b)){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n.short)}},enableMultistep:function(c){var d=this,e=0,f=a(':hidden[name="wpuf_multistep_type"]').val();if(null!=f){if(a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-prev-btn").first().remove(),a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-next-btn").last().remove(),a(".wpuf-form fieldset").removeClass("field-active").first().addClass("field-active"),"progressive"==f&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){a("fieldset.wpuf-multistep-fieldset legend").first();a(".wpuf-multistep-progressbar").html('<div class="wpuf-progress-percentage"></div>');var g=a(".wpuf-multistep-progressbar"),h=a(".wpuf-progress-percentage");a(".wpuf-multistep-progressbar").progressbar({change:function(){h.text(g.progressbar("value")+"%")}}),a(".wpuf-multistep-fieldset legend").hide()}else a(".wpuf-form").each(function(){var b=a(this),c=a(".wpuf-multistep-progressbar",b),d="";c.addClass("wizard-steps"),d+='<ul class="wpuf-step-wizard">',a(".wpuf-multistep-fieldset",this).each(function(){d+="<li>"+a.trim(a("legend",this).text())+"</li>",a("legend",this).hide()}),d+="</ul>",c.append(d),a(".wpuf-step-wizard li",c).first().addClass("active-step"),a(".wpuf-step-wizard",c).listautowidth()});this.change_fieldset(e,f),a("fieldset .wpuf-multistep-prev-btn, fieldset .wpuf-multistep-next-btn").click(function(g){if(a(this).hasClass("wpuf-multistep-next-btn")){0!=d.formStepCheck("",a(this).closest("fieldset"))&&c.change_fieldset(++e,f)}else a(this).hasClass("wpuf-multistep-prev-btn")&&c.change_fieldset(--e,f);var h=a("form.wpuf-form-add"),i=h.offset().top;return b.scrollTo({top:i-32,behavior:"smooth"}),!1})}},change_fieldset:function(b,c){var d=a("fieldset.wpuf-multistep-fieldset").eq(b);a("fieldset.wpuf-multistep-fieldset").removeClass("field-active").eq(b).addClass("field-active"),a(".wpuf-step-wizard li").each(function(){a(this).index()<=b?"step_by_step"==c?a(this).addClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).addClass("passed-wpuf-ms-bar"):"step_by_step"==c?a(this).removeClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).removeClass("passed-wpuf-ms-bar")}),a(".wpuf-step-wizard li").removeClass("wpuf-ms-bar-active active-step completed-step"),a(".passed-wpuf-ms-bar").addClass("completed-step").last().addClass("wpuf-ms-bar-active"),a(".wpuf-ms-bar-active").addClass("active-step");var e=a("fieldset.wpuf-multistep-fieldset").eq(b).find("legend").text();if(e=a.trim(e),"progressive"==c&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){var f=100*(b+1)/a("fieldset.wpuf-multistep-fieldset").length,f=Number(f.toFixed(2));a(".wpuf-multistep-progressbar").progressbar({value:f}),a(".wpuf-progress-percentage").text(e+" ("+f+"%)")}a(".wpuf-form").trigger("step-change-fieldset",[b,d])},ajaxCategory:function(){a(".category-wrap").on("change",".cat-ajax",function(){var b=a(this).data("form-id");currentLevel=parseInt(a(this).parent().attr("level")),WP_User_Frontend.getChildCats(a(this),currentLevel+1,"category",b)})},getChildCats:function(b,c,d,e){var f=a(b).val(),g="wpuf-category-dropdown-lvl-"+c,d=void 0!==d?d:"category",h=a(b).siblings("span").data("taxonomy");a.ajax({type:"post",url:wpuf_frontend.ajaxurl,data:{action:"wpuf_get_child_cat",catID:f,nonce:wpuf_frontend.nonce,field_attr:h,form_id:e},beforeSend:function(){a(b).parent().parent().next(".loading").addClass("wpuf-loading")},complete:function(){a(b).parent().parent().next(".loading").removeClass("wpuf-loading")},success:function(e){a(b).parent().nextAll().each(function(){a(this).remove()}),""!=e&&(a(b).parent().addClass("hasChild").parent().append('<div id="'+g+'" level="'+c+'"></div>'),b.parent().parent().find("#"+g).html(e).slideDown("fast")),a(document).trigger("wpuf-ajax-fetched-child-categories",g,c,d)}})},cloneField:function(b){b.preventDefault();var c=a(this).closest("tr"),d=c.clone();d.find("input").val(""),d.find(":checked").attr("checked",""),c.after(d)},removeField:function(){var b=a(this).closest("tr");b.siblings().andSelf().length>1&&b.remove()},adminPostSubmit:function(b){b.preventDefault();var c=a(this);if(WP_User_Frontend.validateForm(c))return!0},draftPost:function(b){b.preventDefault();var c=a(this),d=a(this).closest("form"),e=d.serialize()+"&action=wpuf_draft_post",f=d.find('input[type="hidden"][name="post_id"]').val(),g=[];a(".wpuf-rich-validation").each(function(b,c){var c=a(c),d=c.data("id"),e=c.data("name"),f=a.trim(tinyMCE.get(d).getContent());g.push(e+"="+encodeURIComponent(f))}),e=e+"&"+g.join("&"),c.after(' <span class="wpuf-loading"></span>'),a.post(wpuf_frontend.ajaxurl,e,function(b){if(void 0===f){var e='<input type="hidden" name="post_id" value="'+b.post_id+'">';e+='<input type="hidden" name="post_date" value="'+b.date+'">',e+='<input type="hidden" name="post_author" value="'+b.post_author+'">',e+='<input type="hidden" name="comment_status" value="'+b.comment_status+'">',d.append(e)}c.next("span.wpuf-loading").remove(),c.after('<span class="wpuf-draft-saved">&nbsp; Post Saved</span>'),a(".wpuf-draft-saved").delay(2500).fadeOut("fast",function(){a(this).remove()})})},account_update_profile:function(b){b.preventDefault();var c=a(this).closest("form");a.post(wpuf_frontend.ajaxurl,c.serialize(),function(a){a.success?(c.find(".wpuf-error").hide(),c.find(".wpuf-success").show()):(c.find(".wpuf-success").hide(),c.find(".wpuf-error").show(),c.find(".wpuf-error").text(a.data))})},formStepCheck:function(a,b){var c=b;c.find("input[type=submit]");return form_data=WP_User_Frontend.validateForm(c),0==form_data&&WP_User_Frontend.addErrorNotice(self,"bottom"),form_data},formSubmit:function(c){c.preventDefault();var d=a(this),e=d.find("input[type=submit]");form_data=WP_User_Frontend.validateForm(d),form_data&&(d.find("li.wpuf-submit").append('<span class="wpuf-loading"></span>'),e.attr("disabled","disabled").addClass("button-primary-disabled"),a.post(wpuf_frontend.ajaxurl,form_data,function(c){if(c.success)a("body").trigger("wpuf:postform:success",c),1==c.show_message?(d.before('<div class="wpuf-success">'+c.message+"</div>"),d.slideUp("fast",function(){d.remove()}),a("html, body").animate({scrollTop:a(".wpuf-success").offset().top-100},"fast")):b.location=c.redirect_to;else{if(void 0!==c.type&&"login"===c.type)return void(confirm(c.error)?b.location=c.redirect_to:(e.removeAttr("disabled"),e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()));d.find(".g-recaptcha").length>0&&grecaptcha.reset(),swal({html:c.error,type:"warning",showCancelButton:!1,confirmButtonColor:"#d54e21",confirmButtonText:"OK",cancelButtonClass:"btn btn-danger"}),e.removeAttr("disabled")}e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()}))},validateForm:function(b){var c=!1;error_type="",WP_User_Frontend.removeErrors(b),WP_User_Frontend.removeErrorNotice(b),b.find('[data-required="yes"]:visible').each(function(b,d){var e=a(d).data("type");switch(j="",e){case"rich":var f=a(d).data("id");""===(j=a.trim(tinyMCE.get(f).getContent()))&&(c=!0,WP_User_Frontend.markError(d));break;case"textarea":case"text":""===(j=a.trim(a(d).val()))&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"password":case"confirm_password":var g=a(d).data("repeat");if(j=a.trim(a(d).val()),""===j&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type)),g){var h=a('[data-type="confirm_password"]').eq(0);h.val()!=j&&(c=!0,error_type="mismatch",WP_User_Frontend.markError(h,error_type))}break;case"select":(j=a(d).val())&&"-1"!==j||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"multiselect":null!==(j=a(d).val())&&0!==j.length||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"tax-checkbox":var i=a(d).children().find("input:checked").length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"radio":var i=a(d).find("input:checked").length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"file":var i=a(d).find("ul").children().length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"email":var j=a(d).val();""!==j?WP_User_Frontend.isValidEmail(j)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)):""===j&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"url":var j=a(d).val();""!==j&&(WP_User_Frontend.isValidURL(j)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)))}});var d=b.find('[data-required="yes"][name="google_map"]');if(d){","==a(d).val()&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type))}if(c)return WP_User_Frontend.addErrorNotice(b,"end"),!1;var e=b.serialize(),f=[];return a(".wpuf-rich-validation",b).each(function(b,c){var c=a(c),d=c.data("id"),e=c.data("name"),g=a.trim(tinyMCE.get(d).getContent());f.push(e+"="+encodeURIComponent(g))}),e=e+"&"+f.join("&")},addErrorNotice:function(b,c){"bottom"==c?a(".wpuf-multistep-fieldset:visible").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>"):a(b).find("li.wpuf-submit").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>")},removeErrorNotice:function(b){a(b).find(".wpuf-errors").remove()},markError:function(b,c){var d="";if(a(b).closest("li").addClass("has-error"),c){switch(d=a(b).closest("li").data("label"),c){case"required":case"mismatch":case"validation":d=d+" "+error_str_obj[c]}a(b).siblings(".wpuf-error-msg").remove(),a(b).after('<div class="wpuf-error-msg">'+d+"</div>")}a(b).focus()},removeErrors:function(b){a(b).find(".has-error").removeClass("has-error"),a(".wpuf-error-msg").remove()},isValidEmail:function(a){return new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(a)},isValidURL:function(a){return new RegExp("^(http://www.|https://www.|ftp://www.|www.|http://|https://){1}([0-9A-Za-z]+.)").test(a)},insertImage:function(b,c){if(a("#"+b).length){var d=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:"wpuf-insert-image-container",multipart:!0,multipart_params:{action:"wpuf_insert_image",form_id:a("#"+b).data("form_id")},multiple_queues:!1,multi_selection:!1,urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:"2mb",url:wpuf_frontend_upload.plupload.url,flash_swf_url:wpuf_frontend_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:"jpg,jpeg,gif,png,bmp"}]});d.bind("Init",function(a,b){}),d.bind("FilesAdded",function(b,c){var d=a("#wpuf-insert-image-container");a.each(c,function(a,b){d.append('<div class="upload-item" id="'+b.id+'"><div class="progress progress-striped active"><div class="bar"></div></div></div>')}),b.refresh(),b.start()}),d.bind("QueueChanged",function(a){d.start()}),d.bind("UploadProgress",function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")}),d.bind("Error",function(a,b){alert("Error #"+b.code+": "+b.message)}),d.bind("FileUploaded",function(b,d,e){if(a("#"+d.id).remove(),"error"!==e.response){if("undefined"!=typeof tinyMCE)if("function"!=typeof tinyMCE.execInstanceCommand){var f=tinyMCE.get("post_content_"+c);null!==f&&f.insertContent(e.response)}else tinyMCE.execInstanceCommand("post_content_"+c,"mceInsertContent",!1,e.response);var g=a("#post_content_"+c);g.val(g.val()+e.response)}else alert("Something went wrong")}),d.init()}},deleteAvatar:function(b){b.preventDefault(),confirm(a(this).data("confirm"))&&a.post(wpuf_frontend.ajaxurl,{action:"wpuf_delete_avatar",_wpnonce:wpuf_frontend.nonce},function(){a(b.target).parent().remove(),a("[id^=wpuf-avatar]").css("display","")})},editorLimit:{bind:function(b,c,d){"no"===d?(a("textarea#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b)}),a("input#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b)}),a("textarea#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b)},100)}),a("input#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b)},100)})):setTimeout(function(){tinyMCE.get(c).onKeyDown.add(function(a,c){WP_User_Frontend.editorLimit.tinymce.onKeyDown(a,c,b)}),tinyMCE.get(c).onPaste.add(function(a,c){setTimeout(function(){WP_User_Frontend.editorLimit.tinymce.onPaste(a,c,b)},100)})},1e3)},tinymce:{getStats:function(a){var b=a.getBody(),c=tinymce.trim(b.innerText||b.textContent);return{chars:c.length,words:c.split(/[\w\u2019\'-]+/).length}},onKeyDown:function(b,c,d){var e=WP_User_Frontend.editorLimit.tinymce.getStats(b).words-1;d&&a(".mce-path-item.mce-last",b.container).html("Word Limit : "+e+"/"+d),d&&e>d&&(WP_User_Frontend.editorLimit.blockTyping(c),jQuery(".mce-path-item.mce-last",b.container).html(wpuf_frontend.word_limit))},onPaste:function(a,b,c){var d=a.getContent().split(" ").slice(0,c).join(" ");a.setContent(d),WP_User_Frontend.editorLimit.make_media_embed_code(d,a)}},textLimit:function(b,c){var d=a(this),e=d.val().split(" ");c&&e.length>c?(d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(wpuf_frontend.word_limit),WP_User_Frontend.editorLimit.blockTyping(b)):d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(""),"paste"===b.type&&d.val(e.slice(0,c).join(" "))},blockTyping:function(b){-1!==a.inArray(b.keyCode,[46,8,9,27,13,110,190,189])||65==b.keyCode&&!0===b.ctrlKey||b.keyCode>=35&&b.keyCode<=40||(b.preventDefault(),b.stopPropagation())},make_media_embed_code:function(b,c){a.post(ajaxurl,{action:"make_media_embed_code",content:b},function(a){c.setContent(c.getContent()+c.setContent(a))})}}},a(function(){if(WP_User_Frontend.init(),a("ul.wpuf-payment-gateways").on("click","input[type=radio]",function(b){a(".wpuf-payment-instruction").slideUp(250),a(this).parents("li").find(".wpuf-payment-instruction").slideDown(250)}),a("ul.wpuf-payment-gateways li").find("input[type=radio]").is(":checked")){a("ul.wpuf-payment-gateways li").find("input[type=radio]:checked").parents("li").find(".wpuf-payment-instruction").slideDown(250)}else a("ul.wpuf-payment-gateways li").first().find("input[type=radio]").click()}),a(function(){a('input[name="first_name"], input[name="last_name"]').on("change keyup",function(){var b,c=a.makeArray(a('input[name="first_name"], input[name="last_name"]').map(function(){if(b=a(this).val())return b})).join(" ");a('input[name="display_name"]').val(c)})}),a(function(a){a('.wpuf-form-add input[name="dokan_store_name"]').on("focusout",function(){var b=a(this).val().toLowerCase().replace(/-+/g,"").replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"");a('input[name="shopurl"]').val(b),a("#url-alart").text(b),a('input[name="shopurl"]').focus()}),a('.wpuf-form-add input[name="shopurl"]').keydown(function(b){a(this).val();-1!==a.inArray(b.keyCode,[46,8,9,27,13,91,109,110,173,189,190])||65==b.keyCode&&!0===b.ctrlKey||b.keyCode>=35&&b.keyCode<=39||(b.shiftKey||(b.keyCode<65||b.keyCode>90)&&(b.keyCode<48||b.keyCode>57))&&(b.keyCode<96||b.keyCode>105)&&b.preventDefault()}),a('.wpuf-form-add input[name="shopurl"]').keyup(function(b){a("#url-alart").text(a(this).val())}),a('.wpuf-form-add input[name="shopurl"]').on("focusout",function(){var b=a(this),c={action:"shop_url",url_slug:b.val(),_nonce:dokan.nonce};""!==b.val()&&a.post(dokan.ajaxurl,c,function(b){0==b?(a("#url-alart").removeClass("text-success").addClass("text-danger"),a("#url-alart-mgs").removeClass("text-success").addClass("text-danger").text(dokan.seller.notAvailable)):(a("#url-alart").removeClass("text-danger").addClass("text-success"),a("#url-alart-mgs").removeClass("text-danger").addClass("text-success").text(dokan.seller.available))})}),a(".wpuf-form-add #wpuf-map-add-location").attr("name","find_address")})}(jQuery,window);
assets/js/subscriptions.js CHANGED
@@ -1,290 +1,290 @@
1
- (function($) {
2
-
3
- var subscription = {
4
-
5
- init: function() {
6
-
7
- $('input#wpuf-recuring-pay').on('click', this.showSubscriptionRecurring );
8
-
9
- $('input#wpuf-trial-status').on('click', this.showSubscriptionPack );
10
-
11
- $('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-apply-coupon', this.couponApply );
12
-
13
- $('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-copon-show', this.couponShow );
14
-
15
- $('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-copon-cancel', this.couponCancel );
16
-
17
- $('.wpuf-assing-pack-btn').on( 'click', this.showPackDropdown );
18
-
19
- $('.wpuf-delete-pack-btn').on( 'click', this.deletePack );
20
-
21
- $('.wpuf-disabled-link').click( this.packAlert );
22
-
23
- //on change enable expiration check status
24
- this.changeExpirationFieldVisibility(':checkbox#wpuf-enable_post_expiration');
25
-
26
- $('.wpuf-metabox-post_expiration').on('change',':checkbox#wpuf-enable_post_expiration',this.changeExpirationFieldVisibility);
27
- //on change expiration type drop down
28
- //this.setTimeExpiration('select#wpuf-expiration_time_type');
29
- $('.wpuf-metabox-post_expiration').on('change','select#wpuf-expiration_time_type',this.setTimeExpiration);
30
-
31
- },
32
-
33
- packAlert : function () {
34
- alert( wpuf_subscription.pack_notice );
35
- },
36
-
37
- showPackDropdown: function(e) {
38
- e.preventDefault();
39
- var self = $(this),
40
- wrap = self.parents('.wpuf-user-subscription'),
41
- sub_dropdown = wrap.find('.wpuf-pack-dropdown'),
42
- sub_details = wrap.find('.wpuf-user-sub-info'),
43
- cancel_btn = wrap.find('.wpuf-cancel-pack'),
44
- add_btn = wrap.find('.wpuf-add-pack');
45
-
46
- if ( sub_dropdown.attr( 'disabled' ) === 'disabled' ) {
47
- sub_dropdown.show().removeAttr('disabled');
48
- sub_details.hide().attr('disabled', true );
49
- cancel_btn.show();
50
- add_btn.hide();
51
- } else {
52
- sub_details.show().removeAttr('disabled');
53
- sub_dropdown.hide().attr('disabled', true );
54
- cancel_btn.hide();
55
- add_btn.show();
56
- }
57
-
58
- },
59
-
60
- deletePack: function(e){
61
- var self = $(this),
62
- wrap = self.parents('.wpuf-user-subscription'),
63
- sub_dropdown = wrap.find('.wpuf-pack-dropdown'),
64
- selected_sub = wrap.find( '#wpuf_sub_pack' ),
65
- userid = $(e.target).attr('data-userid'),
66
- packid = $(e.target).attr('data-packid');
67
-
68
- wrap.find('.wpuf-delete-pack-btn').attr('disabled', true);
69
- wrap.css('opacity', 0.5);
70
- $.post(
71
- ajaxurl,
72
- {
73
- 'action' : 'wpuf_delete_user_package',
74
- 'userid' : userid,
75
- 'packid' : packid,
76
- 'wpuf_subscription_delete_nonce': '<?php echo wp_create_nonce("wpuf-subscription-delete-nonce"); ?>'
77
- },
78
- function(data){
79
- if(data){
80
- wrap.css( 'opacity', 1 );
81
- $('.wpuf-user-sub-info').remove();
82
- $(e.target).remove();
83
- selected_sub.val(-1);
84
- sub_dropdown.show();
85
- }
86
- }
87
- );
88
-
89
- },
90
-
91
- couponCancel: function(e) {
92
-
93
- e.preventDefault();
94
-
95
- var self = $(this),
96
-
97
- data = {
98
-
99
- action: 'coupon_cancel',
100
-
101
- _wpnonce: wpuf_frontend.nonce,
102
-
103
- pack_id: self.data('pack_id')
104
-
105
- },
106
-
107
- coupon_field = self.parents('.wpuf-coupon-info-wrap').find('input.wpuf-coupon-field');
108
-
109
-
110
-
111
- coupon_field.addClass('wpuf-coupon-field-spinner');
112
-
113
- $.post( wpuf_frontend.ajaxurl, data, function( res ) {
114
-
115
- coupon_field.removeClass('wpuf-coupon-field-spinner');
116
-
117
- if ( res.success ) {
118
- $('.wpuf-pack-inner' ).html( res.data.append_data );
119
- $('.wpuf-coupon-id-field').val('');
120
-
121
- var coupon_wrap = self.closest('.wpuf-copon-wrap');
122
-
123
- coupon_wrap.hide();
124
- coupon_wrap.siblings('.wpuf-copon-show').show();
125
-
126
- $('.wpuf-subscription-success').html('');
127
- $('.wpuf-subscription-error').html('');
128
- }
129
-
130
- });
131
- },
132
-
133
- couponShow: function(e) {
134
-
135
- e.preventDefault();
136
-
137
- var self = $(this);
138
-
139
- self.hide();
140
-
141
- self.parents('.wpuf-coupon-info-wrap').find('.wpuf-copon-wrap').show();
142
-
143
- },
144
-
145
- couponApply: function(e) {
146
-
147
- e.preventDefault();
148
-
149
- var self = $(this),
150
-
151
- coupon_field = self.parents('.wpuf-coupon-info-wrap').find('input.wpuf-coupon-field'),
152
-
153
- coupon = coupon_field.val();
154
-
155
- if ( coupon === '' ) {
156
-
157
- $('.wpuf-subscription-error').html( wpuf_frontend.coupon_error );
158
- return;
159
-
160
- }
161
-
162
- var data = {
163
-
164
- action: 'coupon_apply',
165
-
166
- _wpnonce: wpuf_frontend.nonce,
167
-
168
- coupon: coupon,
169
-
170
- pack_id: self.data('pack_id')
171
-
172
- };
173
-
174
- if ( self.attr('disabled') === 'disabled' ) {
175
-
176
- //return;
177
-
178
- }
179
-
180
- self.attr( 'disabled', true );
181
-
182
- coupon_field.addClass('wpuf-coupon-field-spinner');
183
-
184
- $.post( wpuf_frontend.ajaxurl, data, function( res ) {
185
- coupon_field.removeClass('wpuf-coupon-field-spinner');
186
-
187
- if ( res.success ) {
188
- $('.wpuf-pack-inner' ).html( res.data.append_data );
189
- $('.wpuf-coupon-id-field').val( res.data.coupon_id );
190
-
191
- if ( res.data.amount <= 0 ) {
192
- $('.wpuf-nullamount-hide').hide();
193
- }
194
-
195
- $('.wpuf-subscription-success').html(res.data.message);
196
- $('.wpuf-subscription-error').html('');
197
- } else {
198
- $('.wpuf-subscription-success').html('');
199
- $('.wpuf-subscription-error').html(res.data.message);
200
- }
201
-
202
- });
203
-
204
- },
205
-
206
- showSubscriptionRecurring: function() {
207
-
208
- var self = $(this),
209
-
210
- wrap = self.parents('table.form-table'),
211
- pack_child = wrap.find('.wpuf-recurring-child'),
212
- trial_checkbox = wrap.find('input#wpuf-trial-status'),
213
- trial_child = wrap.find('.wpuf-trial-child'),
214
- expire_field = wrap.find('.wpuf-subcription-expire');
215
-
216
- if ( self.is(':checked') ) {
217
-
218
- if ( trial_checkbox.is(':checked') ) {
219
-
220
- trial_child.show();
221
-
222
- }
223
-
224
- pack_child.show();
225
-
226
- expire_field.hide();
227
-
228
- } else {
229
-
230
- trial_child.hide();
231
-
232
- pack_child.hide();
233
-
234
- expire_field.show();
235
-
236
- }
237
-
238
- },
239
-
240
- showSubscriptionPack: function() {
241
-
242
- var self = $(this),
243
-
244
- pack_status = self.closest('table.form-table').find('.wpuf-trial-child');
245
-
246
- if ( self.is(':checked') ) {
247
-
248
- pack_status.show();
249
-
250
- } else {
251
-
252
- pack_status.hide();
253
-
254
- }
255
-
256
- },
257
-
258
- setTimeExpiration: function(e){
259
- var timeArray = {
260
- 'day' : 30,
261
- 'month' : 12,
262
- 'year': 100
263
- };
264
- $('#wpuf-expiration_time_value').html('');
265
- var timeVal = e.target?$(e.target).val():$(e).val();
266
- for(var time = 1; time <= timeArray[timeVal]; time++){
267
- $('#wpuf-expiration_time_value').append('<option>'+ time +'</option>');
268
- }
269
- },
270
-
271
- changeExpirationFieldVisibility : function(e){
272
-
273
- var checkbox_obj = e.target? $(e.target) : $(e);
274
-
275
- if ( checkbox_obj.is(':checked') ) {
276
- $('.wpuf_subscription_expiration_field').show();
277
- } else {
278
- $('.wpuf_subscription_expiration_field').hide();
279
- }
280
- }
281
-
282
- };
283
-
284
- if ( typeof datepicker === 'function') {
285
- $('.wpuf-date-picker').datepicker({ dateFormat: "yy-mm-dd" });
286
- }
287
-
288
- subscription.init();
289
-
290
- })(jQuery);
1
+ (function($) {
2
+
3
+ var subscription = {
4
+
5
+ init: function() {
6
+
7
+ $('input#wpuf-recuring-pay').on('click', this.showSubscriptionRecurring );
8
+
9
+ $('input#wpuf-trial-status').on('click', this.showSubscriptionPack );
10
+
11
+ $('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-apply-coupon', this.couponApply );
12
+
13
+ $('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-copon-show', this.couponShow );
14
+
15
+ $('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-copon-cancel', this.couponCancel );
16
+
17
+ $('.wpuf-assing-pack-btn').on( 'click', this.showPackDropdown );
18
+
19
+ $('.wpuf-delete-pack-btn').on( 'click', this.deletePack );
20
+
21
+ $('.wpuf-disabled-link').click( this.packAlert );
22
+
23
+ //on change enable expiration check status
24
+ this.changeExpirationFieldVisibility(':checkbox#wpuf-enable_post_expiration');
25
+
26
+ $('.wpuf-metabox-post_expiration').on('change',':checkbox#wpuf-enable_post_expiration',this.changeExpirationFieldVisibility);
27
+ //on change expiration type drop down
28
+ //this.setTimeExpiration('select#wpuf-expiration_time_type');
29
+ $('.wpuf-metabox-post_expiration').on('change','select#wpuf-expiration_time_type',this.setTimeExpiration);
30
+
31
+ },
32
+
33
+ packAlert : function () {
34
+ alert( wpuf_subscription.pack_notice );
35
+ },
36
+
37
+ showPackDropdown: function(e) {
38
+ e.preventDefault();
39
+ var self = $(this),
40
+ wrap = self.parents('.wpuf-user-subscription'),
41
+ sub_dropdown = wrap.find('.wpuf-pack-dropdown'),
42
+ sub_details = wrap.find('.wpuf-user-sub-info'),
43
+ cancel_btn = wrap.find('.wpuf-cancel-pack'),
44
+ add_btn = wrap.find('.wpuf-add-pack');
45
+
46
+ if ( sub_dropdown.attr( 'disabled' ) === 'disabled' ) {
47
+ sub_dropdown.show().removeAttr('disabled');
48
+ sub_details.hide().attr('disabled', true );
49
+ cancel_btn.show();
50
+ add_btn.hide();
51
+ } else {
52
+ sub_details.show().removeAttr('disabled');
53
+ sub_dropdown.hide().attr('disabled', true );
54
+ cancel_btn.hide();
55
+ add_btn.show();
56
+ }
57
+
58
+ },
59
+
60
+ deletePack: function(e){
61
+ var self = $(this),
62
+ wrap = self.parents('.wpuf-user-subscription'),
63
+ sub_dropdown = wrap.find('.wpuf-pack-dropdown'),
64
+ selected_sub = wrap.find( '#wpuf_sub_pack' ),
65
+ userid = $(e.target).attr('data-userid'),
66
+ packid = $(e.target).attr('data-packid');
67
+
68
+ wrap.find('.wpuf-delete-pack-btn').attr('disabled', true);
69
+ wrap.css('opacity', 0.5);
70
+ $.post(
71
+ ajaxurl,
72
+ {
73
+ 'action' : 'wpuf_delete_user_package',
74
+ 'userid' : userid,
75
+ 'packid' : packid,
76
+ 'wpuf_subscription_delete_nonce': wpuf_subs_vars.wpuf_subscription_delete_nonce
77
+ },
78
+ function(data){
79
+ if(data){
80
+ wrap.css( 'opacity', 1 );
81
+ $('.wpuf-user-sub-info').remove();
82
+ $(e.target).remove();
83
+ selected_sub.val(-1);
84
+ sub_dropdown.show();
85
+ }
86
+ }
87
+ );
88
+
89
+ },
90
+
91
+ couponCancel: function(e) {
92
+
93
+ e.preventDefault();
94
+
95
+ var self = $(this),
96
+
97
+ data = {
98
+
99
+ action: 'coupon_cancel',
100
+
101
+ _wpnonce: wpuf_frontend.nonce,
102
+
103
+ pack_id: self.data('pack_id')
104
+
105
+ },
106
+
107
+ coupon_field = self.parents('.wpuf-coupon-info-wrap').find('input.wpuf-coupon-field');
108
+
109
+
110
+
111
+ coupon_field.addClass('wpuf-coupon-field-spinner');
112
+
113
+ $.post( wpuf_frontend.ajaxurl, data, function( res ) {
114
+
115
+ coupon_field.removeClass('wpuf-coupon-field-spinner');
116
+
117
+ if ( res.success ) {
118
+ $('.wpuf-pack-inner' ).html( res.data.append_data );
119
+ $('.wpuf-coupon-id-field').val('');
120
+
121
+ var coupon_wrap = self.closest('.wpuf-copon-wrap');
122
+
123
+ coupon_wrap.hide();
124
+ coupon_wrap.siblings('.wpuf-copon-show').show();
125
+
126
+ $('.wpuf-subscription-success').html('');
127
+ $('.wpuf-subscription-error').html('');
128
+ }
129
+
130
+ });
131
+ },
132
+
133
+ couponShow: function(e) {
134
+
135
+ e.preventDefault();
136
+
137
+ var self = $(this);
138
+
139
+ self.hide();
140
+
141
+ self.parents('.wpuf-coupon-info-wrap').find('.wpuf-copon-wrap').show();
142
+
143
+ },
144
+
145
+ couponApply: function(e) {
146
+
147
+ e.preventDefault();
148
+
149
+ var self = $(this),
150
+
151
+ coupon_field = self.parents('.wpuf-coupon-info-wrap').find('input.wpuf-coupon-field'),
152
+
153
+ coupon = coupon_field.val();
154
+
155
+ if ( coupon === '' ) {
156
+
157
+ $('.wpuf-subscription-error').html( wpuf_frontend.coupon_error );
158
+ return;
159
+
160
+ }
161
+
162
+ var data = {
163
+
164
+ action: 'coupon_apply',
165
+
166
+ _wpnonce: wpuf_frontend.nonce,
167
+
168
+ coupon: coupon,
169
+
170
+ pack_id: self.data('pack_id')
171
+
172
+ };
173
+
174
+ if ( self.attr('disabled') === 'disabled' ) {
175
+
176
+ //return;
177
+
178
+ }
179
+
180
+ self.attr( 'disabled', true );
181
+
182
+ coupon_field.addClass('wpuf-coupon-field-spinner');
183
+
184
+ $.post( wpuf_frontend.ajaxurl, data, function( res ) {
185
+ coupon_field.removeClass('wpuf-coupon-field-spinner');
186
+
187
+ if ( res.success ) {
188
+ $('.wpuf-pack-inner' ).html( res.data.append_data );
189
+ $('.wpuf-coupon-id-field').val( res.data.coupon_id );
190
+
191
+ if ( res.data.amount <= 0 ) {
192
+ $('.wpuf-nullamount-hide').hide();
193
+ }
194
+
195
+ $('.wpuf-subscription-success').html(res.data.message);
196
+ $('.wpuf-subscription-error').html('');
197
+ } else {
198
+ $('.wpuf-subscription-success').html('');
199
+ $('.wpuf-subscription-error').html(res.data.message);
200
+ }
201
+
202
+ });
203
+
204
+ },
205
+
206
+ showSubscriptionRecurring: function() {
207
+
208
+ var self = $(this),
209
+
210
+ wrap = self.parents('table.form-table'),
211
+ pack_child = wrap.find('.wpuf-recurring-child'),
212
+ trial_checkbox = wrap.find('input#wpuf-trial-status'),
213
+ trial_child = wrap.find('.wpuf-trial-child'),
214
+ expire_field = wrap.find('.wpuf-subcription-expire');
215
+
216
+ if ( self.is(':checked') ) {
217
+
218
+ if ( trial_checkbox.is(':checked') ) {
219
+
220
+ trial_child.show();
221
+
222
+ }
223
+
224
+ pack_child.show();
225
+
226
+ expire_field.hide();
227
+
228
+ } else {
229
+
230
+ trial_child.hide();
231
+
232
+ pack_child.hide();
233
+
234
+ expire_field.show();
235
+
236
+ }
237
+
238
+ },
239
+
240
+ showSubscriptionPack: function() {
241
+
242
+ var self = $(this),
243
+
244
+ pack_status = self.closest('table.form-table').find('.wpuf-trial-child');
245
+
246
+ if ( self.is(':checked') ) {
247
+
248
+ pack_status.show();
249
+
250
+ } else {
251
+
252
+ pack_status.hide();
253
+
254
+ }
255
+
256
+ },
257
+
258
+ setTimeExpiration: function(e){
259
+ var timeArray = {
260
+ 'day' : 30,
261
+ 'month' : 12,
262
+ 'year': 100
263
+ };
264
+ $('#wpuf-expiration_time_value').html('');
265
+ var timeVal = e.target?$(e.target).val():$(e).val();
266
+ for(var time = 1; time <= timeArray[timeVal]; time++){
267
+ $('#wpuf-expiration_time_value').append('<option>'+ time +'</option>');
268
+ }
269
+ },
270
+
271
+ changeExpirationFieldVisibility : function(e){
272
+
273
+ var checkbox_obj = e.target? $(e.target) : $(e);
274
+
275
+ if ( checkbox_obj.is(':checked') ) {
276
+ $('.wpuf_subscription_expiration_field').show();
277
+ } else {
278
+ $('.wpuf_subscription_expiration_field').hide();
279
+ }
280
+ }
281
+
282
+ };
283
+
284
+ if ( typeof datepicker === 'function') {
285
+ $('.wpuf-date-picker').datepicker({ dateFormat: "yy-mm-dd" });
286
+ }
287
+
288
+ subscription.init();
289
+
290
+ })(jQuery);
assets/js/wpuf-admin-tools.js ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function($){
2
+ Vue.component( 'wpuf-form-uploader', {
3
+ template: '#wpuf-import-form-template',
4
+ data: function() {
5
+ return {
6
+ fileFrame: null,
7
+ isBusy: false,
8
+ };
9
+ },
10
+
11
+ methods: {
12
+ openImageManager: function() {
13
+ var vm = this;
14
+
15
+ if (vm.fileFrame) {
16
+ vm.fileFrame.open();
17
+ return;
18
+ }
19
+
20
+ var fileStatesOptions = {
21
+ library: wp.media.query(),
22
+ multiple: false, // set it true for multiple image
23
+ title: wpuf_admin_tools.i18n.wpuf_import_forms,
24
+ priority: 20,
25
+ filterable: 'uploaded'
26
+ };
27
+
28
+ var options = {};
29
+
30
+ fileStatesOptions = $.extend(true, fileStatesOptions, options.fileStatesOptions);
31
+
32
+ var fileStates = [
33
+ new wp.media.controller.Library(fileStatesOptions)
34
+ ];
35
+
36
+ var mediaOptions = {
37
+ title: wpuf_admin_tools.i18n.wpuf_import_forms,
38
+ library: {
39
+ type: ''
40
+ },
41
+ button: {
42
+ text: wpuf_admin_tools.i18n.add_json_file,
43
+ },
44
+ multiple: false
45
+ };
46
+
47
+ mediaOptions = $.extend(true, mediaOptions, options.mediaOptions);
48
+ mediaOptions.states = fileStates;
49
+
50
+ vm.fileFrame = wp.media(mediaOptions);
51
+
52
+ vm.fileFrame.on('select', function() {
53
+ var selectedFiles = [];
54
+ var selection = vm.fileFrame.state().get('selection');
55
+
56
+ var selectedFiles = selection.map(function(attachment) {
57
+ return attachment.toJSON();
58
+ });
59
+
60
+ var selectedFile = selectedFiles[0];
61
+
62
+ vm.importForms(selectedFile.id);
63
+ });
64
+
65
+ vm.fileFrame.on('ready', function() {
66
+ vm.fileFrame.uploader.options.uploader.params = {
67
+ type: 'wpuf-form-uploader'
68
+ };
69
+ });
70
+
71
+ vm.fileFrame.open();
72
+ },
73
+
74
+ importForms: function ( fileId ) {
75
+ var vm = this;
76
+
77
+ vm.isBusy = true;
78
+
79
+ $.ajax( {
80
+ url: wpuf_admin_tools.url.ajax,
81
+ method: 'post',
82
+ dataType: 'json',
83
+ data: {
84
+ action: 'wpuf_import_forms',
85
+ _wpnonce: wpuf_admin_tools.nonce,
86
+ file_id: fileId,
87
+ }
88
+ } ).done( function ( response ) {
89
+ if ( response.data && response.data.message ) {
90
+ alert( response.data.message );
91
+ }
92
+ } ).fail( function ( jqXHR ) {
93
+ if ( jqXHR.responseJSON && jqXHR.responseJSON.data ) {
94
+ var message = jqXHR.responseJSON.data[0].message;
95
+ alert( message );
96
+ } else {
97
+ alert( wpuf_admin_tools.i18n.could_not_import_forms );
98
+ }
99
+ } ).always( function () {
100
+ vm.isBusy = false;
101
+ } );
102
+ },
103
+ }
104
+ } );
105
+
106
+ new Vue( {
107
+ el: '#wpuf-import-form',
108
+ } );
109
+ });
assets/js/wpuf-form-builder-components.js CHANGED
@@ -4,7 +4,7 @@
4
  Vue.component('builder-stage', {
5
  template: '#tmpl-wpuf-builder-stage',
6
 
7
- mixins: wpuf_form_builder_mixins(wpuf_mixins.builder_stage),
8
 
9
  computed: {
10
  form_fields: function () {
@@ -63,34 +63,10 @@ Vue.component('builder-stage', {
63
  };
64
 
65
  if ('panel' === source) {
66
- // prepare the payload to add new form element
67
- var field_template = ui.item[0].dataset.formField,
68
- field = $.extend(true, {}, self.field_settings[field_template].field_props);
69
-
70
- // check if these are already inserted
71
- if ( self.isSingleInstance( field_template ) && self.containsField( field_template ) ) {
72
- swal({
73
- title: "Oops...",
74
- text: "You already have this field in the form"
75
- });
76
-
77
- $(this).find('.button.ui-draggable.ui-draggable-handle').remove();
78
- return;
79
- }
80
-
81
- // add a random integer id
82
- field.id = self.get_random_id();
83
-
84
- // add meta key
85
- if ('yes' === field.is_meta && !field.name) {
86
- field.name = field.label.replace(/\W/g, '_').toLowerCase() + '_' + field.id;
87
- }
88
-
89
- payload.field = field;
90
-
91
  // add new form element
92
- if ( !in_column_field ) {
93
- self.$store.commit('add_form_field_element', payload);
 
94
  }
95
 
96
  // remove button from stage
@@ -1238,7 +1214,7 @@ Vue.component('form-featured_image', {
1238
  Vue.component('form-fields', {
1239
  template: '#tmpl-wpuf-form-fields',
1240
 
1241
- mixins: wpuf_form_builder_mixins(wpuf_mixins.form_fields),
1242
 
1243
  computed: {
1244
  panel_sections: function () {
@@ -1269,42 +1245,6 @@ Vue.component('form-fields', {
1269
  this.$store.commit('panel_toggle', index);
1270
  },
1271
 
1272
- add_form_field: function (field_template) {
1273
- var payload = {
1274
- toIndex: this.$store.state.form_fields.length,
1275
- };
1276
-
1277
- // check if these are already inserted
1278
- if ( this.isSingleInstance( field_template ) && this.containsField( field_template ) ) {
1279
- swal({
1280
- title: "Oops...",
1281
- text: "You already have this field in the form"
1282
- });
1283
- return;
1284
- }
1285
-
1286
- var field = $.extend(true, {}, this.$store.state.field_settings[field_template].field_props);
1287
-
1288
- field.id = this.get_random_id();
1289
-
1290
- if (!field.name && field.label) {
1291
- field.name = field.label.replace(/\W/g, '_').toLowerCase();
1292
-
1293
- var same_template_fields = this.form_fields.filter(function (form_field) {
1294
- return (form_field.template === field.template);
1295
- });
1296
-
1297
- if (same_template_fields.length) {
1298
- field.name += '_' + same_template_fields.length;
1299
- }
1300
- }
1301
-
1302
- payload.field = field;
1303
-
1304
- // add new form element
1305
- this.$store.commit('add_form_field_element', payload);
1306
- },
1307
-
1308
  is_pro_feature: function (field) {
1309
  return this.field_settings[field].pro_feature;
1310
  },
4
  Vue.component('builder-stage', {
5
  template: '#tmpl-wpuf-builder-stage',
6
 
7
+ mixins: wpuf_form_builder_mixins(wpuf_mixins.builder_stage).concat(wpuf_mixins.add_form_field),
8
 
9
  computed: {
10
  form_fields: function () {
63
  };
64
 
65
  if ('panel' === source) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  // add new form element
67
+ if ( ! in_column_field ) {
68
+ var field_template = ui.item[0].dataset.formField;
69
+ self.add_form_field(field_template);
70
  }
71
 
72
  // remove button from stage
1214
  Vue.component('form-fields', {
1215
  template: '#tmpl-wpuf-form-fields',
1216
 
1217
+ mixins: wpuf_form_builder_mixins(wpuf_mixins.form_fields).concat(wpuf_mixins.add_form_field),
1218
 
1219
  computed: {
1220
  panel_sections: function () {
1245
  this.$store.commit('panel_toggle', index);
1246
  },
1247
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1248
  is_pro_feature: function (field) {
1249
  return this.field_settings[field].pro_feature;
1250
  },
assets/js/wpuf-form-builder-mixins.js CHANGED
@@ -1,6 +1,46 @@
1
  ;(function($) {
2
  'use strict';
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  /**
5
  * Mixin for form fields like
6
  * form-text_field, form-field_textarea etc
1
  ;(function($) {
2
  'use strict';
3
 
4
+ wpuf_mixins.add_form_field = {
5
+ methods: {
6
+ add_form_field: function (field_template) {
7
+ var payload = {
8
+ toIndex: this.$store.state.form_fields.length,
9
+ };
10
+
11
+ // check if these are already inserted
12
+ if ( this.isSingleInstance( field_template ) && this.containsField( field_template ) ) {
13
+ swal({
14
+ title: "Oops...",
15
+ text: "You already have this field in the form"
16
+ });
17
+ return;
18
+ }
19
+
20
+ var field = $.extend(true, {}, this.$store.state.field_settings[field_template].field_props);
21
+
22
+ field.id = this.get_random_id();
23
+
24
+ if (!field.name && field.label) {
25
+ field.name = field.label.replace(/\W/g, '_').toLowerCase();
26
+
27
+ var same_template_fields = this.form_fields.filter(function (form_field) {
28
+ return (form_field.template === field.template);
29
+ });
30
+
31
+ if (same_template_fields.length) {
32
+ field.name += '_' + same_template_fields.length;
33
+ }
34
+ }
35
+
36
+ payload.field = field;
37
+
38
+ // add new form element
39
+ this.$store.commit('add_form_field_element', payload);
40
+ },
41
+ },
42
+ };
43
+
44
  /**
45
  * Mixin for form fields like
46
  * form-text_field, form-field_textarea etc
class/frontend-dashboard.php CHANGED
@@ -169,6 +169,7 @@ class WPUF_Frontend_Dashboard {
169
  $redirect = apply_filters( 'wpuf_delete_post_redirect', $redirect );
170
 
171
  wp_redirect( $redirect );
 
172
  } else {
173
  echo wp_kses_post( '<div class="error">' . __( 'You are not the post author. Cheeting huh!', 'wp-user-frontend' ) . '</div>' );
174
  }
169
  $redirect = apply_filters( 'wpuf_delete_post_redirect', $redirect );
170
 
171
  wp_redirect( $redirect );
172
+ exit;
173
  } else {
174
  echo wp_kses_post( '<div class="error">' . __( 'You are not the post author. Cheeting huh!', 'wp-user-frontend' ) . '</div>' );
175
  }
class/subscription.php CHANGED
@@ -89,6 +89,7 @@ class WPUF_Subscription {
89
  $this::subscriber_cancel( $user_id, $current_pack['pack_id'] );
90
 
91
  wp_redirect( $request_uri );
 
92
  }
93
  }
94
 
@@ -214,6 +215,9 @@ class WPUF_Subscription {
214
  */
215
  public function subscription_script() {
216
  wp_enqueue_script( 'wpuf-subscriptions', WPUF_ASSET_URI . '/js/subscriptions.js', ['jquery'], false, true );
 
 
 
217
  }
218
 
219
  /**
@@ -349,11 +353,11 @@ class WPUF_Subscription {
349
  update_post_meta( $subscription_id, '_billing_amount', $post_data['billing_amount'] );
350
  update_post_meta( $subscription_id, '_expiration_number', $post_data['expiration_number'] );
351
  update_post_meta( $subscription_id, '_expiration_period', $post_data['expiration_period'] );
352
- update_post_meta( $subscription_id, '_recurring_pay', $post_data['recurring_pay'] );
353
  update_post_meta( $subscription_id, '_billing_cycle_number', $post_data['billing_cycle_number'] );
354
  update_post_meta( $subscription_id, '_cycle_period', $post_data['cycle_period'] );
355
  update_post_meta( $subscription_id, '_billing_limit', $post_data['billing_limit'] );
356
- update_post_meta( $subscription_id, '_trial_status', $post_data['trial_status'] );
357
  update_post_meta( $subscription_id, '_trial_duration', $post_data['trial_duration'] );
358
  update_post_meta( $subscription_id, '_trial_duration_type', $post_data['trial_duration_type'] );
359
  update_post_meta( $subscription_id, '_post_type_name', $post_data['post_type_name'] );
@@ -814,7 +818,7 @@ class WPUF_Subscription {
814
  *
815
  *@return string $labels[$cycle_period]
816
  */
817
- public function get_cycle_label( $cycle_period, $cycle_number ) {
818
  $labels = [
819
  'day' => _n( 'Day', 'Days', $cycle_number, 'wp-user-frontend' ),
820
  'week' => _n( 'Week', 'Weeks', $cycle_number, 'wp-user-frontend' ),
@@ -858,7 +862,7 @@ class WPUF_Subscription {
858
  }
859
 
860
  if ( $billing_amount && $pack->meta_value['recurring_pay'] == 'yes' ) {
861
- $recurring_des = sprintf( __( 'Every', 'wp-user-frontend' ) . ' %s %s', $pack->meta_value['billing_cycle_number'], $this->get_cycle_label( $pack->meta_value['cycle_period'], $pack->meta_value['billing_cycle_number'] ), $pack->meta_value['trial_duration_type'] );
862
  $recurring_des .= !empty( $pack->meta_value['billing_limit'] ) ? sprintf( ', ' . __( 'for', 'wp-user-frontend' ) . ' %s ' . __( 'installments', 'wp-user-frontend' ), $pack->meta_value['billing_limit'] ) : '';
863
  $recurring_des = '<div class="wpuf-pack-cycle wpuf-nullamount-hide">' . $recurring_des . '</div>';
864
  }
89
  $this::subscriber_cancel( $user_id, $current_pack['pack_id'] );
90
 
91
  wp_redirect( $request_uri );
92
+ exit;
93
  }
94
  }
95
 
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
  /**
353
  update_post_meta( $subscription_id, '_billing_amount', $post_data['billing_amount'] );
354
  update_post_meta( $subscription_id, '_expiration_number', $post_data['expiration_number'] );
355
  update_post_meta( $subscription_id, '_expiration_period', $post_data['expiration_period'] );
356
+ update_post_meta( $subscription_id, '_recurring_pay', isset( $post_data['recurring_pay'] ) ? $post_data['recurring_pay'] : 'no' );
357
  update_post_meta( $subscription_id, '_billing_cycle_number', $post_data['billing_cycle_number'] );
358
  update_post_meta( $subscription_id, '_cycle_period', $post_data['cycle_period'] );
359
  update_post_meta( $subscription_id, '_billing_limit', $post_data['billing_limit'] );
360
+ update_post_meta( $subscription_id, '_trial_status', isset( $post_data['trial_status'] ) ? $post_data['trial_status'] : 'no' );
361
  update_post_meta( $subscription_id, '_trial_duration', $post_data['trial_duration'] );
362
  update_post_meta( $subscription_id, '_trial_duration_type', $post_data['trial_duration_type'] );
363
  update_post_meta( $subscription_id, '_post_type_name', $post_data['post_type_name'] );
818
  *
819
  *@return string $labels[$cycle_period]
820
  */
821
+ public static function get_cycle_label( $cycle_period, $cycle_number ) {
822
  $labels = [
823
  'day' => _n( 'Day', 'Days', $cycle_number, 'wp-user-frontend' ),
824
  'week' => _n( 'Week', 'Weeks', $cycle_number, 'wp-user-frontend' ),
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
  }
includes/class-acf.php CHANGED
@@ -15,6 +15,7 @@ class WPUF_ACF_Compatibility {
15
  add_action( 'wp_ajax_wpuf_dismiss_notice_' . $this->id, [ $this, 'dismiss_notice' ] );
16
  add_action( 'wp_ajax_wpuf_compatibility_' . $this->id, [ $this, 'maybe_compatible' ] );
17
  add_action( 'wp_ajax_wpuf_migrate_' . $this->id, [ $this, 'migrate_cf_data' ] );
 
18
  }
19
 
20
  /**
@@ -239,4 +240,28 @@ class WPUF_ACF_Compatibility {
239
 
240
  <?php
241
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  }
15
  add_action( 'wp_ajax_wpuf_dismiss_notice_' . $this->id, [ $this, 'dismiss_notice' ] );
16
  add_action( 'wp_ajax_wpuf_compatibility_' . $this->id, [ $this, 'maybe_compatible' ] );
17
  add_action( 'wp_ajax_wpuf_migrate_' . $this->id, [ $this, 'migrate_cf_data' ] );
18
+ add_filter( 'acf/load_value', [ $this, 'load_compatible_value' ], 10, 3 );
19
  }
20
 
21
  /**
240
 
241
  <?php
242
  }
243
+
244
+ /**
245
+ * ACF compatible wpuf field values
246
+ *
247
+ * @since 3.2.0
248
+ *
249
+ * @param mixed $value
250
+ * @param int $post_id
251
+ * @param array $field
252
+ *
253
+ * @return mixed
254
+ */
255
+ public function load_compatible_value( $value, $post_id, $field ) {
256
+ switch ( $field['type'] ) {
257
+ case 'checkbox':
258
+ $value = wpuf()->fields->get_field( 'checkbox_field' )->get_formatted_value( $value );
259
+ break;
260
+
261
+ default:
262
+ break;
263
+ }
264
+
265
+ return $value;
266
+ }
267
  }
includes/class-field-manager.php CHANGED
@@ -21,9 +21,6 @@ class WPUF_Field_Manager {
21
  */
22
  private $wp_post_types = [];
23
 
24
- public function __construct() {
25
- }
26
-
27
  /**
28
  * Get all the registered fields
29
  *
@@ -39,6 +36,23 @@ class WPUF_Field_Manager {
39
  return $this->fields;
40
  }
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  /**
43
  * Add Post Field Type
44
  *
21
  */
22
  private $wp_post_types = [];
23
 
 
 
 
24
  /**
25
  * Get all the registered fields
26
  *
36
  return $this->fields;
37
  }
38
 
39
+ /**
40
+ * Get field type class instance
41
+ *
42
+ * @since 3.2.0
43
+ *
44
+ * @param string $field_type
45
+ *
46
+ * @return \WPUF_Field_Contract
47
+ */
48
+ public function get_field( $field_type ) {
49
+ $fields = $this->get_fields();
50
+
51
+ if ( isset( $field_type, $fields ) ) {
52
+ return $fields[ $field_type ];
53
+ }
54
+ }
55
+
56
  /**
57
  * Add Post Field Type
58
  *
includes/class-frontend-render-form.php CHANGED
@@ -761,7 +761,11 @@ class WPUF_Frontend_Render_Form {
761
  break;
762
 
763
  case 'checkbox':
764
- $meta_key_value[ $value['name'] ] = $value_name[0];
 
 
 
 
765
  break;
766
 
767
  default:
@@ -774,7 +778,7 @@ class WPUF_Frontend_Render_Form {
774
  } elseif ( !empty( $acf_compatibility ) && $acf_compatibility == 'yes' ) {
775
  $meta_key_value[$value['name']] = $value_name;
776
  } else {
777
- $meta_key_value[$value['name']] = implode( $value_name[0] );
778
  }
779
  } elseif ( !empty( $value_name ) ) {
780
  $meta_key_value[$value['name']] = trim( $value_name );
761
  break;
762
 
763
  case 'checkbox':
764
+ if ( count( $value_name ) > 1 ) {
765
+ $meta_key_value[$value['name']] = implode( self::$separator, $value_name );
766
+ } else {
767
+ $meta_key_value[ $value['name'] ] = $value_name[0];
768
+ }
769
  break;
770
 
771
  default:
778
  } elseif ( !empty( $acf_compatibility ) && $acf_compatibility == 'yes' ) {
779
  $meta_key_value[$value['name']] = $value_name;
780
  } else {
781
+ $meta_key_value[$value['name']] = implode( self::$separator, $value_name );
782
  }
783
  } elseif ( !empty( $value_name ) ) {
784
  $meta_key_value[$value['name']] = trim( $value_name );
includes/class-user-subscription.php CHANGED
@@ -305,7 +305,7 @@ class WPUF_User_Subscription {
305
  $billing_amount = ( intval( $pack->meta_value['billing_amount'] ) > 0 ) ? $details_meta['symbol'] . $pack->meta_value['billing_amount'] : __( 'Free', 'wp-user-frontend' );
306
 
307
  if ( $pack->meta_value['recurring_pay'] == 'yes' ) {
308
- $recurring_des = sprintf( 'For each %s %s', $pack->meta_value['billing_cycle_number'], $pack->meta_value['cycle_period'], $pack->meta_value['trial_duration_type'] );
309
  $recurring_des .= !empty( $pack->meta_value['billing_limit'] ) ? sprintf( ', for %s installments', $pack->meta_value['billing_limit'] ) : '';
310
  $recurring_des = $recurring_des;
311
  } else {
305
  $billing_amount = ( intval( $pack->meta_value['billing_amount'] ) > 0 ) ? $details_meta['symbol'] . $pack->meta_value['billing_amount'] : __( 'Free', 'wp-user-frontend' );
306
 
307
  if ( $pack->meta_value['recurring_pay'] == 'yes' ) {
308
+ $recurring_des = sprintf( 'For each %s %s', $pack->meta_value['billing_cycle_number'], WPUF_Subscription::get_cycle_label( $pack->meta_value['cycle_period'], $pack->meta_value['billing_cycle_number'] ), $pack->meta_value['trial_duration_type'] );
309
  $recurring_des .= !empty( $pack->meta_value['billing_limit'] ) ? sprintf( ', for %s installments', $pack->meta_value['billing_limit'] ) : '';
310
  $recurring_des = $recurring_des;
311
  } else {
includes/fields/class-abstract-fields.php CHANGED
@@ -782,13 +782,7 @@ abstract class WPUF_Field_Contract {
782
  if ( $form_field['input_type'] == 'taxonomy' ) {
783
  $cond_inputs['name'] = $form_field['name'] . '_' . $form_field['type'] . '_' . $form_field['id'];
784
  $condition = json_encode( $cond_inputs );
785
- }
786
-
787
- //for section break
788
- if ( $form_field['input_type'] == 'section_break' ) {
789
- $cond_inputs['name'] = $form_field['name'] . '_' . $form_field['id'];
790
- $condition = json_encode( $cond_inputs );
791
- } ?>
792
  <script type="text/javascript">
793
  wpuf_conditional_items.push(<?php echo wp_kses( $condition, [] ); ?>);
794
  </script>
782
  if ( $form_field['input_type'] == 'taxonomy' ) {
783
  $cond_inputs['name'] = $form_field['name'] . '_' . $form_field['type'] . '_' . $form_field['id'];
784
  $condition = json_encode( $cond_inputs );
785
+ }?>
 
 
 
 
 
 
786
  <script type="text/javascript">
787
  wpuf_conditional_items.push(<?php echo wp_kses( $condition, [] ); ?>);
788
  </script>
includes/fields/class-field-checkbox.php CHANGED
@@ -27,18 +27,7 @@ class WPUF_Form_Field_Checkbox extends WPUF_Field_Contract {
27
  if ( isset( $post_id ) && $post_id != '0' ) {
28
  if ( $this->is_meta( $field_settings ) ) {
29
  if ( $value = $this->get_meta( $post_id, $field_settings['name'], $type, true ) ) {
30
- if ( is_serialized( $value ) ) {
31
- $selected = maybe_unserialize( $value );
32
- } elseif ( is_array( $value ) ) {
33
- $selected = $value;
34
- } else {
35
- $selected = [];
36
- $selected_options = explode( '|', $value );
37
-
38
- foreach ( $selected_options as $option ) {
39
- array_push( $selected, trim( $option ) );
40
- }
41
- }
42
  } else {
43
  }
44
  }
@@ -147,4 +136,32 @@ class WPUF_Form_Field_Checkbox extends WPUF_Field_Contract {
147
 
148
  return $entry_value;
149
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  }
27
  if ( isset( $post_id ) && $post_id != '0' ) {
28
  if ( $this->is_meta( $field_settings ) ) {
29
  if ( $value = $this->get_meta( $post_id, $field_settings['name'], $type, true ) ) {
30
+ $selected = $this->get_formatted_value( $value );
 
 
 
 
 
 
 
 
 
 
 
31
  } else {
32
  }
33
  }
136
 
137
  return $entry_value;
138
  }
139
+
140
+ /**
141
+ * Get field formatted value
142
+ *
143
+ * @since 3.2.0
144
+ *
145
+ * @param mixed $value
146
+ *
147
+ * @return array
148
+ */
149
+ public function get_formatted_value( $value ) {
150
+ $formatted_value = [];
151
+
152
+ if ( is_serialized( $value ) ) {
153
+ $formatted_value = maybe_unserialize( $value );
154
+ } elseif ( is_array( $value ) ) {
155
+ $formatted_value = $value;
156
+ } else {
157
+ $formatted_value = [];
158
+ $options = explode( '|', $value );
159
+
160
+ foreach ( $options as $option ) {
161
+ array_push( $formatted_value, trim( $option ) );
162
+ }
163
+ }
164
+
165
+ return $formatted_value;
166
+ }
167
  }
includes/fields/class-field-multidropdown.php CHANGED
@@ -35,7 +35,7 @@ class WPUF_Form_Field_MultiDropdown extends WPUF_Form_Field_Dropdown {
35
  } else {
36
  $selected = isset( $field_settings['selected'] ) ? $field_settings['selected'] : '';
37
 
38
- $selected = is_array( $selected ) ? $selected : [];
39
  }
40
 
41
  $name = $field_settings['name'] . '[]';
35
  } else {
36
  $selected = isset( $field_settings['selected'] ) ? $field_settings['selected'] : '';
37
 
38
+ $selected = is_array( $selected ) ? $selected : (array) $selected;
39
  }
40
 
41
  $name = $field_settings['name'] . '[]';
includes/fields/class-field-post-taxonomy.php CHANGED
@@ -107,9 +107,12 @@ class WPUF_Form_Field_Post_Taxonomy extends WPUF_Field_Contract {
107
  public function taxnomy_select( $terms ) {
108
  $attr = $this->field_settings;
109
 
110
- $selected = $terms ? $terms : '';
111
- $required = sprintf( 'data-required="%s" data-type="select"', $attr['required'] );
112
- $class = ' wpuf_' . $attr['name'] . '_' . $selected;
 
 
 
113
 
114
  if ( $this->exclude_type == 'child_of' && !empty( $this->exclude ) ) {
115
  $this->exclude = $this->exclude[0];
@@ -135,7 +138,7 @@ class WPUF_Form_Field_Post_Taxonomy extends WPUF_Field_Contract {
135
  $tax_args = apply_filters( 'wpuf_taxonomy_checklist_args', $tax_args );
136
  $select = wp_dropdown_categories( $tax_args );
137
 
138
- echo str_replace( '<select', '<select ' . $required, $select ) ; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
139
  $attr = [
140
  'required' => $attr['required'],
141
  'name' => $attr['name'],
107
  public function taxnomy_select( $terms ) {
108
  $attr = $this->field_settings;
109
 
110
+ $selected = $terms ? $terms : '';
111
+ $dataset = sprintf(
112
+ 'data-required="%s" data-type="select" data-form-id="%d"',
113
+ $attr['required'],
114
+ trim( $this->form_id )
115
+ );
116
 
117
  if ( $this->exclude_type == 'child_of' && !empty( $this->exclude ) ) {
118
  $this->exclude = $this->exclude[0];
138
  $tax_args = apply_filters( 'wpuf_taxonomy_checklist_args', $tax_args );
139
  $select = wp_dropdown_categories( $tax_args );
140
 
141
+ echo str_replace( '<select', '<select ' . $dataset, $select ) ; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
142
  $attr = [
143
  'required' => $attr['required'],
144
  'name' => $attr['name'],
includes/fields/class-field-sectionbreak.php CHANGED
@@ -22,6 +22,7 @@ class WPUF_Form_Field_SectionBreak extends WPUF_Field_Contract {
22
  * @return void
23
  */
24
  public function render( $field_settings, $form_id, $type = 'post', $post_id = null ) {
 
25
  $field_settings['description'] = isset( $field_settings['description'] ) ? $field_settings['description'] : ''; ?>
26
  <li <?php $this->print_list_attributes( $field_settings ); ?>>
27
  <div class="wpuf-section-wrap wpuf-fields <?php echo esc_attr( 'section_' . $form_id ); ?><?php echo esc_attr( ' wpuf_' . $field_settings['name'] . '_' . $form_id ); ?>">
22
  * @return void
23
  */
24
  public function render( $field_settings, $form_id, $type = 'post', $post_id = null ) {
25
+ $field_settings['name'] = isset( $field_settings['name'] ) ? $field_settings['name'] : $this->input_type;
26
  $field_settings['description'] = isset( $field_settings['description'] ) ? $field_settings['description'] : ''; ?>
27
  <li <?php $this->print_list_attributes( $field_settings ); ?>>
28
  <div class="wpuf-section-wrap wpuf-fields <?php echo esc_attr( 'section_' . $form_id ); ?><?php echo esc_attr( ' wpuf_' . $field_settings['name'] . '_' . $form_id ); ?>">
includes/fields/class-field-url.php CHANGED
@@ -34,7 +34,7 @@ class WPUF_Form_Field_URL extends WPUF_Form_Field_Text {
34
  <div class="wpuf-fields">
35
  <input
36
  id="<?php echo esc_attr( $field_settings['name'] . '_' . $form_id ); ?>"
37
- type="url" pattern="^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$" class="url <?php echo esc_attr( ' wpuf_' . $field_settings['name'] . '_' . $form_id ); ?>"
38
  data-required="<?php echo esc_attr( $field_settings['required'] ); ?>"
39
  data-type="text"
40
  name="<?php echo esc_attr( $field_settings['name'] ); ?>"
34
  <div class="wpuf-fields">
35
  <input
36
  id="<?php echo esc_attr( $field_settings['name'] . '_' . $form_id ); ?>"
37
+ type="url" pattern="^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,20}(:[0-9]{1,20})?(\/.*)?$" class="url <?php echo esc_attr( ' wpuf_' . $field_settings['name'] . '_' . $form_id ); ?>"
38
  data-required="<?php echo esc_attr( $field_settings['required'] ); ?>"
39
  data-type="text"
40
  name="<?php echo esc_attr( $field_settings['name'] ); ?>"
includes/free/class-login.php CHANGED
@@ -594,9 +594,9 @@ class WPUF_Simple_Login {
594
  $nonce = sanitize_text_field( wp_unslash( $_POST['_wpnonce'] ) );
595
 
596
  // verify reset key again
597
- $user = $this->check_password_reset_key( $key, $login );
598
 
599
- if ( is_object( $user ) ) {
600
 
601
  // save these values into the form again in case of errors
602
  $args['key'] = $key;
@@ -706,24 +706,10 @@ class WPUF_Simple_Login {
706
  return false;
707
  }
708
 
709
- $key = $wpdb->get_var( $wpdb->prepare( "SELECT user_activation_key FROM $wpdb->users WHERE user_login = %s", $user_login ) );
710
 
711
- if ( empty( $key ) ) {
712
-
713
- // Generate something random for a key...
714
- $key = wp_generate_password( 20, false );
715
-
716
- if ( empty( $wp_hasher ) ) {
717
- require_once ABSPATH . WPINC . '/class-phpass.php';
718
- $wp_hasher = new PasswordHash( 8, true );
719
- }
720
-
721
- $key = time() . ':' . $wp_hasher->HashPassword( $key );
722
-
723
- do_action( 'retrieve_password_key', $user_login, $user_email, $key );
724
-
725
- // Now insert the new hash key into the db
726
- $wpdb->update( $wpdb->users, [ 'user_activation_key' => $key ], [ 'user_login' => $user_login ] );
727
  }
728
 
729
  // Send email notification
@@ -732,47 +718,6 @@ class WPUF_Simple_Login {
732
  return true;
733
  }
734
 
735
- /**
736
- * Retrieves a user row based on password reset key and login
737
- *
738
- * @uses $wpdb WordPress Database object
739
- *
740
- * @param string $key Hash to validate sending user's password
741
- * @param string $login The user login
742
- *
743
- * @return object|bool User's database row on success, false for invalid keys
744
- */
745
- public function check_password_reset_key( $key, $login ) {
746
- global $wpdb;
747
-
748
- //keeping backward compatible
749
- if ( strlen( $key ) == 20 ) {
750
- $key = preg_replace( '/[^a-z0-9]/i', '', $key );
751
- }
752
-
753
- if ( empty( $key ) || !is_string( $key ) ) {
754
- $this->login_errors[] = __( 'Invalid key', 'wp-user-frontend' );
755
-
756
- return false;
757
- }
758
-
759
- if ( empty( $login ) || !is_string( $login ) ) {
760
- $this->login_errors[] = __( 'Invalid Login', 'wp-user-frontend' );
761
-
762
- return false;
763
- }
764
-
765
- $user = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE user_activation_key = %s AND user_login = %s", $key, $login ) );
766
-
767
- if ( empty( $user ) ) {
768
- $this->login_errors[] = __( 'Invalid key', 'wp-user-frontend' );
769
-
770
- return false;
771
- }
772
-
773
- return $user;
774
- }
775
-
776
  /**
777
  * Successfull authenticate when enable email verfication in registration
778
  *
@@ -864,18 +809,11 @@ class WPUF_Simple_Login {
864
  global $wpdb, $wp_hasher;
865
 
866
  // Generate something random for a password reset key.
867
- $key = wp_generate_password( 20, false );
868
 
869
- /* This action is documented in wp-login.php */
870
- add_action( 'retrieve_password_key', $the_user->user_login, $key );
871
-
872
- // Now insert the key, hashed, into the DB.
873
- if ( empty( $wp_hasher ) ) {
874
- require_once ABSPATH . WPINC . '/class-phpass.php';
875
- $wp_hasher = new PasswordHash( 8, true );
876
  }
877
- $hashed = time() . ':' . $wp_hasher->HashPassword( $key );
878
- $wpdb->update( $wpdb->users, [ 'user_activation_key' => $hashed ], [ 'user_login' => $the_user->user_login ] );
879
 
880
  $subject = sprintf( __( '[%s] Your username and password info', 'wp-user-frontend' ), $blogname );
881
 
594
  $nonce = sanitize_text_field( wp_unslash( $_POST['_wpnonce'] ) );
595
 
596
  // verify reset key again
597
+ $user = check_password_reset_key( $key, $login );
598
 
599
+ if ( $user instanceof WP_User ) {
600
 
601
  // save these values into the form again in case of errors
602
  $args['key'] = $key;
706
  return false;
707
  }
708
 
709
+ $key = get_password_reset_key( $user_data );
710
 
711
+ if ( is_wp_error( $key ) ) {
712
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
713
  }
714
 
715
  // Send email notification
718
  return true;
719
  }
720
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
721
  /**
722
  * Successfull authenticate when enable email verfication in registration
723
  *
809
  global $wpdb, $wp_hasher;
810
 
811
  // Generate something random for a password reset key.
812
+ $key = get_password_reset_key( $user );
813
 
814
+ if ( is_wp_error( $key ) ) {
815
+ return;
 
 
 
 
 
816
  }
 
 
817
 
818
  $subject = sprintf( __( '[%s] Your username and password info', 'wp-user-frontend' ), $blogname );
819
 
includes/setup-wizard.php CHANGED
@@ -132,7 +132,7 @@ class WPUF_Setup_Wizard {
132
  'handler' => '',
133
  ],
134
  ];
135
- $this->step = isset( $_GET['step'] ) ? sanitize_key( wp_unslash( $_GET['step'] ) ) : current( array_keys( $this->steps ) );
136
 
137
  $this->enqueue_scripts();
138
 
132
  'handler' => '',
133
  ],
134
  ];
135
+ $this->step = isset( $_GET['step'] ) ? sanitize_text_field( wp_unslash( $_GET['step'] ) ) : current( array_keys( $this->steps ) );
136
 
137
  $this->enqueue_scripts();
138
 
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.1.18\n"
6
  "Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
7
- "POT-Creation-Date: 2020-03-13 10:36:35+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -28,57 +28,81 @@ msgstr ""
28
  msgid "WP User Frontend"
29
  msgstr ""
30
 
31
- #: admin/class-admin-settings.php:83
32
  msgid "User Frontend"
33
  msgstr ""
34
 
35
- #: admin/class-admin-settings.php:85 admin/post-forms-list-table-view.php:4
36
  msgid "Post Forms"
37
  msgstr ""
38
 
39
- #: admin/class-admin-settings.php:94
40
  msgid "Subscriptions"
41
  msgstr ""
42
 
43
- #: admin/class-admin-settings.php:100 admin/class-tools.php:389
44
  #: admin/transactions.php:2
45
  msgid "Transactions"
46
  msgstr ""
47
 
48
- #: admin/class-admin-settings.php:103 admin/tools.php:13
49
  msgid "Tools"
50
  msgstr ""
51
 
52
- #: admin/class-admin-settings.php:108
53
  msgid "Premium"
54
  msgstr ""
55
 
56
- #: admin/class-admin-settings.php:110
57
  msgid "Help"
58
  msgstr ""
59
 
60
- #: admin/class-admin-settings.php:110
61
  msgid "<span style=\"color:#f18500\">Help</span>"
62
  msgstr ""
63
 
64
- #: admin/class-admin-settings.php:111 admin/class-admin-settings.php:151
65
  #: admin/form-builder/views/form-builder.php:9 includes/setup-wizard.php:125
66
  msgid "Settings"
67
  msgstr ""
68
 
69
- #: admin/class-admin-settings.php:113 admin/class-admin-subscription.php:204
70
  #: admin/subscribers.php:18
71
  msgid "Subscribers"
72
  msgstr ""
73
 
74
- #: admin/class-admin-settings.php:366
75
  msgid "Number of items per page:"
76
  msgstr ""
77
 
78
- #: admin/class-admin-settings.php:396
79
  msgid "Post lock has been cleared"
80
  msgstr ""
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  #: admin/class-admin-subscription.php:57
83
  msgid "Pack Description"
84
  msgstr ""
@@ -115,7 +139,7 @@ msgstr ""
115
  msgid "Subscription pack draft updated."
116
  msgstr ""
117
 
118
- #: admin/class-admin-subscription.php:202 class/subscription.php:316
119
  msgid "Pack Name"
120
  msgstr ""
121
 
@@ -134,7 +158,7 @@ msgstr ""
134
 
135
  #: admin/class-admin-subscription.php:226
136
  #: admin/class-admin-subscription.php:596 class/frontend-account.php:255
137
- #: class/subscription.php:879 includes/class-user-subscription.php:305
138
  #: templates/subscriptions/pack-details.php:24
139
  msgid "Free"
140
  msgstr ""
@@ -148,7 +172,7 @@ msgstr ""
148
  #: includes/fields/class-abstract-fields.php:332
149
  #: includes/fields/class-abstract-fields.php:346
150
  #: includes/fields/class-abstract-fields.php:409
151
- #: includes/fields/class-field-checkbox.php:85
152
  #: includes/fields/class-field-radio.php:82 includes/free/form-element.php:460
153
  #: wpuf.php:712
154
  msgid "Yes"
@@ -163,7 +187,7 @@ msgstr ""
163
  #: includes/fields/class-abstract-fields.php:333
164
  #: includes/fields/class-abstract-fields.php:347
165
  #: includes/fields/class-abstract-fields.php:410
166
- #: includes/fields/class-field-checkbox.php:86
167
  #: includes/fields/class-field-radio.php:83 includes/free/form-element.php:461
168
  #: wpuf.php:713
169
  msgid "No"
@@ -300,9 +324,9 @@ msgstr ""
300
 
301
  #: admin/class-admin-subscription.php:774
302
  #: admin/form-builder/class-wpuf-admin-form-builder.php:284
303
- #: class/payment.php:205 class/subscription.php:783
304
  #: includes/class-list-table-subscribers.php:138 lib/appsero/Insights.php:764
305
- #: templates/dashboard/subscription.php:65
306
  msgid "Cancel"
307
  msgstr ""
308
 
@@ -330,134 +354,122 @@ msgstr ""
330
  msgid "Welcome to WP User Frontend"
331
  msgstr ""
332
 
333
- #: admin/class-tools.php:38
334
  msgid "Form Export"
335
  msgstr ""
336
 
337
- #: admin/class-tools.php:44 admin/class-tools.php:111
338
  #: admin/post-forms-list-table.php:43 class/transactions-list-table.php:87
339
- #: includes/class-list-table-subscribers.php:136 wpuf-functions.php:2860
340
  msgid "All"
341
  msgstr ""
342
 
343
- #: admin/class-tools.php:49 admin/class-tools.php:116
344
  msgid "Select individual"
345
  msgstr ""
346
 
347
- #: admin/class-tools.php:59 admin/class-tools.php:129 admin/tools.php:17
348
  msgid "Export"
349
  msgstr ""
350
 
351
- #: admin/class-tools.php:67 admin/class-tools.php:136
352
  msgid "Sorry you have no form to export"
353
  msgstr ""
354
 
355
- #: admin/class-tools.php:103
356
  msgid "Registration Form Export"
357
  msgstr ""
358
 
359
- #: admin/class-tools.php:148
360
- msgid "Somthing went wrong. Please choose a file again"
361
- msgstr ""
362
-
363
- #: admin/class-tools.php:158
364
- msgid "Import successful. Have fun!"
365
- msgstr ""
366
-
367
- #: admin/class-tools.php:161
368
- msgid "Invalid file or file size too big."
369
- msgstr ""
370
-
371
- #: admin/class-tools.php:166
372
  msgid "Import forms"
373
  msgstr ""
374
 
375
- #: admin/class-tools.php:168
376
- msgid "Click Browse button and choose a json file that you backup before."
377
  msgstr ""
378
 
379
- #: admin/class-tools.php:169
380
- msgid "Press <strong>Import</strong> button, we will do the rest for you."
381
  msgstr ""
382
 
383
- #: admin/class-tools.php:176 admin/tools.php:15
384
- msgid "Import"
385
  msgstr ""
386
 
387
- #: admin/class-tools.php:229 admin/class-tools.php:249
388
  msgid "Please select some form for exporting"
389
  msgstr ""
390
 
391
- #: admin/class-tools.php:331
392
  msgid "Are you Sure?"
393
  msgstr ""
394
 
395
- #: admin/class-tools.php:334
396
  msgid "All forms has been deleted"
397
  msgstr ""
398
 
399
- #: admin/class-tools.php:338
400
  msgid "Settings has been cleared!"
401
  msgstr ""
402
 
403
- #: admin/class-tools.php:342
404
  msgid "All transactions has been deleted!"
405
  msgstr ""
406
 
407
- #: admin/class-tools.php:358
408
  msgid "Page Installation"
409
  msgstr ""
410
 
411
- #: admin/class-tools.php:361
412
  msgid ""
413
  "Clicking this button will create required pages for the plugin. Note: It'll "
414
  "not delete/replace existing pages."
415
  msgstr ""
416
 
417
- #: admin/class-tools.php:362 admin/installer.php:30
418
  #: includes/setup-wizard.php:300
419
  msgid "Install WPUF Pages"
420
  msgstr ""
421
 
422
- #: admin/class-tools.php:367 admin/class-tools.php:371
423
  msgid "Reset Settings"
424
  msgstr ""
425
 
426
- #: admin/class-tools.php:370
427
  msgid ""
428
  "Caution: This tool will delete all the plugin settings of WP User Frontend "
429
  "Pro"
430
  msgstr ""
431
 
432
- #: admin/class-tools.php:376
433
  msgid "Delete Forms"
434
  msgstr ""
435
 
436
- #: admin/class-tools.php:379
437
  msgid "Caution: This tool will delete all the post and registration/profile forms."
438
  msgstr ""
439
 
440
- #: admin/class-tools.php:381
441
  msgid "Delete Post Forms"
442
  msgstr ""
443
 
444
- #: admin/class-tools.php:382
445
  msgid "Delete Registration Forms"
446
  msgstr ""
447
 
448
- #: admin/class-tools.php:383
449
  msgid "Delete Subscriptions"
450
  msgstr ""
451
 
452
- #: admin/class-tools.php:384
453
  msgid "Delete Coupons"
454
  msgstr ""
455
 
456
- #: admin/class-tools.php:392
457
  msgid "This tool will delete all the transactions from the transaction table."
458
  msgstr ""
459
 
460
- #: admin/class-tools.php:394
461
  msgid "Delete Transactions"
462
  msgstr ""
463
 
@@ -586,7 +598,7 @@ msgid "This field must contain at least one choice"
586
  msgstr ""
587
 
588
  #: admin/form-builder/class-wpuf-admin-form-builder.php:287
589
- #: includes/fields/class-field-checkbox.php:112
590
  #: includes/fields/class-field-dropdown.php:105
591
  #: includes/fields/class-field-multidropdown.php:82
592
  #: includes/fields/class-field-radio.php:108
@@ -726,9 +738,9 @@ msgid "Add New Form"
726
  msgstr ""
727
 
728
  #: admin/form.php:71 admin/form.php:109 admin/installer.php:86
729
- #: admin/post-forms-list-table.php:406 class/subscription.php:402
730
  #: includes/free/admin/shortcode-button.php:87 includes/free/edit-user.php:104
731
- #: templates/dashboard/posts.php:176 templates/dashboard.php:268
732
  msgid "Edit"
733
  msgstr ""
734
 
@@ -2267,7 +2279,7 @@ msgid "Congratulations!"
2267
  msgstr ""
2268
 
2269
  #: admin/installer.php:84 admin/settings-options.php:24
2270
- #: includes/free/admin/shortcode-button.php:79 wpuf-functions.php:1806
2271
  msgid "Dashboard"
2272
  msgstr ""
2273
 
@@ -2280,10 +2292,10 @@ msgstr ""
2280
  msgid "Login"
2281
  msgstr ""
2282
 
2283
- #: admin/installer.php:95 class/subscription.php:377 class/subscription.php:397
2284
- #: class/subscription.php:398 class/subscription.php:399
2285
  #: includes/free/admin/shortcode-button.php:99
2286
- #: templates/dashboard/dashboard.php:19 wpuf-functions.php:1809
2287
  msgid "Subscription"
2288
  msgstr ""
2289
 
@@ -2291,7 +2303,7 @@ msgstr ""
2291
  msgid "[wpuf_sub_pack]"
2292
  msgstr ""
2293
 
2294
- #: admin/installer.php:96 templates/dashboard/posts.php:94
2295
  #: templates/dashboard.php:136
2296
  msgid "Payment"
2297
  msgstr ""
@@ -3482,7 +3494,7 @@ msgstr ""
3482
 
3483
  #: admin/template.php:377 admin/template.php:401 admin/template.php:432
3484
  #: admin/template.php:463 includes/fields/class-abstract-fields.php:579
3485
- #: templates/dashboard/posts.php:97 templates/dashboard.php:139
3486
  msgid "Options"
3487
  msgstr ""
3488
 
@@ -3502,8 +3514,8 @@ msgstr ""
3502
 
3503
  #: admin/template.php:520 admin/template.php:578 admin/template.php:656
3504
  #: class/upload.php:206 includes/fields/class-field-recaptcha.php:147
3505
- #: includes/fields/class-field-sectionbreak.php:54
3506
- #: templates/dashboard/posts.php:88 templates/dashboard.php:104
3507
  #: wpuf-functions.php:845
3508
  msgid "Title"
3509
  msgstr ""
@@ -3521,7 +3533,7 @@ msgid "Enter the meta value"
3521
  msgstr ""
3522
 
3523
  #: admin/template.php:583 class/upload.php:208
3524
- #: includes/fields/class-field-sectionbreak.php:62 wpuf-functions.php:853
3525
  msgid "Description"
3526
  msgstr ""
3527
 
@@ -3551,6 +3563,10 @@ msgstr ""
3551
  msgid "Enable noCaptcha"
3552
  msgstr ""
3553
 
 
 
 
 
3554
  #: class/asset-loader.php:32 wpuf.php:629
3555
  msgid "is required"
3556
  msgstr ""
@@ -3663,7 +3679,7 @@ msgstr ""
3663
  msgid "Your current password is incorrect."
3664
  msgstr ""
3665
 
3666
- #: class/frontend-dashboard.php:74 templates/dashboard/posts.php:38
3667
  msgid "Post Deleted"
3668
  msgstr ""
3669
 
@@ -3675,7 +3691,7 @@ msgstr ""
3675
  msgid "%s"
3676
  msgstr ""
3677
 
3678
- #: class/frontend-dashboard.php:173 templates/dashboard/posts.php:31
3679
  msgid "You are not the post author. Cheeting huh!"
3680
  msgstr ""
3681
 
@@ -3700,7 +3716,7 @@ msgid "You already have activated a free package previously."
3700
  msgstr ""
3701
 
3702
  #: class/payment.php:138 includes/class-customizer.php:56
3703
- #: wpuf-functions.php:1810
3704
  msgid "Billing Address"
3705
  msgstr ""
3706
 
@@ -3786,7 +3802,7 @@ msgstr ""
3786
  #: includes/fields/class-abstract-fields.php:188
3787
  #: includes/fields/class-field-dropdown.php:106
3788
  #: includes/fields/class-field-multidropdown.php:83
3789
- #: includes/fields/class-field-post-taxonomy.php:332
3790
  msgid "- select -"
3791
  msgstr ""
3792
 
@@ -3803,7 +3819,7 @@ msgstr ""
3803
  #: includes/fields/class-field-featured-image.php:142
3804
  #: includes/free/post-form-templates/the_events_calendar.php:125
3805
  #: includes/free/post-form-templates/the_events_calendar.php:126
3806
- #: templates/dashboard/posts.php:85 templates/dashboard.php:102
3807
  msgid "Featured Image"
3808
  msgstr ""
3809
 
@@ -3879,8 +3895,8 @@ msgstr ""
3879
  msgid "Strength indicator"
3880
  msgstr ""
3881
 
3882
- #: class/render-form.php:1401 includes/fields/class-field-post-taxonomy.php:119
3883
- #: wpuf-functions.php:1594
3884
  msgid "-- Select --"
3885
  msgstr ""
3886
 
@@ -3890,133 +3906,133 @@ msgstr ""
3890
 
3891
  #: class/render-form.php:1673 class/transactions-list-table.php:119
3892
  #: class/transactions-list-table.php:193 includes/free/edit-user.php:105
3893
- #: templates/dashboard/posts.php:185 templates/dashboard.php:277
3894
  msgid "Delete"
3895
  msgstr ""
3896
 
3897
- #: class/subscription.php:400
3898
  msgid "Add Subscription"
3899
  msgstr ""
3900
 
3901
- #: class/subscription.php:401
3902
  msgid "Add New Subscription"
3903
  msgstr ""
3904
 
3905
- #: class/subscription.php:403
3906
  msgid "Edit Subscription"
3907
  msgstr ""
3908
 
3909
- #: class/subscription.php:404
3910
  msgid "New Subscription"
3911
  msgstr ""
3912
 
3913
- #: class/subscription.php:405 class/subscription.php:406
3914
  msgid "View Subscription"
3915
  msgstr ""
3916
 
3917
- #: class/subscription.php:407
3918
  msgid "Search Subscription"
3919
  msgstr ""
3920
 
3921
- #: class/subscription.php:408
3922
  msgid "No Subscription Found"
3923
  msgstr ""
3924
 
3925
- #: class/subscription.php:409
3926
  msgid "No Subscription Found in Trash"
3927
  msgstr ""
3928
 
3929
- #: class/subscription.php:410
3930
  msgid "Parent Subscription"
3931
  msgstr ""
3932
 
3933
- #: class/subscription.php:747
3934
  msgid "Payment is complete"
3935
  msgstr ""
3936
 
3937
- #: class/subscription.php:747
3938
  msgid "Congratulations, your payment has been completed!"
3939
  msgstr ""
3940
 
3941
- #: class/subscription.php:751 class/subscription.php:755
3942
  msgid "Please buy a subscription pack to post"
3943
  msgstr ""
3944
 
3945
- #: class/subscription.php:773
3946
  msgid "<p><i>You have a subscription pack activated. </i></p>"
3947
  msgstr ""
3948
 
3949
- #: class/subscription.php:774
3950
  msgid "<p><i>Pack name: %s </i></p>"
3951
  msgstr ""
3952
 
3953
- #: class/subscription.php:776
3954
  msgid "To cancel the pack, press the following cancel button"
3955
  msgstr ""
3956
 
3957
- #: class/subscription.php:819
3958
  msgid "Day"
3959
  msgid_plural "Days"
3960
  msgstr[0] ""
3961
  msgstr[1] ""
3962
 
3963
- #: class/subscription.php:820
3964
  msgid "Week"
3965
  msgid_plural "Weeks"
3966
  msgstr[0] ""
3967
  msgstr[1] ""
3968
 
3969
- #: class/subscription.php:821
3970
  msgid "Month"
3971
  msgid_plural "Months"
3972
  msgstr[0] ""
3973
  msgstr[1] ""
3974
 
3975
- #: class/subscription.php:822
3976
  msgid "Year"
3977
  msgid_plural "Years"
3978
  msgstr[0] ""
3979
  msgstr[1] ""
3980
 
3981
- #: class/subscription.php:854
3982
  msgid "One time payment"
3983
  msgstr ""
3984
 
3985
- #: class/subscription.php:861
3986
  msgid "Every"
3987
  msgstr ""
3988
 
3989
- #: class/subscription.php:862
3990
  msgid "for"
3991
  msgstr ""
3992
 
3993
- #: class/subscription.php:862
3994
  msgid "installments"
3995
  msgstr ""
3996
 
3997
- #: class/subscription.php:868
3998
  msgid "Trial available for first %s %s"
3999
  msgstr ""
4000
 
4001
- #: class/subscription.php:872
4002
  msgid "Buy Now"
4003
  msgstr ""
4004
 
4005
- #: class/subscription.php:876
4006
  msgid "Sign Up"
4007
  msgstr ""
4008
 
4009
- #: class/subscription.php:940
4010
  msgid "There is a <strong>%s</strong> charge to add a new post."
4011
  msgstr ""
4012
 
4013
- #: class/subscription.php:956
4014
  msgid ""
4015
  "Your Subscription pack is exhausted. There is a <strong>%s</strong> charge "
4016
  "to add a new post."
4017
  msgstr ""
4018
 
4019
- #: class/subscription.php:1001
4020
  msgid "You must <a href=\"%s\">purchase a pack</a> before posting"
4021
  msgstr ""
4022
 
@@ -4034,7 +4050,7 @@ msgstr ""
4034
 
4035
  #: class/transactions-list-table.php:42
4036
  #: includes/class-list-table-subscribers.php:44
4037
- #: templates/dashboard/posts.php:89 templates/dashboard.php:131
4038
  msgid "Status"
4039
  msgstr ""
4040
 
@@ -4098,37 +4114,37 @@ msgstr ""
4098
  msgid "Caption"
4099
  msgstr ""
4100
 
4101
- #: includes/class-acf.php:168
4102
  msgid "%s Detected"
4103
  msgstr ""
4104
 
4105
- #: includes/class-acf.php:169
4106
  msgid ""
4107
  "Hey, looks like you have <strong>%s</strong> installed. What do you want to "
4108
  "do with WPUF?"
4109
  msgstr ""
4110
 
4111
- #: includes/class-acf.php:170
4112
  msgid ""
4113
  "It will update compatibility option only, so existing custom fields data "
4114
  "format will not change."
4115
  msgstr ""
4116
 
4117
- #: includes/class-acf.php:171
4118
  msgid ""
4119
  "It will update existing custom fields data to ACF format and update "
4120
  "compatibility option too."
4121
  msgstr ""
4122
 
4123
- #: includes/class-acf.php:174
4124
  msgid "Compatible"
4125
  msgstr ""
4126
 
4127
- #: includes/class-acf.php:175
4128
  msgid "Compatible & Migrate"
4129
  msgstr ""
4130
 
4131
- #: includes/class-acf.php:176
4132
  msgid "No Thanks"
4133
  msgstr ""
4134
 
@@ -4215,7 +4231,7 @@ msgstr ""
4215
 
4216
  #: includes/class-dokan-integration.php:34
4217
  #: includes/class-wc-vendors-integration.php:108
4218
- #: templates/dashboard/dashboard.php:15 wpuf-functions.php:1807
4219
  msgid "Posts"
4220
  msgstr ""
4221
 
@@ -4241,11 +4257,11 @@ msgstr ""
4241
  msgid "Select a post form that will show on the vendor dashboard."
4242
  msgstr ""
4243
 
4244
- #: includes/class-field-manager.php:161
4245
  msgid "Custom Fields"
4246
  msgstr ""
4247
 
4248
- #: includes/class-field-manager.php:182
4249
  msgid "Others"
4250
  msgstr ""
4251
 
@@ -4335,7 +4351,7 @@ msgid ""
4335
  "Please check your inbox!"
4336
  msgstr ""
4337
 
4338
- #: includes/class-frontend-render-form.php:815
4339
  #: includes/free/class-login.php:445
4340
  msgid "Empty reCaptcha Field"
4341
  msgstr ""
@@ -4369,7 +4385,7 @@ msgid "Expire date"
4369
  msgstr ""
4370
 
4371
  #: includes/class-list-table-subscribers.php:137
4372
- #: templates/dashboard/posts.php:148 templates/dashboard.php:237
4373
  msgid "Completed"
4374
  msgstr ""
4375
 
@@ -4413,20 +4429,20 @@ msgstr ""
4413
  msgid "Someone has requested a password reset for the following account:"
4414
  msgstr ""
4415
 
4416
- #: includes/class-login-widget.php:147 includes/free/class-login.php:882
4417
- #: includes/free/class-login.php:963 includes/free/class-registration.php:285
4418
  msgid "Username: %s"
4419
  msgstr ""
4420
 
4421
- #: includes/class-login-widget.php:148 includes/free/class-login.php:964
4422
  msgid "If this was a mistake, just ignore this email and nothing will happen."
4423
  msgstr ""
4424
 
4425
- #: includes/class-login-widget.php:149 includes/free/class-login.php:965
4426
  msgid "To reset your password, visit the following address:"
4427
  msgstr ""
4428
 
4429
- #: includes/class-login-widget.php:154 includes/free/class-login.php:976
4430
  msgid "[%s] Password Reset"
4431
  msgstr ""
4432
 
@@ -4980,13 +4996,13 @@ msgid "Select Yes if you want to hide the field label in single post."
4980
  msgstr ""
4981
 
4982
  #: includes/fields/class-abstract-fields.php:406
4983
- #: includes/fields/class-field-checkbox.php:82
4984
  #: includes/fields/class-field-radio.php:79
4985
  msgid "Show in inline list"
4986
  msgstr ""
4987
 
4988
  #: includes/fields/class-abstract-fields.php:416
4989
- #: includes/fields/class-field-checkbox.php:92
4990
  #: includes/fields/class-field-radio.php:89
4991
  msgid "Show this option in an inline list"
4992
  msgstr ""
@@ -5017,7 +5033,7 @@ msgstr ""
5017
 
5018
  #: includes/fields/class-field-column.php:74
5019
  #: includes/fields/class-field-recaptcha.php:151
5020
- #: includes/fields/class-field-sectionbreak.php:58
5021
  msgid "Title of the section"
5022
  msgstr ""
5023
 
@@ -5125,11 +5141,11 @@ msgstr ""
5125
  msgid "Section Break"
5126
  msgstr ""
5127
 
5128
- #: includes/fields/class-field-sectionbreak.php:66
5129
  msgid "Some details text about the section"
5130
  msgstr ""
5131
 
5132
- #: includes/fields/class-field-sectionbreak.php:83
5133
  msgid "Some description about this section"
5134
  msgstr ""
5135
 
@@ -5309,76 +5325,68 @@ msgstr ""
5309
  msgid "Password reset is not allowed for this user"
5310
  msgstr ""
5311
 
5312
- #: includes/free/class-login.php:754 includes/free/class-login.php:768
5313
- msgid "Invalid key"
5314
- msgstr ""
5315
-
5316
- #: includes/free/class-login.php:760
5317
- msgid "Invalid Login"
5318
- msgstr ""
5319
-
5320
- #: includes/free/class-login.php:793
5321
  msgid ""
5322
  "<strong>Your account is not active.</strong><br>Please check your email for "
5323
  "activation link. <br><a href=\"%s\">Click here</a> to resend the activation "
5324
  "link"
5325
  msgstr ""
5326
 
5327
- #: includes/free/class-login.php:814 includes/free/class-login.php:839
5328
  msgid "Activation URL is not valid"
5329
  msgstr ""
5330
 
5331
- #: includes/free/class-login.php:825
5332
  msgid "Invalid User activation url"
5333
  msgstr ""
5334
 
5335
- #: includes/free/class-login.php:831
5336
  msgid "User already verified"
5337
  msgstr ""
5338
 
5339
- #: includes/free/class-login.php:847 includes/free/class-login.php:918
5340
  msgid "Your account has been activated"
5341
  msgstr ""
5342
 
5343
- #: includes/free/class-login.php:850
5344
  msgid ""
5345
  "Your account has been verified , but you can't login until manually "
5346
  "approved your account by an administrator."
5347
  msgstr ""
5348
 
5349
- #: includes/free/class-login.php:880
5350
  msgid "[%s] Your username and password info"
5351
  msgstr ""
5352
 
5353
- #: includes/free/class-login.php:883
5354
  msgid "To set your password, visit the following address:"
5355
  msgstr ""
5356
 
5357
- #: includes/free/class-login.php:893
5358
  msgid "[%s] Account has been activated"
5359
  msgstr ""
5360
 
5361
- #: includes/free/class-login.php:895
5362
  msgid "Hi %s,"
5363
  msgstr ""
5364
 
5365
- #: includes/free/class-login.php:896
5366
  msgid "Congrats! Your account has been activated. To login visit the following url:"
5367
  msgstr ""
5368
 
5369
- #: includes/free/class-login.php:898
5370
  msgid "Thanks"
5371
  msgstr ""
5372
 
5373
- #: includes/free/class-login.php:961
5374
  msgid "Someone requested that the password be reset for the following account:"
5375
  msgstr ""
5376
 
5377
- #: includes/free/class-login.php:982
5378
  msgid "The e-mail could not be sent."
5379
  msgstr ""
5380
 
5381
- #: includes/free/class-login.php:982
5382
  msgid "Possible reason: your host may have disabled the mail() function."
5383
  msgstr ""
5384
 
@@ -6045,39 +6053,39 @@ msgstr ""
6045
  msgid "Confirm New Password"
6046
  msgstr ""
6047
 
6048
- #: templates/dashboard/posts.php:56
6049
  msgid "You have created <span>%d</span> %s"
6050
  msgstr ""
6051
 
6052
- #: templates/dashboard/posts.php:117 templates/dashboard.php:159
6053
  msgid "No Image"
6054
  msgstr ""
6055
 
6056
- #: templates/dashboard/posts.php:131 templates/dashboard.php:173
6057
  msgid "Permalink to %s"
6058
  msgstr ""
6059
 
6060
- #: templates/dashboard/posts.php:144 templates/dashboard.php:233
6061
  msgid "Not Applicable"
6062
  msgstr ""
6063
 
6064
- #: templates/dashboard/posts.php:146 templates/dashboard.php:235
6065
  msgid "Pay Now"
6066
  msgstr ""
6067
 
6068
- #: templates/dashboard/posts.php:184 templates/dashboard.php:276
6069
  msgid "Are you sure to delete?"
6070
  msgstr ""
6071
 
6072
- #: templates/dashboard/posts.php:205 templates/dashboard.php:296
6073
  msgid "&laquo;"
6074
  msgstr ""
6075
 
6076
- #: templates/dashboard/posts.php:206 templates/dashboard.php:297
6077
  msgid "&raquo;"
6078
  msgstr ""
6079
 
6080
- #: templates/dashboard/posts.php:229 templates/dashboard.php:319
6081
  msgid "No %s found"
6082
  msgstr ""
6083
 
@@ -6093,8 +6101,8 @@ msgstr ""
6093
  msgid "Subscription Expired!"
6094
  msgstr ""
6095
 
6096
- #: templates/dashboard/subscription.php:61
6097
- msgid "<p><i>To cancel the pack, press the following cancel button.</i></p>"
6098
  msgstr ""
6099
 
6100
  #: templates/dashboard.php:4
@@ -6187,7 +6195,7 @@ msgstr ""
6187
  msgid "Private"
6188
  msgstr ""
6189
 
6190
- #: wpuf-functions.php:210 wpuf-functions.php:1825
6191
  msgid "-- select --"
6192
  msgstr ""
6193
 
@@ -6227,219 +6235,219 @@ msgstr ""
6227
  msgid "Directions »"
6228
  msgstr ""
6229
 
6230
- #: wpuf-functions.php:1808
6231
  msgid "Edit Profile"
6232
  msgstr ""
6233
 
6234
- #: wpuf-functions.php:1937
6235
  msgid "United Arab Emirates Dirham"
6236
  msgstr ""
6237
 
6238
- #: wpuf-functions.php:1938
6239
  msgid "Australian Dollars"
6240
  msgstr ""
6241
 
6242
- #: wpuf-functions.php:1939
6243
  msgid "Argentine Peso"
6244
  msgstr ""
6245
 
6246
- #: wpuf-functions.php:1940
6247
  msgid "Bangladeshi Taka"
6248
  msgstr ""
6249
 
6250
- #: wpuf-functions.php:1941
6251
  msgid "Brazilian Real"
6252
  msgstr ""
6253
 
6254
- #: wpuf-functions.php:1942
6255
  msgid "Bulgarian Lev"
6256
  msgstr ""
6257
 
6258
- #: wpuf-functions.php:1943
6259
  msgid "Canadian Dollars"
6260
  msgstr ""
6261
 
6262
- #: wpuf-functions.php:1944
6263
  msgid "Chilean Peso"
6264
  msgstr ""
6265
 
6266
- #: wpuf-functions.php:1945
6267
  msgid "Chinese Yuan"
6268
  msgstr ""
6269
 
6270
- #: wpuf-functions.php:1946
6271
  msgid "Colombian Peso"
6272
  msgstr ""
6273
 
6274
- #: wpuf-functions.php:1947
6275
  msgid "Czech Koruna"
6276
  msgstr ""
6277
 
6278
- #: wpuf-functions.php:1948
6279
  msgid "Danish Krone"
6280
  msgstr ""
6281
 
6282
- #: wpuf-functions.php:1949
6283
  msgid "Dominican Peso"
6284
  msgstr ""
6285
 
6286
- #: wpuf-functions.php:1950
6287
  msgid "Algerian Dinar"
6288
  msgstr ""
6289
 
6290
- #: wpuf-functions.php:1951
6291
  msgid "Euros"
6292
  msgstr ""
6293
 
6294
- #: wpuf-functions.php:1952
6295
  msgid "Hong Kong Dollar"
6296
  msgstr ""
6297
 
6298
- #: wpuf-functions.php:1953
6299
  msgid "Croatia kuna"
6300
  msgstr ""
6301
 
6302
- #: wpuf-functions.php:1954
6303
  msgid "Hungarian Forint"
6304
  msgstr ""
6305
 
6306
- #: wpuf-functions.php:1955
6307
  msgid "Icelandic krona"
6308
  msgstr ""
6309
 
6310
- #: wpuf-functions.php:1956
6311
  msgid "Indonesia Rupiah"
6312
  msgstr ""
6313
 
6314
- #: wpuf-functions.php:1957
6315
  msgid "Indian Rupee"
6316
  msgstr ""
6317
 
6318
- #: wpuf-functions.php:1958
6319
  msgid "Nepali Rupee"
6320
  msgstr ""
6321
 
6322
- #: wpuf-functions.php:1959
6323
  msgid "Israeli Shekel"
6324
  msgstr ""
6325
 
6326
- #: wpuf-functions.php:1960
6327
  msgid "Japanese Yen"
6328
  msgstr ""
6329
 
6330
- #: wpuf-functions.php:1961
6331
  msgid "Lao Kip"
6332
  msgstr ""
6333
 
6334
- #: wpuf-functions.php:1962
6335
  msgid "South Korean Won"
6336
  msgstr ""
6337
 
6338
- #: wpuf-functions.php:1963
6339
  msgid "Malaysian Ringgits"
6340
  msgstr ""
6341
 
6342
- #: wpuf-functions.php:1964
6343
  msgid "Mexican Peso"
6344
  msgstr ""
6345
 
6346
- #: wpuf-functions.php:1965
6347
  msgid "Nigerian Naira"
6348
  msgstr ""
6349
 
6350
- #: wpuf-functions.php:1966
6351
  msgid "Norwegian Krone"
6352
  msgstr ""
6353
 
6354
- #: wpuf-functions.php:1967
6355
  msgid "New Zealand Dollar"
6356
  msgstr ""
6357
 
6358
- #: wpuf-functions.php:1968
6359
  msgid "Omani Rial"
6360
  msgstr ""
6361
 
6362
- #: wpuf-functions.php:1969
6363
  msgid "Iranian Rial"
6364
  msgstr ""
6365
 
6366
- #: wpuf-functions.php:1970
6367
  msgid "Pakistani Rupee"
6368
  msgstr ""
6369
 
6370
- #: wpuf-functions.php:1971
6371
  msgid "Paraguayan Guaraní"
6372
  msgstr ""
6373
 
6374
- #: wpuf-functions.php:1972
6375
  msgid "Philippine Pesos"
6376
  msgstr ""
6377
 
6378
- #: wpuf-functions.php:1973
6379
  msgid "Polish Zloty"
6380
  msgstr ""
6381
 
6382
- #: wpuf-functions.php:1974
6383
  msgid "Pounds Sterling"
6384
  msgstr ""
6385
 
6386
- #: wpuf-functions.php:1975
6387
  msgid "Romanian Leu"
6388
  msgstr ""
6389
 
6390
- #: wpuf-functions.php:1976
6391
  msgid "Russian Ruble"
6392
  msgstr ""
6393
 
6394
- #: wpuf-functions.php:1977
6395
  msgid "Saudi Riyal"
6396
  msgstr ""
6397
 
6398
- #: wpuf-functions.php:1978
6399
  msgid "Singapore Dollar"
6400
  msgstr ""
6401
 
6402
- #: wpuf-functions.php:1979
6403
  msgid "South African rand"
6404
  msgstr ""
6405
 
6406
- #: wpuf-functions.php:1980
6407
  msgid "Swedish Krona"
6408
  msgstr ""
6409
 
6410
- #: wpuf-functions.php:1981
6411
  msgid "Swiss Franc"
6412
  msgstr ""
6413
 
6414
- #: wpuf-functions.php:1982
6415
  msgid "Taiwan New Dollars"
6416
  msgstr ""
6417
 
6418
- #: wpuf-functions.php:1983
6419
  msgid "Thai Baht"
6420
  msgstr ""
6421
 
6422
- #: wpuf-functions.php:1984
6423
  msgid "Turkish Lira"
6424
  msgstr ""
6425
 
6426
- #: wpuf-functions.php:1985
6427
  msgid "US Dollar"
6428
  msgstr ""
6429
 
6430
- #: wpuf-functions.php:1986
6431
  msgid "Vietnamese Dong"
6432
  msgstr ""
6433
 
6434
- #: wpuf-functions.php:1987
6435
  msgid "Egyptian Pound"
6436
  msgstr ""
6437
 
6438
- #: wpuf-functions.php:1988
6439
  msgid "Jordanian dinar"
6440
  msgstr ""
6441
 
6442
- #: wpuf-functions.php:2861
6443
  msgid "None"
6444
  msgstr ""
6445
 
2
  # This file is distributed under the GPL2 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP User Frontend 3.2.0\n"
6
  "Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
7
+ "POT-Creation-Date: 2020-04-14 13:32:38+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
28
  msgid "WP User Frontend"
29
  msgstr ""
30
 
31
+ #: admin/class-admin-settings.php:86
32
  msgid "User Frontend"
33
  msgstr ""
34
 
35
+ #: admin/class-admin-settings.php:88 admin/post-forms-list-table-view.php:4
36
  msgid "Post Forms"
37
  msgstr ""
38
 
39
+ #: admin/class-admin-settings.php:97
40
  msgid "Subscriptions"
41
  msgstr ""
42
 
43
+ #: admin/class-admin-settings.php:103 admin/class-tools.php:358
44
  #: admin/transactions.php:2
45
  msgid "Transactions"
46
  msgstr ""
47
 
48
+ #: admin/class-admin-settings.php:106 admin/tools.php:13
49
  msgid "Tools"
50
  msgstr ""
51
 
52
+ #: admin/class-admin-settings.php:111
53
  msgid "Premium"
54
  msgstr ""
55
 
56
+ #: admin/class-admin-settings.php:113
57
  msgid "Help"
58
  msgstr ""
59
 
60
+ #: admin/class-admin-settings.php:113
61
  msgid "<span style=\"color:#f18500\">Help</span>"
62
  msgstr ""
63
 
64
+ #: admin/class-admin-settings.php:114 admin/class-admin-settings.php:154
65
  #: admin/form-builder/views/form-builder.php:9 includes/setup-wizard.php:125
66
  msgid "Settings"
67
  msgstr ""
68
 
69
+ #: admin/class-admin-settings.php:116 admin/class-admin-subscription.php:204
70
  #: admin/subscribers.php:18
71
  msgid "Subscribers"
72
  msgstr ""
73
 
74
+ #: admin/class-admin-settings.php:370
75
  msgid "Number of items per page:"
76
  msgstr ""
77
 
78
+ #: admin/class-admin-settings.php:400
79
  msgid "Post lock has been cleared"
80
  msgstr ""
81
 
82
+ #: admin/class-admin-settings.php:430
83
+ msgid "WPUF Import Forms"
84
+ msgstr ""
85
+
86
+ #: admin/class-admin-settings.php:431
87
+ msgid "Add JSON file"
88
+ msgstr ""
89
+
90
+ #: admin/class-admin-settings.php:432
91
+ msgid "Could not import forms."
92
+ msgstr ""
93
+
94
+ #: admin/class-admin-settings.php:512
95
+ msgid "Missing file_id param"
96
+ msgstr ""
97
+
98
+ #: admin/class-admin-settings.php:522
99
+ msgid "JSON file not found"
100
+ msgstr ""
101
+
102
+ #: admin/class-admin-settings.php:538
103
+ msgid "Forms imported successfully."
104
+ msgstr ""
105
+
106
  #: admin/class-admin-subscription.php:57
107
  msgid "Pack Description"
108
  msgstr ""
139
  msgid "Subscription pack draft updated."
140
  msgstr ""
141
 
142
+ #: admin/class-admin-subscription.php:202 class/subscription.php:320
143
  msgid "Pack Name"
144
  msgstr ""
145
 
158
 
159
  #: admin/class-admin-subscription.php:226
160
  #: admin/class-admin-subscription.php:596 class/frontend-account.php:255
161
+ #: class/subscription.php:883 includes/class-user-subscription.php:305
162
  #: templates/subscriptions/pack-details.php:24
163
  msgid "Free"
164
  msgstr ""
172
  #: includes/fields/class-abstract-fields.php:332
173
  #: includes/fields/class-abstract-fields.php:346
174
  #: includes/fields/class-abstract-fields.php:409
175
+ #: includes/fields/class-field-checkbox.php:74
176
  #: includes/fields/class-field-radio.php:82 includes/free/form-element.php:460
177
  #: wpuf.php:712
178
  msgid "Yes"
187
  #: includes/fields/class-abstract-fields.php:333
188
  #: includes/fields/class-abstract-fields.php:347
189
  #: includes/fields/class-abstract-fields.php:410
190
+ #: includes/fields/class-field-checkbox.php:75
191
  #: includes/fields/class-field-radio.php:83 includes/free/form-element.php:461
192
  #: wpuf.php:713
193
  msgid "No"
324
 
325
  #: admin/class-admin-subscription.php:774
326
  #: admin/form-builder/class-wpuf-admin-form-builder.php:284
327
+ #: class/payment.php:205 class/subscription.php:787
328
  #: includes/class-list-table-subscribers.php:138 lib/appsero/Insights.php:764
329
+ #: templates/dashboard/subscription.php:64
330
  msgid "Cancel"
331
  msgstr ""
332
 
354
  msgid "Welcome to WP User Frontend"
355
  msgstr ""
356
 
357
+ #: admin/class-tools.php:37
358
  msgid "Form Export"
359
  msgstr ""
360
 
361
+ #: admin/class-tools.php:43 admin/class-tools.php:106
362
  #: admin/post-forms-list-table.php:43 class/transactions-list-table.php:87
363
+ #: includes/class-list-table-subscribers.php:136 wpuf-functions.php:2867
364
  msgid "All"
365
  msgstr ""
366
 
367
+ #: admin/class-tools.php:48 admin/class-tools.php:111
368
  msgid "Select individual"
369
  msgstr ""
370
 
371
+ #: admin/class-tools.php:58 admin/class-tools.php:124 admin/tools.php:17
372
  msgid "Export"
373
  msgstr ""
374
 
375
+ #: admin/class-tools.php:66 admin/class-tools.php:131
376
  msgid "Sorry you have no form to export"
377
  msgstr ""
378
 
379
+ #: admin/class-tools.php:98
380
  msgid "Registration Form Export"
381
  msgstr ""
382
 
383
+ #: admin/class-tools.php:140
 
 
 
 
 
 
 
 
 
 
 
 
384
  msgid "Import forms"
385
  msgstr ""
386
 
387
+ #: admin/class-tools.php:143
388
+ msgid "Upload your JSON file and start imporing WPUF forms here"
389
  msgstr ""
390
 
391
+ #: admin/class-tools.php:152
392
+ msgid "Upload JSON File"
393
  msgstr ""
394
 
395
+ #: admin/class-tools.php:155
396
+ msgid "Importing JSON File"
397
  msgstr ""
398
 
399
+ #: admin/class-tools.php:217
400
  msgid "Please select some form for exporting"
401
  msgstr ""
402
 
403
+ #: admin/class-tools.php:300
404
  msgid "Are you Sure?"
405
  msgstr ""
406
 
407
+ #: admin/class-tools.php:303
408
  msgid "All forms has been deleted"
409
  msgstr ""
410
 
411
+ #: admin/class-tools.php:307
412
  msgid "Settings has been cleared!"
413
  msgstr ""
414
 
415
+ #: admin/class-tools.php:311
416
  msgid "All transactions has been deleted!"
417
  msgstr ""
418
 
419
+ #: admin/class-tools.php:327
420
  msgid "Page Installation"
421
  msgstr ""
422
 
423
+ #: admin/class-tools.php:330
424
  msgid ""
425
  "Clicking this button will create required pages for the plugin. Note: It'll "
426
  "not delete/replace existing pages."
427
  msgstr ""
428
 
429
+ #: admin/class-tools.php:331 admin/installer.php:30
430
  #: includes/setup-wizard.php:300
431
  msgid "Install WPUF Pages"
432
  msgstr ""
433
 
434
+ #: admin/class-tools.php:336 admin/class-tools.php:340
435
  msgid "Reset Settings"
436
  msgstr ""
437
 
438
+ #: admin/class-tools.php:339
439
  msgid ""
440
  "Caution: This tool will delete all the plugin settings of WP User Frontend "
441
  "Pro"
442
  msgstr ""
443
 
444
+ #: admin/class-tools.php:345
445
  msgid "Delete Forms"
446
  msgstr ""
447
 
448
+ #: admin/class-tools.php:348
449
  msgid "Caution: This tool will delete all the post and registration/profile forms."
450
  msgstr ""
451
 
452
+ #: admin/class-tools.php:350
453
  msgid "Delete Post Forms"
454
  msgstr ""
455
 
456
+ #: admin/class-tools.php:351
457
  msgid "Delete Registration Forms"
458
  msgstr ""
459
 
460
+ #: admin/class-tools.php:352
461
  msgid "Delete Subscriptions"
462
  msgstr ""
463
 
464
+ #: admin/class-tools.php:353
465
  msgid "Delete Coupons"
466
  msgstr ""
467
 
468
+ #: admin/class-tools.php:361
469
  msgid "This tool will delete all the transactions from the transaction table."
470
  msgstr ""
471
 
472
+ #: admin/class-tools.php:363
473
  msgid "Delete Transactions"
474
  msgstr ""
475
 
598
  msgstr ""
599
 
600
  #: admin/form-builder/class-wpuf-admin-form-builder.php:287
601
+ #: includes/fields/class-field-checkbox.php:101
602
  #: includes/fields/class-field-dropdown.php:105
603
  #: includes/fields/class-field-multidropdown.php:82
604
  #: includes/fields/class-field-radio.php:108
738
  msgstr ""
739
 
740
  #: admin/form.php:71 admin/form.php:109 admin/installer.php:86
741
+ #: admin/post-forms-list-table.php:406 class/subscription.php:406
742
  #: includes/free/admin/shortcode-button.php:87 includes/free/edit-user.php:104
743
+ #: templates/dashboard/posts.php:177 templates/dashboard.php:268
744
  msgid "Edit"
745
  msgstr ""
746
 
2279
  msgstr ""
2280
 
2281
  #: admin/installer.php:84 admin/settings-options.php:24
2282
+ #: includes/free/admin/shortcode-button.php:79 wpuf-functions.php:1813
2283
  msgid "Dashboard"
2284
  msgstr ""
2285
 
2292
  msgid "Login"
2293
  msgstr ""
2294
 
2295
+ #: admin/installer.php:95 class/subscription.php:381 class/subscription.php:401
2296
+ #: class/subscription.php:402 class/subscription.php:403
2297
  #: includes/free/admin/shortcode-button.php:99
2298
+ #: templates/dashboard/dashboard.php:19 wpuf-functions.php:1816
2299
  msgid "Subscription"
2300
  msgstr ""
2301
 
2303
  msgid "[wpuf_sub_pack]"
2304
  msgstr ""
2305
 
2306
+ #: admin/installer.php:96 templates/dashboard/posts.php:95
2307
  #: templates/dashboard.php:136
2308
  msgid "Payment"
2309
  msgstr ""
3494
 
3495
  #: admin/template.php:377 admin/template.php:401 admin/template.php:432
3496
  #: admin/template.php:463 includes/fields/class-abstract-fields.php:579
3497
+ #: templates/dashboard/posts.php:98 templates/dashboard.php:139
3498
  msgid "Options"
3499
  msgstr ""
3500
 
3514
 
3515
  #: admin/template.php:520 admin/template.php:578 admin/template.php:656
3516
  #: class/upload.php:206 includes/fields/class-field-recaptcha.php:147
3517
+ #: includes/fields/class-field-sectionbreak.php:55
3518
+ #: templates/dashboard/posts.php:89 templates/dashboard.php:104
3519
  #: wpuf-functions.php:845
3520
  msgid "Title"
3521
  msgstr ""
3533
  msgstr ""
3534
 
3535
  #: admin/template.php:583 class/upload.php:208
3536
+ #: includes/fields/class-field-sectionbreak.php:63 wpuf-functions.php:853
3537
  msgid "Description"
3538
  msgstr ""
3539
 
3563
  msgid "Enable noCaptcha"
3564
  msgstr ""
3565
 
3566
+ #: admin/tools.php:15
3567
+ msgid "Import"
3568
+ msgstr ""
3569
+
3570
  #: class/asset-loader.php:32 wpuf.php:629
3571
  msgid "is required"
3572
  msgstr ""
3679
  msgid "Your current password is incorrect."
3680
  msgstr ""
3681
 
3682
+ #: class/frontend-dashboard.php:74 templates/dashboard/posts.php:39
3683
  msgid "Post Deleted"
3684
  msgstr ""
3685
 
3691
  msgid "%s"
3692
  msgstr ""
3693
 
3694
+ #: class/frontend-dashboard.php:174 templates/dashboard/posts.php:32
3695
  msgid "You are not the post author. Cheeting huh!"
3696
  msgstr ""
3697
 
3716
  msgstr ""
3717
 
3718
  #: class/payment.php:138 includes/class-customizer.php:56
3719
+ #: wpuf-functions.php:1817
3720
  msgid "Billing Address"
3721
  msgstr ""
3722
 
3802
  #: includes/fields/class-abstract-fields.php:188
3803
  #: includes/fields/class-field-dropdown.php:106
3804
  #: includes/fields/class-field-multidropdown.php:83
3805
+ #: includes/fields/class-field-post-taxonomy.php:335
3806
  msgid "- select -"
3807
  msgstr ""
3808
 
3819
  #: includes/fields/class-field-featured-image.php:142
3820
  #: includes/free/post-form-templates/the_events_calendar.php:125
3821
  #: includes/free/post-form-templates/the_events_calendar.php:126
3822
+ #: templates/dashboard/posts.php:86 templates/dashboard.php:102
3823
  msgid "Featured Image"
3824
  msgstr ""
3825
 
3895
  msgid "Strength indicator"
3896
  msgstr ""
3897
 
3898
+ #: class/render-form.php:1401 includes/fields/class-field-post-taxonomy.php:122
3899
+ #: wpuf-functions.php:1601
3900
  msgid "-- Select --"
3901
  msgstr ""
3902
 
3906
 
3907
  #: class/render-form.php:1673 class/transactions-list-table.php:119
3908
  #: class/transactions-list-table.php:193 includes/free/edit-user.php:105
3909
+ #: templates/dashboard/posts.php:186 templates/dashboard.php:277
3910
  msgid "Delete"
3911
  msgstr ""
3912
 
3913
+ #: class/subscription.php:404
3914
  msgid "Add Subscription"
3915
  msgstr ""
3916
 
3917
+ #: class/subscription.php:405
3918
  msgid "Add New Subscription"
3919
  msgstr ""
3920
 
3921
+ #: class/subscription.php:407
3922
  msgid "Edit Subscription"
3923
  msgstr ""
3924
 
3925
+ #: class/subscription.php:408
3926
  msgid "New Subscription"
3927
  msgstr ""
3928
 
3929
+ #: class/subscription.php:409 class/subscription.php:410
3930
  msgid "View Subscription"
3931
  msgstr ""
3932
 
3933
+ #: class/subscription.php:411
3934
  msgid "Search Subscription"
3935
  msgstr ""
3936
 
3937
+ #: class/subscription.php:412
3938
  msgid "No Subscription Found"
3939
  msgstr ""
3940
 
3941
+ #: class/subscription.php:413
3942
  msgid "No Subscription Found in Trash"
3943
  msgstr ""
3944
 
3945
+ #: class/subscription.php:414
3946
  msgid "Parent Subscription"
3947
  msgstr ""
3948
 
3949
+ #: class/subscription.php:751
3950
  msgid "Payment is complete"
3951
  msgstr ""
3952
 
3953
+ #: class/subscription.php:751
3954
  msgid "Congratulations, your payment has been completed!"
3955
  msgstr ""
3956
 
3957
+ #: class/subscription.php:755 class/subscription.php:759
3958
  msgid "Please buy a subscription pack to post"
3959
  msgstr ""
3960
 
3961
+ #: class/subscription.php:777
3962
  msgid "<p><i>You have a subscription pack activated. </i></p>"
3963
  msgstr ""
3964
 
3965
+ #: class/subscription.php:778
3966
  msgid "<p><i>Pack name: %s </i></p>"
3967
  msgstr ""
3968
 
3969
+ #: class/subscription.php:780
3970
  msgid "To cancel the pack, press the following cancel button"
3971
  msgstr ""
3972
 
3973
+ #: class/subscription.php:823
3974
  msgid "Day"
3975
  msgid_plural "Days"
3976
  msgstr[0] ""
3977
  msgstr[1] ""
3978
 
3979
+ #: class/subscription.php:824
3980
  msgid "Week"
3981
  msgid_plural "Weeks"
3982
  msgstr[0] ""
3983
  msgstr[1] ""
3984
 
3985
+ #: class/subscription.php:825
3986
  msgid "Month"
3987
  msgid_plural "Months"
3988
  msgstr[0] ""
3989
  msgstr[1] ""
3990
 
3991
+ #: class/subscription.php:826
3992
  msgid "Year"
3993
  msgid_plural "Years"
3994
  msgstr[0] ""
3995
  msgstr[1] ""
3996
 
3997
+ #: class/subscription.php:858
3998
  msgid "One time payment"
3999
  msgstr ""
4000
 
4001
+ #: class/subscription.php:865
4002
  msgid "Every"
4003
  msgstr ""
4004
 
4005
+ #: class/subscription.php:866
4006
  msgid "for"
4007
  msgstr ""
4008
 
4009
+ #: class/subscription.php:866
4010
  msgid "installments"
4011
  msgstr ""
4012
 
4013
+ #: class/subscription.php:872
4014
  msgid "Trial available for first %s %s"
4015
  msgstr ""
4016
 
4017
+ #: class/subscription.php:876
4018
  msgid "Buy Now"
4019
  msgstr ""
4020
 
4021
+ #: class/subscription.php:880
4022
  msgid "Sign Up"
4023
  msgstr ""
4024
 
4025
+ #: class/subscription.php:944
4026
  msgid "There is a <strong>%s</strong> charge to add a new post."
4027
  msgstr ""
4028
 
4029
+ #: class/subscription.php:960
4030
  msgid ""
4031
  "Your Subscription pack is exhausted. There is a <strong>%s</strong> charge "
4032
  "to add a new post."
4033
  msgstr ""
4034
 
4035
+ #: class/subscription.php:1005
4036
  msgid "You must <a href=\"%s\">purchase a pack</a> before posting"
4037
  msgstr ""
4038
 
4050
 
4051
  #: class/transactions-list-table.php:42
4052
  #: includes/class-list-table-subscribers.php:44
4053
+ #: templates/dashboard/posts.php:90 templates/dashboard.php:131
4054
  msgid "Status"
4055
  msgstr ""
4056
 
4114
  msgid "Caption"
4115
  msgstr ""
4116
 
4117
+ #: includes/class-acf.php:169
4118
  msgid "%s Detected"
4119
  msgstr ""
4120
 
4121
+ #: includes/class-acf.php:170
4122
  msgid ""
4123
  "Hey, looks like you have <strong>%s</strong> installed. What do you want to "
4124
  "do with WPUF?"
4125
  msgstr ""
4126
 
4127
+ #: includes/class-acf.php:171
4128
  msgid ""
4129
  "It will update compatibility option only, so existing custom fields data "
4130
  "format will not change."
4131
  msgstr ""
4132
 
4133
+ #: includes/class-acf.php:172
4134
  msgid ""
4135
  "It will update existing custom fields data to ACF format and update "
4136
  "compatibility option too."
4137
  msgstr ""
4138
 
4139
+ #: includes/class-acf.php:175
4140
  msgid "Compatible"
4141
  msgstr ""
4142
 
4143
+ #: includes/class-acf.php:176
4144
  msgid "Compatible & Migrate"
4145
  msgstr ""
4146
 
4147
+ #: includes/class-acf.php:177
4148
  msgid "No Thanks"
4149
  msgstr ""
4150
 
4231
 
4232
  #: includes/class-dokan-integration.php:34
4233
  #: includes/class-wc-vendors-integration.php:108
4234
+ #: templates/dashboard/dashboard.php:15 wpuf-functions.php:1814
4235
  msgid "Posts"
4236
  msgstr ""
4237
 
4257
  msgid "Select a post form that will show on the vendor dashboard."
4258
  msgstr ""
4259
 
4260
+ #: includes/class-field-manager.php:175
4261
  msgid "Custom Fields"
4262
  msgstr ""
4263
 
4264
+ #: includes/class-field-manager.php:196
4265
  msgid "Others"
4266
  msgstr ""
4267
 
4351
  "Please check your inbox!"
4352
  msgstr ""
4353
 
4354
+ #: includes/class-frontend-render-form.php:819
4355
  #: includes/free/class-login.php:445
4356
  msgid "Empty reCaptcha Field"
4357
  msgstr ""
4385
  msgstr ""
4386
 
4387
  #: includes/class-list-table-subscribers.php:137
4388
+ #: templates/dashboard/posts.php:149 templates/dashboard.php:237
4389
  msgid "Completed"
4390
  msgstr ""
4391
 
4429
  msgid "Someone has requested a password reset for the following account:"
4430
  msgstr ""
4431
 
4432
+ #: includes/class-login-widget.php:147 includes/free/class-login.php:820
4433
+ #: includes/free/class-login.php:901 includes/free/class-registration.php:285
4434
  msgid "Username: %s"
4435
  msgstr ""
4436
 
4437
+ #: includes/class-login-widget.php:148 includes/free/class-login.php:902
4438
  msgid "If this was a mistake, just ignore this email and nothing will happen."
4439
  msgstr ""
4440
 
4441
+ #: includes/class-login-widget.php:149 includes/free/class-login.php:903
4442
  msgid "To reset your password, visit the following address:"
4443
  msgstr ""
4444
 
4445
+ #: includes/class-login-widget.php:154 includes/free/class-login.php:914
4446
  msgid "[%s] Password Reset"
4447
  msgstr ""
4448
 
4996
  msgstr ""
4997
 
4998
  #: includes/fields/class-abstract-fields.php:406
4999
+ #: includes/fields/class-field-checkbox.php:71
5000
  #: includes/fields/class-field-radio.php:79
5001
  msgid "Show in inline list"
5002
  msgstr ""
5003
 
5004
  #: includes/fields/class-abstract-fields.php:416
5005
+ #: includes/fields/class-field-checkbox.php:81
5006
  #: includes/fields/class-field-radio.php:89
5007
  msgid "Show this option in an inline list"
5008
  msgstr ""
5033
 
5034
  #: includes/fields/class-field-column.php:74
5035
  #: includes/fields/class-field-recaptcha.php:151
5036
+ #: includes/fields/class-field-sectionbreak.php:59
5037
  msgid "Title of the section"
5038
  msgstr ""
5039
 
5141
  msgid "Section Break"
5142
  msgstr ""
5143
 
5144
+ #: includes/fields/class-field-sectionbreak.php:67
5145
  msgid "Some details text about the section"
5146
  msgstr ""
5147
 
5148
+ #: includes/fields/class-field-sectionbreak.php:84
5149
  msgid "Some description about this section"
5150
  msgstr ""
5151
 
5325
  msgid "Password reset is not allowed for this user"
5326
  msgstr ""
5327
 
5328
+ #: includes/free/class-login.php:738
 
 
 
 
 
 
 
 
5329
  msgid ""
5330
  "<strong>Your account is not active.</strong><br>Please check your email for "
5331
  "activation link. <br><a href=\"%s\">Click here</a> to resend the activation "
5332
  "link"
5333
  msgstr ""
5334
 
5335
+ #: includes/free/class-login.php:759 includes/free/class-login.php:784
5336
  msgid "Activation URL is not valid"
5337
  msgstr ""
5338
 
5339
+ #: includes/free/class-login.php:770
5340
  msgid "Invalid User activation url"
5341
  msgstr ""
5342
 
5343
+ #: includes/free/class-login.php:776
5344
  msgid "User already verified"
5345
  msgstr ""
5346
 
5347
+ #: includes/free/class-login.php:792 includes/free/class-login.php:856
5348
  msgid "Your account has been activated"
5349
  msgstr ""
5350
 
5351
+ #: includes/free/class-login.php:795
5352
  msgid ""
5353
  "Your account has been verified , but you can't login until manually "
5354
  "approved your account by an administrator."
5355
  msgstr ""
5356
 
5357
+ #: includes/free/class-login.php:818
5358
  msgid "[%s] Your username and password info"
5359
  msgstr ""
5360
 
5361
+ #: includes/free/class-login.php:821
5362
  msgid "To set your password, visit the following address:"
5363
  msgstr ""
5364
 
5365
+ #: includes/free/class-login.php:831
5366
  msgid "[%s] Account has been activated"
5367
  msgstr ""
5368
 
5369
+ #: includes/free/class-login.php:833
5370
  msgid "Hi %s,"
5371
  msgstr ""
5372
 
5373
+ #: includes/free/class-login.php:834
5374
  msgid "Congrats! Your account has been activated. To login visit the following url:"
5375
  msgstr ""
5376
 
5377
+ #: includes/free/class-login.php:836
5378
  msgid "Thanks"
5379
  msgstr ""
5380
 
5381
+ #: includes/free/class-login.php:899
5382
  msgid "Someone requested that the password be reset for the following account:"
5383
  msgstr ""
5384
 
5385
+ #: includes/free/class-login.php:920
5386
  msgid "The e-mail could not be sent."
5387
  msgstr ""
5388
 
5389
+ #: includes/free/class-login.php:920
5390
  msgid "Possible reason: your host may have disabled the mail() function."
5391
  msgstr ""
5392
 
6053
  msgid "Confirm New Password"
6054
  msgstr ""
6055
 
6056
+ #: templates/dashboard/posts.php:57
6057
  msgid "You have created <span>%d</span> %s"
6058
  msgstr ""
6059
 
6060
+ #: templates/dashboard/posts.php:118 templates/dashboard.php:159
6061
  msgid "No Image"
6062
  msgstr ""
6063
 
6064
+ #: templates/dashboard/posts.php:132 templates/dashboard.php:173
6065
  msgid "Permalink to %s"
6066
  msgstr ""
6067
 
6068
+ #: templates/dashboard/posts.php:145 templates/dashboard.php:233
6069
  msgid "Not Applicable"
6070
  msgstr ""
6071
 
6072
+ #: templates/dashboard/posts.php:147 templates/dashboard.php:235
6073
  msgid "Pay Now"
6074
  msgstr ""
6075
 
6076
+ #: templates/dashboard/posts.php:185 templates/dashboard.php:276
6077
  msgid "Are you sure to delete?"
6078
  msgstr ""
6079
 
6080
+ #: templates/dashboard/posts.php:206 templates/dashboard.php:296
6081
  msgid "&laquo;"
6082
  msgstr ""
6083
 
6084
+ #: templates/dashboard/posts.php:207 templates/dashboard.php:297
6085
  msgid "&raquo;"
6086
  msgstr ""
6087
 
6088
+ #: templates/dashboard/posts.php:230 templates/dashboard.php:319
6089
  msgid "No %s found"
6090
  msgstr ""
6091
 
6101
  msgid "Subscription Expired!"
6102
  msgstr ""
6103
 
6104
+ #: templates/dashboard/subscription.php:60
6105
+ msgid "To cancel the pack, press the following cancel button."
6106
  msgstr ""
6107
 
6108
  #: templates/dashboard.php:4
6195
  msgid "Private"
6196
  msgstr ""
6197
 
6198
+ #: wpuf-functions.php:210 wpuf-functions.php:1832
6199
  msgid "-- select --"
6200
  msgstr ""
6201
 
6235
  msgid "Directions »"
6236
  msgstr ""
6237
 
6238
+ #: wpuf-functions.php:1815
6239
  msgid "Edit Profile"
6240
  msgstr ""
6241
 
6242
+ #: wpuf-functions.php:1944
6243
  msgid "United Arab Emirates Dirham"
6244
  msgstr ""
6245
 
6246
+ #: wpuf-functions.php:1945
6247
  msgid "Australian Dollars"
6248
  msgstr ""
6249
 
6250
+ #: wpuf-functions.php:1946
6251
  msgid "Argentine Peso"
6252
  msgstr ""
6253
 
6254
+ #: wpuf-functions.php:1947
6255
  msgid "Bangladeshi Taka"
6256
  msgstr ""
6257
 
6258
+ #: wpuf-functions.php:1948
6259
  msgid "Brazilian Real"
6260
  msgstr ""
6261
 
6262
+ #: wpuf-functions.php:1949
6263
  msgid "Bulgarian Lev"
6264
  msgstr ""
6265
 
6266
+ #: wpuf-functions.php:1950
6267
  msgid "Canadian Dollars"
6268
  msgstr ""
6269
 
6270
+ #: wpuf-functions.php:1951
6271
  msgid "Chilean Peso"
6272
  msgstr ""
6273
 
6274
+ #: wpuf-functions.php:1952
6275
  msgid "Chinese Yuan"
6276
  msgstr ""
6277
 
6278
+ #: wpuf-functions.php:1953
6279
  msgid "Colombian Peso"
6280
  msgstr ""
6281
 
6282
+ #: wpuf-functions.php:1954
6283
  msgid "Czech Koruna"
6284
  msgstr ""
6285
 
6286
+ #: wpuf-functions.php:1955
6287
  msgid "Danish Krone"
6288
  msgstr ""
6289
 
6290
+ #: wpuf-functions.php:1956
6291
  msgid "Dominican Peso"
6292
  msgstr ""
6293
 
6294
+ #: wpuf-functions.php:1957
6295
  msgid "Algerian Dinar"
6296
  msgstr ""
6297
 
6298
+ #: wpuf-functions.php:1958
6299
  msgid "Euros"
6300
  msgstr ""
6301
 
6302
+ #: wpuf-functions.php:1959
6303
  msgid "Hong Kong Dollar"
6304
  msgstr ""
6305
 
6306
+ #: wpuf-functions.php:1960
6307
  msgid "Croatia kuna"
6308
  msgstr ""
6309
 
6310
+ #: wpuf-functions.php:1961
6311
  msgid "Hungarian Forint"
6312
  msgstr ""
6313
 
6314
+ #: wpuf-functions.php:1962
6315
  msgid "Icelandic krona"
6316
  msgstr ""
6317
 
6318
+ #: wpuf-functions.php:1963
6319
  msgid "Indonesia Rupiah"
6320
  msgstr ""
6321
 
6322
+ #: wpuf-functions.php:1964
6323
  msgid "Indian Rupee"
6324
  msgstr ""
6325
 
6326
+ #: wpuf-functions.php:1965
6327
  msgid "Nepali Rupee"
6328
  msgstr ""
6329
 
6330
+ #: wpuf-functions.php:1966
6331
  msgid "Israeli Shekel"
6332
  msgstr ""
6333
 
6334
+ #: wpuf-functions.php:1967
6335
  msgid "Japanese Yen"
6336
  msgstr ""
6337
 
6338
+ #: wpuf-functions.php:1968
6339
  msgid "Lao Kip"
6340
  msgstr ""
6341
 
6342
+ #: wpuf-functions.php:1969
6343
  msgid "South Korean Won"
6344
  msgstr ""
6345
 
6346
+ #: wpuf-functions.php:1970
6347
  msgid "Malaysian Ringgits"
6348
  msgstr ""
6349
 
6350
+ #: wpuf-functions.php:1971
6351
  msgid "Mexican Peso"
6352
  msgstr ""
6353
 
6354
+ #: wpuf-functions.php:1972
6355
  msgid "Nigerian Naira"
6356
  msgstr ""
6357
 
6358
+ #: wpuf-functions.php:1973
6359
  msgid "Norwegian Krone"
6360
  msgstr ""
6361
 
6362
+ #: wpuf-functions.php:1974
6363
  msgid "New Zealand Dollar"
6364
  msgstr ""
6365
 
6366
+ #: wpuf-functions.php:1975
6367
  msgid "Omani Rial"
6368
  msgstr ""
6369
 
6370
+ #: wpuf-functions.php:1976
6371
  msgid "Iranian Rial"
6372
  msgstr ""
6373
 
6374
+ #: wpuf-functions.php:1977
6375
  msgid "Pakistani Rupee"
6376
  msgstr ""
6377
 
6378
+ #: wpuf-functions.php:1978
6379
  msgid "Paraguayan Guaraní"
6380
  msgstr ""
6381
 
6382
+ #: wpuf-functions.php:1979
6383
  msgid "Philippine Pesos"
6384
  msgstr ""
6385
 
6386
+ #: wpuf-functions.php:1980
6387
  msgid "Polish Zloty"
6388
  msgstr ""
6389
 
6390
+ #: wpuf-functions.php:1981
6391
  msgid "Pounds Sterling"
6392
  msgstr ""
6393
 
6394
+ #: wpuf-functions.php:1982
6395
  msgid "Romanian Leu"
6396
  msgstr ""
6397
 
6398
+ #: wpuf-functions.php:1983
6399
  msgid "Russian Ruble"
6400
  msgstr ""
6401
 
6402
+ #: wpuf-functions.php:1984
6403
  msgid "Saudi Riyal"
6404
  msgstr ""
6405
 
6406
+ #: wpuf-functions.php:1985
6407
  msgid "Singapore Dollar"
6408
  msgstr ""
6409
 
6410
+ #: wpuf-functions.php:1986
6411
  msgid "South African rand"
6412
  msgstr ""
6413
 
6414
+ #: wpuf-functions.php:1987
6415
  msgid "Swedish Krona"
6416
  msgstr ""
6417
 
6418
+ #: wpuf-functions.php:1988
6419
  msgid "Swiss Franc"
6420
  msgstr ""
6421
 
6422
+ #: wpuf-functions.php:1989
6423
  msgid "Taiwan New Dollars"
6424
  msgstr ""
6425
 
6426
+ #: wpuf-functions.php:1990
6427
  msgid "Thai Baht"
6428
  msgstr ""
6429
 
6430
+ #: wpuf-functions.php:1991
6431
  msgid "Turkish Lira"
6432
  msgstr ""
6433
 
6434
+ #: wpuf-functions.php:1992
6435
  msgid "US Dollar"
6436
  msgstr ""
6437
 
6438
+ #: wpuf-functions.php:1993
6439
  msgid "Vietnamese Dong"
6440
  msgstr ""
6441
 
6442
+ #: wpuf-functions.php:1994
6443
  msgid "Egyptian Pound"
6444
  msgstr ""
6445
 
6446
+ #: wpuf-functions.php:1995
6447
  msgid "Jordanian dinar"
6448
  msgstr ""
6449
 
6450
+ #: wpuf-functions.php:2868
6451
  msgid "None"
6452
  msgstr ""
6453
 
lib/class.settings-api.php CHANGED
@@ -102,7 +102,7 @@ class WeDevs_Settings_API {
102
  //register settings sections
103
  foreach ( $this->settings_sections as $section ) {
104
  if ( false == get_option( $section['id'] ) ) {
105
- add_option( $section['id'] );
106
  }
107
 
108
  if ( isset($section['desc']) && !empty($section['desc']) ) {
102
  //register settings sections
103
  foreach ( $this->settings_sections as $section ) {
104
  if ( false == get_option( $section['id'] ) ) {
105
+ add_option( $section['id'], array() );
106
  }
107
 
108
  if ( isset($section['desc']) && !empty($section['desc']) ) {
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
5
  Requires at least: 4.0
6
- Tested up to: 5.3.2
7
  Requires PHP: 5.6
8
- Stable tag: 3.1.18
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -264,6 +264,19 @@ redirected to the edit page with that post id. Then you'll see the edit post for
264
 
265
  == Changelog ==
266
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  = v3.1.18 (13 March, 2020) =
268
  * **Improvement:** Hide post edit option when subscription is expired
269
  * **Improvement:** Check files to prevent duplicity in media upload
3
  Donate link: https://tareq.co/donate/
4
  Tags: Forms, registration, profile-builder, login, membership
5
  Requires at least: 4.0
6
+ Tested up to: 5.4
7
  Requires PHP: 5.6
8
+ Stable tag: 3.2.0
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
264
 
265
  == Changelog ==
266
 
267
+ = v3.2.0 (14 April, 2020) =
268
+ * **Improvement:** Import forms system
269
+ * **Improvement:** Password reset system
270
+ * **Improvement:** Updated url validation regex to support modern tlds
271
+ * **Fix** Export WPUF forms individually from admin tools page
272
+ * **Fix** Subscription cycle label translation issue
273
+ * **Fix** ACF integration for checkbox fields
274
+ * **Fix** Illegal string offset warning while updating settings
275
+ * **Fix** Conditional logic for Section Break field
276
+ * **Fix** Subscriptions cannot be deleted from backend
277
+ * **Fix** A regression regarding saving checkbox data
278
+ * **Fix** Default value of multi-select fields is not showing
279
+
280
  = v3.1.18 (13 March, 2020) =
281
  * **Improvement:** Hide post edit option when subscription is expired
282
  * **Improvement:** Check files to prevent duplicity in media upload
templates/dashboard/posts.php CHANGED
@@ -8,10 +8,10 @@ $userdata = get_userdata( $userdata->ID ); //wp 3.3 fix
8
  global $post;
9
 
10
  $pagenum = isset( $_GET['pagenum'] ) ? intval( wp_unslash( $_GET['pagenum'] ) ) : 1;
11
- $action = isset( $_REQUEST['action'] ) ? sanitize_key( wp_unslash( $_REQUEST['action'] ) ) : '';
12
  // delete post
13
  if ( $action == 'del' ) {
14
- $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
15
 
16
  if ( isset( $nonce ) && !wp_verify_nonce( $nonce, 'wpuf_del' ) ) {
17
  return ;
@@ -27,6 +27,7 @@ if ( $action == 'del' ) {
27
  //redirect
28
  $redirect = add_query_arg( [ 'section' => 'posts', 'msg' => 'deleted'], get_permalink() );
29
  wp_redirect( $redirect );
 
30
  } else {
31
  echo wp_kses_post( '<div class="error">' . __( 'You are not the post author. Cheeting huh!', 'wp-user-frontend' ) . '</div>' );
32
  }
8
  global $post;
9
 
10
  $pagenum = isset( $_GET['pagenum'] ) ? intval( wp_unslash( $_GET['pagenum'] ) ) : 1;
11
+ $action = isset( $_REQUEST['action'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['action'] ) ) : '';
12
  // delete post
13
  if ( $action == 'del' ) {
14
+ $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
15
 
16
  if ( isset( $nonce ) && !wp_verify_nonce( $nonce, 'wpuf_del' ) ) {
17
  return ;
27
  //redirect
28
  $redirect = add_query_arg( [ 'section' => 'posts', 'msg' => 'deleted'], get_permalink() );
29
  wp_redirect( $redirect );
30
+ exit;
31
  } else {
32
  echo wp_kses_post( '<div class="error">' . __( 'You are not the post author. Cheeting huh!', 'wp-user-frontend' ) . '</div>' );
33
  }
templates/dashboard/subscription.php CHANGED
@@ -55,10 +55,9 @@
55
  $user_id = get_current_user_id();
56
  $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" );
57
 
58
- $payment_gateway = strtolower( $payment_gateway );
59
-
60
- echo wp_kses_post( '<br />' );
61
- esc_html_e( '<p><i>To cancel the pack, press the following cancel button.</i></p>', 'wp-user-frontend' ); ?>
62
  <form action="" method="post" style="text-align: center;">
63
  <?php wp_nonce_field( 'wpuf-sub-cancel' ); ?>
64
  <input type="hidden" name="gateway" value="<?php echo esc_attr( $payment_gateway ); ?>">
55
  $user_id = get_current_user_id();
56
  $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" );
57
 
58
+ $payment_gateway = strtolower( $payment_gateway ); ?>
59
+ <br>
60
+ <p><i><?php esc_html_e( 'To cancel the pack, press the following cancel button.', 'wp-user-frontend' ); ?></i></p>
 
61
  <form action="" method="post" style="text-align: center;">
62
  <?php wp_nonce_field( 'wpuf-sub-cancel' ); ?>
63
  <input type="hidden" name="gateway" value="<?php echo esc_attr( $payment_gateway ); ?>">
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit76c3dcdf69aa43c6f108999da9483a96::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitf37be1a109746ed1820c3dbc35000967::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit76c3dcdf69aa43c6f108999da9483a96
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit76c3dcdf69aa43c6f108999da9483a96
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit76c3dcdf69aa43c6f108999da9483a96', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit76c3dcdf69aa43c6f108999da9483a96', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit76c3dcdf69aa43c6f108999da9483a96::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitf37be1a109746ed1820c3dbc35000967
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitf37be1a109746ed1820c3dbc35000967', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitf37be1a109746ed1820c3dbc35000967', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitf37be1a109746ed1820c3dbc35000967::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit76c3dcdf69aa43c6f108999da9483a96
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
@@ -121,9 +121,9 @@ class ComposerStaticInit76c3dcdf69aa43c6f108999da9483a96
121
  public static function getInitializer(ClassLoader $loader)
122
  {
123
  return \Closure::bind(function () use ($loader) {
124
- $loader->prefixLengthsPsr4 = ComposerStaticInit76c3dcdf69aa43c6f108999da9483a96::$prefixLengthsPsr4;
125
- $loader->prefixDirsPsr4 = ComposerStaticInit76c3dcdf69aa43c6f108999da9483a96::$prefixDirsPsr4;
126
- $loader->classMap = ComposerStaticInit76c3dcdf69aa43c6f108999da9483a96::$classMap;
127
 
128
  }, null, ClassLoader::class);
129
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitf37be1a109746ed1820c3dbc35000967
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
121
  public static function getInitializer(ClassLoader $loader)
122
  {
123
  return \Closure::bind(function () use ($loader) {
124
+ $loader->prefixLengthsPsr4 = ComposerStaticInitf37be1a109746ed1820c3dbc35000967::$prefixLengthsPsr4;
125
+ $loader->prefixDirsPsr4 = ComposerStaticInitf37be1a109746ed1820c3dbc35000967::$prefixDirsPsr4;
126
+ $loader->classMap = ComposerStaticInitf37be1a109746ed1820c3dbc35000967::$classMap;
127
 
128
  }, null, ClassLoader::class);
129
  }
wpuf-functions.php CHANGED
@@ -1307,7 +1307,7 @@ function wpuf_get_attachment_id_from_url( $attachment_url = '' ) {
1307
  function wpufe_ajax_tag_search() {
1308
  global $wpdb;
1309
 
1310
- $taxonomy = isset( $_GET['tax'] ) ? sanitize_key( wp_unslash( $_GET['tax'] ) ) : '';
1311
  $tax = get_taxonomy( $taxonomy );
1312
 
1313
  if ( !$tax ) {
@@ -1569,7 +1569,9 @@ function wpuf_get_child_cats() {
1569
  $terms[$key] = (array) $term;
1570
  }
1571
  }
1572
- // $result .= WPUF_Render_Form::init()->taxnomy_select( '', $field_attr );
 
 
1573
  $result .= taxnomy_select( '', $field_attr );
1574
 
1575
  } else {
@@ -1580,12 +1582,17 @@ function wpuf_get_child_cats() {
1580
 
1581
  function taxnomy_select( $terms, $attr ) {
1582
  $selected = $terms ? $terms : '';
1583
- $required = sprintf( 'data-required="%s" data-type="select"', $attr['required'] );
1584
  $taxonomy = $attr['name'];
1585
- $class = ' wpuf_' . $attr['name'] . '_' . $selected;
1586
  $exclude_type = isset( $attr['exclude_type'] ) ? $attr['exclude_type'] : 'exclude';
1587
  $exclude = isset( $attr['exclude'] ) ? $attr['exclude'] : '';
1588
 
 
 
 
 
 
 
1589
  if ( $exclude_type == 'child_of' && !empty( $exclude ) ) {
1590
  $exclude = $exclude[0];
1591
  }
@@ -1611,7 +1618,7 @@ function taxnomy_select( $terms, $attr ) {
1611
 
1612
  $select = wp_dropdown_categories( $tax_args );
1613
 
1614
- echo str_replace( '<select', '<select ' . $required, $select ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
1615
  $attr = [
1616
  'required' => $attr['required'],
1617
  'name' => $attr['name'],
@@ -3025,6 +3032,10 @@ function wpuf_descriptive_text( $args ) {
3025
  function wpuf_update_option( $option, $section, $value ) {
3026
  $options = get_option( $section );
3027
 
 
 
 
 
3028
  $options[$option] = $value;
3029
 
3030
  update_option( $section, $options );
1307
  function wpufe_ajax_tag_search() {
1308
  global $wpdb;
1309
 
1310
+ $taxonomy = isset( $_GET['tax'] ) ? sanitize_text_field( wp_unslash( $_GET['tax'] ) ) : '';
1311
  $tax = get_taxonomy( $taxonomy );
1312
 
1313
  if ( !$tax ) {
1569
  $terms[$key] = (array) $term;
1570
  }
1571
  }
1572
+
1573
+ $field_attr[ 'form_id' ] = isset( $_POST['form_id'] ) ? absint( $_POST['form_id'] ) : 0;
1574
+
1575
  $result .= taxnomy_select( '', $field_attr );
1576
 
1577
  } else {
1582
 
1583
  function taxnomy_select( $terms, $attr ) {
1584
  $selected = $terms ? $terms : '';
 
1585
  $taxonomy = $attr['name'];
1586
+ $class = ' wpuf_' . $attr['name'] . '_' . $attr['form_id'];
1587
  $exclude_type = isset( $attr['exclude_type'] ) ? $attr['exclude_type'] : 'exclude';
1588
  $exclude = isset( $attr['exclude'] ) ? $attr['exclude'] : '';
1589
 
1590
+ $dataset = sprintf(
1591
+ 'data-required="%s" data-type="select" data-form-id="%d"',
1592
+ $attr['required'],
1593
+ $attr['form_id']
1594
+ );
1595
+
1596
  if ( $exclude_type == 'child_of' && !empty( $exclude ) ) {
1597
  $exclude = $exclude[0];
1598
  }
1618
 
1619
  $select = wp_dropdown_categories( $tax_args );
1620
 
1621
+ echo str_replace( '<select', '<select ' . $dataset, $select ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
1622
  $attr = [
1623
  'required' => $attr['required'],
1624
  'name' => $attr['name'],
3032
  function wpuf_update_option( $option, $section, $value ) {
3033
  $options = get_option( $section );
3034
 
3035
+ if ( ! is_array( $options ) ) {
3036
+ $options = array();
3037
+ }
3038
+
3039
  $options[$option] = $value;
3040
 
3041
  update_option( $section, $options );
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: Tareq Hasan
7
- Version: 3.1.18
8
  Author URI: https://tareq.co
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.1.18' );
16
  define( 'WPUF_FILE', __FILE__ );
17
  define( 'WPUF_ROOT', __DIR__ );
18
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
@@ -58,7 +58,7 @@ final class WP_User_Frontend {
58
  *
59
  * @var string
60
  */
61
- private $min_php = '5.4.0';
62
 
63
  /**
64
  * Fire up the plugin
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: Tareq Hasan
7
+ Version: 3.2.0
8
  Author URI: https://tareq.co
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.2.0' );
16
  define( 'WPUF_FILE', __FILE__ );
17
  define( 'WPUF_ROOT', __DIR__ );
18
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
58
  *
59
  * @var string
60
  */
61
+ private $min_php = '5.6';
62
 
63
  /**
64
  * Fire up the plugin