filter_format_allowcache

modules/filter/filter.module, line 361

Versions
4.6 – 7
filter_format_allowcache($format)

Check if text in a certain input format is allowed to be cached.

▾ 2 functions call filter_format_allowcache()

check_markup in modules/filter/filter.module
Run all the enabled filters on a piece of text.
search_index in modules/search/search.module
Update the full-text search index for a particular item.

Code

<?php
function filter_format_allowcache($format) {
  static $cache = array();
  $format = filter_resolve_format($format);
  if (!isset($cache[$format])) {
    $cache[$format] = db_result(db_query('SELECT cache FROM {filter_formats} WHERE format = %d', $format));
  }
  return $cache[$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.