WP_Post::__construct

Advertisement

Summery Summery

Constructor.

Syntax Syntax

WP_Post::__construct( WP_Post|object $post )

Parameters Parameters

$post

(WP_Post|object) (Required) Post object.

Source Source

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

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

Advertisement

Changelog Changelog

Changelog
Version Description
3.5.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.