Filters the WordPress roles whose users are eligible to be contact owners. Use this to add a custom role to the owner selector.
apply_filters( 'groundhogg/owner_roles', $roles );
You will receive the current array of role slugs.
Example
add_filter( 'groundhogg/owner_roles', 'my_extension_add_owner_role' );
/**
* Allow users with the "sales_rep" role to be contact owners.
*
* @param array $roles
*
* @return array
*/
function my_extension_add_owner_role( $roles ) {
$roles[] = 'sales_rep';
return $roles;
}
Was this helpful?
Let us know if this document answered your question. Thatβs the only way we can improve.
