bp_activity_update_comment_privacy( BP_Activity_Activity $activity )
Update activity comment privacy with parent activity privacy update.
Description
Parameters
- $activity
-
(Required) Activity object
Source
File: bp-activity/bp-activity-filters.php
function bp_activity_update_comment_privacy( $activity ) { $activity_comments = bp_activity_get_specific( array( 'activity_ids' => array( $activity->id ), 'display_comments' => true, ) ); if ( ! empty( $activity_comments ) && !empty( $activity_comments['activities'] ) && isset( $activity_comments['activities'][0]->children )) { $children = $activity_comments['activities'][0]->children; if ( ! empty( $children ) ) { foreach ( $children as $comment ) { bp_activity_comment_privacy_update( $comment, $activity->privacy ); } } } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.4.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.