Skip to:
Content

BuddyPress.org

Changeset 3318


Ignore:
Timestamp:
10/27/2010 04:00:19 PM (14 years ago)
Author:
boonebgorges
Message:

Filters the output of bp_activity_can_comment(). Fixes #2454

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-templatetags.php

    r3300 r3318  
    896896    global $activities_template, $bp;
    897897
     898    $can_comment = true;
     899
    898900    if ( false === $activities_template->disable_blogforum_replies || (int)$activities_template->disable_blogforum_replies ) {
    899901        if ( 'new_blog_post' == bp_get_activity_action_name() || 'new_blog_comment' == bp_get_activity_action_name() || 'new_forum_topic' == bp_get_activity_action_name() || 'new_forum_post' == bp_get_activity_action_name() )
    900             return false;
     902            $can_comment = false;
    901903    }
    902904
    903905    if ( 'activity_comment' == bp_get_activity_action_name() )
    904         return false;
    905 
    906     return true;
     906        $can_comment = false;
     907
     908    return apply_filters( 'bp_activity_can_comment', $can_comment );
    907909}
    908910
Note: See TracChangeset for help on using the changeset viewer.