filter_format_allowcache

Versions
4.6 – 6
filter_format_allowcache($format)
7
filter_format_allowcache($format_id)

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

▾ 3 functions call filter_format_allowcache()

check_markup in modules/filter/filter.module
Run all the enabled filters on a piece of text.
hook_field_load in modules/field/field.api.php
Define custom load behavior for this module's field types.
text_field_load in modules/field/modules/text/text.module
Implement hook_field_load().

Code

modules/filter/filter.module, line 497

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