On this page
WP_Comment::get_child( int $child_id ): WP_Comment|false
Get a child comment by ID.
Parameters
$child_idint 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. View all references
public function get_child( $child_id ) {
if ( isset( $this->children[ $child_id ] ) ) {
return $this->children[ $child_id ];
}
return false;
}
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_comment/get_child