WP_Comment::__construct( WP_Comment $comment )

Constructor.


Description

Populates properties with object vars.


Top ↑

Parameters

$comment WP_Comment Required
Comment object.

Top ↑

Source

File: wp-includes/class-wp-comment.php. View all references

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


Top ↑

Changelog

Changelog
Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.