WP_Roles::is_role( string $role )

Whether role name is currently in the list of available roles.


Parameters Parameters

$role

(string) (Required) Role name to look up.


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: wp-includes/class-wp-roles.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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