WP_Comment::add_child()publicWP 4.4.0

Adds a child to the comment.

Used by WP_Comment_Query when bulk-filling descendants.

Метод класса: WP_Comment{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_Comment = new WP_Comment();
$WP_Comment->add_child( $child );
$child(WP_Comment) (обязательный)
Child comment.

Список изменений

С версии 4.4.0 Введена.

Код WP_Comment::add_child() WP 6.5.2

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