WP_Roles::__construct( int $site_id = null )
Constructor
Parameters
- $site_id
-
(Optional) Site ID to initialize roles for. Default is the current site.
Default value: null
Source
File: wp-includes/class-wp-roles.php
public function __construct( $site_id = null ) {
global $wp_user_roles;
$this->use_db = empty( $wp_user_roles );
$this->for_site( $site_id );
}
Changelog
Version | Description |
---|---|
WP-4.9.0 | The $site_id argument was added. |
WP-2.0.0 | Introduced. |