Version Description
- Added New branding images
- Added -required- html tag to fields
- Created function to return field based on id or meta_name
- Renamed HTML ID for recover-password div, to avoid duplicate IDs
Download this release
Release Info
Developer | adispiac |
Plugin | User registration & user profile – Profile Builder |
Version | 2.4.4 |
Comparing to | |
See all releases |
Code changes from version 2.4.3 to 2.4.4
- admin/add-ons.php +1 -1
- admin/basic-info.php +3 -3
- admin/manage-fields.php +4 -0
- admin/pms-cross-promotion.php +1 -1
- assets/css/style-back-end.css +23 -11
- assets/css/style-front-end.css +4 -1
- assets/images/pb-logo-free.png +0 -0
- assets/images/pb-logo-hobbyist.png +0 -0
- assets/images/pb-logo-pro.png +0 -0
- assets/images/pb-pms-cross-promotion-icon.png +0 -0
- assets/images/pb-pms-cross-promotion.png +0 -0
- assets/images/pms-recommended.png +0 -0
- assets/js/jquery-manage-fields-live-change.js +15 -1
- features/functions.php +88 -7
- front-end/class-formbuilder.php +7 -1
- front-end/recover.php +1 -1
- index.php +5 -2
- readme.txt +13 -4
admin/add-ons.php
CHANGED
@@ -211,7 +211,7 @@ function wppb_add_ons_content() {
|
|
211 |
<div class="plugin-card wppb-recommended-plugin wppb-add-on">
|
212 |
<div class="plugin-card-top">
|
213 |
<a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">
|
214 |
-
<img src="<?php echo plugins_url( '../assets/images/
|
215 |
</a>
|
216 |
<h3 class="wppb-add-on-title">
|
217 |
<a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">Paid Member Subscriptions</a>
|
211 |
<div class="plugin-card wppb-recommended-plugin wppb-add-on">
|
212 |
<div class="plugin-card-top">
|
213 |
<a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">
|
214 |
+
<img src="<?php echo plugins_url( '../assets/images/pms-recommended.png', __FILE__ ); ?>" width="100%">
|
215 |
</a>
|
216 |
<h3 class="wppb-add-on-title">
|
217 |
<a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">Paid Member Subscriptions</a>
|
admin/basic-info.php
CHANGED
@@ -26,8 +26,8 @@ function wppb_basic_info_content() {
|
|
26 |
|
27 |
?>
|
28 |
<div class="wrap wppb-wrap wppb-info-wrap">
|
29 |
-
<div class="wppb-badge <?php echo $version; ?>"><?php printf( __( 'Version %s' ), PROFILE_BUILDER_VERSION ); ?></div>
|
30 |
-
<h1><?php
|
31 |
<p class="wppb-info-text"><?php printf( __( 'The best way to add front-end registration, edit profile and login forms.', 'profile-builder' ) ); ?></p>
|
32 |
<hr />
|
33 |
<h2 class="wppb-callout"><?php _e( 'For Modern User Interaction', 'profile-builder' ); ?></h2>
|
@@ -156,7 +156,7 @@ function wppb_basic_info_content() {
|
|
156 |
<hr/>
|
157 |
<div class="wrap wppb-wrap wppb-1-3-col">
|
158 |
<div>
|
159 |
-
<a href="<?php echo admin_url('options.php?page=profile-builder-pms-promo'); ?>"><img src="<?php echo plugins_url( '../assets/images/
|
160 |
</div>
|
161 |
<div>
|
162 |
<h3>Paid user profiles with Profile Builder and Paid Member Subscriptions</h3>
|
26 |
|
27 |
?>
|
28 |
<div class="wrap wppb-wrap wppb-info-wrap">
|
29 |
+
<div class="wppb-badge <?php echo $version; ?>"><span><?php printf( __( 'Version %s' ), PROFILE_BUILDER_VERSION ); ?></span></div>
|
30 |
+
<h1><?php echo __( '<strong>Profile Builder </strong>' . $version, 'profile-builder' ); ?></h1>
|
31 |
<p class="wppb-info-text"><?php printf( __( 'The best way to add front-end registration, edit profile and login forms.', 'profile-builder' ) ); ?></p>
|
32 |
<hr />
|
33 |
<h2 class="wppb-callout"><?php _e( 'For Modern User Interaction', 'profile-builder' ); ?></h2>
|
156 |
<hr/>
|
157 |
<div class="wrap wppb-wrap wppb-1-3-col">
|
158 |
<div>
|
159 |
+
<a href="<?php echo admin_url('options.php?page=profile-builder-pms-promo'); ?>"><img src="<?php echo plugins_url( '../assets/images/pb-pms-cross-promotion.png', __FILE__ ); ?>" alt="paid member subscriptions"/></a>
|
160 |
</div>
|
161 |
<div>
|
162 |
<h3>Paid user profiles with Profile Builder and Paid Member Subscriptions</h3>
|
admin/manage-fields.php
CHANGED
@@ -46,6 +46,7 @@ function wppb_manage_fields_submenu(){
|
|
46 |
if( PROFILE_BUILDER != 'Profile Builder Free' ) {
|
47 |
$manage_field_types[] = 'Heading';
|
48 |
$manage_field_types[] = 'Input';
|
|
|
49 |
$manage_field_types[] = 'Input (Hidden)';
|
50 |
$manage_field_types[] = 'Textarea';
|
51 |
$manage_field_types[] = 'WYSIWYG';
|
@@ -143,6 +144,9 @@ function wppb_manage_fields_submenu(){
|
|
143 |
array( 'type' => 'textarea', 'slug' => 'html-content', 'title' => __( 'HTML Content', 'profile-builder' ), 'description' => __( "Add your HTML (or text) content", 'profile-builder' ) ),
|
144 |
array( 'type' => 'text', 'slug' => 'phone-format', 'title' => __( 'Phone Format', 'profile-builder' ), 'default' => '(###) ###-####', 'description' => __( "You can use: # for numbers, parentheses ( ), - sign, + sign, dot . and spaces.", 'profile-builder' ) .'<br>'. __( "Eg. (###) ###-####", 'profile-builder' ) .'<br>'. __( "Empty field won't check for correct phone number.", 'profile-builder' ) ),
|
145 |
array( 'type' => 'select', 'slug' => 'heading-tag', 'title' => __( 'Heading Tag', 'profile-builder' ), 'options' => array( '%h1 - biggest size%h1', 'h2', 'h3', 'h4', 'h5', '%h6 - smallest size%h6' ), 'default' => 'h4', 'description' => __( 'Change heading field size on front-end forms', 'profile-builder' ) ),
|
|
|
|
|
|
|
146 |
array( 'type' => 'select', 'slug' => 'required', 'title' => __( 'Required', 'profile-builder' ), 'options' => array( 'No', 'Yes' ), 'default' => 'No', 'description' => __( 'Whether the field is required or not', 'profile-builder' ) ),
|
147 |
array( 'type' => 'select', 'slug' => 'overwrite-existing', 'title' => __( 'Overwrite Existing', 'profile-builder' ), 'options' => array( 'No', 'Yes' ), 'default' => 'No', 'description' => __( "Selecting 'Yes' will add the field to the list, but will overwrite any other field in the database that has the same meta-name<br/>Use this at your own risk", 'profile-builder' ) ),
|
148 |
) );
|
46 |
if( PROFILE_BUILDER != 'Profile Builder Free' ) {
|
47 |
$manage_field_types[] = 'Heading';
|
48 |
$manage_field_types[] = 'Input';
|
49 |
+
$manage_field_types[] = 'Number';
|
50 |
$manage_field_types[] = 'Input (Hidden)';
|
51 |
$manage_field_types[] = 'Textarea';
|
52 |
$manage_field_types[] = 'WYSIWYG';
|
144 |
array( 'type' => 'textarea', 'slug' => 'html-content', 'title' => __( 'HTML Content', 'profile-builder' ), 'description' => __( "Add your HTML (or text) content", 'profile-builder' ) ),
|
145 |
array( 'type' => 'text', 'slug' => 'phone-format', 'title' => __( 'Phone Format', 'profile-builder' ), 'default' => '(###) ###-####', 'description' => __( "You can use: # for numbers, parentheses ( ), - sign, + sign, dot . and spaces.", 'profile-builder' ) .'<br>'. __( "Eg. (###) ###-####", 'profile-builder' ) .'<br>'. __( "Empty field won't check for correct phone number.", 'profile-builder' ) ),
|
146 |
array( 'type' => 'select', 'slug' => 'heading-tag', 'title' => __( 'Heading Tag', 'profile-builder' ), 'options' => array( '%h1 - biggest size%h1', 'h2', 'h3', 'h4', 'h5', '%h6 - smallest size%h6' ), 'default' => 'h4', 'description' => __( 'Change heading field size on front-end forms', 'profile-builder' ) ),
|
147 |
+
array( 'type' => 'text', 'slug' => 'min-number-value', 'title' => __( 'Min Number Value', 'profile-builder' ), 'description' => __( "Min allowed number value (0 to allow only positive numbers)", 'profile-builder' ) .'<br>'. __( "Leave it empty for no min value", 'profile-builder' ) ),
|
148 |
+
array( 'type' => 'text', 'slug' => 'max-number-value', 'title' => __( 'Max Number Value', 'profile-builder' ), 'description' => __( "Max allowed number value (0 to allow only negative numbers)", 'profile-builder' ) .'<br>'. __( "Leave it empty for no max value", 'profile-builder' ) ),
|
149 |
+
array( 'type' => 'text', 'slug' => 'number-step-value', 'title' => __( 'Number Step Value', 'profile-builder' ), 'description' => __( "Step value 1 to allow only integers, 0.1 to allow integers and numbers with 1 decimal", 'profile-builder' ) .'<br>'. __( "To allow multiple decimals use for eg. 0.01 (for 2 deciamls) and so on", 'profile-builder' ) .'<br>'. __( "You can also use step value to specify the legal number intervals (eg. step value 2 will allow only -4, -2, 0, 2 and so on)", 'profile-builder' ) .'<br>'. __( "Leave it empty for no restriction", 'profile-builder' ) ),
|
150 |
array( 'type' => 'select', 'slug' => 'required', 'title' => __( 'Required', 'profile-builder' ), 'options' => array( 'No', 'Yes' ), 'default' => 'No', 'description' => __( 'Whether the field is required or not', 'profile-builder' ) ),
|
151 |
array( 'type' => 'select', 'slug' => 'overwrite-existing', 'title' => __( 'Overwrite Existing', 'profile-builder' ), 'options' => array( 'No', 'Yes' ), 'default' => 'No', 'description' => __( "Selecting 'Yes' will add the field to the list, but will overwrite any other field in the database that has the same meta-name<br/>Use this at your own risk", 'profile-builder' ) ),
|
152 |
) );
|
admin/pms-cross-promotion.php
CHANGED
@@ -94,7 +94,7 @@ function wppb_pms_cross_promo() {
|
|
94 |
<div class="plugin-card wppb-recommended-plugin wppb-add-on" style="width: 111%;">
|
95 |
<div class="plugin-card-top">
|
96 |
<a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">
|
97 |
-
<img src="<?php echo plugins_url( '../assets/images/
|
98 |
</a>
|
99 |
<h3 class="wppb-add-on-title">
|
100 |
<a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">Paid Member Subscriptions</a>
|
94 |
<div class="plugin-card wppb-recommended-plugin wppb-add-on" style="width: 111%;">
|
95 |
<div class="plugin-card-top">
|
96 |
<a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">
|
97 |
+
<img src="<?php echo plugins_url( '../assets/images/pms-recommended.png', __FILE__ ); ?>" width="100%">
|
98 |
</a>
|
99 |
<h3 class="wppb-add-on-title">
|
100 |
<a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">Paid Member Subscriptions</a>
|
assets/css/style-back-end.css
CHANGED
@@ -49,33 +49,44 @@
|
|
49 |
}
|
50 |
|
51 |
.wppb-badge{
|
52 |
-
float:right;
|
53 |
-
color
|
54 |
display: inline-block;
|
55 |
font-size: 14px;
|
56 |
font-weight: 600;
|
57 |
width: 150px;
|
58 |
-
height:
|
59 |
-
margin-bottom:25px;
|
60 |
-
padding-top: 120px;
|
61 |
text-align: center;
|
62 |
text-rendering: optimizelegibility;
|
63 |
}
|
64 |
|
65 |
.wppb-badge.Pro{
|
66 |
-
background:url(../images/
|
67 |
}
|
68 |
|
69 |
.wppb-badge.Hobbyist{
|
70 |
-
background:url(../images/
|
71 |
}
|
72 |
|
73 |
.wppb-badge.Free{
|
74 |
-
background:url(../images/
|
75 |
}
|
76 |
|
77 |
.wppb-badge.wppb-pb-pms{
|
78 |
-
background:url(../images/pb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
}
|
80 |
|
81 |
/* Userlist page */
|
@@ -469,6 +480,7 @@
|
|
469 |
.wppb-add-on .wppb-add-on-title {
|
470 |
letter-spacing: -0.7px;
|
471 |
margin-bottom: 7px;
|
|
|
472 |
}
|
473 |
|
474 |
.wppb-add-on .wppb-add-on-title a {
|
@@ -600,7 +612,7 @@ p .wppb-button-free {
|
|
600 |
/* PMS Compatibility page */
|
601 |
#pms-bottom-install .plugin-card-bottom{
|
602 |
border:none;
|
603 |
-
background: #
|
604 |
color:#fff;
|
605 |
}
|
606 |
|
@@ -613,7 +625,7 @@ p .wppb-button-free {
|
|
613 |
font-size: 130%;
|
614 |
padding: 10px 20px;
|
615 |
height: auto;
|
616 |
-
color: #
|
617 |
text-decoration: none;
|
618 |
}
|
619 |
|
49 |
}
|
50 |
|
51 |
.wppb-badge{
|
52 |
+
float: right;
|
53 |
+
color: #fff;
|
54 |
display: inline-block;
|
55 |
font-size: 14px;
|
56 |
font-weight: 600;
|
57 |
width: 150px;
|
58 |
+
height: 150px;
|
59 |
+
margin-bottom: 25px;
|
|
|
60 |
text-align: center;
|
61 |
text-rendering: optimizelegibility;
|
62 |
}
|
63 |
|
64 |
.wppb-badge.Pro{
|
65 |
+
background:url(../images/pb-logo-pro.png) center no-repeat;
|
66 |
}
|
67 |
|
68 |
.wppb-badge.Hobbyist{
|
69 |
+
background:url(../images/pb-logo-hobbyist.png) center no-repeat;
|
70 |
}
|
71 |
|
72 |
.wppb-badge.Free{
|
73 |
+
background:url(../images/pb-logo-free.png) center no-repeat;
|
74 |
}
|
75 |
|
76 |
.wppb-badge.wppb-pb-pms{
|
77 |
+
background:url(../images/pb-pms-cross-promotion-icon.png) center center no-repeat;
|
78 |
+
}
|
79 |
+
|
80 |
+
.wppb-badge {
|
81 |
+
background-size: cover !important;
|
82 |
+
}
|
83 |
+
|
84 |
+
.wppb-badge span {
|
85 |
+
display: inline-block;
|
86 |
+
text-transform: uppercase;
|
87 |
+
color: #fff;
|
88 |
+
margin-top: 110px;
|
89 |
+
font-size: 90%;
|
90 |
}
|
91 |
|
92 |
/* Userlist page */
|
480 |
.wppb-add-on .wppb-add-on-title {
|
481 |
letter-spacing: -0.7px;
|
482 |
margin-bottom: 7px;
|
483 |
+
margin-top: 7px;
|
484 |
}
|
485 |
|
486 |
.wppb-add-on .wppb-add-on-title a {
|
612 |
/* PMS Compatibility page */
|
613 |
#pms-bottom-install .plugin-card-bottom{
|
614 |
border:none;
|
615 |
+
background: #e86054;
|
616 |
color:#fff;
|
617 |
}
|
618 |
|
625 |
font-size: 130%;
|
626 |
padding: 10px 20px;
|
627 |
height: auto;
|
628 |
+
color: #e86054;
|
629 |
text-decoration: none;
|
630 |
}
|
631 |
|
assets/css/style-front-end.css
CHANGED
@@ -50,6 +50,7 @@
|
|
50 |
padding: 0;
|
51 |
}
|
52 |
.wppb-user-forms input[type="text"],
|
|
|
53 |
.wppb-user-forms input[type="email"],
|
54 |
.wppb-user-forms input[type="url"],
|
55 |
.wppb-user-forms input[type="password"],
|
@@ -60,6 +61,7 @@
|
|
60 |
border-radius: 3px;
|
61 |
}
|
62 |
.wppb-user-forms input[type="text"]:focus,
|
|
|
63 |
.wppb-user-forms input[type="email"]:focus,
|
64 |
.wppb-user-forms input[type="url"]:focus,
|
65 |
.wppb-user-forms input[type="password"]:focus,
|
@@ -68,6 +70,7 @@
|
|
68 |
color: #111;
|
69 |
}
|
70 |
.wppb-user-forms input[type="text"],
|
|
|
71 |
.wppb-user-forms input[type="email"],
|
72 |
.wppb-user-forms input[type="url"],
|
73 |
.wppb-user-forms input[type="password"],
|
@@ -169,7 +172,7 @@
|
|
169 |
min-height:1px;
|
170 |
}
|
171 |
.wppb-form-field input,
|
172 |
-
.wppb-form-field input[type="text"], .wppb-form-field input[type="email"], .wppb-form-field input[type="url"], .wppb-form-field input[type="password"], .wppb-form-field input[type="search"],
|
173 |
.wppb-form-field select,
|
174 |
.wppb-form-field textarea,
|
175 |
.wppb-checkboxes,
|
50 |
padding: 0;
|
51 |
}
|
52 |
.wppb-user-forms input[type="text"],
|
53 |
+
.wppb-user-forms input[type="number"],
|
54 |
.wppb-user-forms input[type="email"],
|
55 |
.wppb-user-forms input[type="url"],
|
56 |
.wppb-user-forms input[type="password"],
|
61 |
border-radius: 3px;
|
62 |
}
|
63 |
.wppb-user-forms input[type="text"]:focus,
|
64 |
+
.wppb-user-forms input[type="number"]:focus,
|
65 |
.wppb-user-forms input[type="email"]:focus,
|
66 |
.wppb-user-forms input[type="url"]:focus,
|
67 |
.wppb-user-forms input[type="password"]:focus,
|
70 |
color: #111;
|
71 |
}
|
72 |
.wppb-user-forms input[type="text"],
|
73 |
+
.wppb-user-forms input[type="number"],
|
74 |
.wppb-user-forms input[type="email"],
|
75 |
.wppb-user-forms input[type="url"],
|
76 |
.wppb-user-forms input[type="password"],
|
172 |
min-height:1px;
|
173 |
}
|
174 |
.wppb-form-field input,
|
175 |
+
.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"],
|
176 |
.wppb-form-field select,
|
177 |
.wppb-form-field textarea,
|
178 |
.wppb-checkboxes,
|
assets/images/pb-logo-free.png
ADDED
Binary file
|
assets/images/pb-logo-hobbyist.png
ADDED
Binary file
|
assets/images/pb-logo-pro.png
ADDED
Binary file
|
assets/images/pb-pms-cross-promotion-icon.png
ADDED
Binary file
|
assets/images/pb-pms-cross-promotion.png
ADDED
Binary file
|
assets/images/pms-recommended.png
ADDED
Binary file
|
assets/js/jquery-manage-fields-live-change.js
CHANGED
@@ -209,6 +209,19 @@ var fields = {
|
|
209 |
'.row-overwrite-existing'
|
210 |
]
|
211 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
'Input (Hidden)': { 'show_rows' : [
|
213 |
'.row-field-title',
|
214 |
'.row-meta-name',
|
@@ -499,7 +512,8 @@ function wppb_hide_all ( container_name ){
|
|
499 |
jQuery( container_name + ' ' + '.mb-list-entry-fields .button-primary' ).attr( 'disabled', true );
|
500 |
|
501 |
jQuery( container_name + ' ' + '.element_type_default-e-mail .mbdelete,' + ' ' + container_name + ' ' + '.element_type_default-password .mbdelete,' + ' ' + container_name + ' ' + '.element_type_default-username .mbdelete' ).hide(); // PB specific line
|
502 |
-
jQuery( container_name + ' ' + '.element_type_default-e-mail #field' + ', ' + container_name + ' ' + '.element_type_default-password #field' + ', ' + container_name + ' ' + '.element_type_default-username #field' + ', ' + container_name + ' ' + '.element_type_default-e-mail #required' + ', ' + container_name + ' ' + '.element_type_default-password #required,' + container_name + ' ' + '.element_type_default-username #required,' + container_name + ' ' + '.element_type_checkbox-terms-and-conditions #required,' + container_name + ' ' + '.element_type_recaptcha #required' ).attr( 'disabled', true ); // PB specific line
|
|
|
503 |
}
|
504 |
|
505 |
|
209 |
'.row-overwrite-existing'
|
210 |
]
|
211 |
},
|
212 |
+
|
213 |
+
'Number': { 'show_rows' : [
|
214 |
+
'.row-field-title',
|
215 |
+
'.row-meta-name',
|
216 |
+
'.row-description',
|
217 |
+
'.row-default-value',
|
218 |
+
'.row-min-number-value',
|
219 |
+
'.row-max-number-value',
|
220 |
+
'.row-number-step-value',
|
221 |
+
'.row-required',
|
222 |
+
'.row-overwrite-existing'
|
223 |
+
]
|
224 |
+
},
|
225 |
'Input (Hidden)': { 'show_rows' : [
|
226 |
'.row-field-title',
|
227 |
'.row-meta-name',
|
512 |
jQuery( container_name + ' ' + '.mb-list-entry-fields .button-primary' ).attr( 'disabled', true );
|
513 |
|
514 |
jQuery( container_name + ' ' + '.element_type_default-e-mail .mbdelete,' + ' ' + container_name + ' ' + '.element_type_default-password .mbdelete,' + ' ' + container_name + ' ' + '.element_type_default-username .mbdelete' ).hide(); // PB specific line
|
515 |
+
jQuery( container_name + ' ' + '.element_type_default-e-mail #field' + ', ' + container_name + ' ' + '.element_type_default-password #field' + ', ' + container_name + ' ' + '.element_type_default-username #field' + ', ' + container_name + ' ' + '.element_type_default-e-mail #required' + ', ' + container_name + ' ' + '.element_type_default-password #required,' + container_name + ' ' + '.element_type_default-username #required,' + container_name + ' ' + '.element_type_checkbox-terms-and-conditions #required,' + container_name + ' ' + '.element_type_recaptcha #required,' + container_name + ' ' + '.element_type_woocommerce-customer-billing-address #field, ' + container_name + ' ' + '.element_type_woocommerce-customer-shipping-address #field').attr( 'disabled', true ); // PB specific line
|
516 |
+
|
517 |
}
|
518 |
|
519 |
|
features/functions.php
CHANGED
@@ -621,6 +621,37 @@ function wppb_required_field_error($field_title='') {
|
|
621 |
return $required_error;
|
622 |
|
623 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
624 |
/* Function for displaying reCAPTCHA error on Login and Recover Password forms */
|
625 |
function wppb_recaptcha_field_error($field_title='') {
|
626 |
$recaptcha_error = apply_filters('wppb_recaptcha_error' , __('Please enter a (valid) reCAPTCHA value','profile-builder') , $field_title);
|
@@ -640,21 +671,21 @@ function wppb_get_query_var( $varname ){
|
|
640 |
return apply_filters( 'wppb_get_query_var_'.$varname, get_query_var( $varname ) );
|
641 |
}
|
642 |
|
643 |
-
/*Filter the "Save Changes" button text, to make it translatable*/
|
644 |
function wppb_change_save_changes_button($value){
|
645 |
$value = __('Save Changes','profile-builder');
|
646 |
return $value;
|
647 |
}
|
648 |
add_filter( 'wck_save_changes_button', 'wppb_change_save_changes_button', 10, 2);
|
649 |
|
650 |
-
/*Filter the "Cancel" button text, to make it translatable*/
|
651 |
function wppb_change_cancel_button($value){
|
652 |
$value = __('Cancel','profile-builder');
|
653 |
return $value;
|
654 |
}
|
655 |
add_filter( 'wck_cancel_button', 'wppb_change_cancel_button', 10, 2);
|
656 |
|
657 |
-
/*
|
658 |
function wppb_change_delete_button($value){
|
659 |
$value = __('Delete','profile-builder');
|
660 |
return $value;
|
@@ -735,7 +766,7 @@ function wppb_get_date_by_timezone() {
|
|
735 |
* Field type 'Checkbox' is explicitly excluded because there is no HTML support to check if at least one option is selected.
|
736 |
* Other fields excluded are Avatar, Upload, Heading, ReCaptcha, WYSIWYG, Map.
|
737 |
*
|
738 |
-
* @since
|
739 |
*
|
740 |
* @param string $extra_attributes Extra attributes attached to the field HTML tag.
|
741 |
* @param array $field Field description.
|
@@ -748,7 +779,7 @@ function wppb_add_html_tag_required_to_fields( $extra_attributes, $field, $form_
|
|
748 |
}
|
749 |
return $extra_attributes;
|
750 |
}
|
751 |
-
|
752 |
|
753 |
/**
|
754 |
* Add HTML tag 'required' to WooCommerce fields
|
@@ -756,7 +787,7 @@ function wppb_add_html_tag_required_to_fields( $extra_attributes, $field, $form_
|
|
756 |
* Add HTML tag 'required' for each WooCommerce field if the field is required. For browsers that don't support this HTML tag, we will still have the fallback.
|
757 |
* Does not work on 'State / County' field, if it becomes required later depending on the Country Value
|
758 |
*
|
759 |
-
* @since
|
760 |
*
|
761 |
* @param string $extra_attributes Extra attributes attached to the field HTML tag.
|
762 |
* @param array $field Field description.
|
@@ -768,4 +799,54 @@ function wppb_add_html_tag_required_to_woo_fields( $extra_attributes, $field ) {
|
|
768 |
}
|
769 |
return $extra_attributes;
|
770 |
}
|
771 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
621 |
return $required_error;
|
622 |
|
623 |
}
|
624 |
+
|
625 |
+
/**
|
626 |
+
* Function that returns a certain field (from manage_fields) by a given id or meta_name
|
627 |
+
*/
|
628 |
+
function wppb_get_field_by_id_or_meta( $id_or_meta ){
|
629 |
+
|
630 |
+
$id = 0;
|
631 |
+
$meta = '';
|
632 |
+
|
633 |
+
if ( is_numeric($id_or_meta) )
|
634 |
+
$id = $id_or_meta;
|
635 |
+
else
|
636 |
+
$meta = $id_or_meta;
|
637 |
+
|
638 |
+
$fields = get_option('wppb_manage_fields', 'not_found');
|
639 |
+
|
640 |
+
if ($fields != 'not_found') {
|
641 |
+
|
642 |
+
foreach ($fields as $key => $field) {
|
643 |
+
if ( (!empty($id)) && ($field['id'] == $id) )
|
644 |
+
return $field;
|
645 |
+
if ( (!empty($meta)) && ($field['meta-name'] == $meta) )
|
646 |
+
return $field;
|
647 |
+
}
|
648 |
+
|
649 |
+
}
|
650 |
+
|
651 |
+
return '';
|
652 |
+
}
|
653 |
+
|
654 |
+
|
655 |
/* Function for displaying reCAPTCHA error on Login and Recover Password forms */
|
656 |
function wppb_recaptcha_field_error($field_title='') {
|
657 |
$recaptcha_error = apply_filters('wppb_recaptcha_error' , __('Please enter a (valid) reCAPTCHA value','profile-builder') , $field_title);
|
671 |
return apply_filters( 'wppb_get_query_var_'.$varname, get_query_var( $varname ) );
|
672 |
}
|
673 |
|
674 |
+
/* Filter the "Save Changes" button text, to make it translatable */
|
675 |
function wppb_change_save_changes_button($value){
|
676 |
$value = __('Save Changes','profile-builder');
|
677 |
return $value;
|
678 |
}
|
679 |
add_filter( 'wck_save_changes_button', 'wppb_change_save_changes_button', 10, 2);
|
680 |
|
681 |
+
/* Filter the "Cancel" button text, to make it translatable */
|
682 |
function wppb_change_cancel_button($value){
|
683 |
$value = __('Cancel','profile-builder');
|
684 |
return $value;
|
685 |
}
|
686 |
add_filter( 'wck_cancel_button', 'wppb_change_cancel_button', 10, 2);
|
687 |
|
688 |
+
/* ilter the "Delete" button text, to make it translatable */
|
689 |
function wppb_change_delete_button($value){
|
690 |
$value = __('Delete','profile-builder');
|
691 |
return $value;
|
766 |
* Field type 'Checkbox' is explicitly excluded because there is no HTML support to check if at least one option is selected.
|
767 |
* Other fields excluded are Avatar, Upload, Heading, ReCaptcha, WYSIWYG, Map.
|
768 |
*
|
769 |
+
* @since
|
770 |
*
|
771 |
* @param string $extra_attributes Extra attributes attached to the field HTML tag.
|
772 |
* @param array $field Field description.
|
779 |
}
|
780 |
return $extra_attributes;
|
781 |
}
|
782 |
+
add_filter( 'wppb_extra_attribute', 'wppb_add_html_tag_required_to_fields', 10, 3 );
|
783 |
|
784 |
/**
|
785 |
* Add HTML tag 'required' to WooCommerce fields
|
787 |
* Add HTML tag 'required' for each WooCommerce field if the field is required. For browsers that don't support this HTML tag, we will still have the fallback.
|
788 |
* Does not work on 'State / County' field, if it becomes required later depending on the Country Value
|
789 |
*
|
790 |
+
* @since
|
791 |
*
|
792 |
* @param string $extra_attributes Extra attributes attached to the field HTML tag.
|
793 |
* @param array $field Field description.
|
799 |
}
|
800 |
return $extra_attributes;
|
801 |
}
|
802 |
+
add_filter( 'wppb_woo_extra_attribute', 'wppb_add_html_tag_required_to_woo_fields', 10, 2 );
|
803 |
+
|
804 |
+
|
805 |
+
/**
|
806 |
+
* Add jQuery script to remove required attribute for hidden fields
|
807 |
+
*
|
808 |
+
* If a field is hidden dynamically via conditional fields or WooSync 'Ship to a different address' checkbox, then the required field needs to be removed.
|
809 |
+
* If a field is made visible again, add the required field back again.
|
810 |
+
*
|
811 |
+
* @since
|
812 |
+
*
|
813 |
+
* @param string $extra_attributes Extra attributes attached to the field HTML tag.
|
814 |
+
* @param array $field Field description.
|
815 |
+
* @return string $extra_attributes
|
816 |
+
*/
|
817 |
+
function wppb_manage_required_attribute() {
|
818 |
+
global $wppb_shortcode_on_front;
|
819 |
+
if ($wppb_shortcode_on_front) {
|
820 |
+
?>
|
821 |
+
<script type="text/javascript">
|
822 |
+
jQuery("*").on( "wppbAddRequiredAttributeEvent", wppbAddRequired );
|
823 |
+
function wppbAddRequired(event) {
|
824 |
+
if( jQuery( this ).attr( "temprequired" ) ){
|
825 |
+
jQuery( this ).removeAttr( "temprequired" );
|
826 |
+
jQuery( this ).attr( "required", "required" );
|
827 |
+
}
|
828 |
+
}
|
829 |
+
|
830 |
+
jQuery("*").on( "wppbRemoveRequiredAttributeEvent", wppbRemoveRequired );
|
831 |
+
function wppbRemoveRequired(event) {
|
832 |
+
if ( jQuery( this ).attr( "required" ) ) {
|
833 |
+
jQuery(this).removeAttr( "required" );
|
834 |
+
jQuery(this).attr( "temprequired", "temprequired" );
|
835 |
+
}
|
836 |
+
}
|
837 |
+
|
838 |
+
jQuery("*").on( "wppbToggleRequiredAttributeEvent", wppbToggleRequired );
|
839 |
+
function wppbToggleRequired(event) {
|
840 |
+
if ( jQuery( this ).attr( "required" ) ) {
|
841 |
+
jQuery(this).removeAttr( "required" );
|
842 |
+
jQuery(this).attr( "temprequired", "temprequired" );
|
843 |
+
}else if( jQuery( this ).attr( "temprequired" ) ){
|
844 |
+
jQuery( this ).removeAttr( "temprequired" );
|
845 |
+
jQuery( this ).attr( "required", "required" );
|
846 |
+
}
|
847 |
+
}
|
848 |
+
</script>
|
849 |
+
<?php
|
850 |
+
}
|
851 |
+
}
|
852 |
+
add_action( 'wp_footer', 'wppb_manage_required_attribute' );
|
front-end/class-formbuilder.php
CHANGED
@@ -256,7 +256,13 @@ class Profile_Builder_Form_Creator{
|
|
256 |
|
257 |
$location .= "/?autologin=true&uid=$user->ID&_wpnonce=$nonce";
|
258 |
|
259 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
}
|
261 |
|
262 |
function wppb_form_content( $message ){
|
256 |
|
257 |
$location .= "/?autologin=true&uid=$user->ID&_wpnonce=$nonce";
|
258 |
|
259 |
+
$redirect_message = '<p class="redirect_message">'. sprintf( __( 'You will soon be redirected automatically. If you see this page for more than %1$d seconds, please click %2$s.%3$s', 'profile-builder' ), $this->args['redirect_delay'], '<a href="'. $location .'">'. __( 'here', 'profile-builder' ) .'</a>', '<meta http-equiv="Refresh" content="'. $this->args['redirect_delay'] .';url='. $location .'" />' ) .'</p>';
|
260 |
+
|
261 |
+
if ( $this->args['redirect_activated'] == 'No' ) {
|
262 |
+
return "<script> window.location.replace( '$location' ); </script>";
|
263 |
+
} else {
|
264 |
+
return "<script> jQuery( '#wppb_form_success_message' ).after( '$redirect_message' ); </script>";
|
265 |
+
}
|
266 |
}
|
267 |
|
268 |
function wppb_form_content( $message ){
|
front-end/recover.php
CHANGED
@@ -318,7 +318,7 @@ function wppb_front_end_password_recovery(){
|
|
318 |
|
319 |
?>
|
320 |
|
321 |
-
<div class="wppb_holder" id="wppb-recover-password">
|
322 |
|
323 |
<?php
|
324 |
// use this action hook to add extra content before the password recovery form
|
318 |
|
319 |
?>
|
320 |
|
321 |
+
<div class="wppb_holder" id="wppb-recover-password-container">
|
322 |
|
323 |
<?php
|
324 |
// use this action hook to add extra content before the password recovery form
|
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 chose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
|
6 |
-
Version: 2.4.
|
7 |
Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel, Mihai Iova
|
8 |
Author URI: https://www.cozmoslabs.com/
|
9 |
License: GPL2
|
@@ -73,7 +73,7 @@ function wppb_free_plugin_init() {
|
|
73 |
*
|
74 |
*
|
75 |
*/
|
76 |
-
define('PROFILE_BUILDER_VERSION', '2.4.
|
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'))));
|
@@ -133,6 +133,9 @@ function wppb_free_plugin_init() {
|
|
133 |
include_once(WPPB_PLUGIN_DIR . '/features/admin-approval/admin-approval.php');
|
134 |
include_once(WPPB_PLUGIN_DIR . '/features/admin-approval/class-admin-approval.php');
|
135 |
}
|
|
|
|
|
|
|
136 |
include_once(WPPB_PLUGIN_DIR . '/features/login-widget/login-widget.php');
|
137 |
|
138 |
if (file_exists(WPPB_PLUGIN_DIR . '/update/update-checker.php')) {
|
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 chose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
|
6 |
+
Version: 2.4.4
|
7 |
Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel, Mihai Iova
|
8 |
Author URI: https://www.cozmoslabs.com/
|
9 |
License: GPL2
|
73 |
*
|
74 |
*
|
75 |
*/
|
76 |
+
define('PROFILE_BUILDER_VERSION', '2.4.4' );
|
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'))));
|
133 |
include_once(WPPB_PLUGIN_DIR . '/features/admin-approval/admin-approval.php');
|
134 |
include_once(WPPB_PLUGIN_DIR . '/features/admin-approval/class-admin-approval.php');
|
135 |
}
|
136 |
+
if (file_exists(WPPB_PLUGIN_DIR . '/features/conditional-fields/conditional-fields.php')) {
|
137 |
+
include_once(WPPB_PLUGIN_DIR . '/features/conditional-fields/conditional-fields.php');
|
138 |
+
}
|
139 |
include_once(WPPB_PLUGIN_DIR . '/features/login-widget/login-widget.php');
|
140 |
|
141 |
if (file_exists(WPPB_PLUGIN_DIR . '/update/update-checker.php')) {
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
===
|
2 |
Contributors: cozmoslabs, reflectionmedia, sareiodata, adispiac, madalin.ungureanu, iova.mihai, barinagabriel
|
3 |
Donate link: http://www.cozmoslabs.com/wordpress-profile-builder/
|
4 |
Tags: user registration, user registration form, user fields, extra user fields, edit profile, user custom fields, front-end login, front-end edit profile, front-end user registration, email confirmation, login form
|
5 |
|
6 |
Requires at least: 3.1
|
7 |
Tested up to: 4.5.3
|
8 |
-
Stable tag: 2.4.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -53,8 +53,9 @@ Users with administrator rights have access to the following features:
|
|
53 |
|
54 |
The [Pro version](http://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) has the following extra features:
|
55 |
|
56 |
-
* Create Extra User Fields (Heading, Input, Hidden-Input, Checkbox, Agree to Terms Checkbox, Radio Buttons, DatePicker, Textareas, WYSIWYG, reCAPTCHA, Upload fields, Selects, User Role Select, Country
|
57 |
* Add Avatar Upload for users
|
|
|
58 |
* Front-end User Listing (fully customizable, sorting included)
|
59 |
* Create Multiple User Listings
|
60 |
* Custom Redirects
|
@@ -89,10 +90,12 @@ For more functionality check out [Profile Builder Add-ons page](http://www.cozmo
|
|
89 |
|
90 |
**Premium Add-ons**
|
91 |
|
92 |
-
* [Social Connect](http://www.cozmoslabs.com/add-ons/social-connect/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - enable social login on your website, users can login with Facebook, Google+ or Twitter
|
93 |
* [WooCommerce Sync](http://www.cozmoslabs.com/add-ons/woocommerce-sync/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - integrates Profile Builder with WooCommerce, allowing you to manage Shipping and Billing fields from WooCommerce with PB and more
|
|
|
|
|
94 |
* [MailChimp](http://www.cozmoslabs.com/add-ons/profile-builder-mailchimp/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to subscribe to your Mailchimp lists directly from the Register or Edit Profile forms
|
95 |
* [Campaign Monitor](http://www.cozmoslabs.com/add-ons/profile-builder-campaign-monitor/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to subscribe to your Campaign Monitor lists directly from the Register or Edit Profile forms
|
|
|
96 |
* [Field Visibility](http://www.cozmoslabs.com/add-ons/field-visibility/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allows you to change the visibility options for the extra fields
|
97 |
|
98 |
|
@@ -147,6 +150,12 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
|
|
147 |
10. Profile Builder Login Widget
|
148 |
|
149 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
= 2.4.3 =
|
151 |
* When login with email we remove the li for the username field now
|
152 |
* Small code review changes
|
1 |
+
=== User registration & user profile - Profile Builder ===
|
2 |
Contributors: cozmoslabs, reflectionmedia, sareiodata, adispiac, madalin.ungureanu, iova.mihai, barinagabriel
|
3 |
Donate link: http://www.cozmoslabs.com/wordpress-profile-builder/
|
4 |
Tags: user registration, user registration form, user fields, extra user fields, edit profile, user custom fields, front-end login, front-end edit profile, front-end user registration, email confirmation, login form
|
5 |
|
6 |
Requires at least: 3.1
|
7 |
Tested up to: 4.5.3
|
8 |
+
Stable tag: 2.4.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
53 |
|
54 |
The [Pro version](http://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) has the following extra features:
|
55 |
|
56 |
+
* Create Extra User Fields (Heading, Input, Hidden-Input, Checkbox, Agree to Terms Checkbox, Radio Buttons, DatePicker, Textareas, WYSIWYG, reCAPTCHA, Upload fields, Selects, User Role Select, Country Select, Timezone Select, Avatar Upload, Map, HTML, Phone, Time Picker, ColorPicker, Custom Validation field, Currency Select)
|
57 |
* Add Avatar Upload for users
|
58 |
+
* Support for Conditional Fields
|
59 |
* Front-end User Listing (fully customizable, sorting included)
|
60 |
* Create Multiple User Listings
|
61 |
* Custom Redirects
|
90 |
|
91 |
**Premium Add-ons**
|
92 |
|
|
|
93 |
* [WooCommerce Sync](http://www.cozmoslabs.com/add-ons/woocommerce-sync/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - integrates Profile Builder with WooCommerce, allowing you to manage Shipping and Billing fields from WooCommerce with PB and more
|
94 |
+
* [Social Connect](http://www.cozmoslabs.com/add-ons/social-connect/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - enable social login on your website, users can login with Facebook, Google+ or Twitter
|
95 |
+
* [Custom Profile Menus](http://www.cozmoslabs.com/add-ons/custom-profile-menus/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - add custom menu items like Login/Logout or just Logout button and Login/Register/Edit Profile in iFrame Popup
|
96 |
* [MailChimp](http://www.cozmoslabs.com/add-ons/profile-builder-mailchimp/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to subscribe to your Mailchimp lists directly from the Register or Edit Profile forms
|
97 |
* [Campaign Monitor](http://www.cozmoslabs.com/add-ons/profile-builder-campaign-monitor/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to subscribe to your Campaign Monitor lists directly from the Register or Edit Profile forms
|
98 |
+
* [MailPoet](http://www.cozmoslabs.com/add-ons/mailpoet/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to subscribe to your MailPoet lists directly from the Register and Edit Profile forms
|
99 |
* [Field Visibility](http://www.cozmoslabs.com/add-ons/field-visibility/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allows you to change the visibility options for the extra fields
|
100 |
|
101 |
|
150 |
10. Profile Builder Login Widget
|
151 |
|
152 |
== Changelog ==
|
153 |
+
= 2.4.4 =
|
154 |
+
* Added New branding images
|
155 |
+
* Added -required- html tag to fields
|
156 |
+
* Created function to return field based on id or meta_name
|
157 |
+
* Renamed HTML ID for recover-password div, to avoid duplicate IDs
|
158 |
+
|
159 |
= 2.4.3 =
|
160 |
* When login with email we remove the li for the username field now
|
161 |
* Small code review changes
|