function recipe_mastercook4_export_multi in Recipe 7.2
Same name and namespace in other branches
- 6 plugins/recipe_mastercook4.module \recipe_mastercook4_export_multi()
- 7 includes/recipe_mastercook4.module \recipe_mastercook4_export_multi()
1 string reference to 'recipe_mastercook4_export_multi'
- recipe_mastercook4_recipeio in modules/
recipe_mastercook4.module - Implements hook_recipeio().
File
- modules/
recipe_mastercook4.module, line 42 - 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;
}