W3cubDocs

/WordPress

WP_Comment::add_child( WP_Comment $child )

Adds a child to the comment.

Description

Used by WP_Comment_Query when bulk-filling descendants.

Parameters

$childWP_Commentrequired
Child comment.

Source

public function add_child( WP_Comment $child ) {
	$this->children[ $child->comment_ID ] = $child;
}

Changelog

Version Description
4.4.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_comment/add_child