diff --git bp-core/bp-core-loader.php bp-core/bp-core-loader.php
index 7dd0f51..1748ff0 100644
|
|
|
class BP_Core extends BP_Component { |
| 261 | 261 | function bp_setup_core() { |
| 262 | 262 | buddypress()->core = new BP_Core(); |
| 263 | 263 | } |
| 264 | | add_action( 'bp_setup_components', 'bp_setup_core', 2 ); |
| | 264 | add_action( 'bp_loaded', 'bp_setup_core', 0 ); |
diff --git bp-members/bp-members-loader.php bp-members/bp-members-loader.php
index d88380b..916959c 100644
|
|
|
class BP_Members_Component extends BP_Component { |
| 80 | 80 | |
| 81 | 81 | /** Logged in user ****************************************************/ |
| 82 | 82 | |
| | 83 | // The core userdata of the user who is currently logged in. |
| | 84 | $bp->loggedin_user->userdata = bp_core_get_core_userdata( bp_loggedin_user_id() ); |
| | 85 | |
| 83 | 86 | // Fetch the full name for the logged in user |
| 84 | | $bp->loggedin_user->fullname = bp_core_get_user_displayname( bp_loggedin_user_id() ); |
| | 87 | $bp->loggedin_user->fullname = $bp->loggedin_user->userdata->display_name; |
| 85 | 88 | |
| 86 | 89 | // Hits the DB on single WP installs so get this separately |
| 87 | 90 | $bp->loggedin_user->is_super_admin = $bp->loggedin_user->is_site_admin = is_super_admin( bp_loggedin_user_id() ); |
| … |
… |
class BP_Members_Component extends BP_Component { |
| 89 | 92 | // The domain for the user currently logged in. eg: http://domain.com/members/andy |
| 90 | 93 | $bp->loggedin_user->domain = bp_core_get_user_domain( bp_loggedin_user_id() ); |
| 91 | 94 | |
| 92 | | // The core userdata of the user who is currently logged in. |
| 93 | | $bp->loggedin_user->userdata = bp_core_get_core_userdata( bp_loggedin_user_id() ); |
| 94 | | |
| 95 | 95 | /** Displayed user ****************************************************/ |
| 96 | 96 | |
| 97 | 97 | // The domain for the user currently being displayed |
| … |
… |
class BP_Members_Component extends BP_Component { |
| 118 | 118 | |
| 119 | 119 | if ( !defined( 'BP_DEFAULT_COMPONENT' ) ) { |
| 120 | 120 | if ( bp_is_active( 'activity' ) && isset( $bp->pages->activity ) ) { |
| 121 | | $bp->default_component = bp_get_activity_slug(); |
| | 121 | $bp->default_component = $bp->activity->id; |
| 122 | 122 | } else { |
| 123 | 123 | $bp->default_component = ( 'xprofile' === $bp->profile->id ) ? 'profile' : $bp->profile->id; |
| 124 | 124 | } |
diff --git bp-xprofile/bp-xprofile-loader.php bp-xprofile/bp-xprofile-loader.php
index 922877c..7b3f6ce 100644
|
|
|
class BP_XProfile_Component extends BP_Component { |
| 154 | 154 | ); |
| 155 | 155 | |
| 156 | 156 | parent::setup_globals( $globals ); |
| | 157 | |
| | 158 | // Replace the logged-in user's WP display_name with BP's, if necessary |
| | 159 | if ( bp_loggedin_user_id() && bp_disable_profile_sync() ) { |
| | 160 | buddypress()->loggedin_user->fullname = bp_core_get_user_displayname( bp_loggedin_user_id() ); |
| | 161 | } |
| 157 | 162 | } |
| 158 | 163 | |
| 159 | 164 | /** |