WordPress at a glance
function is not described

WP_Post::__construct() public WP 3.5.0

Constructor.

{} It's a method of the class: WP_Post{}

No Hooks.

Return

````. Null. Nothing.

Usage

$WP_Post = new WP_Post();
$WP_Post->__construct( $post );
$post(WP_Post|object) (required)
Post object.

Changelog

Since 3.5.0 Introduced.

Code of WP_Post::__construct() WP 5.7

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