New and updated in 2.0.0
-
Updates the maximum user level for the user.
-
methodWP_User::add_cap()
Adds capability and grant or deny access to capability.
-
methodWP_User::remove_cap()
Removes capability from user.
-
methodWP_User::has_cap()
Returns whether the user has the specified capability.
-
hookuser_has_cap
Dynamically filter a user’s capabilities.
-
Converts numeric level to level capability name.
-
methodWP_User::get_role_caps()
Retrieves all of the capabilities of the user’s roles, and merges them with individual user capabilities.
-
methodWP_User::add_role()
Adds role to user.
-
methodWP_User::remove_role()
Removes role from user.
-
methodWP_User::set_role()
Sets the role of the user.
-
Chooses the maximum level the user has.
-
methodWP_Role::add_cap()
Assign role a capability.
-
methodWP_Role::remove_cap()
Removes a capability from a role.
-
methodWP_Role::has_cap()
Determines whether the role has the given capability.
-
hookrole_has_cap
Filters which capabilities a role has.
-
methodWP_Roles::add_cap()
Adds a capability to role.
-
classWP_User
Core class used to implement the WP_User object.
-
methodWP_Roles::remove_cap()
Removes a capability from role.
-
methodWP_User::__construct()
Constructor.
-
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_Role
Core class used to extend the user roles API.
-
methodWP_Role::__construct()
Constructor – Set up object properties.
-
methodWP_Roles::__construct()
Constructor.
-
methodWP_Roles::add_role()
Adds a role name with capabilities to the list.
-
methodWP_Roles::remove_role()
Removes a role by name.
-
functioncurrent_user_can()
Returns whether the current user has the specified capability.
-
functionget_role()
Retrieves role object.
-
functionadd_role()
Adds a role, if it does not exist.