- Timestamp:
- 06/18/2023 04:11:04 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/activity/functions.php
r13461 r13503 220 220 ) 221 221 ); 222 $activity_slug = bp_nouveau_get_component_slug( 'activity' ); 223 $path_chunks = array( 224 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug, $activity_slug ), 225 ); 222 $activity_slug = bp_nouveau_get_component_slug( 'activity' ); 226 223 227 224 // If the user has favorite create a nav item 228 225 if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) { 229 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_favorites', 'favorites' );230 231 226 $nav_items['favorites'] = array( 232 227 'component' => 'activity', 233 228 'slug' => 'favorites', // slug is used because BP_Core_Nav requires it, but it's the scope 234 229 'li_class' => array(), 235 'link' => bp_loggedin_user_url( $path_chunks),230 'link' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $activity_slug, 'favorites' ) ) ), 236 231 'text' => __( 'My Favorites', 'buddypress' ), 237 232 'count' => false, … … 242 237 // The friends component is active and user has friends 243 238 if ( bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) { 244 $friends_slug = bp_nouveau_get_component_slug( 'friends' );245 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_' . $friends_slug, $friends_slug );246 247 239 $nav_items['friends'] = array( 248 240 'component' => 'activity', 249 241 'slug' => 'friends', // slug is used because BP_Core_Nav requires it, but it's the scope 250 242 'li_class' => array( 'dynamic' ), 251 'link' => bp_loggedin_user_url( $path_chunks),243 'link' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $activity_slug, bp_nouveau_get_component_slug( 'friends' ) ) ) ), 252 244 'text' => __( 'My Friends', 'buddypress' ), 253 245 'count' => '', … … 258 250 // The groups component is active and user has groups 259 251 if ( bp_is_active( 'groups' ) && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) { 260 $groups_slug = bp_nouveau_get_component_slug( 'groups' );261 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_' . $groups_slug, $groups_slug );262 263 252 $nav_items['groups'] = array( 264 253 'component' => 'activity', 265 254 'slug' => 'groups', // slug is used because BP_Core_Nav requires it, but it's the scope 266 255 'li_class' => array( 'dynamic' ), 267 'link' => bp_loggedin_user_url( $path_chunks),256 'link' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $activity_slug, bp_nouveau_get_component_slug( 'groups' ) ) ) ), 268 257 'text' => __( 'My Groups', 'buddypress' ), 269 258 'count' => '', … … 274 263 // Mentions are allowed 275 264 if ( bp_activity_do_mentions() ) { 276 $deprecated_hooks[] = array( 'bp_before_activity_type_tab_mentions', 'activity', 36 ); 277 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_mentions', 'mentions' ); 278 279 $count = ''; 265 $deprecated_hooks[] = array( 'bp_before_activity_type_tab_mentions', 'activity', 36 ); 266 $count = ''; 267 280 268 if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) { 281 269 $count = bp_get_total_mention_count_for_user( bp_loggedin_user_id() ); … … 286 274 'slug' => 'mentions', // slug is used because BP_Core_Nav requires it, but it's the scope 287 275 'li_class' => array( 'dynamic' ), 288 'link' => bp_loggedin_user_url( $path_chunks),276 'link' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $activity_slug, 'mentions' ) ) ), 289 277 'text' => __( 'Mentions', 'buddypress' ), 290 278 'count' => $count,
Note: See TracChangeset
for help on using the changeset viewer.