Version Description
- Fixed notice that was thrown in WordPress 4.3 related to WP_Widget constructor being deprecated in login widget.
Download this release
Release Info
Developer | madalin.ungureanu |
Plugin | User registration & user profile – Profile Builder |
Version | 2.2.2 |
Comparing to | |
See all releases |
Code changes from version 2.2.1 to 2.2.2
- admin/admin-functions.php +22 -0
- assets/lib/wck-api/wordpress-creation-kit.php +9 -9
- features/login-widget/login-widget.php +5 -5
- index.php +2 -2
- readme.txt +5 -2
admin/admin-functions.php
CHANGED
@@ -34,6 +34,11 @@ function wppb_manage_fields_display_field_title_slug( $form, $i, $value ){
|
|
34 |
$form .= '<div id="wppb-login-email-nag" class="wppb-backend-notice">' . sprintf( __( 'Login is set to be done using the E-mail. This field will NOT appear in the front-end! ( you can change these settings under the "%s" tab )', 'profilebuilder' ), '<a href="'.admin_url( 'admin.php?page=profile-builder-general-settings' ).'" target="_blank">' . __('General Settings', 'profilebuilder') . '</a>' ) . '</div>';
|
35 |
}
|
36 |
|
|
|
|
|
|
|
|
|
|
|
37 |
return $form;
|
38 |
}
|
39 |
add_filter( "wck_before_listed_wppb_manage_fields_element_0", 'wppb_manage_fields_display_field_title_slug', 10, 3 );
|
@@ -41,6 +46,23 @@ add_filter( "wck_before_listed_wppb_epf_fields_element_0", 'wppb_manage_fields_d
|
|
41 |
add_filter( "wck_before_listed_wppb_rf_fields_element_0", 'wppb_manage_fields_display_field_title_slug', 10, 3 );
|
42 |
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
|
46 |
|
34 |
$form .= '<div id="wppb-login-email-nag" class="wppb-backend-notice">' . sprintf( __( 'Login is set to be done using the E-mail. This field will NOT appear in the front-end! ( you can change these settings under the "%s" tab )', 'profilebuilder' ), '<a href="'.admin_url( 'admin.php?page=profile-builder-general-settings' ).'" target="_blank">' . __('General Settings', 'profilebuilder') . '</a>' ) . '</div>';
|
35 |
}
|
36 |
|
37 |
+
// add a notice to 'Default - Display name publicly as' field
|
38 |
+
global $wppb_results_field;
|
39 |
+
if ( $wppb_results_field == 'Default - Display name publicly as' )
|
40 |
+
$form .= '<div id="wppb-display-name-nag" class="wppb-backend-notice">' . __( 'Display name publicly as - only appears on the Edit Profile page!', 'profilebuilder' ) . '</div>';
|
41 |
+
|
42 |
return $form;
|
43 |
}
|
44 |
add_filter( "wck_before_listed_wppb_manage_fields_element_0", 'wppb_manage_fields_display_field_title_slug', 10, 3 );
|
46 |
add_filter( "wck_before_listed_wppb_rf_fields_element_0", 'wppb_manage_fields_display_field_title_slug', 10, 3 );
|
47 |
|
48 |
|
49 |
+
/**
|
50 |
+
* Check if field type is 'Default - Display name publicly as' so we can add a notification for it
|
51 |
+
*
|
52 |
+
* @since v.2.2
|
53 |
+
*
|
54 |
+
* @param string $wck_element_class
|
55 |
+
* @param string $meta
|
56 |
+
* @param array $results
|
57 |
+
* @param integer $element_id
|
58 |
+
*
|
59 |
+
*/
|
60 |
+
function wppb_manage_fields_display_name_notice( $wck_element_class, $meta, $results, $element_id ) {
|
61 |
+
global $wppb_results_field;
|
62 |
+
|
63 |
+
$wppb_results_field = $results[$element_id]['field'];
|
64 |
+
}
|
65 |
+
add_filter( 'wck_element_class_wppb_manage_fields', 'wppb_manage_fields_display_name_notice', 10, 4 );
|
66 |
|
67 |
|
68 |
|
assets/lib/wck-api/wordpress-creation-kit.php
CHANGED
@@ -479,7 +479,7 @@ class Wordpress_Creation_Kit_PB{
|
|
479 |
|
480 |
/* filter display value */
|
481 |
$value = apply_filters( "wck_displayed_value_{$meta}_element_{$j}", $value );
|
482 |
-
|
483 |
/* display it differently based on field type*/
|
484 |
if( $details['type'] == 'upload' ){
|
485 |
$display_value = self::wck_get_entry_field_upload($value);
|
@@ -495,7 +495,7 @@ class Wordpress_Creation_Kit_PB{
|
|
495 |
|
496 |
$display_value = apply_filters( "wck_pre_displayed_value_{$meta}_element_{$field['slug']}", $display_value );
|
497 |
|
498 |
-
$list = apply_filters( "wck_before_listed_{$meta}_element_{$j}", $list, $element_id, $value );
|
499 |
/*check for nested repeater type and set it acordingly */
|
500 |
if( strpos( $details['type'], 'CFC-') === 0 )
|
501 |
$details['type'] = 'nested-repeater';
|
@@ -503,9 +503,9 @@ class Wordpress_Creation_Kit_PB{
|
|
503 |
$list .= '<li class="row-'. esc_attr( Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ) ) .'" data-type="'.$details['type'].'"><strong>'.$details['title'].': </strong>'.$display_value.' </li>' . "\r\n";
|
504 |
|
505 |
$list = apply_filters( "wck_after_listed_{$meta}_element_{$j}", $list, $element_id, $value );
|
506 |
-
|
507 |
-
$j++;
|
508 |
-
|
509 |
/* In CFC/OPC we need the field title. Find it out and output it if found */
|
510 |
if ($meta == 'wck_cfc_fields') {
|
511 |
if( !empty( $results[$element_id][Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details )] ) ){
|
@@ -517,20 +517,20 @@ class Wordpress_Creation_Kit_PB{
|
|
517 |
}
|
518 |
}
|
519 |
$list .= '</ul>';
|
520 |
-
|
521 |
/* check if we have nested repeaters */
|
522 |
if( function_exists( 'wck_nr_check_for_nested_repeaters' ) ){
|
523 |
if( wck_nr_check_for_nested_repeaters( $fields ) === true ){
|
524 |
$list .= wck_nr_handle_repeaters( $meta, $id, $fields, $results, $element_id );
|
525 |
}
|
526 |
}
|
527 |
-
|
528 |
$list .= '</td>';
|
529 |
$list .= '<td style="text-align:center;vertical-align:middle;" class="wck-edit"><a href="javascript:void(0)" class="button-secondary" onclick=\'showUpdateFormMeta("'.esc_js($meta).'", "'.esc_js($id).'", "'.esc_js($element_id).'", "'.esc_js($edit_nonce).'")\' title="'. __( 'Edit this item', 'profilebuilder' ) .'">'. apply_filters( 'wck_edit_button', __('Edit','wck'), $meta ) .'</a></td>';
|
530 |
$list .= '<td style="text-align:center;vertical-align:middle;" class="wck-delete"><a href="javascript:void(0)" class="mbdelete" onclick=\'removeMeta("'.esc_js($meta).'", "'.esc_js($id).'", "'.esc_js($element_id).'", "'.esc_js($delete_nonce).'")\' title="'. __( 'Delete this item', 'profilebuilder' ) .'">'. apply_filters( 'wck_delete_button', __( 'Delete', 'wck' ), $meta) .'</a></td>';
|
531 |
-
|
532 |
$list .= "</tr> \r\n";
|
533 |
-
|
534 |
return $list;
|
535 |
}
|
536 |
|
479 |
|
480 |
/* filter display value */
|
481 |
$value = apply_filters( "wck_displayed_value_{$meta}_element_{$j}", $value );
|
482 |
+
|
483 |
/* display it differently based on field type*/
|
484 |
if( $details['type'] == 'upload' ){
|
485 |
$display_value = self::wck_get_entry_field_upload($value);
|
495 |
|
496 |
$display_value = apply_filters( "wck_pre_displayed_value_{$meta}_element_{$field['slug']}", $display_value );
|
497 |
|
498 |
+
$list = apply_filters( "wck_before_listed_{$meta}_element_{$j}", $list, $element_id, $value );
|
499 |
/*check for nested repeater type and set it acordingly */
|
500 |
if( strpos( $details['type'], 'CFC-') === 0 )
|
501 |
$details['type'] = 'nested-repeater';
|
503 |
$list .= '<li class="row-'. esc_attr( Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ) ) .'" data-type="'.$details['type'].'"><strong>'.$details['title'].': </strong>'.$display_value.' </li>' . "\r\n";
|
504 |
|
505 |
$list = apply_filters( "wck_after_listed_{$meta}_element_{$j}", $list, $element_id, $value );
|
506 |
+
|
507 |
+
$j++;
|
508 |
+
|
509 |
/* In CFC/OPC we need the field title. Find it out and output it if found */
|
510 |
if ($meta == 'wck_cfc_fields') {
|
511 |
if( !empty( $results[$element_id][Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details )] ) ){
|
517 |
}
|
518 |
}
|
519 |
$list .= '</ul>';
|
520 |
+
|
521 |
/* check if we have nested repeaters */
|
522 |
if( function_exists( 'wck_nr_check_for_nested_repeaters' ) ){
|
523 |
if( wck_nr_check_for_nested_repeaters( $fields ) === true ){
|
524 |
$list .= wck_nr_handle_repeaters( $meta, $id, $fields, $results, $element_id );
|
525 |
}
|
526 |
}
|
527 |
+
|
528 |
$list .= '</td>';
|
529 |
$list .= '<td style="text-align:center;vertical-align:middle;" class="wck-edit"><a href="javascript:void(0)" class="button-secondary" onclick=\'showUpdateFormMeta("'.esc_js($meta).'", "'.esc_js($id).'", "'.esc_js($element_id).'", "'.esc_js($edit_nonce).'")\' title="'. __( 'Edit this item', 'profilebuilder' ) .'">'. apply_filters( 'wck_edit_button', __('Edit','wck'), $meta ) .'</a></td>';
|
530 |
$list .= '<td style="text-align:center;vertical-align:middle;" class="wck-delete"><a href="javascript:void(0)" class="mbdelete" onclick=\'removeMeta("'.esc_js($meta).'", "'.esc_js($id).'", "'.esc_js($element_id).'", "'.esc_js($delete_nonce).'")\' title="'. __( 'Delete this item', 'profilebuilder' ) .'">'. apply_filters( 'wck_delete_button', __( 'Delete', 'wck' ), $meta) .'</a></td>';
|
531 |
+
|
532 |
$list .= "</tr> \r\n";
|
533 |
+
|
534 |
return $list;
|
535 |
}
|
536 |
|
features/login-widget/login-widget.php
CHANGED
@@ -6,14 +6,14 @@ add_action( 'widgets_init', 'wppb_register_login_widget' );
|
|
6 |
|
7 |
class wppb_login_widget extends WP_Widget {
|
8 |
|
9 |
-
function
|
10 |
$widget_ops = array( 'classname' => 'login', 'description' => __( 'This login widget lets you add a login form in the sidebar.', 'profilebuilder' ) );
|
11 |
$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'wppb-login-widget' );
|
12 |
-
|
13 |
do_action( 'wppb_login_widget_settings', $widget_ops, $control_ops);
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
}
|
18 |
|
19 |
function widget( $args, $instance ) {
|
6 |
|
7 |
class wppb_login_widget extends WP_Widget {
|
8 |
|
9 |
+
function __construct() {
|
10 |
$widget_ops = array( 'classname' => 'login', 'description' => __( 'This login widget lets you add a login form in the sidebar.', 'profilebuilder' ) );
|
11 |
$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'wppb-login-widget' );
|
12 |
+
|
13 |
do_action( 'wppb_login_widget_settings', $widget_ops, $control_ops);
|
14 |
+
|
15 |
+
parent::__construct( 'wppb-login-widget', __('Profile Builder Login Widget', 'profilebuilder'), $widget_ops, $control_ops );
|
16 |
+
|
17 |
}
|
18 |
|
19 |
function widget( $args, $instance ) {
|
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.2.
|
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.2.
|
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.2
|
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.2' );
|
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.
|
9 |
-
Stable tag: 2.2.
|
10 |
|
11 |
Simple to use profile plugin allowing front-end login, user registration and edit profile by using shortcodes.
|
12 |
|
@@ -114,6 +114,9 @@ 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.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
|
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.3
|
9 |
+
Stable tag: 2.2.2
|
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.2 =
|
118 |
+
* Fixed notice that was thrown in WordPress 4.3 related to WP_Widget constructor being deprecated in login widget.
|
119 |
+
|
120 |
= 2.2.1 =
|
121 |
* Changed recover password link from using username to using the user-nicename
|
122 |
* 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
|