WP_Comment::get_child() WordPress Method
The WP_Comment::get_child() function can be used to get the children of a comment. This function is useful for threaded comments.
WP_Comment::get_child( int $child_id ) #
Get a child comment by ID.
Contents
Parameters
- $child_id
(int)(Required)ID of the child.
Return
(WP_Comment|false) Returns the comment object if found, otherwise false.
Source
File: wp-includes/class-wp-comment.php
public function get_child( $child_id ) { if ( isset( $this->children[ $child_id ] ) ) { return $this->children[ $child_id ]; } return false; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |