User registration & user profile – Profile Builder - Version 2.6.3

Version Description

  • Fixed a small display bug for custom capabilities on Roles Editor
  • Fixed a potential warning with the login form and WPML when cURL was not working properly
Download this release

Release Info

Developer madalin.ungureanu
Plugin Icon 128x128 User registration & user profile – Profile Builder
Version 2.6.3
Comparing to
See all releases

Code changes from version 2.6.2 to 2.6.3

assets/misc/plugin-compatibilities.php CHANGED
@@ -284,17 +284,18 @@
284
  if( defined( 'ICL_LANGUAGE_CODE' ) && $wppb_login_shortcode ){
285
  if( $path == 'wp-login.php' ) {
286
  if( !empty( $_GET['lang'] ) )
287
- $url = add_query_arg('lang', ICL_LANGUAGE_CODE, $url);
288
  else{
289
- /* let's see if the directory structure exists for wp-login.php */
290
- stream_context_set_default( array( 'http' => array( 'method' => 'HEAD' ) ) );
291
- $headers = get_headers( get_home_url() . '/' . $path );
292
- if( strpos( $headers[0], '200') !== false ){
293
- $url = get_home_url() . '/' . $path;
294
- }
295
- else {
296
- $url = add_query_arg('lang', ICL_LANGUAGE_CODE, $url);
297
  }
 
298
  }
299
  }
300
  }
284
  if( defined( 'ICL_LANGUAGE_CODE' ) && $wppb_login_shortcode ){
285
  if( $path == 'wp-login.php' ) {
286
  if( !empty( $_GET['lang'] ) )
287
+ return add_query_arg('lang', ICL_LANGUAGE_CODE, $url);
288
  else{
289
+ if( function_exists('curl_version') ) {
290
+ /* let's see if the directory structure exists for wp-login.php */
291
+ $headers = wp_remote_head( trailingslashit( get_home_url() ) . $path, array( 'timeout' => 2 ) );
292
+ if (!is_wp_error($headers)) {
293
+ if ($headers['response']['code'] == 200) {
294
+ return trailingslashit( get_home_url() ) . $path;
295
+ }
296
+ }
297
  }
298
+ return add_query_arg('lang', ICL_LANGUAGE_CODE, $url);
299
  }
300
  }
301
  }
features/roles-editor/roles-editor.php CHANGED
@@ -141,13 +141,24 @@ class WPPB_Roles_Editor {
141
  }
142
  }
143
 
 
 
 
 
 
 
 
 
 
 
 
144
  $vars_array = array(
145
  'ajaxUrl' => admin_url( 'admin-ajax.php' ),
146
  'current_screen_action' => $current_screen->action,
147
  'capabilities' => $group_capabilities,
148
  'current_role_capabilities' => $role_capabilities,
149
  'current_role_users_count' => $current_role_users_count,
150
- 'all_capabilities' => $this->get_all_capabilities(),
151
  'current_user_role' => $current_user_role,
152
  'admin_capabilities' => $admin_capabilities,
153
  'hidden_capabilities' => $hidden_capabilities,
141
  }
142
  }
143
 
144
+ $all_capabilities = $this->get_all_capabilities();
145
+
146
+ $custom_capabilities = get_option( 'wppb_roles_editor_capabilities', 'not_set' );
147
+ if( $custom_capabilities != 'not_set' && ! empty( $custom_capabilities['custom']['capabilities'] ) ) {
148
+ foreach( $custom_capabilities['custom']['capabilities'] as $custom_capability_key => $custom_capability ) {
149
+ if( ! in_array( $custom_capability, $all_capabilities ) ) {
150
+ $all_capabilities[$custom_capability] = $custom_capability;
151
+ }
152
+ }
153
+ }
154
+
155
  $vars_array = array(
156
  'ajaxUrl' => admin_url( 'admin-ajax.php' ),
157
  'current_screen_action' => $current_screen->action,
158
  'capabilities' => $group_capabilities,
159
  'current_role_capabilities' => $role_capabilities,
160
  'current_role_users_count' => $current_role_users_count,
161
+ 'all_capabilities' => $all_capabilities,
162
  'current_user_role' => $current_user_role,
163
  'admin_capabilities' => $admin_capabilities,
164
  'hidden_capabilities' => $hidden_capabilities,
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.6.2
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.6.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: 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.6.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.6.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 profile, user registration form, user fields, extr
5
 
6
  Requires at least: 3.1
7
  Tested up to: 4.7.5
8
- Stable tag: 2.6.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -154,6 +154,10 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
154
  12. Role Editor
155
 
156
  == Changelog ==
 
 
 
 
157
  = 2.6.2 =
158
  * Added Role Editor which grants you control over roles and capabilities on your site.
159
  * Added reacaptcha field for Profile Builder forms and WordPress default forms
5
 
6
  Requires at least: 3.1
7
  Tested up to: 4.7.5
8
+ Stable tag: 2.6.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
154
  12. Role Editor
155
 
156
  == Changelog ==
157
+ = 2.6.3 =
158
+ * Fixed a small display bug for custom capabilities on Roles Editor
159
+ * Fixed a potential warning with the login form and WPML when cURL was not working properly
160
+
161
  = 2.6.2 =
162
  * Added Role Editor which grants you control over roles and capabilities on your site.
163
  * Added reacaptcha field for Profile Builder forms and WordPress default forms