Skip to:
Content

BuddyPress.org

Changeset 13024


Ignore:
Timestamp:
07/19/2021 08:46:22 PM (3 years ago)
Author:
imath
Message:

Load Recent Network posts Widget/Block if Activity component is active

Both the widget and block are using an activity loop to fetch recent posts from all public blogs of a multisite network : making sure the Activity Component is active is a required condition.

Fixes #8534

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/classes/class-bp-blogs-component.php

    r13006 r13024  
    138138        if ( bp_is_active( 'activity' ) ) {
    139139            $includes[] = 'activity';
    140         }
    141 
    142         if ( is_multisite() ) {
    143             $includes[] = 'widgets';
    144             $includes[] = 'blocks';
     140
     141            if ( is_multisite() ) {
     142                $includes[] = 'widgets';
     143                $includes[] = 'blocks';
     144            }
    145145        }
    146146
     
    398398        $blocks = array();
    399399
    400         if ( is_multisite() ) {
     400        if ( is_multisite() && bp_is_active( 'activity' ) ) {
    401401            $blocks['bp/recent-posts'] = array(
    402402                'name'               => 'bp/recent-posts',
Note: See TracChangeset for help on using the changeset viewer.