You are here

function filter_access in Drupal 5

Same name and namespace in other branches
  1. 4 modules/filter.module \filter_access()
  2. 6 modules/filter/filter.module \filter_access()
  3. 7 modules/filter/filter.module \filter_access()

Returns TRUE if the user is allowed to access this format.

4 calls to filter_access()
block_block in modules/block/block.module
Implementation of hook_block().
block_box_save in modules/block/block.module
check_markup in modules/filter/filter.module
Run all the enabled filters on a piece of text.
node_access in modules/node/node.module
Determine whether the current user may perform the given operation on the specified node.

File

modules/filter/filter.module, line 871
Framework for handling filtering of content.

Code

function filter_access($format) {
  $format = filter_resolve_format($format);
  if (user_access('administer filters') || $format == variable_get('filter_default_format', 1)) {
    return TRUE;
  }
  else {
    $formats = filter_formats();
    return isset($formats[$format]);
  }
}