WebVIEP Plugin

RolesRegistrar

Table of Contents

Methods

ensureRolesExist()  : void
Create roles if missing.
registerRoles()  : void
Hook role registration into WordPress init.
addRole()  : void
Add a single role with default and custom capabilities.
defaultCaps()  : array<string, bool>
Default capabilities granted to all custom roles.

Methods

ensureRolesExist()

Create roles if missing.

public static ensureRolesExist() : void

registerRoles()

Hook role registration into WordPress init.

public static registerRoles() : void

addRole()

Add a single role with default and custom capabilities.

private static addRole(string $role, string $label[, array<string|int, mixed> $caps = [] ]) : void
Parameters
$role : string

Role key.

$label : string

Role label.

$caps : array<string|int, mixed> = []

Additional capabilities.

defaultCaps()

Default capabilities granted to all custom roles.

private static defaultCaps() : array<string, bool>
Return values
array<string, bool>

        
On this page

Search results