function theme_biblio_style in Bibliography Module 7
Same name and namespace in other branches
- 6.2 includes/biblio_theme.inc \theme_biblio_style()
- 6 biblio_theme.inc \theme_biblio_style()
- 7.2 includes/biblio.theme.inc \theme_biblio_style()
Applies a "style" function to a single node.
Parameters
$node: A node
$style_name: The name of the style to apply
Return value
A string containing the styled (HTML) node
7 theme calls to theme_biblio_style()
- biblio_entry in includes/
biblio.pages.inc - biblio_handler_citation::render in views/
biblio_handler_citation.inc - Render the field.
- biblio_rtf_biblio_export in modules/
rtf/ biblio_rtf.module - biblio_view in ./
biblio.module - Implements hook_view().
- theme_biblio_entry in includes/
biblio_theme.inc
File
- includes/
biblio_theme.inc, line 805
Code
function theme_biblio_style($variables) {
$node = $variables['node'];
$style_name = $variables['style_name'];
$styled_node = '';
module_load_include('inc', 'biblio', "/styles/biblio_style_{$style_name}");
$style_function = "biblio_style_{$style_name}";
if (function_exists($style_function)) {
$styled_node = $style_function($node);
}
else {
drupal_set_message(t('The style function: @funct does not exist', array(
'@funct' => $style_function,
)), 'error');
}
return $styled_node . (isset($node->biblio_coins) ? filter_xss($node->biblio_coins, array(
'span',
)) : NULL);
}