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.


Top ↑

Source

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

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


Top ↑

Changelog

Changelog
VersionDescription
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.