WP_Comment::__construct()publicWP 4.4.0

Constructor.

Populates properties with object vars.

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

Хуков нет.

Возвращает

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

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

$WP_Comment = new WP_Comment();
$WP_Comment->__construct( $comment );
$comment(WP_Comment) (обязательный)
Comment object.

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

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

Код WP_Comment::__construct() WP 6.5.2

public function __construct( $comment ) {
	foreach ( get_object_vars( $comment ) as $key => $value ) {
		$this->$key = $value;
	}
}