WordPress at a glance
function is not described

WP_Comment::get_child() public WP 4.4.0

Get a child comment by ID.

{} It's a method of the class: WP_Comment{}

No Hooks.


WP_Comment|false. Returns the comment object if found, otherwise false.


$WP_Comment = new WP_Comment();
$WP_Comment->get_child( $child_id );
$child_id(int) (required)
ID of the child.


Since 4.4.0 Introduced.

Code of WP_Comment::get_child() WP 5.7.2

public function get_child( $child_id ) {
	if ( isset( $this->children[ $child_id ] ) ) {
		return $this->children[ $child_id ];

	return false;