User registration & user profile – Profile Builder - Version 2.7.4

Version Description

  • Improved admin interface speed in most cases by up to 100% by reducing the number of ajax calls
  • Improved the admin interface with small visual tweaks and bug-fixes
  • Fixed bug with email not showing up for unconfirmed users table listing in backend
Download this release

Release Info

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

Code changes from version 2.7.3 to 2.7.4

admin/register-version.php CHANGED
@@ -77,10 +77,10 @@ function wppb_serial_form($version, $fullname){
77
  echo '<span class="validateStatus"><img src="'.WPPB_PLUGIN_URL.'/assets/images/accept.png" title="'.__( 'The serial number was successfully validated!', 'profile-builder' ).'"/></span>';
78
  elseif ( $wppb_profile_builder_serial_status == 'notFound' )
79
  echo '<span class="validateStatus"><img src="'.WPPB_PLUGIN_URL.'/assets/images/icon_error.png" title="'.__( 'The serial number entered couldn\'t be validated!','profile-builder' ).'"/></span>';
80
- elseif ( strpos( $wppb_profile_builder_serial_status, 'aboutToExpire') !== false )
81
- echo '<span class="validateStatus"><img src="' . WPPB_PLUGIN_URL . '/assets/images/icon_error.png" title="' . __('The serial number is about to expire soon!', 'profile-builder') . '"/>'. sprintf( __(' Your serial number is about to expire, please %1$s Renew Your License%2$s.','profile-builder'), "<a href='https://www.cozmoslabs.com/downloads/profile-builder-". $version ."-v2-yearly-renewal/?utm_source=PB&utm_medium=dashboard&utm_campaign=PB-Renewal' >", "</a>").'</span>';
82
  elseif ( $wppb_profile_builder_serial_status == 'expired' )
83
- echo '<span class="validateStatus"><img src="'.WPPB_PLUGIN_URL.'/assets/images/icon_error.png" title="'.__( 'The serial number couldn\'t be validated because it expired!','profile-builder' ).'"/>'. sprintf( __(' Your serial number is expired, please %1$s Renew Your License%2$s.','profile-builder'), "<a href='https://www.cozmoslabs.com/downloads/profile-builder-". $version ."-v2-yearly-renewal/?utm_source=PB&utm_medium=dashboard&utm_campaign=PB-Renewal' >", "</a>").'</span>';
84
  elseif ( $wppb_profile_builder_serial_status == 'serverDown' )
85
  echo '<span class="validateStatus"><img src="'.WPPB_PLUGIN_URL.'/assets/images/icon_error.png" title="'.__( 'The serial number couldn\'t be validated because process timed out. This is possible due to the server being down. Please try again later!','profile-builder' ).'"/></span>';
86
  ?>
77
  echo '<span class="validateStatus"><img src="'.WPPB_PLUGIN_URL.'/assets/images/accept.png" title="'.__( 'The serial number was successfully validated!', 'profile-builder' ).'"/></span>';
78
  elseif ( $wppb_profile_builder_serial_status == 'notFound' )
79
  echo '<span class="validateStatus"><img src="'.WPPB_PLUGIN_URL.'/assets/images/icon_error.png" title="'.__( 'The serial number entered couldn\'t be validated!','profile-builder' ).'"/></span>';
80
+ elseif ( strpos( $wppb_profile_builder_serial_status, 'aboutToExpire') !== false )//instead of aboutToExpire if the client has autobbiling on then he will receive 'found' instead
81
+ echo '<span class="validateStatus"><img src="' . WPPB_PLUGIN_URL . '/assets/images/icon_error.png" title="' . __('The serial number is about to expire soon!', 'profile-builder') . '"/>'. sprintf( __(' Your serial number is about to expire, please %1$s Renew Your License%2$s.','profile-builder'), "<a href='https://www.cozmoslabs.com/account/?utm_source=PB&utm_medium=dashboard&utm_campaign=PB-Renewal' >", "</a>").'</span>';
82
  elseif ( $wppb_profile_builder_serial_status == 'expired' )
83
+ echo '<span class="validateStatus"><img src="'.WPPB_PLUGIN_URL.'/assets/images/icon_error.png" title="'.__( 'The serial number couldn\'t be validated because it expired!','profile-builder' ).'"/>'. sprintf( __(' Your serial number is expired, please %1$s Renew Your License%2$s.','profile-builder'), "<a href='https://www.cozmoslabs.com/account/?utm_source=PB&utm_medium=dashboard&utm_campaign=PB-Renewal' >", "</a>").'</span>';
84
  elseif ( $wppb_profile_builder_serial_status == 'serverDown' )
85
  echo '<span class="validateStatus"><img src="'.WPPB_PLUGIN_URL.'/assets/images/icon_error.png" title="'.__( 'The serial number couldn\'t be validated because process timed out. This is possible due to the server being down. Please try again later!','profile-builder' ).'"/></span>';
86
  ?>
assets/css/style-back-end.css CHANGED
@@ -662,4 +662,8 @@ p .wppb-button-free {
662
  #wppb_ul_search_settings .wck-checkboxes > div{
663
  display: inline-block;
664
  margin-left:7px;
 
 
 
 
665
  }
662
  #wppb_ul_search_settings .wck-checkboxes > div{
663
  display: inline-block;
664
  margin-left:7px;
665
+ }
666
+
667
+ .mb-table-container .wck-state-highlight{
668
+ height:45px;
669
  }
assets/lib/wck-api/wordpress-creation-kit.css CHANGED
@@ -48,7 +48,7 @@
48
  left:0;
49
  width:100%;
50
  height:100%;
51
- background:url(images/ajax-loader.gif) center center no-repeat; z-index:999;
52
  }
53
 
54
  .mb-table-container pre{
@@ -131,12 +131,16 @@ td.wck-number{
131
  height:130px;
132
  }
133
  .mb-text-input{
134
- width:40%;
135
- max-width:400px;
136
  }
137
 
138
  .mb-select{
139
- min-width:150px;
 
 
 
 
140
  }
141
 
142
  /* upload field */
48
  left:0;
49
  width:100%;
50
  height:100%;
51
+ background:url(../../../../../../wp-admin/images/spinner-2x.gif) center center no-repeat; z-index:999;
52
  }
53
 
54
  .mb-table-container pre{
131
  height:130px;
132
  }
133
  .mb-text-input{
134
+ width:60%;
135
+ max-width:600px;
136
  }
137
 
138
  .mb-select{
139
+ min-width:250px;
140
+ }
141
+
142
+ .mb-table-container .wck-state-highlight{
143
+ background-color: #f0fbff !important;
144
  }
145
 
146
  /* upload field */
assets/lib/wck-api/wordpress-creation-kit.js CHANGED
@@ -75,39 +75,26 @@ function addMeta(value, id, nonce){
75
  }
76
  else{
77
  /* refresh the list */
78
- jQuery.post( wppbWckAjaxurl , { action:"wck_refresh_list"+meta, meta:value, id:id}, function(response) {
79
-
80
- jQuery('#container_'+value).replaceWith(response);
81
-
82
- jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
83
-
84
- if( !jQuery( '#'+value ).hasClass('single') )
85
- mb_sortable_elements();
86
-
87
- /* restore the add form to the original values */
88
- if( !jQuery( '#'+value ).hasClass('single') ){
89
- jQuery.post( wppbWckAjaxurl , { action:"wck_add_form"+meta, meta:value, id:id }, function(response) {
90
- jQuery( '#'+value ).replaceWith( response );
91
- });
92
- }
93
-
94
- /* jQuery('#'+value+' .mb-field').each(function(){
95
- if(jQuery(this).attr('type') == 'checkbox' || jQuery(this).attr('type') == 'radio' )
96
- jQuery(this).removeAttr( 'checked' );
97
- else
98
- jQuery(this).val('');
99
- });
100
-
101
- jQuery('#'+value+' .upload-field-details').each(function(){
102
- jQuery(this).html('<p><span class="file-name"></span><span class="file-type"></span></p>');
103
- }); */
104
 
 
 
 
105
  jQuery('#'+value).parent().css('opacity','1');
106
-
107
- jQuery('body').trigger('wck-added-element');
108
-
109
  jQuery('#mb-ajax-loading').remove();
110
- });
 
 
 
 
 
 
 
111
  }
112
  });
113
 
@@ -132,22 +119,18 @@ function removeMeta(value, id, element_id, nonce){
132
 
133
  /* If single add the form */
134
  if( jQuery( '#container_'+value ).hasClass('single') ){
135
- jQuery.post( wppbWckAjaxurl , { action:"wck_add_form"+meta, meta:value, id:id }, function(response) {
136
- jQuery( '#container_'+value ).before( response );
137
- jQuery( '#'+value ).addClass('single');
138
- });
139
  }
140
 
141
  /* refresh the list */
142
- jQuery.post( wppbWckAjaxurl , { action:"wck_refresh_list"+meta, meta:value, id:id}, function(response) {
143
- jQuery('#container_'+value).replaceWith(response);
144
-
145
- jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
146
-
147
- mb_sortable_elements();
148
- jQuery('#'+value).parent().css('opacity','1');
149
- jQuery('#mb-ajax-loading').remove();
150
- });
151
 
152
  });
153
  }
@@ -169,6 +152,7 @@ function removeMeta(value, id, element_id, nonce){
169
  /* reorder elements through drag and drop */
170
  function mb_sortable_elements() {
171
  jQuery( ".mb-table-container tbody" ).not( jQuery( ".mb-table-container.single tbody, .mb-table-container.not-sortable tbody" ) ).sortable({
 
172
  update: function(event, ui){
173
 
174
  var value = jQuery(this).parent().siblings('.wck-add-form').attr('id');
@@ -192,17 +176,14 @@ function mb_sortable_elements() {
192
  }
193
 
194
 
195
- jQuery.post( wppbWckAjaxurl , { action:"wck_reorder_meta"+meta, meta:value, id:id, values:values}, function(response) {
196
- jQuery.post( wppbWckAjaxurl , { action:"wck_refresh_list"+meta, meta:value, id:id}, function(response) {
197
- jQuery('#container_'+value).replaceWith(response);
198
-
199
- jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
200
-
201
- mb_sortable_elements();
202
- jQuery('#'+value).parent().css('opacity','1');
203
- jQuery('#mb-ajax-loading').remove();
204
- });
205
 
 
 
 
 
 
206
  });
207
  },
208
  items: "> tr"
@@ -332,17 +313,15 @@ function updateMeta(value, id, element_id, nonce){
332
  jQuery('#update_container_'+value+'_'+element_id).remove();
333
 
334
  /* refresh the list */
335
- jQuery.post( wppbWckAjaxurl , { action:"wck_refresh_entry"+meta, meta:value, id:id, element_id:element_id}, function(response) {
336
- jQuery('#container_'+value+' #element_'+element_id).replaceWith(response);
337
-
338
- jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
339
 
340
- if( jQuery( '#container_' + value + " tbody" ).hasClass('ui-sortable') && jQuery( '#container_' + value + " tbody .wck_update_container" ).length == 0 )
341
- jQuery( '#container_' + value + " tbody" ).sortable("enable");
342
-
343
- jQuery('#container_'+value).parent().css('opacity','1');
344
- jQuery('#mb-ajax-loading').remove();
345
- });
346
  }
347
  });
348
  }
75
  }
76
  else{
77
  /* refresh the list */
78
+ jQuery('#container_'+value).replaceWith(response.entry_list);
79
+
80
+ jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
81
+
82
+ if( !jQuery( '#'+value ).hasClass('single') )
83
+ mb_sortable_elements();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
+ /* restore the add form to the original values */
86
+ if( !jQuery( '#'+value ).hasClass('single') ){
87
+ jQuery( '#'+value ).replaceWith( response.add_form );
88
  jQuery('#'+value).parent().css('opacity','1');
 
 
 
89
  jQuery('#mb-ajax-loading').remove();
90
+ }
91
+ else{
92
+ jQuery('#'+value).parent().css('opacity','1');
93
+ jQuery('#mb-ajax-loading').remove();
94
+ }
95
+
96
+ jQuery('body').trigger('wck-added-element');
97
+
98
  }
99
  });
100
 
119
 
120
  /* If single add the form */
121
  if( jQuery( '#container_'+value ).hasClass('single') ){
122
+ jQuery( '#container_'+value ).before( response.add_form );
123
+ jQuery( '#'+value ).addClass('single');
 
 
124
  }
125
 
126
  /* refresh the list */
127
+ jQuery('#container_'+value).replaceWith(response.entry_list);
128
+
129
+ jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
130
+
131
+ mb_sortable_elements();
132
+ jQuery('#'+value).parent().css('opacity','1');
133
+ jQuery('#mb-ajax-loading').remove();
 
 
134
 
135
  });
136
  }
152
  /* reorder elements through drag and drop */
153
  function mb_sortable_elements() {
154
  jQuery( ".mb-table-container tbody" ).not( jQuery( ".mb-table-container.single tbody, .mb-table-container.not-sortable tbody" ) ).sortable({
155
+ placeholder: "wck-state-highlight",
156
  update: function(event, ui){
157
 
158
  var value = jQuery(this).parent().siblings('.wck-add-form').attr('id');
176
  }
177
 
178
 
179
+ jQuery.post( wppbWckAjaxurl , { action:"wck_reorder_meta"+meta, meta:value, id:id, values:values}, function(response) {
180
+ jQuery('#container_'+value).replaceWith(response.entry_list);
 
 
 
 
 
 
 
 
181
 
182
+ jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
183
+
184
+ mb_sortable_elements();
185
+ jQuery('#'+value).parent().css('opacity','1');
186
+ jQuery('#mb-ajax-loading').remove();
187
  });
188
  },
189
  items: "> tr"
313
  jQuery('#update_container_'+value+'_'+element_id).remove();
314
 
315
  /* refresh the list */
316
+ jQuery('#container_'+value+' #element_'+element_id).replaceWith(response.entry_content);
317
+
318
+ jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
 
319
 
320
+ if( jQuery( '#container_' + value + " tbody" ).hasClass('ui-sortable') && jQuery( '#container_' + value + " tbody .wck_update_container" ).length == 0 )
321
+ jQuery( '#container_' + value + " tbody" ).sortable("enable");
322
+
323
+ jQuery('#container_'+value).parent().css('opacity','1');
324
+ jQuery('#mb-ajax-loading').remove();
 
325
  }
326
  });
327
  }
assets/lib/wck-api/wordpress-creation-kit.php CHANGED
@@ -92,8 +92,6 @@ class Wordpress_Creation_Kit_PB{
92
  add_action("wp_ajax_wck_update_meta".$this->args['meta_name'], array( &$this, 'wck_update_meta') );
93
  add_action("wp_ajax_wck_show_update".$this->args['meta_name'], array( &$this, 'wck_show_update_form') );
94
  add_action("wp_ajax_wck_refresh_list".$this->args['meta_name'], array( &$this, 'wck_refresh_list') );
95
- add_action("wp_ajax_wck_refresh_entry".$this->args['meta_name'], array( &$this, 'wck_refresh_entry') );
96
- add_action("wp_ajax_wck_add_form".$this->args['meta_name'], array( &$this, 'wck_add_form') );
97
  add_action("wp_ajax_wck_remove_meta".$this->args['meta_name'], array( &$this, 'wck_remove_meta') );
98
  add_action("wp_ajax_wck_reorder_meta".$this->args['meta_name'], array( &$this, 'wck_reorder_meta') );
99
 
@@ -662,8 +660,8 @@ class Wordpress_Creation_Kit_PB{
662
  wp_enqueue_style( 'thickbox' );
663
  }
664
 
665
- wp_enqueue_script('wordpress-creation-kit', plugins_url('/wordpress-creation-kit.js', __FILE__), array('jquery', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable' ) );
666
- wp_register_style('wordpress-creation-kit-css', plugins_url('/wordpress-creation-kit.css', __FILE__));
667
  wp_enqueue_style('wordpress-creation-kit-css');
668
 
669
  // wysiwyg
@@ -802,8 +800,14 @@ class Wordpress_Creation_Kit_PB{
802
  $results = array( $values );
803
  else
804
  $results[] = $values;
805
-
806
- do_action( 'wck_before_add_meta', $meta, $id, $values );
 
 
 
 
 
 
807
 
808
  if( $this->args['context'] == 'post_meta' )
809
  update_post_meta($id, $meta, $results);
@@ -820,8 +824,13 @@ class Wordpress_Creation_Kit_PB{
820
  }
821
  }
822
  }
 
 
 
 
 
 
823
 
824
- exit;
825
  }
826
 
827
  /* ajax update a reccord in the meta */
@@ -865,8 +874,14 @@ class Wordpress_Creation_Kit_PB{
865
  $results = get_option( apply_filters( 'wck_option_meta' , $meta, $values, $element_id ) );
866
 
867
  $results[$element_id] = $values;
 
 
 
 
 
 
 
868
 
869
- do_action( 'wck_before_update_meta', $meta, $id, $values, $element_id );
870
 
871
  if( $this->args['context'] == 'post_meta' )
872
  update_post_meta($id, $meta, $results);
@@ -883,69 +898,63 @@ class Wordpress_Creation_Kit_PB{
883
  }
884
  }
885
  }
886
-
887
- exit;
 
 
 
888
  }
889
 
890
- /* ajax to refresh the meta content */
891
- function wck_refresh_list(){
 
892
  if( isset( $_POST['meta'] ) )
893
  $meta = sanitize_text_field( $_POST['meta'] );
894
- else
895
- $meta = '';
896
- if( isset( $_POST['id'] ) )
897
- $id = absint($_POST['id']);
898
- else
899
- $id = '';
900
- echo self::wck_output_meta_content($meta, $id, $this->args['meta_array']);
901
 
902
- do_action( "wck_refresh_list_{$meta}", $id );
 
 
 
 
 
 
903
 
904
- exit;
 
 
 
 
 
 
905
  }
906
 
907
- /* ajax to refresh an entry content */
908
- function wck_refresh_entry(){
909
- if( isset( $_POST['meta'] ) )
910
- $meta = sanitize_text_field( $_POST['meta'] );
911
- else
912
- $meta = '';
913
- if( isset( $_POST['id'] ) )
914
- $id = absint( $_POST['id'] );
915
- else
916
- $id = '';
917
- if( isset( $_POST['element_id'] ) )
918
- $element_id = absint( $_POST['element_id'] );
919
- else
920
- $element_id = '';
921
 
922
  if( $this->args['context'] == 'post_meta' )
923
  $results = get_post_meta($id, $meta, true);
924
  else if ( $this->args['context'] == 'option' )
925
  $results = get_option( apply_filters( 'wck_option_meta' , $meta, $element_id ) );
926
-
927
- echo self::wck_output_entry_content( $meta, $id, $this->args['meta_array'], $results, $element_id );
928
-
929
- do_action( "wck_refresh_entry_{$meta}", $id );
930
-
931
- exit;
 
932
  }
933
 
934
- /* ajax to add the form for single */
935
- function wck_add_form(){
936
- if( !empty( $_POST['meta'] ) )
937
- $meta = sanitize_text_field( $_POST['meta'] );
938
- else
939
- $meta = '';
940
- if( !empty( $_POST['id'] ) )
941
- $id = absint( $_POST['id'] );
942
- else
943
- $id = '';
944
  $post = get_post($id);
945
- self::create_add_form($this->args['meta_array'], $meta, $post );
946
- do_action( "wck_ajax_add_form_{$meta}", $id );
 
 
 
947
 
948
- exit;
949
  }
950
 
951
 
@@ -997,8 +1006,13 @@ class Wordpress_Creation_Kit_PB{
997
  unset($results[$element_id]);
998
  /* reset the keys for the array */
999
  $results = array_values($results);
1000
-
1001
- do_action( 'wck_before_remove_meta', $meta, $id, $element_id );
 
 
 
 
 
1002
 
1003
  if( $this->args['context'] == 'post_meta' )
1004
  update_post_meta($id, $meta, $results);
@@ -1035,7 +1049,11 @@ class Wordpress_Creation_Kit_PB{
1035
  }
1036
  }
1037
 
1038
- exit;
 
 
 
 
1039
  }
1040
 
1041
 
@@ -1059,8 +1077,13 @@ class Wordpress_Creation_Kit_PB{
1059
  header( 'Content-type: application/json' );
1060
  die( json_encode( $error ) );
1061
  }
1062
-
1063
- do_action( 'wck_before_reorder_meta', $meta, $id, $elements_id );
 
 
 
 
 
1064
 
1065
  if( $this->args['context'] == 'post_meta' )
1066
  $results = get_post_meta($id, $meta, true);
@@ -1095,9 +1118,11 @@ class Wordpress_Creation_Kit_PB{
1095
  }
1096
  }
1097
 
1098
- }
1099
-
1100
- exit;
 
 
1101
  }
1102
 
1103
  /**
92
  add_action("wp_ajax_wck_update_meta".$this->args['meta_name'], array( &$this, 'wck_update_meta') );
93
  add_action("wp_ajax_wck_show_update".$this->args['meta_name'], array( &$this, 'wck_show_update_form') );
94
  add_action("wp_ajax_wck_refresh_list".$this->args['meta_name'], array( &$this, 'wck_refresh_list') );
 
 
95
  add_action("wp_ajax_wck_remove_meta".$this->args['meta_name'], array( &$this, 'wck_remove_meta') );
96
  add_action("wp_ajax_wck_reorder_meta".$this->args['meta_name'], array( &$this, 'wck_reorder_meta') );
97
 
660
  wp_enqueue_style( 'thickbox' );
661
  }
662
 
663
+ wp_enqueue_script('wordpress-creation-kit', plugins_url('/wordpress-creation-kit.js', __FILE__), array('jquery', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable' ), PROFILE_BUILDER_VERSION );
664
+ wp_register_style('wordpress-creation-kit-css', plugins_url('/wordpress-creation-kit.css', __FILE__), array(), PROFILE_BUILDER_VERSION );
665
  wp_enqueue_style('wordpress-creation-kit-css');
666
 
667
  // wysiwyg
800
  $results = array( $values );
801
  else
802
  $results[] = $values;
803
+
804
+ /* make sure this does not output anything so it won't break the json response below
805
+ will keep it do_action for compatibility reasons
806
+ */
807
+ ob_start();
808
+ do_action( 'wck_before_add_meta', $meta, $id, $values );
809
+ $wck_before_add_meta = ob_get_clean(); //don't output it
810
+
811
 
812
  if( $this->args['context'] == 'post_meta' )
813
  update_post_meta($id, $meta, $results);
824
  }
825
  }
826
  }
827
+
828
+ $entry_list = $this->wck_refresh_list( $meta, $id );
829
+ $add_form = $this->wck_add_form( $meta, $id );
830
+
831
+ header( 'Content-type: application/json' );
832
+ die( json_encode( array( 'entry_list' => $entry_list, 'add_form' => $add_form ) ) );
833
 
 
834
  }
835
 
836
  /* ajax update a reccord in the meta */
874
  $results = get_option( apply_filters( 'wck_option_meta' , $meta, $values, $element_id ) );
875
 
876
  $results[$element_id] = $values;
877
+
878
+ /* make sure this does not output anything so it won't break the json response below
879
+ will keep it do_action for compatibility reasons
880
+ */
881
+ ob_start();
882
+ do_action( 'wck_before_update_meta', $meta, $id, $values, $element_id );
883
+ $wck_before_update_meta = ob_get_clean(); //don't output it
884
 
 
885
 
886
  if( $this->args['context'] == 'post_meta' )
887
  update_post_meta($id, $meta, $results);
898
  }
899
  }
900
  }
901
+
902
+ $entry_content = $this->wck_refresh_entry( $meta, $id, $element_id );
903
+
904
+ header( 'Content-type: application/json' );
905
+ die( json_encode( array( 'entry_content' => $entry_content ) ) );
906
  }
907
 
908
+ /* ajax to refresh the meta content | or used in other function to return the */
909
+ /* this is used in Repeater Fields as an ajax action so we have to keep it dual purpose */
910
+ function wck_refresh_list( $meta = '', $id = '' ){
911
  if( isset( $_POST['meta'] ) )
912
  $meta = sanitize_text_field( $_POST['meta'] );
 
 
 
 
 
 
 
913
 
914
+ if( isset( $_POST['id'] ) )
915
+ $id = absint($_POST['id']);
916
+
917
+ ob_start();
918
+ echo self::wck_output_meta_content($meta, $id, $this->args['meta_array']);
919
+ do_action( "wck_refresh_list_{$meta}", $id );
920
+ $entry_list = ob_get_clean();
921
 
922
+ if( strpos( current_filter(), 'wp_ajax_wck_refresh_list') === 0 ){
923
+ echo $entry_list;
924
+ exit;
925
+ }
926
+ else{
927
+ return $entry_list;
928
+ }
929
  }
930
 
931
+ /* function that returns the content of an entry */
932
+ function wck_refresh_entry( $meta = '', $id = '', $element_id = '' ){
 
 
 
 
 
 
 
 
 
 
 
 
933
 
934
  if( $this->args['context'] == 'post_meta' )
935
  $results = get_post_meta($id, $meta, true);
936
  else if ( $this->args['context'] == 'option' )
937
  $results = get_option( apply_filters( 'wck_option_meta' , $meta, $element_id ) );
938
+
939
+ ob_start();
940
+ echo self::wck_output_entry_content( $meta, $id, $this->args['meta_array'], $results, $element_id );
941
+ do_action( "wck_refresh_entry_{$meta}", $id );
942
+ $entry_content = ob_get_clean();
943
+
944
+ return $entry_content;
945
  }
946
 
947
+ /* function that returns the add the form for single */
948
+ function wck_add_form( $meta = '', $id = '' ){
949
+
 
 
 
 
 
 
 
950
  $post = get_post($id);
951
+
952
+ ob_start();
953
+ self::create_add_form($this->args['meta_array'], $meta, $post );
954
+ do_action( "wck_ajax_add_form_{$meta}", $id );
955
+ $add_form = ob_get_clean();
956
 
957
+ return $add_form;
958
  }
959
 
960
 
1006
  unset($results[$element_id]);
1007
  /* reset the keys for the array */
1008
  $results = array_values($results);
1009
+
1010
+ /* make sure this does not output anything so it won't break the json response below
1011
+ will keep it do_action for compatibility reasons
1012
+ */
1013
+ ob_start();
1014
+ do_action( 'wck_before_remove_meta', $meta, $id, $element_id );
1015
+ $wck_before_remove_meta = ob_get_clean(); //don't output it
1016
 
1017
  if( $this->args['context'] == 'post_meta' )
1018
  update_post_meta($id, $meta, $results);
1049
  }
1050
  }
1051
 
1052
+ $entry_list = $this->wck_refresh_list( $meta, $id );
1053
+ $add_form = $this->wck_add_form( $meta, $id );
1054
+
1055
+ header( 'Content-type: application/json' );
1056
+ die( json_encode( array( 'entry_list' => $entry_list, 'add_form' => $add_form ) ) );
1057
  }
1058
 
1059
 
1077
  header( 'Content-type: application/json' );
1078
  die( json_encode( $error ) );
1079
  }
1080
+
1081
+ /* make sure this does not output anything so it won't break the json response below
1082
+ will keep it do_action for compatibility reasons
1083
+ */
1084
+ ob_start();
1085
+ do_action( 'wck_before_reorder_meta', $meta, $id, $elements_id );
1086
+ $wck_before_reorder_meta = ob_get_clean(); //don't output it
1087
 
1088
  if( $this->args['context'] == 'post_meta' )
1089
  $results = get_post_meta($id, $meta, true);
1118
  }
1119
  }
1120
 
1121
+ }
1122
+
1123
+ $entry_list = $this->wck_refresh_list( $meta, $id );
1124
+ header( 'Content-type: application/json' );
1125
+ die( json_encode( array( 'entry_list' => $entry_list ) ) );
1126
  }
1127
 
1128
  /**
features/email-confirmation/class-email-confirmation.php CHANGED
@@ -73,6 +73,7 @@ class wpp_list_unfonfirmed_email_table extends PB_WP_List_Table {
73
  function column_default($item, $column_name){
74
  switch($column_name){
75
  case 'email':
 
76
  case 'registered':
77
  return date_i18n( "Y-m-d G:i:s", wppb_add_gmt_offset( strtotime( $item[$column_name] ) ) );
78
  case 'user-meta':
73
  function column_default($item, $column_name){
74
  switch($column_name){
75
  case 'email':
76
+ return $item[$column_name];
77
  case 'registered':
78
  return date_i18n( "Y-m-d G:i:s", wppb_add_gmt_offset( strtotime( $item[$column_name] ) ) );
79
  case 'user-meta':
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.7.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.7.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.7.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.7.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
@@ -3,8 +3,8 @@ Contributors: cozmoslabs, reflectionmedia, sareiodata, adispiac, madalin.ungurea
3
  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
5
  Requires at least: 3.1
6
- Tested up to: 4.9.1
7
- Stable tag: 2.7.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -163,6 +163,11 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
163
  12. Role Editor
164
 
165
  == Changelog ==
 
 
 
 
 
166
  = 2.7.3 =
167
  * Now we save the registration date only in GMT time to avoid confusions. We have a filter to be able to save to local time: wppb_return_local_time_for_register
168
  * Added functionality to update meta name for existing fields in the database if they change. It is off by default but can be activated with the filter wppb_update_field_meta_key_in_db
3
  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
5
  Requires at least: 3.1
6
+ Tested up to: 4.9.2
7
+ Stable tag: 2.7.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
163
  12. Role Editor
164
 
165
  == Changelog ==
166
+ = 2.7.4 =
167
+ * Improved admin interface speed in most cases by up to 100% by reducing the number of ajax calls
168
+ * Improved the admin interface with small visual tweaks and bug-fixes
169
+ * Fixed bug with email not showing up for unconfirmed users table listing in backend
170
+
171
  = 2.7.3 =
172
  * Now we save the registration date only in GMT time to avoid confusions. We have a filter to be able to save to local time: wppb_return_local_time_for_register
173
  * Added functionality to update meta name for existing fields in the database if they change. It is off by default but can be activated with the filter wppb_update_field_meta_key_in_db