User registration & user profile – Profile Builder - Version 3.4.0

Version Description

  • Provided more information on the type of reCAPTCHA in Form Fields to avoid confusion
  • Fixed a compatibility issue with Twenty Twenty-one theme
  • Rectify WPML string names for some default fields
  • Added 'url_only' parameter for [wppb-logout] shortcode to output a simple url
  • Fixed a security issue regarding login form error
Download this release

Release Info

Developer madalin.ungureanu
Plugin Icon 128x128 User registration & user profile – Profile Builder
Version 3.4.0
Comparing to
See all releases

Code changes from version 3.3.9 to 3.4.0

admin/manage-fields.php CHANGED
@@ -194,7 +194,7 @@ function wppb_populate_manage_fields(){
194
  array( 'type' => 'textarea', 'slug' => 'terms-of-agreement', 'title' => __( 'Terms of Agreement', 'profile-builder' ), 'description' => __( 'Enter a detailed description of the terms of agreement for the user to read.<br/>Links can be inserted by using standard HTML syntax: &lt;a href="custom_url"&gt;custom_text&lt;/a&gt;', 'profile-builder' ) ),
195
  array( 'type' => 'text', 'slug' => 'options', 'title' => __( 'Options', 'profile-builder' ), 'description' => __( "Enter a comma separated list of values<br/>This can be anything, as it is hidden from the user, but should not contain special characters or apostrophes", 'profile-builder' ) ),
196
  array( 'type' => 'text', 'slug' => 'labels', 'title' => __( 'Labels', 'profile-builder' ), 'description' => __( "Enter a comma separated list of labels<br/>Visible for the user", 'profile-builder' ) ),
197
- array( 'type' => 'select', 'slug' => 'recaptcha-type', 'title' => __( 'reCAPTCHA Type', 'profile-builder' ), 'options' => array('%reCAPTCHA V2%v2', '%Invisible reCAPTCHA%invisible'), 'default' => 'v2', 'description' => __( 'Choose the <a href="https://developers.google.com/recaptcha/docs/versions" target="_blank">type of reCAPTCHA</a> you wish to add to this site.', 'profile-builder' ) ),
198
  array( 'type' => 'text', 'slug' => 'public-key', 'title' => __( 'Site Key', 'profile-builder' ), 'description' => __( 'The site key from Google, <a href="http://www.google.com/recaptcha" target="_blank">www.google.com/recaptcha</a>', 'profile-builder' ) ),
199
  array( 'type' => 'text', 'slug' => 'private-key', 'title' => __( 'Secret Key', 'profile-builder' ), 'description' => __( 'The secret key from Google, <a href="http://www.google.com/recaptcha" target="_blank">www.google.com/recaptcha</a>', 'profile-builder' ) ),
200
  array( 'type' => 'checkbox', 'slug' => 'captcha-pb-forms', 'title' => __( 'Display on PB forms', 'profile-builder' ), 'options' => array( '%'.__('PB Login','profile-builder').'%'.'pb_login', '%'.__('PB Register','profile-builder').'%'.'pb_register', '%'.__('PB Recover Password','profile-builder').'%'.'pb_recover_password' ), 'default' => 'pb_register', 'description' => __( "Select on which Profile Builder forms to display reCAPTCHA", 'profile-builder' ) ),
194
  array( 'type' => 'textarea', 'slug' => 'terms-of-agreement', 'title' => __( 'Terms of Agreement', 'profile-builder' ), 'description' => __( 'Enter a detailed description of the terms of agreement for the user to read.<br/>Links can be inserted by using standard HTML syntax: &lt;a href="custom_url"&gt;custom_text&lt;/a&gt;', 'profile-builder' ) ),
195
  array( 'type' => 'text', 'slug' => 'options', 'title' => __( 'Options', 'profile-builder' ), 'description' => __( "Enter a comma separated list of values<br/>This can be anything, as it is hidden from the user, but should not contain special characters or apostrophes", 'profile-builder' ) ),
196
  array( 'type' => 'text', 'slug' => 'labels', 'title' => __( 'Labels', 'profile-builder' ), 'description' => __( "Enter a comma separated list of labels<br/>Visible for the user", 'profile-builder' ) ),
197
+ array( 'type' => 'select', 'slug' => 'recaptcha-type', 'title' => __( 'reCAPTCHA Type', 'profile-builder' ), 'options' => array('%reCAPTCHA V2%v2', '%Invisible reCAPTCHA%invisible'), 'default' => 'v2', 'description' => __( 'Choose the <a href="https://developers.google.com/recaptcha/docs/versions" target="_blank">type of reCAPTCHA</a> you wish to add to this site.<br/>Please note that the Invisible reCAPTCHA is a type of reCAPTCHA v2.', 'profile-builder' ) ),
198
  array( 'type' => 'text', 'slug' => 'public-key', 'title' => __( 'Site Key', 'profile-builder' ), 'description' => __( 'The site key from Google, <a href="http://www.google.com/recaptcha" target="_blank">www.google.com/recaptcha</a>', 'profile-builder' ) ),
199
  array( 'type' => 'text', 'slug' => 'private-key', 'title' => __( 'Secret Key', 'profile-builder' ), 'description' => __( 'The secret key from Google, <a href="http://www.google.com/recaptcha" target="_blank">www.google.com/recaptcha</a>', 'profile-builder' ) ),
200
  array( 'type' => 'checkbox', 'slug' => 'captcha-pb-forms', 'title' => __( 'Display on PB forms', 'profile-builder' ), 'options' => array( '%'.__('PB Login','profile-builder').'%'.'pb_login', '%'.__('PB Register','profile-builder').'%'.'pb_register', '%'.__('PB Recover Password','profile-builder').'%'.'pb_recover_password' ), 'default' => 'pb_register', 'description' => __( "Select on which Profile Builder forms to display reCAPTCHA", 'profile-builder' ) ),
assets/css/style-front-end.css CHANGED
@@ -185,7 +185,6 @@
185
  float:left;
186
  min-height:1px;
187
  }
188
- .wppb-form-field input,
189
  .wppb-form-field input[type="text"], .wppb-form-field input[type="number"], .wppb-form-field input[type="email"], .wppb-form-field input[type="url"], .wppb-form-field input[type="password"], .wppb-form-field input[type="search"],
190
  .wppb-form-field select,
191
  .wppb-form-field textarea,
@@ -213,7 +212,6 @@
213
 
214
  input#send_credentials_via_email{
215
  float:none;
216
- width:auto;
217
  margin-right:10px
218
  }
219
 
@@ -282,7 +280,6 @@ input#send_credentials_via_email{
282
  .wppb-radios li input{
283
  min-width:0;
284
  float:none;
285
- width:auto;
286
  }
287
 
288
  .wppb-edit-user .wppb-checkbox-terms-and-conditions {
@@ -303,7 +300,6 @@ input#send_credentials_via_email{
303
 
304
  .wppb-form-field.wppb-checkbox-terms-and-conditions input[type="checkbox"].custom_field_toa {
305
  float:none;
306
- width:auto;
307
  margin-right:10px
308
  }
309
 
@@ -356,7 +352,6 @@ label[for=blog-privacy]{
356
 
357
  .wppb-gdpr-checkbox.wppb-form-field #user_consent_gdpr{
358
  float:none;
359
- width:auto;
360
  margin:0 10px 0 0;
361
  }
362
 
@@ -861,7 +856,6 @@ li.wppb-facet-search{
861
 
862
  .wppb-form-field.wppb-subscription-plans input {
863
  display: inline-block;
864
- width: auto;
865
  float: none;
866
  margin-right: 10px !important;
867
  }
185
  float:left;
186
  min-height:1px;
187
  }
 
188
  .wppb-form-field input[type="text"], .wppb-form-field input[type="number"], .wppb-form-field input[type="email"], .wppb-form-field input[type="url"], .wppb-form-field input[type="password"], .wppb-form-field input[type="search"],
189
  .wppb-form-field select,
190
  .wppb-form-field textarea,
212
 
213
  input#send_credentials_via_email{
214
  float:none;
 
215
  margin-right:10px
216
  }
217
 
280
  .wppb-radios li input{
281
  min-width:0;
282
  float:none;
 
283
  }
284
 
285
  .wppb-edit-user .wppb-checkbox-terms-and-conditions {
300
 
301
  .wppb-form-field.wppb-checkbox-terms-and-conditions input[type="checkbox"].custom_field_toa {
302
  float:none;
 
303
  margin-right:10px
304
  }
305
 
352
 
353
  .wppb-gdpr-checkbox.wppb-form-field #user_consent_gdpr{
354
  float:none;
 
355
  margin:0 10px 0 0;
356
  }
357
 
856
 
857
  .wppb-form-field.wppb-subscription-plans input {
858
  display: inline-block;
 
859
  float: none;
860
  margin-right: 10px !important;
861
  }
assets/misc/elementor/widgets/class-pb-widget-rf-epf.php CHANGED
@@ -75,6 +75,8 @@ abstract class PB_Elementor_Register_Edit_Profile_Widget extends PB_Elementor_Wi
75
  return;
76
  }
77
 
 
 
78
  $this->start_controls_section(
79
  $section_id_prefix.'_settings_section',
80
  array(
@@ -83,10 +85,6 @@ abstract class PB_Elementor_Register_Edit_Profile_Widget extends PB_Elementor_Wi
83
  )
84
  );
85
 
86
- $args = array(
87
- 'post_type' => $post_type,
88
- 'posts_per_page' => -1
89
- );
90
  $edit_form_links = array(
91
  'default' => ''
92
  );
@@ -100,16 +98,37 @@ abstract class PB_Elementor_Register_Edit_Profile_Widget extends PB_Elementor_Wi
100
  $social_connect_settings = reset($social_connect_settings);
101
  $social_connect = [];
102
 
103
- $the_query = new WP_Query( $args );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
105
- if ( $the_query->have_posts() ) {
106
- foreach ( $the_query->posts as $post ) {
107
- $form_titles ['-'.Wordpress_Creation_Kit_PB::wck_generate_slug( $post->post_title )] = $post->post_title ;
108
- $edit_form_links[ Wordpress_Creation_Kit_PB::wck_generate_slug( $post->post_title )] = get_edit_post_link($post->ID);
109
- $form_fields [ Wordpress_Creation_Kit_PB::wck_generate_slug( $post->post_title )] = get_post_meta($post->ID, $fields_post_meta_key, true);
110
- $social_connect [ Wordpress_Creation_Kit_PB::wck_generate_slug( $post->post_title )] = get_post_meta($post->ID, 'wppb_sc_rf_epf_active', true);
 
 
111
  }
112
- wp_reset_postdata();
113
  }
114
 
115
  $this->add_control(
75
  return;
76
  }
77
 
78
+ $wppb_module_settings = get_option( 'wppb_module_settings', 'not_found' );
79
+
80
  $this->start_controls_section(
81
  $section_id_prefix.'_settings_section',
82
  array(
85
  )
86
  );
87
 
 
 
 
 
88
  $edit_form_links = array(
89
  'default' => ''
90
  );
98
  $social_connect_settings = reset($social_connect_settings);
99
  $social_connect = [];
100
 
101
+ if ( !( ( $wppb_module_settings !== 'not_found' && ( (
102
+ $form_type === 'rf' && (
103
+ !isset( $wppb_module_settings['wppb_multipleRegistrationForms'] ) ||
104
+ $wppb_module_settings['wppb_multipleRegistrationForms'] !== 'show'
105
+ )
106
+ ) || (
107
+ $form_type === 'epf' && (
108
+ !isset( $wppb_module_settings['wppb_multipleEditProfileForms'] ) ||
109
+ $wppb_module_settings['wppb_multipleEditProfileForms'] !== 'show'
110
+ )
111
+ ) )
112
+ ) ||
113
+ $wppb_module_settings === 'not_found'
114
+ )
115
+ ){
116
+ $args = array(
117
+ 'post_type' => $post_type,
118
+ 'posts_per_page' => -1
119
+ );
120
+
121
+ $the_query = new WP_Query( $args );
122
 
123
+ if ( $the_query->have_posts() ) {
124
+ foreach ( $the_query->posts as $post ) {
125
+ $form_titles ['-'.Wordpress_Creation_Kit_PB::wck_generate_slug( $post->post_title )] = $post->post_title ;
126
+ $edit_form_links[ Wordpress_Creation_Kit_PB::wck_generate_slug( $post->post_title )] = get_edit_post_link($post->ID);
127
+ $form_fields [ Wordpress_Creation_Kit_PB::wck_generate_slug( $post->post_title )] = get_post_meta($post->ID, $fields_post_meta_key, true);
128
+ $social_connect [ Wordpress_Creation_Kit_PB::wck_generate_slug( $post->post_title )] = get_post_meta($post->ID, 'wppb_sc_rf_epf_active', true);
129
+ }
130
+ wp_reset_postdata();
131
  }
 
132
  }
133
 
134
  $this->add_control(
features/email-confirmation/email-confirmation.php CHANGED
@@ -310,8 +310,8 @@ function wppb_add_meta_to_user_on_activation( $user_id, $password, $meta ){
310
 
311
  $selected_values = '';
312
  if (!empty($meta[wppb_handle_meta_name($value['meta-name'])]) && is_array($meta[wppb_handle_meta_name($value['meta-name'])])) {
313
- foreach ($meta[wppb_handle_meta_name($value['meta-name'])] as $key => $value)
314
- $selected_values .= sanitize_text_field($value) . ',';
315
  }
316
 
317
  update_user_meta( $user_id, $value['meta-name'], trim( $selected_values, ',' ) );
310
 
311
  $selected_values = '';
312
  if (!empty($meta[wppb_handle_meta_name($value['meta-name'])]) && is_array($meta[wppb_handle_meta_name($value['meta-name'])])) {
313
+ foreach ($meta[wppb_handle_meta_name($value['meta-name'])] as $selected_key => $selected_value)
314
+ $selected_values .= sanitize_text_field($selected_value) . ',';
315
  }
316
 
317
  update_user_meta( $user_id, $value['meta-name'], trim( $selected_values, ',' ) );
front-end/class-formbuilder.php CHANGED
@@ -484,7 +484,7 @@ class Profile_Builder_Form_Creator{
484
  echo apply_filters( 'wppb_' . $this->args['form_type'] . '_form_content', $form_content );
485
  }
486
 
487
- function wppb_output_form_fields( $global_request, $field_check_errors, $form_fields, $called_from = NULL ){
488
  $wppb_generalSettings = get_option( 'wppb_general_settings' );
489
  $output_fields = '';
490
 
@@ -517,7 +517,9 @@ class Profile_Builder_Form_Creator{
517
  $output_fields .= apply_filters( 'wppb_output_after_form_field', '</li>', $field, $this->args['ID'], $this->args['form_type'], $called_from );
518
  }
519
 
520
- $output_fields .= apply_filters( 'wppb_output_after_last_form_field', '', $this->args['ID'], $this->args['form_type'], $called_from );
 
 
521
  }
522
 
523
  return apply_filters( 'wppb_output_fields_filter', $output_fields );
484
  echo apply_filters( 'wppb_' . $this->args['form_type'] . '_form_content', $form_content );
485
  }
486
 
487
+ function wppb_output_form_fields( $global_request, $field_check_errors, $form_fields, $called_from = NULL, $is_repeater_group = false ){
488
  $wppb_generalSettings = get_option( 'wppb_general_settings' );
489
  $output_fields = '';
490
 
517
  $output_fields .= apply_filters( 'wppb_output_after_form_field', '</li>', $field, $this->args['ID'], $this->args['form_type'], $called_from );
518
  }
519
 
520
+ if ( !$is_repeater_group ) {
521
+ $output_fields .= apply_filters('wppb_output_after_last_form_field', '', $this->args['ID'], $this->args['form_type'], $called_from);
522
+ }
523
  }
524
 
525
  return apply_filters( 'wppb_output_fields_filter', $output_fields );
front-end/default-fields/blog-details/blog-details.php CHANGED
@@ -28,7 +28,7 @@ function wppb_blog_details_handler( $output, $form_location, $field, $user_id, $
28
  $output = '<ul>';
29
 
30
  $item_description = wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_description_translation', $field['description'] );
31
- $heading = '<li class="wppb-form-field wppb-blog-details-heading"><h4>'.wppb_icl_t('plugin profile-builder-pro', 'custom_field_'.$field['id'].'_title_translation', $field['field-title']).'</h4><span class="wppb-description-delimiter">'.$item_description.'</span></li>';
32
  $output .= apply_filters( 'wppb_blog_details_heading', $heading );
33
 
34
 
28
  $output = '<ul>';
29
 
30
  $item_description = wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_description_translation', $field['description'] );
31
+ $heading = '<li class="wppb-form-field wppb-blog-details-heading"><h4>'.wppb_icl_t('plugin profile-builder-pro', 'default_field_'.$field['id'].'_title_translation', $field['field-title']).'</h4><span class="wppb-description-delimiter">'.$item_description.'</span></li>';
32
  $output .= apply_filters( 'wppb_blog_details_heading', $heading );
33
 
34
 
front-end/default-fields/headings/about-yourself.php CHANGED
@@ -3,7 +3,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
 
4
  function wppb_default_about_yourself_handler( $output, $form_location, $field, $user_id, $field_check_errors, $request_data ){
5
  if ( $field['field'] == 'Default - About Yourself (Heading)' ){
6
- $item_title = apply_filters( 'wppb_'.$form_location.'_default_heading_about_yourself_'.$field['id'].'_item_title', wppb_icl_t( 'plugin profile-builder-pro', 'custom_field_'.$field['id'].'_title_translation', $field['field-title'] ) );
7
  $item_description = wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_description_translation', $field['description'] );
8
 
9
  $output = '<h4>'.$item_title.'</h4><span class="wppb-description-delimiter '. apply_filters( 'wppb_fields_extra_css_class', '', $field ) .'">'.$item_description.'</span>';
3
 
4
  function wppb_default_about_yourself_handler( $output, $form_location, $field, $user_id, $field_check_errors, $request_data ){
5
  if ( $field['field'] == 'Default - About Yourself (Heading)' ){
6
+ $item_title = apply_filters( 'wppb_'.$form_location.'_default_heading_about_yourself_'.$field['id'].'_item_title', wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_title_translation', $field['field-title'] ) );
7
  $item_description = wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_description_translation', $field['description'] );
8
 
9
  $output = '<h4>'.$item_title.'</h4><span class="wppb-description-delimiter '. apply_filters( 'wppb_fields_extra_css_class', '', $field ) .'">'.$item_description.'</span>';
front-end/default-fields/headings/contact-info.php CHANGED
@@ -3,7 +3,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
 
4
  function wppb_default_contact_info_handler( $output, $form_location, $field, $user_id, $field_check_errors, $request_data ){
5
  if ( $field['field'] == 'Default - Contact Info (Heading)' ){
6
- $item_title = apply_filters( 'wppb_'.$form_location.'_default_heading_contact_info_'.$field['id'].'_item_title', wppb_icl_t( 'plugin profile-builder-pro', 'custom_field_'.$field['id'].'_title_translation', $field['field-title'] ) );
7
  $item_description = wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_description_translation', $field['description'] );
8
 
9
  $ret_custom_field = '<h4>'.$item_title.'</h4><span class="wppb-description-delimiter '. apply_filters( 'wppb_fields_extra_css_class', '', $field ) .'">'.$item_description.'</span>';
3
 
4
  function wppb_default_contact_info_handler( $output, $form_location, $field, $user_id, $field_check_errors, $request_data ){
5
  if ( $field['field'] == 'Default - Contact Info (Heading)' ){
6
+ $item_title = apply_filters( 'wppb_'.$form_location.'_default_heading_contact_info_'.$field['id'].'_item_title', wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_title_translation', $field['field-title'] ) );
7
  $item_description = wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_description_translation', $field['description'] );
8
 
9
  $ret_custom_field = '<h4>'.$item_title.'</h4><span class="wppb-description-delimiter '. apply_filters( 'wppb_fields_extra_css_class', '', $field ) .'">'.$item_description.'</span>';
front-end/default-fields/headings/name.php CHANGED
@@ -3,7 +3,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
 
4
  function wppb_default_name_handler( $output, $form_location, $field, $user_id, $field_check_errors, $request_data ){
5
  if ( $field['field'] == 'Default - Name (Heading)' ){
6
- $item_title = apply_filters( 'wppb_'.$form_location.'_default_heading_name_'.$field['id'].'_item_title', wppb_icl_t( 'plugin profile-builder-pro', 'custom_field_'.$field['id'].'_title_translation', $field['field-title'] ) );
7
  $item_description = wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_description_translation', $field['description'] );
8
 
9
  $ret_custom_field = '<h4>'.$item_title.'</h4><span class="wppb-description-delimiter '. apply_filters( 'wppb_fields_extra_css_class', '', $field ) .'">'.$item_description.'</span>';
3
 
4
  function wppb_default_name_handler( $output, $form_location, $field, $user_id, $field_check_errors, $request_data ){
5
  if ( $field['field'] == 'Default - Name (Heading)' ){
6
+ $item_title = apply_filters( 'wppb_'.$form_location.'_default_heading_name_'.$field['id'].'_item_title', wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_title_translation', $field['field-title'] ) );
7
  $item_description = wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_description_translation', $field['description'] );
8
 
9
  $ret_custom_field = '<h4>'.$item_title.'</h4><span class="wppb-description-delimiter '. apply_filters( 'wppb_fields_extra_css_class', '', $field ) .'">'.$item_description.'</span>';
front-end/login.php CHANGED
@@ -341,12 +341,13 @@ function wppb_login_redirect( $redirect_to, $requested_redirect_to, $user ){
341
  }
342
 
343
  $error_string = apply_filters('wppb_login_wp_error_message', $error_string, $user);
 
344
 
345
  // encode the error string and send it as a GET parameter
346
  if ( isset($_POST['wppb_referer_url']) && $_POST['wppb_referer_url'] !== '' ) {
347
- $arr_params = array('loginerror' => urlencode(base64_encode($error_string)), 'request_form_location' => $request_form_location, 'wppb_referer_url' => urlencode(esc_url( $_POST['wppb_referer_url'] )));
348
  } else {
349
- $arr_params = array('loginerror' => urlencode(base64_encode($error_string)), 'request_form_location' => $request_form_location);
350
  }
351
 
352
  $redirect_to = add_query_arg($arr_params, $redirect_to);
@@ -422,14 +423,16 @@ function wppb_front_end_login( $atts ){
422
  $login_form = '';
423
 
424
  // display our login errors
425
- if( isset( $_GET['loginerror'] ) || isset( $_POST['loginerror'] ) ){
426
- $loginerror = '<p class="wppb-error">'. wp_kses_post( urldecode( base64_decode( isset( $_GET['loginerror'] ) ? $_GET['loginerror'] : $_POST['loginerror'] ) ) ) .'</p><!-- .error -->';
427
- if( isset( $_GET['request_form_location'] ) ){
428
- if( $_GET['request_form_location'] === 'widget' && !in_the_loop() ){
429
- $login_form .= $loginerror;
430
- }
431
- elseif( $_GET['request_form_location'] === 'page' && in_the_loop() ){
432
- $login_form .= $loginerror;
 
 
433
  }
434
  }
435
  }
341
  }
342
 
343
  $error_string = apply_filters('wppb_login_wp_error_message', $error_string, $user);
344
+ $wppb_error_string_nonce = wp_create_nonce( 'wppb_login_error_'. $error_string );
345
 
346
  // encode the error string and send it as a GET parameter
347
  if ( isset($_POST['wppb_referer_url']) && $_POST['wppb_referer_url'] !== '' ) {
348
+ $arr_params = array('loginerror' => urlencode(base64_encode($error_string)), '_wpnonce' => $wppb_error_string_nonce, 'request_form_location' => $request_form_location, 'wppb_referer_url' => urlencode(esc_url( $_POST['wppb_referer_url'] )));
349
  } else {
350
+ $arr_params = array('loginerror' => urlencode(base64_encode($error_string)), '_wpnonce' => $wppb_error_string_nonce, 'request_form_location' => $request_form_location);
351
  }
352
 
353
  $redirect_to = add_query_arg($arr_params, $redirect_to);
423
  $login_form = '';
424
 
425
  // display our login errors
426
+ if( ( isset( $_GET['loginerror'] ) || isset( $_POST['loginerror'] ) ) && isset( $_GET['_wpnonce'] ) ){
427
+ $error_string = urldecode( base64_decode( isset( $_GET['loginerror'] ) ? $_GET['loginerror'] : $_POST['loginerror'] ) );
428
+ if( wp_verify_nonce( $_GET['_wpnonce'], 'wppb_login_error_'. $error_string ) ) {
429
+ $loginerror = '<p class="wppb-error">' . wp_kses_post($error_string) . '</p><!-- .error -->';
430
+ if (isset($_GET['request_form_location'])) {
431
+ if ($_GET['request_form_location'] === 'widget' && !in_the_loop()) {
432
+ $login_form .= $loginerror;
433
+ } elseif ($_GET['request_form_location'] === 'page' && in_the_loop()) {
434
+ $login_form .= $loginerror;
435
+ }
436
  }
437
  }
438
  }
front-end/logout.php CHANGED
@@ -13,7 +13,7 @@
13
 
14
  $current_user = get_userdata( get_current_user_id() );
15
 
16
- extract( shortcode_atts( array( 'text' => sprintf( __('You are currently logged in as %s. ','profile-builder') ,$current_user->user_login) , 'redirect' => '', 'redirect_url' => wppb_curpageurl(), 'redirect_priority' => 'normal', 'link_text' => __('Log out &raquo;','profile-builder')), $atts ) );
17
 
18
  if( ! empty( $redirect ) ) {
19
  $redirect_url = $redirect;
@@ -23,6 +23,9 @@
23
  $redirect_url = wppb_get_redirect_url( $redirect_priority, 'after_logout', $redirect_url, $current_user );
24
  $redirect_url = apply_filters( 'wppb_after_logout_redirect_url', $redirect_url );
25
 
 
 
 
26
  $logout_link = '<a href="' . wp_logout_url( $redirect_url ) . '" class="wppb-logout-url" title="' . __( 'Log out of this account', 'profile-builder' ) . '">' . $link_text . '</a>';
27
 
28
  $meta_tags = apply_filters( 'wppb_front_end_logout_meta_tags', array( '{{meta_user_name}}', '{{meta_first_name}}', '{{meta_last_name}}', '{{meta_display_name}}' ) );
13
 
14
  $current_user = get_userdata( get_current_user_id() );
15
 
16
+ extract( shortcode_atts( array( 'text' => sprintf( __('You are currently logged in as %s. ','profile-builder') ,$current_user->user_login) , 'redirect' => '', 'redirect_url' => wppb_curpageurl(), 'redirect_priority' => 'normal', 'link_text' => __('Log out &raquo;','profile-builder'), 'url_only' => '' ), $atts ) );
17
 
18
  if( ! empty( $redirect ) ) {
19
  $redirect_url = $redirect;
23
  $redirect_url = wppb_get_redirect_url( $redirect_priority, 'after_logout', $redirect_url, $current_user );
24
  $redirect_url = apply_filters( 'wppb_after_logout_redirect_url', $redirect_url );
25
 
26
+ if( isset( $url_only ) && $url_only == 'yes' )
27
+ return wp_logout_url( $redirect_url );
28
+
29
  $logout_link = '<a href="' . wp_logout_url( $redirect_url ) . '" class="wppb-logout-url" title="' . __( 'Log out of this account', 'profile-builder' ) . '">' . $link_text . '</a>';
30
 
31
  $meta_tags = apply_filters( 'wppb_front_end_logout_meta_tags', array( '{{meta_user_name}}', '{{meta_first_name}}', '{{meta_last_name}}', '{{meta_display_name}}' ) );
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Profile Builder
4
  Plugin URI: https://www.cozmoslabs.com/wordpress-profile-builder/
5
  Description: Login, registration and edit profile shortcodes for the front-end. Also you can choose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
- Version: 3.3.9
7
  Author: Cozmoslabs
8
  Author URI: https://www.cozmoslabs.com/
9
  Text Domain: profile-builder
@@ -70,7 +70,7 @@ function wppb_free_plugin_init() {
70
  *
71
  *
72
  */
73
- define('PROFILE_BUILDER_VERSION', '3.3.9' );
74
  define('WPPB_PLUGIN_DIR', plugin_dir_path(__FILE__));
75
  define('WPPB_PLUGIN_URL', plugin_dir_url(__FILE__));
76
  define('WPPB_PLUGIN_BASENAME', plugin_basename(__FILE__));
3
  Plugin Name: Profile Builder
4
  Plugin URI: https://www.cozmoslabs.com/wordpress-profile-builder/
5
  Description: Login, registration and edit profile shortcodes for the front-end. Also you can choose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
+ Version: 3.4.0
7
  Author: Cozmoslabs
8
  Author URI: https://www.cozmoslabs.com/
9
  Text Domain: profile-builder
70
  *
71
  *
72
  */
73
+ define('PROFILE_BUILDER_VERSION', '3.4.0' );
74
  define('WPPB_PLUGIN_DIR', plugin_dir_path(__FILE__));
75
  define('WPPB_PLUGIN_URL', plugin_dir_url(__FILE__));
76
  define('WPPB_PLUGIN_BASENAME', plugin_basename(__FILE__));
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.cozmoslabs.com/wordpress-profile-builder/
4
  Tags: user registration, user profile, user registration form, user fields, registration, edit profile, user custom fields, front-end login, front-end edit profile, front-end user registration, email confirmation, login form, content restriction, restrict content, profile
5
  Requires at least: 3.1
6
  Tested up to: 5.6.2
7
- Stable tag: 3.3.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -170,6 +170,13 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
170
  15. Edit or Add New User Role
171
 
172
  == Changelog ==
 
 
 
 
 
 
 
173
  = 3.3.9 =
174
  * Added further support for Elementor styling
175
  * Fixed some possible warnings
4
  Tags: user registration, user profile, user registration form, user fields, registration, edit profile, user custom fields, front-end login, front-end edit profile, front-end user registration, email confirmation, login form, content restriction, restrict content, profile
5
  Requires at least: 3.1
6
  Tested up to: 5.6.2
7
+ Stable tag: 3.4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
170
  15. Edit or Add New User Role
171
 
172
  == Changelog ==
173
+ = 3.4.0 =
174
+ * Provided more information on the type of reCAPTCHA in Form Fields to avoid confusion
175
+ * Fixed a compatibility issue with Twenty Twenty-one theme
176
+ * Rectify WPML string names for some default fields
177
+ * Added 'url_only' parameter for [wppb-logout] shortcode to output a simple url
178
+ * Fixed a security issue regarding login form error
179
+
180
  = 3.3.9 =
181
  * Added further support for Elementor styling
182
  * Fixed some possible warnings
translation/profile-builder.catalog.php CHANGED
@@ -562,7 +562,7 @@
562
  <?php __("Labels", "profile-builder"); ?>
563
  <?php __("Enter a comma separated list of labels<br/>Visible for the user", "profile-builder"); ?>
564
  <?php __("reCAPTCHA Type", "profile-builder"); ?>
565
- <?php __("Choose the <a href=\"https://developers.google.com/recaptcha/docs/versions\" target=\"_blank\">type of reCAPTCHA</a> you wish to add to this site.", "profile-builder"); ?>
566
  <?php __("Site Key", "profile-builder"); ?>
567
  <?php __("The site key from Google, <a href=\"http://www.google.com/recaptcha\" target=\"_blank\">www.google.com/recaptcha</a>", "profile-builder"); ?>
568
  <?php __("Secret Key", "profile-builder"); ?>
562
  <?php __("Labels", "profile-builder"); ?>
563
  <?php __("Enter a comma separated list of labels<br/>Visible for the user", "profile-builder"); ?>
564
  <?php __("reCAPTCHA Type", "profile-builder"); ?>
565
+ <?php __("Choose the <a href=\"https://developers.google.com/recaptcha/docs/versions\" target=\"_blank\">type of reCAPTCHA</a> you wish to add to this site.<br/>Please note that the Invisible reCAPTCHA is a type of reCAPTCHA v2.", "profile-builder"); ?>
566
  <?php __("Site Key", "profile-builder"); ?>
567
  <?php __("The site key from Google, <a href=\"http://www.google.com/recaptcha\" target=\"_blank\">www.google.com/recaptcha</a>", "profile-builder"); ?>
568
  <?php __("Secret Key", "profile-builder"); ?>
translation/profile-builder.pot CHANGED
@@ -361,7 +361,7 @@ msgstr ""
361
  msgid "Edit Profile"
362
  msgstr ""
363
 
364
- #: ../pb-add-on-custom-profile-menus/index.php:311, ../pb-add-on-custom-profile-menus/wppb-custom-profile-menus.php:74, front-end/class-formbuilder.php:449, front-end/login.php:446, assets/misc/elementor/widgets/class-pb-widget-rf.php:32
365
  msgid "Register"
366
  msgstr ""
367
 
@@ -1570,7 +1570,7 @@ msgstr ""
1570
  msgid "User-Role"
1571
  msgstr ""
1572
 
1573
- #: admin/admin-bar.php:79, add-ons/multiple-forms/edit-profile-forms.php:206, add-ons/multiple-forms/register-forms.php:230, assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:94
1574
  msgid "Default"
1575
  msgstr ""
1576
 
@@ -2094,11 +2094,11 @@ msgstr ""
2094
  msgid "Username and Email"
2095
  msgstr ""
2096
 
2097
- #: admin/general-settings.php:296, admin/manage-fields.php:330, front-end/login.php:255, front-end/login.php:269, front-end/login.php:415, add-ons/custom-redirects/custom_redirects_admin.php:60, add-ons/email-customizer/email-customizer.php:28, add-ons/user-listing/userlisting.php:112, add-ons/user-listing/userlisting.php:328, add-ons/user-listing/userlisting.php:828, add-ons/user-listing/userlisting.php:2398, features/admin-approval/class-admin-approval.php:166, features/email-confirmation/class-email-confirmation.php:168, admin/advanced-settings/includes/views/view-fields.php:121
2098
  msgid "Username"
2099
  msgstr ""
2100
 
2101
- #: admin/general-settings.php:297, front-end/login.php:412, front-end/recover.php:119, add-ons/email-customizer/email-customizer.php:29, add-ons/user-listing/userlisting.php:118, add-ons/user-listing/userlisting.php:834, add-ons/user-listing/userlisting.php:2399, features/admin-approval/class-admin-approval.php:169, features/email-confirmation/class-email-confirmation.php:169, admin/advanced-settings/includes/shortcodes/resend-activation.php:9
2102
  msgid "Email"
2103
  msgstr ""
2104
 
@@ -2271,7 +2271,7 @@ msgid "reCAPTCHA Type"
2271
  msgstr ""
2272
 
2273
  #: admin/manage-fields.php:197
2274
- msgid "Choose the <a href=\"https://developers.google.com/recaptcha/docs/versions\" target=\"_blank\">type of reCAPTCHA</a> you wish to add to this site."
2275
  msgstr ""
2276
 
2277
  #: admin/manage-fields.php:198
@@ -4606,7 +4606,7 @@ msgstr ""
4606
  msgid "Only an administrator can add new users."
4607
  msgstr ""
4608
 
4609
- #: front-end/class-formbuilder.php:290, front-end/login.php:504
4610
  msgid "You are not allowed to do this."
4611
  msgstr ""
4612
 
@@ -4638,23 +4638,23 @@ msgstr ""
4638
  msgid "Add User"
4639
  msgstr ""
4640
 
4641
- #: front-end/class-formbuilder.php:532
4642
  msgid "Send these credentials via email."
4643
  msgstr ""
4644
 
4645
- #: front-end/class-formbuilder.php:767
4646
  msgid "There are no other users to edit"
4647
  msgstr ""
4648
 
4649
- #: front-end/class-formbuilder.php:749
4650
  msgid "User to edit:"
4651
  msgstr ""
4652
 
4653
- #: front-end/class-formbuilder.php:751
4654
  msgid "Select User"
4655
  msgstr ""
4656
 
4657
- #: front-end/class-formbuilder.php:793
4658
  msgid "Something went wrong. Please try again!"
4659
  msgstr ""
4660
 
@@ -4682,7 +4682,7 @@ msgstr ""
4682
  msgid "Password Lost and Found."
4683
  msgstr ""
4684
 
4685
- #: front-end/login.php:334, front-end/login.php:452
4686
  msgid "Lost your password?"
4687
  msgstr ""
4688
 
@@ -4690,19 +4690,19 @@ msgstr ""
4690
  msgid "Both fields are empty."
4691
  msgstr ""
4692
 
4693
- #: front-end/login.php:491, front-end/logout.php:26
4694
  msgid "Log out of this account"
4695
  msgstr ""
4696
 
4697
- #: front-end/login.php:491, front-end/logout.php:16
4698
  msgid "Log out &raquo;"
4699
  msgstr ""
4700
 
4701
- #: front-end/login.php:492
4702
  msgid "You are currently logged in as %1$s. %2$s"
4703
  msgstr ""
4704
 
4705
- #: front-end/login.php:419, front-end/recover.php:123
4706
  msgid "Username or Email"
4707
  msgstr ""
4708
 
@@ -7218,7 +7218,7 @@ msgstr ""
7218
  msgid "Radius"
7219
  msgstr ""
7220
 
7221
- #: assets/misc/elementor/widgets/class-pb-widget-l.php:46, assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:81, assets/misc/elementor/widgets/class-pb-widget-rp.php:46
7222
  msgid "Form Settings"
7223
  msgstr ""
7224
 
@@ -7226,35 +7226,35 @@ msgstr ""
7226
  msgid "Registration"
7227
  msgstr ""
7228
 
7229
- #: assets/misc/elementor/widgets/class-pb-widget-l.php:56, assets/misc/elementor/widgets/class-pb-widget-l.php:65, assets/misc/elementor/widgets/class-pb-widget-l.php:84, assets/misc/elementor/widgets/class-pb-widget-l.php:93, assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:207, assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:226
7230
  msgid "Enter URL"
7231
  msgstr ""
7232
 
7233
- #: assets/misc/elementor/widgets/class-pb-widget-l.php:74, assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:195
7234
  msgid "Redirects"
7235
  msgstr ""
7236
 
7237
- #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:118
7238
  msgid "Form"
7239
  msgstr ""
7240
 
7241
- #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:137
7242
  msgid "Assigned Role"
7243
  msgstr ""
7244
 
7245
- #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:150
7246
  msgid "Automatic Login"
7247
  msgstr ""
7248
 
7249
- #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:215
7250
  msgid "Redirect after Edit Profile"
7251
  msgstr ""
7252
 
7253
- #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:213
7254
  msgid "Redirect after Registration"
7255
  msgstr ""
7256
 
7257
- #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:224
7258
  msgid "Redirect after Logout"
7259
  msgstr ""
7260
 
361
  msgid "Edit Profile"
362
  msgstr ""
363
 
364
+ #: ../pb-add-on-custom-profile-menus/index.php:311, ../pb-add-on-custom-profile-menus/wppb-custom-profile-menus.php:74, front-end/class-formbuilder.php:449, front-end/login.php:449, assets/misc/elementor/widgets/class-pb-widget-rf.php:32
365
  msgid "Register"
366
  msgstr ""
367
 
1570
  msgid "User-Role"
1571
  msgstr ""
1572
 
1573
+ #: admin/admin-bar.php:79, add-ons/multiple-forms/edit-profile-forms.php:206, add-ons/multiple-forms/register-forms.php:230, assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:92
1574
  msgid "Default"
1575
  msgstr ""
1576
 
2094
  msgid "Username and Email"
2095
  msgstr ""
2096
 
2097
+ #: admin/general-settings.php:296, admin/manage-fields.php:330, front-end/login.php:255, front-end/login.php:269, front-end/login.php:416, add-ons/custom-redirects/custom_redirects_admin.php:60, add-ons/email-customizer/email-customizer.php:28, add-ons/user-listing/userlisting.php:112, add-ons/user-listing/userlisting.php:328, add-ons/user-listing/userlisting.php:828, add-ons/user-listing/userlisting.php:2398, features/admin-approval/class-admin-approval.php:166, features/email-confirmation/class-email-confirmation.php:168, admin/advanced-settings/includes/views/view-fields.php:121
2098
  msgid "Username"
2099
  msgstr ""
2100
 
2101
+ #: admin/general-settings.php:297, front-end/login.php:413, front-end/recover.php:119, add-ons/email-customizer/email-customizer.php:29, add-ons/user-listing/userlisting.php:118, add-ons/user-listing/userlisting.php:834, add-ons/user-listing/userlisting.php:2399, features/admin-approval/class-admin-approval.php:169, features/email-confirmation/class-email-confirmation.php:169, admin/advanced-settings/includes/shortcodes/resend-activation.php:9
2102
  msgid "Email"
2103
  msgstr ""
2104
 
2271
  msgstr ""
2272
 
2273
  #: admin/manage-fields.php:197
2274
+ msgid "Choose the <a href=\"https://developers.google.com/recaptcha/docs/versions\" target=\"_blank\">type of reCAPTCHA</a> you wish to add to this site.<br/>Please note that the Invisible reCAPTCHA is a type of reCAPTCHA v2."
2275
  msgstr ""
2276
 
2277
  #: admin/manage-fields.php:198
4606
  msgid "Only an administrator can add new users."
4607
  msgstr ""
4608
 
4609
+ #: front-end/class-formbuilder.php:290, front-end/login.php:507
4610
  msgid "You are not allowed to do this."
4611
  msgstr ""
4612
 
4638
  msgid "Add User"
4639
  msgstr ""
4640
 
4641
+ #: front-end/class-formbuilder.php:534
4642
  msgid "Send these credentials via email."
4643
  msgstr ""
4644
 
4645
+ #: front-end/class-formbuilder.php:769
4646
  msgid "There are no other users to edit"
4647
  msgstr ""
4648
 
4649
+ #: front-end/class-formbuilder.php:751
4650
  msgid "User to edit:"
4651
  msgstr ""
4652
 
4653
+ #: front-end/class-formbuilder.php:753
4654
  msgid "Select User"
4655
  msgstr ""
4656
 
4657
+ #: front-end/class-formbuilder.php:795
4658
  msgid "Something went wrong. Please try again!"
4659
  msgstr ""
4660
 
4682
  msgid "Password Lost and Found."
4683
  msgstr ""
4684
 
4685
+ #: front-end/login.php:334, front-end/login.php:455
4686
  msgid "Lost your password?"
4687
  msgstr ""
4688
 
4690
  msgid "Both fields are empty."
4691
  msgstr ""
4692
 
4693
+ #: front-end/login.php:494, front-end/logout.php:29
4694
  msgid "Log out of this account"
4695
  msgstr ""
4696
 
4697
+ #: front-end/login.php:494, front-end/logout.php:16
4698
  msgid "Log out &raquo;"
4699
  msgstr ""
4700
 
4701
+ #: front-end/login.php:495
4702
  msgid "You are currently logged in as %1$s. %2$s"
4703
  msgstr ""
4704
 
4705
+ #: front-end/login.php:420, front-end/recover.php:123
4706
  msgid "Username or Email"
4707
  msgstr ""
4708
 
7218
  msgid "Radius"
7219
  msgstr ""
7220
 
7221
+ #: assets/misc/elementor/widgets/class-pb-widget-l.php:46, assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:83, assets/misc/elementor/widgets/class-pb-widget-rp.php:46
7222
  msgid "Form Settings"
7223
  msgstr ""
7224
 
7226
  msgid "Registration"
7227
  msgstr ""
7228
 
7229
+ #: assets/misc/elementor/widgets/class-pb-widget-l.php:56, assets/misc/elementor/widgets/class-pb-widget-l.php:65, assets/misc/elementor/widgets/class-pb-widget-l.php:84, assets/misc/elementor/widgets/class-pb-widget-l.php:93, assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:226, assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:245
7230
  msgid "Enter URL"
7231
  msgstr ""
7232
 
7233
+ #: assets/misc/elementor/widgets/class-pb-widget-l.php:74, assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:214
7234
  msgid "Redirects"
7235
  msgstr ""
7236
 
7237
+ #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:137
7238
  msgid "Form"
7239
  msgstr ""
7240
 
7241
+ #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:156
7242
  msgid "Assigned Role"
7243
  msgstr ""
7244
 
7245
+ #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:169
7246
  msgid "Automatic Login"
7247
  msgstr ""
7248
 
7249
+ #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:234
7250
  msgid "Redirect after Edit Profile"
7251
  msgstr ""
7252
 
7253
+ #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:232
7254
  msgid "Redirect after Registration"
7255
  msgstr ""
7256
 
7257
+ #: assets/misc/elementor/widgets/class-pb-widget-rf-epf.php:243
7258
  msgid "Redirect after Logout"
7259
  msgstr ""
7260