Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/02/2014 07:40:26 PM (11 years ago)
Author:
r-a-y
Message:

Blogs: Add check for activity component when recording a post comment.

Previously, if the activity component was disabled and the blogs component
was enabled, if a user posted a blog comment, a WSOD would occur.

This commit fixes this by adding a check for the activity component in
the bp_blogs_record_comment() function.

See #5606 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-functions.php

    r8229 r8343  
    541541 */
    542542function bp_blogs_record_comment( $comment_id, $is_approved = true ) {
     543    // bail if activity component is not active
     544    if ( ! bp_is_active( 'activity' ) ) {
     545        return;
     546    }
     547
    543548    // Get the users comment
    544549    $recorded_comment = get_comment( $comment_id );
Note: See TracChangeset for help on using the changeset viewer.