function uc_roles_store_status in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_roles/uc_roles.module \uc_roles_store_status()
Implements hook_store_status().
File
- uc_roles/
uc_roles.module, line 552
Code
function uc_roles_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 feature settings</a> under the role assignment settings fieldset.', array(
'!url' => url('admin/store/settings/products/edit/features'),
)),
);
}
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;
}