BP_Activity_Activity::get_child_comments( int $parent_id )
Get child comments of an activity or activity comment.
Description
Parameters
- $parent_id
-
(Required) ID of an activity or activity comment.
Return
(object) Numerically indexed array of child comments.
Source
File: bp-activity/classes/class-bp-activity-activity.php
public static function get_child_comments( $parent_id ) { global $wpdb; $bp = buddypress(); return $wpdb->get_results( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} WHERE type = 'activity_comment' AND secondary_item_id = %d", $parent_id ) ); }
Changelog
Version | Description |
---|---|
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.