WordPress at a glance
function is not described

WP_Roles::get_names() public WP 2.0.0

Retrieve list of role names.

{} It's a 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.

Code of WP_Roles::get_names() WP 5.7.2

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