function recipe_field_extra_fields in Recipe 7
Same name and namespace in other branches
- 7.2 recipe.module \recipe_field_extra_fields()
Implements hook_field_extra_fields().
This adds these fields to the manage fields UI for changing weights.
File
- ./
recipe.module, line 1830 - Contains functions for Recipe node CRUD and display.
Code
function recipe_field_extra_fields() {
$extra = array();
$extra['node']['recipe'] = array(
'form' => array(
'recipe_description' => array(
'label' => t('Description'),
'description' => t('Recipe module element'),
'weight' => -5,
),
'recipe_yield' => array(
'label' => t('Yield'),
'description' => t('Recipe module element'),
'weight' => -4,
),
'recipe_yield_unit' => array(
'label' => t('Yield units'),
'description' => t('Recipe module element'),
'weight' => -4,
),
'recipe_ingredients' => array(
'label' => t('Ingredients'),
'description' => t('Recipe module element'),
'weight' => -3,
),
'recipe_instructions' => array(
'label' => t('Instructions'),
'description' => t('Recipe module element'),
'weight' => -2,
),
'recipe_notes' => array(
'label' => t('Additional notes'),
'description' => t('Recipe module element'),
'weight' => -2,
),
'recipe_source' => array(
'label' => t('Source'),
'description' => t('Recipe module element'),
'weight' => -2,
),
'recipe_preptime' => array(
'label' => t('Preparation time'),
'description' => t('Recipe module element'),
'weight' => -1,
),
'recipe_cooktime' => array(
'label' => t('Cooking time'),
'description' => t('Recipe module element'),
'weight' => -1,
),
),
'display' => array(
'recipe_description' => array(
'label' => t('Description'),
'description' => t('Recipe module element'),
'weight' => -5,
),
'recipe_ingredients' => array(
'label' => t('Ingredients'),
'description' => t('Recipe module element'),
'weight' => -3,
),
'recipe_instructions' => array(
'label' => t('Instructions'),
'description' => t('Recipe module element'),
'weight' => -2,
),
'recipe_notes' => array(
'label' => t('Additional notes'),
'description' => t('Recipe module element'),
'weight' => -2,
),
'recipe_summary_box' => array(
'label' => t('Recipe summary box'),
'description' => t('Recipe module element'),
'weight' => -6,
),
),
);
return $extra;
}