Summery Summery
Constructor – Set up object properties.
Syntax Syntax
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
-
(Required) Role name.
- $capabilities
-
(Required) List of capabilities keyed by the capability name, e.g. array( 'edit_posts' => true, 'delete_posts' => false ).
Source Source
File: wp-includes/class-wp-role.php
*/ public function __construct( $role, $capabilities ) { $this->name = $role; $this->capabilities = $capabilities;
Advertisement
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |