apply_filters_ref_array( 'bp_activity_delete_comment_pre', bool $value, int $activity_id, int $comment_id, bool $deleted )

Filters whether BuddyPress should delete an activity comment or not.

Description

You may want to hook into this filter if you want to override this function and handle the deletion of child comments differently. Make sure you return false.

Parameters

$value

(bool) Whether BuddyPress should continue or not.

$activity_id

(int) ID of the root activity item being deleted.

$comment_id

(int) ID of the comment being deleted.

$deleted

(bool) Whether the activity comment has been deleted or not.

Source

File: bp-activity/bp-activity-functions.php

Changelog

Changelog
Version Description
BuddyPress 2.5.0 Add the deleted parameter (passed by reference) BuddyPress 2.5.0 Add the deleted parameter (passed by reference)
BuddyPress 1.2.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.