get_role_list WordPress Filter Hook

The get_role_list WordPress hook is used to get a list of available roles for the current site. This can be useful for plugins and themes that need to know what roles are available on the site.

apply_filters( 'get_role_list', string[] $role_list, WP_User $user_object ) #

Filters the returned array of translated role names for a user.


Parameters

$role_list

(string[])An array of translated user role names keyed by role.

$user_object

(WP_User)A WP_User object.


Top ↑

Source

File: wp-admin/includes/class-wp-users-list-table.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.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.