Uses
Uses | Description |
---|---|
wp-includes/class-wp-user.php: WP_User::for_site() | Sets the site to operate on. Defaults to the current site. |
Sets up object properties, including capabilities.
(object) (Required) User DB row object.
(int) (Optional) The site ID to initialize for.
Default value: ''
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 ); }
Version | Description |
---|---|
3.3.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_user/init