Skip to:
Content

BuddyPress.org

Changeset 4971


Ignore:
Timestamp:
08/12/2011 08:53:12 PM (13 years ago)
Author:
boonebgorges
Message:

Adds post_type whitelist filters to bp_blogs_record_post() and bp_blogs_record_comment(). Fixes #3455. Props DJPaul

File:
1 edited

Legend:

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

    r4965 r4971  
    166166
    167167    // Don't record this if it's not a post
    168     if ( 'post' != $post->post_type )
     168    if ( !in_array( $post->post_type, apply_filters( 'bp_blogs_record_post_post_types', array( 'post' ) ) ) )
    169169        return false;
    170170
     
    248248
    249249    // Don't record activity if the comment's associated post isn't a WordPress Post
    250     if ( 'post' != $recorded_comment->post->post_type )
     250    if ( !in_array( $recorded_comment->post->post_type, apply_filters( 'bp_blogs_record_comment_post_types', array( 'post' ) ) ) )
    251251        return false;
    252252
Note: See TracChangeset for help on using the changeset viewer.