Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/07/2023 05:40:25 PM (11 months ago)
Author:
imath
Message:

Use the bp_displayed_user_url() function the right way

Use the bp_members_get_path_chunks() helper function to build the arguments array expected by bp_displayed_user_url() at 8 places where a regular array of slugs were wrongly used during the BP Rewrites merge process (#4954).

Closes https://github.com/buddypress/buddypress/pull/98
Fixes #8884

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/template-tags.php

    r13471 r13472  
    27142714
    27152715                if ( $retval ) {
    2716                     $bp_nouveau->activity->current_rss_feed['link'] = bp_displayed_user_url( array( bp_nouveau_get_component_slug( 'activity' ), 'feed' ) );
     2716                    $bp_nouveau->activity->current_rss_feed['link'] = bp_displayed_user_url( bp_members_get_path_chunks( array( bp_nouveau_get_component_slug( 'activity' ), 'feed' ) ) );
    27172717                }
    27182718
     
    27212721
    27222722                    if ( $retval ) {
    2723                         $bp_nouveau->activity->current_rss_feed['link'] = bp_displayed_user_url( array( bp_nouveau_get_component_slug( 'activity' ), bp_nouveau_get_component_slug( 'friends' ), 'feed' ) );
     2723                        $bp_nouveau->activity->current_rss_feed['link'] = bp_displayed_user_url( bp_members_get_path_chunks( array( bp_nouveau_get_component_slug( 'activity' ), bp_nouveau_get_component_slug( 'friends' ), 'feed' ) ) );
    27242724                    }
    27252725                } elseif ( bp_is_active( 'groups' ) && bp_is_current_action( bp_nouveau_get_component_slug( 'groups' ) ) ) {
     
    27272727
    27282728                    if ( $retval ) {
    2729                         $bp_nouveau->activity->current_rss_feed['link'] = bp_displayed_user_url( array( bp_nouveau_get_component_slug( 'activity' ), bp_nouveau_get_component_slug( 'groups' ), 'feed' ) );
     2729                        $bp_nouveau->activity->current_rss_feed['link'] = bp_displayed_user_url( bp_members_get_path_chunks( array( bp_nouveau_get_component_slug( 'activity' ), bp_nouveau_get_component_slug( 'groups' ), 'feed' ) ) );
    27302730                    }
    27312731                } elseif ( bp_activity_do_mentions() && bp_is_current_action( 'mentions' ) ) {
     
    27332733
    27342734                    if ( $retval ) {
    2735                         $bp_nouveau->activity->current_rss_feed['link'] = bp_displayed_user_url( array( bp_nouveau_get_component_slug( 'activity' ), 'mentions', 'feed' ) );
     2735                        $bp_nouveau->activity->current_rss_feed['link'] = bp_displayed_user_url( bp_members_get_path_chunks( array( bp_nouveau_get_component_slug( 'activity' ), 'mentions', 'feed' ) ) );
    27362736                    }
    27372737                } elseif ( bp_activity_can_favorite() && bp_is_current_action( 'favorites' ) ) {
     
    27392739
    27402740                    if ( $retval ) {
    2741                         $bp_nouveau->activity->current_rss_feed['link'] = bp_displayed_user_url( array( bp_nouveau_get_component_slug( 'activity' ), 'favorites', 'feed' ) );
     2741                        $bp_nouveau->activity->current_rss_feed['link'] = bp_displayed_user_url( bp_members_get_path_chunks( array( bp_nouveau_get_component_slug( 'activity' ), 'favorites', 'feed' ) ) );
    27422742                    }
    27432743                }
Note: See TracChangeset for help on using the changeset viewer.