Changeset 2644 for trunk/bp-activity.php
- Timestamp:
- 02/10/2010 03:15:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity.php
r2636 r2644 687 687 * The action passes one parameter that is a single activity ID or an 688 688 * array of activity IDs depending on the number deleted. 689 * 690 * If you are deleting an activity comment please use bp_activity_delete_comment(); 689 691 */ 690 692 … … 755 757 /* End deprecation */ 756 758 759 function bp_activity_delete_comment( $activity_id, $comment_id ) { 760 /* Recursively delete all children of this comment. */ 761 if ( $children = BP_Activity_Activity::get_child_comments( $comment_id ) ) { 762 foreach( (array)$children as $child ) 763 bp_activity_delete_comment( $activity_id, $child->id ); 764 } 765 bp_activity_delete( array( 'secondary_item_id' => $comment_id, 'type' => 'activity_comment', 'item_id' => $activity_id ) ); 766 767 /* Delete the actual comment */ 768 if ( !bp_activity_delete( array( 'id' => $comment_id, 'type' => 'activity_comment' ) ) ) 769 return false; 770 771 /* Recalculate the comment tree */ 772 BP_Activity_Activity::rebuild_activity_comment_tree( $activity_id ); 773 774 return true; 775 } 776 757 777 function bp_activity_get_permalink( $activity_id, $activity_obj = false ) { 758 778 global $bp;
Note: See TracChangeset
for help on using the changeset viewer.