WP_Post::__construct()
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 Post:: construct WP 6.0
public function __construct( $post ) { foreach ( get_object_vars( $post ) as $key => $value ) { $this->$key = $value; } }