WordPress at a glance
function is not described

WP_Role::__construct() public WP 2.0.0

Constructor - Set up object properties.

The list of capabilities must have the key as the name of the capability and the value a boolean of whether it is granted to the role.

{} It's a method of the class: WP_Role{}

No Hooks.

Return

Null. Nothing.

Usage

global $wp_role;
$wp_role->__construct( $role, $capabilities );
$role(string) (required)
Role name.
$capabilities(true/false[]) (required)
Array of key/value pairs where keys represent a capability name and boolean values represent whether the role has that capability.

Changelog

Since 2.0.0 Introduced.

Code of WP_Role::__construct() WP 5.5.1

<?php
public function __construct( $role, $capabilities ) {
	$this->name         = $role;
	$this->capabilities = $capabilities;
}