Version Description
- Fixed an issue with the redirect after registration autologin and string translations
- Changes to Addons page to meet wp directory requirements
- Fixed a bug with forms on static front pages and the username field
Download this release
Release Info
Developer | madalin.ungureanu |
Plugin | User registration & user profile – Profile Builder |
Version | 2.4.7 |
Comparing to | |
See all releases |
Code changes from version 2.4.6 to 2.4.7
- admin/add-ons.php +6 -18
- front-end/class-formbuilder.php +28 -18
- index.php +2 -2
- readme.txt +7 -2
admin/add-ons.php
CHANGED
@@ -144,17 +144,12 @@ function wppb_add_ons_content() {
|
|
144 |
|
145 |
// If we're on a multisite don't add the wpp-add-on-download class to the button so we don't fire the js that
|
146 |
// handles the in-page download
|
147 |
-
|
148 |
-
|
149 |
-
($wppb_add_on['paid']) ? $wppb_paid_link_text = __('Learn More', 'profile-builder') : $wppb_paid_link_text = __('Download Now', 'profile-builder');
|
150 |
-
} else {
|
151 |
-
($wppb_add_on['paid']) ? $wppb_paid_link_class = 'button-primary' : $wppb_paid_link_class = 'button-secondary wppb-add-on-download';
|
152 |
-
($wppb_add_on['paid']) ? $wppb_paid_link_text = __('Learn More', 'profile-builder') : $wppb_paid_link_text = __('Install Now', 'profile-builder');
|
153 |
-
}
|
154 |
|
155 |
-
($wppb_add_on['paid']) ? $wppb_paid_href_utm_text = '?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page-buy-button&utm_campaign=PB' . $version : $wppb_paid_href_utm_text = '
|
156 |
|
157 |
-
echo '<a target="_blank" class="right button ' . $wppb_paid_link_class . '" href="' . $wppb_add_on['
|
158 |
echo '<span class="dashicons dashicons-yes"></span><span class="wppb-add-on-message">' . __('Compatible with your version of Profile Builder.', 'profile-builder') . '</span>';
|
159 |
|
160 |
}
|
@@ -248,16 +243,9 @@ function wppb_add_ons_content() {
|
|
248 |
}
|
249 |
|
250 |
} else {
|
251 |
-
|
252 |
-
// If we're on a multisite don't add the wpp-add-on-download class to the button so we don't fire the js that
|
253 |
// handles the in-page download
|
254 |
-
|
255 |
-
|
256 |
-
$wppb_paid_link_text = __('Download Now', 'profile-builder' );
|
257 |
-
} else {
|
258 |
-
$wppb_paid_link_class = 'button-secondary wppb-add-on-download';
|
259 |
-
$wppb_paid_link_text = __('Install Now', 'profile-builder');
|
260 |
-
}
|
261 |
|
262 |
echo '<a target="_blank" class="right button ' . $wppb_paid_link_class . '" href="https://downloads.wordpress.org/plugin/paid-member-subscriptions.zip" data-add-on-slug="paid-member-subscriptions" data-add-on-name="Paid Member Subscriptions" data-nonce="' . $ajax_nonce . '">' . $wppb_paid_link_text . '</a>';
|
263 |
echo '<span class="dashicons dashicons-yes"></span><span class="wppb-add-on-message">' . __('Compatible with your version of Profile Builder.', 'profile-builder') . '</span>';
|
144 |
|
145 |
// If we're on a multisite don't add the wpp-add-on-download class to the button so we don't fire the js that
|
146 |
// handles the in-page download
|
147 |
+
($wppb_add_on['paid']) ? $wppb_paid_link_class = 'button-primary' : $wppb_paid_link_class = 'button-secondary';
|
148 |
+
($wppb_add_on['paid']) ? $wppb_paid_link_text = __('Learn More', 'profile-builder') : $wppb_paid_link_text = __('Download Now', 'profile-builder');
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
+
($wppb_add_on['paid']) ? $wppb_paid_href_utm_text = '?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page-buy-button&utm_campaign=PB' . $version : $wppb_paid_href_utm_text = '?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PB' . $version;
|
151 |
|
152 |
+
echo '<a target="_blank" class="right button ' . $wppb_paid_link_class . '" href="' . $wppb_add_on['url'] . $wppb_paid_href_utm_text . '" data-add-on-slug="profile-builder-' . $wppb_add_on['slug'] . '" data-add-on-name="' . $wppb_add_on['name'] . '" data-nonce="' . $ajax_nonce . '">' . $wppb_paid_link_text . '</a>';
|
153 |
echo '<span class="dashicons dashicons-yes"></span><span class="wppb-add-on-message">' . __('Compatible with your version of Profile Builder.', 'profile-builder') . '</span>';
|
154 |
|
155 |
}
|
243 |
}
|
244 |
|
245 |
} else {
|
|
|
|
|
246 |
// handles the in-page download
|
247 |
+
$wppb_paid_link_class = 'button-secondary';
|
248 |
+
$wppb_paid_link_text = __('Download Now', 'profile-builder');
|
|
|
|
|
|
|
|
|
|
|
249 |
|
250 |
echo '<a target="_blank" class="right button ' . $wppb_paid_link_class . '" href="https://downloads.wordpress.org/plugin/paid-member-subscriptions.zip" data-add-on-slug="paid-member-subscriptions" data-add-on-name="Paid Member Subscriptions" data-nonce="' . $ajax_nonce . '">' . $wppb_paid_link_text . '</a>';
|
251 |
echo '<span class="dashicons dashicons-yes"></span><span class="wppb-add-on-message">' . __('Compatible with your version of Profile Builder.', 'profile-builder') . '</span>';
|
front-end/class-formbuilder.php
CHANGED
@@ -83,22 +83,8 @@ class Profile_Builder_Form_Creator{
|
|
83 |
$this->args['redirect_activated'] = apply_filters( 'wppb_redirect_default_setting', '-' );
|
84 |
$this->args['redirect_url'] = apply_filters( 'wppb_redirect_default_location', ($this->args['redirect_url'] != '') ? $this->args['redirect_url'] : wppb_curpageurl() );
|
85 |
/* for register forms check to see if we have a custom redirect "Redirect After Register" */
|
86 |
-
|
87 |
-
if( ( $this->args['form_type'] == 'register' || $this->args['form_type'] == 'edit_profile' ) && ( ! current_user_can( 'manage_options' ) ) ) {
|
88 |
-
$wppb_module_settings = get_option( 'wppb_module_settings' );
|
89 |
-
if( isset( $_POST['username'] ) )
|
90 |
-
$username = $_POST['username'];
|
91 |
-
else
|
92 |
-
$username = null;
|
93 |
|
94 |
-
if( isset( $wppb_module_settings['wppb_customRedirect'] ) && $wppb_module_settings['wppb_customRedirect'] == 'show' && $this->args['redirect_priority'] != 'top' && function_exists( 'wppb_custom_redirect_url' ) ) {
|
95 |
-
if( $this->args['form_type'] == 'register' )
|
96 |
-
$this->args['redirect_url'] = $this->args['custom_redirect_after_register_url'] = wppb_custom_redirect_url( 'after_registration', $this->args['redirect_url'], $username );
|
97 |
-
else if( $this->args['form_type'] == 'edit_profile' )
|
98 |
-
$this->args['redirect_url'] = $this->args['custom_redirect_after_edit_profile_url'] = wppb_custom_redirect_url( 'after_edit_profile', $this->args['redirect_url'], $username );
|
99 |
-
}
|
100 |
-
}
|
101 |
-
}
|
102 |
$this->args['redirect_url'] = apply_filters( 'wppb_after_'.$this->args['form_type'].'_redirect_url', $this->args['redirect_url'] );
|
103 |
$this->args['redirect_delay'] = apply_filters( 'wppb_redirect_default_duration', 3 );
|
104 |
|
@@ -120,6 +106,10 @@ class Profile_Builder_Form_Creator{
|
|
120 |
$this->args['redirect_activated'] = ( isset( $page_settings[0]['redirect'] ) ? $page_settings[0]['redirect'] : $this->args['redirect_activated'] );
|
121 |
$this->args['redirect_url'] = ( isset( $page_settings[0]['url'] ) ? $page_settings[0]['url'] : $this->args['redirect_url'] );
|
122 |
$this->args['redirect_delay'] = ( isset( $page_settings[0]['display-messages'] ) ? $page_settings[0]['display-messages'] : $this->args['redirect_delay'] );
|
|
|
|
|
|
|
|
|
123 |
}
|
124 |
|
125 |
if( !empty( $this->args['role'] ) ){
|
@@ -133,6 +123,26 @@ class Profile_Builder_Form_Creator{
|
|
133 |
}
|
134 |
}
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
function wppb_form_logic() {
|
137 |
if( $this->args['form_type'] == 'register' ){
|
138 |
$registration = apply_filters ( 'wppb_register_setting_override', get_option( 'users_can_register' ) );
|
@@ -212,7 +222,7 @@ class Profile_Builder_Form_Creator{
|
|
212 |
$redirect_location = ( wppb_check_missing_http( $this->args['redirect_url'] ) ? 'http://'.$this->args['redirect_url'] : $this->args['redirect_url'] );
|
213 |
$redirect_url = apply_filters( 'wppb_redirect_url', '<a href="'.$redirect_location.'">'.__( 'here', 'profile-builder' ).'</a>' );
|
214 |
|
215 |
-
return apply_filters ( 'wppb_redirect_message_before_returning', '<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'], $redirect_url, '<meta http-equiv="Refresh" content="'.$this->args['redirect_delay'].';url='.$redirect_location.'" />' ).'</p>', $this->args );
|
216 |
}
|
217 |
|
218 |
|
@@ -259,9 +269,9 @@ class Profile_Builder_Form_Creator{
|
|
259 |
|
260 |
$location = add_query_arg( array( 'autologin' => 'true', 'uid' => $user->ID, '_wpnonce' => $nonce ), $location );
|
261 |
|
262 |
-
$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="'. esc_url( $location ) .'">'. __( 'here', 'profile-builder' ) .'</a>', '<meta http-equiv="Refresh" content="'. esc_attr( $this->args['redirect_delay'] ) .';url='. esc_attr( $location ) .'" />' ) .'</p>';
|
263 |
|
264 |
-
if ( $this->args['redirect_activated'] == 'No' ) {
|
265 |
return "<script> window.location.replace( '". $location ."' ); </script>";
|
266 |
} else {
|
267 |
return "<script> jQuery( '#wppb_form_success_message' ).after( '". $redirect_message ."' ); </script>";
|
83 |
$this->args['redirect_activated'] = apply_filters( 'wppb_redirect_default_setting', '-' );
|
84 |
$this->args['redirect_url'] = apply_filters( 'wppb_redirect_default_location', ($this->args['redirect_url'] != '') ? $this->args['redirect_url'] : wppb_curpageurl() );
|
85 |
/* for register forms check to see if we have a custom redirect "Redirect After Register" */
|
86 |
+
$this->wppb_custom_redirect_check();
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
$this->args['redirect_url'] = apply_filters( 'wppb_after_'.$this->args['form_type'].'_redirect_url', $this->args['redirect_url'] );
|
89 |
$this->args['redirect_delay'] = apply_filters( 'wppb_redirect_default_duration', 3 );
|
90 |
|
106 |
$this->args['redirect_activated'] = ( isset( $page_settings[0]['redirect'] ) ? $page_settings[0]['redirect'] : $this->args['redirect_activated'] );
|
107 |
$this->args['redirect_url'] = ( isset( $page_settings[0]['url'] ) ? $page_settings[0]['url'] : $this->args['redirect_url'] );
|
108 |
$this->args['redirect_delay'] = ( isset( $page_settings[0]['display-messages'] ) ? $page_settings[0]['display-messages'] : $this->args['redirect_delay'] );
|
109 |
+
|
110 |
+
if( $this->args['redirect_activated'] == '-' ) {
|
111 |
+
$this->wppb_custom_redirect_check();
|
112 |
+
}
|
113 |
}
|
114 |
|
115 |
if( !empty( $this->args['role'] ) ){
|
123 |
}
|
124 |
}
|
125 |
|
126 |
+
function wppb_custom_redirect_check() {
|
127 |
+
if( PROFILE_BUILDER == 'Profile Builder Pro' ) {
|
128 |
+
if( ( $this->args['form_type'] == 'register' || $this->args['form_type'] == 'edit_profile' ) && ( ! current_user_can( 'manage_options' ) ) ) {
|
129 |
+
$wppb_module_settings = get_option( 'wppb_module_settings' );
|
130 |
+
|
131 |
+
if( isset( $_POST['username'] ) )
|
132 |
+
$username = $_POST['username'];
|
133 |
+
else
|
134 |
+
$username = null;
|
135 |
+
|
136 |
+
if( isset( $wppb_module_settings['wppb_customRedirect'] ) && $wppb_module_settings['wppb_customRedirect'] == 'show' && $this->args['redirect_priority'] != 'top' && function_exists( 'wppb_custom_redirect_url' ) ) {
|
137 |
+
if( $this->args['form_type'] == 'register' )
|
138 |
+
$this->args['redirect_url'] = $this->args['custom_redirect_after_register_url'] = wppb_custom_redirect_url( 'after_registration', $this->args['redirect_url'], $username, $this->args['role'] );
|
139 |
+
else if( $this->args['form_type'] == 'edit_profile' )
|
140 |
+
$this->args['redirect_url'] = $this->args['custom_redirect_after_edit_profile_url'] = wppb_custom_redirect_url( 'after_edit_profile', $this->args['redirect_url'], $username, $this->args['role'] );
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
function wppb_form_logic() {
|
147 |
if( $this->args['form_type'] == 'register' ){
|
148 |
$registration = apply_filters ( 'wppb_register_setting_override', get_option( 'users_can_register' ) );
|
222 |
$redirect_location = ( wppb_check_missing_http( $this->args['redirect_url'] ) ? 'http://'.$this->args['redirect_url'] : $this->args['redirect_url'] );
|
223 |
$redirect_url = apply_filters( 'wppb_redirect_url', '<a href="'.$redirect_location.'">'.__( 'here', 'profile-builder' ).'</a>' );
|
224 |
|
225 |
+
return apply_filters ( 'wppb_redirect_message_before_returning', '<p class="redirect_message">'.sprintf( wp_slash( __( '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'], $redirect_url, '<meta http-equiv="Refresh" content="'.$this->args['redirect_delay'].';url='.$redirect_location.'" />' ).'</p>', $this->args );
|
226 |
}
|
227 |
|
228 |
|
269 |
|
270 |
$location = add_query_arg( array( 'autologin' => 'true', 'uid' => $user->ID, '_wpnonce' => $nonce ), $location );
|
271 |
|
272 |
+
$redirect_message = '<p class="redirect_message">'. sprintf( wp_slash( __( '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="'. esc_url( $location ) .'">'. __( 'here', 'profile-builder' ) .'</a>', '<meta http-equiv="Refresh" content="'. esc_attr( $this->args['redirect_delay'] ) .';url='. esc_attr( $location ) .'" />' ) .'</p>';
|
273 |
|
274 |
+
if ( $this->args['redirect_activated'] == 'No' || ( empty( $this->args['redirect_delay'] ) || $this->args['redirect_delay'] == '0' ) ) {
|
275 |
return "<script> window.location.replace( '". $location ."' ); </script>";
|
276 |
} else {
|
277 |
return "<script> jQuery( '#wppb_form_success_message' ).after( '". $redirect_message ."' ); </script>";
|
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.7
|
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.7' );
|
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
@@ -4,8 +4,8 @@ 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.6
|
8 |
-
Stable tag: 2.4.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -150,6 +150,11 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
|
|
150 |
10. Profile Builder Login Widget
|
151 |
|
152 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
153 |
= 2.4.6 =
|
154 |
* CSS modifications to accomodate dark/black themes
|
155 |
* Small changes for E-mail Confirmation and Paid Member Subscriptions compatibility
|
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.6.1
|
8 |
+
Stable tag: 2.4.7
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
150 |
10. Profile Builder Login Widget
|
151 |
|
152 |
== Changelog ==
|
153 |
+
= 2.4.7 =
|
154 |
+
* Fixed an issue with the redirect after registration autologin and string translations
|
155 |
+
* Changes to Addons page to meet wp directory requirements
|
156 |
+
* Fixed a bug with forms on static front pages and the username field
|
157 |
+
|
158 |
= 2.4.6 =
|
159 |
* CSS modifications to accomodate dark/black themes
|
160 |
* Small changes for E-mail Confirmation and Paid Member Subscriptions compatibility
|