You are here

function recipe_plaintext_recipeio in Recipe 6

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

Implementation of hook_recipeio($type).

File

plugins/recipe_plaintext.module, line 24

Code

function recipe_plaintext_recipeio($type) {
  $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;
  }
}