WP_Comment::__construct

Advertisement

Summery Summery

Constructor.

Syntax Syntax

WP_Comment::__construct( WP_Comment $comment )

Description Description

Populates properties with object vars.

Parameters Parameters

$comment

(Required) Comment object.

Source Source

File: wp-includes/class-wp-comment.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Advertisement

Leave a Reply