Changeset 8945 for trunk/src/bp-blogs/bp-blogs-functions.php
- Timestamp:
- 08/18/2014 05:32:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-functions.php
r8944 r8945 594 594 595 595 // now update activity meta for post comments... sigh 596 $comment_ids = get_comments( array( 'post_id' => $post->ID, 'fields' => 'ids' ) ); 597 598 if ( ! empty( $comment_ids ) ) { 596 add_filter( 'comments_clauses', 'bp_blogs_comments_clauses_select_by_id' ); 597 $comments = get_comments( array( 'post_id' => $post->ID ) ); 598 remove_filter( 'comments_clauses', 'bp_blogs_comments_clauses_select_by_id' ); 599 600 if ( ! empty( $comments ) ) { 599 601 $activity_ids = array(); 602 $comment_ids = wp_list_pluck( $comments, 'comment_ID' ); 600 603 601 604 // setup activity args … … 608 611 // query for old-style "new_blog_comment" activity items 609 612 $args['filter'] = array( 610 'object' => buddypress()->blogs->id,611 'action' => 'new_blog_comment',613 'object' => buddypress()->blogs->id, 614 'action' => 'new_blog_comment', 612 615 'secondary_id' => implode( ',', $comment_ids ), 613 616 ); … … 640 643 } 641 644 642 unset( $activities, $activity_ids, $comment_ids );645 unset( $activities, $activity_ids, $comment_ids, $comments ); 643 646 } 644 647 }
Note: See TracChangeset
for help on using the changeset viewer.