WP_Comment::__construct( WP_Comment $comment )
Constructor.
Description
Populates properties with object vars.
Parameters
- $comment
-
(Required) Comment object.
Source
File: wp-includes/class-wp-comment.php
public function __construct( $comment ) {
foreach ( get_object_vars( $comment ) as $key => $value ) {
$this->$key = $value;
}
}
Changelog
Version | Description |
---|---|
WP-4.4.0 | Introduced. |