WP_Comment::add_child()
Adds a child to the comment.
Used by WP_Comment_Query when bulk-filling descendants.
Method of the class: WP_Comment{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_Comment = new WP_Comment(); $WP_Comment->add_child( $child );
- $child(WP_Comment) (required)
- Child comment.
Changelog
Since 4.4.0 | Introduced. |
WP_Comment::add_child() WP Comment::add child code WP 6.8
public function add_child( WP_Comment $child ) { $this->children[ $child->comment_ID ] = $child; }