User registration & user profile – Profile Builder - Version 2.6.4

Version Description

  • Fixed a bug which was preventing deleting thrashed posts
  • Compatibility fixes with Advanced Custom Fields Plugin
Download this release

Release Info

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

Code changes from version 2.6.3 to 2.6.4

assets/misc/plugin-compatibilities.php CHANGED
@@ -300,4 +300,15 @@
300
  }
301
  }
302
  return $url;
303
- }
 
 
 
 
 
 
 
 
 
 
 
300
  }
301
  }
302
  return $url;
303
+ }
304
+
305
+ /****************************************************
306
+ * Plugin Name: ACF
307
+ * Compatibility with Role Editor where ACF includes it's own select 2 and a bit differently then the standard hooks
308
+ ****************************************************/
309
+ add_action( 'admin_enqueue_scripts', 'wppb_acf_and_user_role_select_2_compatibility' );
310
+ function wppb_acf_and_user_role_select_2_compatibility(){
311
+ $post_type = get_post_type();
312
+ if( !empty( $post_type ) && $post_type == 'wppb-roles-editor' )
313
+ remove_all_actions('acf/input/admin_enqueue_scripts');
314
+ }
features/email-confirmation/email-confirmation.php CHANGED
@@ -370,8 +370,9 @@ function wppb_signup_user_notification( $user, $user_email, $activation_key, $me
370
  $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
371
 
372
  $from_name = apply_filters ( 'wppb_signup_user_notification_email_from_field', get_bloginfo( 'name' ) );
373
-
374
- $message_headers = apply_filters ( 'wppb_signup_user_notification_from', "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n" );
 
375
 
376
  if( isset( $wppb_general_settings['activationLandingPage'] ) && ( trim( $wppb_general_settings['activationLandingPage'] ) != '' ) ) {
377
  $registration_page_url = add_query_arg( array('activation_key' => $activation_key), get_permalink( $wppb_general_settings['activationLandingPage'] ) );
370
  $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
371
 
372
  $from_name = apply_filters ( 'wppb_signup_user_notification_email_from_field', get_bloginfo( 'name' ) );
373
+
374
+ //we don't use this anymore do we ?
375
+ /*$message_headers = apply_filters ( 'wppb_signup_user_notification_from', "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n" );*/
376
 
377
  if( isset( $wppb_general_settings['activationLandingPage'] ) && ( trim( $wppb_general_settings['activationLandingPage'] ) != '' ) ) {
378
  $registration_page_url = add_query_arg( array('activation_key' => $activation_key), get_permalink( $wppb_general_settings['activationLandingPage'] ) );
features/roles-editor/roles-editor.php CHANGED
@@ -24,7 +24,7 @@ class WPPB_Roles_Editor {
24
  add_action( 'admin_enqueue_scripts', array( $this, 'scripts_admin' ) );
25
 
26
  // Add role slug to the created post
27
- add_action( 'save_post', array( $this, 'add_post_meta' ), 10, 3 );
28
 
29
  add_filter( 'wp_insert_post_data', array( $this, 'modify_post_title'), '99', 1 );
30
 
@@ -54,17 +54,18 @@ class WPPB_Roles_Editor {
54
  global $wp_styles;
55
 
56
  if( $post_type == 'wppb-roles-editor' ) {
57
-
58
  $wp_default_scripts = $this->wp_default_scripts();
 
59
  foreach( $wp_scripts->registered as $key => $value ) {
60
- if( ! in_array( $key, $wp_default_scripts ) && $key != 'wppb-sitewide' ) {
61
  wp_deregister_script( $key );
62
  }
63
  }
64
 
65
  $wp_default_styles = $this->wp_default_styles();
 
66
  foreach( $wp_styles->registered as $key => $value ) {
67
- if( ! in_array( $key, $wp_default_styles ) && $key != 'wppb-serial-notice-css' ) {
68
  wp_deregister_style( $key );
69
  }
70
  }
@@ -558,7 +559,7 @@ class WPPB_Roles_Editor {
558
 
559
  }
560
 
561
- function add_post_meta( $post_id, $post, $update ) {
562
 
563
  $post_type = get_post_type( $post_id );
564
 
@@ -918,14 +919,13 @@ class WPPB_Roles_Editor {
918
 
919
  function delete_role_permanently( $post_id ) {
920
 
921
- check_admin_referer( 'delete-post_'. $post_id );
922
-
923
  global $post_type;
924
-
925
  if( $post_type != 'wppb-roles-editor' ) {
926
  return;
927
  }
928
 
 
 
929
  $role_slug = get_post_meta( $post_id, 'wppb_role_slug', true );
930
  $role_slug = $this->sanitize_role( $role_slug );
931
 
24
  add_action( 'admin_enqueue_scripts', array( $this, 'scripts_admin' ) );
25
 
26
  // Add role slug to the created post
27
+ add_action( 'save_post', array( $this, 'add_post_meta' ), 10, 2 );
28
 
29
  add_filter( 'wp_insert_post_data', array( $this, 'modify_post_title'), '99', 1 );
30
 
54
  global $wp_styles;
55
 
56
  if( $post_type == 'wppb-roles-editor' ) {
 
57
  $wp_default_scripts = $this->wp_default_scripts();
58
+ $scripts_exceptions = array( 'wppb-sitewide', 'acf-field-group', 'acf-pro-field-group', 'acf-input', 'acf-pro-input' );
59
  foreach( $wp_scripts->registered as $key => $value ) {
60
+ if( ! in_array( $key, $wp_default_scripts ) && ! in_array( $key, $scripts_exceptions ) ) {
61
  wp_deregister_script( $key );
62
  }
63
  }
64
 
65
  $wp_default_styles = $this->wp_default_styles();
66
+ $styles_exceptions = array( 'wppb-serial-notice-css', 'acf-global' );
67
  foreach( $wp_styles->registered as $key => $value ) {
68
+ if( ! in_array( $key, $wp_default_styles ) && ! in_array( $key, $styles_exceptions ) ) {
69
  wp_deregister_style( $key );
70
  }
71
  }
559
 
560
  }
561
 
562
+ function add_post_meta( $post_id, $post ) {
563
 
564
  $post_type = get_post_type( $post_id );
565
 
919
 
920
  function delete_role_permanently( $post_id ) {
921
 
 
 
922
  global $post_type;
 
923
  if( $post_type != 'wppb-roles-editor' ) {
924
  return;
925
  }
926
 
927
+ check_admin_referer( 'delete-post_'. $post_id );
928
+
929
  $role_slug = get_post_meta( $post_id, 'wppb_role_slug', true );
930
  $role_slug = $this->sanitize_role( $role_slug );
931
 
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.3
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.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'))));
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.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.6.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'))));
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.3
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.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
5
 
6
  Requires at least: 3.1
7
  Tested up to: 4.7.5
8
+ Stable tag: 2.6.4
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.4 =
158
+ * Fixed a bug which was preventing deleting thrashed posts
159
+ * Compatibility fixes with Advanced Custom Fields Plugin
160
+
161
  = 2.6.3 =
162
  * Fixed a small display bug for custom capabilities on Roles Editor
163
  * Fixed a potential warning with the login form and WPML when cURL was not working properly