role_has_cap

role_has_cap

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-5.4.1

apply_filters('role_has_cap') is found 1 times:

  • /wp-includes/class-wp-role.php line 102
    		 * @param bool[] $capabilities Associative array of capabilities for the role.
    		 * @param string $cap          Capability name.
    		 * @param string $name         Role name.
    		 */
    		$capabilities = apply_filters( 'role_has_cap', $this->capabilities, $cap, $this->name );
    
    		if ( ! empty( $capabilities[ $cap ] ) ) {
    			return $capabilities[ $cap ];
    		} else {
    			return false;
    		}