You are here

function theme_nodereference_formatter_plain in Content Construction Kit (CCK) 6.3

Same name and namespace in other branches
  1. 6 modules/nodereference/nodereference.module \theme_nodereference_formatter_plain()
  2. 6.2 modules/nodereference/nodereference.module \theme_nodereference_formatter_plain()

Theme function for 'plain' nodereference field formatter.

File

modules/nodereference/nodereference.module, line 336
Defines a field type for referencing one node from another.

Code

function theme_nodereference_formatter_plain($element) {
  $output = '';
  if (!empty($element['#item']['safe']['nid'])) {
    $output = check_plain($element['#item']['safe']['title']);
    if (!$element['#item']['safe']['status']) {
      $output = '<span class="node-unpublished"> ' . t('(Unpublished)') . " {$output}</span>";
    }
  }
  return $output;
}