Skip to:
Content

bbPress.org

Changeset 5846


Ignore:
Timestamp:
07/15/2015 09:39:11 PM (6 years ago)
Author:
johnjamesjacoby
Message:

BuddyPress: Do not filter profile URLs if not on BuddyPress root blog.

This changeset addresses a multisite implementation issue where user profiles would link to invalid URLs when BuddyPress was network activated and bbPress was active on the non-root blog.

Props imath. See #2713.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/extend/buddypress/members.php

    r5770 r5846  
    8787    public function user_profile_url( $user_id ) {
    8888
     89        // Do not filter if not on BuddyPress root blog
     90        if ( ! bp_is_root_blog() ) {
     91            return false;
     92        }
     93
    8994        // Define local variable(s)
    9095        $profile_url    = '';
     
    128133     */
    129134    public function get_favorites_permalink( $url, $user_id ) {
     135
     136        // Do not filter if not on BuddyPress root blog
     137        if ( ! bp_is_root_blog() ) {
     138            return false;
     139        }
     140
    130141        $component_slug = bbpress()->extend->buddypress->slug;
    131142        $url            = trailingslashit( bp_core_get_user_domain( $user_id ) . $component_slug . '/' . bbp_get_user_favorites_slug() );
     
    142153     */
    143154    public function get_subscriptions_permalink( $url, $user_id ) {
     155
     156        // Do not filter if not on BuddyPress root blog
     157        if ( ! bp_is_root_blog() ) {
     158            return false;
     159        }
     160
    144161        $component_slug = bbpress()->extend->buddypress->slug;
    145162        $url            = trailingslashit( bp_core_get_user_domain( $user_id ) . $component_slug . '/' . bbp_get_user_subscriptions_slug() );
Note: See TracChangeset for help on using the changeset viewer.