You are here

function recipe_plaintext_recipeio in Recipe 7.2

Same name and namespace in other branches
  1. 6 plugins/recipe_plaintext.module \recipe_plaintext_recipeio()
  2. 7 includes/recipe_plaintext.module \recipe_plaintext_recipeio()

Implements hook_recipeio().

File

modules/recipe_plaintext.module, line 24

Code

function recipe_plaintext_recipeio($type) {
  global $recipe_plaintext_example;
  $supported = array(
    'import_single' => array(
      'format_name' => t('Plain Text'),
      'callback' => 'recipe_plaintext_import',
      'format_help' => '',
      'format_example' => "{$recipe_plaintext_example}",
    ),
    'export_single' => array(
      'format_name' => t('Plain Text'),
      'callback' => 'recipe_plaintext_export',
      'format_help' => t('Export to a plaintext format.'),
    ),
    'export_multi' => array(
      'format_name' => t('Plain Text'),
      'callback' => 'recipe_plaintext_export_multi',
      'format_help' => t('Export all recipes to a plaintext format.'),
    ),
  );
  if (isset($supported[$type])) {
    return array(
      'plaintext' => $supported[$type],
    );
  }
  else {
    return FALSE;
  }
}