role_has_cap

role_has_cap

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('role_has_cap') is found 1 times:

  • /wp-includes/class-wp-role.php line 95
    091
    092
    093
    094
    095
    096
    097
    098
    099
    100
    101
    *                             represent whether the role has that capability.
     * @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;
    }