diff --git src/bp-activity/bp-activity-functions.php src/bp-activity/bp-activity-functions.php
index 7059500..eaf3fe5 100644
|
|
function bp_activity_post_type_unpublish( $post_id = 0, $post = null ) { |
2202 | 2202 | 'user_id' => false, |
2203 | 2203 | ); |
2204 | 2204 | |
2205 | | $deleted = bp_activity_delete_by_item_id( $delete_activity_args ); |
| 2205 | $deleted = bp_activity_delete( $r ); |
2206 | 2206 | |
2207 | 2207 | /** |
2208 | 2208 | * Fires after the unpublishing for the custom post type. |
… |
… |
function bp_activity_post_type_remove_comment( $comment_id = 0, $activity_post_o |
2450 | 2450 | $deleted = false; |
2451 | 2451 | |
2452 | 2452 | if ( bp_disable_blogforum_comments() ) { |
2453 | | $deleted = bp_activity_delete_by_item_id( array( |
| 2453 | $r = array( |
2454 | 2454 | 'item_id' => get_current_blog_id(), |
2455 | 2455 | 'secondary_item_id' => $comment_id, |
2456 | 2456 | 'component' => $activity_comment_object->component_id, |
2457 | 2457 | 'type' => $activity_comment_object->action_id, |
2458 | 2458 | 'user_id' => false, |
2459 | | ) ); |
| 2459 | ); |
| 2460 | $deleted = bp_activity_delete( $r ); |
2460 | 2461 | } |
2461 | 2462 | |
2462 | 2463 | /** |
diff --git src/bp-blogs/bp-blogs-activity.php src/bp-blogs/bp-blogs-activity.php
index cf7b60a..bff1f72 100644
|
|
function bp_blogs_delete_activity( $args = '' ) { |
515 | 515 | 'secondary_item_id' => false |
516 | 516 | ) ); |
517 | 517 | |
518 | | bp_activity_delete_by_item_id( $r ); |
| 518 | bp_activity_delete( $r ); |
519 | 519 | } |
520 | 520 | |
521 | 521 | /** |
diff --git src/bp-friends/bp-friends-activity.php src/bp-friends/bp-friends-activity.php
index b9508c1..1abbd7f 100644
|
|
function friends_delete_activity( $args ) { |
75 | 75 | if ( ! bp_is_active( 'activity' ) ) { |
76 | 76 | return; |
77 | 77 | } |
78 | | |
79 | | bp_activity_delete_by_item_id( array( |
| 78 | $r = bp_parse_args( $args, array( |
80 | 79 | 'component' => buddypress()->friends->id, |
81 | | 'item_id' => $args['item_id'], |
82 | | 'type' => $args['type'], |
83 | | 'user_id' => $args['user_id'] |
| 80 | 'item_id' => false, |
| 81 | 'type' => false, |
| 82 | 'user_id' => false |
84 | 83 | ) ); |
| 84 | bp_activity_delete( $r ); |
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
diff --git src/bp-groups/bp-groups-activity.php src/bp-groups/bp-groups-activity.php
index d75494c..0d869c3 100644
|
|
add_action( 'groups_details_updated', 'bp_groups_group_details_updated_add_activ |
525 | 525 | */ |
526 | 526 | function bp_groups_delete_group_delete_all_activity( $group_id ) { |
527 | 527 | if ( bp_is_active( 'activity' ) ) { |
528 | | bp_activity_delete_by_item_id( array( |
| 528 | $r = array( |
529 | 529 | 'item_id' => $group_id, |
530 | | 'component' => buddypress()->groups->id |
531 | | ) ); |
| 530 | 'component' => buddypress()->groups->id, |
| 531 | ); |
| 532 | bp_activity_delete( $r ); |
532 | 533 | } |
533 | 534 | } |
534 | 535 | add_action( 'groups_delete_group', 'bp_groups_delete_group_delete_all_activity', 10 ); |
diff --git src/bp-xprofile/bp-xprofile-activity.php src/bp-xprofile/bp-xprofile-activity.php
index 738ad0a..2792444 100644
|
|
function xprofile_delete_activity( $args = '' ) { |
164 | 164 | ), 'xprofile_delete_activity' ); |
165 | 165 | |
166 | 166 | // Delete the activity item. |
167 | | bp_activity_delete_by_item_id( $r ); |
| 167 | bp_activity_delete( $r ); |
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |