WP_User::init( object $data, int $site_id = '' )

Sets up object properties, including capabilities.

Parameters Parameters


(object) (Required) User DB row object.


(int) (Optional) The site ID to initialize for.

Default value: ''

Top ↑

Source Source

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

	public function init( $data, $site_id = '' ) {
		$this->data = $data;
		$this->ID   = (int) $data->ID;

		$this->for_site( $site_id );

Top ↑

Changelog Changelog

Version Description
3.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.