Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/27/2021 06:59:23 AM (3 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/activity/ajax.php

    r12371 r12908  
    44 *
    55 * @since 3.0.0
    6  * @version 3.1.0
     6 * @version 8.0.0
    77 */
    88
     
    116116            if ( 1 === $fav_count ) {
    117117                $response['directory_tab'] = '<li id="activity-favorites" data-bp-scope="favorites" data-bp-object="activity">
    118                     <a href="' . bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/">
     118                    <a href="' . bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/favorites/">
    119119                        ' . esc_html__( 'My Favorites', 'buddypress' ) . '
    120120                    </a>
Note: See TracChangeset for help on using the changeset viewer.