WP_Roles::get_names()publicWP 2.0.0

Retrieves a list of role names.

Method of the class: WP_Roles{}

No Hooks.

Return

String[]. List of role names.

Usage

global $wp_roles;
$wp_roles->get_names();

Changelog

Since 2.0.0 Introduced.

WP_Roles::get_names() code WP 6.1.1

public function get_names() {
	return $this->role_names;
}