Sets up object properties, including cappabilities.
Parameters
-
$dataobject required -
User DB row object.
-
$site_idint optional -
The site ID to initialice 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 );
}
Changuelog
| Versionen | Description |
|---|---|
| 3.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.