You are here

function theme_biblio_style in Bibliography Module 7.2

Same name and namespace in other branches
  1. 6.2 includes/biblio_theme.inc \theme_biblio_style()
  2. 6 biblio_theme.inc \theme_biblio_style()
  3. 7 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

8 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_page_view in ./biblio.module
Displays a biblio; Hands data off to the Field API
biblio_plugin_row_citation::render in views/biblio_plugin_row_citation.inc
Render a row object. This usually passes through to a theme template of some form, but not always.
biblio_rtf_biblio_export in modules/rtf/biblio_rtf.module

... See full list

File

includes/biblio.theme.inc, line 711

Code

function theme_biblio_style($variables) {
  $biblio = $variables['biblio'];
  $wrapper = biblio_wrapper($biblio);
  $style_name = $variables['style_name'];
  $styled_biblio = '';
  module_load_include('inc', 'biblio', "/styles/biblio_style_{$style_name}");
  $style_function = "biblio_style_{$style_name}";
  if (function_exists($style_function)) {
    $styled_biblio = $style_function($biblio);
  }
  else {
    drupal_set_message(t('The style function: @funct does not exist', array(
      '@funct' => $style_function,
    )), 'error');
  }
  return $styled_biblio . filter_xss($wrapper->biblio_coins
    ->value(), array(
    'span',
  ));
}