You are here

function recipe_export_multi_access in Recipe 6

Extend user_access to handle case where no export formats are available

1 string reference to 'recipe_export_multi_access'
recipe_menu in ./recipe.module
Implementation of hook_menu().

File

./recipe.module, line 1697
recipe.module - share recipes

Code

function recipe_export_multi_access($string, $account = NULL, $reset = FALSE) {

  // short circuit if there are no parsers available.
  $formats = module_invoke_all('recipeio', 'export_multi');
  if (count($formats) == 0) {
    return FALSE;
  }

  // we have a format so continue to user_access
  return user_access($string, $account, $reset);
}