You are here

function _classic_format_author in Bibliography Module 6.2

Same name and namespace in other branches
  1. 6 biblio_style_classic.inc \_classic_format_author()
  2. 7.2 styles/biblio_style_classic.inc \_classic_format_author()

Creates a string with the author's nname in classic format.

Parameters

array $author: An associative arry with the following keys:

  • prefix:
  • lastname:
  • firstname:
  • initials:

Return value

string A string representing the author's name in classic format.

File

styles/biblio_style_classic.inc, line 107
Functions for rendering biblio item information in classic style.

Code

function _classic_format_author($author) {
  $format = $author['prefix'] . ' ' . $author['lastname'] . ' ';
  $format .= !empty($author['firstname']) ? ' ' . drupal_substr($author['firstname'], 0, 1) : '';
  $format .= !empty($author['initials']) ? str_replace(' ', '', $author['initials']) : '';
  return $format;
}