Version Description
- Added username validation for illegal characters
- Fixed wp_mail() From headers being set sitewide
Download this release
Release Info
Developer | reflectionmedia |
Plugin | User registration & user profile – Profile Builder |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.1.1
admin/manage-fields.php
CHANGED
@@ -48,6 +48,7 @@ function wppb_manage_fields_submenu(){
|
|
48 |
$manage_field_types[] = 'Input';
|
49 |
$manage_field_types[] = 'Input (Hidden)';
|
50 |
$manage_field_types[] = 'Textarea';
|
|
|
51 |
$manage_field_types[] = 'Select';
|
52 |
$manage_field_types[] = 'Select (Multiple)';
|
53 |
$manage_field_types[] = 'Select (Country)';
|
@@ -386,7 +387,7 @@ function wppb_check_field_on_edit_add( $message, $fields, $required_fields, $met
|
|
386 |
$unique_meta_name_list = array( 'first_name', 'last_name', 'nickname', 'description' );
|
387 |
|
388 |
//check to see if meta-name is empty
|
389 |
-
$skip_empty_check_for_fields = array('Heading', 'Select (User Role)');
|
390 |
|
391 |
if( !in_array( $posted_values['field'], $skip_empty_check_for_fields ) && empty( $posted_values['meta-name'] ) ) {
|
392 |
$message .= __( "The meta-name cannot be empty\n", 'profilebuilder' );
|
48 |
$manage_field_types[] = 'Input';
|
49 |
$manage_field_types[] = 'Input (Hidden)';
|
50 |
$manage_field_types[] = 'Textarea';
|
51 |
+
$manage_field_types[] = 'WYSIWYG';
|
52 |
$manage_field_types[] = 'Select';
|
53 |
$manage_field_types[] = 'Select (Multiple)';
|
54 |
$manage_field_types[] = 'Select (Country)';
|
387 |
$unique_meta_name_list = array( 'first_name', 'last_name', 'nickname', 'description' );
|
388 |
|
389 |
//check to see if meta-name is empty
|
390 |
+
$skip_empty_check_for_fields = array('Heading', 'Select (User Role)', 'reCAPTCHA');
|
391 |
|
392 |
if( !in_array( $posted_values['field'], $skip_empty_check_for_fields ) && empty( $posted_values['meta-name'] ) ) {
|
393 |
$message .= __( "The meta-name cannot be empty\n", 'profilebuilder' );
|
admin/register-version.php
CHANGED
@@ -220,6 +220,9 @@ class wppb_add_notices{
|
|
220 |
}
|
221 |
}
|
222 |
|
|
|
|
|
|
|
223 |
if ( PROFILE_BUILDER == 'Profile Builder Pro' ){
|
224 |
$wppb_profile_builder_pro_hobbyist_serial_status = get_option( 'wppb_profile_builder_pro_serial_status', 'empty' );
|
225 |
$version = 'pro';
|
@@ -228,6 +231,8 @@ if ( PROFILE_BUILDER == 'Profile Builder Pro' ){
|
|
228 |
$wppb_profile_builder_pro_hobbyist_serial_status = get_option( 'wppb_profile_builder_hobbyist_serial_status', 'empty' );
|
229 |
$version = 'hobbyist';
|
230 |
}
|
|
|
|
|
231 |
|
232 |
if ( $wppb_profile_builder_pro_hobbyist_serial_status == 'notFound' || $wppb_profile_builder_pro_hobbyist_serial_status == 'empty' ){
|
233 |
if( !is_multisite() )
|
220 |
}
|
221 |
}
|
222 |
|
223 |
+
if( is_multisite() && function_exists( 'switch_to_blog' ) )
|
224 |
+
switch_to_blog(1);
|
225 |
+
|
226 |
if ( PROFILE_BUILDER == 'Profile Builder Pro' ){
|
227 |
$wppb_profile_builder_pro_hobbyist_serial_status = get_option( 'wppb_profile_builder_pro_serial_status', 'empty' );
|
228 |
$version = 'pro';
|
231 |
$wppb_profile_builder_pro_hobbyist_serial_status = get_option( 'wppb_profile_builder_hobbyist_serial_status', 'empty' );
|
232 |
$version = 'hobbyist';
|
233 |
}
|
234 |
+
if( is_multisite() && function_exists( 'restore_current_blog' ) )
|
235 |
+
restore_current_blog();
|
236 |
|
237 |
if ( $wppb_profile_builder_pro_hobbyist_serial_status == 'notFound' || $wppb_profile_builder_pro_hobbyist_serial_status == 'empty' ){
|
238 |
if( !is_multisite() )
|
assets/css/style-front-end.css
CHANGED
@@ -54,7 +54,7 @@
|
|
54 |
.wppb-user-forms input[type="url"],
|
55 |
.wppb-user-forms input[type="password"],
|
56 |
.wppb-user-forms input[type="search"],
|
57 |
-
.wppb-user-forms textarea
|
58 |
color: #666;
|
59 |
border: 1px solid #ccc;
|
60 |
border-radius: 3px;
|
@@ -80,6 +80,30 @@
|
|
80 |
vertical-align: top; /* Improves readability and alignment in all browsers */
|
81 |
width: 100%;
|
82 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
#wppb-search-fields{
|
85 |
min-width: 250px;
|
@@ -139,6 +163,15 @@
|
|
139 |
float:left;
|
140 |
}
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
input#send_credentials_via_email{
|
143 |
float:none;
|
144 |
width:auto;
|
@@ -208,6 +241,9 @@ input#send_credentials_via_email{
|
|
208 |
#recaptcha_widget_div{
|
209 |
display: inline-block;
|
210 |
}
|
|
|
|
|
|
|
211 |
|
212 |
/*--------------------------------------------------------------
|
213 |
4.0 Errors & Notices
|
54 |
.wppb-user-forms input[type="url"],
|
55 |
.wppb-user-forms input[type="password"],
|
56 |
.wppb-user-forms input[type="search"],
|
57 |
+
.wppb-user-forms textarea{
|
58 |
color: #666;
|
59 |
border: 1px solid #ccc;
|
60 |
border-radius: 3px;
|
80 |
vertical-align: top; /* Improves readability and alignment in all browsers */
|
81 |
width: 100%;
|
82 |
}
|
83 |
+
.wppb-user-forms .wppb-wysiwyg .wp-editor-wrap { /* properly align wysiwyg editor among form fields */
|
84 |
+
float:left;
|
85 |
+
width:69.9%;
|
86 |
+
}
|
87 |
+
.wppb-user-forms .wppb-wysiwyg button:hover{ /* wysiwyg - overwrite the theme inherited background color on hover*/
|
88 |
+
background: none;
|
89 |
+
}
|
90 |
+
.wppb-user-forms .wppb-wysiwyg div.mce-tinymce.mce-panel{ /*Display the borders for the TinyMCE editor - Visual tab*/
|
91 |
+
border: 1px solid #ccc !important;
|
92 |
+
color: #666 !important;
|
93 |
+
}
|
94 |
+
.wppb-user-forms .wppb-wysiwyg div.mce-panel.mce-first{
|
95 |
+
border-width: 0 0 1px 0 !important;
|
96 |
+
}
|
97 |
+
.wppb-user-forms .wppb-wysiwyg div.mce-panel.mce-last{
|
98 |
+
border-width: 1px 0 !important;
|
99 |
+
}
|
100 |
+
.wppb-user-forms .wppb-wysiwyg .quicktags-toolbar { /*Display the borders for the TinyMCE editor - Text tab*/
|
101 |
+
border: 1px solid #dedede;
|
102 |
+
border-bottom: 0;
|
103 |
+
}
|
104 |
+
#wp-link label input[type="text"] { /*Fix the looks of the Add Link window for TinyMCE editor*/
|
105 |
+
padding: 0px;
|
106 |
+
}
|
107 |
|
108 |
#wppb-search-fields{
|
109 |
min-width: 250px;
|
163 |
float:left;
|
164 |
}
|
165 |
|
166 |
+
.wppb-user-forms .wppb-wysiwyg .wp-editor-wrap .wp-editor-tabs *{
|
167 |
+
box-sizing: content-box !important;
|
168 |
+
}
|
169 |
+
|
170 |
+
.wppb-user-forms .wp-editor-wrap input {
|
171 |
+
float: none;
|
172 |
+
width: auto;
|
173 |
+
}
|
174 |
+
|
175 |
input#send_credentials_via_email{
|
176 |
float:none;
|
177 |
width:auto;
|
241 |
#recaptcha_widget_div{
|
242 |
display: inline-block;
|
243 |
}
|
244 |
+
#recaptcha_widget_div iframe{
|
245 |
+
margin-bottom: 0;
|
246 |
+
}
|
247 |
|
248 |
/*--------------------------------------------------------------
|
249 |
4.0 Errors & Notices
|
assets/js/jquery-manage-fields-live-change.js
CHANGED
@@ -229,6 +229,15 @@ var fields = {
|
|
229 |
'.row-overwrite-existing'
|
230 |
]
|
231 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
|
233 |
'Select': { 'show_rows' : [
|
234 |
'.row-field-title',
|
@@ -341,17 +350,19 @@ var fields = {
|
|
341 |
|
342 |
'reCAPTCHA': { 'show_rows' : [
|
343 |
'.row-field-title',
|
344 |
-
'.row-meta-name',
|
345 |
'.row-description',
|
346 |
'.row-public-key',
|
347 |
'.row-private-key',
|
348 |
-
'.row-required'
|
349 |
-
'.row-overwrite-existing'
|
350 |
],
|
351 |
'required' : [
|
352 |
true
|
353 |
-
]
|
|
|
|
|
|
|
354 |
},
|
|
|
355 |
'Select (User Role)': { 'show_rows' : [
|
356 |
'.row-field-title',
|
357 |
'.row-description',
|
229 |
'.row-overwrite-existing'
|
230 |
]
|
231 |
},
|
232 |
+
'WYSIWYG': { 'show_rows' : [
|
233 |
+
'.row-field-title',
|
234 |
+
'.row-meta-name',
|
235 |
+
'.row-description',
|
236 |
+
'.row-default-content',
|
237 |
+
'.row-required',
|
238 |
+
'.row-overwrite-existing'
|
239 |
+
]
|
240 |
+
},
|
241 |
|
242 |
'Select': { 'show_rows' : [
|
243 |
'.row-field-title',
|
350 |
|
351 |
'reCAPTCHA': { 'show_rows' : [
|
352 |
'.row-field-title',
|
|
|
353 |
'.row-description',
|
354 |
'.row-public-key',
|
355 |
'.row-private-key',
|
356 |
+
'.row-required'
|
|
|
357 |
],
|
358 |
'required' : [
|
359 |
true
|
360 |
+
],
|
361 |
+
'properties': {
|
362 |
+
'meta_name_value' : ''
|
363 |
+
}
|
364 |
},
|
365 |
+
|
366 |
'Select (User Role)': { 'show_rows' : [
|
367 |
'.row-field-title',
|
368 |
'.row-description',
|
features/email-confirmation/email-confirmation.php
CHANGED
@@ -359,9 +359,12 @@ function wppb_signup_user_notification( $user, $user_email, $activation_key, $me
|
|
359 |
$registration_page_url = ( ( strpos( $post_content, '[wppb-register' ) !== false ) ? add_query_arg( array('activation_key' => $activation_key ), $permalink ) : add_query_arg( array('activation_key' => $activation_key ), get_bloginfo( 'url' ) ) );
|
360 |
}
|
361 |
|
362 |
-
$subject = sprintf(
|
363 |
-
$
|
364 |
-
|
|
|
|
|
|
|
365 |
wppb_mail( $user_email, $subject, $message, $from_name, '', $user, '', $user_email, 'register_w_email_confirmation', $registration_page_url, $meta );
|
366 |
|
367 |
return true;
|
359 |
$registration_page_url = ( ( strpos( $post_content, '[wppb-register' ) !== false ) ? add_query_arg( array('activation_key' => $activation_key ), $permalink ) : add_query_arg( array('activation_key' => $activation_key ), get_bloginfo( 'url' ) ) );
|
360 |
}
|
361 |
|
362 |
+
$subject = sprintf( __( '[%1$s] Activate %2$s', 'profilebuilder'), $from_name, $user );
|
363 |
+
$subject = apply_filters( 'wppb_signup_user_notification_email_subject', $subject, $user_email, $user, $activation_key, $registration_page_url, $meta, $from_name, 'wppb_user_emailc_registr_w_email_confirm_email_subject' );
|
364 |
+
|
365 |
+
$message = sprintf( __( "To activate your user, please click the following link:\n\n%s%s%s\n\nAfter you activate it you will receive yet *another email* with your login.", "profilebuilder" ), '<a href="'.$registration_page_url.'">', $registration_page_url, '</a>.' );
|
366 |
+
$message = apply_filters( 'wppb_signup_user_notification_email_content', $message, $user_email, $user, $activation_key, $registration_page_url, $meta, $from_name, 'wppb_user_emailc_registr_w_email_confirm_email_content' );
|
367 |
+
|
368 |
wppb_mail( $user_email, $subject, $message, $from_name, '', $user, '', $user_email, 'register_w_email_confirmation', $registration_page_url, $meta );
|
369 |
|
370 |
return true;
|
front-end/default-fields/username/username.php
CHANGED
@@ -43,6 +43,9 @@ function wppb_check_username_value( $message, $field, $request_data, $form_locat
|
|
43 |
if( !empty( $search_by_user_login ) ){
|
44 |
return __( 'This username already exists.', 'profilebuilder' ) .'<br/>'. __( 'Please try a different one!', 'profilebuilder' );
|
45 |
}
|
|
|
|
|
|
|
46 |
|
47 |
$wppb_generalSettings = get_option('wppb_general_settings');
|
48 |
if ( is_multisite() || ( !is_multisite() && $wppb_generalSettings['emailConfirmation'] == 'yes' ) ){
|
43 |
if( !empty( $search_by_user_login ) ){
|
44 |
return __( 'This username already exists.', 'profilebuilder' ) .'<br/>'. __( 'Please try a different one!', 'profilebuilder' );
|
45 |
}
|
46 |
+
if( ! validate_username( $request_data['username'] ) ) {
|
47 |
+
return __( 'This username is invalid because it uses illegal characters.', 'profilebuilder' ) .'<br/>'. __( 'Please enter a valid username.', 'profilebuilder' );
|
48 |
+
}
|
49 |
|
50 |
$wppb_generalSettings = get_option('wppb_general_settings');
|
51 |
if ( is_multisite() || ( !is_multisite() && $wppb_generalSettings['emailConfirmation'] == 'yes' ) ){
|
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.
|
7 |
Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel
|
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.
|
77 |
define('WPPB_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname(plugin_basename(__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.1.1
|
7 |
Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel
|
8 |
Author URI: http://www.cozmoslabs.com/
|
9 |
License: GPL2
|
73 |
*
|
74 |
*
|
75 |
*/
|
76 |
+
define('PROFILE_BUILDER_VERSION', '2.1.1' );
|
77 |
define('WPPB_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname(plugin_basename(__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
@@ -6,7 +6,7 @@ Tags: registration, user profile, user registration, custom field registration,
|
|
6 |
|
7 |
Requires at least: 3.1
|
8 |
Tested up to: 4.1
|
9 |
-
Stable tag: 2.1.
|
10 |
|
11 |
Simple to use profile plugin allowing front-end login, user registration and edit profile by using shortcodes.
|
12 |
|
@@ -108,6 +108,9 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
|
|
108 |
10. Profile Builder Login Widget
|
109 |
|
110 |
== Changelog ==
|
|
|
|
|
|
|
111 |
|
112 |
= 2.1.0 =
|
113 |
* Added option to Log In with either Username or Email.
|
6 |
|
7 |
Requires at least: 3.1
|
8 |
Tested up to: 4.1
|
9 |
+
Stable tag: 2.1.1
|
10 |
|
11 |
Simple to use profile plugin allowing front-end login, user registration and edit profile by using shortcodes.
|
12 |
|
108 |
10. Profile Builder Login Widget
|
109 |
|
110 |
== Changelog ==
|
111 |
+
= 2.1.1 =
|
112 |
+
* Added username validation for illegal characters
|
113 |
+
* Fixed wp_mail() From headers being set sitewide
|
114 |
|
115 |
= 2.1.0 =
|
116 |
* Added option to Log In with either Username or Email.
|