filter_access

Versions
4.6 – 6
filter_access($format)
7
filter_access($format, $account = NULL)

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

▾ 4 functions call filter_access()

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

Code

modules/filter.module, line 851

<?php
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]);
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.