You are here

function recipe_mastercook4_export_multi in Recipe 7

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

File

includes/recipe_mastercook4.module, line 44
recipe_mastercook4.module - Enables importing and exporting of MasterCook4 format recipes.

Code

function recipe_mastercook4_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_mastercook4_export_single($record->nid);
  }
  drupal_add_http_header('Content-type', 'text/plain; charset=utf-8');
  print $o;
}