You are here

function theme_recipe_instructions in Recipe 7

Returns HTML for displaying the recipe instructions.

1 string reference to 'theme_recipe_instructions'
recipe_theme in ./recipe.module
Implements hook_theme().
1 theme call to theme_recipe_instructions()
recipe_view in ./recipe.module
Implements hook_view().

File

./recipe.module, line 950
Contains functions for Recipe node CRUD and display.

Code

function theme_recipe_instructions($variables) {
  $node = $variables['node'];

  // Wrap instructions in RDFa markup.
  if (!empty($node->rdf_mapping['recipe_instructions'])) {
    $attributes = rdf_rdfa_attributes($node->rdf_mapping['recipe_instructions']);
    $attributes['class'] = array(
      'recipe-section',
    );
    $node->recipe_instructions = theme('rdf_template_variable_wrapper', array(
      'content' => $node->recipe_instructions,
      'attributes' => $attributes,
      'inline' => FALSE,
    ));
  }
  $output = '<div class="recipe-instructions recipe-section">';
  $output .= '<h2 class="title">' . t('Instructions') . '</h2>';
  $output .= '<div class="section">' . $node->recipe_instructions . '</div>';
  $output .= '</div>';
  return $output;
}