Constructor.
Parameters
$abilitiesWP_Ability|stringrequired- The abilities that this resolver is allowed to execute.
Source
public function __construct( ...$abilities ) {
$this->allowed_abilities = array();
foreach ( $abilities as $ability ) {
if ( $ability instanceof WP_Ability ) {
$this->allowed_abilities[ $ability->get_name() ] = true;
} elseif ( is_string( $ability ) ) {
$this->allowed_abilities[ $ability ] = true;
}
}
}
Changelog
| Version | Description |
|---|---|
| 7.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.