You are here

function notifications_format_title_description in Notifications 7

Same name and namespace in other branches
  1. 6.4 notifications.module \notifications_format_title_description()

Array item callback to format title and description

1 string reference to 'notifications_format_title_description'
notifications_admin_subscriptions_settings in ./notifications.admin.inc
Subscription settings

File

./notifications.module, line 946
Notifications module

Code

function notifications_format_title_description($item) {
  if (is_object($item)) {
    $title = check_plain($item
      ->get_title());
    $description = check_plain($item
      ->get_description());
  }
  elseif (is_array($item)) {
    $title = isset($item['title']) ? check_plain($item['title']) : t('no title');
    $description = isset($item['description']) ? check_plain($item['description']) : '';
  }
  return '<strong>' . $title . '</strong> ' . $description;
}