Skip to:
Content

BuddyPress.org

Changeset 7075


Ignore:
Timestamp:
05/15/2013 06:24:55 PM (11 years ago)
Author:
r-a-y
Message:

Only register legacy forum activity actions if the legacy forums are active.

Fixes #4979. Props imath.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7/bp-groups/bp-groups-activity.php

    r6342 r7075  
    1717    global $bp;
    1818
    19     if ( !bp_is_active( 'activity' ) )
     19    if ( ! bp_is_active( 'activity' ) ) {
    2020        return false;
     21    }
    2122
    2223    bp_activity_set_action( $bp->groups->id, 'created_group',   __( 'Created a group',       'buddypress' ) );
    2324    bp_activity_set_action( $bp->groups->id, 'joined_group',    __( 'Joined a group',        'buddypress' ) );
    24     bp_activity_set_action( $bp->groups->id, 'new_forum_topic', __( 'New group forum topic', 'buddypress' ) );
    25     bp_activity_set_action( $bp->groups->id, 'new_forum_post',  __( 'New group forum post',  'buddypress' ) );
     25
     26    // These actions are for the legacy forums
     27    // Since the bbPress plugin also shares the same 'forums' identifier, we also
     28    // check for the legacy forums loader class to be extra cautious
     29    if ( bp_is_active( 'forums' ) && class_exists( 'BP_Forums_Component' ) ) {
     30        bp_activity_set_action( $bp->groups->id, 'new_forum_topic', __( 'New group forum topic', 'buddypress' ) );
     31        bp_activity_set_action( $bp->groups->id, 'new_forum_post',  __( 'New group forum post',  'buddypress' ) );
     32    }
    2633
    2734    do_action( 'groups_register_activity_actions' );
Note: See TracChangeset for help on using the changeset viewer.