WP_Roles::get_names() WordPress Method
The WP_Roles::get_names() method is used to retrieve a list of all roles defined in the WordPress installation. This includes both the default roles defined by WordPress as well as any custom roles that have been created by a plugin or theme.
WP_Roles::get_names() #
Retrieve list of role names.
Return
(string[]) List of role names.
Source
File: wp-includes/class-wp-roles.php
public function get_names() { return $this->role_names; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |