WP_Role::add_cap

SummerySummery

Assign role a capability.

Syntax

WP_Role::add_cap( string $cap, bool $grant = true )

ParametersParameters

$cap

(string) (Required) Capability name.

$grant

(bool) (Optional) Whether role has capability privilege.

Default value: true

SourceSource

File: wp-includes/class-wp-role.php


			

ChangelogChangelog

Changelog
Version Description
2.0.0 Introduced.
Scroll to Top