Version Description
- When login with email we remove the li for the username field now
- Small code review changes
- PHP 7.0 compatibility code review
- Define filter in wck-api for adding support for custom field types
Download this release
Release Info
| Developer | adispiac |
| Plugin | |
| Version | 2.4.3 |
| Comparing to | |
| See all releases | |
Code changes from version 2.4.2 to 2.4.3
- admin/manage-fields.php +10 -1
- assets/css/style-front-end.css +5 -0
- assets/js/jquery-manage-fields-live-change.js +1 -0
- assets/lib/wck-api/wordpress-creation-kit.php +3 -0
- features/functions.php +46 -4
- front-end/default-fields/aim/aim.php +1 -1
- front-end/default-fields/default-fields.php +9 -0
- front-end/default-fields/description/description.php +1 -1
- front-end/default-fields/email/email.php +1 -1
- front-end/default-fields/first-name/first-name.php +1 -1
- front-end/default-fields/jabber/jabber.php +1 -1
- front-end/default-fields/last-name/last-name.php +1 -1
- front-end/default-fields/nickname/nickname.php +1 -1
- front-end/default-fields/password-repeat/password-repeat.php +1 -1
- front-end/default-fields/password/password.php +1 -1
- front-end/default-fields/username/username.php +1 -1
- front-end/default-fields/website/website.php +1 -1
- front-end/default-fields/yim/yim.php +1 -1
- front-end/edit-profile.php +1 -1
- front-end/register.php +1 -1
- index.php +2 -2
- readme.txt +12 -2
admin/manage-fields.php
CHANGED
|
@@ -142,6 +142,7 @@ function wppb_manage_fields_submenu(){
|
|
| 142 |
array( 'type' => 'textarea', 'slug' => 'default-content', 'title' => __( 'Default Content', 'profile-builder' ), 'description' => __( "Default value of the textarea", 'profile-builder' ) ),
|
| 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' => 'required', 'title' => __( 'Required', 'profile-builder' ), 'options' => array( 'No', 'Yes' ), 'default' => 'No', 'description' => __( 'Whether the field is required or not', 'profile-builder' ) ),
|
| 146 |
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' ) ),
|
| 147 |
) );
|
|
@@ -971,7 +972,7 @@ function wppb_check_field_on_edit_add( $message, $fields, $required_fields, $met
|
|
| 971 |
}
|
| 972 |
}
|
| 973 |
// END check if the unique fields are only added once
|
| 974 |
-
|
| 975 |
// check for avatar size
|
| 976 |
if ( $posted_values['field'] == 'Avatar' ){
|
| 977 |
if ( is_numeric( $posted_values['avatar-size'] ) ){
|
|
@@ -1065,6 +1066,14 @@ function wppb_check_field_on_edit_add( $message, $fields, $required_fields, $met
|
|
| 1065 |
}
|
| 1066 |
}
|
| 1067 |
//END check duplicate meta-name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1068 |
|
| 1069 |
// check for valid default option (checkbox, select, radio)
|
| 1070 |
if ( ( $posted_values['field'] == 'Checkbox' ) || ( $posted_values['field'] == 'Select (Multiple)' ) ) {
|
| 142 |
array( 'type' => 'textarea', 'slug' => 'default-content', 'title' => __( 'Default Content', 'profile-builder' ), 'description' => __( "Default value of the textarea", 'profile-builder' ) ),
|
| 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 |
) );
|
| 972 |
}
|
| 973 |
}
|
| 974 |
// END check if the unique fields are only added once
|
| 975 |
+
|
| 976 |
// check for avatar size
|
| 977 |
if ( $posted_values['field'] == 'Avatar' ){
|
| 978 |
if ( is_numeric( $posted_values['avatar-size'] ) ){
|
| 1066 |
}
|
| 1067 |
}
|
| 1068 |
//END check duplicate meta-name
|
| 1069 |
+
|
| 1070 |
+
// check for correct meta name on upload field
|
| 1071 |
+
if( $posted_values['field'] == 'Upload' ) {
|
| 1072 |
+
if( ! empty( $posted_values['meta-name'] ) && preg_match( '/([^a-z\d_-])/', $posted_values['meta-name'] ) ) {
|
| 1073 |
+
$message .= __( "The meta-name can only contain lowercase letters, numbers, _ , - and no spaces.\n", 'profile-builder' );
|
| 1074 |
+
}
|
| 1075 |
+
}
|
| 1076 |
+
// END check for correct meta name on upload field
|
| 1077 |
|
| 1078 |
// check for valid default option (checkbox, select, radio)
|
| 1079 |
if ( ( $posted_values['field'] == 'Checkbox' ) || ( $posted_values['field'] == 'Select (Multiple)' ) ) {
|
assets/css/style-front-end.css
CHANGED
|
@@ -120,6 +120,11 @@
|
|
| 120 |
.wppb-search-users-wrap{
|
| 121 |
margin-bottom: 20px;
|
| 122 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
/*--------------------------------------------------------------
|
| 124 |
3.0 Alignments
|
| 125 |
--------------------------------------------------------------*/
|
| 120 |
.wppb-search-users-wrap{
|
| 121 |
margin-bottom: 20px;
|
| 122 |
}
|
| 123 |
+
|
| 124 |
+
.wppb-user-forms .extra_field_heading {
|
| 125 |
+
margin-bottom: 0;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
/*--------------------------------------------------------------
|
| 129 |
3.0 Alignments
|
| 130 |
--------------------------------------------------------------*/
|
assets/js/jquery-manage-fields-live-change.js
CHANGED
|
@@ -193,6 +193,7 @@ var fields = {
|
|
| 193 |
'Heading': { 'show_rows' : [
|
| 194 |
'.row-field-title',
|
| 195 |
'.row-description',
|
|
|
|
| 196 |
],
|
| 197 |
'properties': {
|
| 198 |
'meta_name_value' : ''
|
| 193 |
'Heading': { 'show_rows' : [
|
| 194 |
'.row-field-title',
|
| 195 |
'.row-description',
|
| 196 |
+
'.row-heading-tag'
|
| 197 |
],
|
| 198 |
'properties': {
|
| 199 |
'meta_name_value' : ''
|
assets/lib/wck-api/wordpress-creation-kit.php
CHANGED
|
@@ -260,6 +260,9 @@ class Wordpress_Creation_Kit_PB{
|
|
| 260 |
if( file_exists( dirname( __FILE__ ).'/fields/'.$details['type'].'.php' ) ){
|
| 261 |
require( dirname( __FILE__ ).'/fields/'.$details['type'].'.php' );
|
| 262 |
}
|
|
|
|
|
|
|
|
|
|
| 263 |
|
| 264 |
if( !empty( $details['description'] ) ){
|
| 265 |
$element .= '<p class="description">'. $details['description'].'</p>';
|
| 260 |
if( file_exists( dirname( __FILE__ ).'/fields/'.$details['type'].'.php' ) ){
|
| 261 |
require( dirname( __FILE__ ).'/fields/'.$details['type'].'.php' );
|
| 262 |
}
|
| 263 |
+
|
| 264 |
+
// Add a filter that allows us to add support for custom field types, not just the ones defined in fields (wck api)
|
| 265 |
+
$element .= apply_filters('wck_output_form_field_customtype_' . $details['type'], '', $value, $details, $single_prefix);
|
| 266 |
|
| 267 |
if( !empty( $details['description'] ) ){
|
| 268 |
$element .= '<p class="description">'. $details['description'].'</p>';
|
features/functions.php
CHANGED
|
@@ -162,9 +162,9 @@ function wppb_mail( $to, $subject, $message, $message_from, $context = null ) {
|
|
| 162 |
$to = apply_filters( 'wppb_send_email_to', $to );
|
| 163 |
$send_email = apply_filters( 'wppb_send_email', true, $to, $subject, $message, $context );
|
| 164 |
|
| 165 |
-
$message = apply_filters( 'wppb_email_message', $message );
|
| 166 |
|
| 167 |
-
do_action( 'wppb_before_sending_email', $to, $subject, $message, $send_email );
|
| 168 |
|
| 169 |
if ( $send_email ) {
|
| 170 |
//we add this filter to enable html encoding
|
|
@@ -172,7 +172,7 @@ function wppb_mail( $to, $subject, $message, $message_from, $context = null ) {
|
|
| 172 |
|
| 173 |
$sent = wp_mail( $to , $subject, $message );
|
| 174 |
|
| 175 |
-
do_action( 'wppb_after_sending_email', $sent, $to, $subject, $message, $send_email );
|
| 176 |
|
| 177 |
return $sent;
|
| 178 |
}
|
|
@@ -726,4 +726,46 @@ function wppb_get_date_by_timezone() {
|
|
| 726 |
}
|
| 727 |
|
| 728 |
return $wppb_get_date;
|
| 729 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
$to = apply_filters( 'wppb_send_email_to', $to );
|
| 163 |
$send_email = apply_filters( 'wppb_send_email', true, $to, $subject, $message, $context );
|
| 164 |
|
| 165 |
+
$message = apply_filters( 'wppb_email_message', $message, $context );
|
| 166 |
|
| 167 |
+
do_action( 'wppb_before_sending_email', $to, $subject, $message, $send_email, $context );
|
| 168 |
|
| 169 |
if ( $send_email ) {
|
| 170 |
//we add this filter to enable html encoding
|
| 172 |
|
| 173 |
$sent = wp_mail( $to , $subject, $message );
|
| 174 |
|
| 175 |
+
do_action( 'wppb_after_sending_email', $sent, $to, $subject, $message, $send_email, $context );
|
| 176 |
|
| 177 |
return $sent;
|
| 178 |
}
|
| 726 |
}
|
| 727 |
|
| 728 |
return $wppb_get_date;
|
| 729 |
+
}
|
| 730 |
+
|
| 731 |
+
/**
|
| 732 |
+
* Add HTML tag 'required' to fields
|
| 733 |
+
*
|
| 734 |
+
* Add HTML tag 'required' for each field if the field is required. For browsers that don't support this HTML tag, we will still have the fallback.
|
| 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 2.4.3
|
| 739 |
+
*
|
| 740 |
+
* @param string $extra_attributes Extra attributes attached to the field HTML tag.
|
| 741 |
+
* @param array $field Field description.
|
| 742 |
+
* @return string $extra_attributes
|
| 743 |
+
*/
|
| 744 |
+
function wppb_add_html_tag_required_to_fields( $extra_attributes, $field, $form_location ) {
|
| 745 |
+
if ( $field['field'] != "Checkbox" && isset( $field['required'] ) && $field['required'] == 'Yes' ){
|
| 746 |
+
if( !( ( $field['field'] == "Default - Password" || $field['field'] == "Default - Repeat Password" ) && $form_location == 'edit_profile' ) )
|
| 747 |
+
$extra_attributes .= ' required ';
|
| 748 |
+
}
|
| 749 |
+
return $extra_attributes;
|
| 750 |
+
}
|
| 751 |
+
//add_filter( 'wppb_extra_attribute', 'wppb_add_html_tag_required_to_fields', 10, 3 );
|
| 752 |
+
|
| 753 |
+
/**
|
| 754 |
+
* Add HTML tag 'required' to WooCommerce fields
|
| 755 |
+
*
|
| 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 2.4.3
|
| 760 |
+
*
|
| 761 |
+
* @param string $extra_attributes Extra attributes attached to the field HTML tag.
|
| 762 |
+
* @param array $field Field description.
|
| 763 |
+
* @return string $extra_attributes
|
| 764 |
+
*/
|
| 765 |
+
function wppb_add_html_tag_required_to_woo_fields( $extra_attributes, $field ) {
|
| 766 |
+
if ( isset( $field['required'] ) && $field['required'] == 'Yes' ){
|
| 767 |
+
$extra_attributes .= ' required ';
|
| 768 |
+
}
|
| 769 |
+
return $extra_attributes;
|
| 770 |
+
}
|
| 771 |
+
//add_filter( 'wppb_woo_extra_attribute', 'wppb_add_html_tag_required_to_woo_fields', 10, 2 );
|
front-end/default-fields/aim/aim.php
CHANGED
|
@@ -18,7 +18,7 @@ function wppb_aim_handler( $output, $form_location, $field, $user_id, $field_che
|
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="aim">'.$item_title.$error_mark.'</label>
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="aim">'.$item_title.$error_mark.'</label>
|
front-end/default-fields/default-fields.php
CHANGED
|
@@ -3,6 +3,15 @@
|
|
| 3 |
$wppb_generalSettings = get_option('wppb_general_settings', 'not_found' );
|
| 4 |
if ( ( $wppb_generalSettings != 'not_found' ) && ( $wppb_generalSettings['loginWith'] != 'email' ) )
|
| 5 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/username/username.php' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/first-name/first-name.php' );
|
| 8 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/last-name/last-name.php' );
|
| 3 |
$wppb_generalSettings = get_option('wppb_general_settings', 'not_found' );
|
| 4 |
if ( ( $wppb_generalSettings != 'not_found' ) && ( $wppb_generalSettings['loginWith'] != 'email' ) )
|
| 5 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/username/username.php' );
|
| 6 |
+
else{
|
| 7 |
+
add_filter( 'wppb_output_display_form_field', 'wppb_remove_username_field_when_login_with_email', 10, 5 );
|
| 8 |
+
function wppb_remove_username_field_when_login_with_email( $bool, $field, $form_type, $role, $user_id ){
|
| 9 |
+
if( $field['field'] == 'Default - Username' )
|
| 10 |
+
return false;
|
| 11 |
+
|
| 12 |
+
return $bool;
|
| 13 |
+
}
|
| 14 |
+
}
|
| 15 |
|
| 16 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/first-name/first-name.php' );
|
| 17 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/last-name/last-name.php' );
|
front-end/default-fields/description/description.php
CHANGED
|
@@ -12,7 +12,7 @@ function wppb_description_handler( $output, $form_location, $field, $user_id, $f
|
|
| 12 |
|
| 13 |
$input_value = ( isset( $request_data['description'] ) ? trim( $request_data['description'] ) : $input_value );
|
| 14 |
|
| 15 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 16 |
|
| 17 |
if ( $form_location != 'back_end' ){
|
| 18 |
$error_mark = ( ( $field['required'] == 'Yes' ) ? '<span class="wppb-required" title="'.wppb_required_field_error($field["field-title"]).'">*</span>' : '' );
|
| 12 |
|
| 13 |
$input_value = ( isset( $request_data['description'] ) ? trim( $request_data['description'] ) : $input_value );
|
| 14 |
|
| 15 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 16 |
|
| 17 |
if ( $form_location != 'back_end' ){
|
| 18 |
$error_mark = ( ( $field['required'] == 'Yes' ) ? '<span class="wppb-required" title="'.wppb_required_field_error($field["field-title"]).'">*</span>' : '' );
|
front-end/default-fields/email/email.php
CHANGED
|
@@ -18,7 +18,7 @@ function wppb_email_handler( $output, $form_location, $field, $user_id, $field_c
|
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="email">'.$item_title.$error_mark.'</label>
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="email">'.$item_title.$error_mark.'</label>
|
front-end/default-fields/first-name/first-name.php
CHANGED
|
@@ -18,7 +18,7 @@ function wppb_first_name_handler( $output, $form_location, $field, $user_id, $fi
|
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="first_name">'.$item_title.$error_mark.'</label>
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="first_name">'.$item_title.$error_mark.'</label>
|
front-end/default-fields/jabber/jabber.php
CHANGED
|
@@ -18,7 +18,7 @@ function wppb_jabber_handler( $output, $form_location, $field, $user_id, $field_
|
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="jabber">'.$item_title.$error_mark.'</label>
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="jabber">'.$item_title.$error_mark.'</label>
|
front-end/default-fields/last-name/last-name.php
CHANGED
|
@@ -18,7 +18,7 @@ function wppb_last_name_handler( $output, $form_location, $field, $user_id, $fie
|
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="last_name">'.$item_title.$error_mark.'</label>
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="last_name">'.$item_title.$error_mark.'</label>
|
front-end/default-fields/nickname/nickname.php
CHANGED
|
@@ -18,7 +18,7 @@ function wppb_nickname_handler( $output, $form_location, $field, $user_id, $fiel
|
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="nickname">'.$item_title.$error_mark.'</label>
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="nickname">'.$item_title.$error_mark.'</label>
|
front-end/default-fields/password-repeat/password-repeat.php
CHANGED
|
@@ -10,7 +10,7 @@ function wppb_password_repeat_handler( $output, $form_location, $field, $user_id
|
|
| 10 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 11 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 12 |
|
| 13 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 14 |
|
| 15 |
$output = '
|
| 16 |
<label for="passw2">' . $item_title.$error_mark . '</label>
|
| 10 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 11 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 12 |
|
| 13 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 14 |
|
| 15 |
$output = '
|
| 16 |
<label for="passw2">' . $item_title.$error_mark . '</label>
|
front-end/default-fields/password/password.php
CHANGED
|
@@ -10,7 +10,7 @@ function wppb_password_handler( $output, $form_location, $field, $user_id, $fiel
|
|
| 10 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 11 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 12 |
|
| 13 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 14 |
|
| 15 |
$output = '
|
| 16 |
<label for="passw1">' . $item_title.$error_mark . '</label>
|
| 10 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 11 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 12 |
|
| 13 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 14 |
|
| 15 |
$output = '
|
| 16 |
<label for="passw1">' . $item_title.$error_mark . '</label>
|
front-end/default-fields/username/username.php
CHANGED
|
@@ -18,7 +18,7 @@ function wppb_username_handler( $output, $form_location, $field, $user_id, $fiel
|
|
| 18 |
|
| 19 |
$readonly = ( ( $form_location == 'edit_profile' ) ? ' disabled="disabled"' : '' );
|
| 20 |
|
| 21 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="username">'.$item_title.$error_mark.'</label>
|
| 18 |
|
| 19 |
$readonly = ( ( $form_location == 'edit_profile' ) ? ' disabled="disabled"' : '' );
|
| 20 |
|
| 21 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="username">'.$item_title.$error_mark.'</label>
|
front-end/default-fields/website/website.php
CHANGED
|
@@ -18,7 +18,7 @@ function wppb_website_handler( $output, $form_location, $field, $user_id, $field
|
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="website">'.$item_title.$error_mark.'</label>
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="website">'.$item_title.$error_mark.'</label>
|
front-end/default-fields/yim/yim.php
CHANGED
|
@@ -18,7 +18,7 @@ function wppb_yim_handler( $output, $form_location, $field, $user_id, $field_che
|
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
-
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="yim">'.$item_title.$error_mark.'</label>
|
| 18 |
if ( array_key_exists( $field['id'], $field_check_errors ) )
|
| 19 |
$error_mark = '<img src="'.WPPB_PLUGIN_URL.'assets/images/pencil_delete.png" title="'.wppb_required_field_error($field["field-title"]).'"/>';
|
| 20 |
|
| 21 |
+
$extra_attr = apply_filters( 'wppb_extra_attribute', '', $field, $form_location );
|
| 22 |
|
| 23 |
$output = '
|
| 24 |
<label for="yim">'.$item_title.$error_mark.'</label>
|
front-end/edit-profile.php
CHANGED
|
@@ -75,7 +75,7 @@ function wppb_front_end_profile_info( $atts ){
|
|
| 75 |
}
|
| 76 |
$redirect_url = apply_filters( 'wppb_after_edit_profile_redirect_url', $redirect_url );
|
| 77 |
|
| 78 |
-
global
|
| 79 |
|
| 80 |
$$form_name = new Profile_Builder_Form_Creator( array( 'form_type' => 'edit_profile', 'form_name' => $form_name, 'redirect_url' => $redirect_url, 'redirect_priority' => $redirect_priority ) );
|
| 81 |
|
| 75 |
}
|
| 76 |
$redirect_url = apply_filters( 'wppb_after_edit_profile_redirect_url', $redirect_url );
|
| 77 |
|
| 78 |
+
global ${$form_name};
|
| 79 |
|
| 80 |
$$form_name = new Profile_Builder_Form_Creator( array( 'form_type' => 'edit_profile', 'form_name' => $form_name, 'redirect_url' => $redirect_url, 'redirect_priority' => $redirect_priority ) );
|
| 81 |
|
front-end/register.php
CHANGED
|
@@ -166,7 +166,7 @@ function wppb_activate_signup( $key ) {
|
|
| 166 |
function wppb_front_end_register( $atts ){
|
| 167 |
extract( shortcode_atts( array( 'role' => get_option( 'default_role' ), 'form_name' => 'unspecified', 'redirect_url' => '', 'redirect_priority' => 'normal' ), $atts, 'wppb-register' ) );
|
| 168 |
|
| 169 |
-
global
|
| 170 |
|
| 171 |
$$form_name = new Profile_Builder_Form_Creator( array( 'form_type' => 'register', 'form_name' => $form_name, 'role' => ( is_object( get_role( $role ) ) ? $role : get_option( 'default_role' ) ) , 'redirect_url' => $redirect_url, 'redirect_priority' => $redirect_priority ) );
|
| 172 |
|
| 166 |
function wppb_front_end_register( $atts ){
|
| 167 |
extract( shortcode_atts( array( 'role' => get_option( 'default_role' ), 'form_name' => 'unspecified', 'redirect_url' => '', 'redirect_priority' => 'normal' ), $atts, 'wppb-register' ) );
|
| 168 |
|
| 169 |
+
global ${$form_name};
|
| 170 |
|
| 171 |
$$form_name = new Profile_Builder_Form_Creator( array( 'form_type' => 'register', 'form_name' => $form_name, 'role' => ( is_object( get_role( $role ) ) ? $role : get_option( 'default_role' ) ) , 'redirect_url' => $redirect_url, 'redirect_priority' => $redirect_priority ) );
|
| 172 |
|
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'))));
|
| 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.3
|
| 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.3' );
|
| 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,7 +5,7 @@ Tags: user registration, user registration form, user fields, extra user fields,
|
|
| 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 |
|
|
@@ -147,8 +147,18 @@ 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.1 =
|
| 151 |
-
Security update for ajax calls
|
| 152 |
|
| 153 |
= 2.4.0 =
|
| 154 |
* Now we check checkboxes default value to not be empty in the front end forms
|
| 5 |
|
| 6 |
Requires at least: 3.1
|
| 7 |
Tested up to: 4.5.3
|
| 8 |
+
Stable tag: 2.4.3
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
| 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
|
| 153 |
+
* PHP 7.0 compatibility code review
|
| 154 |
+
* Define filter in wck-api for adding support for custom field types
|
| 155 |
+
|
| 156 |
+
= 2.4.2 =
|
| 157 |
+
* Edit profile double redirects after submitting changes
|
| 158 |
+
* Fix XSS security issues
|
| 159 |
+
|
| 160 |
= 2.4.1 =
|
| 161 |
+
* Security update for ajax calls
|
| 162 |
|
| 163 |
= 2.4.0 =
|
| 164 |
* Now we check checkboxes default value to not be empty in the front end forms
|
