User registration & user profile – Profile Builder - Version 2.6.8

Version Description

  • Edit other users dropdown on the frontend Edit Profile form is now a select2
  • Fixed a potential error when submitting the Register form
Download this release

Release Info

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

Code changes from version 2.6.7 to 2.6.8

admin/add-ons.php CHANGED
@@ -25,10 +25,171 @@ function wppb_add_ons_content() {
25
  $version = ( ( PROFILE_BUILDER == 'Profile Builder Pro' ) ? 'Pro' : $version );
26
  $version = ( ( PROFILE_BUILDER == 'Profile Builder Hobbyist' ) ? 'Hobbyist' : $version );
27
 
 
 
 
 
 
28
  ?>
29
 
30
  <div class="wrap wppb-add-on-wrap">
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  <h2><?php _e( 'Add-Ons', 'profile-builder' ); ?></h2>
33
 
34
  <span id="wppb-add-on-activate-button-text" class="wppb-add-on-user-messages"><?php echo __( 'Activate', 'profile-builder' ); ?></span>
@@ -50,10 +211,6 @@ function wppb_add_ons_content() {
50
 
51
  <?php
52
 
53
- $wppb_add_ons = wppb_add_ons_get_remote_content();
54
- $wppb_get_all_plugins = get_plugins();
55
- $wppb_get_active_plugins = get_option('active_plugins');
56
-
57
  if( $wppb_add_ons === false ) {
58
 
59
  echo __('Something went wrong, we could not connect to the server. Please try again later.', 'profile-builder');
@@ -120,8 +277,6 @@ function wppb_add_ons_content() {
120
  // PB version type does match
121
  if (in_array(strtolower($version), $wppb_add_on['product_version_type'])) {
122
 
123
- $ajax_nonce = wp_create_nonce("wppb-activate-addon");
124
-
125
  if ($wppb_add_on_exists) {
126
 
127
  // Display activate/deactivate buttons
@@ -185,78 +340,7 @@ function wppb_add_ons_content() {
185
  ?>
186
  </div>
187
 
188
- <div class="clear"></div>
189
- <div>
190
- <h2><?php _e( 'Recommended Plugins', 'profile-builder' ) ?></h2>
191
- <?php
192
- $pms_add_on_exists = 0;
193
- $pms_add_on_is_active = 0;
194
- $pms_add_on_is_network_active = 0;
195
- // Check to see if add-on is in the plugins folder
196
- foreach ($wppb_get_all_plugins as $wppb_plugin_key => $wppb_plugin) {
197
- if( strtolower($wppb_plugin['Name']) == strtolower( 'Paid Member Subscriptions' ) && strpos(strtolower($wppb_plugin['AuthorName']), strtolower('Cozmoslabs')) !== false) {
198
- $pms_add_on_exists = 1;
199
- if (in_array($wppb_plugin_key, $wppb_get_active_plugins)) {
200
- $pms_add_on_is_active = 1;
201
- }
202
- // Consider the add-on active if it's network active
203
- if (is_plugin_active_for_network($wppb_plugin_key)) {
204
- $pms_add_on_is_network_active = 1;
205
- $pms_add_on_is_active = 1;
206
- }
207
- $plugin_file = $wppb_plugin_key;
208
- }
209
- }
210
- ?>
211
- <div class="plugin-card wppb-recommended-plugin wppb-add-on">
212
- <div class="plugin-card-top">
213
- <a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">
214
- <img src="<?php echo plugins_url( '../assets/images/pms-recommended.png', __FILE__ ); ?>" width="100%">
215
- </a>
216
- <h3 class="wppb-add-on-title">
217
- <a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">Paid Member Subscriptions</a>
218
- </h3>
219
- <h3 class="wppb-add-on-price"><?php _e( 'Free', 'profile-builder' ) ?></h3>
220
- <p class="wppb-add-on-description">
221
- <?php _e( 'Accept user payments, create subscription plans and restrict content on your membership site.', 'profile-builder' ) ?>
222
- <a href="<?php admin_url();?>plugin-install.php?tab=plugin-information&plugin=paid-member-subscriptions&TB_iframe=true&width=772&height=875" class="thickbox" aria-label="More information about Paid Member Subscriptions - membership & content restriction" data-title="Paid Member Subscriptions - membership & content restriction"><?php _e( 'More Details' ); ?></a>
223
- </p>
224
- </div>
225
- <div class="plugin-card-bottom wppb-add-on-compatible">
226
- <?php
227
- if ($pms_add_on_exists) {
228
-
229
- // Display activate/deactivate buttons
230
- if (!$pms_add_on_is_active) {
231
- echo '<a class="wppb-add-on-activate right button button-secondary" href="' . $plugin_file . '" data-nonce="' . $ajax_nonce . '">' . __('Activate', 'profile-builder') . '</a>';
232
-
233
- // If add-on is network activated don't allow deactivation
234
- } elseif (!$pms_add_on_is_network_active) {
235
- echo '<a class="wppb-add-on-deactivate right button button-secondary" href="' . $plugin_file . '" data-nonce="' . $ajax_nonce . '">' . __('Deactivate', 'profile-builder') . '</a>';
236
- }
237
-
238
- // Display message to the user
239
- if( !$pms_add_on_is_active ){
240
- echo '<span class="dashicons dashicons-no-alt"></span><span class="wppb-add-on-message">' . __('Plugin is <strong>inactive</strong>', 'profile-builder') . '</span>';
241
- } else {
242
- echo '<span class="dashicons dashicons-yes"></span><span class="wppb-add-on-message">' . __('Plugin is <strong>active</strong>', 'profile-builder') . '</span>';
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>';
252
-
253
- }
254
- ?>
255
- <div class="spinner"></div>
256
- <span class="wppb-add-on-user-messages wppb-error-manual-install"><?php printf(__('Could not install plugin. Retry or <a href="%s" target="_blank">install manually</a>.', 'profile-builder'), esc_url( 'http://www.wordpress.org/plugins/paid-member-subscriptions' )) ?></a>.</span>
257
- </div>
258
- </div>
259
- </div>
260
 
261
  </div>
262
  <?php
25
  $version = ( ( PROFILE_BUILDER == 'Profile Builder Pro' ) ? 'Pro' : $version );
26
  $version = ( ( PROFILE_BUILDER == 'Profile Builder Hobbyist' ) ? 'Hobbyist' : $version );
27
 
28
+ $wppb_add_ons = wppb_add_ons_get_remote_content();
29
+ $wppb_get_all_plugins = get_plugins();
30
+ $wppb_get_active_plugins = get_option('active_plugins');
31
+ $ajax_nonce = wp_create_nonce("wppb-activate-addon");
32
+
33
  ?>
34
 
35
  <div class="wrap wppb-add-on-wrap">
36
 
37
+
38
+
39
+
40
+ <div>
41
+ <h2><?php _e( 'Recommended Plugins', 'profile-builder' ) ?></h2>
42
+
43
+
44
+ <?php
45
+ $trp_add_on_exists = 0;
46
+ $trp_add_on_is_active = 0;
47
+ $trp_add_on_is_network_active = 0;
48
+ // Check to see if add-on is in the plugins folder
49
+ foreach ($wppb_get_all_plugins as $wppb_plugin_key => $wppb_plugin) {
50
+ if( strtolower($wppb_plugin['Name']) == strtolower( 'TranslatePress - Multilingual' ) && strpos(strtolower($wppb_plugin['AuthorName']), strtolower('Cozmoslabs')) !== false) {
51
+ $trp_add_on_exists = 1;
52
+ if (in_array($wppb_plugin_key, $wppb_get_active_plugins)) {
53
+ $trp_add_on_is_active = 1;
54
+ }
55
+ // Consider the add-on active if it's network active
56
+ if (is_plugin_active_for_network($wppb_plugin_key)) {
57
+ $trp_add_on_is_network_active = 1;
58
+ $trp_add_on_is_active = 1;
59
+ }
60
+ $plugin_file = $wppb_plugin_key;
61
+ }
62
+ }
63
+ ?>
64
+ <div class="plugin-card wppb-recommended-plugin wppb-add-on">
65
+ <div class="plugin-card-top">
66
+ <a target="_blank" href="https://wordpress.org/plugins/translatepress-multilingual/">
67
+ <img src="<?php echo plugins_url( '../assets/images/trp-recommended.png', __FILE__ ); ?>" width="100%">
68
+ </a>
69
+ <h3 class="wppb-add-on-title">
70
+ <a target="_blank" href="https://wordpress.org/plugins/translatepress-multilingual/">TranslatePress</a>
71
+ </h3>
72
+ <h3 class="wppb-add-on-price"><?php _e( 'Free', 'profile-builder' ) ?></h3>
73
+ <p class="wppb-add-on-description">
74
+ <?php _e( '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.', 'profile-builder' ) ?>
75
+ <a href="<?php admin_url();?>plugin-install.php?tab=plugin-information&plugin=translatepress-multilingual&TB_iframe=true&width=772&height=875" class="thickbox" aria-label="More information about TranslatePress - Multilingual" data-title="TranslatePress - Multilingual"><?php _e( 'More Details' ); ?></a>
76
+ </p>
77
+ </div>
78
+ <div class="plugin-card-bottom wppb-add-on-compatible">
79
+ <?php
80
+ if ($trp_add_on_exists) {
81
+
82
+ // Display activate/deactivate buttons
83
+ if (!$trp_add_on_is_active) {
84
+ echo '<a class="wppb-add-on-activate right button button-secondary" href="' . $plugin_file . '" data-nonce="' . $ajax_nonce . '">' . __('Activate', 'profile-builder') . '</a>';
85
+
86
+ // If add-on is network activated don't allow deactivation
87
+ } elseif (!$trp_add_on_is_network_active) {
88
+ echo '<a class="wppb-add-on-deactivate right button button-secondary" href="' . $plugin_file . '" data-nonce="' . $ajax_nonce . '">' . __('Deactivate', 'profile-builder') . '</a>';
89
+ }
90
+
91
+ // Display message to the user
92
+ if( !$trp_add_on_is_active ){
93
+ echo '<span class="dashicons dashicons-no-alt"></span><span class="wppb-add-on-message">' . __('Plugin is <strong>inactive</strong>', 'profile-builder') . '</span>';
94
+ } else {
95
+ echo '<span class="dashicons dashicons-yes"></span><span class="wppb-add-on-message">' . __('Plugin is <strong>active</strong>', 'profile-builder') . '</span>';
96
+ }
97
+
98
+ } else {
99
+ // handles the in-page download
100
+ $wppb_paid_link_class = 'button-secondary';
101
+ $wppb_paid_link_text = __('Install Now', 'profile-builder');
102
+
103
+ echo '<a class="right install-now button ' . $wppb_paid_link_class . '" href="'. wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=translatepress-multilingual'), 'install-plugin_translatepress-multilingual') .'" data-add-on-slug="translatepress-multilingual" data-add-on-name="TranslatePress - Multilingual" data-nonce="' . $ajax_nonce . '">' . $wppb_paid_link_text . '</a>';
104
+ echo '<span class="dashicons dashicons-yes"></span><span class="wppb-add-on-message">' . __('Compatible with your version of Profile Builder.', 'profile-builder') . '</span>';
105
+
106
+ }
107
+ ?>
108
+ <div class="spinner"></div>
109
+ <span class="wppb-add-on-user-messages wppb-error-manual-install"><?php printf(__('Could not install plugin. Retry or <a href="%s" target="_blank">install manually</a>.', 'profile-builder'), esc_url( 'https://www.wordpress.org/plugins/translatepress-multilingual' )) ?></a>.</span>
110
+ </div>
111
+ </div>
112
+
113
+
114
+
115
+ <?php
116
+ $pms_add_on_exists = 0;
117
+ $pms_add_on_is_active = 0;
118
+ $pms_add_on_is_network_active = 0;
119
+ // Check to see if add-on is in the plugins folder
120
+ foreach ($wppb_get_all_plugins as $wppb_plugin_key => $wppb_plugin) {
121
+ if( strtolower($wppb_plugin['Name']) == strtolower( 'Paid Member Subscriptions' ) && strpos(strtolower($wppb_plugin['AuthorName']), strtolower('Cozmoslabs')) !== false) {
122
+ $pms_add_on_exists = 1;
123
+ if (in_array($wppb_plugin_key, $wppb_get_active_plugins)) {
124
+ $pms_add_on_is_active = 1;
125
+ }
126
+ // Consider the add-on active if it's network active
127
+ if (is_plugin_active_for_network($wppb_plugin_key)) {
128
+ $pms_add_on_is_network_active = 1;
129
+ $pms_add_on_is_active = 1;
130
+ }
131
+ $plugin_file = $wppb_plugin_key;
132
+ }
133
+ }
134
+ ?>
135
+ <div class="plugin-card wppb-recommended-plugin wppb-add-on">
136
+ <div class="plugin-card-top">
137
+ <a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">
138
+ <img src="<?php echo plugins_url( '../assets/images/pms-recommended.png', __FILE__ ); ?>" width="100%">
139
+ </a>
140
+ <h3 class="wppb-add-on-title">
141
+ <a target="_blank" href="http://wordpress.org/plugins/paid-member-subscriptions/">Paid Member Subscriptions</a>
142
+ </h3>
143
+ <h3 class="wppb-add-on-price"><?php _e( 'Free', 'profile-builder' ) ?></h3>
144
+ <p class="wppb-add-on-description">
145
+ <?php _e( 'Accept user payments, create subscription plans and restrict content on your membership site.', 'profile-builder' ) ?>
146
+ <a href="<?php admin_url();?>plugin-install.php?tab=plugin-information&plugin=paid-member-subscriptions&TB_iframe=true&width=772&height=875" class="thickbox" aria-label="More information about Paid Member Subscriptions - membership & content restriction" data-title="Paid Member Subscriptions - membership & content restriction"><?php _e( 'More Details' ); ?></a>
147
+ </p>
148
+ </div>
149
+ <div class="plugin-card-bottom wppb-add-on-compatible">
150
+ <?php
151
+ if ($pms_add_on_exists) {
152
+
153
+ // Display activate/deactivate buttons
154
+ if (!$pms_add_on_is_active) {
155
+ echo '<a class="wppb-add-on-activate right button button-secondary" href="' . $plugin_file . '" data-nonce="' . $ajax_nonce . '">' . __('Activate', 'profile-builder') . '</a>';
156
+
157
+ // If add-on is network activated don't allow deactivation
158
+ } elseif (!$pms_add_on_is_network_active) {
159
+ echo '<a class="wppb-add-on-deactivate right button button-secondary" href="' . $plugin_file . '" data-nonce="' . $ajax_nonce . '">' . __('Deactivate', 'profile-builder') . '</a>';
160
+ }
161
+
162
+ // Display message to the user
163
+ if( !$pms_add_on_is_active ){
164
+ echo '<span class="dashicons dashicons-no-alt"></span><span class="wppb-add-on-message">' . __('Plugin is <strong>inactive</strong>', 'profile-builder') . '</span>';
165
+ } else {
166
+ echo '<span class="dashicons dashicons-yes"></span><span class="wppb-add-on-message">' . __('Plugin is <strong>active</strong>', 'profile-builder') . '</span>';
167
+ }
168
+
169
+ } else {
170
+ // handles the in-page download
171
+ $wppb_paid_link_class = 'button-secondary';
172
+ $wppb_paid_link_text = __('Install Now', 'profile-builder');
173
+
174
+ echo '<a class="right install-now button ' . $wppb_paid_link_class . '" href="'. wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=paid-member-subscriptions'), 'install-plugin_paid-member-subscriptions') .'" data-add-on-slug="paid-member-subscriptions" data-add-on-name="Paid Member Subscriptions" data-nonce="' . $ajax_nonce . '">' . $wppb_paid_link_text . '</a>';
175
+ echo '<span class="dashicons dashicons-yes"></span><span class="wppb-add-on-message">' . __('Compatible with your version of Profile Builder.', 'profile-builder') . '</span>';
176
+
177
+ }
178
+ ?>
179
+ <div class="spinner"></div>
180
+ <span class="wppb-add-on-user-messages wppb-error-manual-install"><?php printf(__('Could not install plugin. Retry or <a href="%s" target="_blank">install manually</a>.', 'profile-builder'), esc_url( 'http://www.wordpress.org/plugins/paid-member-subscriptions' )) ?></a>.</span>
181
+ </div>
182
+ </div>
183
+
184
+
185
+
186
+
187
+
188
+
189
+ </div>
190
+
191
+ <div class="clear"></div>
192
+
193
  <h2><?php _e( 'Add-Ons', 'profile-builder' ); ?></h2>
194
 
195
  <span id="wppb-add-on-activate-button-text" class="wppb-add-on-user-messages"><?php echo __( 'Activate', 'profile-builder' ); ?></span>
211
 
212
  <?php
213
 
 
 
 
 
214
  if( $wppb_add_ons === false ) {
215
 
216
  echo __('Something went wrong, we could not connect to the server. Please try again later.', 'profile-builder');
277
  // PB version type does match
278
  if (in_array(strtolower($version), $wppb_add_on['product_version_type'])) {
279
 
 
 
280
  if ($wppb_add_on_exists) {
281
 
282
  // Display activate/deactivate buttons
340
  ?>
341
  </div>
342
 
343
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
 
345
  </div>
346
  <?php
admin/basic-info.php CHANGED
@@ -180,6 +180,18 @@ function wppb_basic_info_content() {
180
 
181
  </div>
182
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
183
  <hr/>
184
  <div>
185
  <h3>Extra Notes</h3>
180
 
181
  </div>
182
  </div>
183
+ <div class="wrap wppb-wrap wppb-1-3-col">
184
+ <div>
185
+ <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img src="<?php echo plugins_url( '../assets/images/pb-trp-cross-promotion.png', __FILE__ ); ?>" alt="TranslatePress Logo"/></a>
186
+ </div>
187
+ <div>
188
+ <h3>Easily translate your entire WordPress website</h3>
189
+ <p>Translate your Profile Builder forms with a WordPress translation plugin that anyone can use.</p>
190
+ <p>It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
191
+ <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" class="button" target="_blank">Find out how</a></p>
192
+
193
+ </div>
194
+ </div>
195
  <hr/>
196
  <div>
197
  <h3>Extra Notes</h3>
assets/css/style-back-end.css CHANGED
@@ -546,13 +546,27 @@
546
  }
547
 
548
  .wppb-recommended-plugin{
549
- width:100%;
550
- margin:0 8px 16px 0;
551
  }
552
 
553
- @media screen and (min-width: 1600px){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
554
  .wppb-recommended-plugin{
555
- width:66%;
556
  }
557
  }
558
 
546
  }
547
 
548
  .wppb-recommended-plugin{
549
+ width:49%;
550
+ margin:0 0 16px 0;
551
  }
552
 
553
+ .wppb-recommended-plugin.plugin-card:nth-child(odd){
554
+ clear:none;
555
+ float:right;
556
+ margin-right: 0;
557
+ }
558
+
559
+ .wppb-recommended-plugin.plugin-card:nth-child(even){
560
+ clear:none;
561
+ }
562
+
563
+ .wppb-recommended-plugin .wppb-add-on-description{
564
+ min-height: 38px;
565
+ }
566
+
567
+ @media screen and (max-width: 768px){
568
  .wppb-recommended-plugin{
569
+ width:100%;
570
  }
571
  }
572
 
assets/css/style-front-end.css CHANGED
@@ -230,6 +230,12 @@ input#send_credentials_via_email{
230
  font-size: 100%;
231
  }
232
 
 
 
 
 
 
 
233
  .wppb-form-field.wppb-timepicker > span.wppb-timepicker-separator {
234
  display: inline-block;
235
  float: left;
230
  font-size: 100%;
231
  }
232
 
233
+ .wppb-form-field > span.select2-container {
234
+ font-style: normal;
235
+ font-size: 100%;
236
+ clear:none;
237
+ }
238
+
239
  .wppb-form-field.wppb-timepicker > span.wppb-timepicker-separator {
240
  display: inline-block;
241
  float: left;
assets/images/pb-trp-cross-promotion.png ADDED
Binary file
assets/images/trp-recommended.png ADDED
Binary file
front-end/class-formbuilder.php CHANGED
@@ -665,11 +665,15 @@ class Profile_Builder_Form_Creator{
665
  $query_args['role'] = apply_filters( 'wppb_edit_profile_user_dropdown_role', '' );
666
  $users = get_users( apply_filters( 'wppb_edit_other_users_dropdown_query_args', $query_args ) );
667
  if( !empty( $users ) ) {
 
 
 
 
668
  ?>
669
  <form method="GET" action="" id="select_user_to_edit_form">
670
  <p class="wppb-form-field">
671
  <label for="edit_user"><?php _e('User to edit:', 'profile-builder') ?></label>
672
- <select id="wppb-user-to-edit" name="edit_user">
673
  <?php
674
  foreach( $users as $user ){
675
  ?>
@@ -681,7 +685,8 @@ class Profile_Builder_Form_Creator{
681
  </p>
682
  <script type="text/javascript">jQuery('#wppb-user-to-edit').change(function () {
683
  window.location.href = "<?php echo htmlspecialchars_decode( esc_js( esc_url_raw( add_query_arg( array( 'edit_user' => '=' ) ) ) ) ) ?>" + jQuery(this).val();
684
- });</script>
 
685
  </form>
686
  <?php
687
  }
@@ -695,10 +700,14 @@ class Profile_Builder_Form_Creator{
695
  * @return string $html html for the form.
696
  */
697
  public function __toString() {
698
- ob_start();
699
- $this->wppb_form_logic();
700
- $html = ob_get_clean();
701
- return "{$html}";
 
 
 
 
702
  }
703
  }
704
 
665
  $query_args['role'] = apply_filters( 'wppb_edit_profile_user_dropdown_role', '' );
666
  $users = get_users( apply_filters( 'wppb_edit_other_users_dropdown_query_args', $query_args ) );
667
  if( !empty( $users ) ) {
668
+
669
+ /* turn it in a select2 */
670
+ wp_enqueue_script( 'wppb_select2_js', WPPB_PLUGIN_URL .'assets/js/select2/select2.min.js', array( 'jquery' ), PROFILE_BUILDER_VERSION );
671
+ wp_enqueue_style( 'wppb_select2_css', WPPB_PLUGIN_URL .'assets/css/select2/select2.min.css', array(), PROFILE_BUILDER_VERSION );
672
  ?>
673
  <form method="GET" action="" id="select_user_to_edit_form">
674
  <p class="wppb-form-field">
675
  <label for="edit_user"><?php _e('User to edit:', 'profile-builder') ?></label>
676
+ <select id="wppb-user-to-edit" class="wppb-user-to-edit" name="edit_user">
677
  <?php
678
  foreach( $users as $user ){
679
  ?>
685
  </p>
686
  <script type="text/javascript">jQuery('#wppb-user-to-edit').change(function () {
687
  window.location.href = "<?php echo htmlspecialchars_decode( esc_js( esc_url_raw( add_query_arg( array( 'edit_user' => '=' ) ) ) ) ) ?>" + jQuery(this).val();
688
+ });
689
+ jQuery(function(){jQuery('.wppb-user-to-edit').select2(); })</script>
690
  </form>
691
  <?php
692
  }
700
  * @return string $html html for the form.
701
  */
702
  public function __toString() {
703
+ try {
704
+ ob_start();
705
+ $this->wppb_form_logic();
706
+ $html = ob_get_clean();
707
+ return "{$html}";
708
+ } catch (Exception $exception) {
709
+ return '';
710
+ }
711
  }
712
  }
713
 
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.7
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.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'))));
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.8
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.8' );
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,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
5
  Requires at least: 3.1
6
  Tested up to: 4.8.1
7
- Stable tag: 2.6.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -78,6 +78,8 @@ For more functionality check out [Profile Builder Add-ons page](http://www.cozmo
78
 
79
  **Free Add-ons**
80
 
 
 
81
  * [Email Confirmation Field](http://www.cozmoslabs.com/add-ons/email-confirmation-field/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - check if the email address entered matches the first one, making sure a user submits a valid and correct email address
82
  * [Multiple Admin E-mails](http://www.cozmoslabs.com/add-ons/multiple-admin-e-mails/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - send user notification emails to multiple email addresses
83
  * [Custom CSS Classes on Fields](http://www.cozmoslabs.com/add-ons/custom-css-classes-fields/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - add custom CSS classes for fields
@@ -98,15 +100,18 @@ For more functionality check out [Profile Builder Add-ons page](http://www.cozmo
98
  * [Campaign Monitor](http://www.cozmoslabs.com/add-ons/profile-builder-campaign-monitor/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to subscribe to your Campaign Monitor lists directly from the Register or Edit Profile forms
99
  * [MailPoet](http://www.cozmoslabs.com/add-ons/mailpoet/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to subscribe to your MailPoet lists directly from the Register and Edit Profile forms
100
  * [Field Visibility](http://www.cozmoslabs.com/add-ons/field-visibility/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allows you to change the visibility options for the extra fields
 
 
 
101
 
102
 
103
  = Documentation =
104
 
105
- http://www.cozmoslabs.com/docs/profile-builder-2/
106
 
107
  = Website =
108
 
109
- http://www.cozmoslabs.com/wordpress-profile-builder/
110
 
111
  = Profile Builder in your Language =
112
  We're focusing on translating Profile Builder in as many languages as we can. So far, the translations for 10 languages are almost complete, but we still need help on a lot of other languages, so please join us at [translate.cozmoslabs.com.](http://translate.cozmoslabs.com/projects/profile-builder)
@@ -153,6 +158,10 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
153
  12. Role Editor
154
 
155
  == Changelog ==
 
 
 
 
156
  = 2.6.7 =
157
  * Added option in backend user new/edit screen to add multiple user roles when user roles module is active
158
  * Added user role multiple select for admin in front-end edit profile form when roles editor is active and select role field is in the form
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
5
  Requires at least: 3.1
6
  Tested up to: 4.8.1
7
+ Stable tag: 2.6.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
78
 
79
  **Free Add-ons**
80
 
81
+ * [Custom Login Page Templates](https://www.cozmoslabs.com/add-ons/custom-login-page-templates/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - customize the default WordPress login page with your own design.
82
+ * [Client Portal](https://www.cozmoslabs.com/add-ons/client-portal/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - create private pages for your website users that only an administrator can edit.
83
  * [Email Confirmation Field](http://www.cozmoslabs.com/add-ons/email-confirmation-field/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - check if the email address entered matches the first one, making sure a user submits a valid and correct email address
84
  * [Multiple Admin E-mails](http://www.cozmoslabs.com/add-ons/multiple-admin-e-mails/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - send user notification emails to multiple email addresses
85
  * [Custom CSS Classes on Fields](http://www.cozmoslabs.com/add-ons/custom-css-classes-fields/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - add custom CSS classes for fields
100
  * [Campaign Monitor](http://www.cozmoslabs.com/add-ons/profile-builder-campaign-monitor/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to subscribe to your Campaign Monitor lists directly from the Register or Edit Profile forms
101
  * [MailPoet](http://www.cozmoslabs.com/add-ons/mailpoet/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to subscribe to your MailPoet lists directly from the Register and Edit Profile forms
102
  * [Field Visibility](http://www.cozmoslabs.com/add-ons/field-visibility/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allows you to change the visibility options for the extra fields
103
+ * [bbPress](https://www.cozmoslabs.com/add-ons/bbpress/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allows you to integrate Profile Builder with the popular forums plugin, bbPress.
104
+ * [Multi-Step Forms](https://www.cozmoslabs.com/add-ons/multi-step-forms/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to build multi-step forms for Registration and Edit Profile forms.
105
+ * [BuddyPress](https://www.cozmoslabs.com/add-ons/buddypress/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allows extending BuddyPress user profiles with Profile Builder user fields.
106
 
107
 
108
  = Documentation =
109
 
110
+ Please visit the [documentation page](https://www.cozmoslabs.com/docs/profile-builder-2/) for this plugin
111
 
112
  = Website =
113
 
114
+ For more details visit our [website](http://www.cozmoslabs.com/wordpress-profile-builder/)
115
 
116
  = Profile Builder in your Language =
117
  We're focusing on translating Profile Builder in as many languages as we can. So far, the translations for 10 languages are almost complete, but we still need help on a lot of other languages, so please join us at [translate.cozmoslabs.com.](http://translate.cozmoslabs.com/projects/profile-builder)
158
  12. Role Editor
159
 
160
  == Changelog ==
161
+ = 2.6.8 =
162
+ * Edit other users dropdown on the frontend Edit Profile form is now a select2
163
+ * Fixed a potential error when submitting the Register form
164
+
165
  = 2.6.7 =
166
  * Added option in backend user new/edit screen to add multiple user roles when user roles module is active
167
  * Added user role multiple select for admin in front-end edit profile form when roles editor is active and select role field is in the form