- Timestamp:
- 03/27/2023 06:19:06 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/activity/functions.php
r12908 r13442 4 4 * 5 5 * @since 3.0.0 6 * @version 8.0.06 * @version 12.0.0 7 7 */ 8 8 … … 88 88 'avatar_width' => $width, 89 89 'avatar_height' => $height, 90 'user_domain' => bp_loggedin_user_ domain(),90 'user_domain' => bp_loggedin_user_url(), 91 91 'avatar_alt' => sprintf( 92 92 /* translators: %s: member name */ … … 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 226 223 227 // If the user has favorite create a nav item 224 228 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 225 231 $nav_items['favorites'] = array( 226 232 'component' => 'activity', 227 233 'slug' => 'favorites', // slug is used because BP_Core_Nav requires it, but it's the scope 228 234 'li_class' => array(), 229 'link' => bp_loggedin_user_ domain() . bp_nouveau_get_component_slug( 'activity' ) . '/favorites/',235 'link' => bp_loggedin_user_url( $path_chunks ), 230 236 'text' => __( 'My Favorites', 'buddypress' ), 231 237 'count' => false, … … 236 242 // The friends component is active and user has friends 237 243 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 238 247 $nav_items['friends'] = array( 239 248 'component' => 'activity', 240 249 'slug' => 'friends', // slug is used because BP_Core_Nav requires it, but it's the scope 241 250 'li_class' => array( 'dynamic' ), 242 'link' => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/' . bp_nouveau_get_component_slug( 'friends' ) . '/',251 'link' => bp_loggedin_user_url( $path_chunks ), 243 252 'text' => __( 'My Friends', 'buddypress' ), 244 253 'count' => '', … … 249 258 // The groups component is active and user has groups 250 259 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 251 263 $nav_items['groups'] = array( 252 264 'component' => 'activity', 253 265 'slug' => 'groups', // slug is used because BP_Core_Nav requires it, but it's the scope 254 266 'li_class' => array( 'dynamic' ), 255 'link' => bp_loggedin_user_ domain() . bp_nouveau_get_component_slug( 'activity' ) . '/' . bp_nouveau_get_component_slug( 'groups' ) . '/',267 'link' => bp_loggedin_user_url( $path_chunks ), 256 268 'text' => __( 'My Groups', 'buddypress' ), 257 269 'count' => '', … … 262 274 // Mentions are allowed 263 275 if ( bp_activity_do_mentions() ) { 264 $deprecated_hooks[] = array( 'bp_before_activity_type_tab_mentions', 'activity', 36 ); 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' ); 265 278 266 279 $count = ''; … … 273 286 'slug' => 'mentions', // slug is used because BP_Core_Nav requires it, but it's the scope 274 287 'li_class' => array( 'dynamic' ), 275 'link' => bp_loggedin_user_ domain() . bp_nouveau_get_component_slug( 'activity' ) . '/mentions/',288 'link' => bp_loggedin_user_url( $path_chunks ), 276 289 'text' => __( 'Mentions', 'buddypress' ), 277 290 'count' => $count,
Note: See TracChangeset
for help on using the changeset viewer.