Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/27/2021 06:59:23 AM (4 years ago)
Author:
imath
Message:

BP Nouveau: introduce a function to get active component slugs

bp_nouveau_get_component_slug() accepts the component's ID as an argument and uses the bp_get_{$component_id}_slug() corresponding function to get its slug only if the component is active.

Replace all occurences of bp_get_{$component_id}_slug() by bp_nouveau_get_component_slug( $component_id ) to prevent errors.

Fixes #8464

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/members/functions.php

    r12647 r12908  
    5959                'slug'      => 'personal', // slug is used because BP_Core_Nav requires it, but it's the scope
    6060                'li_class'  => array(),
    61                 'link'      => bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/',
     61                'link'      => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'friends' ) . '/my-friends/',
    6262                'text'      => __( 'My Friends', 'buddypress' ),
    6363                'count'     => bp_get_total_friend_count( bp_loggedin_user_id() ),
Note: See TracChangeset for help on using the changeset viewer.