function _biblio_citekey_print in Bibliography Module 7.2
Same name and namespace in other branches
- 5 biblio.module \_biblio_citekey_print()
- 6.2 biblio.module \_biblio_citekey_print()
- 6 biblio.module \_biblio_citekey_print()
- 7 biblio.module \_biblio_citekey_print()
@todo create relevant documentation for this function
Parameters
type $citekey:
Return value
array
3 calls to _biblio_citekey_print()
- _biblio_filter_footnote_callback in ./biblio.module 
- preg_replace_callback() callback function
- _biblio_filter_replace_callback in ./biblio.module 
- preg_replace_callback() callback function
- _biblio_inline_filter_replace_callback in ./biblio.module 
- preg_replace_callback() callback function
File
- ./biblio.module, line 1995 
Code
function _biblio_citekey_print($citekey) {
  $nid = db_query("SELECT nid FROM {biblio} WHERE biblio_citekey = :key", array(
    ':key' => $citekey,
  ))
    ->fetchObject();
  if ($nid->nid > 0) {
    $style = biblio_get_style();
    $base = variable_get('biblio_base', 'biblio');
    $node = node_load($nid->nid);
    return theme('biblio_style', array(
      'node' => $node,
      'base' => $base,
      'style' => $style,
    ));
  }
  else {
    return t("Citekey @cite not found", array(
      '@cite' => $citekey,
    ));
  }
}