User registration & user profile – Profile Builder - Version 1.1.24

Version Description

Wordpress 3.3 support

Download this release

Release Info

Developer barinagabriel
Plugin Icon 128x128 User registration & user profile – Profile Builder
Version 1.1.24
Comparing to
See all releases

Code changes from version 1.1.23 to 1.1.24

Files changed (3) hide show
  1. functions/functions.load.php +18 -6
  2. index.php +2 -2
  3. readme.txt +4 -1
functions/functions.load.php CHANGED
@@ -55,22 +55,34 @@ function wppb_add_plugin_stylesheet() {
55
 
56
  function wppb_show_admin_bar($content){
57
  global $current_user;
 
58
  $admintSettingsPresent = get_option('wppb_display_admin_settings','not_found');
59
- if ($admintSettingsPresent != 'not_found'){
60
- $wppb_showAdminBar = get_option('wppb_display_admin_settings');
61
  if ($current_user->ID != 0){
62
- $userRole = ($current_user->data->wp_capabilities);
 
63
  if ($userRole != NULL){
64
  $currentRole = key($userRole);
65
- $getSettings = $wppb_showAdminBar[$currentRole];
66
  if ($getSettings == 'show')
67
  return true;
68
  elseif ($getSettings == 'hide')
69
  return false;
70
- }
 
 
 
 
 
 
 
 
 
 
71
  }
72
  }
73
- else
74
  return true;
75
  }
76
 
55
 
56
  function wppb_show_admin_bar($content){
57
  global $current_user;
58
+ global $wpdb;
59
  $admintSettingsPresent = get_option('wppb_display_admin_settings','not_found');
60
+
61
+ if ($admintSettingsPresent != 'not_found'){
62
  if ($current_user->ID != 0){
63
+ $capabilityName = $wpdb->prefix.'capabilities';
64
+ $userRole = ($current_user->data->$capabilityName);
65
  if ($userRole != NULL){
66
  $currentRole = key($userRole);
67
+ $getSettings = $admintSettingsPresent[$currentRole];
68
  if ($getSettings == 'show')
69
  return true;
70
  elseif ($getSettings == 'hide')
71
  return false;
72
+ }elseif ($userRole == NULL){ // this is for the WP v.3.3
73
+ $userRole = ($current_user->roles[0]);
74
+ if ($userRole != NULL){
75
+ $getSettings = $admintSettingsPresent[$userRole];
76
+ if ($getSettings == 'show')
77
+ return true;
78
+ elseif ($getSettings == 'hide')
79
+ return false;
80
+ }
81
+ }else
82
+ return true;
83
  }
84
  }
85
+ else
86
  return true;
87
  }
88
 
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Profile Builder
4
  Plugin URI: http://www.cozmoslabs.com/2011/04/12/wordpress-profile-builder-a-front-end-user-registration-login-and-edit-profile-plugin/
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: 1.1.23
7
  Author: Reflection Media, Barina Gabriel
8
  Author URI: http://www.reflectionmedia.ro
9
  License: GPL2
@@ -54,7 +54,7 @@ function return_bytes($val) {
54
  }
55
 
56
 
57
- define( 'ProfileBuilderVersion', '1.1.23' );
58
  define( 'wppb_plugin_dir', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
59
  define( 'wppb_plugin_url', WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) );
60
  define( 'ServerMaxUploadSizeByte', return_bytes( ini_get( 'upload_max_filesize') ) );
3
  Plugin Name: Profile Builder
4
  Plugin URI: http://www.cozmoslabs.com/2011/04/12/wordpress-profile-builder-a-front-end-user-registration-login-and-edit-profile-plugin/
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: 1.1.24
7
  Author: Reflection Media, Barina Gabriel
8
  Author URI: http://www.reflectionmedia.ro
9
  License: GPL2
54
  }
55
 
56
 
57
+ define( 'ProfileBuilderVersion', '1.1.24' );
58
  define( 'wppb_plugin_dir', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
59
  define( 'wppb_plugin_url', WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) );
60
  define( 'ServerMaxUploadSizeByte', return_bytes( ini_get( 'upload_max_filesize') ) );
readme.txt CHANGED
@@ -7,7 +7,7 @@ custom registration, custom registration form, custom registration page, extra u
7
  front-end register, front-end registration, frontend edit profile, edit profile
8
  Requires at least: 3.1
9
  Tested up to: 3.3
10
- Stable tag: 1.1.23
11
 
12
  Simple to use profile plugin allowing front-end login, registration and edit profile by using shortcodes.
13
 
@@ -89,6 +89,9 @@ This plugin only adds/removes fields in the front-end. The default information-f
89
  7. Logged in Page: screenshot7.jpg
90
 
91
  == Changelog ==
 
 
 
92
  = 1.1.23 =
93
  Consecutive bugfixes.
94
 
7
  front-end register, front-end registration, frontend edit profile, edit profile
8
  Requires at least: 3.1
9
  Tested up to: 3.3
10
+ Stable tag: 1.1.24
11
 
12
  Simple to use profile plugin allowing front-end login, registration and edit profile by using shortcodes.
13
 
89
  7. Logged in Page: screenshot7.jpg
90
 
91
  == Changelog ==
92
+ = 1.1.24 =
93
+ Wordpress 3.3 support
94
+
95
  = 1.1.23 =
96
  Consecutive bugfixes.
97