- Timestamp:
- 04/24/2023 02:32:27 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-members-component.php
r13455 r13461 235 235 $bp->loggedin_user->domain = bp_members_get_user_url( bp_loggedin_user_id() ); 236 236 237 /** Displayed user *************************************************** 237 /** 238 * Set the Displayed user for the classic BuddyPress. This should only be the case when the 239 * legacy parser is on. When BP Rewrites are on, the displayed user is set in 240 * `BP_Members_Component::parse_query()`. 238 241 */ 239 240 // The core userdata of the user who is currently being displayed. 241 $bp->displayed_user->userdata = bp_core_get_core_userdata( bp_displayed_user_id() ); 242 243 // Fetch the full name displayed user. 244 $bp->displayed_user->fullname = isset( $bp->displayed_user->userdata->display_name ) ? $bp->displayed_user->userdata->display_name : ''; 245 246 // The domain for the user currently being displayed. 247 $bp->displayed_user->domain = bp_members_get_user_url( bp_displayed_user_id() ); 248 249 // If A user is displayed, check if there is a front template 250 if ( bp_get_displayed_user() ) { 251 $bp->displayed_user->front_template = bp_displayed_user_get_front_template(); 242 if ( bp_displayed_user_id() ) { 243 // The core userdata of the user who is currently being displayed. 244 $bp->displayed_user->userdata = bp_core_get_core_userdata( bp_displayed_user_id() ); 245 246 // Fetch the full name displayed user. 247 $bp->displayed_user->fullname = isset( $bp->displayed_user->userdata->display_name ) ? $bp->displayed_user->userdata->display_name : ''; 248 249 // The domain for the user currently being displayed. 250 $bp->displayed_user->domain = bp_members_get_user_url( bp_displayed_user_id() ); 251 252 // If A user is displayed, check if there is a front template 253 if ( bp_get_displayed_user() ) { 254 $bp->displayed_user->front_template = bp_displayed_user_get_front_template(); 255 } 252 256 } 253 257 … … 394 398 } 395 399 396 if ( ! empty( $bp->action_variables ) ) {400 if ( ! empty( $bp->action_variables ) ) { 397 401 $bp->canonical_stack['action_variables'] = bp_action_variables(); 398 402 } … … 855 859 } 856 860 857 // If A user is displayed, check if there is a front template.861 // If a user is displayed, check if there is a front template and reset navigation. 858 862 if ( bp_get_displayed_user() ) { 859 863 $bp->displayed_user->front_template = bp_displayed_user_get_front_template(); 864 865 // Reset the nav for the members component. 866 $this->nav = new BP_Core_Nav(); 860 867 } 861 868
Note: See TracChangeset
for help on using the changeset viewer.