Primary

Filters

Administrative Back End

groups_add_menu_page_function

Determines the function that outputs the Groups menu page.

Parameters

$function string function name

Returns

– string function name

groups_add_submenu_page_function

Invoked when a Groups submenu page is added, determines the function that renders the submenu page.

Parameters

$function string function name

Returns

– string function name

groups_footer

Determines the footer content.

Parameters

$footer string content

Returns

– string footer content

Groups and Capabilities

groups_group_can

Determines whether a group has a certain capability.

Parameters

$result boolean current evaluation result, true if the group has the capability, false otherwise
$group Groups_Group the group object
$capability string the capability ID or name that is queried for the group

Returns

– boolean true if the group has the capability, false otherwise

Users and Capabilities

groups_user_can

Whether the user has a certain capability.

Parameters

$result boolean current result; true if the user has the capability, false otherwise
$user Groups_User the Groups User object
$capability string the capability ID or name

Returns

– boolean true if the user has the capability, otherwise false

groups_user_add_role_capabilities

This filter allows to reduce the capabilities that are taken into account when evaluation the user capability set during cache initialization. By default, capabilities that are assigned to the user’s role(s) are added. If false is returned for this filter, they are not added.

Parameters

$value boolean defaults to true, indicating that the user’s role(s) capabilities should also be added to its capability set

Returns

– boolean