filter_access

Definition

filter_access($format)
modules/filter/filter.module, line 533

Description

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

Code

<?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]);
  }
}
?>
 
 

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.