User registration & user profile – Profile Builder - Version 2.2.1

Version Description

  • Changed recover password link from using username to using the user-nicename
  • We no longer strip spaces from usernames on singele-site registration when Email Confirmation is on and we also do not allow usernames with spaces on multisite installs
  • Changed message in Manage Fields sidebar
  • Fixed issue that prevented sometimes 0 values to be saved
Download this release

Release Info

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

Code changes from version 2.1.9 to 2.2.1

admin/add-ons.php CHANGED
@@ -269,6 +269,8 @@ add_action( 'wp_ajax_wppb_add_on_deactivate', 'wppb_add_on_deactivate' );
269
  */
270
  function wppb_add_on_download_zip_file() {
271
 
 
 
272
  // Set the response to success and change it later if needed
273
  $response = $_POST['wppb_add_on_index'];
274
  $add_on_index = $response;
@@ -277,6 +279,9 @@ function wppb_add_on_download_zip_file() {
277
  $wppb_add_on_download_url = $_POST['wppb_add_on_download_url'];
278
  $wppb_add_on_zip_name = $_POST['wppb_add_on_zip_name'];
279
 
 
 
 
280
 
281
  // Get .zip file
282
  $remote_response = wp_remote_get( $wppb_add_on_download_url );
269
  */
270
  function wppb_add_on_download_zip_file() {
271
 
272
+ check_ajax_referer( 'wppb-activate-addon', 'nonce' );
273
+
274
  // Set the response to success and change it later if needed
275
  $response = $_POST['wppb_add_on_index'];
276
  $add_on_index = $response;
279
  $wppb_add_on_download_url = $_POST['wppb_add_on_download_url'];
280
  $wppb_add_on_zip_name = $_POST['wppb_add_on_zip_name'];
281
 
282
+ if( strpos( $wppb_add_on_download_url, 'http://www.cozmoslabs.com/' ) === false )
283
+ wp_die();
284
+
285
 
286
  // Get .zip file
287
  $remote_response = wp_remote_get( $wppb_add_on_download_url );
admin/general-settings.php CHANGED
@@ -119,7 +119,33 @@ function wppb_general_settings_content() {
119
  <ul>
120
  </td>
121
  </tr>
122
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  <?php } ?>
124
 
125
  <?php
@@ -217,4 +243,24 @@ function wppb_general_settings_sanitize( $wppb_generalSettings ) {
217
  function wppb_general_settings_admin_notices() {
218
  settings_errors( 'wppb_general_settings' );
219
  }
220
- add_action( 'admin_notices', 'wppb_general_settings_admin_notices' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  <ul>
120
  </td>
121
  </tr>
122
+
123
+ <tr class="dynamic2">
124
+ <th scope="row">
125
+ <?php _e( '"Admin Approval" on User Role:', 'profilebuilder' ); ?>
126
+ </th>
127
+ <td>
128
+ <div id="wrap">
129
+ <?php
130
+ $wppb_userRoles = wppb_adminApproval_onUserRole();
131
+
132
+ if( ! empty( $wppb_userRoles ) ) {
133
+ foreach( $wppb_userRoles as $role => $role_name ) {
134
+ echo '<label><input type="checkbox" id="adminApprovalOnUserRoleCheckbox" name="wppb_general_settings[adminApprovalOnUserRole][]" class="wppb-checkboxes" value="' . $role . '"';
135
+ if( ! empty( $wppb_generalSettings['adminApprovalOnUserRole'] ) && in_array( $role, $wppb_generalSettings['adminApprovalOnUserRole'] ) ) echo ' checked';
136
+ if( empty( $wppb_generalSettings['adminApprovalOnUserRole'] ) ) echo ' checked';
137
+ echo '>';
138
+ echo $role_name . '</label><br>';
139
+ }
140
+ }
141
+ ?>
142
+ </div>
143
+ <ul>
144
+ <li class="description"><?php printf( __( 'Select on what user roles to activate Admin Approval.', 'profilebuilder' ) ) ?></li>
145
+ <ul>
146
+ </td>
147
+ </tr>
148
+
149
  <?php } ?>
150
 
151
  <?php
243
  function wppb_general_settings_admin_notices() {
244
  settings_errors( 'wppb_general_settings' );
245
  }
246
+ add_action( 'admin_notices', 'wppb_general_settings_admin_notices' );
247
+
248
+
249
+ /*
250
+ * Function that return user roles
251
+ *
252
+ * @since v.2.2.0
253
+ *
254
+ * @return array
255
+ */
256
+ function wppb_adminApproval_onUserRole() {
257
+ global $wp_roles;
258
+
259
+ $wp_roles = new WP_Roles();
260
+
261
+ $roles = $wp_roles->get_names();
262
+
263
+ unset( $roles['administrator'] );
264
+
265
+ return $roles;
266
+ }
admin/manage-fields.php CHANGED
@@ -79,6 +79,15 @@ function wppb_manage_fields_submenu(){
79
  if( $user_role_slug !== 'administrator' )
80
  array_push( $user_roles, '%' . $user_role['name'] . '%' . $user_role_slug );
81
 
 
 
 
 
 
 
 
 
 
82
  // set up the fields array
83
  $fields = apply_filters( 'wppb_manage_fields', array(
84
 
@@ -104,7 +113,7 @@ function wppb_manage_fields_submenu(){
104
  array( 'type' => 'text', 'slug' => 'default-value', 'title' => __( 'Default Value', 'profilebuilder' ), 'description' => __( "Default value of the field", 'profilebuilder' ) ),
105
  array( 'type' => 'text', 'slug' => 'default-option', 'title' => __( 'Default Option', 'profilebuilder' ), 'description' => __( "Specify the option which should be selected by default", 'profilebuilder' ) ),
106
  array( 'type' => 'text', 'slug' => 'default-options', 'title' => __( 'Default Option(s)', 'profilebuilder' ), 'description' => __( "Specify the option which should be checked by default<br/>If there are multiple values, separate them with a ',' (comma)", 'profilebuilder' ) ),
107
- array( 'type' => 'select', 'slug' => 'default-option-country', 'title' => __( 'Default Option', 'profilebuilder' ), 'options' => wppb_country_select_options( 'back_end' ), 'description' => __( "Default option of the field", 'profilebuilder' ) ),
108
  array( 'type' => 'select', 'slug' => 'default-option-timezone', 'title' => __( 'Default Option', 'profilebuilder' ), 'options' => wppb_timezone_select_options( 'back_end' ), 'description' => __( "Default option of the field", 'profilebuilder' ) ),
109
  array( 'type' => 'textarea', 'slug' => 'default-content', 'title' => __( 'Default Content', 'profilebuilder' ), 'description' => __( "Default value of the textarea", 'profilebuilder' ) ),
110
  array( 'type' => 'select', 'slug' => 'required', 'title' => __( 'Required', 'profilebuilder' ), 'options' => array( 'No', 'Yes' ), 'default' => 'No', 'description' => __( 'Whether the field is required or not', 'profilebuilder' ) ),
@@ -213,6 +222,289 @@ function wppb_get_meta_name(){
213
  }
214
  }
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  /**
217
  * Function that returns a unique, incremented ID
218
  *
@@ -543,7 +835,14 @@ function wppb_add_content_before_manage_fields(){
543
  <li><strong class="nowrap">[wppb-edit-profile]</strong></li>
544
  <li><strong class="nowrap">[wppb-register role="author"]</strong></li>
545
  </ul>
546
- <p><?php _e("If you're interested in displaying different fields in the registration and edit profile forms, please use the Multiple Registration & Edit Profile Forms Addon.", 'profilebuilder'); ?></p>
 
 
 
 
 
 
 
547
  <?php
548
  }
549
  add_action('wck_metabox_content_wppb_manage_fields_info', 'wppb_add_content_before_manage_fields');
79
  if( $user_role_slug !== 'administrator' )
80
  array_push( $user_roles, '%' . $user_role['name'] . '%' . $user_role_slug );
81
 
82
+
83
+ // country select
84
+ $default_country_array = wppb_country_select_options( 'back_end' );
85
+ foreach( $default_country_array as $iso_country_code => $country_name ) {
86
+ $default_country_values[] = $iso_country_code;
87
+ $default_country_options[] = $country_name;
88
+ }
89
+
90
+
91
  // set up the fields array
92
  $fields = apply_filters( 'wppb_manage_fields', array(
93
 
113
  array( 'type' => 'text', 'slug' => 'default-value', 'title' => __( 'Default Value', 'profilebuilder' ), 'description' => __( "Default value of the field", 'profilebuilder' ) ),
114
  array( 'type' => 'text', 'slug' => 'default-option', 'title' => __( 'Default Option', 'profilebuilder' ), 'description' => __( "Specify the option which should be selected by default", 'profilebuilder' ) ),
115
  array( 'type' => 'text', 'slug' => 'default-options', 'title' => __( 'Default Option(s)', 'profilebuilder' ), 'description' => __( "Specify the option which should be checked by default<br/>If there are multiple values, separate them with a ',' (comma)", 'profilebuilder' ) ),
116
+ array( 'type' => 'select', 'slug' => 'default-option-country', 'title' => __( 'Default Option', 'profilebuilder' ), 'values' => ( isset( $default_country_values ) ) ? $default_country_values : '', 'options' => ( isset( $default_country_options ) ) ? $default_country_options : '', 'description' => __( "Default option of the field", 'profilebuilder' ) ),
117
  array( 'type' => 'select', 'slug' => 'default-option-timezone', 'title' => __( 'Default Option', 'profilebuilder' ), 'options' => wppb_timezone_select_options( 'back_end' ), 'description' => __( "Default option of the field", 'profilebuilder' ) ),
118
  array( 'type' => 'textarea', 'slug' => 'default-content', 'title' => __( 'Default Content', 'profilebuilder' ), 'description' => __( "Default value of the textarea", 'profilebuilder' ) ),
119
  array( 'type' => 'select', 'slug' => 'required', 'title' => __( 'Required', 'profilebuilder' ), 'options' => array( 'No', 'Yes' ), 'default' => 'No', 'description' => __( 'Whether the field is required or not', 'profilebuilder' ) ),
222
  }
223
  }
224
 
225
+
226
+ /**
227
+ * Function that returns an array with countries
228
+ *
229
+ * @since v.2.0
230
+ *
231
+ * @return array
232
+ */
233
+ function wppb_country_select_options( $form_location ) {
234
+ $country_array = apply_filters( 'wppb_'.$form_location.'_country_select_array',
235
+ array(
236
+ '' => '',
237
+ 'AF' => __( 'Afghanistan', 'profilebuilder' ),
238
+ 'AX' => __( 'Aland Islands', 'profilebuilder' ),
239
+ 'AL' => __( 'Albania', 'profilebuilder' ),
240
+ 'DZ' => __( 'Algeria', 'profilebuilder' ),
241
+ 'AS' => __( 'American Samoa', 'profilebuilder' ),
242
+ 'AD' => __( 'Andorra', 'profilebuilder' ),
243
+ 'AO' => __( 'Angola', 'profilebuilder' ),
244
+ 'AI' => __( 'Anguilla', 'profilebuilder' ),
245
+ 'AQ' => __( 'Antarctica', 'profilebuilder' ),
246
+ 'AG' => __( 'Antigua and Barbuda', 'profilebuilder' ),
247
+ 'AR' => __( 'Argentina', 'profilebuilder' ),
248
+ 'AM' => __( 'Armenia', 'profilebuilder' ),
249
+ 'AW' => __( 'Aruba', 'profilebuilder' ),
250
+ 'AU' => __( 'Australia', 'profilebuilder' ),
251
+ 'AT' => __( 'Austria', 'profilebuilder' ),
252
+ 'AZ' => __( 'Azerbaijan', 'profilebuilder' ),
253
+ 'BS' => __( 'Bahamas', 'profilebuilder' ),
254
+ 'BH' => __( 'Bahrain', 'profilebuilder' ),
255
+ 'BD' => __( 'Bangladesh', 'profilebuilder' ),
256
+ 'BB' => __( 'Barbados', 'profilebuilder' ),
257
+ 'BY' => __( 'Belarus', 'profilebuilder' ),
258
+ 'BE' => __( 'Belgium', 'profilebuilder' ),
259
+ 'BZ' => __( 'Belize', 'profilebuilder' ),
260
+ 'BJ' => __( 'Benin', 'profilebuilder' ),
261
+ 'BM' => __( 'Bermuda', 'profilebuilder' ),
262
+ 'BT' => __( 'Bhutan', 'profilebuilder' ),
263
+ 'BO' => __( 'Bolivia', 'profilebuilder' ),
264
+ 'BQ' => __( 'Bonaire, Saint Eustatius and Saba', 'profilebuilder' ),
265
+ 'BA' => __( 'Bosnia and Herzegovina', 'profilebuilder' ),
266
+ 'BW' => __( 'Botswana', 'profilebuilder' ),
267
+ 'BV' => __( 'Bouvet Island', 'profilebuilder' ),
268
+ 'BR' => __( 'Brazil', 'profilebuilder' ),
269
+ 'IO' => __( 'British Indian Ocean Territory', 'profilebuilder' ),
270
+ 'VG' => __( 'British Virgin Islands', 'profilebuilder' ),
271
+ 'BN' => __( 'Brunei', 'profilebuilder' ),
272
+ 'BG' => __( 'Bulgaria', 'profilebuilder' ),
273
+ 'BF' => __( 'Burkina Faso', 'profilebuilder' ),
274
+ 'BI' => __( 'Burundi', 'profilebuilder' ),
275
+ 'KH' => __( 'Cambodia', 'profilebuilder' ),
276
+ 'CM' => __( 'Cameroon', 'profilebuilder' ),
277
+ 'CA' => __( 'Canada', 'profilebuilder' ),
278
+ 'CV' => __( 'Cape Verde', 'profilebuilder' ),
279
+ 'KY' => __( 'Cayman Islands', 'profilebuilder' ),
280
+ 'CF' => __( 'Central African Republic', 'profilebuilder' ),
281
+ 'TD' => __( 'Chad', 'profilebuilder' ),
282
+ 'CL' => __( 'Chile', 'profilebuilder' ),
283
+ 'CN' => __( 'China', 'profilebuilder' ),
284
+ 'CX' => __( 'Christmas Island', 'profilebuilder' ),
285
+ 'CC' => __( 'Cocos Islands', 'profilebuilder' ),
286
+ 'CO' => __( 'Colombia', 'profilebuilder' ),
287
+ 'KM' => __( 'Comoros', 'profilebuilder' ),
288
+ 'CK' => __( 'Cook Islands', 'profilebuilder' ),
289
+ 'CR' => __( 'Costa Rica', 'profilebuilder' ),
290
+ 'HR' => __( 'Croatia', 'profilebuilder' ),
291
+ 'CU' => __( 'Cuba', 'profilebuilder' ),
292
+ 'CW' => __( 'Curacao', 'profilebuilder' ),
293
+ 'CY' => __( 'Cyprus', 'profilebuilder' ),
294
+ 'CZ' => __( 'Czech Republic', 'profilebuilder' ),
295
+ 'CD' => __( 'Democratic Republic of the Congo', 'profilebuilder' ),
296
+ 'DK' => __( 'Denmark', 'profilebuilder' ),
297
+ 'DJ' => __( 'Djibouti', 'profilebuilder' ),
298
+ 'DM' => __( 'Dominica', 'profilebuilder' ),
299
+ 'DO' => __( 'Dominican Republic', 'profilebuilder' ),
300
+ 'TL' => __( 'East Timor', 'profilebuilder' ),
301
+ 'EC' => __( 'Ecuador', 'profilebuilder' ),
302
+ 'EG' => __( 'Egypt', 'profilebuilder' ),
303
+ 'SV' => __( 'El Salvador', 'profilebuilder' ),
304
+ 'GQ' => __( 'Equatorial Guinea', 'profilebuilder' ),
305
+ 'ER' => __( 'Eritrea', 'profilebuilder' ),
306
+ 'EE' => __( 'Estonia', 'profilebuilder' ),
307
+ 'ET' => __( 'Ethiopia', 'profilebuilder' ),
308
+ 'FK' => __( 'Falkland Islands', 'profilebuilder' ),
309
+ 'FO' => __( 'Faroe Islands', 'profilebuilder' ),
310
+ 'FJ' => __( 'Fiji', 'profilebuilder' ),
311
+ 'FI' => __( 'Finland', 'profilebuilder' ),
312
+ 'FR' => __( 'France', 'profilebuilder' ),
313
+ 'GF' => __( 'French Guiana', 'profilebuilder' ),
314
+ 'PF' => __( 'French Polynesia', 'profilebuilder' ),
315
+ 'TF' => __( 'French Southern Territories', 'profilebuilder' ),
316
+ 'GA' => __( 'Gabon', 'profilebuilder' ),
317
+ 'GM' => __( 'Gambia', 'profilebuilder' ),
318
+ 'GE' => __( 'Georgia', 'profilebuilder' ),
319
+ 'DE' => __( 'Germany', 'profilebuilder' ),
320
+ 'GH' => __( 'Ghana', 'profilebuilder' ),
321
+ 'GI' => __( 'Gibraltar', 'profilebuilder' ),
322
+ 'GR' => __( 'Greece', 'profilebuilder' ),
323
+ 'GL' => __( 'Greenland', 'profilebuilder' ),
324
+ 'GD' => __( 'Grenada', 'profilebuilder' ),
325
+ 'GP' => __( 'Guadeloupe', 'profilebuilder' ),
326
+ 'GU' => __( 'Guam', 'profilebuilder' ),
327
+ 'GT' => __( 'Guatemala', 'profilebuilder' ),
328
+ 'GG' => __( 'Guernsey', 'profilebuilder' ),
329
+ 'GN' => __( 'Guinea', 'profilebuilder' ),
330
+ 'GW' => __( 'Guinea-Bissau', 'profilebuilder' ),
331
+ 'GY' => __( 'Guyana', 'profilebuilder' ),
332
+ 'HT' => __( 'Haiti', 'profilebuilder' ),
333
+ 'HM' => __( 'Heard Island and McDonald Islands', 'profilebuilder' ),
334
+ 'HN' => __( 'Honduras', 'profilebuilder' ),
335
+ 'HK' => __( 'Hong Kong', 'profilebuilder' ),
336
+ 'HU' => __( 'Hungary', 'profilebuilder' ),
337
+ 'IS' => __( 'Iceland', 'profilebuilder' ),
338
+ 'IN' => __( 'India', 'profilebuilder' ),
339
+ 'ID' => __( 'Indonesia', 'profilebuilder' ),
340
+ 'IR' => __( 'Iran', 'profilebuilder' ),
341
+ 'IQ' => __( 'Iraq', 'profilebuilder' ),
342
+ 'IE' => __( 'Ireland', 'profilebuilder' ),
343
+ 'IM' => __( 'Isle of Man', 'profilebuilder' ),
344
+ 'IL' => __( 'Israel', 'profilebuilder' ),
345
+ 'IT' => __( 'Italy', 'profilebuilder' ),
346
+ 'CI' => __( 'Ivory Coast', 'profilebuilder' ),
347
+ 'JM' => __( 'Jamaica', 'profilebuilder' ),
348
+ 'JP' => __( 'Japan', 'profilebuilder' ),
349
+ 'JE' => __( 'Jersey', 'profilebuilder' ),
350
+ 'JO' => __( 'Jordan', 'profilebuilder' ),
351
+ 'KZ' => __( 'Kazakhstan', 'profilebuilder' ),
352
+ 'KE' => __( 'Kenya', 'profilebuilder' ),
353
+ 'KI' => __( 'Kiribati', 'profilebuilder' ),
354
+ 'XK' => __( 'Kosovo', 'profilebuilder' ),
355
+ 'KW' => __( 'Kuwait', 'profilebuilder' ),
356
+ 'KG' => __( 'Kyrgyzstan', 'profilebuilder' ),
357
+ 'LA' => __( 'Laos', 'profilebuilder' ),
358
+ 'LV' => __( 'Latvia', 'profilebuilder' ),
359
+ 'LB' => __( 'Lebanon', 'profilebuilder' ),
360
+ 'LS' => __( 'Lesotho', 'profilebuilder' ),
361
+ 'LR' => __( 'Liberia', 'profilebuilder' ),
362
+ 'LY' => __( 'Libya', 'profilebuilder' ),
363
+ 'LI' => __( 'Liechtenstein', 'profilebuilder' ),
364
+ 'LT' => __( 'Lithuania', 'profilebuilder' ),
365
+ 'LU' => __( 'Luxembourg', 'profilebuilder' ),
366
+ 'MO' => __( 'Macao', 'profilebuilder' ),
367
+ 'MK' => __( 'Macedonia', 'profilebuilder' ),
368
+ 'MG' => __( 'Madagascar', 'profilebuilder' ),
369
+ 'MW' => __( 'Malawi', 'profilebuilder' ),
370
+ 'MY' => __( 'Malaysia', 'profilebuilder' ),
371
+ 'MV' => __( 'Maldives', 'profilebuilder' ),
372
+ 'ML' => __( 'Mali', 'profilebuilder' ),
373
+ 'MT' => __( 'Malta', 'profilebuilder' ),
374
+ 'MH' => __( 'Marshall Islands', 'profilebuilder' ),
375
+ 'MQ' => __( 'Martinique', 'profilebuilder' ),
376
+ 'MR' => __( 'Mauritania', 'profilebuilder' ),
377
+ 'MU' => __( 'Mauritius', 'profilebuilder' ),
378
+ 'YT' => __( 'Mayotte', 'profilebuilder' ),
379
+ 'MX' => __( 'Mexico', 'profilebuilder' ),
380
+ 'FM' => __( 'Micronesia', 'profilebuilder' ),
381
+ 'MD' => __( 'Moldova', 'profilebuilder' ),
382
+ 'MC' => __( 'Monaco', 'profilebuilder' ),
383
+ 'MN' => __( 'Mongolia', 'profilebuilder' ),
384
+ 'ME' => __( 'Montenegro', 'profilebuilder' ),
385
+ 'MS' => __( 'Montserrat', 'profilebuilder' ),
386
+ 'MA' => __( 'Morocco', 'profilebuilder' ),
387
+ 'MZ' => __( 'Mozambique', 'profilebuilder' ),
388
+ 'MM' => __( 'Myanmar', 'profilebuilder' ),
389
+ 'NA' => __( 'Namibia', 'profilebuilder' ),
390
+ 'NR' => __( 'Nauru', 'profilebuilder' ),
391
+ 'NP' => __( 'Nepal', 'profilebuilder' ),
392
+ 'NL' => __( 'Netherlands', 'profilebuilder' ),
393
+ 'NC' => __( 'New Caledonia', 'profilebuilder' ),
394
+ 'NZ' => __( 'New Zealand', 'profilebuilder' ),
395
+ 'NI' => __( 'Nicaragua', 'profilebuilder' ),
396
+ 'NE' => __( 'Niger', 'profilebuilder' ),
397
+ 'NG' => __( 'Nigeria', 'profilebuilder' ),
398
+ 'NU' => __( 'Niue', 'profilebuilder' ),
399
+ 'NF' => __( 'Norfolk Island', 'profilebuilder' ),
400
+ 'KP' => __( 'North Korea', 'profilebuilder' ),
401
+ 'MP' => __( 'Northern Mariana Islands', 'profilebuilder' ),
402
+ 'NO' => __( 'Norway', 'profilebuilder' ),
403
+ 'OM' => __( 'Oman', 'profilebuilder' ),
404
+ 'PK' => __( 'Pakistan', 'profilebuilder' ),
405
+ 'PW' => __( 'Palau', 'profilebuilder' ),
406
+ 'PS' => __( 'Palestinian Territory', 'profilebuilder' ),
407
+ 'PA' => __( 'Panama', 'profilebuilder' ),
408
+ 'PG' => __( 'Papua New Guinea', 'profilebuilder' ),
409
+ 'PY' => __( 'Paraguay', 'profilebuilder' ),
410
+ 'PE' => __( 'Peru', 'profilebuilder' ),
411
+ 'PH' => __( 'Philippines', 'profilebuilder' ),
412
+ 'PN' => __( 'Pitcairn', 'profilebuilder' ),
413
+ 'PL' => __( 'Poland', 'profilebuilder' ),
414
+ 'PT' => __( 'Portugal', 'profilebuilder' ),
415
+ 'PR' => __( 'Puerto Rico', 'profilebuilder' ),
416
+ 'QA' => __( 'Qatar', 'profilebuilder' ),
417
+ 'CG' => __( 'Republic of the Congo', 'profilebuilder' ),
418
+ 'RE' => __( 'Reunion', 'profilebuilder' ),
419
+ 'RO' => __( 'Romania', 'profilebuilder' ),
420
+ 'RU' => __( 'Russia', 'profilebuilder' ),
421
+ 'RW' => __( 'Rwanda', 'profilebuilder' ),
422
+ 'BL' => __( 'Saint Barthelemy', 'profilebuilder' ),
423
+ 'SH' => __( 'Saint Helena', 'profilebuilder' ),
424
+ 'KN' => __( 'Saint Kitts and Nevis', 'profilebuilder' ),
425
+ 'LC' => __( 'Saint Lucia', 'profilebuilder' ),
426
+ 'MF' => __( 'Saint Martin', 'profilebuilder' ),
427
+ 'PM' => __( 'Saint Pierre and Miquelon', 'profilebuilder' ),
428
+ 'VC' => __( 'Saint Vincent and the Grenadines', 'profilebuilder' ),
429
+ 'WS' => __( 'Samoa', 'profilebuilder' ),
430
+ 'SM' => __( 'San Marino', 'profilebuilder' ),
431
+ 'ST' => __( 'Sao Tome and Principe', 'profilebuilder' ),
432
+ 'SA' => __( 'Saudi Arabia', 'profilebuilder' ),
433
+ 'SN' => __( 'Senegal', 'profilebuilder' ),
434
+ 'RS' => __( 'Serbia', 'profilebuilder' ),
435
+ 'SC' => __( 'Seychelles', 'profilebuilder' ),
436
+ 'SL' => __( 'Sierra Leone', 'profilebuilder' ),
437
+ 'SG' => __( 'Singapore', 'profilebuilder' ),
438
+ 'SX' => __( 'Sint Maarten', 'profilebuilder' ),
439
+ 'SK' => __( 'Slovakia', 'profilebuilder' ),
440
+ 'SI' => __( 'Slovenia', 'profilebuilder' ),
441
+ 'SB' => __( 'Solomon Islands', 'profilebuilder' ),
442
+ 'SO' => __( 'Somalia', 'profilebuilder' ),
443
+ 'ZA' => __( 'South Africa', 'profilebuilder' ),
444
+ 'GS' => __( 'South Georgia and the South Sandwich Islands', 'profilebuilder' ),
445
+ 'KR' => __( 'South Korea', 'profilebuilder' ),
446
+ 'SS' => __( 'South Sudan', 'profilebuilder' ),
447
+ 'ES' => __( 'Spain', 'profilebuilder' ),
448
+ 'LK' => __( 'Sri Lanka', 'profilebuilder' ),
449
+ 'SD' => __( 'Sudan', 'profilebuilder' ),
450
+ 'SR' => __( 'Suriname', 'profilebuilder' ),
451
+ 'SJ' => __( 'Svalbard and Jan Mayen', 'profilebuilder' ),
452
+ 'SZ' => __( 'Swaziland', 'profilebuilder' ),
453
+ 'SE' => __( 'Sweden', 'profilebuilder' ),
454
+ 'CH' => __( 'Switzerland', 'profilebuilder' ),
455
+ 'SY' => __( 'Syria', 'profilebuilder' ),
456
+ 'TW' => __( 'Taiwan', 'profilebuilder' ),
457
+ 'TJ' => __( 'Tajikistan', 'profilebuilder' ),
458
+ 'TZ' => __( 'Tanzania', 'profilebuilder' ),
459
+ 'TH' => __( 'Thailand', 'profilebuilder' ),
460
+ 'TG' => __( 'Togo', 'profilebuilder' ),
461
+ 'TK' => __( 'Tokelau', 'profilebuilder' ),
462
+ 'TO' => __( 'Tonga', 'profilebuilder' ),
463
+ 'TT' => __( 'Trinidad and Tobago', 'profilebuilder' ),
464
+ 'TN' => __( 'Tunisia', 'profilebuilder' ),
465
+ 'TR' => __( 'Turkey', 'profilebuilder' ),
466
+ 'TM' => __( 'Turkmenistan', 'profilebuilder' ),
467
+ 'TC' => __( 'Turks and Caicos Islands', 'profilebuilder' ),
468
+ 'TV' => __( 'Tuvalu', 'profilebuilder' ),
469
+ 'VI' => __( 'U.S. Virgin Islands', 'profilebuilder' ),
470
+ 'UG' => __( 'Uganda', 'profilebuilder' ),
471
+ 'UA' => __( 'Ukraine', 'profilebuilder' ),
472
+ 'AE' => __( 'United Arab Emirates', 'profilebuilder' ),
473
+ 'GB' => __( 'United Kingdom', 'profilebuilder' ),
474
+ 'US' => __( 'United States', 'profilebuilder' ),
475
+ 'UM' => __( 'United States Minor Outlying Islands', 'profilebuilder' ),
476
+ 'UY' => __( 'Uruguay', 'profilebuilder' ),
477
+ 'UZ' => __( 'Uzbekistan', 'profilebuilder' ),
478
+ 'VU' => __( 'Vanuatu', 'profilebuilder' ),
479
+ 'VA' => __( 'Vatican', 'profilebuilder' ),
480
+ 'VE' => __( 'Venezuela', 'profilebuilder' ),
481
+ 'VN' => __( 'Vietnam', 'profilebuilder' ),
482
+ 'WF' => __( 'Wallis and Futuna', 'profilebuilder' ),
483
+ 'EH' => __( 'Western Sahara', 'profilebuilder' ),
484
+ 'YE' => __( 'Yemen', 'profilebuilder' ),
485
+ 'ZM' => __( 'Zambia', 'profilebuilder' ),
486
+ 'ZW' => __( 'Zimbabwe', 'profilebuilder' ),
487
+ )
488
+ );
489
+
490
+ return $country_array;
491
+ }
492
+
493
+
494
+ /**
495
+ * Function that returns an array with timezone options
496
+ *
497
+ * @since v.2.0
498
+ *
499
+ * @return array
500
+ */
501
+ function wppb_timezone_select_options( $form_location ) {
502
+ $timezone_array = apply_filters( 'wppb_'.$form_location.'_timezone_select_array', array ( '(GMT -12:00) Eniwetok, Kwajalein', '(GMT -11:00) Midway Island, Samoa', '(GMT -10:00) Hawaii', '(GMT -9:00) Alaska', '(GMT -8:00) Pacific Time (US & Canada)', '(GMT -7:00) Mountain Time (US & Canada)', '(GMT -6:00) Central Time (US & Canada), Mexico City', '(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima', '(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz', '(GMT -3:30) Newfoundland', '(GMT -3:00) Brazil, Buenos Aires, Georgetown', '(GMT -2:00) Mid-Atlantic', '(GMT -1:00) Azores, Cape Verde Islands', '(GMT) Western Europe Time, London, Lisbon, Casablanca', '(GMT +1:00) Brussels, Copenhagen, Madrid, Paris', '(GMT +2:00) Kaliningrad, South Africa', '(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg', '(GMT +3:30) Tehran', '(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi', '(GMT +4:30) Kabul', '(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent', '(GMT +5:30) Bombay, Calcutta, Madras, New Delhi', '(GMT +5:45) Kathmandu', '(GMT +6:00) Almaty, Dhaka, Colombo', '(GMT +7:00) Bangkok, Hanoi, Jakarta', '(GMT +8:00) Beijing, Perth, Singapore, Hong Kong', '(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk', '(GMT +9:30) Adelaide, Darwin', '(GMT +10:00) Eastern Australia, Guam, Vladivostok', '(GMT +11:00) Magadan, Solomon Islands, New Caledonia', '(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka' ) );
503
+
504
+ return $timezone_array;
505
+ }
506
+
507
+
508
  /**
509
  * Function that returns a unique, incremented ID
510
  *
835
  <li><strong class="nowrap">[wppb-edit-profile]</strong></li>
836
  <li><strong class="nowrap">[wppb-register role="author"]</strong></li>
837
  </ul>
838
+ <p>
839
+ <?php
840
+ if( PROFILE_BUILDER == 'Profile Builder Pro' )
841
+ _e("If you're interested in displaying different fields in the registration and edit profile forms, please use the Multiple Registration & Edit Profile Forms Addon.", 'profilebuilder');
842
+ else
843
+ _e( "With Profile Builder Pro v2 you can display different fields in the registration and edit profile forms, using the Multiple Registration & Edit Profile Forms module.", "profilebuilder" )
844
+ ?>
845
+ </p>
846
  <?php
847
  }
848
  add_action('wck_metabox_content_wppb_manage_fields_info', 'wppb_add_content_before_manage_fields');
assets/css/style-back-end.css CHANGED
@@ -141,13 +141,13 @@
141
  min-height:10px;
142
  }
143
 
144
- #wppb_manage_fields li.row-user-roles label,
145
- #container_wppb_manage_fields li.row-user-roles label {
146
  background: #fff;
147
  }
148
 
149
- #wppb_manage_fields li.row-user-roles .sortable-handle,
150
- #container_wppb_manage_fields li.row-user-roles .sortable-handle {
151
  display: inline-block;
152
  width: 16px;
153
  height: 16px;
141
  min-height:10px;
142
  }
143
 
144
+ #wppb_manage_fields .ui-sortable label,
145
+ #container_wppb_manage_fields .ui-sortable label {
146
  background: #fff;
147
  }
148
 
149
+ #wppb_manage_fields .sortable-handle,
150
+ #container_wppb_manage_fields .sortable-handle {
151
  display: inline-block;
152
  width: 16px;
153
  height: 16px;
assets/css/style-front-end.css CHANGED
@@ -227,6 +227,16 @@ input#send_credentials_via_email{
227
  margin-left:0;
228
  }
229
 
 
 
 
 
 
 
 
 
 
 
230
 
231
  .g-recaptcha{
232
  display: inline-block;
227
  margin-left:0;
228
  }
229
 
230
+ .wppb-checkbox-terms-and-conditions label {
231
+ width: 100%;
232
+ }
233
+
234
+ .wppb-form-field.wppb-checkbox-terms-and-conditions input[type="checkbox"].custom_field_toa {
235
+ float:none;
236
+ width:auto;
237
+ margin-right:10px
238
+ }
239
+
240
 
241
  .g-recaptcha{
242
  display: inline-block;
assets/js/jquery-pb-add-ons.js CHANGED
@@ -69,6 +69,7 @@ function wppb_add_on_download_and_install( $button ) {
69
  var file_name = $download_button.attr('data-add-on-slug') + '.zip';
70
  var add_on_name = $download_button.attr('data-add-on-name');
71
  var add_on_index = $download_button.parents('.wppb-add-on').index('.wppb-add-on');
 
72
 
73
  $download_button
74
  .attr('disabled', true);
@@ -86,7 +87,7 @@ function wppb_add_on_download_and_install( $button ) {
86
  wppb_add_on_set_status_message( $download_button, 'dashicons-download', jQuery('#wppb-add-on-downloading-message-text').text(), fade_in_out_speed, fade_in_out_speed );
87
 
88
 
89
- jQuery.post( ajaxurl, { action: 'wppb_add_on_download_zip_file', wppb_add_on_download_url: download_url, wppb_add_on_zip_name: file_name, wppb_add_on_name: add_on_name, wppb_add_on_index: add_on_index }, function( response ) {
90
 
91
  // Check if we have any errors and display a message to the user
92
  if( response.indexOf('error') === 0 ) {
69
  var file_name = $download_button.attr('data-add-on-slug') + '.zip';
70
  var add_on_name = $download_button.attr('data-add-on-name');
71
  var add_on_index = $download_button.parents('.wppb-add-on').index('.wppb-add-on');
72
+ var nonce = $download_button.data('nonce');
73
 
74
  $download_button
75
  .attr('disabled', true);
87
  wppb_add_on_set_status_message( $download_button, 'dashicons-download', jQuery('#wppb-add-on-downloading-message-text').text(), fade_in_out_speed, fade_in_out_speed );
88
 
89
 
90
+ jQuery.post( ajaxurl, { action: 'wppb_add_on_download_zip_file', wppb_add_on_download_url: download_url, wppb_add_on_zip_name: file_name, wppb_add_on_name: add_on_name, wppb_add_on_index: add_on_index, nonce: nonce }, function( response ) {
91
 
92
  // Check if we have any errors and display a message to the user
93
  if( response.indexOf('error') === 0 ) {
assets/lib/wck-api/wordpress-creation-kit.php CHANGED
@@ -1035,7 +1035,7 @@ class Wordpress_Creation_Kit_PB{
1035
  foreach ($this->args['meta_array'] as $meta_field){
1036
  /* in the $_POST the names for the fields are prefixed with the meta_name for the single metaboxes in case there are multiple metaboxes that contain fields wit hthe same name */
1037
  $single_field_name = $this->args['meta_name'] .'_'. Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'],$meta_field );
1038
- if (!empty($_POST[$single_field_name])) {
1039
  /* checkbox needs to be stored as string not array */
1040
  if( $meta_field['type'] == 'checkbox' )
1041
  $_POST[$single_field_name] = implode( ', ', $_POST[$single_field_name] );
1035
  foreach ($this->args['meta_array'] as $meta_field){
1036
  /* in the $_POST the names for the fields are prefixed with the meta_name for the single metaboxes in case there are multiple metaboxes that contain fields wit hthe same name */
1037
  $single_field_name = $this->args['meta_name'] .'_'. Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'],$meta_field );
1038
+ if (isset($_POST[$single_field_name])) {
1039
  /* checkbox needs to be stored as string not array */
1040
  if( $meta_field['type'] == 'checkbox' )
1041
  $_POST[$single_field_name] = implode( ', ', $_POST[$single_field_name] );
features/email-confirmation/email-confirmation.php CHANGED
@@ -317,7 +317,10 @@ function wppb_signup_user( $username, $user_email, $meta = '' ) {
317
  global $wpdb;
318
 
319
  // Format data
320
- $user = preg_replace( '/\s+/', '', sanitize_user( $username, true ) );
 
 
 
321
  $user_email = sanitize_email( $user_email );
322
  $activation_key = substr( md5( time() . rand() . $user_email ), 0, 16 );
323
  $meta = serialize( $meta );
@@ -433,13 +436,6 @@ function wppb_manual_activate_signup( $activation_key ) {
433
  $retVal = ( is_multisite() ? $wpdb->update( $wpdb->signups, array('active' => 1, 'activated' => $now), array('activation_key' => $activation_key) ) : $wpdb->update( $wpdb->base_prefix.'signups', array('active' => 1, 'activated' => $now), array('activation_key' => $activation_key) ) );
434
 
435
  wppb_add_meta_to_user_on_activation( $user_id, '', $meta );
436
-
437
- // if admin approval is activated, then block the user untill he gets approved
438
- $wppb_general_settings = get_option( 'wppb_general_settings' );
439
- if( isset( $wppb_general_settings['adminApproval'] ) && ( $wppb_general_settings['adminApproval'] == 'yes' ) ){
440
- wp_set_object_terms( $user_id, array( 'unapproved' ), 'user_status', false);
441
- clean_object_term_cache( $user_id, 'user_status' );
442
- }
443
 
444
  /* copy the hashed password from signup meta to wp user table */
445
  if( !empty( $meta['user_pass'] ) ){
@@ -470,8 +466,11 @@ function wppb_manual_activate_signup( $activation_key ) {
470
  function wppb_create_user( $user_name, $password, $email) {
471
  if( is_email( $user_name ) )
472
  $user_name = apply_filters( 'wppb_generated_random_username', Wordpress_Creation_Kit_PB::wck_generate_slug( trim( $user_name ) ), $user_name );
473
- else
474
- $user_name = preg_replace( '/\s+/', '', sanitize_user( $user_name, true ) );
 
 
 
475
 
476
 
477
  $user_id = wp_create_user( $user_name, $password, $email );
@@ -507,12 +506,34 @@ function wppb_notify_user_registration_email( $bloginfo, $user_name, $email, $se
507
  $message_context = 'email_admin_new_subscriber';
508
 
509
  if ( $adminApproval == 'yes' ) {
510
- $message_subject = apply_filters( 'wppb_register_admin_email_subject_with_admin_approval', $message_subject, $email, $password, $message_from, 'wppb_admin_emailc_registration_with_admin_approval_email_subject' );
511
-
512
- $message_content .= '<br/>' . __( 'The "Admin Approval" feature was activated at the time of registration, so please remember that you need to approve this user before he/she can log in!', 'profilebuilder') ."\r\n";
513
- $message_content = apply_filters( 'wppb_register_admin_email_message_with_admin_approval', $message_content, $email, $password, $message_from, 'wppb_admin_emailc_registration_with_admin_approval_email_content' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
514
 
515
- $message_context = 'email_admin_approve';
 
 
 
 
 
 
 
516
  } else {
517
  $message_content = apply_filters( 'wppb_register_admin_email_message_without_admin_approval', $message_content, $email, $password, $message_from, 'wppb_admin_emailc_default_registration_email_content' );
518
  }
@@ -540,16 +561,36 @@ function wppb_notify_user_registration_email( $bloginfo, $user_name, $email, $se
540
  $user_message_context = 'email_user_account_info';
541
 
542
  if ( $adminApproval == 'yes' ){
543
- $user_message_subject = apply_filters( 'wppb_register_user_email_subject_with_admin_approval', $user_message_subject, $email, $password, $user_message_subject, 'wppb_user_emailc_registration_with_admin_approval_email_subject' );
544
 
545
- if( ! current_user_can( 'delete_users' ) ) {
546
- $user_message_content .= '<br/><br/>' . __( 'Before you can access your account, an administrator needs to approve it. You will be notified via email.', 'profilebuilder' );
547
 
548
- $user_message_context = 'email_user_need_approval';
 
 
 
 
 
 
 
 
 
 
 
 
 
549
  }
550
 
551
- $user_message_content = apply_filters( 'wppb_register_user_email_message_with_admin_approval', $user_message_content, $email, $password, $user_message_subject, 'wppb_user_emailc_registration_with_admin_approval_email_content' );
552
- }else
 
 
 
 
 
 
 
 
553
  $user_message_content = apply_filters( 'wppb_register_user_email_message_without_admin_approval', $user_message_content, $email, $password, $user_message_subject, 'wppb_user_emailc_default_registration_email_content' );
554
 
555
  $message_sent = wppb_mail( $email, $user_message_subject, $user_message_content, $user_message_from, $user_message_context );
@@ -557,6 +598,22 @@ function wppb_notify_user_registration_email( $bloginfo, $user_name, $email, $se
557
  return ( ( $message_sent ) ? 2 : 1 );
558
  }
559
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560
  // END FUNCTIONS USED BOTH ON THE REGISTRATION PAGE AND THE EMAIL CONFIRMATION TABLE
561
 
562
 
317
  global $wpdb;
318
 
319
  // Format data
320
+ $user = sanitize_user( $username, true );
321
+ if( is_multisite() )
322
+ $user = preg_replace( '/\s+/', '', $user );
323
+
324
  $user_email = sanitize_email( $user_email );
325
  $activation_key = substr( md5( time() . rand() . $user_email ), 0, 16 );
326
  $meta = serialize( $meta );
436
  $retVal = ( is_multisite() ? $wpdb->update( $wpdb->signups, array('active' => 1, 'activated' => $now), array('activation_key' => $activation_key) ) : $wpdb->update( $wpdb->base_prefix.'signups', array('active' => 1, 'activated' => $now), array('activation_key' => $activation_key) ) );
437
 
438
  wppb_add_meta_to_user_on_activation( $user_id, '', $meta );
 
 
 
 
 
 
 
439
 
440
  /* copy the hashed password from signup meta to wp user table */
441
  if( !empty( $meta['user_pass'] ) ){
466
  function wppb_create_user( $user_name, $password, $email) {
467
  if( is_email( $user_name ) )
468
  $user_name = apply_filters( 'wppb_generated_random_username', Wordpress_Creation_Kit_PB::wck_generate_slug( trim( $user_name ) ), $user_name );
469
+ else {
470
+ $user_name = sanitize_user($user_name, true);
471
+ if( is_multisite() )
472
+ $user_name = preg_replace( '/\s+/', '', $user_name );
473
+ }
474
 
475
 
476
  $user_id = wp_create_user( $user_name, $password, $email );
506
  $message_context = 'email_admin_new_subscriber';
507
 
508
  if ( $adminApproval == 'yes' ) {
509
+ $user_data = get_user_by( 'email', $email );
510
+
511
+ $wppb_generalSettings = get_option( 'wppb_general_settings', 'not_found' );
512
+
513
+ $adminApproval_mailAdmin = 0;
514
+
515
+ if( $wppb_generalSettings != 'not_found' && ! empty( $wppb_generalSettings['adminApprovalOnUserRole'] ) ) {
516
+ foreach( $user_data->roles as $role ) {
517
+ if( in_array( $role, $wppb_generalSettings['adminApprovalOnUserRole'] ) ) {
518
+ if( ! current_user_can( 'delete_users' ) ) {
519
+ $adminApproval_mailAdmin = 1;
520
+ }
521
+ }
522
+ }
523
+ } else {
524
+ if( ! current_user_can( 'delete_users' ) ) {
525
+ $adminApproval_mailAdmin = 1;
526
+ }
527
+ }
528
 
529
+ if( $adminApproval_mailAdmin == 1 ) {
530
+ $message_subject = apply_filters( 'wppb_register_admin_email_subject_with_admin_approval', $message_subject, $email, $password, $message_from, 'wppb_admin_emailc_registration_with_admin_approval_email_subject' );
531
+
532
+ $message_content .= wppb_adminApproval_adminEmailContent();
533
+ $message_content = apply_filters( 'wppb_register_admin_email_message_with_admin_approval', $message_content, $email, $password, $message_from, 'wppb_admin_emailc_registration_with_admin_approval_email_content' );
534
+
535
+ $message_context = 'email_admin_approve';
536
+ }
537
  } else {
538
  $message_content = apply_filters( 'wppb_register_admin_email_message_without_admin_approval', $message_content, $email, $password, $message_from, 'wppb_admin_emailc_default_registration_email_content' );
539
  }
561
  $user_message_context = 'email_user_account_info';
562
 
563
  if ( $adminApproval == 'yes' ){
564
+ $user_data = get_user_by( 'email', $email );
565
 
566
+ $wppb_generalSettings = get_option( 'wppb_general_settings', 'not_found' );
 
567
 
568
+ $adminApproval_mailUser = 0;
569
+
570
+ if( $wppb_generalSettings != 'not_found' && ! empty( $wppb_generalSettings['adminApprovalOnUserRole'] ) ) {
571
+ foreach( $user_data->roles as $role ) {
572
+ if( in_array( $role, $wppb_generalSettings['adminApprovalOnUserRole'] ) ) {
573
+ if( ! current_user_can( 'delete_users' ) ) {
574
+ $adminApproval_mailUser = 1;
575
+ }
576
+ }
577
+ }
578
+ } else {
579
+ if( ! current_user_can( 'delete_users' ) ) {
580
+ $adminApproval_mailUser = 1;
581
+ }
582
  }
583
 
584
+ if( $adminApproval_mailUser == 1 ) {
585
+ $user_message_subject = apply_filters( 'wppb_register_user_email_subject_with_admin_approval', $user_message_subject, $email, $password, $user_message_subject, 'wppb_user_emailc_registration_with_admin_approval_email_subject' );
586
+
587
+ $user_message_content .= wppb_adminApproval_userEmailContent();
588
+
589
+ $user_message_context = 'email_user_need_approval';
590
+
591
+ $user_message_content = apply_filters( 'wppb_register_user_email_message_with_admin_approval', $user_message_content, $email, $password, $user_message_subject, 'wppb_user_emailc_registration_with_admin_approval_email_content' );
592
+ }
593
+ } else
594
  $user_message_content = apply_filters( 'wppb_register_user_email_message_without_admin_approval', $user_message_content, $email, $password, $user_message_subject, 'wppb_user_emailc_default_registration_email_content' );
595
 
596
  $message_sent = wppb_mail( $email, $user_message_subject, $user_message_content, $user_message_from, $user_message_context );
598
  return ( ( $message_sent ) ? 2 : 1 );
599
  }
600
  }
601
+
602
+
603
+ // function with content to be added in email sent to admin if "Admin Approval" is on
604
+ function wppb_adminApproval_adminEmailContent() {
605
+ $emailContent = '<br/>' . __( 'The "Admin Approval" feature was activated at the time of registration, so please remember that you need to approve this user before he/she can log in!', 'profilebuilder') ."\r\n";
606
+
607
+ return $emailContent;
608
+ }
609
+
610
+
611
+ // function with content to be added in email sent to user if "Admin Approval" is on
612
+ function wppb_adminApproval_userEmailContent() {
613
+ $emailContent = '<br/><br/>' . __( 'Before you can access your account, an administrator needs to approve it. You will be notified via email.', 'profilebuilder' );
614
+
615
+ return $emailContent;
616
+ }
617
  // END FUNCTIONS USED BOTH ON THE REGISTRATION PAGE AND THE EMAIL CONFIRMATION TABLE
618
 
619
 
features/functions.php CHANGED
@@ -680,30 +680,8 @@ function wppb_change_default_post_updated_messages($messages){
680
  add_filter('post_updated_messages','wppb_change_default_post_updated_messages', 2);
681
 
682
 
683
-
684
- /**
685
- * Function that returns an array with countries
686
- *
687
- * @since v.2.0
688
- *
689
- * @return array
690
- */
691
- function wppb_country_select_options( $form_location ) {
692
- $country_array = apply_filters( 'wppb_'.$form_location.'_country_select_array', array( "", "Afghanistan", "Aland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia, Plurinational State of", "Bonaire, Sint Eustatius and Saba", "Bosnia and Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cabo Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote dIvoire", "Croatia", "Cuba", "Curacao", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guernsey", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard Island and McDonald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran, Islamic Republic of", "Iraq", "Ireland", "Isle of Man", "Israel", "Italy", "Jamaica", "Japan", "Jersey", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic Peoples Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao Peoples Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macao", "Macedonia, the former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montenegro", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Palestine, State of", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Barthelemy", "Saint Helena, Ascension and Tristan da Cunha", "Saint Kitts and Nevis", "Saint Lucia", "Saint Martin (French part)", "Saint Pierre and Miquelon", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia", "Seychelles", "Sierra Leone", "Singapore", "Sint Maarten (Dutch part)", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "South Sudan", "Spain", "Sri Lanka", "Sudan", "Suriname", "Svalbard and Jan Mayen", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province of China", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Timor-Leste", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela, Bolivarian Republic of", "Viet Nam", "Virgin Islands, British", "Virgin Islands, U.S.", "Wallis and Futuna", "Western Sahara", "Yemen", "Zambia", "Zimbabwe" ) );
693
-
694
- return $country_array;
695
- }
696
-
697
-
698
- /**
699
- * Function that returns an array with timezone options
700
- *
701
- * @since v.2.0
702
- *
703
- * @return array
704
- */
705
- function wppb_timezone_select_options( $form_location ) {
706
- $timezone_array = apply_filters( 'wppb_'.$form_location.'_timezone_select_array', array ( '(GMT -12:00) Eniwetok, Kwajalein', '(GMT -11:00) Midway Island, Samoa', '(GMT -10:00) Hawaii', '(GMT -9:00) Alaska', '(GMT -8:00) Pacific Time (US &amp; Canada)', '(GMT -7:00) Mountain Time (US &amp; Canada)', '(GMT -6:00) Central Time (US &amp; Canada), Mexico City', '(GMT -5:00) Eastern Time (US &amp; Canada), Bogota, Lima', '(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz', '(GMT -3:30) Newfoundland', '(GMT -3:00) Brazil, Buenos Aires, Georgetown', '(GMT -2:00) Mid-Atlantic', '(GMT -1:00) Azores, Cape Verde Islands', '(GMT) Western Europe Time, London, Lisbon, Casablanca', '(GMT +1:00) Brussels, Copenhagen, Madrid, Paris', '(GMT +2:00) Kaliningrad, South Africa', '(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg', '(GMT +3:30) Tehran', '(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi', '(GMT +4:30) Kabul', '(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent', '(GMT +5:30) Bombay, Calcutta, Madras, New Delhi', '(GMT +5:45) Kathmandu', '(GMT +6:00) Almaty, Dhaka, Colombo', '(GMT +7:00) Bangkok, Hanoi, Jakarta', '(GMT +8:00) Beijing, Perth, Singapore, Hong Kong', '(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk', '(GMT +9:30) Adelaide, Darwin', '(GMT +10:00) Eastern Australia, Guam, Vladivostok', '(GMT +11:00) Magadan, Solomon Islands, New Caledonia', '(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka' ) );
707
-
708
- return $timezone_array;
709
  }
680
  add_filter('post_updated_messages','wppb_change_default_post_updated_messages', 2);
681
 
682
 
683
+ /* for meta-names with spaces in them PHP converts the space to underline in the $_POST */
684
+ function wppb_handle_meta_name( $meta_name ){
685
+ $meta_name = str_replace( ' ', '_', $meta_name );
686
+ return $meta_name;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
687
  }
front-end/class-formbuilder.php CHANGED
@@ -279,6 +279,7 @@ class Profile_Builder_Form_Creator{
279
  ?>
280
  <form enctype="multipart/form-data" method="post" id="<?php if( $this->args['form_type'] == 'register' ) echo 'wppb-register-user'; else if( $this->args['form_type'] == 'edit_profile' ) echo 'wppb-edit-user'; if( isset($this->args['form_name']) && $this->args['form_name'] != "unspecified" ) echo '-' . $this->args['form_name']; ?>" class="wppb-user-forms<?php if( $this->args['form_type'] == 'register' ) echo ' wppb-register-user'; else if( $this->args['form_type'] == 'edit_profile' ) echo ' wppb-edit-user';?>" action="<?php echo apply_filters( 'wppb_form_action', '' ); ?>">
281
  <?php
 
282
  echo apply_filters( 'wppb_before_form_fields', '<ul>', $this->args['form_type'] );
283
  $this->wppb_output_form_fields( $_REQUEST, $field_check_errors );
284
  echo apply_filters( 'wppb_after_form_fields', '</ul>', $this->args['form_type'] );
279
  ?>
280
  <form enctype="multipart/form-data" method="post" id="<?php if( $this->args['form_type'] == 'register' ) echo 'wppb-register-user'; else if( $this->args['form_type'] == 'edit_profile' ) echo 'wppb-edit-user'; if( isset($this->args['form_name']) && $this->args['form_name'] != "unspecified" ) echo '-' . $this->args['form_name']; ?>" class="wppb-user-forms<?php if( $this->args['form_type'] == 'register' ) echo ' wppb-register-user'; else if( $this->args['form_type'] == 'edit_profile' ) echo ' wppb-edit-user';?>" action="<?php echo apply_filters( 'wppb_form_action', '' ); ?>">
281
  <?php
282
+ do_action( 'wppb_form_args_before_output', $this->args );
283
  echo apply_filters( 'wppb_before_form_fields', '<ul>', $this->args['form_type'] );
284
  $this->wppb_output_form_fields( $_REQUEST, $field_check_errors );
285
  echo apply_filters( 'wppb_after_form_fields', '</ul>', $this->args['form_type'] );
front-end/default-fields/username/username.php CHANGED
@@ -55,6 +55,11 @@ function wppb_check_username_value( $message, $field, $request_data, $form_locat
55
 
56
  $wppb_generalSettings = get_option('wppb_general_settings');
57
  if ( is_multisite() || ( !is_multisite() && $wppb_generalSettings['emailConfirmation'] == 'yes' ) ){
 
 
 
 
 
58
  $userSignup = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM ".$wpdb->prefix."signups WHERE user_login = %s", $request_data['username'] ) );
59
  if ( !empty( $userSignup ) ){
60
  return __( 'This username is already reserved to be used soon.', 'profilebuilder') .'<br/>'. __( 'Please try a different one!', 'profilebuilder' );
55
 
56
  $wppb_generalSettings = get_option('wppb_general_settings');
57
  if ( is_multisite() || ( !is_multisite() && $wppb_generalSettings['emailConfirmation'] == 'yes' ) ){
58
+
59
+ if( is_multisite() && $request_data['username'] != preg_replace( '/\s+/', '', $request_data['username'] ) ){
60
+ return __( 'This username is invalid because it uses illegal characters.', 'profilebuilder' ) .'<br/>'. __( 'Please enter a valid username.', 'profilebuilder' );
61
+ }
62
+
63
  $userSignup = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM ".$wpdb->prefix."signups WHERE user_login = %s", $request_data['username'] ) );
64
  if ( !empty( $userSignup ) ){
65
  return __( 'This username is already reserved to be used soon.', 'profilebuilder') .'<br/>'. __( 'Please try a different one!', 'profilebuilder' );
front-end/recover.php CHANGED
@@ -202,6 +202,7 @@ function wppb_front_end_password_recovery(){
202
  $requestedUserID = $query[0]->ID;
203
  $requestedUserLogin = $query[0]->user_login;
204
  $requestedUserEmail = $query[0]->user_email;
 
205
 
206
  if( $wppb_generalSettings['loginWith'] == 'username' )
207
  $display_username_email = $query[0]->user_login;
@@ -212,7 +213,7 @@ function wppb_front_end_password_recovery(){
212
  $key = wppb_retrieve_activation_key( $requestedUserLogin );
213
 
214
  //send primary email message
215
- $recoveruserMailMessage1 = sprintf( __('Someone requested that the password be reset for the following account: <b>%1$s</b><br/>If this was a mistake, just ignore this email and nothing will happen.<br/>To reset your password, visit the following link:%2$s', 'profilebuilder'), $display_username_email, '<a href="'.esc_url( add_query_arg( array( 'loginName' => $requestedUserLogin, 'key' => $key ), wppb_curpageurl() ) ).'">'.esc_url( add_query_arg( array( 'loginName' => $requestedUserLogin, 'key' => $key ), wppb_curpageurl() ) ).'</a>');
216
  $recoveruserMailMessage1 = apply_filters( 'wppb_recover_password_message_content_sent_to_user1', $recoveruserMailMessage1, $requestedUserID, $requestedUserLogin, $requestedUserEmail );
217
 
218
  $recoveruserMailMessageTitle1 = sprintf(__('Password Reset from "%1$s"', 'profilebuilder'), $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES));
@@ -323,9 +324,9 @@ function wppb_front_end_password_recovery(){
323
  //get the login name and key and verify if they match the ones in the database
324
 
325
  $key = $_GET['key'];
326
- $login = $_GET['loginName'];
327
 
328
- $user = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE user_activation_key = %s AND user_login = %s", $key, $login ) );
329
 
330
  if( !empty( $user ) ){
331
  //check if the "finalAction" variable is not in the address bar, if it is, don't display the form anymore
202
  $requestedUserID = $query[0]->ID;
203
  $requestedUserLogin = $query[0]->user_login;
204
  $requestedUserEmail = $query[0]->user_email;
205
+ $requestedUserNicename = $query[0]->user_nicename;
206
 
207
  if( $wppb_generalSettings['loginWith'] == 'username' )
208
  $display_username_email = $query[0]->user_login;
213
  $key = wppb_retrieve_activation_key( $requestedUserLogin );
214
 
215
  //send primary email message
216
+ $recoveruserMailMessage1 = sprintf( __('Someone requested that the password be reset for the following account: <b>%1$s</b><br/>If this was a mistake, just ignore this email and nothing will happen.<br/>To reset your password, visit the following link:%2$s', 'profilebuilder'), $display_username_email, '<a href="'.esc_url( add_query_arg( array( 'loginName' => $requestedUserNicename, 'key' => $key ), wppb_curpageurl() ) ).'">'.esc_url( add_query_arg( array( 'loginName' => $requestedUserNicename, 'key' => $key ), wppb_curpageurl() ) ).'</a>');
217
  $recoveruserMailMessage1 = apply_filters( 'wppb_recover_password_message_content_sent_to_user1', $recoveruserMailMessage1, $requestedUserID, $requestedUserLogin, $requestedUserEmail );
218
 
219
  $recoveruserMailMessageTitle1 = sprintf(__('Password Reset from "%1$s"', 'profilebuilder'), $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES));
324
  //get the login name and key and verify if they match the ones in the database
325
 
326
  $key = $_GET['key'];
327
+ $login_nicename = $_GET['loginName'];
328
 
329
+ $user = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE user_activation_key = %s AND user_nicename = %s", $key, $login_nicename ) );
330
 
331
  if( !empty( $user ) ){
332
  //check if the "finalAction" variable is not in the address bar, if it is, don't display the form anymore
front-end/register.php CHANGED
@@ -77,9 +77,22 @@ function wppb_activate_signup( $key ) {
77
 
78
  // if admin approval is activated, then block the user untill he gets approved
79
  $wppb_generalSettings = get_option('wppb_general_settings');
80
- if ( isset( $wppb_generalSettings['adminApproval'] ) && ( $wppb_generalSettings['adminApproval'] == 'yes' ) ){
81
- wp_set_object_terms( $user_id, array( 'unapproved' ), 'user_status', false );
82
- clean_object_term_cache( $user_id, 'user_status' );
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
 
85
  if ( !isset( $wppb_generalSettings['adminApproval'] ) )
@@ -100,12 +113,31 @@ function wppb_activate_signup( $key ) {
100
 
101
  if ( $inserted_user ){
102
  $success_message = apply_filters('wppb_success_email_confirmation', '<p class="wppb-success">'. __('Your email was successfully confirmed.', 'profilebuilder') .'</p><!-- .success -->');
103
- $admin_approval_message = apply_filters('wppb_email_confirmation_with_admin_approval', '<p class="alert">'. __('Before you can access your account, an administrator needs to approve it. You will be notified via email.', 'profilebuilder') . '</p>' );
104
 
105
  $wppb_general_settings = get_option( 'wppb_general_settings', 'false' );
 
106
  if ( !empty( $wppb_general_settings['adminApproval'] ) && $wppb_general_settings['adminApproval'] == 'yes' ){
107
- return $success_message . $admin_approval_message;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  } else {
 
 
 
109
  return $success_message;
110
  }
111
  } else {
77
 
78
  // if admin approval is activated, then block the user untill he gets approved
79
  $wppb_generalSettings = get_option('wppb_general_settings');
80
+ if( isset( $wppb_generalSettings['adminApproval'] ) && ( $wppb_generalSettings['adminApproval'] == 'yes' ) ){
81
+ $user_data = get_userdata( $user_id );
82
+
83
+ if( $wppb_generalSettings != 'not_found' && ! empty( $wppb_generalSettings['adminApprovalOnUserRole'] ) ) {
84
+ foreach( $user_data->roles as $role ) {
85
+ if( in_array( $role, $wppb_generalSettings['adminApprovalOnUserRole'] ) ) {
86
+ wp_set_object_terms( $user_id, array( 'unapproved' ), 'user_status', false);
87
+ clean_object_term_cache( $user_id, 'user_status' );
88
+ } else {
89
+ add_filter( 'wppb_register_success_message', 'wppb_noAdminApproval_successMessage' );
90
+ }
91
+ }
92
+ } else {
93
+ wp_set_object_terms( $user_id, array( 'unapproved' ), 'user_status', false);
94
+ clean_object_term_cache( $user_id, 'user_status' );
95
+ }
96
  }
97
 
98
  if ( !isset( $wppb_generalSettings['adminApproval'] ) )
113
 
114
  if ( $inserted_user ){
115
  $success_message = apply_filters('wppb_success_email_confirmation', '<p class="wppb-success">'. __('Your email was successfully confirmed.', 'profilebuilder') .'</p><!-- .success -->');
116
+ $admin_approval_message = apply_filters('wppb_email_confirmation_with_admin_approval', '<p class="wppb-success">'. __('Before you can access your account, an administrator needs to approve it. You will be notified via email.', 'profilebuilder') . '</p>' );
117
 
118
  $wppb_general_settings = get_option( 'wppb_general_settings', 'false' );
119
+
120
  if ( !empty( $wppb_general_settings['adminApproval'] ) && $wppb_general_settings['adminApproval'] == 'yes' ){
121
+ $user_data = get_userdata( $user_id );
122
+
123
+ if( $wppb_general_settings != 'not_found' && ! empty( $wppb_general_settings['adminApprovalOnUserRole'] ) ) {
124
+ foreach( $user_data->roles as $role ) {
125
+ if( in_array( $role, $wppb_general_settings['adminApprovalOnUserRole'] ) ) {
126
+ return $success_message . $admin_approval_message;
127
+ } else {
128
+ wp_set_object_terms( $user_id, NULL, 'user_status' );
129
+ clean_object_term_cache( $user_id, 'user_status' );
130
+
131
+ return $success_message;
132
+ }
133
+ }
134
+ } else {
135
+ return $success_message . $admin_approval_message;
136
+ }
137
  } else {
138
+ wp_set_object_terms( $user_id, NULL, 'user_status' );
139
+ clean_object_term_cache( $user_id, 'user_status' );
140
+
141
  return $success_message;
142
  }
143
  } else {
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Profile Builder
4
  Plugin URI: http://www.cozmoslabs.com/wordpress-profile-builder/
5
  Description: Login, registration and edit profile shortcodes for the front-end. Also you can chose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
- Version: 2.1.9
7
  Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel, Mihai Iova
8
  Author URI: http://www.cozmoslabs.com/
9
  License: GPL2
@@ -73,7 +73,7 @@ function wppb_free_plugin_init() {
73
  *
74
  *
75
  */
76
- define('PROFILE_BUILDER_VERSION', '2.1.9' );
77
  define('WPPB_PLUGIN_DIR', plugin_dir_path(__FILE__));
78
  define('WPPB_PLUGIN_URL', plugin_dir_url(__FILE__));
79
  define('WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE', apply_filters('wppb_server_max_upload_size_byte_constant', wppb_return_bytes(ini_get('upload_max_filesize'))));
3
  Plugin Name: Profile Builder
4
  Plugin URI: http://www.cozmoslabs.com/wordpress-profile-builder/
5
  Description: Login, registration and edit profile shortcodes for the front-end. Also you can chose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
+ Version: 2.2.1
7
  Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel, Mihai Iova
8
  Author URI: http://www.cozmoslabs.com/
9
  License: GPL2
73
  *
74
  *
75
  */
76
+ define('PROFILE_BUILDER_VERSION', '2.2.1' );
77
  define('WPPB_PLUGIN_DIR', plugin_dir_path(__FILE__));
78
  define('WPPB_PLUGIN_URL', plugin_dir_url(__FILE__));
79
  define('WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE', apply_filters('wppb_server_max_upload_size_byte_constant', wppb_return_bytes(ini_get('upload_max_filesize'))));
readme.txt CHANGED
@@ -5,8 +5,8 @@ Donate link: http://www.cozmoslabs.com/wordpress-profile-builder/
5
  Tags: registration, user profile, user registration, custom field registration, customize profile, user fields, extra user fields, builder, profile builder, custom user profile, user profile page, edit profile, custom registration, custom registration form, custom registration page, registration page, user custom fields, user listing, front-end user listing, user login, user registration form, front-end login, login redirect, login widget, front-end register, front-end registration, front-end edit profile, front-end user registration, custom redirects, user email, avatar upload, email confirmation, user approval, customize registration email, minimum password length, minimum password strength, password strength meter, multiple registration forms, register, register form, member directory
6
 
7
  Requires at least: 3.1
8
- Tested up to: 4.2.2
9
- Stable tag: 2.1.9
10
 
11
  Simple to use profile plugin allowing front-end login, user registration and edit profile by using shortcodes.
12
 
@@ -114,6 +114,12 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
114
  10. Profile Builder Login Widget
115
 
116
  == Changelog ==
 
 
 
 
 
 
117
  = 2.1.9 =
118
  * Add attribute filter to each Profile Builder form input: apply_filters( 'wppb_extra_attribute', '', $field )
119
  * Added Japanese translation
5
  Tags: registration, user profile, user registration, custom field registration, customize profile, user fields, extra user fields, builder, profile builder, custom user profile, user profile page, edit profile, custom registration, custom registration form, custom registration page, registration page, user custom fields, user listing, front-end user listing, user login, user registration form, front-end login, login redirect, login widget, front-end register, front-end registration, front-end edit profile, front-end user registration, custom redirects, user email, avatar upload, email confirmation, user approval, customize registration email, minimum password length, minimum password strength, password strength meter, multiple registration forms, register, register form, member directory
6
 
7
  Requires at least: 3.1
8
+ Tested up to: 4.2.4
9
+ Stable tag: 2.2.1
10
 
11
  Simple to use profile plugin allowing front-end login, user registration and edit profile by using shortcodes.
12
 
114
  10. Profile Builder Login Widget
115
 
116
  == Changelog ==
117
+ = 2.2.1 =
118
+ * Changed recover password link from using username to using the user-nicename
119
+ * We no longer strip spaces from usernames on singele-site registration when Email Confirmation is on and we also do not allow usernames with spaces on multisite installs
120
+ * Changed message in Manage Fields sidebar
121
+ * Fixed issue that prevented sometimes 0 values to be saved
122
+
123
  = 2.1.9 =
124
  * Add attribute filter to each Profile Builder form input: apply_filters( 'wppb_extra_attribute', '', $field )
125
  * Added Japanese translation