Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/18/2014 05:57:30 PM (10 years ago)
Author:
boonebgorges
Message:

Don't register the Friends widget on non-root blogs

This widget only works in the context of displayed users, which do not exist
outside of root blogs.

Fixes #5512

Props williamsba1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-widgets.php

    r7756 r8299  
    1818function bp_friends_register_widgets() {
    1919    if ( ! bp_is_active( 'friends' ) ) {
     20        return;
     21    }
     22
     23    // The Friends widget works only when looking an a displayed user,
     24    // and the concept of "displayed user" doesn't exist on non-root blogs,
     25    // so we don't register the widget there.
     26    if ( ! bp_is_root_blog() ) {
    2027        return;
    2128    }
Note: See TracChangeset for help on using the changeset viewer.