WP_Post::__construct( WP_Post|object $post )

In this article

Constructor.

Parameters

$postWP_Post|objectrequired
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.