WordPress at a glance
function is not described

WP_Role::remove_cap() public WP 2.0.0

Removes a capability from a role.

{} It's a method of the class: WP_Role{}

No Hooks.

Return

Null. Nothing.

Usage

global $wp_role;
$wp_role->remove_cap( $cap );
$cap(string) (required)
Capability name.

Changelog

Since 2.0.0 Introduced.

Code of WP_Role::remove_cap() WP 5.5.1

<?php
public function remove_cap( $cap ) {
	unset( $this->capabilities[ $cap ] );
	wp_roles()->remove_cap( $this->name, $cap );
}