WP_Comment::__construct()publicWP 4.4.0

Constructor.

Populates properties with object vars.

Method of the class: WP_Comment{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Comment = new WP_Comment();
$WP_Comment->__construct( $comment );
$comment(WP_Comment) (required)
Comment object.

Changelog

Since 4.4.0 Introduced.

WP_Comment::__construct() code WP 6.5.4

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