User registration & user profile – Profile Builder - Version 3.1.8

Version Description

  • Fixed a potential PHP error
  • Fixed a string consistency problem on Login form
  • Display the correct compatible plugin versions on the Add-Ons page.
  • Change content restriction metabox priority for compatibility with Paid Member Subscriptions.
  • Fixed a problem with WPML where domains were mismatched on backend and frontend for labels
Download this release

Release Info

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

Code changes from version 3.1.7 to 3.1.8

admin/add-ons.php CHANGED
@@ -259,10 +259,12 @@ function wppb_add_ons_content() {
259
  echo '</h3>';
260
 
261
  //echo '<h3 class="wppb-add-on-price">' . $wppb_add_on['price'] . '</h3>';
262
- if( $wppb_add_on['type'] == 'paid' )
263
- echo '<h3 class="wppb-add-on-price">' . __( 'Available in Hobbyist and Pro Versions', 'profile-builder' ) . '</h3>';
264
- else
265
- echo '<h3 class="wppb-add-on-price">' . __( 'Available in All Versions', 'profile-builder' ) . '</h3>';
 
 
266
 
267
  echo '<p class="wppb-add-on-description">' . $wppb_add_on['description'] . '</p>';
268
 
259
  echo '</h3>';
260
 
261
  //echo '<h3 class="wppb-add-on-price">' . $wppb_add_on['price'] . '</h3>';
262
+ if ( $wppb_add_on['product_version_type'][0] == 'free' )
263
+ echo '<h3 class="wppb-add-on-price">' . __( 'Available with All Versions', 'profile-builder' ) . '</h3>';
264
+ elseif ( $wppb_add_on['product_version_type'][0] == 'hobbyist' )
265
+ echo '<h3 class="wppb-add-on-price">' . __( 'Available with the Hobbyist and Pro Versions', 'profile-builder' ) . '</h3>';
266
+ elseif ( $wppb_add_on['product_version_type'][0] == 'pro' )
267
+ echo '<h3 class="wppb-add-on-price">' . __( 'Available with the Pro Version', 'profile-builder' ) . '</h3>';
268
 
269
  echo '<p class="wppb-add-on-description">' . $wppb_add_on['description'] . '</p>';
270
 
features/content-restriction/content-restriction-meta-box.php CHANGED
@@ -5,7 +5,7 @@ function wppb_content_restriction_initialize_meta_box() {
5
  add_action( 'add_meta_boxes', 'wppb_content_restriction_add_meta_box' );
6
 
7
  }
8
- add_action( 'init', 'wppb_content_restriction_initialize_meta_box', 12 );
9
 
10
  function wppb_content_restriction_add_meta_box() {
11
 
@@ -198,4 +198,4 @@ function wppb_content_restriction_save_data( $post_id ) {
198
 
199
  }
200
  add_action( 'save_post', 'wppb_content_restriction_save_data' );
201
- add_action( 'edit_attachment', 'wppb_content_restriction_save_data' );
5
  add_action( 'add_meta_boxes', 'wppb_content_restriction_add_meta_box' );
6
 
7
  }
8
+ add_action( 'init', 'wppb_content_restriction_initialize_meta_box', 999 );
9
 
10
  function wppb_content_restriction_add_meta_box() {
11
 
198
 
199
  }
200
  add_action( 'save_post', 'wppb_content_restriction_save_data' );
201
+ add_action( 'edit_attachment', 'wppb_content_restriction_save_data' );
front-end/class-formbuilder.php CHANGED
@@ -562,11 +562,13 @@ class Profile_Builder_Form_Creator{
562
 
563
  if( isset( $userdata['role'] ) && is_array( $userdata['role'] ) ) {
564
  $user_data = get_userdata( $user_id );
565
- $user_data->remove_all_caps();
 
566
 
567
- foreach( $userdata['role'] as $role ) {
568
- if( $role !== 'administrator' || $role !== 'super-admin' )//make sure this doesn't happen for any reason
569
- $user_data->add_role( $role );
 
570
  }
571
 
572
  unset( $userdata['role'] );
562
 
563
  if( isset( $userdata['role'] ) && is_array( $userdata['role'] ) ) {
564
  $user_data = get_userdata( $user_id );
565
+ if( $user_data ) {
566
+ $user_data->remove_all_caps();
567
 
568
+ foreach ($userdata['role'] as $role) {
569
+ if ($role !== 'administrator' || $role !== 'super-admin')//make sure this doesn't happen for any reason
570
+ $user_data->add_role($role);
571
+ }
572
  }
573
 
574
  unset( $userdata['role'] );
front-end/login.php CHANGED
@@ -463,7 +463,7 @@ function wppb_front_end_login( $atts ){
463
  $logout_redirect_url = wppb_get_redirect_url( $redirect_priority, 'after_logout', $logout_redirect_url, $wppb_user );
464
  $logout_redirect_url = apply_filters( 'wppb_after_logout_redirect_url', $logout_redirect_url );
465
 
466
- $logout_url = '<a href="'.wp_logout_url( $logout_redirect_url ).'" class="wppb-logout-url" title="'.__( 'Log out of this account', 'profile-builder' ).'">'. __( 'Log out', 'profile-builder').' &raquo;</a>';
467
  $logged_in_message .= sprintf(__( 'You are currently logged in as %1$s. %2$s', 'profile-builder' ), $display_name, $logout_url );
468
 
469
  $logged_in_message .= '</p><!-- .wppb-alert-->';
463
  $logout_redirect_url = wppb_get_redirect_url( $redirect_priority, 'after_logout', $logout_redirect_url, $wppb_user );
464
  $logout_redirect_url = apply_filters( 'wppb_after_logout_redirect_url', $logout_redirect_url );
465
 
466
+ $logout_url = '<a href="'.wp_logout_url( $logout_redirect_url ).'" class="wppb-logout-url" title="'.__( 'Log out of this account', 'profile-builder' ).'">'. __('Log out &raquo;','profile-builder').'</a>';
467
  $logged_in_message .= sprintf(__( 'You are currently logged in as %1$s. %2$s', 'profile-builder' ), $display_name, $logout_url );
468
 
469
  $logged_in_message .= '</p><!-- .wppb-alert-->';
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 choose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
- Version: 3.1.7
7
  Author: Cozmoslabs
8
  Author URI: https://www.cozmoslabs.com/
9
  Text Domain: profile-builder
@@ -63,7 +63,7 @@ function wppb_free_plugin_init() {
63
  *
64
  *
65
  */
66
- define('PROFILE_BUILDER_VERSION', '3.1.7' );
67
  define('WPPB_PLUGIN_DIR', plugin_dir_path(__FILE__));
68
  define('WPPB_PLUGIN_URL', plugin_dir_url(__FILE__));
69
  define('WPPB_PLUGIN_BASENAME', plugin_basename(__FILE__));
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 choose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
+ Version: 3.1.8
7
  Author: Cozmoslabs
8
  Author URI: https://www.cozmoslabs.com/
9
  Text Domain: profile-builder
63
  *
64
  *
65
  */
66
+ define('PROFILE_BUILDER_VERSION', '3.1.8' );
67
  define('WPPB_PLUGIN_DIR', plugin_dir_path(__FILE__));
68
  define('WPPB_PLUGIN_URL', plugin_dir_url(__FILE__));
69
  define('WPPB_PLUGIN_BASENAME', plugin_basename(__FILE__));
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.cozmoslabs.com/wordpress-profile-builder/
4
  Tags: user registration, user profile, 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, content restriction, restrict content, profile
5
  Requires at least: 3.1
6
  Tested up to: 5.4.1
7
- Stable tag: 3.1.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -169,6 +169,13 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
169
  12. Role Editor
170
 
171
  == Changelog ==
 
 
 
 
 
 
 
172
  = 3.1.7 =
173
  * Added support for Max character length addon for default website field
174
  * Fixed possible issues with Email Confirmation on some domains
4
  Tags: user registration, user profile, 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, content restriction, restrict content, profile
5
  Requires at least: 3.1
6
  Tested up to: 5.4.1
7
+ Stable tag: 3.1.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
169
  12. Role Editor
170
 
171
  == Changelog ==
172
+ = 3.1.8 =
173
+ * Fixed a potential PHP error
174
+ * Fixed a string consistency problem on Login form
175
+ * Display the correct compatible plugin versions on the Add-Ons page.
176
+ * Change content restriction metabox priority for compatibility with Paid Member Subscriptions.
177
+ * Fixed a problem with WPML where domains were mismatched on backend and frontend for labels
178
+
179
  = 3.1.7 =
180
  * Added support for Max character length addon for default website field
181
  * Fixed possible issues with Email Confirmation on some domains
translation/profile-builder.catalog.php CHANGED
@@ -414,8 +414,9 @@
414
  <?php __("Add-On is <strong>inactive</strong>", "profile-builder"); ?>
415
  <?php __("Add-On has been deactivated.", "profile-builder"); ?>
416
  <?php __("Something went wrong, we could not connect to the server. Please try again later.", "profile-builder"); ?>
417
- <?php __("Available in Hobbyist and Pro Versions", "profile-builder"); ?>
418
- <?php __("Available in All Versions", "profile-builder"); ?>
 
419
  <?php __("Learn More", "profile-builder"); ?>
420
  <?php __("Download Now", "profile-builder"); ?>
421
  <?php __("Upgrade Profile Builder", "profile-builder"); ?>
@@ -1175,10 +1176,9 @@
1175
  <?php __("Username or Email", "profile-builder"); ?>
1176
  <?php __("Lost your password?", "profile-builder"); ?>
1177
  <?php __("Log out of this account", "profile-builder"); ?>
1178
- <?php __("Log out", "profile-builder"); ?>
1179
  <?php __("You are currently logged in as %1$s. %2$s", "profile-builder"); ?>
1180
  <?php __("You are currently logged in as %s. ", "profile-builder"); ?>
1181
- <?php __("Log out &raquo;", "profile-builder"); ?>
1182
  <?php __("Your account has to be confirmed by an administrator before you can use the \"Password Reset\" feature.", "profile-builder"); ?>
1183
  <?php __("Reset Password", "profile-builder"); ?>
1184
  <?php __("Please enter your email address.", "profile-builder"); ?>
414
  <?php __("Add-On is <strong>inactive</strong>", "profile-builder"); ?>
415
  <?php __("Add-On has been deactivated.", "profile-builder"); ?>
416
  <?php __("Something went wrong, we could not connect to the server. Please try again later.", "profile-builder"); ?>
417
+ <?php __("Available with All Versions", "profile-builder"); ?>
418
+ <?php __("Available with the Hobbyist and Pro Versions", "profile-builder"); ?>
419
+ <?php __("Available with the Pro Version", "profile-builder"); ?>
420
  <?php __("Learn More", "profile-builder"); ?>
421
  <?php __("Download Now", "profile-builder"); ?>
422
  <?php __("Upgrade Profile Builder", "profile-builder"); ?>
1176
  <?php __("Username or Email", "profile-builder"); ?>
1177
  <?php __("Lost your password?", "profile-builder"); ?>
1178
  <?php __("Log out of this account", "profile-builder"); ?>
1179
+ <?php __("Log out &raquo;", "profile-builder"); ?>
1180
  <?php __("You are currently logged in as %1$s. %2$s", "profile-builder"); ?>
1181
  <?php __("You are currently logged in as %s. ", "profile-builder"); ?>
 
1182
  <?php __("Your account has to be confirmed by an administrator before you can use the \"Password Reset\" feature.", "profile-builder"); ?>
1183
  <?php __("Reset Password", "profile-builder"); ?>
1184
  <?php __("Please enter your email address.", "profile-builder"); ?>
translation/profile-builder.pot CHANGED
@@ -1613,11 +1613,11 @@ msgstr ""
1613
  msgid "Translate your Profile Builder forms with a WordPress translation plugin that anyone can use. It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders."
1614
  msgstr ""
1615
 
1616
- #: admin/add-ons.php:84, admin/add-ons.php:155, admin/add-ons.php:195, admin/add-ons.php:287, admin/pms-cross-promotion.php:78, admin/pms-cross-promotion.php:114, admin/pms-cross-promotion.php:193
1617
  msgid "Activate"
1618
  msgstr ""
1619
 
1620
- #: admin/add-ons.php:88, admin/add-ons.php:159, admin/add-ons.php:207, admin/add-ons.php:291, admin/pms-cross-promotion.php:90, admin/pms-cross-promotion.php:118, admin/pms-cross-promotion.php:197
1621
  msgid "Deactivate"
1622
  msgstr ""
1623
 
@@ -1633,7 +1633,7 @@ msgstr ""
1633
  msgid "Install Now"
1634
  msgstr ""
1635
 
1636
- #: admin/add-ons.php:104, admin/add-ons.php:175, admin/add-ons.php:311, admin/pms-cross-promotion.php:141, admin/pms-cross-promotion.php:220
1637
  msgid "Compatible with your version of Profile Builder."
1638
  msgstr ""
1639
 
@@ -1665,11 +1665,11 @@ msgstr ""
1665
  msgid "Retry Install"
1666
  msgstr ""
1667
 
1668
- #: admin/add-ons.php:204, admin/add-ons.php:298
1669
  msgid "Add-On is <strong>active</strong>"
1670
  msgstr ""
1671
 
1672
- #: admin/add-ons.php:205, admin/add-ons.php:296
1673
  msgid "Add-On is <strong>inactive</strong>"
1674
  msgstr ""
1675
 
@@ -1682,42 +1682,46 @@ msgid "Something went wrong, we could not connect to the server. Please try agai
1682
  msgstr ""
1683
 
1684
  #: admin/add-ons.php:263
1685
- msgid "Available in Hobbyist and Pro Versions"
1686
  msgstr ""
1687
 
1688
  #: admin/add-ons.php:265
1689
- msgid "Available in All Versions"
1690
  msgstr ""
1691
 
1692
- #: admin/add-ons.php:306
 
 
 
 
1693
  msgid "Learn More"
1694
  msgstr ""
1695
 
1696
- #: admin/add-ons.php:306, admin/pms-cross-promotion.php:134, admin/pms-cross-promotion.php:213
1697
  msgid "Download Now"
1698
  msgstr ""
1699
 
1700
- #: admin/add-ons.php:320
1701
  msgid "Upgrade Profile Builder"
1702
  msgstr ""
1703
 
1704
- #: admin/add-ons.php:321
1705
  msgid "Not compatible with Profile Builder"
1706
  msgstr ""
1707
 
1708
- #: admin/add-ons.php:328, front-end/class-formbuilder.php:432
1709
  msgid "Update"
1710
  msgstr ""
1711
 
1712
- #: admin/add-ons.php:329
1713
  msgid "Not compatible with your version of Profile Builder."
1714
  msgstr ""
1715
 
1716
- #: admin/add-ons.php:330
1717
  msgid "Minimum required Profile Builder version:"
1718
  msgstr ""
1719
 
1720
- #: admin/add-ons.php:335
1721
  msgid "Could not install add-on. Retry or <a href=\"%s\" target=\"_blank\">install manually</a>."
1722
  msgstr ""
1723
 
@@ -4701,19 +4705,19 @@ msgstr ""
4701
  msgid "Send these credentials via email."
4702
  msgstr ""
4703
 
4704
- #: front-end/class-formbuilder.php:708
4705
  msgid "User to edit:"
4706
  msgstr ""
4707
 
4708
- #: front-end/class-formbuilder.php:710
4709
  msgid "Select User"
4710
  msgstr ""
4711
 
4712
- #: front-end/class-formbuilder.php:726
4713
  msgid "There are no other users to edit"
4714
  msgstr ""
4715
 
4716
- #: front-end/class-formbuilder.php:749
4717
  msgid "Something went wrong. Please try again!"
4718
  msgstr ""
4719
 
@@ -4761,8 +4765,8 @@ msgstr ""
4761
  msgid "Log out of this account"
4762
  msgstr ""
4763
 
4764
- #: front-end/login.php:466
4765
- msgid "Log out"
4766
  msgstr ""
4767
 
4768
  #: front-end/login.php:467
@@ -4773,10 +4777,6 @@ msgstr ""
4773
  msgid "You are currently logged in as %s. "
4774
  msgstr ""
4775
 
4776
- #: front-end/logout.php:15
4777
- msgid "Log out &raquo;"
4778
- msgstr ""
4779
-
4780
  #: front-end/recover.php:16
4781
  msgid "Your account has to be confirmed by an administrator before you can use the \"Password Reset\" feature."
4782
  msgstr ""
@@ -6901,11 +6901,11 @@ msgstr ""
6901
  msgid "Delete this item"
6902
  msgstr ""
6903
 
6904
- #: ../pb-add-on-labels-edit/assets/lib/wck-api/wordpress-creation-kit.php:1286
6905
  msgid "Syncronize WCK"
6906
  msgstr ""
6907
 
6908
- #: ../pb-add-on-labels-edit/assets/lib/wck-api/wordpress-creation-kit.php:1298
6909
  msgid "Syncronize WCK Translation"
6910
  msgstr ""
6911
 
1613
  msgid "Translate your Profile Builder forms with a WordPress translation plugin that anyone can use. It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders."
1614
  msgstr ""
1615
 
1616
+ #: admin/add-ons.php:84, admin/add-ons.php:155, admin/add-ons.php:195, admin/add-ons.php:289, admin/pms-cross-promotion.php:78, admin/pms-cross-promotion.php:114, admin/pms-cross-promotion.php:193
1617
  msgid "Activate"
1618
  msgstr ""
1619
 
1620
+ #: admin/add-ons.php:88, admin/add-ons.php:159, admin/add-ons.php:207, admin/add-ons.php:293, admin/pms-cross-promotion.php:90, admin/pms-cross-promotion.php:118, admin/pms-cross-promotion.php:197
1621
  msgid "Deactivate"
1622
  msgstr ""
1623
 
1633
  msgid "Install Now"
1634
  msgstr ""
1635
 
1636
+ #: admin/add-ons.php:104, admin/add-ons.php:175, admin/add-ons.php:313, admin/pms-cross-promotion.php:141, admin/pms-cross-promotion.php:220
1637
  msgid "Compatible with your version of Profile Builder."
1638
  msgstr ""
1639
 
1665
  msgid "Retry Install"
1666
  msgstr ""
1667
 
1668
+ #: admin/add-ons.php:204, admin/add-ons.php:300
1669
  msgid "Add-On is <strong>active</strong>"
1670
  msgstr ""
1671
 
1672
+ #: admin/add-ons.php:205, admin/add-ons.php:298
1673
  msgid "Add-On is <strong>inactive</strong>"
1674
  msgstr ""
1675
 
1682
  msgstr ""
1683
 
1684
  #: admin/add-ons.php:263
1685
+ msgid "Available with All Versions"
1686
  msgstr ""
1687
 
1688
  #: admin/add-ons.php:265
1689
+ msgid "Available with the Hobbyist and Pro Versions"
1690
  msgstr ""
1691
 
1692
+ #: admin/add-ons.php:267
1693
+ msgid "Available with the Pro Version"
1694
+ msgstr ""
1695
+
1696
+ #: admin/add-ons.php:308
1697
  msgid "Learn More"
1698
  msgstr ""
1699
 
1700
+ #: admin/add-ons.php:308, admin/pms-cross-promotion.php:134, admin/pms-cross-promotion.php:213
1701
  msgid "Download Now"
1702
  msgstr ""
1703
 
1704
+ #: admin/add-ons.php:322
1705
  msgid "Upgrade Profile Builder"
1706
  msgstr ""
1707
 
1708
+ #: admin/add-ons.php:323
1709
  msgid "Not compatible with Profile Builder"
1710
  msgstr ""
1711
 
1712
+ #: admin/add-ons.php:330, front-end/class-formbuilder.php:432
1713
  msgid "Update"
1714
  msgstr ""
1715
 
1716
+ #: admin/add-ons.php:331
1717
  msgid "Not compatible with your version of Profile Builder."
1718
  msgstr ""
1719
 
1720
+ #: admin/add-ons.php:332
1721
  msgid "Minimum required Profile Builder version:"
1722
  msgstr ""
1723
 
1724
+ #: admin/add-ons.php:337
1725
  msgid "Could not install add-on. Retry or <a href=\"%s\" target=\"_blank\">install manually</a>."
1726
  msgstr ""
1727
 
4705
  msgid "Send these credentials via email."
4706
  msgstr ""
4707
 
4708
+ #: front-end/class-formbuilder.php:710
4709
  msgid "User to edit:"
4710
  msgstr ""
4711
 
4712
+ #: front-end/class-formbuilder.php:712
4713
  msgid "Select User"
4714
  msgstr ""
4715
 
4716
+ #: front-end/class-formbuilder.php:728
4717
  msgid "There are no other users to edit"
4718
  msgstr ""
4719
 
4720
+ #: front-end/class-formbuilder.php:751
4721
  msgid "Something went wrong. Please try again!"
4722
  msgstr ""
4723
 
4765
  msgid "Log out of this account"
4766
  msgstr ""
4767
 
4768
+ #: front-end/login.php:466, front-end/logout.php:15
4769
+ msgid "Log out &raquo;"
4770
  msgstr ""
4771
 
4772
  #: front-end/login.php:467
4777
  msgid "You are currently logged in as %s. "
4778
  msgstr ""
4779
 
 
 
 
 
4780
  #: front-end/recover.php:16
4781
  msgid "Your account has to be confirmed by an administrator before you can use the \"Password Reset\" feature."
4782
  msgstr ""
6901
  msgid "Delete this item"
6902
  msgstr ""
6903
 
6904
+ #: ../pb-add-on-labels-edit/assets/lib/wck-api/wordpress-creation-kit.php:1279
6905
  msgid "Syncronize WCK"
6906
  msgstr ""
6907
 
6908
+ #: ../pb-add-on-labels-edit/assets/lib/wck-api/wordpress-creation-kit.php:1291
6909
  msgid "Syncronize WCK Translation"
6910
  msgstr ""
6911