You are here

function recipe_plaintext_export_multi in Recipe 7

Same name and namespace in other branches
  1. 6 plugins/recipe_plaintext.module \recipe_plaintext_export_multi()
  2. 7.2 modules/recipe_plaintext.module \recipe_plaintext_export_multi()
1 string reference to 'recipe_plaintext_export_multi'
recipe_plaintext_recipeio in includes/recipe_plaintext.module
Implementation of hook_recipeio($type).

File

includes/recipe_plaintext.module, line 156

Code

function recipe_plaintext_export_multi() {

  // you should not be able to export unpublished recipes
  $result = db_query("SELECT n.nid from {node} n WHERE n.type='recipe' and n.status>0 ORDER BY n.title");
  $o = '';
  foreach ($result as $record) {
    $o .= recipe_plaintext_export($record->nid);
    $o .= "\n====\n";
  }
  drupal_add_http_header('Content-type', 'text/plain; charset=utf-8');
  print $o;
}