c_ws_plugin__s2member_user_access
public class c_ws_plugin__s2member_user_access
3.5
( 5 Methods ) Method Summary | |
---|---|
public static array | user_access_ccaps(obj $user) Determines Custom Capabilities of a User/Member. |
public static str | user_access_label(obj $user) Determines Access Label for a User/Member. |
public static int | user_access_level(obj $user) Determines Access Level of a User/Member. |
public static str | user_access_role(obj $user) Determines the Access Role of a User/Member. |
public static int | user_access_role_to_level(str $role) Determines Access Level of a specific Role. |
public static array user_access_ccaps(obj $user)
Determines Custom Capabilities of a User/Member.
If $user
is NOT passed in, check the current User/Member.
If $user
IS passed in, this function will check a specific $user
.
Returns an array of Custom Capabilities.
3.5
obj $user - Optional. A WP_User
object. Defaults to the current User. In order to check the current User, you must call this function with no arguments/parameters.
array - Array of Custom Capabilities, or an empty array if they have no Custom Capabilities, or if $user
does not exist, or if no User is currently logged-in.
public static str user_access_label(obj $user)
Determines Access Label for a User/Member.
If $user
is NOT passed in, check the current User/Member.
If $user
IS passed in, this function will check a specific $user
.
3.5
obj $user - Optional. A WP_User
object. Defaults to the current User. In order to check the current User, you must call this function with no arguments/parameters.
str - Access Level Label, empty string if $user
does not exist, or if no User is currently logged-in.
public static int user_access_level(obj $user)
Determines Access Level of a User/Member.
If $user
is NOT passed in, check the current User/Member.
If $user
IS passed in, this function will check a specific $user
.
Returns -1
thru number of configured Levels, according to the Access Level#.
3.5
obj $user - Optional. A WP_User
object. Defaults to the current User. In order to check the current User, you must call this function with no arguments/parameters.
int - Access Level#, -1
if $user
does not exist, or if no User is currently logged-in.
public static str user_access_role(obj $user)
Determines the Access Role of a User/Member.
If $user
is NOT passed in, check the current User/Member.
If $user
IS passed in, this function will check a specific $user
.
Returns their Role ID/Name value.
3.5
obj $user - Optional. A WP_User
object. Defaults to the current User. In order to check the current User, you must call this function with no arguments/parameters.
str - Role ID/Name, or an empty string if they have no Role, or if $user
does not exist, or if no User is currently logged-in.
public static int user_access_role_to_level(str $role)
Determines Access Level of a specific Role.
3.5
str $role - A WordPress® Role ID/Name.
int - Access Level#, -1
if $role
is empty.
User access routines.