User Registration – Custom Registration Form, Login Form And User Profile For WordPress - Version 1.0.3

Version Description

  • 21/08/2017 =
  • Form duplicate option
  • Auto login after registration feature
  • Added some filter for addon
Download this release

Release Info

Developer wpeverest
Plugin Icon 128x128 User Registration – Custom Registration Form, Login Form And User Profile For WordPress
Version 1.0.3
Comparing to
See all releases

Code changes from version 1.0.2 to 1.0.3

assets/js/frontend/user-registration.js CHANGED
@@ -139,6 +139,9 @@
139
  $this[ 0 ].reset();
140
  $('.user-registration-password-hint').remove();
141
  $('.user-registration-password-strength').remove();
 
 
 
142
 
143
  }
144
  } catch ( e ) {
139
  $this[ 0 ].reset();
140
  $('.user-registration-password-hint').remove();
141
  $('.user-registration-password-strength').remove();
142
+ if(typeof response.data.auto_login !== 'undefined' && response.data.auto_login) {
143
+ location.reload();
144
+ }
145
 
146
  }
147
  } catch ( e ) {
assets/js/frontend/user-registration.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var r=user_registration_params.ursL10n;e.fn.ur_form_submission=function(){return this.each(function(){var t=e(this),a=[],n=user_registration_params.form_required_fields,s={init:function(){},get_form_data:function(){var r=this,a=[],n=t.closest(".ur-frontend-form").find(".ur-form-grid").find(".ur-frontend-field");return e.each(n,function(){var t=r.get_fieldwise_data(e(this));a.push(t)}),a},get_fieldwise_data:function(r){var t={},s=r.get(0).tagName.toLowerCase();switch(t.value="",s){case"input":case"select":case"textarea":t.value=r.val()}return t.field_type=r.attr("id").replace("ur-input-type-",""),r.attr("data-label")!==undefined?t.label=r.attr("data-label"):"label"===r.prev().get(0).tagName.toLowerCase()?t.label=r.prev().text():t.label=t.field_type,r.attr("name")!==undefined&&""!==r.attr("name")?t.field_name=r.attr("name"):t.field_name="",e.inArray(t.field_name,e.trim(n))>=0&&a.push(t.field_name),t},show_message:function(r,t,a){a.find(".ur-message").remove();var n=e('<div class="ur-message user-registration-'+t+'" id="ur-submit-message-node"/>');n.append(r),a.append(n)}},i={init:function(){this.form_submit_event()},form_submit_event:function(){t.on("submit",function(a){a.preventDefault();var n;try{n=JSON.stringify(s.get_form_data())}catch(f){n=""}var i=0;1===e(this).closest("form").find('input[name="ur-user-form-id"]').length&&(i=e(this).closest("form").find('input[name="ur-user-form-id"]').val());var o="0";1===e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').length&&(o=e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').val());var u={action:"user_registration_user_form_submit",security:user_registration_params.user_registration_form_data_save,form_data:n,form_id:i,ur_frontend_form_nonce:o};if("undefined"!=typeof ur_google_recaptcha_code&&"1"===ur_google_recaptcha_code.is_captcha_enable){if(0===t.find("#g-recaptcha-response").val().length)return void s.show_message("<p>"+r.captcha_error+"</p>","error",t);grecaptcha.reset()}t.find(".ur-submit-button").find("span").addClass("ur-front-spinner"),e.ajax({url:user_registration_params.ajax_url,data:u,type:"POST",beforeSend:function(){},complete:function(a){t.find(".ur-submit-button").find("span").removeClass("ur-front-spinner");var n=e('<ul class=""/>'),i="error";try{var o=e.parseJSON(a.responseText);"undefined"!=typeof o.success&&!0===o.success&&(i="message"),"object"==typeof o.data.message&&e.each(o.data.message,function(){e("<li/>").text(this).appendTo(n)}),"message"===i&&(n.append("<li>"+r.user_successfully_saved+"</li>"),t[0].reset(),e(".user-registration-password-hint").remove(),e(".user-registration-password-strength").remove())}catch(u){n.append("<li>"+u.message+"</li>")}s.show_message(n,i,t)}})})}};s.init(),i.init()})},e(function(){e(".ur-frontend-form form.register").ur_form_submission()})}(jQuery);var google_recaptcha_user_registration,onloadURCallback=function(){google_recaptcha_user_registration=grecaptcha.render("node_recaptcha",{sitekey:ur_google_recaptcha_code.site_key,theme:"light",style:"transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;"})};
1
+ !function(e){var r=user_registration_params.ursL10n;e.fn.ur_form_submission=function(){return this.each(function(){var t=e(this),a=[],n=user_registration_params.form_required_fields,s={init:function(){},get_form_data:function(){var r=this,a=[],n=t.closest(".ur-frontend-form").find(".ur-form-grid").find(".ur-frontend-field");return e.each(n,function(){var t=r.get_fieldwise_data(e(this));a.push(t)}),a},get_fieldwise_data:function(r){var t={},s=r.get(0).tagName.toLowerCase();switch(t.value="",s){case"input":case"select":case"textarea":t.value=r.val()}return t.field_type=r.attr("id").replace("ur-input-type-",""),r.attr("data-label")!==undefined?t.label=r.attr("data-label"):"label"===r.prev().get(0).tagName.toLowerCase()?t.label=r.prev().text():t.label=t.field_type,r.attr("name")!==undefined&&""!==r.attr("name")?t.field_name=r.attr("name"):t.field_name="",e.inArray(t.field_name,e.trim(n))>=0&&a.push(t.field_name),t},show_message:function(r,t,a){a.find(".ur-message").remove();var n=e('<div class="ur-message user-registration-'+t+'" id="ur-submit-message-node"/>');n.append(r),a.append(n)}},i={init:function(){this.form_submit_event()},form_submit_event:function(){t.on("submit",function(a){a.preventDefault();var n;try{n=JSON.stringify(s.get_form_data())}catch(f){n=""}var i=0;1===e(this).closest("form").find('input[name="ur-user-form-id"]').length&&(i=e(this).closest("form").find('input[name="ur-user-form-id"]').val());var o="0";1===e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').length&&(o=e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').val());var u={action:"user_registration_user_form_submit",security:user_registration_params.user_registration_form_data_save,form_data:n,form_id:i,ur_frontend_form_nonce:o};if("undefined"!=typeof ur_google_recaptcha_code&&"1"===ur_google_recaptcha_code.is_captcha_enable){if(0===t.find("#g-recaptcha-response").val().length)return void s.show_message("<p>"+r.captcha_error+"</p>","error",t);grecaptcha.reset()}t.find(".ur-submit-button").find("span").addClass("ur-front-spinner"),e.ajax({url:user_registration_params.ajax_url,data:u,type:"POST",beforeSend:function(){},complete:function(a){t.find(".ur-submit-button").find("span").removeClass("ur-front-spinner");var n=e('<ul class=""/>'),i="error";try{var o=e.parseJSON(a.responseText);"undefined"!=typeof o.success&&!0===o.success&&(i="message"),"object"==typeof o.data.message&&e.each(o.data.message,function(){e("<li/>").text(this).appendTo(n)}),"message"===i&&(n.append("<li>"+r.user_successfully_saved+"</li>"),t[0].reset(),e(".user-registration-password-hint").remove(),e(".user-registration-password-strength").remove(),"undefined"!=typeof o.data.auto_login&&o.data.auto_login&&location.reload())}catch(u){n.append("<li>"+u.message+"</li>")}s.show_message(n,i,t)}})})}};s.init(),i.init()})},e(function(){e(".ur-frontend-form form.register").ur_form_submission()})}(jQuery);var google_recaptcha_user_registration,onloadURCallback=function(){google_recaptcha_user_registration=grecaptcha.render("node_recaptcha",{sitekey:ur_google_recaptcha_code.site_key,theme:"light",style:"transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;"})};
includes/admin/class-ur-admin-menus.php CHANGED
@@ -51,6 +51,29 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
51
  if ( isset( $_GET['empty_trash'] ) ) {
52
  $this->empty_trash();
53
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  }
55
  }
56
 
@@ -95,6 +118,74 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
95
  exit();
96
  }
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  /**
99
  * Bulk actions.
100
  */
51
  if ( isset( $_GET['empty_trash'] ) ) {
52
  $this->empty_trash();
53
  }
54
+
55
+ $action = isset( $_GET['action'] ) ? sanitize_text_field( $_GET['action'] ) : '';
56
+
57
+ $nonce = isset( $_GET['nonce'] ) ? sanitize_text_field( $_GET['nonce'] ) : '';
58
+
59
+ $form_id = isset( $_GET['form'] ) && is_numeric( $_GET['form'] ) ? $_GET['form'] : '';
60
+
61
+ if ( ! empty( $action ) && ! empty( $nonce ) && ! empty( $form_id ) ) {
62
+
63
+ $flag = wp_verify_nonce( $nonce, 'user_registration_form_duplicate' . $form_id );
64
+
65
+ if ( $flag == true && ! is_wp_error( $flag ) ) {
66
+
67
+ if ( 'duplicate' === $action ) {
68
+
69
+ $this->duplicate( $form_id );
70
+
71
+ }
72
+
73
+ }
74
+
75
+
76
+ }
77
  }
78
  }
79
 
118
  exit();
119
  }
120
 
121
+ /**
122
+ * Duplicate form
123
+ */
124
+ private function duplicate( $form_id ) {
125
+ $post = get_post( $form_id );
126
+ $current_user = wp_get_current_user();
127
+ $new_post_author = $current_user->ID;
128
+
129
+ /*
130
+ * if post data exists, create the post duplicate
131
+ */
132
+ if ( isset( $post ) && $post != null ) {
133
+
134
+ if('publish' !== $post->post_status){
135
+
136
+ return false;
137
+ }
138
+
139
+ /*
140
+ * new post data array
141
+ */
142
+ $args = array(
143
+ 'comment_status' => $post->comment_status,
144
+ 'ping_status' => $post->ping_status,
145
+ 'post_author' => $new_post_author,
146
+ 'post_content' => $post->post_content,
147
+ 'post_excerpt' => $post->post_excerpt,
148
+ 'post_name' => $post->post_name,
149
+ 'post_parent' => $post->post_parent,
150
+ 'post_password' => $post->post_password,
151
+ 'post_status' => $post->post_status,
152
+ 'post_title' => __( 'Copy of ', 'user-registration' ) . $post->post_title,
153
+ 'post_type' => $post->post_type,
154
+ 'to_ping' => $post->to_ping,
155
+ 'menu_order' => $post->menu_order
156
+ );
157
+
158
+ /*
159
+ * insert the post by wp_insert_post() function
160
+ */
161
+ $new_post_id = wp_insert_post( $args );
162
+
163
+ /*
164
+ * duplicate all post meta just in two SQL queries
165
+ */
166
+ global $wpdb;
167
+ $post_meta_infos = $wpdb->get_results($wpdb->prepare( "SELECT meta_key, meta_value FROM {$wpdb->postmeta} WHERE post_id = %d",$form_id));
168
+
169
+ if (count($post_meta_infos)!=0) {
170
+ $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
171
+ foreach ($post_meta_infos as $meta_info) {
172
+ $meta_key = $meta_info->meta_key;
173
+ if( $meta_key == '_wp_old_slug' ) continue;
174
+ $meta_value = addslashes($meta_info->meta_value);
175
+ $sql_query_sel[]= "SELECT $new_post_id, '$meta_key', '$meta_value'";
176
+ }
177
+ $sql_query.= implode(" UNION ALL ", $sql_query_sel);
178
+ $wpdb->query($sql_query);
179
+ }
180
+
181
+ /*
182
+ * finally, redirect to the edit post screen for the new draft
183
+ */
184
+ wp_redirect( admin_url( 'admin.php?page=add-new-registration&edit-registration=' . $new_post_id ) );
185
+ exit;
186
+ }
187
+ }
188
+
189
  /**
190
  * Bulk actions.
191
  */
includes/admin/class-ur-admin-settings.php CHANGED
@@ -215,6 +215,9 @@ class UR_Admin_Settings {
215
  if ( ! isset( $value['id'] ) ) {
216
  $value['id'] = '';
217
  }
 
 
 
218
  if ( ! isset( $value['title'] ) ) {
219
  $value['title'] = isset( $value['name'] ) ? $value['name'] : '';
220
  }
@@ -285,7 +288,7 @@ class UR_Admin_Settings {
285
  case 'password' :
286
  $option_value = self::get_option( $value['id'], $value['default'] );
287
 
288
- ?><tr valign="top">
289
  <th scope="row" class="titledesc">
290
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
291
  <?php echo $tooltip_html; ?>
@@ -309,7 +312,7 @@ class UR_Admin_Settings {
309
  case 'color' :
310
  $option_value = self::get_option( $value['id'], $value['default'] );
311
 
312
- ?><tr valign="top">
313
  <th scope="row" class="titledesc">
314
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
315
  <?php echo $tooltip_html; ?>
@@ -337,7 +340,7 @@ class UR_Admin_Settings {
337
 
338
  $option_value = self::get_option( $value['id'], $value['default'] );
339
 
340
- ?><tr valign="top">
341
  <th scope="row" class="titledesc">
342
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
343
  <?php echo $tooltip_html; ?>
@@ -363,7 +366,7 @@ class UR_Admin_Settings {
363
 
364
  $option_value = self::get_option( $value['id'], $value['default'] );
365
 
366
- ?><tr valign="top">
367
  <th scope="row" class="titledesc">
368
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
369
  <?php echo $tooltip_html; ?>
@@ -402,7 +405,7 @@ class UR_Admin_Settings {
402
 
403
  $option_value = self::get_option( $value['id'], $value['default'] );
404
 
405
- ?><tr valign="top">
406
  <th scope="row" class="titledesc">
407
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
408
  <?php echo $tooltip_html; ?>
@@ -458,7 +461,7 @@ class UR_Admin_Settings {
458
 
459
  if ( ! isset( $value['checkboxgroup'] ) || 'start' == $value['checkboxgroup'] ) {
460
  ?>
461
- <tr valign="top" class="<?php echo esc_attr( implode( ' ', $visbility_class ) ); ?>">
462
  <th scope="row" class="titledesc"><?php echo esc_html( $value['title'] ) ?></th>
463
  <td class="forminp forminp-checkbox">
464
  <fieldset>
@@ -521,7 +524,7 @@ class UR_Admin_Settings {
521
  }
522
 
523
 
524
- ?><tr valign="top" class="single_select_page" <?php echo isset($value['display']) && $value['display']==='none' ? 'style="display:none"':'' ?>>
525
  <th scope="row" class="titledesc"><?php echo esc_html( $value['title'] ) ?> <?php echo $tooltip_html; ?></th>
526
  <td class="forminp">
527
  <?php echo str_replace( ' id=', " data-placeholder='" . esc_attr__( 'Select a page&hellip;', 'user-registration' ) . "' style='" . $value['css'] . "' class='" . $value['class'] . "' id=", wp_dropdown_pages( $args ) ); ?> <?php echo $description; ?>
215
  if ( ! isset( $value['id'] ) ) {
216
  $value['id'] = '';
217
  }
218
+ if ( ! isset( $value['row_class'] ) ) {
219
+ $value['row_class'] = '';
220
+ }
221
  if ( ! isset( $value['title'] ) ) {
222
  $value['title'] = isset( $value['name'] ) ? $value['name'] : '';
223
  }
288
  case 'password' :
289
  $option_value = self::get_option( $value['id'], $value['default'] );
290
 
291
+ ?><tr valign="top" class="<?php echo esc_attr( $value['row_class'] ); ?>">
292
  <th scope="row" class="titledesc">
293
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
294
  <?php echo $tooltip_html; ?>
312
  case 'color' :
313
  $option_value = self::get_option( $value['id'], $value['default'] );
314
 
315
+ ?><tr valign="top" class="<?php echo esc_attr( $value['row_class'] ); ?>">
316
  <th scope="row" class="titledesc">
317
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
318
  <?php echo $tooltip_html; ?>
340
 
341
  $option_value = self::get_option( $value['id'], $value['default'] );
342
 
343
+ ?><tr valign="top" class="<?php echo esc_attr( $value['row_class'] ); ?>">
344
  <th scope="row" class="titledesc">
345
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
346
  <?php echo $tooltip_html; ?>
366
 
367
  $option_value = self::get_option( $value['id'], $value['default'] );
368
 
369
+ ?><tr valign="top" class="<?php echo esc_attr( $value['row_class'] ); ?>">
370
  <th scope="row" class="titledesc">
371
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
372
  <?php echo $tooltip_html; ?>
405
 
406
  $option_value = self::get_option( $value['id'], $value['default'] );
407
 
408
+ ?><tr valign="top" class="<?php echo esc_attr( $value['row_class'] ); ?>">
409
  <th scope="row" class="titledesc">
410
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
411
  <?php echo $tooltip_html; ?>
461
 
462
  if ( ! isset( $value['checkboxgroup'] ) || 'start' == $value['checkboxgroup'] ) {
463
  ?>
464
+ <tr valign="top" class="<?php echo esc_attr( implode( ' ', $visbility_class ) ); echo ' ' .esc_attr( $value['row_class'] ); ?>">
465
  <th scope="row" class="titledesc"><?php echo esc_html( $value['title'] ) ?></th>
466
  <td class="forminp forminp-checkbox">
467
  <fieldset>
524
  }
525
 
526
 
527
+ ?><tr valign="top" class="single_select_page <?php echo esc_attr( $value['row_class'] ); ?>" <?php echo isset($value['display']) && $value['display']==='none' ? 'style="display:none"':'' ?>>
528
  <th scope="row" class="titledesc"><?php echo esc_html( $value['title'] ) ?> <?php echo $tooltip_html; ?></th>
529
  <td class="forminp">
530
  <?php echo str_replace( ' id=', " data-placeholder='" . esc_attr__( 'Select a page&hellip;', 'user-registration' ) . "' style='" . $value['css'] . "' class='" . $value['class'] . "' id=", wp_dropdown_pages( $args ) ); ?> <?php echo $description; ?>
includes/admin/class-ur-registration-table-list.php CHANGED
@@ -121,6 +121,12 @@ class UR_Licenses_Table_List extends WP_List_Table {
121
  $actions['delete'] = '<a class="submitdelete" aria-label="' . esc_attr__( 'Delete this item permanently', 'user-registration' ) . '" href="' . get_delete_post_link( $registration->ID, '', true ) . '">' . esc_html__( 'Delete permanently', 'user-registration' ) . '</a>';
122
  }
123
  }
 
 
 
 
 
 
124
 
125
  $row_actions = array();
126
 
@@ -156,8 +162,8 @@ class UR_Licenses_Table_List extends WP_List_Table {
156
 
157
  if ( current_user_can( 'edit_user' ) ) {
158
  return '<a href="' . esc_url( add_query_arg( array(
159
- 'user_id' => $user->ID,
160
- ), admin_url( 'user-edit.php' ) ) ) . '">' . esc_html( $user_name ) . '</a>';
161
  }
162
 
163
  return esc_html( $user_name );
@@ -179,16 +185,16 @@ class UR_Licenses_Table_List extends WP_List_Table {
179
  }
180
 
181
  $t_time = mysql2date( __( 'Y/m/d g:i:s A', 'user-registration' ),
182
- $post->post_date, true );
183
  $m_time = $post->post_date;
184
  $time = mysql2date( 'G', $post->post_date )
185
- - get_option( 'gmt_offset' ) * 3600;
186
 
187
  $time_diff = time() - $time;
188
 
189
  if ( $time_diff > 0 && $time_diff < 24 * 60 * 60 ) {
190
  $h_time = sprintf(
191
- __( '%s ago', 'user-registration' ), human_time_diff( $time ) );
192
  } else {
193
  $h_time = mysql2date( __( 'Y/m/d', 'user-registration' ), $m_time );
194
  }
@@ -254,9 +260,11 @@ class UR_Licenses_Table_List extends WP_List_Table {
254
  $total_posts = array_sum( (array) $num_posts );
255
 
256
  // Subtract post types that are not included in the admin all list.
257
- foreach ( get_post_stati( array(
258
- 'show_in_admin_all_list' => false,
259
- ) ) as $state ) {
 
 
260
  $total_posts -= $num_posts->$state;
261
  }
262
 
@@ -264,13 +272,24 @@ class UR_Licenses_Table_List extends WP_List_Table {
264
  /* translators: %s: count */
265
  $status_links['all'] = "<a href='admin.php?page=user-registration'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts', 'user-registration' ), number_format_i18n( $total_posts ) ) . '</a>';
266
 
267
- foreach ( get_post_stati( array(
268
- 'show_in_admin_status_list' => true,
269
- ), 'objects' ) as $status ) {
 
 
270
  $class = '';
271
  $status_name = $status->name;
272
 
273
- if ( ! in_array( $status_name, array( 'publish', 'draft', 'pending', 'trash', 'future', 'private', 'auto-draft' ) ) ) {
 
 
 
 
 
 
 
 
 
274
  continue;
275
  }
276
 
121
  $actions['delete'] = '<a class="submitdelete" aria-label="' . esc_attr__( 'Delete this item permanently', 'user-registration' ) . '" href="' . get_delete_post_link( $registration->ID, '', true ) . '">' . esc_html__( 'Delete permanently', 'user-registration' ) . '</a>';
122
  }
123
  }
124
+ $duplicate_nonce = wp_create_nonce( 'user_registration_form_duplicate' . $registration->ID );
125
+ $duplicate_link = admin_url( 'admin.php?page=user-registration&action=duplicate&nonce=' . $duplicate_nonce . '&form=' . $registration->ID );
126
+
127
+ if ( current_user_can( $post_type_object->cap->edit_post, $registration->ID ) && 'publish' === $post_status ) {
128
+ $actions['duplicate'] = '<a href="' . esc_url( $duplicate_link ) . '">' . __( 'Duplicate', 'user-registration' ) . '</a>';
129
+ }
130
 
131
  $row_actions = array();
132
 
162
 
163
  if ( current_user_can( 'edit_user' ) ) {
164
  return '<a href="' . esc_url( add_query_arg( array(
165
+ 'user_id' => $user->ID,
166
+ ), admin_url( 'user-edit.php' ) ) ) . '">' . esc_html( $user_name ) . '</a>';
167
  }
168
 
169
  return esc_html( $user_name );
185
  }
186
 
187
  $t_time = mysql2date( __( 'Y/m/d g:i:s A', 'user-registration' ),
188
+ $post->post_date, true );
189
  $m_time = $post->post_date;
190
  $time = mysql2date( 'G', $post->post_date )
191
+ - get_option( 'gmt_offset' ) * 3600;
192
 
193
  $time_diff = time() - $time;
194
 
195
  if ( $time_diff > 0 && $time_diff < 24 * 60 * 60 ) {
196
  $h_time = sprintf(
197
+ __( '%s ago', 'user-registration' ), human_time_diff( $time ) );
198
  } else {
199
  $h_time = mysql2date( __( 'Y/m/d', 'user-registration' ), $m_time );
200
  }
260
  $total_posts = array_sum( (array) $num_posts );
261
 
262
  // Subtract post types that are not included in the admin all list.
263
+ foreach (
264
+ get_post_stati( array(
265
+ 'show_in_admin_all_list' => false,
266
+ ) ) as $state
267
+ ) {
268
  $total_posts -= $num_posts->$state;
269
  }
270
 
272
  /* translators: %s: count */
273
  $status_links['all'] = "<a href='admin.php?page=user-registration'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts', 'user-registration' ), number_format_i18n( $total_posts ) ) . '</a>';
274
 
275
+ foreach (
276
+ get_post_stati( array(
277
+ 'show_in_admin_status_list' => true,
278
+ ), 'objects' ) as $status
279
+ ) {
280
  $class = '';
281
  $status_name = $status->name;
282
 
283
+ if ( ! in_array( $status_name, array(
284
+ 'publish',
285
+ 'draft',
286
+ 'pending',
287
+ 'trash',
288
+ 'future',
289
+ 'private',
290
+ 'auto-draft'
291
+ ) )
292
+ ) {
293
  continue;
294
  }
295
 
includes/admin/settings/class-ur-settings-general.php CHANGED
@@ -65,6 +65,17 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
65
  'desc_tip' => true,
66
  'options' => $all_roles,
67
  ),
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  array(
70
  'title' => __( 'Prevent dashboard access', 'user-registration' ),
65
  'desc_tip' => true,
66
  'options' => $all_roles,
67
  ),
68
+ array(
69
+ 'title' => __( 'User Login option', 'user-registration' ),
70
+ 'desc' => __( 'This option lets you choose login option after user registration.', 'user-registration' ),
71
+ 'id' => 'user_registration_general_setting_login_options',
72
+ 'default' => 'default',
73
+ 'type' => 'select',
74
+ 'class' => 'ur-enhanced-select',
75
+ 'css' => 'min-width: 350px;',
76
+ 'desc_tip' => true,
77
+ 'options' => ur_login_option(),
78
+ ),
79
 
80
  array(
81
  'title' => __( 'Prevent dashboard access', 'user-registration' ),
includes/class-ur-autoloader.php CHANGED
@@ -86,7 +86,7 @@ class UR_Autoloader {
86
  $path = $this->include_path . 'form/';
87
  }
88
 
89
- if ( empty( $path ) || ( ! $this->load_file( $path . $file ) && strpos( $class, 'ess_' ) === 0 ) ) {
90
  $this->load_file( $this->include_path . $file );
91
  }
92
  }
86
  $path = $this->include_path . 'form/';
87
  }
88
 
89
+ if ( empty( $path ) || ( ! $this->load_file( $path . $file ) && strpos( $class, 'ur_' ) === 0 ) ) {
90
  $this->load_file( $this->include_path . $file );
91
  }
92
  }
includes/frontend/class-ur-frontend-form-handler.php CHANGED
@@ -29,7 +29,7 @@ class UR_Frontend_Form_Handler {
29
 
30
  self::$form_id = $form_id;
31
 
32
- $post_content = self::get_post_content( $form_id );
33
 
34
  $post_content_array = array();
35
 
@@ -68,22 +68,31 @@ class UR_Frontend_Form_Handler {
68
  'role' => $user_role,
69
  );
70
 
71
- self::$valid_form_data = apply_filters( 'user_registration_before_register_user_filter' , self::$valid_form_data, $form_id );
72
 
73
- do_action( 'user_registration_before_register_user_action' , self::$valid_form_data, $form_id );
74
 
75
  $user_id = wp_insert_user( $userdata );
76
 
77
  self::ur_update_user_meta( $user_id, self::$valid_form_data, $form_id );
78
 
79
- do_action( 'user_registration_after_register_user_action' , self::$valid_form_data, $form_id, $user_id );
80
 
81
 
82
  if ( $user_id > 0 ) {
83
 
84
- wp_send_json_success( array(
 
 
 
85
  'username' => self::$valid_form_data['user_username']->value,
86
- ) );
 
 
 
 
 
 
87
 
88
  }
89
 
29
 
30
  self::$form_id = $form_id;
31
 
32
+ $post_content = self::get_post_content( $form_id );
33
 
34
  $post_content_array = array();
35
 
68
  'role' => $user_role,
69
  );
70
 
71
+ self::$valid_form_data = apply_filters( 'user_registration_before_register_user_filter', self::$valid_form_data, $form_id );
72
 
73
+ do_action( 'user_registration_before_register_user_action', self::$valid_form_data, $form_id );
74
 
75
  $user_id = wp_insert_user( $userdata );
76
 
77
  self::ur_update_user_meta( $user_id, self::$valid_form_data, $form_id );
78
 
79
+ do_action( 'user_registration_after_register_user_action', self::$valid_form_data, $form_id, $user_id );
80
 
81
 
82
  if ( $user_id > 0 ) {
83
 
84
+
85
+ $login_option = get_option( 'user_registration_general_setting_login_options', 'default' );
86
+
87
+ $success_params = array(
88
  'username' => self::$valid_form_data['user_username']->value,
89
+ );
90
+ if ( 'auto_login' === $login_option ) {
91
+ wp_clear_auth_cookie();
92
+ wp_set_auth_cookie( $user_id );
93
+ $success_params['auto_login'] = true;
94
+ }
95
+ wp_send_json_success( $success_params );
96
 
97
  }
98
 
includes/functions-ur-core.php CHANGED
@@ -591,7 +591,6 @@ function ur_admin_form_settings_fields( $form_id ) {
591
  array(
592
  'type' => 'select',
593
  'label' => sprintf( __( 'Enable %1$s %2$s reCaptcha %3$s support', 'user-registration' ), '<a title="', 'Please make sure the site key and secret are not empty in setting page." href="' . admin_url() . 'admin.php?page=user-registration-settings&tab=integration" target="_blank">', '</a>' ),
594
- 'id' => 'user_registration_integration_setting_recaptcha_site_key',
595
  'description' => '',
596
  'required' => false,
597
  'id' => 'user_registration_form_setting_enable_recaptcha_support',
@@ -614,6 +613,20 @@ function ur_admin_form_settings_fields( $form_id ) {
614
 
615
  }
616
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
617
  /**
618
  * @param $post_id
619
  * @param $meta_key
591
  array(
592
  'type' => 'select',
593
  'label' => sprintf( __( 'Enable %1$s %2$s reCaptcha %3$s support', 'user-registration' ), '<a title="', 'Please make sure the site key and secret are not empty in setting page." href="' . admin_url() . 'admin.php?page=user-registration-settings&tab=integration" target="_blank">', '</a>' ),
 
594
  'description' => '',
595
  'required' => false,
596
  'id' => 'user_registration_form_setting_enable_recaptcha_support',
613
 
614
  }
615
 
616
+ /**
617
+ * @return mixed
618
+ */
619
+ function ur_login_option() {
620
+
621
+ return apply_filters( 'user_registration_login_options', array(
622
+
623
+ 'default' => __( 'Manual login after registration', 'user-registration' ),
624
+ 'auto_login' => __( 'Auto login after registration', 'user-registration' )
625
+ )
626
+ );
627
+
628
+ }
629
+
630
  /**
631
  * @param $post_id
632
  * @param $meta_key
languages/user-registration.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: User Registration 1.0.2\n"
6
  "Report-Msgid-Bugs-To: wpeverest@gmail.com\n"
7
- "POT-Creation-Date: 2017-08-04 11:47:48+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -34,17 +34,21 @@ msgstr ""
34
  msgid "Trash"
35
  msgstr ""
36
 
37
- #: includes/admin/class-ur-admin-menus.php:103
 
 
 
 
38
  msgid "You do not have permissions to edit forms!"
39
  msgstr ""
40
 
41
- #: includes/admin/class-ur-admin-menus.php:128
42
  #: includes/admin/class-ur-admin-notices.php:110
43
  #: includes/admin/class-ur-admin-settings.php:68
44
  msgid "Action failed. Please refresh the page and retry."
45
  msgstr ""
46
 
47
- #: includes/admin/class-ur-admin-menus.php:132
48
  msgid "You do not have permissions to delete forms!"
49
  msgstr ""
50
 
@@ -52,75 +56,75 @@ msgstr ""
52
  msgid "User Registration"
53
  msgstr ""
54
 
55
- #: includes/admin/class-ur-admin-menus.php:181
56
  msgid "User Registration settings"
57
  msgstr ""
58
 
59
- #: includes/admin/class-ur-admin-menus.php:181
60
  #: includes/class-ur-install.php:438
61
  msgid "Settings"
62
  msgstr ""
63
 
64
- #: includes/admin/class-ur-admin-menus.php:196
65
  #: includes/admin/class-ur-registration-table-list.php:51
66
  msgid "Title"
67
  msgstr ""
68
 
69
- #: includes/admin/class-ur-admin-menus.php:197
70
  #: includes/admin/class-ur-registration-table-list.php:52
71
  msgid "Shortcode"
72
  msgstr ""
73
 
74
- #: includes/admin/class-ur-admin-menus.php:198
75
  msgid "Entry Link"
76
  msgstr ""
77
 
78
- #: includes/admin/class-ur-admin-menus.php:199
79
  #: includes/admin/class-ur-registration-table-list.php:54
80
  msgid "Author"
81
  msgstr ""
82
 
83
- #: includes/admin/class-ur-admin-menus.php:200
84
  #: includes/admin/class-ur-registration-table-list.php:55
85
  msgid "Date"
86
  msgstr ""
87
 
88
- #: includes/admin/class-ur-admin-menus.php:209
89
- #: includes/admin/class-ur-admin-menus.php:237
90
  msgid "Add New"
91
  msgstr ""
92
 
93
- #: includes/admin/class-ur-admin-menus.php:242
94
  msgid "Search Registration"
95
  msgstr ""
96
 
97
- #: includes/admin/class-ur-admin-menus.php:264
98
  msgid "Create Form"
99
  msgstr ""
100
 
101
- #: includes/admin/class-ur-admin-menus.php:267
102
  msgid "Update form"
103
  msgstr ""
104
 
105
- #: includes/admin/class-ur-admin-menus.php:288
106
  msgid "User Registration endpoints"
107
  msgstr ""
108
 
109
- #: includes/admin/class-ur-admin-menus.php:307
110
- #: includes/admin/settings/class-ur-settings-general.php:145
111
  #: includes/class-ur-query.php:77
112
  msgid "Lost password"
113
  msgstr ""
114
 
115
- #: includes/admin/class-ur-admin-menus.php:345
116
  msgid "Select all"
117
  msgstr ""
118
 
119
- #: includes/admin/class-ur-admin-menus.php:349
120
  msgid "Add to menu"
121
  msgstr ""
122
 
123
- #: includes/admin/class-ur-admin-menus.php:446
124
  msgid "Empty form data"
125
  msgstr ""
126
 
@@ -147,7 +151,7 @@ msgstr ""
147
  msgid "The changes you made will be lost if you navigate away from this page."
148
  msgstr ""
149
 
150
- #: includes/admin/class-ur-admin-settings.php:527
151
  msgid "Select a page&hellip;"
152
  msgstr ""
153
 
@@ -169,7 +173,7 @@ msgid "Restore this item from the Trash"
169
  msgstr ""
170
 
171
  #: includes/admin/class-ur-registration-table-list.php:116
172
- #: includes/admin/class-ur-registration-table-list.php:301
173
  msgid "Restore"
174
  msgstr ""
175
 
@@ -182,45 +186,49 @@ msgid "Delete this item permanently"
182
  msgstr ""
183
 
184
  #: includes/admin/class-ur-registration-table-list.php:121
185
- #: includes/admin/class-ur-registration-table-list.php:302
186
  msgid "Delete permanently"
187
  msgstr ""
188
 
189
- #: includes/admin/class-ur-registration-table-list.php:181
 
 
 
 
190
  msgid "Y/m/d g:i:s A"
191
  msgstr ""
192
 
193
- #: includes/admin/class-ur-registration-table-list.php:191
194
  msgid "%s ago"
195
  msgstr ""
196
 
197
- #: includes/admin/class-ur-registration-table-list.php:193
198
  msgid "Y/m/d"
199
  msgstr ""
200
 
201
- #: includes/admin/class-ur-registration-table-list.php:212
202
- #: includes/admin/class-ur-registration-table-list.php:213
203
  #. translators: %s: count
204
  msgid "Published <span class=\"count\">(%s)</span>"
205
  msgstr ""
206
 
207
- #: includes/admin/class-ur-registration-table-list.php:221
208
- #: includes/admin/class-ur-registration-table-list.php:222
209
  #. translators: %s: count
210
  msgid "Draft <span class=\"count\">(%s)</span>"
211
  msgstr ""
212
 
213
- #: includes/admin/class-ur-registration-table-list.php:230
214
- #: includes/admin/class-ur-registration-table-list.php:231
215
  #. translators: %s: count
216
  msgid "Pending <span class=\"count\">(%s)</span>"
217
  msgstr ""
218
 
219
- #: includes/admin/class-ur-registration-table-list.php:307
220
  msgid "Move to trash"
221
  msgstr ""
222
 
223
- #: includes/admin/class-ur-registration-table-list.php:318
224
  msgid "Empty trash"
225
  msgstr ""
226
 
@@ -241,78 +249,86 @@ msgstr ""
241
  msgid "This option lets you choose user role for frontend registration."
242
  msgstr ""
243
 
 
 
 
 
244
  #: includes/admin/settings/class-ur-settings-general.php:70
 
 
 
 
245
  msgid "Prevent dashboard access"
246
  msgstr ""
247
 
248
- #: includes/admin/settings/class-ur-settings-general.php:71
249
  msgid ""
250
  "This option lets you limit which roles you are willing to prevent dashboard "
251
  "access."
252
  msgstr ""
253
 
254
- #: includes/admin/settings/class-ur-settings-general.php:82
255
  msgid "My account page"
256
  msgstr ""
257
 
258
- #: includes/admin/settings/class-ur-settings-general.php:83
259
  msgid "Page contents: [%s]"
260
  msgstr ""
261
 
262
- #: includes/admin/settings/class-ur-settings-general.php:94
263
  #: includes/functions-ur-core.php:565
264
  msgid "Enable strong password"
265
  msgstr ""
266
 
267
- #: includes/admin/settings/class-ur-settings-general.php:95
268
  msgid "Tick here if you want to use strong password on user registration form."
269
  msgstr ""
270
 
271
- #: includes/admin/settings/class-ur-settings-general.php:102
272
  #: includes/functions-ur-core.php:580
273
  msgid "Form submit button label"
274
  msgstr ""
275
 
276
- #: includes/admin/settings/class-ur-settings-general.php:103
277
  msgid "This option let you change the submit button label."
278
  msgstr ""
279
 
280
- #: includes/admin/settings/class-ur-settings-general.php:120
281
  msgid "My account endpoints"
282
  msgstr ""
283
 
284
- #: includes/admin/settings/class-ur-settings-general.php:122
285
  msgid ""
286
  "Endpoints are appended to your page URLs to handle specific actions on the "
287
  "accounts pages. They should be unique and can be left blank to disable the "
288
  "endpoint."
289
  msgstr ""
290
 
291
- #: includes/admin/settings/class-ur-settings-general.php:127
292
  msgid "Edit account"
293
  msgstr ""
294
 
295
- #: includes/admin/settings/class-ur-settings-general.php:128
296
  msgid "Endpoint for the \"My account &rarr; Edit account\" page."
297
  msgstr ""
298
 
299
- #: includes/admin/settings/class-ur-settings-general.php:136
300
  msgid "Edit profile"
301
  msgstr ""
302
 
303
- #: includes/admin/settings/class-ur-settings-general.php:137
304
  msgid "Endpoint for the \"My account &rarr; Edit profile\" page."
305
  msgstr ""
306
 
307
- #: includes/admin/settings/class-ur-settings-general.php:146
308
  msgid "Endpoint for the \"My account &rarr; Lost password\" page."
309
  msgstr ""
310
 
311
- #: includes/admin/settings/class-ur-settings-general.php:154
312
  msgid "User logout"
313
  msgstr ""
314
 
315
- #: includes/admin/settings/class-ur-settings-general.php:155
316
  msgid ""
317
  "Endpoint for the triggering logout. You can add this to your menus via a "
318
  "custom link: yoursite.com/?user-logout=true"
@@ -1796,23 +1812,23 @@ msgstr ""
1796
  msgid "Default Value"
1797
  msgstr ""
1798
 
1799
- #: includes/frontend/class-ur-frontend-form-handler.php:91
1800
  msgid "Someting error! please try again"
1801
  msgstr ""
1802
 
1803
- #: includes/frontend/class-ur-frontend-form-handler.php:154
1804
  msgid "Duplicate field key in form, please contact site administrator."
1805
  msgstr ""
1806
 
1807
- #: includes/frontend/class-ur-frontend-form-handler.php:161
1808
  msgid "Required form field not found."
1809
  msgstr ""
1810
 
1811
- #: includes/frontend/class-ur-frontend-form-handler.php:291
1812
  msgid "Empty confirm password"
1813
  msgstr ""
1814
 
1815
- #: includes/frontend/class-ur-frontend-form-handler.php:295
1816
  msgid "Password and confirm password not matched"
1817
  msgstr ""
1818
 
@@ -1841,12 +1857,12 @@ msgid "Required"
1841
  msgstr ""
1842
 
1843
  #: includes/functions-ur-core.php:471 includes/functions-ur-core.php:573
1844
- #: includes/functions-ur-core.php:602
1845
  msgid "No"
1846
  msgstr ""
1847
 
1848
  #: includes/functions-ur-core.php:472 includes/functions-ur-core.php:572
1849
- #: includes/functions-ur-core.php:601
1850
  msgid "Yes"
1851
  msgstr ""
1852
 
@@ -1854,6 +1870,14 @@ msgstr ""
1854
  msgid "Enable %1$s %2$s reCaptcha %3$s support"
1855
  msgstr ""
1856
 
 
 
 
 
 
 
 
 
1857
  #: includes/functions-ur-notice.php:29 includes/functions-ur-notice.php:64
1858
  #: includes/functions-ur-notice.php:85 includes/functions-ur-notice.php:111
1859
  #: includes/functions-ur-notice.php:125 includes/functions-ur-notice.php:139
@@ -2136,7 +2160,7 @@ msgctxt "user registration admin"
2136
  msgid "Drag your first form item here."
2137
  msgstr ""
2138
 
2139
- #: includes/admin/class-ur-registration-table-list.php:265
2140
  #. translators: %s: count
2141
  msgctxt "posts"
2142
  msgid "All <span class=\"count\">(%s)</span>"
4
  msgstr ""
5
  "Project-Id-Version: User Registration 1.0.2\n"
6
  "Report-Msgid-Bugs-To: wpeverest@gmail.com\n"
7
+ "POT-Creation-Date: 2017-08-21 04:13:19+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
34
  msgid "Trash"
35
  msgstr ""
36
 
37
+ #: includes/admin/class-ur-admin-menus.php:152
38
+ msgid "Copy of "
39
+ msgstr ""
40
+
41
+ #: includes/admin/class-ur-admin-menus.php:194
42
  msgid "You do not have permissions to edit forms!"
43
  msgstr ""
44
 
45
+ #: includes/admin/class-ur-admin-menus.php:219
46
  #: includes/admin/class-ur-admin-notices.php:110
47
  #: includes/admin/class-ur-admin-settings.php:68
48
  msgid "Action failed. Please refresh the page and retry."
49
  msgstr ""
50
 
51
+ #: includes/admin/class-ur-admin-menus.php:223
52
  msgid "You do not have permissions to delete forms!"
53
  msgstr ""
54
 
56
  msgid "User Registration"
57
  msgstr ""
58
 
59
+ #: includes/admin/class-ur-admin-menus.php:272
60
  msgid "User Registration settings"
61
  msgstr ""
62
 
63
+ #: includes/admin/class-ur-admin-menus.php:272
64
  #: includes/class-ur-install.php:438
65
  msgid "Settings"
66
  msgstr ""
67
 
68
+ #: includes/admin/class-ur-admin-menus.php:287
69
  #: includes/admin/class-ur-registration-table-list.php:51
70
  msgid "Title"
71
  msgstr ""
72
 
73
+ #: includes/admin/class-ur-admin-menus.php:288
74
  #: includes/admin/class-ur-registration-table-list.php:52
75
  msgid "Shortcode"
76
  msgstr ""
77
 
78
+ #: includes/admin/class-ur-admin-menus.php:289
79
  msgid "Entry Link"
80
  msgstr ""
81
 
82
+ #: includes/admin/class-ur-admin-menus.php:290
83
  #: includes/admin/class-ur-registration-table-list.php:54
84
  msgid "Author"
85
  msgstr ""
86
 
87
+ #: includes/admin/class-ur-admin-menus.php:291
88
  #: includes/admin/class-ur-registration-table-list.php:55
89
  msgid "Date"
90
  msgstr ""
91
 
92
+ #: includes/admin/class-ur-admin-menus.php:300
93
+ #: includes/admin/class-ur-admin-menus.php:328
94
  msgid "Add New"
95
  msgstr ""
96
 
97
+ #: includes/admin/class-ur-admin-menus.php:333
98
  msgid "Search Registration"
99
  msgstr ""
100
 
101
+ #: includes/admin/class-ur-admin-menus.php:355
102
  msgid "Create Form"
103
  msgstr ""
104
 
105
+ #: includes/admin/class-ur-admin-menus.php:358
106
  msgid "Update form"
107
  msgstr ""
108
 
109
+ #: includes/admin/class-ur-admin-menus.php:379
110
  msgid "User Registration endpoints"
111
  msgstr ""
112
 
113
+ #: includes/admin/class-ur-admin-menus.php:398
114
+ #: includes/admin/settings/class-ur-settings-general.php:156
115
  #: includes/class-ur-query.php:77
116
  msgid "Lost password"
117
  msgstr ""
118
 
119
+ #: includes/admin/class-ur-admin-menus.php:436
120
  msgid "Select all"
121
  msgstr ""
122
 
123
+ #: includes/admin/class-ur-admin-menus.php:440
124
  msgid "Add to menu"
125
  msgstr ""
126
 
127
+ #: includes/admin/class-ur-admin-menus.php:537
128
  msgid "Empty form data"
129
  msgstr ""
130
 
151
  msgid "The changes you made will be lost if you navigate away from this page."
152
  msgstr ""
153
 
154
+ #: includes/admin/class-ur-admin-settings.php:530
155
  msgid "Select a page&hellip;"
156
  msgstr ""
157
 
173
  msgstr ""
174
 
175
  #: includes/admin/class-ur-registration-table-list.php:116
176
+ #: includes/admin/class-ur-registration-table-list.php:320
177
  msgid "Restore"
178
  msgstr ""
179
 
186
  msgstr ""
187
 
188
  #: includes/admin/class-ur-registration-table-list.php:121
189
+ #: includes/admin/class-ur-registration-table-list.php:321
190
  msgid "Delete permanently"
191
  msgstr ""
192
 
193
+ #: includes/admin/class-ur-registration-table-list.php:128
194
+ msgid "Duplicate"
195
+ msgstr ""
196
+
197
+ #: includes/admin/class-ur-registration-table-list.php:187
198
  msgid "Y/m/d g:i:s A"
199
  msgstr ""
200
 
201
+ #: includes/admin/class-ur-registration-table-list.php:197
202
  msgid "%s ago"
203
  msgstr ""
204
 
205
+ #: includes/admin/class-ur-registration-table-list.php:199
206
  msgid "Y/m/d"
207
  msgstr ""
208
 
209
+ #: includes/admin/class-ur-registration-table-list.php:218
210
+ #: includes/admin/class-ur-registration-table-list.php:219
211
  #. translators: %s: count
212
  msgid "Published <span class=\"count\">(%s)</span>"
213
  msgstr ""
214
 
215
+ #: includes/admin/class-ur-registration-table-list.php:227
216
+ #: includes/admin/class-ur-registration-table-list.php:228
217
  #. translators: %s: count
218
  msgid "Draft <span class=\"count\">(%s)</span>"
219
  msgstr ""
220
 
221
+ #: includes/admin/class-ur-registration-table-list.php:236
222
+ #: includes/admin/class-ur-registration-table-list.php:237
223
  #. translators: %s: count
224
  msgid "Pending <span class=\"count\">(%s)</span>"
225
  msgstr ""
226
 
227
+ #: includes/admin/class-ur-registration-table-list.php:326
228
  msgid "Move to trash"
229
  msgstr ""
230
 
231
+ #: includes/admin/class-ur-registration-table-list.php:337
232
  msgid "Empty trash"
233
  msgstr ""
234
 
249
  msgid "This option lets you choose user role for frontend registration."
250
  msgstr ""
251
 
252
+ #: includes/admin/settings/class-ur-settings-general.php:69
253
+ msgid "User Login option"
254
+ msgstr ""
255
+
256
  #: includes/admin/settings/class-ur-settings-general.php:70
257
+ msgid "This option lets you choose login option after user registration."
258
+ msgstr ""
259
+
260
+ #: includes/admin/settings/class-ur-settings-general.php:81
261
  msgid "Prevent dashboard access"
262
  msgstr ""
263
 
264
+ #: includes/admin/settings/class-ur-settings-general.php:82
265
  msgid ""
266
  "This option lets you limit which roles you are willing to prevent dashboard "
267
  "access."
268
  msgstr ""
269
 
270
+ #: includes/admin/settings/class-ur-settings-general.php:93
271
  msgid "My account page"
272
  msgstr ""
273
 
274
+ #: includes/admin/settings/class-ur-settings-general.php:94
275
  msgid "Page contents: [%s]"
276
  msgstr ""
277
 
278
+ #: includes/admin/settings/class-ur-settings-general.php:105
279
  #: includes/functions-ur-core.php:565
280
  msgid "Enable strong password"
281
  msgstr ""
282
 
283
+ #: includes/admin/settings/class-ur-settings-general.php:106
284
  msgid "Tick here if you want to use strong password on user registration form."
285
  msgstr ""
286
 
287
+ #: includes/admin/settings/class-ur-settings-general.php:113
288
  #: includes/functions-ur-core.php:580
289
  msgid "Form submit button label"
290
  msgstr ""
291
 
292
+ #: includes/admin/settings/class-ur-settings-general.php:114
293
  msgid "This option let you change the submit button label."
294
  msgstr ""
295
 
296
+ #: includes/admin/settings/class-ur-settings-general.php:131
297
  msgid "My account endpoints"
298
  msgstr ""
299
 
300
+ #: includes/admin/settings/class-ur-settings-general.php:133
301
  msgid ""
302
  "Endpoints are appended to your page URLs to handle specific actions on the "
303
  "accounts pages. They should be unique and can be left blank to disable the "
304
  "endpoint."
305
  msgstr ""
306
 
307
+ #: includes/admin/settings/class-ur-settings-general.php:138
308
  msgid "Edit account"
309
  msgstr ""
310
 
311
+ #: includes/admin/settings/class-ur-settings-general.php:139
312
  msgid "Endpoint for the \"My account &rarr; Edit account\" page."
313
  msgstr ""
314
 
315
+ #: includes/admin/settings/class-ur-settings-general.php:147
316
  msgid "Edit profile"
317
  msgstr ""
318
 
319
+ #: includes/admin/settings/class-ur-settings-general.php:148
320
  msgid "Endpoint for the \"My account &rarr; Edit profile\" page."
321
  msgstr ""
322
 
323
+ #: includes/admin/settings/class-ur-settings-general.php:157
324
  msgid "Endpoint for the \"My account &rarr; Lost password\" page."
325
  msgstr ""
326
 
327
+ #: includes/admin/settings/class-ur-settings-general.php:165
328
  msgid "User logout"
329
  msgstr ""
330
 
331
+ #: includes/admin/settings/class-ur-settings-general.php:166
332
  msgid ""
333
  "Endpoint for the triggering logout. You can add this to your menus via a "
334
  "custom link: yoursite.com/?user-logout=true"
1812
  msgid "Default Value"
1813
  msgstr ""
1814
 
1815
+ #: includes/frontend/class-ur-frontend-form-handler.php:100
1816
  msgid "Someting error! please try again"
1817
  msgstr ""
1818
 
1819
+ #: includes/frontend/class-ur-frontend-form-handler.php:163
1820
  msgid "Duplicate field key in form, please contact site administrator."
1821
  msgstr ""
1822
 
1823
+ #: includes/frontend/class-ur-frontend-form-handler.php:170
1824
  msgid "Required form field not found."
1825
  msgstr ""
1826
 
1827
+ #: includes/frontend/class-ur-frontend-form-handler.php:300
1828
  msgid "Empty confirm password"
1829
  msgstr ""
1830
 
1831
+ #: includes/frontend/class-ur-frontend-form-handler.php:304
1832
  msgid "Password and confirm password not matched"
1833
  msgstr ""
1834
 
1857
  msgstr ""
1858
 
1859
  #: includes/functions-ur-core.php:471 includes/functions-ur-core.php:573
1860
+ #: includes/functions-ur-core.php:601
1861
  msgid "No"
1862
  msgstr ""
1863
 
1864
  #: includes/functions-ur-core.php:472 includes/functions-ur-core.php:572
1865
+ #: includes/functions-ur-core.php:600
1866
  msgid "Yes"
1867
  msgstr ""
1868
 
1870
  msgid "Enable %1$s %2$s reCaptcha %3$s support"
1871
  msgstr ""
1872
 
1873
+ #: includes/functions-ur-core.php:623
1874
+ msgid "Manual login after registration"
1875
+ msgstr ""
1876
+
1877
+ #: includes/functions-ur-core.php:624
1878
+ msgid "Auto login after registration"
1879
+ msgstr ""
1880
+
1881
  #: includes/functions-ur-notice.php:29 includes/functions-ur-notice.php:64
1882
  #: includes/functions-ur-notice.php:85 includes/functions-ur-notice.php:111
1883
  #: includes/functions-ur-notice.php:125 includes/functions-ur-notice.php:139
2160
  msgid "Drag your first form item here."
2161
  msgstr ""
2162
 
2163
+ #: includes/admin/class-ur-registration-table-list.php:273
2164
  #. translators: %s: count
2165
  msgctxt "posts"
2166
  msgid "All <span class=\"count\">(%s)</span>"
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: WPEverest
3
  Tags: user registration, registration, profile-builder, user profile, form, registration form, login form
4
  Requires at least: 4.0
5
  Tested up to: 4.8
6
- Stable tag: 1.0.2
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -30,6 +30,7 @@ Check [documentation](http://docs.wpeverest.com/docs/user-registration/)
30
  * Simple, Clean and Beautiful Registration Form
31
  * Drag and Drop UI
32
  * Easy Registration and Login
 
33
  * Unlimited Registration Forms
34
  * Multiple Column Design
35
  * Clean User Dashboard
@@ -72,13 +73,18 @@ Yes, the plugin is designed to work with any themes that have been coded followi
72
 
73
  == Changelog ==
74
 
75
- = 1.0.2 - 04/08/2017 -
 
 
 
 
 
76
  * Email notification to user and admin
77
  * Some frontend form design fixes
78
  * On enter save form setting added on backend
79
 
80
 
81
- = 1.0.1 - 13/07/2017 -
82
  * Tweak - Add RTL support for activation notice.
83
  * Formwise setting functionality
84
  * Google Recaptcha on every form
3
  Tags: user registration, registration, profile-builder, user profile, form, registration form, login form
4
  Requires at least: 4.0
5
  Tested up to: 4.8
6
+ Stable tag: 1.0.3
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
30
  * Simple, Clean and Beautiful Registration Form
31
  * Drag and Drop UI
32
  * Easy Registration and Login
33
+ * Form Duplicate Option
34
  * Unlimited Registration Forms
35
  * Multiple Column Design
36
  * Clean User Dashboard
73
 
74
  == Changelog ==
75
 
76
+ = 1.0.3 - 21/08/2017 =
77
+ * Form duplicate option
78
+ * Auto login after registration feature
79
+ * Added some filter for addon
80
+
81
+ = 1.0.2 - 04/08/2017 =
82
  * Email notification to user and admin
83
  * Some frontend form design fixes
84
  * On enter save form setting added on backend
85
 
86
 
87
+ = 1.0.1 - 13/07/2017 =
88
  * Tweak - Add RTL support for activation notice.
89
  * Formwise setting functionality
90
  * Google Recaptcha on every form
user-registration.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: User Registration
4
  * Plugin URI: https://wpeverest.com/plugins/user-registration
5
  * Description: Drag and Drop user registration and login form builder.
6
- * Version: 1.0.2
7
  * Author: WPEverest
8
  * Author URI: https://wpeverest.com
9
  * Requires at least: 4.0
@@ -35,7 +35,7 @@ final class UserRegistration {
35
  * Plugin version.
36
  * @var string
37
  */
38
- public $version = '1.0.2';
39
 
40
  /**
41
  * Session instance.
@@ -177,11 +177,8 @@ final class UserRegistration {
177
  * Core classes.
178
  */
179
  include_once( UR_ABSPATH . 'includes/functions-ur-core.php' );
180
-
181
-
182
  include_once( UR_ABSPATH . 'includes/class-ur-install.php' );
183
  include_once( UR_ABSPATH . 'includes/class-ur-post-types.php' ); // Registers post types
184
- include_once( UR_ABSPATH . 'includes/class-ur-install.php' );
185
  include_once( UR_ABSPATH . 'includes/class-ur-emailer.php' );
186
  include_once( UR_ABSPATH . 'includes/class-ur-ajax.php' );
187
  include_once( UR_ABSPATH . 'includes/class-ur-query.php' );
3
  * Plugin Name: User Registration
4
  * Plugin URI: https://wpeverest.com/plugins/user-registration
5
  * Description: Drag and Drop user registration and login form builder.
6
+ * Version: 1.0.3
7
  * Author: WPEverest
8
  * Author URI: https://wpeverest.com
9
  * Requires at least: 4.0
35
  * Plugin version.
36
  * @var string
37
  */
38
+ public $version = '1.0.3';
39
 
40
  /**
41
  * Session instance.
177
  * Core classes.
178
  */
179
  include_once( UR_ABSPATH . 'includes/functions-ur-core.php' );
 
 
180
  include_once( UR_ABSPATH . 'includes/class-ur-install.php' );
181
  include_once( UR_ABSPATH . 'includes/class-ur-post-types.php' ); // Registers post types
 
182
  include_once( UR_ABSPATH . 'includes/class-ur-emailer.php' );
183
  include_once( UR_ABSPATH . 'includes/class-ur-ajax.php' );
184
  include_once( UR_ABSPATH . 'includes/class-ur-query.php' );