CARVIEW |
Select Language
HTTP/2 200
server: nginx
date: Sun, 12 Oct 2025 05:07:52 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
wp-includes/class-wp-roles.php | Developer.WordPress.org
File: wp-includes/class-wp-roles.php
-
methodWP_Roles::get_site_id()
Gets the ID of the site for which roles are currently initialized.
-
Gets the available roles data.
-
methodWP_Roles::init_roles()
Initializes all of the available roles.
-
methodWP_Roles::for_site()
Sets the site to operate on. Defaults to the current site.
-
hookwp_roles_init
Fires after the roles have been initialized, allowing plugins to add their own roles.
-
methodWP_Roles::__call()
Makes private/protected methods readable for backward compatibility.
-
methodWP_Roles::add_cap()
Adds a capability to role.
-
methodWP_Roles::remove_cap()
Removes a capability from role.
-
methodWP_Roles::get_role()
Retrieves a role object by name.
-
methodWP_Roles::get_names()
Retrieves a list of role names.
-
methodWP_Roles::is_role()
Determines whether a role name is currently in the list of available roles.
-
classWP_Roles
Core class used to implement a user roles API.
-
methodWP_Roles::__construct()
Constructor.
-
methodWP_Roles::_init()
Sets up the object properties.
-
methodWP_Roles::reinit()
Reinitializes the object.
-
methodWP_Roles::add_role()
Adds a role name with capabilities to the list.
-
methodWP_Roles::remove_role()
Removes a role by name.