close

WP_Post::__construct( object $post )

In this article

Constructor.

Parameters

$postobjectrequired
Post object.

Source

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

Changelog

VersionDescription
3.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.