WP_Role::__construct( string $role, array $capabilities )
Constructor – Set up object properties.
Description Description
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.
Parameters Parameters
- $role
-
(string) (Required) Role name.
- $capabilities
-
(array) (Required) List of capabilities.
Source Source
File: wp-includes/class-wp-role.php
public function __construct( $role, $capabilities ) { $this->name = $role; $this->capabilities = $capabilities; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |