role_has_cap

role_has_cap

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

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('role_has_cap') is found 1 times:

  • /wp-includes/class-wp-role.php line 95
    		 *                             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;
    		}