function uc_roles_uc_store_status in Ubercart 7.3
Implements hook_uc_store_status().
File
- uc_roles/
uc_roles.module, line 433 - Grants roles upon accepted payment of products.
Code
function uc_roles_uc_store_status() {
$message = array();
$role_choices = _uc_roles_get_choices();
if (empty($role_choices)) {
$message[] = array(
'status' => 'warning',
'title' => t('Roles'),
'desc' => t('There are no product role(s) that can be assigned upon product purchase. Set product roles in the <a href="!url">product settings</a> under the role assignment settings tab.', array(
'!url' => url('admin/store/settings/products'),
)),
);
}
else {
$message[] = array(
'status' => 'ok',
'title' => t('Roles'),
'desc' => t('The role(s) %roles are set to be used with the Role Assignment product feature.', array(
'%roles' => implode(', ', $role_choices),
)),
);
}
return $message;
}