Changeset 6622 for trunk/bp-xprofile/bp-xprofile-loader.php
- Timestamp:
- 12/10/2012 06:47:31 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile/bp-xprofile-loader.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-loader.php
r6585 r6622 160 160 ); 161 161 162 $profile_link = trailingslashit( bp_loggedin_user_domain() . $this->slug ); 162 // Determine user to use 163 if ( bp_displayed_user_domain() ) { 164 $user_domain = bp_displayed_user_domain(); 165 } elseif ( bp_loggedin_user_domain() ) { 166 $user_domain = bp_loggedin_user_domain(); 167 } else { 168 return; 169 } 170 171 $profile_link = trailingslashit( $user_domain . $this->slug ); 163 172 164 173 // Add the subnav items to the profile … … 172 181 ); 173 182 174 if ( bp_is_my_profile() ) {175 // Edit Profile176 $sub_nav[] = array(177 'name' => __( 'Edit', 'buddypress' ),178 'slug' => 'edit',179 'parent_url' => $profile_link,180 'parent_slug' => $this->slug,181 'screen_function' => 'xprofile_screen_edit_profile',182 'position' => 20183 );184 185 // Change Avatar186 $sub_nav[] = array(187 'name' => __( 'Change Avatar', 'buddypress' ),188 'slug' => 'change-avatar',189 'parent_url' => $profile_link,190 'parent_slug' => $this->slug,191 'screen_function' => 'xprofile_screen_change_avatar',192 'position' => 30193 );194 }183 // Edit Profile 184 $sub_nav[] = array( 185 'name' => __( 'Edit', 'buddypress' ), 186 'slug' => 'edit', 187 'parent_url' => $profile_link, 188 'parent_slug' => $this->slug, 189 'screen_function' => 'xprofile_screen_edit_profile', 190 'position' => 20, 191 'user_has_access' => bp_core_can_edit_settings() 192 ); 193 194 // Change Avatar 195 $sub_nav[] = array( 196 'name' => __( 'Change Avatar', 'buddypress' ), 197 'slug' => 'change-avatar', 198 'parent_url' => $profile_link, 199 'parent_slug' => $this->slug, 200 'screen_function' => 'xprofile_screen_change_avatar', 201 'position' => 30, 202 'user_has_access' => bp_core_can_edit_settings() 203 ); 195 204 196 205 parent::setup_nav( $main_nav, $sub_nav );
Note: See TracChangeset
for help on using the changeset viewer.