Sets up object properties, including capabilities.
Parameters
$dataobjectrequired- User DB row object.
$site_idintoptional- The site ID to initialize for.
Default:
''
Source
public function init( $data, $site_id = '' ) { if ( ! isset( $data->ID ) ) { $data->ID = 0; } $this->data = $data; $this->ID = (int) $data->ID; $this->for_site( $site_id ); } Changelog
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.