BP_Activity_Activity::get_child_comments( int $parent_id )

Get child comments of an activity or activity comment.


Description Description


Parameters Parameters

$parent_id

(Required) ID of an activity or activity comment.


Top ↑

Return Return

(object) Numerically indexed array of child comments.


Top ↑

Source 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 ) );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.