Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/12/2011 09:25:51 PM (11 years ago)
Author:
djpaul
Message:

Swap function_exists checks to bp_is_active. Fixes #2718

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-forums.php

    r3903 r4137  
    2626    $group = new BP_Groups_Group( $group_id );
    2727
    28     if ( empty( $group->enable_forum ) || !function_exists( 'bp_forums_setup' ) )
     28    if ( empty( $group->enable_forum ) || !bp_is_active( 'forums' ) )
    2929        return false;
    3030
     
    120120    if ( $topic = bp_forums_update_topic( array( 'topic_title' => $topic_title, 'topic_text' => $topic_text, 'topic_id' => $topic_id ) ) ) {
    121121        // Update the activity stream item
    122         if ( function_exists( 'bp_activity_delete_by_item_id' ) )
     122        if ( bp_is_active( 'activity' ) )
    123123            bp_activity_delete_by_item_id( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $topic_id, 'component' => $bp->groups->id, 'type' => 'new_forum_topic' ) );
    124124
     
    164164
    165165        // Fetch an existing entry and update if one exists.
    166         if ( function_exists( 'bp_activity_get_activity_id' ) )
     166        if ( bp_is_active( 'activity' ) )
    167167            $id = bp_activity_get_activity_id( array( 'user_id' => $post->poster_id, 'component' => $bp->groups->id, 'type' => 'new_forum_post', 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $post_id ) );
    168168
     
    195195
    196196        // Delete the activity stream item
    197         if ( function_exists( 'bp_activity_delete' ) )
     197        if ( bp_is_active( 'activity' ) )
    198198            bp_activity_delete( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $topic_id, 'component' => $bp->groups->id, 'type' => 'new_forum_topic' ) );
    199199
     
    213213
    214214        // Delete the activity stream item
    215         if ( function_exists( 'bp_activity_delete' ) )
     215        if ( bp_is_active( 'activity' ) )
    216216            bp_activity_delete( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $post_id, 'component' => $bp->groups->id, 'type' => 'new_forum_post' ) );
    217217
Note: See TracChangeset for help on using the changeset viewer.