Filters the capabilities array assigned to the contacts permission group. Use this to add or remove granular contact permissions from Groundhogg roles.
apply_filters( 'groundhogg/roles/caps/contacts', $caps );
You will receive the current associative array of capability slugs and their boolean values.
Example
add_filter( 'groundhogg/roles/caps/contacts', 'my_extension_add_contact_cap' );
/**
* Add a custom capability to the contacts permission group.
*
* @param array $caps
*
* @return array
*/
function my_extension_add_contact_cap( $caps ) {
$caps['my_extension_export_contacts'] = true;
return $caps;
}
Was this helpful?
Let us know if this document answered your question. Thatβs the only way we can improve.
