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/template-tags.php

    r12570 r12908  
    450450                        ),
    451451                        'button_attr'       => array(
    452                             'href'  => trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() ) . 'compose?r=' . bp_core_get_username( $user_id ),
     452                            'href'  => trailingslashit( bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'messages' ) ) . 'compose?r=' . bp_core_get_username( $user_id ),
    453453                            'id'    => false,
    454454                            'class' => $button_args['link_class'],
    455455                            'rel'   => '',
    456456                            'title' => '',
    457                             ),
     457                        ),
    458458                    );
    459459
Note: See TracChangeset for help on using the changeset viewer.