This documentation describes unreleased changes on the main branch.

Capability

Class. It implements Permission.

use Saij\WpAppFramework\Rest\Permission\Capability;

The current user needs the capability, checked with current_user_can().

Constructor

new Capability(string $capability)
ParameterTypeDefaultDescription
capabilitystringrequiredThe capability the current user needs, e.g. edit_posts; checked with current_user_can() without further arguments.

Methods

getCapability()

getCapability(): string

The capability the current user needs.

Returns string