WP_Site::__construct()
Creates a new WP_Site object.
Will populate object properties from the object provided and assign other default properties based on that information.
Method of the class: WP_Site{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_Site = new WP_Site(); $WP_Site->__construct( $site );
- $site(WP_Site|object) (required)
- A site object.
Changelog
Since 4.5.0 | Introduced. |
WP_Site::__construct() WP Site:: construct code WP 6.7.1
public function __construct( $site ) { foreach ( get_object_vars( $site ) as $key => $value ) { $this->$key = $value; } }