WP_Roles::is_role( string $role ): bool

In this article

Determines whether a role name is currently in the list of available roles.

Parameters

$rolestringrequired
Role name to look up.

Return

bool

Source

public function is_role( $role ) {
	return isset( $this->role_names[ $role ] );
}

Changelog

VersionDescription
2.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.