WP_Comment::add_child
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 ): void;
- $child(WP_Comment) (обязательный)
- Child comment.
Список изменений
| С версии 4.4.0 | Введена. |
Код WP_Comment::add_child() WP Comment::add child WP 7.1
public function add_child( WP_Comment $child ): void {
$this->children[ (int) $child->comment_ID ] = $child;
}