WP_Comment::__construct()
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() WP Comment:: construct code WP 6.4.3
public function __construct( $comment ) { foreach ( get_object_vars( $comment ) as $key => $value ) { $this->$key = $value; } }