Used By
| Used By | Description |
|---|---|
| wp-includes/class-wp-comment.php: WP_Comment::get_instance() | Retrieves a WP_Comment instance. |
| wp-includes/comment.php: get_comment() | Retrieves comment data given a comment ID or comment object. |
Constructor.
Populates properties with object vars.
(WP_Comment) (Required) Comment object.
File: wp-includes/class-wp-comment.php
public function __construct( $comment ) {
foreach ( get_object_vars( $comment ) as $key => $value ) {
$this->$key = $value;
}
} | Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_comment/__construct