Capabilities can be considered as tasks which users are permitted to perform inside the application. A single user role can perform many capabilities, while a single capability can be performed by many user roles. Typically, we use the term "access control" for handling capabilities in web applications. Let's see how capabilities work inside WordPress.
Understanding user capabilities
Creating your first capability
Capabilities are always associated with user roles and hence we cannot create new capabilities without providing a user role. Let's look at the following code for associating custom capabilities with our member user roles created earlier in the Creating application user roles section:
public function add_application_user_capabilities...