Changeset 4281
- Timestamp:
- 04/24/2011 03:28:18 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-loader.php
r4211 r4281 90 90 global $bp; 91 91 92 // Stop if there is no user displayed 93 if ( empty( $bp->displayed_user->id ) ) 94 return; 95 96 // Determine user to use 97 if ( !empty( $bp->displayed_user->domain ) ) 98 $user_domain = $bp->displayed_user->domain; 99 else 100 return; 101 92 102 // Add 'Activity' to the main navigation 93 103 $main_nav = array( … … 99 109 'item_css_id' => $this->id 100 110 ); 101 102 // Stop if there is no user displayed or logged in103 if ( !is_user_logged_in() && !isset( $bp->displayed_user->id ) )104 return;105 106 // Determine user to use107 if ( isset( $bp->displayed_user->domain ) )108 $user_domain = $bp->displayed_user->domain;109 elseif ( isset( $bp->loggedin_user->domain ) )110 $user_domain = $bp->loggedin_user->domain;111 else112 return;113 111 114 112 // User link -
trunk/bp-blogs/bp-blogs-loader.php
r4211 r4281 102 102 */ 103 103 if ( !is_multisite() ) 104 return false; 104 return; 105 106 // Stop if there is no user displayed 107 if ( empty( $bp->displayed_user->id ) ) 108 return; 105 109 106 110 // Add 'Blogs' to the main navigation 107 $main_nav = 111 $main_nav = array( 108 112 'name' => sprintf( __( 'Blogs <span>(%d)</span>', 'buddypress' ), bp_blogs_total_blogs_for_user() ), 109 113 'slug' => $this->slug, -
trunk/bp-core/bp-core-component.php
r4265 r4281 222 222 */ 223 223 function _setup_nav( $main_nav = '', $sub_nav = '' ) { 224 225 224 // No sub nav items without a main nav item 226 225 if ( !empty( $main_nav ) ) { -
trunk/bp-friends/bp-friends-loader.php
r4211 r4281 92 92 function _setup_nav() { 93 93 global $bp; 94 95 // Stop if there is no user displayed 96 if ( empty( $bp->displayed_user->id ) ) 97 return; 94 98 95 99 // Add 'Friends' to the main navigation -
trunk/bp-members/bp-members-loader.php
r4211 r4281 144 144 global $bp; 145 145 146 // Stop if there is no user displayed and not logged in 147 if ( !is_user_logged_in() && empty( $bp->displayed_user->id ) ) 148 return; 149 146 150 // Add 'Profile' to the main navigation 147 151 if ( !bp_is_active( 'xprofile' ) ) { … … 156 160 157 161 // User links 158 $user_domain = ( isset( $bp->displayed_user->domain ) ) ? $bp->displayed_user->domain : $bp->loggedin_user->domain;159 $user_login = ( isset( $bp->displayed_user->userdata->user_login ) ) ? $bp->displayed_user->userdata->user_login : $bp->loggedin_user->userdata->user_login;162 $user_domain = ( !empty( $bp->displayed_user->domain ) ) ? $bp->displayed_user->domain : $bp->loggedin_user->domain; 163 $user_login = ( !empty( $bp->displayed_user->userdata->user_login ) ) ? $bp->displayed_user->userdata->user_login : $bp->loggedin_user->userdata->user_login; 160 164 $profile_link = trailingslashit( $user_domain . $bp->profile->slug ); 161 165 -
trunk/bp-messages/bp-messages-loader.php
r4211 r4281 93 93 global $bp; 94 94 95 // Stop if there is no user displayed 96 if ( empty( $bp->displayed_user->id ) ) 97 return; 98 95 99 if ( $count = messages_get_unread_count() ) 96 100 $name = sprintf( __( 'Messages <strong>(%s)</strong>', 'buddypress' ), $count ); -
trunk/bp-settings/bp-settings-loader.php
r4211 r4281 68 68 function _setup_nav() { 69 69 global $bp; 70 71 // Stop if there is no user displayed 72 if ( empty( $bp->displayed_user->id ) ) 73 return; 70 74 71 75 // Add the settings navigation item -
trunk/bp-xprofile/bp-xprofile-loader.php
r4273 r4281 111 111 global $bp; 112 112 113 // Stop if there is no user displayed 114 if ( empty( $bp->displayed_user->id ) ) 115 return; 116 113 117 // Add 'Profile' to the main navigation 114 118 $main_nav = array(
Note: See TracChangeset
for help on using the changeset viewer.