WP_Roles::__construct( int $site_id = null )

In this article

Constructor.

Parameters

$site_idintoptional
Site ID to initialize roles for. Default is the current site.

Default:null

Source

public function __construct( $site_id = null ) {
	global $wp_user_roles;

	$this->use_db = empty( $wp_user_roles );

	$this->for_site( $site_id );
}

Changelog

VersionDescription
4.9.0The $site_id argument was added.
2.0.0Introduced.

User Contributed Notes

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