Constructor.
Description
Populates properties with object vars.
Parameters
$commentWP_Commentrequired- Comment object.
Source
public function __construct( $comment ) {
foreach ( get_object_vars( $comment ) as $key => $value ) {
$this->$key = $value;
}
}
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.