WP_Comment::add_child() WordPress Method
The WP_Comment::add_child() function can be used to add a child comment to a parent comment. This function accepts two parameters: the child comment object and the parent comment object.
WP_Comment::add_child( WP_Comment $child ) #
Add a child to the comment.
Description
Used by WP_Comment_Query when bulk-filling descendants.
Parameters
- $child
- (WP_Comment)(Required)Child comment. 
Source
File: wp-includes/class-wp-comment.php
	public function add_child( WP_Comment $child ) {
		$this->children[ $child->comment_ID ] = $child;
	}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description | 
|---|---|
| 4.4.0 | Introduced. |